:root {
  color-scheme: light;
  --app-bg: #f3f6f8;
  --app-surface: #ffffff;
  --app-surface-muted: #f7f9fa;
  --app-border: #d9e1e7;
  --app-border-strong: #b8c6d0;
  --app-text: #162431;
  --app-text-muted: #607180;
  --app-primary: #17324d;
  --app-primary-soft: #e8eef4;
  --app-accent: #168578;
  --app-accent-soft: #e1f4f0;
  --app-danger: #b33a3a;
  --app-danger-soft: #fbeaea;
  --app-warning: #996816;
  --app-warning-soft: #fff4d9;
  --app-info: #316f9e;
  --app-info-soft: #e7f2fa;
  --shadow-sm: 0 3px 12px rgb(29 51 68 / 0.07);
  --shadow-md: 0 12px 32px rgb(29 51 68 / 0.1);
  font-family: Inter, "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
}

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

html {
  min-height: 100%;
}

body {
  background: var(--app-bg);
  color: var(--app-text);
  margin: 0;
  min-height: 100vh;
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
}

.skip-link {
  background: #fff;
  border: 2px solid var(--app-accent);
  border-radius: 6px;
  color: var(--app-primary);
  font-size: 0.82rem;
  font-weight: 900;
  left: 0.75rem;
  padding: 0.55rem 0.75rem;
  position: fixed;
  top: -5rem;
  z-index: 1000;
}

.skip-link:focus {
  top: 0.75rem;
}

button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 3px solid rgb(22 133 120 / 0.28);
  outline-offset: 2px;
}

.app-header {
  background: var(--app-primary);
  border-bottom: 1px solid rgb(255 255 255 / 0.12);
  color: #fff;
}

.app-header__inner {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1560px;
  min-height: 66px;
  padding: 0 1.5rem;
}

.app-brand {
  align-items: center;
  display: inline-flex;
  gap: 0.75rem;
  text-decoration: none;
}

.app-brand__mark {
  align-items: center;
  background: var(--app-accent);
  border-radius: 9px;
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 900;
  height: 36px;
  justify-content: center;
  letter-spacing: 0.04em;
  width: 36px;
}

.app-brand > span:last-child {
  display: grid;
  gap: 0.05rem;
}

.app-brand strong {
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.app-brand small {
  color: rgb(255 255 255 / 0.85);
  font-size: 0.68rem;
}

.app-header__account {
  align-items: center;
  color: rgb(255 255 255 / 0.78);
  display: flex;
  font-size: 0.78rem;
  gap: 1rem;
}

.app-header__account form {
  margin: 0;
}

.button-link {
  background: transparent;
  border: 0;
  color: #fff;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.app-shell {
  margin: 0 auto;
  max-width: 1640px;
  min-height: calc(100vh - 118px);
  padding: 1.25rem 1.5rem 2rem;
}

.app-footer {
  align-items: center;
  border-top: 1px solid var(--app-border);
  color: var(--app-text-muted);
  display: flex;
  font-size: 0.7rem;
  gap: 0.75rem;
  justify-content: center;
  min-height: 52px;
}

.app-footer span + span::before {
  content: "・";
  margin-right: 0.75rem;
}

.button {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 800;
  justify-content: center;
  min-height: 38px;
  padding: 0.48rem 0.85rem;
  text-decoration: none;
}

.button--primary {
  background: var(--app-primary);
  color: #fff;
}

.button--primary:hover {
  background: #0f2539;
}

.button--secondary {
  background: var(--app-surface);
  border-color: var(--app-border-strong);
  color: var(--app-primary);
}

.button--secondary:hover {
  background: var(--app-primary-soft);
}

.button--small {
  font-size: 0.72rem;
  min-height: 32px;
  padding: 0.34rem 0.62rem;
}

.button--block {
  width: 100%;
}

.button:disabled {
  background: #dfe5e9;
  border-color: #cbd4da;
  color: #72818c;
  cursor: not-allowed;
  opacity: 1;
}

.text-link {
  color: #126f66;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.notice {
  align-items: flex-start;
  border: 1px solid;
  border-radius: 8px;
  display: flex;
  gap: 0.35rem 0.75rem;
  margin-bottom: 1rem;
  padding: 0.75rem 0.9rem;
}

.notice strong {
  flex: 0 0 auto;
  font-size: 0.82rem;
}

.notice span {
  font-size: 0.78rem;
  line-height: 1.55;
}

.notice--danger {
  background: var(--app-danger-soft);
  border-color: #e6b3b3;
  color: #7e2828;
}

.notice--warning {
  background: var(--app-warning-soft);
  border-color: #e8cf95;
  color: #71500f;
}

.notice--info {
  background: var(--app-info-soft);
  border-color: #b5d5e9;
  color: #265a80;
}

.login-page .app-shell {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

.login-shell {
  width: min(100%, 420px);
}

.login-panel {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  padding: 2rem;
  text-align: center;
}

.login-brand {
  align-items: center;
  background: var(--app-primary);
  border-radius: 13px;
  color: #fff;
  display: flex;
  font-size: 0.85rem;
  font-weight: 900;
  height: 52px;
  justify-content: center;
  margin: 0 auto 1rem;
  width: 52px;
}

.login-kicker {
  color: var(--app-accent);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  margin: 0;
  text-transform: uppercase;
}

.login-panel h1 {
  font-size: 1.7rem;
  margin: 0.3rem 0 0.7rem;
}

.login-description {
  color: var(--app-text-muted);
  font-size: 0.85rem;
  line-height: 1.7;
  margin: 0 auto 1.5rem;
}

.login-form {
  display: grid;
  gap: 0.55rem;
  text-align: left;
}

.login-form label {
  font-size: 0.78rem;
  font-weight: 800;
}

.login-form input {
  background: #fff;
  border: 1px solid var(--app-border-strong);
  border-radius: 8px;
  color: var(--app-text);
  min-height: 44px;
  padding: 0.65rem 0.75rem;
  width: 100%;
}

.login-form .button {
  margin-top: 0.55rem;
}

.login-note {
  color: var(--app-text-muted);
  font-size: 0.7rem;
  margin: 0.75rem 0 0;
}

.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

@media (max-width: 720px) {
  .app-header__inner {
    padding: 0 0.85rem;
  }

  .app-header__account > span {
    display: none;
  }

  .app-shell {
    padding: 0.8rem 0.7rem 1.5rem;
  }

  .notice {
    display: grid;
  }

  .login-page .app-shell {
    padding: 1rem;
  }

  .login-panel {
    padding: 1.5rem;
  }
}
