:root {
  color-scheme: light;
  --navy: #17395f;
  --blue: #1659a8;
  --blue-dark: #0c448d;
  --lavender: #efefff;
  --lavender-2: #e5e3ff;
  --ink: #202936;
  --muted: #687487;
  --line: #cfd6df;
  --surface: #ffffff;
  --canvas: #f4f6f8;
  --success: #19734b;
  --danger: #c43b3b;
  --warning: #a3680e;
  font-family: Arial, "Noto Sans JP", "Yu Gothic", YuGothic, Meiryo, sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-size: 16px; line-height: 1.6; }
button, select, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid rgba(31, 105, 190, .28); outline-offset: 2px; }

.topbar {
  height: 64px;
  background: #fff;
  border-bottom: 4px solid var(--navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - 1120px) / 2));
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--navy); font-size: 15px; font-weight: 800; letter-spacing: .08em; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; background: var(--navy); color: #fff; font-size: 12px; letter-spacing: 0; }
.private-badge { border: 1px solid #aebbc9; color: #5f6e7f; padding: 4px 11px; font-size: 12px; letter-spacing: .08em; }

.eyebrow { color: var(--blue); font-size: 13px; font-weight: 800; letter-spacing: .13em; }
h1 { margin: 6px 0 10px; font-size: clamp(29px, 4vw, 42px); line-height: 1.25; }
h2, h3 { margin: 0; }
.primary-btn, .secondary-btn { min-height: 48px; padding: 0 22px; font-weight: 800; }
.primary-btn { border: 1px solid var(--blue-dark); background: var(--blue); color: white; }
.primary-btn:hover { background: var(--blue-dark); }
.secondary-btn { border: 1px solid #a8b7c9; background: white; color: var(--blue-dark); }
.wide { width: 100%; margin-top: 26px; }

/* Mode selection */
.mode-page { width: min(1040px, calc(100% - 40px)); margin: 52px auto 70px; }
.mode-intro { text-align: center; margin-bottom: 30px; }
.mode-intro p { margin: 0; color: var(--muted); }
.entry-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.entry-card {
  min-height: 280px;
  border: 1px solid #aeb9c6;
  background: white;
  color: var(--ink);
  padding: 30px;
  display: flex;
  flex-direction: column;
  text-align: left;
  box-shadow: 0 8px 20px rgba(33, 53, 78, .08);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.entry-card:hover { transform: translateY(-3px); border-color: var(--blue); box-shadow: 0 14px 30px rgba(33, 53, 78, .13); }
.entry-card.mock { background: var(--navy); color: white; border-color: var(--navy); }
.entry-card.mock:hover { border-color: #6ea2dd; }
.entry-card.wall { background: var(--lavender); border-color: #9d9bcb; }
.entry-card.wall:hover { border-color: #5d58ad; }
.entry-index { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid currentColor; font-size: 13px; font-weight: 800; }
.entry-title { display: block; margin-top: 24px; font-size: 29px; font-weight: 800; }
.entry-copy { display: block; margin-top: 8px; color: var(--muted); line-height: 1.7; }
.mock .entry-copy { color: #d8e3ef; }
.entry-link { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 28px; border-top: 1px solid #d8dee6; font-weight: 800; color: var(--blue); }
.entry-link b { font-size: 28px; line-height: 1; }
.mock .entry-link { color: white; border-color: rgba(255,255,255,.26); }
.wall .entry-link { color: #4a4798; border-color: #c3c0e5; }
.resume-strip { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 20px; padding: 18px 20px; background: #fff; border: 1px solid #9ebce0; }
.resume-strip div { display: flex; flex-direction: column; }
.resume-strip span, .source-note { color: var(--muted); font-size: 14px; }
.source-note { text-align: center; margin: 22px 0 0; }

/* Mode configuration */
.config-page { width: min(840px, calc(100% - 40px)); margin: 34px auto 70px; }
.back-link { border: 0; background: transparent; color: var(--blue); font-weight: 700; padding: 8px 0; margin-bottom: 10px; }
.config-panel { background: #fff; border: 1px solid #b9c2cd; padding: 34px; box-shadow: 0 10px 26px rgba(33, 53, 78, .09); }
.config-head { border-bottom: 1px solid #d7dde5; padding-bottom: 24px; }
.config-head p { margin: 0; color: var(--muted); }
.config-section { padding-top: 26px; }
.config-section h2 { font-size: 16px; margin-bottom: 12px; }
.subject-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.subject-card { border: 1px solid #bfc9d5; background: #fff; min-height: 90px; padding: 14px; color: var(--ink); }
.subject-card span { display: block; font-size: 19px; font-weight: 800; }
.subject-card small { color: var(--muted); }
.subject-card.selected { border: 2px solid var(--blue); background: #eaf3fd; color: var(--blue-dark); padding: 13px; }
.count-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.count-btn { border: 1px solid #bfc9d5; background: white; min-height: 50px; color: var(--ink); font-weight: 800; }
.count-btn.selected { border: 2px solid var(--blue); background: var(--blue); color: #fff; }
.mock-schedule { margin-top: 28px; border: 1px solid #bac4d0; }
.schedule-row { min-height: 62px; display: grid; grid-template-columns: 44px 1fr 90px 90px; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid #d7dde5; }
.schedule-row:last-of-type { border-bottom: 0; }
.schedule-order { width: 28px; height: 28px; display: grid; place-items: center; background: var(--lavender-2); color: var(--blue-dark); font-size: 13px; font-weight: 800; }
.schedule-row span:nth-last-child(-n+2) { text-align: right; }
.schedule-total { display: flex; justify-content: space-between; padding: 16px 18px; background: var(--navy); color: white; }
.config-notice { margin-top: 22px; padding: 13px 15px; background: #fff8e7; border-left: 4px solid #c88d25; color: #674a19; font-size: 14px; }

/* Exam screen — deliberately close to the supplied GAB reference */
.legacy-exam { min-height: 100vh; background: white; color: #171717; font-family: Arial, "Yu Gothic", Meiryo, sans-serif; }
.legacy-header { min-height: 54px; border-bottom: 1px solid #7b7b7b; background: #f8f8f8; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 8px max(16px, calc((100vw - 980px) / 2)); }
.legacy-header > div:first-child { display: flex; align-items: baseline; gap: 18px; }
.legacy-header strong { font-size: 14px; letter-spacing: .04em; }
.legacy-header span { font-size: 13px; color: #404040; }
.legacy-status { display: flex; align-items: center; gap: 18px; }
.legacy-status .timer { min-width: 72px; font-size: 18px; font-variant-numeric: tabular-nums; color: #111; text-align: right; }
.legacy-status .timer.warning { color: var(--warning); }
.legacy-status .timer.danger { color: var(--danger); }
.legacy-stage { width: min(960px, calc(100% - 28px)); margin: 10px auto 0; padding-bottom: 24px; }
.legacy-instruction { min-height: 30px; display: flex; align-items: center; font-size: 14px; font-weight: 700; }
.stimulus-panel { min-height: 286px; border: 2px solid #858585; background: var(--lavender); padding: 22px 26px; box-shadow: inset 0 0 0 2px rgba(255,255,255,.5); }
.stimulus-label { display: inline-block; background: #fff; border: 1px solid #b5b5c7; padding: 3px 9px; font-size: 12px; font-weight: 700; }
.stimulus-title { margin-top: 18px; font-size: clamp(18px, 2.5vw, 24px); font-weight: 800; }
.stimulus-placeholder { width: min(620px, 100%); margin-top: 20px; border-top: 1px solid #b8b6ce; padding-top: 14px; color: #626174; font-size: 14px; }
.prompt-panel { margin-top: 24px; border: 2px solid #98989f; border-radius: 13px; background: #f4f3ff; min-height: 64px; padding: 16px 22px; font-size: 16px; font-weight: 700; }
.legacy-choices { display: grid; gap: 5px; padding: 14px 4px 10px; }
.legacy-choice { width: 100%; border: 0; background: transparent; display: grid; grid-template-columns: 15px 25px 1fr; gap: 5px; align-items: start; padding: 4px 0; color: #1559aa; text-align: left; font-size: 15px; line-height: 1.45; }
.legacy-choice:hover { background: #f2f6ff; }
.radio-dot { width: 13px; height: 13px; margin-top: 4px; border: 2px solid #5f94cc; border-radius: 50%; background: white; }
.legacy-choice.selected .radio-dot { border: 4px solid #225f9e; }
.legacy-choice.selected { color: #063f7d; font-weight: 800; }
.legacy-choice-key { font-weight: 800; }
.legacy-choice:disabled { cursor: default; }
.legacy-choice.correct { color: #12623f; background: #e8f6ee; }
.legacy-choice.correct .radio-dot { border-color: #1d8256; background: #1d8256; box-shadow: inset 0 0 0 2px white; }
.legacy-choice.incorrect { color: #a32e2e; background: #fff0f0; }
.legacy-choice.incorrect .radio-dot { border-color: #c44141; background: #c44141; box-shadow: inset 0 0 0 2px white; }
.instant-feedback { margin: 4px 0 13px; border: 1px solid; border-left-width: 5px; padding: 13px 16px; }
.instant-feedback.correct { background: #edf8f2; border-color: #3d946d; }
.instant-feedback.incorrect { background: #fff2f2; border-color: #c95a5a; }
.feedback-result { font-size: 19px; font-weight: 900; }
.instant-feedback.correct .feedback-result { color: #176442; }
.instant-feedback.incorrect .feedback-result { color: #a82d2d; }
.feedback-answer, .feedback-note { display: grid; grid-template-columns: 50px 1fr; gap: 12px; margin-top: 7px; font-size: 14px; }
.feedback-answer span, .feedback-note span { color: #616b76; font-size: 12px; font-weight: 800; padding-top: 2px; }
.feedback-note p { margin: 0; }
.legacy-footer { border-top: 1px solid #aaa; margin-top: 3px; padding-top: 7px; }
.footer-state { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; font-size: 12px; }
.footer-state b { font-size: 15px; }
.flag-link { border: 0; background: transparent; color: #4f5c6a; padding: 2px 4px; font-size: 12px; }
.flag-link.active { color: #9b6209; font-weight: 800; }
.legacy-progress { height: 12px; margin: 5px 0 7px; background: #d7d2ff; border: 1px solid #a9a5d2; }
.legacy-progress span { display: block; height: 100%; background: #1600c8; min-width: 3px; }
.legacy-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.legacy-actions > div { display: flex; gap: 8px; }
.legacy-nav, .legacy-end { min-height: 30px; border: 2px solid #9cabb8; background: linear-gradient(#fff, #e4e9ed); color: #2d3a44; padding: 1px 17px; font-size: 13px; font-weight: 700; }
.legacy-nav:disabled { opacity: .45; cursor: not-allowed; }
.legacy-end { border: 0; background: transparent; color: #c52d2d; padding-left: 0; }

/* Section break and results */
.break-page, .result-page { width: min(900px, calc(100% - 40px)); margin: 44px auto 80px; }
.break-panel { background: white; border: 1px solid var(--line); box-shadow: 0 12px 32px rgba(23,36,58,.1); padding: 42px; text-align: center; }
.break-icon { width: 62px; height: 62px; margin: 0 auto 20px; display: grid; place-items: center; border-radius: 50%; background: #e9f2fb; color: var(--blue); font-size: 26px; font-weight: 900; }
.break-panel p { color: var(--muted); }
.break-meta { display: flex; justify-content: center; gap: 38px; margin: 24px 0; }
.break-meta strong { display: block; font-size: 24px; color: var(--navy); }
.break-meta span { color: var(--muted); font-size: 13px; }
.result-hero { background: var(--navy); color: white; padding: 34px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px; }
.result-hero h1 { margin: 3px 0 5px; }
.result-hero p { margin: 0; color: #cddcf0; }
.score-ring { width: 126px; height: 126px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#64a8f5 var(--score), rgba(255,255,255,.18) 0); position: relative; }
.score-ring::after { content: ""; position: absolute; inset: 10px; background: var(--navy); border-radius: 50%; }
.score-ring span { position: relative; z-index: 1; font-size: 30px; font-weight: 900; }
.score-ring small { font-size: 14px; }
.result-panel { background: white; border: 1px solid var(--line); border-top: 0; padding: 28px 32px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); }
.stat { padding: 18px; text-align: center; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat strong { display: block; font-size: 26px; color: var(--navy); }
.stat span { color: var(--muted); font-size: 13px; }
.section-results { margin-top: 26px; display: grid; gap: 10px; }
.section-result { display: grid; grid-template-columns: 140px 1fr auto; gap: 16px; align-items: center; border: 1px solid var(--line); padding: 14px 16px; }
.mini-track { height: 7px; background: #e8edf4; }
.mini-fill { height: 100%; background: var(--blue); }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.review-list { margin-top: 24px; display: grid; gap: 13px; }
.review-item { background: white; border: 1px solid var(--line); padding: 20px; }
.review-item.correct { border-left: 5px solid var(--success); }
.review-item.incorrect { border-left: 5px solid var(--danger); }
.review-meta { color: var(--muted); font-size: 13px; font-weight: 750; }
.review-prompt { margin: 8px 0 12px; font-weight: 700; }
.answer-line { display: grid; grid-template-columns: 100px 1fr; gap: 10px; font-size: 14px; }
.answer-line span:first-child { color: var(--muted); }
.correct-text { color: var(--success); font-weight: 800; }
.incorrect-text { color: var(--danger); font-weight: 800; }
.empty { padding: 38px; text-align: center; color: var(--muted); border: 1px dashed #aab7c7; }

@media (max-width: 900px) {
  .entry-grid { grid-template-columns: 1fr; }
  .entry-card { min-height: 190px; }
}

@media (max-width: 720px) {
  html { -webkit-text-size-adjust: 100%; }
  body { background: #fff; }
  button { touch-action: manipulation; }

  .topbar {
    height: 56px;
    padding: 0 16px;
    border-bottom-width: 3px;
  }
  .brand { font-size: 13px; }
  .brand-mark { width: 30px; height: 30px; }
  .private-badge { display: none; }

  .mode-page, .config-page, .break-page, .result-page {
    width: 100%;
    margin: 0;
  }
  .mode-page { padding: 22px 15px 36px; }
  .mode-intro { text-align: left; margin-bottom: 18px; }
  .mode-intro h1 { font-size: 27px; margin-top: 3px; }
  .mode-intro p { font-size: 14px; line-height: 1.6; }
  .entry-grid { gap: 11px; }
  .entry-card {
    min-height: 0;
    padding: 18px;
    display: grid;
    grid-template-columns: 38px 1fr 22px;
    grid-template-rows: auto auto;
    column-gap: 13px;
    row-gap: 3px;
    align-items: center;
    box-shadow: 0 3px 10px rgba(33, 53, 78, .08);
  }
  .entry-card:hover { transform: none; }
  .entry-index { width: 36px; height: 36px; grid-row: 1 / 3; font-size: 12px; }
  .entry-title { margin: 0; font-size: 21px; line-height: 1.3; }
  .entry-copy { margin: 0; font-size: 13px; line-height: 1.5; }
  .entry-link {
    grid-column: 3;
    grid-row: 1 / 3;
    align-self: stretch;
    display: grid;
    place-items: center;
    border: 0;
    padding: 0;
    font-size: 0;
  }
  .entry-link b { font-size: 27px; }
  .resume-strip { margin-top: 12px; padding: 14px; align-items: stretch; flex-direction: column; gap: 10px; }
  .resume-strip .secondary-btn { min-height: 46px; }
  .source-note { margin-top: 16px; font-size: 12px; }

  .config-page {
    background: #f5f7f9;
    padding: 12px 0 0;
    min-height: calc(100vh - 56px);
    min-height: calc(100dvh - 56px);
  }
  .back-link { margin: 0 16px 9px; min-height: 42px; }
  .config-panel {
    border-left: 0;
    border-right: 0;
    padding: 23px 16px calc(24px + env(safe-area-inset-bottom));
    box-shadow: none;
  }
  .config-head { padding-bottom: 18px; }
  .config-head h1 { font-size: 26px; }
  .config-head p { font-size: 14px; }
  .config-section { padding-top: 21px; }
  .subject-grid { grid-template-columns: repeat(3, 1fr); gap: 7px; }
  .subject-card { min-height: 76px; padding: 9px 4px; }
  .subject-card.selected { padding: 8px 3px; }
  .subject-card span { font-size: 16px; }
  .subject-card small { display: block; font-size: 10px; line-height: 1.3; margin-top: 3px; }
  .count-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .count-btn { min-height: 48px; }
  .config-notice { font-size: 12px; line-height: 1.55; }
  .primary-btn.wide { min-height: 54px; font-size: 17px; }
  .schedule-row {
    grid-template-columns: 34px 1fr 58px 46px;
    min-height: 58px;
    padding: 0 10px;
    gap: 7px;
    font-size: 14px;
  }

  .legacy-exam { overscroll-behavior-y: contain; }
  .legacy-header {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 50px;
    padding: 7px 11px;
    gap: 8px;
    background: rgba(248, 248, 248, .97);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
  }
  .legacy-header > div:first-child { flex-direction: column; gap: 0; }
  .legacy-header strong { font-size: 12px; }
  .legacy-header span { font-size: 11px; }
  .legacy-status { gap: 7px; }
  .legacy-status > span { display: none; }
  .legacy-status .timer { min-width: 58px; font-size: 17px; }
  .legacy-stage {
    width: 100%;
    margin: 0;
    padding: 7px 8px calc(112px + env(safe-area-inset-bottom));
  }
  .legacy-instruction { min-height: 27px; font-size: 11px; padding: 0 2px; }
  .stimulus-panel { min-height: 152px; border-width: 1px; padding: 14px; }
  .stimulus-label { padding: 2px 7px; font-size: 10px; }
  .stimulus-title { margin-top: 11px; font-size: 18px; line-height: 1.5; }
  .stimulus-placeholder { margin-top: 12px; padding-top: 10px; font-size: 12px; line-height: 1.5; }
  .prompt-panel {
    margin-top: 10px;
    min-height: 0;
    border-width: 1px;
    border-radius: 9px;
    padding: 12px 14px;
    font-size: 15px;
    line-height: 1.65;
  }
  .legacy-choices { gap: 7px; padding: 10px 0 8px; }
  .legacy-choice {
    min-height: 50px;
    grid-template-columns: 17px 23px 1fr;
    gap: 5px;
    align-items: center;
    border: 1px solid #cbd5e0;
    border-radius: 7px;
    padding: 10px 11px;
    background: #fff;
    font-size: 14px;
    line-height: 1.5;
  }
  .legacy-choice:hover { background: #fff; }
  .legacy-choice:active { background: #edf4fc; }
  .radio-dot { width: 15px; height: 15px; margin-top: 0; }
  .instant-feedback { margin: 2px 0 10px; padding: 11px 12px; }
  .feedback-result { font-size: 17px; }
  .feedback-answer, .feedback-note { grid-template-columns: 42px 1fr; gap: 8px; font-size: 13px; }

  .legacy-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 25;
    margin: 0;
    padding: 6px 10px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid #939aa3;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 -3px 12px rgba(0, 0, 0, .14);
  }
  .footer-state { gap: 10px; font-size: 11px; white-space: nowrap; }
  .footer-state b { font-size: 13px; }
  .flag-link { margin-left: auto; padding: 3px; font-size: 11px; }
  .legacy-progress { height: 6px; margin: 4px 0 6px; }
  .legacy-actions { gap: 8px; }
  .legacy-actions > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    width: min(64vw, 270px);
  }
  .legacy-nav { min-width: 0; min-height: 42px; padding: 0 10px; font-size: 13px; }
  .legacy-end { min-height: 42px; padding: 0 3px; font-size: 11px; }

  .break-page, .result-page {
    padding: 14px 10px 36px;
    background: #f4f6f8;
    min-height: calc(100vh - 56px);
    min-height: calc(100dvh - 56px);
  }
  .break-panel { padding: 30px 18px; }
  .break-panel h1 { font-size: 26px; }
  .result-hero { grid-template-columns: 1fr auto; padding: 22px 18px; }
  .result-hero h1 { font-size: 27px; }
  .score-ring { width: 92px; height: 92px; }
  .score-ring span { font-size: 24px; }
  .result-panel { padding: 18px 12px; }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .stat { padding: 12px 5px; }
  .stat strong { font-size: 19px; }
  .section-result { grid-template-columns: 96px 1fr; gap: 8px; padding: 12px 10px; }
  .section-result strong { grid-column: 2; font-size: 13px; }
  .result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .result-actions .primary-btn { grid-column: 1 / -1; }
  .review-item { padding: 15px 12px; }
  .answer-line { grid-template-columns: 78px 1fr; gap: 7px; font-size: 13px; }
}

@media (max-width: 380px) {
  .entry-card { grid-template-columns: 34px 1fr 18px; padding: 15px 13px; column-gap: 9px; }
  .entry-title { font-size: 19px; }
  .entry-copy { font-size: 12px; }
  .subject-card span { font-size: 14px; }
  .legacy-stage { padding-left: 6px; padding-right: 6px; }
  .legacy-choice { padding: 9px; }
  .footer-state span:nth-child(2) { display: none; }
  .legacy-actions > div { width: 67vw; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Authentication / admin */
.account-box { display:flex; align-items:center; gap:10px; color:var(--muted); font-size:12px; }
.logout-btn, .header-logout { border:1px solid #aebbc9; background:#fff; color:#415064; min-height:34px; padding:0 11px; font-weight:700; }
.header-logout { min-height:28px; padding:0 9px; font-size:11px; }

.auth-page { width:min(940px, calc(100% - 40px)); margin:48px auto 80px; }
.auth-narrow { width:min(560px, calc(100% - 40px)); }
.auth-heading { text-align:center; margin-bottom:26px; }
.auth-heading p, .auth-card p, .admin-head p { color:var(--muted); margin:7px 0 0; }
.auth-grid { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.auth-card { background:#fff; border:1px solid #b9c4d0; padding:28px; box-shadow:0 10px 26px rgba(33,53,78,.09); }
.auth-card h1, .auth-card h2 { margin:8px 0 4px; }
.auth-step { width:42px; height:42px; display:grid; place-items:center; background:var(--navy); color:#fff; font-weight:900; font-size:12px; }
.auth-card label { display:grid; gap:7px; margin-top:22px; font-size:13px; font-weight:800; color:#4c596a; }
.auth-card input { width:100%; min-height:48px; border:1px solid #aeb9c6; background:#fff; padding:10px 12px; color:var(--ink); }
.auth-card input:focus { border-color:var(--blue); }
.auth-notice { margin:0 0 18px; padding:12px 14px; border-left:4px solid #6c7f94; background:#f0f4f8; color:#38485a; }
.auth-notice.success { border-left-color:var(--success); background:#edf8f2; color:#176442; }
.auth-notice.error { border-left-color:var(--danger); background:#fff2f2; color:#922d2d; }
.auth-admin-link { text-align:center; margin-top:22px; font-size:13px; }
.auth-admin-link a { color:var(--blue); }
.auth-code-card { margin-top:10px; }
.code-input { text-align:center; letter-spacing:.35em; font-size:26px !important; font-weight:900; font-variant-numeric:tabular-nums; }
.dev-code { margin-top:18px; padding:14px; border:1px dashed #c58b2a; background:#fff8e7; text-align:center; }
.dev-code span { display:block; color:#7d5a1e; font-size:12px; font-weight:800; }
.dev-code strong { display:block; margin-top:4px; font-size:28px; letter-spacing:.25em; }

.admin-page { width:min(1040px, calc(100% - 40px)); margin:38px auto 80px; }
.admin-head { display:flex; justify-content:space-between; align-items:end; gap:20px; margin-bottom:22px; }
.admin-head h1 { margin:5px 0 0; }
.admin-summary { display:grid; grid-template-columns:repeat(3, 1fr); border:1px solid var(--line); background:#fff; margin-bottom:18px; }
.admin-summary > div { padding:16px; text-align:center; border-right:1px solid var(--line); }
.admin-summary > div:last-child { border-right:0; }
.admin-summary strong { display:block; font-size:25px; color:var(--navy); }
.admin-summary span { color:var(--muted); font-size:12px; }
.user-list { display:grid; gap:10px; }
.user-row { background:#fff; border:1px solid var(--line); padding:17px 18px; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:9px 16px; }
.user-main { display:flex; align-items:center; gap:10px; min-width:0; }
.user-main strong { overflow-wrap:anywhere; }
.status-pill { display:inline-flex; align-items:center; min-height:25px; padding:0 9px; border-radius:999px; background:#eef2f6; color:#566477; font-size:11px; font-weight:800; white-space:nowrap; }
.status-pill.pending { background:#fff5da; color:#865c08; }
.status-pill.approved { background:#e8f6ee; color:#176442; }
.status-pill.rejected, .status-pill.suspended { background:#fff0f0; color:#9a2f2f; }
.user-meta { display:flex; gap:16px; color:var(--muted); font-size:12px; grid-column:1; }
.user-actions { grid-column:2; grid-row:1 / span 2; display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:7px; }
.admin-action { border:1px solid #aeb9c6; background:#fff; min-height:38px; padding:0 12px; color:#344254; font-weight:800; font-size:12px; }
.admin-action.approve { border-color:#4f9a76; color:#176442; background:#eff9f3; }
.admin-action.danger { border-color:#d28b8b; color:#9a2f2f; background:#fff4f4; }
.admin-action:disabled, .primary-btn:disabled { opacity:.55; cursor:wait; }

@media (max-width: 720px) {
  .account-box span { display:none; }
  .logout-btn { min-height:32px; padding:0 9px; font-size:11px; }
  .auth-page, .auth-narrow, .admin-page { width:100%; margin:0; padding:20px 13px 38px; }
  .auth-heading { text-align:left; }
  .auth-heading h1 { font-size:28px; }
  .auth-grid { grid-template-columns:1fr; gap:12px; }
  .auth-card { padding:20px 16px; box-shadow:none; }
  .admin-head { align-items:flex-start; }
  .admin-head h1 { font-size:28px; }
  .admin-summary > div { padding:12px 5px; }
  .user-row { grid-template-columns:1fr; padding:15px 13px; }
  .user-meta { grid-column:1; flex-wrap:wrap; gap:5px 12px; }
  .user-actions { grid-column:1; grid-row:auto; justify-content:flex-start; }
  .admin-action { flex:1 1 auto; }
  .header-logout { padding:0 7px; }
}
