*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

:root {
  --color-text: #393c41;
  --color-text-secondary: rgba(0, 0, 0, 0.6);
  --color-bg: #ffffff;
  --color-surface: #ffffff;
  --color-border: rgba(0, 0, 0, 0.23);
  --color-border-hover: #393c41;
  --color-primary: #1f7acc;
  --color-link-decoration: rgba(31, 122, 204, 0.4);
  --color-muted: #9297a1;
  --color-btn-disabled-bg: rgba(0, 0, 0, 0.12);
  --color-btn-disabled-text: rgba(0, 0, 0, 0.26);
  --color-menu-bg: #ffffff;
  --color-menu-shadow: 0px 5px 5px -3px rgba(0, 0, 0, 0.2),
    0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12);
  --color-menu-hover: rgba(0, 0, 0, 0.04);
  --color-divider: rgba(0, 0, 0, 0.12);
}

html[data-theme="dark"] {
  --color-text: #e8eaed;
  --color-text-secondary: rgba(255, 255, 255, 0.7);
  --color-bg: #121212;
  --color-surface: #1e1e1e;
  --color-border: rgba(255, 255, 255, 0.23);
  --color-border-hover: #e8eaed;
  --color-link-decoration: rgba(79, 163, 228, 0.4);
  --color-primary: #4fa3e4;
  --color-muted: #9aa0a6;
  --color-btn-disabled-bg: rgba(255, 255, 255, 0.12);
  --color-btn-disabled-text: rgba(255, 255, 255, 0.3);
  --color-menu-bg: #2d2d2d;
  --color-menu-shadow: 0px 5px 5px -3px rgba(0, 0, 0, 0.4),
    0px 8px 10px 1px rgba(0, 0, 0, 0.3), 0px 3px 14px 2px rgba(0, 0, 0, 0.25);
  --color-menu-hover: rgba(255, 255, 255, 0.08);
  --color-divider: rgba(255, 255, 255, 0.12);
}

body {
  margin: 0;
  color: var(--color-text);
  font-family: -apple-system, BlinkMacSystemFont, Helvetica, "ヒラギノ角ゴシック",
    "Hiragino Sans", "ヒラギノ角ゴ ProN W3", "Hiragino Kaku Gothic ProN", Verdana,
    Meiryo, sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.5;
  background-color: var(--color-bg);
}

a {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-color: var(--color-link-decoration);
}

a:hover {
  text-decoration-color: inherit;
}

.page {
  padding: 32px;
}

.login-viewport {
  height: 100vh;
}

.container {
  width: 100%;
  max-width: 444px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 600px) {
  .container {
    padding: 0 24px;
  }
}

.login-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 64px;
}

.logo {
  display: block;
  width: 100%;
  max-width: 396px;
  height: 60px;
  object-fit: contain;
  object-position: center;
}

.title {
  margin: 0 0 16px;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.5;
}

.login-form {
  width: 100%;
  margin-top: 8px;
}

.text-field {
  position: relative;
  width: 100%;
  margin-top: 16px;
  margin-bottom: 8px;
}

.text-field__control {
  position: relative;
  display: flex;
  align-items: center;
  border-radius: 4px;
  background-color: var(--color-bg);
}

.text-field__input {
  width: 100%;
  padding: 16.5px 14px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  line-height: 1.4375em;
  outline: none;
}

.text-field__outline {
  position: absolute;
  top: -5px;
  right: 0;
  bottom: 0;
  left: 0;
  margin: 0;
  padding: 0 8px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  pointer-events: none;
  overflow: hidden;
  min-width: 0;
  transition: border-color 200ms cubic-bezier(0, 0, 0.2, 1);
}

.text-field__outline legend {
  float: unset;
  width: auto;
  overflow: hidden;
  display: block;
  padding: 0;
  height: 11px;
  font-size: 0.75em;
  visibility: hidden;
  max-width: 0.01px;
  white-space: nowrap;
  transition: max-width 50ms cubic-bezier(0, 0, 0.2, 1);
}

.text-field__outline legend span {
  padding: 0 5px;
  display: inline-block;
  opacity: 0;
  visibility: visible;
}

.text-field__label {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  pointer-events: none;
  color: var(--color-text-secondary);
  font-size: 1rem;
  line-height: 1.4375em;
  white-space: nowrap;
  transform: translate(14px, 16px);
  transform-origin: top left;
  transition: color 200ms cubic-bezier(0, 0, 0.2, 1),
    transform 200ms cubic-bezier(0, 0, 0.2, 1);
}

.text-field__asterisk {
  color: inherit;
}

.text-field:hover .text-field__outline {
  border-color: var(--color-border-hover);
}

.text-field.is-focused .text-field__outline {
  border-color: var(--color-primary);
  border-width: 2px;
  padding: 0 7px;
}

.text-field.is-focused .text-field__input {
  padding: 15.5px 13px;
}

.text-field.is-focused .text-field__label,
.text-field.has-value .text-field__label {
  transform: translate(14px, -9px) scale(0.75);
  padding: 0 4px;
  background-color: var(--color-bg);
}

.text-field.is-focused .text-field__label {
  color: var(--color-primary);
}

.text-field.is-focused .text-field__outline legend,
.text-field.has-value .text-field__outline legend {
  max-width: 100%;
}

.btn-login {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 3rem;
  margin: 16px 0;
  padding: 6px 16px;
  border: 0;
  border-radius: 4px;
  background-color: var(--color-btn-disabled-bg);
  color: var(--color-btn-disabled-text);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.75;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-login.is-enabled {
  background-color: var(--color-primary);
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2),
    0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
}

.btn-login.is-enabled:hover {
  filter: brightness(0.92);
}

.help-text {
  margin: 0;
  padding-left: 1rem;
  font-size: 0.75rem;
  line-height: 1.66;
  list-style: disc;
}

.help-text li {
  margin-bottom: 0.25rem;
}

.theme-settings {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 6px 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--color-muted);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.75;
  cursor: pointer;
}

.theme-toggle:hover {
  background: var(--color-menu-hover);
}

.theme-toggle__icon {
  display: inherit;
  margin-right: 8px;
  margin-left: -4px;
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
}

.theme-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 240px;
  margin: 0;
  padding: 8px 0;
  border-radius: 4px;
  background: var(--color-menu-bg);
  box-shadow: var(--color-menu-shadow);
  list-style: none;
}

.theme-menu__header {
  padding: 6px 16px;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
}

.theme-menu__divider {
  height: 1px;
  margin: 8px 0;
  background: var(--color-divider);
}

.theme-menu__note {
  padding: 6px 16px;
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  line-height: 1.43;
}

.theme-menu__item {
  width: 100%;
  padding: 6px 16px;
  border: 0;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-size: 0.875rem;
  line-height: 1.43;
  text-align: left;
  cursor: pointer;
}

.theme-menu__item:hover,
.theme-menu__item.is-selected {
  background: var(--color-menu-hover);
}

.pepabo-footer-wrap {
  width: 100vw;
  margin-left: -32px;
  margin-right: -16px;
  background-color: #fff;
}

@media (min-width: 600px) {
  .pepabo-footer-wrap {
    margin-right: -32px;
  }
}

.site-footer {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 700;
  padding: 32px;
  text-align: center;
}
