@charset "UTF-8";
/* Long family nicknames must not widen the phone viewport. */
.top-actions { min-width: 0; }
.user-badge { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.learn-top > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.learn-top > .text-button { flex-shrink: 0; }
.hero > div:first-child { min-width: 0; }
.eyebrow, .person strong { overflow-wrap: anywhere; }
.person { min-width: 0; }
@media (max-width: 650px) { .user-badge { max-width: 125px; } }
:root {
  --ink: #1e352f;
  --muted: #65746e;
  --green: #245c4d;
  --dark: #173d36;
  --lime: #dce8ba;
  --paper: #faf9f5;
  --line: #e1e5dc;
  --orange: #b45732;
  --soft: #edf2e7;
  --white: #fff;
  --shadow: 0 10px 40px #183e3210;
  font-family:
    -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic",
    Meiryo, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 16px;
  line-height: 1.75;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.6;
  cursor: wait;
}
a {
  color: var(--green);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #b47b39;
  outline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.5;
  letter-spacing: 0.025em;
}
h2 {
  font-size: 22px;
  line-height: 1.5;
}
h3 {
  font-size: 18px;
}
small,
.muted {
  color: var(--muted);
}
.mono {
  font-variant-numeric: tabular-nums;
}
.hidden {
  display: none !important;
}
.topbar {
  border-bottom: 1px solid var(--line);
  background: #faf9f5f5;
  padding: 18px max(22px, calc((100vw - 1120px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  color: var(--dark);
  font-weight: 750;
  font-size: 19px;
  text-decoration: none;
  white-space: nowrap;
}
.brand img {
  width: 36px;
  height: 36px;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.user-badge {
  border: 1px solid var(--line);
  background: white;
  border-radius: 30px;
  padding: 7px 15px;
  font-size: 14px;
  font-weight: 650;
}
.user-dot {
  display: inline-grid;
  place-items: center;
  background: var(--lime);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  margin-right: 6px;
}
.text-button {
  background: none;
  border: 0;
  color: var(--muted);
  padding: 8px;
  font-size: 14px;
  text-decoration: none;
}
.shell {
  max-width: 1120px;
  margin: auto;
  padding: 30px 24px 70px;
}
.eyebrow {
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.13em;
  color: var(--green);
  margin-bottom: 12px;
}
.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  margin: 20px 0 30px;
}
.hero h1 {
  margin-bottom: 10px;
}
.hero p {
  margin-bottom: 0;
  color: var(--muted);
}
.hero-note {
  background: var(--lime);
  padding: 26px 30px;
  border-radius: 50% 50% 12px 50%;
  min-width: 180px;
  text-align: center;
  transform: rotate(-3deg);
}
.hero-note strong {
  font-size: 40px;
  line-height: 1.2;
  display: block;
  letter-spacing: -0.04em;
}
.hero-note span {
  font-size: 13px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 25px 0;
}
.stat {
  padding: 20px 22px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.stat strong {
  display: block;
  font-size: 29px;
  font-weight: 700;
  line-height: 1.3;
}
.stat span {
  font-size: 12px;
  color: var(--muted);
}
.stat .unit {
  font-size: 14px;
  margin-left: 4px;
  color: var(--muted);
}
.tabs {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}
.tabs button {
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 15px 4px;
  color: var(--muted);
}
.tabs .active {
  border-color: var(--green);
  color: var(--green);
  font-weight: 700;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 28px 0 16px;
  gap: 12px;
}
.section-heading h2 {
  margin: 0;
}
.section-heading p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.subjects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.subject-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: white;
  padding: 26px;
  box-shadow: var(--shadow);
}
.subject-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.subject-icon {
  height: 54px;
  width: 54px;
  display: grid;
  place-items: center;
  background: #edf2e7;
  border-radius: 15px;
  color: var(--green);
}
.subject-icon.geography {
  background: #f6eee1;
  color: #92652f;
}
.subject-icon svg {
  width: 30px;
  height: 30px;
}
.subject-head h2 {
  margin: 0;
  font-size: 25px;
}
.subject-head p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
.tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--soft);
  font-size: 12px;
  color: var(--green);
}
.progress-line {
  height: 5px;
  background: var(--soft);
  border-radius: 20px;
  overflow: hidden;
}
.progress-line span {
  height: 100%;
  display: block;
  background: var(--green);
}
.progress-caption {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin: 9px 0 18px;
}
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  background: var(--green);
  color: white;
  border-radius: 11px;
  padding: 13px 20px;
  min-height: 50px;
  font-weight: 650;
  text-decoration: none;
  line-height: 1.5;
}
.button:hover {
  filter: brightness(1.06);
}
.button.secondary {
  background: var(--soft);
  color: var(--green);
  border-color: var(--line);
}
.button.outline {
  background: white;
  color: var(--green);
  border-color: var(--line);
}
.button.warm {
  background: #f5e9df;
  color: #974d2f;
}
.button.full {
  width: 100%;
}
.button.small {
  padding: 9px 13px;
  min-height: 42px;
  font-size: 14px;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.actions > * {
  flex: 1;
}
.inline-form {
  display: flex;
  gap: 10px;
  align-items: end;
}
.inline-form label {
  flex: 1;
}
.field,
label.field {
  display: block;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 600;
}
.field span {
  display: block;
  margin-bottom: 7px;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #ccd5ca;
  border-radius: 9px;
  padding: 11px 13px;
  background: white;
  color: var(--ink);
  min-height: 48px;
}
textarea {
  resize: vertical;
  line-height: 1.7;
}
input[type="file"] {
  font-size: 13px;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.mode-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
}
.mode-row label {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.mode-row select {
  font-size: 14px;
  padding: 9px 11px;
  min-height: 42px;
}
.scope {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 14px;
}
.scope summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
  padding: 4px 0;
}
.scope form {
  margin-top: 18px;
}
.scope-note {
  font-size: 12px;
  color: var(--muted);
  margin: 10px 0;
}
.helper {
  font-size: 13px;
  color: var(--muted);
}
.info-panel {
  background: #eef2e8;
  border-radius: 14px;
  padding: 18px 22px;
  margin-top: 24px;
  font-size: 14px;
}
.info-panel p {
  margin: 0;
}
.login-layout {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-story {
  background: var(--dark);
  color: #f6f4e9;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(32px, 7vw, 100px);
  position: relative;
  overflow: hidden;
}
.login-story .brand {
  color: #f6f4e9;
  position: absolute;
  top: 36px;
}
.login-story h1 {
  font-size: clamp(30px, 4.8vw, 58px);
  font-weight: 650;
  line-height: 1.55;
  margin-top: 100px;
}
.login-story p {
  color: #c8d7c8;
}
.book-art {
  margin-top: 40px;
  width: min(310px, 80%);
  align-self: center;
}
.login-form-wrap {
  display: grid;
  place-items: center;
  padding: 36px;
}
.login-card {
  width: 100%;
  max-width: 350px;
}
.login-card h2 {
  font-size: 28px;
  margin-bottom: 9px;
}
.login-card .field {
  margin-top: 30px;
}
.login-card input {
  font-size: 23px;
  letter-spacing: 0.3em;
  padding: 13px 17px;
}
.login-footer {
  font-size: 12px;
  color: var(--muted);
  margin-top: 22px;
  text-align: center;
}
.user-screen {
  max-width: 660px;
  margin: 50px auto;
}
.users {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 30px;
}
.person {
  background: white;
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 26px;
  display: flex;
  gap: 18px;
  align-items: center;
  text-align: left;
  color: var(--ink);
}
.avatar {
  height: 54px;
  width: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--lime);
  font-size: 22px;
  font-weight: 700;
}
.person strong {
  font-size: 20px;
}
.person small {
  display: block;
  font-size: 12px;
}
.learn-shell {
  max-width: 880px;
  margin: auto;
  padding: 24px 22px 50px;
}
.learn-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  margin-bottom: 18px;
}
.learn-progress {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 15px 0 26px;
}
.learn-progress .progress-line {
  flex: 1;
}
.learn-progress span {
  font-size: 13px;
  color: var(--muted);
}
.question-card {
  border: 1px solid var(--line);
  background: white;
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--shadow);
}
.question-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
  font-size: 12px;
  color: var(--muted);
}
.question-title {
  font-size: clamp(21px, 3vw, 27px);
  line-height: 1.75;
  white-space: pre-wrap;
  margin-bottom: 22px;
  overflow-wrap: anywhere;
}
.context {
  background: #f4f5ef;
  border-left: 3px solid #9eae91;
  padding: 16px 18px;
  border-radius: 0 9px 9px 0;
  font-size: 15px;
  white-space: pre-wrap;
  margin-bottom: 20px;
  overflow-wrap: anywhere;
}
.figure-button {
  display: block;
  border: 0;
  background: #fff;
  width: 100%;
  padding: 0;
  margin: 18px auto 8px;
  max-width: 640px;
}
.question-image {
  display: block;
  max-width: 100%;
  max-height: 420px;
  object-fit: contain;
  margin: auto;
}
.figure-hint {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 20px;
}
.data-wrap {
  overflow-x: auto;
  margin: 20px 0;
}
.data-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}
.data-table th,
.data-table td {
  border: 1px solid var(--line);
  padding: 11px;
  white-space: pre-wrap;
  text-align: left;
}
.data-table th {
  background: var(--soft);
  font-weight: 650;
}
.choices {
  display: grid;
  gap: 10px;
  margin: 20px 0;
}
.choice {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  padding: 0;
  text-align: left;
  color: var(--ink);
  overflow: hidden;
  line-height: 1.7;
}
.choice-key {
  font-weight: 700;
  background: var(--soft);
  padding: 12px 0;
  text-align: center;
  height: 100%;
  color: var(--green);
}
.choice-text {
  padding: 12px 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.choice.selected {
  border: 2px solid var(--green);
  background: #f3f7ed;
}
.choice.selected .choice-key {
  background: var(--green);
  color: white;
}
.recall-hint {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin: 24px 0 12px;
}
.answer {
  border-top: 1px solid var(--line);
  margin-top: 28px;
  padding-top: 25px;
  scroll-margin-top: 20px;
}
.answer-label {
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
}
.answer-text {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin-bottom: 14px;
}
.explanation {
  font-size: 16px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.reference-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.reference-buttons .button {
  font-size: 13px;
}
.grading {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.grading .button {
  min-height: 58px;
  flex: 1;
}
.grading .helper {
  text-align: center;
  margin: 0 0 12px;
}
.note-box {
  margin-top: 20px;
  font-size: 13px;
  color: var(--muted);
}
.note-box summary {
  cursor: pointer;
  padding: 8px;
}
.note-box textarea {
  margin-top: 8px;
  color: var(--ink);
}
.end-note {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  font-size: 11px;
  color: var(--muted);
}
.summary-card {
  max-width: 640px;
  margin: 35px auto;
  text-align: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 40px 30px;
}
.summary-mark {
  width: 72px;
  height: 72px;
  background: var(--lime);
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 22px;
  font-size: 32px;
}
.summary-score {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.summary-score span {
  font-size: 20px;
  color: var(--muted);
}
.result-dots {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 24px 0;
}
.result-dot {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--soft);
  color: var(--green);
  font-size: 14px;
}
.result-dot.wrong {
  background: #f5e9df;
  color: #974d2f;
}
.record-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  background: white;
}
.record-table th,
.record-table td {
  padding: 13px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.record-table th {
  font-size: 12px;
  background: var(--soft);
  color: var(--muted);
}
.settings-panel {
  max-width: 680px;
  border: 1px solid var(--line);
  padding: 25px;
  border-radius: 18px;
  background: white;
}
.settings-panel + .settings-panel {
  margin-top: 20px;
}
.settings-panel h3 {
  margin-bottom: 20px;
}
.person-edit {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin: 12px 0;
}
.empty {
  text-align: center;
  background: white;
  padding: 40px;
  border-radius: 16px;
  color: var(--muted);
}
#toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  max-width: calc(100% - 30px);
  padding: 13px 22px;
  border-radius: 12px;
  color: white;
  background: var(--dark);
  box-shadow: var(--shadow);
  z-index: 1000;
  display: none;
  font-size: 14px;
}
#toast.show {
  display: block;
}
#toast.error {
  background: #893e2a;
}
dialog {
  border: 0;
  padding: 0;
  border-radius: 18px;
  max-width: 94vw;
  width: 900px;
  max-height: 92svh;
  color: var(--ink);
  box-shadow: 0 20px 80px #0003;
}
dialog::backdrop {
  background: #102d27aa;
}
.dialog-head {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  z-index: 1;
}
.dialog-content {
  padding: 16px;
  overflow: auto;
  max-height: 76svh;
}
.dialog-content img {
  display: block;
  width: 100%;
  height: auto;
}
.dialog-content iframe {
  border: 0;
  width: 100%;
  height: 65svh;
}
.loading {
  padding: 60px;
  text-align: center;
  color: var(--muted);
}
.error-banner {
  background: #f9ebe3;
  color: #873f2d;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 20px;
}
.footer {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  margin-top: 38px;
}
.nowrap {
  white-space: nowrap;
}
@media (min-width: 900px) {
  .question-card.has-figure .question-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
  }
  .question-card.has-figure .question-title {
    font-size: 24px;
  }
  .question-card.has-figure .question-image {
    max-height: 340px;
  }
}
@media (max-width: 650px) {
  body {
    font-size: 15px;
  }
  .topbar {
    padding: 13px 17px;
    gap: 8px;
  }
  .brand {
    font-size: 16px;
    gap: 8px;
  }
  .brand img {
    width: 30px;
    height: 30px;
  }
  .top-actions {
    gap: 3px;
  }
  .user-badge {
    font-size: 12px;
    padding: 5px 9px;
  }
  .user-dot {
    width: 23px;
    height: 23px;
  }
  .text-button {
    font-size: 12px;
  }
  .shell {
    padding: 21px 18px 50px;
  }
  .hero {
    margin: 10px 0 24px;
    gap: 10px;
  }
  .hero h1 {
    font-size: 26px;
  }
  .hero p {
    font-size: 13px;
    max-width: 230px;
  }
  .hero-note {
    padding: 18px 13px;
    min-width: 92px;
  }
  .hero-note strong {
    font-size: 31px;
  }
  .hero-note span {
    font-size: 11px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 9px;
    margin: 18px 0 20px;
  }
  .stat {
    padding: 14px 17px;
    border-radius: 12px;
  }
  .stat strong {
    font-size: 27px;
  }
  .tabs {
    gap: 25px;
    margin-bottom: 20px;
  }
  .tabs button {
    padding-top: 11px;
    padding-bottom: 12px;
  }
  .section-heading {
    display: block;
    margin: 20px 0 14px;
  }
  .section-heading h2 {
    font-size: 20px;
  }
  .section-heading p {
    margin-top: 5px;
  }
  .subjects {
    grid-template-columns: 1fr;
    gap: 17px;
  }
  .subject-card {
    padding: 22px;
    border-radius: 17px;
  }
  .subject-head {
    margin-bottom: 17px;
  }
  .subject-head h2 {
    font-size: 23px;
  }
  .login-layout {
    display: block;
    min-height: 100svh;
  }
  .login-story {
    padding: 80px 28px 24px;
    min-height: 240px;
  }
  .login-story .brand {
    top: 24px;
  }
  .login-story h1 {
    font-size: 29px;
    margin: 13px 0;
  }
  .login-story p {
    font-size: 13px;
    margin-bottom: 12px;
  }
  .book-art {
    display: none;
  }
  .login-form-wrap {
    padding: 29px 28px;
  }
  .login-card h2 {
    font-size: 23px;
  }
  .login-card .field {
    margin-top: 20px;
  }
  .login-card input {
    font-size: 22px;
  }
  .user-screen {
    margin: 25px auto;
  }
  .users {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .person {
    padding: 20px;
  }
  .learn-shell {
    padding: 15px 13px 40px;
  }
  .learn-top {
    margin-bottom: 12px;
  }
  .learn-progress {
    margin-bottom: 18px;
  }
  .question-card {
    padding: 22px 18px;
    border-radius: 15px;
  }
  .question-meta {
    margin-bottom: 17px;
    font-size: 11px;
  }
  .question-title {
    font-size: 22px;
    line-height: 1.65;
  }
  .context {
    padding: 13px 14px;
    font-size: 14px;
  }
  .question-image {
    max-height: 350px;
  }
  .answer-text {
    font-size: 23px;
  }
  .explanation {
    font-size: 15px;
  }
  .button {
    padding: 13px 15px;
  }
  .grading .actions {
    gap: 9px;
  }
  .grading .button {
    font-size: 15px;
    padding: 14px 9px;
  }
  .summary-card {
    padding: 30px 23px;
    margin: 20px 0;
  }
  .summary-card h1 {
    font-size: 28px;
  }
  .record-table {
    font-size: 12px;
  }
  .record-table th,
  .record-table td {
    padding: 10px 8px;
  }
  .settings-panel {
    padding: 21px;
  }
  .dialog-content {
    padding: 8px;
  }
  .dialog-head {
    padding: 10px 12px;
  }
  .info-panel {
    font-size: 13px;
    padding: 16px 18px;
  }
  .inline-form {
    flex-wrap: wrap;
  }
  .inline-form label {
    min-width: 150px;
  }
  .end-note {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button,
  a {
    transition:
      background 0.15s,
      border-color 0.15s;
  }
  .question-card,
  .summary-card {
    animation: enter 0.2s ease-out;
  }
  @keyframes enter {
    from {
      opacity: 0.4;
      transform: translateY(5px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
@media (max-width: 650px) {
  .hero-note {
    min-width: 114px;
    flex-shrink: 0;
  }
  .hero-note span {
    white-space: nowrap;
  }
}
@media (min-width: 900px) and (max-height: 850px) {
  .topbar {
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .learn-shell {
    padding-top: 13px;
  }
  .learn-top {
    margin-bottom: 8px;
  }
  .learn-progress {
    margin: 8px 0 15px;
  }
  .question-card {
    padding: 24px;
  }
  .question-meta {
    margin-bottom: 14px;
  }
  .question-card.has-figure .question-image {
    max-height: 250px;
  }
  .figure-button {
    margin-top: 4px;
  }
  .figure-hint {
    margin-bottom: 8px;
  }
  .note-box {
    margin-top: 8px;
  }
  .recall-hint {
    margin: 12px 0 10px;
  }
}

.mistake-review { margin-top: 12px; }
.mistake-review .helper { margin: 8px 0 0; font-size: 12px; }

/* The preview control stays in the corner; the active banner stays in view. */
.admin-toggle {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 40;
  border: 1px solid #b9c9bc;
  border-radius: 12px;
  padding: 10px 15px;
  min-height: 44px;
  background: #fff;
  color: var(--dark);
  box-shadow: 0 3px 15px #183e3225;
  font-size: 13px;
  font-weight: 700;
}
.admin-toggle.is-active {
  color: white;
  background: #873817;
  border-color: #873817;
}
.admin-banner {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 20px;
  padding: 12px 18px;
  background: #873817;
  color: #fff;
  border-bottom: 4px solid #e6ad54;
  text-align: center;
}
.admin-banner strong { font-size: 19px; }
.admin-banner span { font-size: 12px; }
.admin-mode { background: #fff8ec; }
.admin-mode .topbar { background: #fff8ec; }
.admin-mode .question-card { border: 2px solid #d69d4e; }
.admin-mode #answer { scroll-margin-top: 108px; }
.admin-home { padding-top: 35px; }
.admin-home .subjects { margin-top: 30px; }
.preview-navigation {
  background: #fff1d6;
  padding: 15px 18px;
  border: 1px solid #e9c893;
  border-radius: 16px;
  margin: 0 0 18px;
}
.preview-navigation .field { margin-bottom: 12px; }
.preview-navigation select { width: 100%; min-width: 0; }
.preview-navigation button[data-unavailable="true"] { opacity: .35; cursor: default; }
.shell, .learn-shell { padding-bottom: 100px; }
@media (max-width: 650px) {
  .admin-banner { padding: 9px 12px; gap: 0; flex-direction: column; }
  .admin-banner strong { font-size: 16px; }
  .admin-banner span { font-size: 11px; }
  .preview-navigation { padding: 12px; }
}
