:root {
  color-scheme: light;
  font-family: "Hiragino Sans", "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, sans-serif;
  --ink: #252a46;
  --muted: #565b72;
  --paper: #fffdf5;
  --white: #fffefa;
  --stroke: #deddd5;
  --blue: #3448c7;
  --pale-blue: #e9ecff;
  --lime: #e7f489;
  --apricot: #ffbfaa;
  --warm: #fff2e7;
  --green: #225c44;
  --red: #8d3e30;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 300px; background: var(--paper); color: var(--ink); font-size: 1rem; line-height: 1.6; }
button, input, select { font: inherit; }
button { color: inherit; cursor: pointer; }
a { color: inherit; text-underline-offset: 4px; }
button:disabled { cursor: default; opacity: .48; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #4260e3; outline-offset: 3px; }
p, h1, h2, h3, h4, ol, blockquote { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { width: min(1220px, calc(100% - 100px)); margin-inline: auto; }
.masthead { height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-weight: 800; font-size: 1.05rem; letter-spacing: .04em; }
.brand-mark { display: block; flex: none; width: 44px; height: 44px; object-fit: contain; }
.brand-wordmark { display: grid; gap: 2px; line-height: 1.2; letter-spacing: 0; }
.brand-wordmark > [lang="en"] { font-size: .98rem; font-weight: 700; }
.brand-wordmark > [lang="ja"] { color: var(--muted); font-size: .74rem; font-weight: 550; }
.nav { display: flex; align-items: center; gap: 25px; font-size: .92rem; }
.nav a:not(.nav-outline), .plain { text-decoration: none; padding: 0; background: none; border: 0; font-weight: 600; }
.nav a:hover, .plain:hover { text-decoration: underline; }
.nav-outline, .pill { border: 1px solid #bbbccc; border-radius: 999px; background: var(--white); padding: 7px 14px; font-size: .875rem; white-space: nowrap; font-weight: 650; text-decoration: none; }
.nav-outline:hover, .pill:hover:not(:disabled) { background: var(--pale-blue); border-color: #aeaff2; }
.hero { position: relative; display: grid; grid-template-columns: minmax(0,1fr); gap: 18px 32px; min-height: 300px; padding: 34px 44px 33px; background: #feece1; border: 1px solid #d9a99a; border-radius: 29px 24px 27px 24px; overflow: hidden; }
.hero:has(.hero-recents:not([hidden])) { grid-template-columns: minmax(0,1.35fr) minmax(0,1fr); }
.hero:not(:has(.hero-recents:not([hidden]))) .search-box { max-width: 680px; }
.hero-content { position: relative; z-index: 2; min-width: 0; align-self: center; }
.scope { display: inline-flex; align-items: center; gap: 9px; color: #283ca3; font-size: .8rem; font-weight: 800; letter-spacing: .05em; }
.scope span { border-left: 1px solid #cbb4c5; padding-left: 9px; }
.nameplate { position: relative; width: fit-content; }
h1 { position: relative; isolation: isolate; font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif CJK JP", "Noto Serif JP", serif; font-weight: 850; font-size: clamp(3rem,6vw,5.7rem); line-height: 1.13; letter-spacing: .04em; margin: 13px 0 11px; }
h1 span { position: relative; }
h1 span::before { content: ""; z-index: -1; position: absolute; inset: 15% -4% 4%; border-radius: 46% 53% 49% 46%; border: 1px solid #a7b657; background: var(--lime); transform: rotate(-12deg); }
.hero #title { font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.75rem,3.5vw,2.55rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.16; margin: 10px 0 3px; overflow-wrap: anywhere; }
.hero-brand-jp { color: var(--muted); font-size: 1rem; font-weight: 620; line-height: 1.45; }
.subtitle { margin: 11px 0 19px; font-weight: 740; font-size: clamp(1.04rem,2.1vw,1.43rem); letter-spacing: .02em; }
.search-box { display: flex; align-items: center; gap: 11px; border: 1px solid #8484a6; border-radius: 13px; background: var(--white); padding: 6px; box-shadow: 3px 4px 0 #393857; scroll-margin-top: 15px; }
.search-box:focus-within { border-color: var(--blue); }
.search-icon { display: block; flex: none; width: 15px; height: 15px; margin-left: 8px; border: 2px solid #555d96; border-radius: 50%; position: relative; }
.search-icon::after { content: ""; position: absolute; width: 7px; height: 2px; border-radius: 1px; background: #555d96; transform: rotate(45deg); top: 11px; left: 9px; }
.search-box input { width: 100%; min-width: 0; border: 0; background: transparent; padding: 8px 1px; color: var(--ink); outline: none; }
.search-box input::placeholder { color: #6d7082; }
.search-box input:focus-visible { outline: none; }
.primary { background: var(--blue); color: white; border: 0; border-radius: 8px; padding: 9px 19px; font-weight: 700; flex: none; }
.primary:hover { background: #26369d; }
.grid-paper { opacity: .75; position: absolute; inset: 7% -4% 5% 0; background-image: linear-gradient(to right,#b6b3d8 1px, transparent 1px),linear-gradient(to bottom,#b6b3d8 1px,transparent 1px); background-size: 20px 20px; mask-image: radial-gradient(ellipse at center,#000,transparent 74%); }
.hero-recents { align-self: center; min-width: 0; padding: 12px 14px 15px; border: 1px solid #c9b2c0; border-radius: 14px; background: #fff7ef; }
.recent-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.recent-heading h2 { font-size: 1rem; font-weight: 780; }
.recent-clear { font-size: .88rem; color: #4d517d; min-height: 34px; }
.recent-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); list-style: none; gap: 8px 9px; margin: 0; padding: 0; }
.recent-list li { min-width: 0; }
.recent-chip { display: block; width: 100%; min-height: 44px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: start; padding: 5px 10px; border: 1px solid #8887ad; border-radius: 8px; background: var(--pale-blue); color: #202e74; font-size: .94rem; font-weight: 700; box-shadow: 1px 2px 0 #69658a; }
.recent-list li:nth-child(3n+2) .recent-chip { background: var(--lime); color: var(--ink); }
.recent-list li:nth-child(3n) .recent-chip { background: #ffd9ca; color: var(--ink); }
.recent-chip:hover { filter: brightness(.96); }
@media (max-width: 720px) {
  .hero:has(.hero-recents:not([hidden])) { grid-template-columns: minmax(0,1fr); }
}
.index-section { margin-top: 34px; }
.index-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.index-top h2 { font-size: 1.47rem; line-height: 1.25; }
.browse-all { color: #3446a7; font-size: .92rem; }
.index-cards { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 17px; }
.index-card { display: flex; align-items: center; gap: clamp(12px,2vw,22px); width: 100%; min-height: 120px; padding: 17px 23px; text-align: start; border: 1px solid #555985; border-radius: 16px 14px 15px 13px; box-shadow: 3px 4px 0 #393857; transition: transform .18s ease, box-shadow .18s ease; }
.index-card:hover { transform: translateY(-3px); box-shadow: 4px 7px 0 #393857; }
.index-card:active { transform: translateY(2px); box-shadow: 2px 2px 0 #393857; }
.grammar-index { background: #e5e7ff; }
.exam-index { background: #e8f295; }
.index-icon { height: 55px; width: 55px; flex: none; display: grid; place-items: center; background: #fffdf4; border: 1px solid #62658d; border-radius: 11px 8px 12px 10px; transform: rotate(-8deg); font-weight: 850; font-size: 1.65rem; }
.exam-index .index-icon { transform: rotate(7deg); }
.index-text { display: grid; gap: 3px; min-width: 0; }
.index-text strong { font-size: 1.45rem; line-height: 1.25; }
.index-text > span { color: #484e69; font-size: .95rem; }
body.browsing .hero { min-height: 215px; padding-block: 20px; }
body.browsing .hero #title { font-size: clamp(1.65rem,3vw,2.25rem); margin-block: 4px 3px; }
body.browsing .subtitle { margin-block: 5px 12px; }
.mobile-study-nav { display: none; }
.member-expiry { color: var(--muted); font-size: .85rem; }

.workspace { display: grid; grid-template-columns: minmax(0,1.48fr) minmax(0,1fr); align-items: start; gap: 26px; margin-top: 32px; scroll-margin-top: 16px; }
.workspace:has(#network[hidden]) { grid-template-columns: minmax(0,1fr); }
.section-heading, .detail-heading, .node-top { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.review-meta { display: grid; justify-items: end; gap: 4px; flex: none; max-width: 44%; }
.review-count { color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.section-heading h2, .detail-heading h2, .network-heading h2, .dialog-top h2 { font-size: 1.53rem; line-height: 1.25; font-weight: 820; }
.section-heading p, .detail-heading p { color: var(--muted); font-size: .9rem; margin-top: 4px; }
.select-wrap { position: relative; flex-shrink: 0; }
.select-wrap::after { content: ""; position: absolute; top: 40%; right: 15px; width: 6px; height: 6px; border-bottom: 1.5px solid var(--ink); border-right: 1.5px solid var(--ink); transform: rotate(45deg); pointer-events: none; }
.select-wrap select { appearance: none; background: var(--white); border: 1px solid #bbbccc; border-radius: 9px; color: var(--ink); padding: 7px 34px 7px 11px; font-size: .9rem; }
.filters, .chips, .matches, .matched-grammars, .link-matches { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.filters { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); width: min(100%,400px); margin: 13px 0; gap: 7px; }
.filter { display: inline-flex; align-items: center; justify-content: center; min-height: 39px; min-width: 0; background: transparent; border: 1px solid #c9c8d5; padding: 4px 6px; border-radius: 999px; font-size: .9rem; line-height: 1.25; font-weight: 650; white-space: nowrap; }
.filter[aria-pressed="true"] { background: var(--blue); color: white; border-color: var(--blue); }
.filter:hover:not([aria-pressed="true"]) { background: var(--pale-blue); }
.matched-grammars { margin: -2px 0 12px; }
.result-list { display: grid; gap: 10px; }
.result-card { background: var(--white); border: 1px solid var(--stroke); border-radius: 15px; transition: background .15s,border-color .15s; }
.result-card:hover { border-color: #a5a8d2; background: #faf9ff; }
.question-link { color: inherit; width: 100%; display: block; text-align: left; background: transparent; border: 0; padding: 14px 16px; border-radius: inherit; }
.question-kicker { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between; gap: 4px 9px; font-weight: 850; color: #3446a7; font-size: .87rem; letter-spacing: .04em; }
.muted { color: #725542; font-weight: 550; font-size: .78rem; letter-spacing: 0; }
.question-preview { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin-top: 5px; font-size: .98rem; line-height: 1.65; }
.matches { padding: 0 16px 12px; }
.match { display: inline-flex; align-items: center; white-space: nowrap; padding: 2px 7px; border-radius: 5px; background: #ededf7; color: #3a4170; font-size: .74rem; font-weight: 750; line-height: 1.45; }
.match.correct, .edge-label.correct { color: var(--green); background: #e1f0d8; }
.match.distractor, .edge-label.distractor { color: var(--red); background: #ffe9de; }
.match.stem, .match.topic { color: #344898; background: #edf0ff; }
.pager { margin-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .9rem; }
.empty { border: 1px dashed #a4a4bd; border-radius: 14px; padding: 24px; }
.empty p { margin: 4px 0 10px; color: var(--muted); }
#network { min-width: 0; position: sticky; top: 14px; max-height: calc(100dvh - 28px); overflow-y: auto; border-radius: 18px; scrollbar-width: thin; }
.network-panel { border: 1px solid #c5c9e9; border-radius: 18px; padding: 16px; background: #f0f1fe; }
.network-heading { display: flex; align-items: center; gap: 9px; font-weight: 800; }
.network-heading h2 { font-size: 1.15rem; }
.network-mark { display: grid; place-content: center; width: 30px; height: 30px; border-radius: 8px 9px 10px 8px; transform: rotate(-8deg); background: var(--lime); font-size: 1.11rem; }
.connections { display: grid; row-gap: 7px; position: relative; margin-top: 12px; }
.connections::before { content: ""; position: absolute; inset: 3px auto 3px 15px; width: 1px; background: #c8cae8; }
.relation-row { display: grid; grid-template-columns: 42px minmax(0,1fr); align-items: start; gap: 8px; }
.edge-label { width: fit-content; min-width: 30px; padding: 3px 6px; position: relative; background: #dce0f7; border-radius: 6px; text-align: center; font-size: .8rem; line-height: 1.4; font-weight: 750; }
.edge-label button { background: transparent; border: 0; padding: 0; }
.g-tag { max-width: 100%; overflow-wrap: anywhere; padding: 3px 8px; border: 1px solid #c8c9e0; border-radius: 7px; background: #fffefe; color: #303d94; text-align: start; font-size: .86rem; font-weight: 650; transition: background .15s, border-color .15s; }
.g-tag.curated { border-color: #c2ca82; background: #f4f6d7; color: #35444d; }
.g-tag:hover { background: #e9eefd; border-color: #9699ca; }
.g-tag.active { color: white; background: var(--blue); border-color: var(--blue); }
.node { margin-top: 12px; border-radius: 14px; border: 1px solid #ccccdf; background: var(--white); padding: 15px; min-width: 0; scroll-margin-top: 10px; }
.node:focus-visible { outline: 2px solid var(--blue); }
.node h3 { font-weight: 830; font-size: 1.17rem; overflow-wrap: anywhere; }
.node-label, .subnet h4, .cross-refs h4 { font-size: .82rem; color: #505776; font-weight: 740; }
.node-label { margin-bottom: 2px; }
.node .pill { padding-inline: 8px; font-size: .76rem; }
.node > p { font-size: .92rem; margin-top: 7px; }
.syntax { color: #2e408d; font-weight: 650; }
.node blockquote { margin-top: 10px; padding: 7px 10px; border-left: 3px solid #acc568; background: #f8f8e8; font-size: .9rem; }
.subnet, .cross-refs { margin-top: 14px; border-top: 1px solid #e2e2ed; padding-top: 9px; }
.subnet h4, .cross-refs h4 { margin-bottom: 6px; }
.comparison-list { list-style: none; padding: 0; display: grid; gap: 6px; }
.comparison-list li { padding: 7px 8px; background: #f8f8ee; border-radius: 8px; font-size: .86rem; overflow-wrap: anywhere; }
.comparison-list p { margin-top: 4px; }
.spelling-notes { margin-top: 8px; font-size: .83rem; line-height: 1.6; overflow-wrap: anywhere; }
.spelling-notes strong { color: #505776; margin-inline-end: 4px; }
.spelling-notes [lang="ja"] { color: #2f408e; }
.exam-cue { margin-top: 12px; padding: 8px 10px; border-radius: 8px; background: #eef1ff; font-size: .88rem; }
.exam-cue > div { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 8px; flex-wrap: wrap; }
.exam-cue strong, .cue-jump { color: #2e408d; }
.exam-cue p { margin-top: 3px; }
.more-uses { margin-top: 8px; }
.grammar-references { margin-top: 12px; border-top: 1px solid #e2e2ed; overflow-wrap: anywhere; }
.grammar-references > summary { color: var(--muted); font-size: .82rem; }
.grammar-references > ul { margin: 6px 0 0; padding-inline-start: 1.2rem; color: #31469c; font-size: .84rem; }
.grammar-references li + li { margin-top: 4px; }
.cross-refs h4 span { margin-left: 6px; color: #67708a; font-weight: 500; }
details > summary { font-size: .87rem; font-weight: 650; color: #3b4d9e; cursor: pointer; margin-top: 8px; }
details[open] > summary { margin-bottom: 8px; }
.linked-question { display: flex; justify-content: space-between; align-items: baseline; gap: 5px; flex-wrap: wrap; width: 100%; text-align: left; border: 0; border-radius: 7px; padding: 7px 6px; background: transparent; color: #293d9b; font-size: .86rem; font-weight: 700; }
.linked-question:hover, .linked-question.current { background: #e9edff; }
.cross-refs > p { font-size: .88rem; color: var(--muted); }
.detail-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; color: var(--muted); font-size: .86rem; }
.question-sheet { background: var(--white); border: 1px solid #cecfdc; border-radius: 17px; padding: 19px 20px; }
.detail-heading h2 { color: #3346ad; }
.confidence { font-size: .75rem; text-align: center; background: var(--warm); color: #794831; padding: 3px 7px; border-radius: 6px; font-weight: 700; }
.question-stem { margin-top: 13px; white-space: pre-line; font-size: 1.085rem; line-height: 1.9; }
.option-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 15px; padding: 0; list-style: none; }
.option-grid li { min-width: 0; }
.option-grid button { display: flex; width: 100%; height: 100%; align-items: baseline; gap: 7px; border: 1px solid #dedfe8; border-radius: 9px; padding: 8px 9px; background: #f9f9fe; text-align: start; overflow-wrap: anywhere; font-size: .95rem; }
.option-grid button:hover { background: var(--pale-blue); }
.option-num { font-weight: 800; color: #4354a7; }
.analysis { margin-top: 22px; }
.analysis h3, .duplicate h3 { font-size: 1.12rem; margin-bottom: 8px; }
.lesson, .attention, .reason-summary { margin-block: 7px 11px; border-radius: 12px; padding: 12px 14px; background: #f0f4d4; border: 1px solid #d5db9f; }
.lesson > p, .attention > p { margin-top: 4px; }
.lesson .chips { margin-top: 8px; }
.attention { margin-top: 13px; background: var(--warm); border-color: #e9cfb4; }
.option-analysis { background: var(--white); border: 1px solid var(--stroke); border-radius: 13px; padding: 13px 15px; margin-bottom: 9px; }
.option-analysis.correct { border-color: #9cb694; }
.option-analysis:focus { outline: 2px solid #5670e4; }
.option-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; column-gap: 8px; row-gap: 4px; }
.option-heading h4 { font-size: .98rem; }
.explanation { margin-top: 8px; font-size: .96rem; }
.formula { background: var(--pale-blue); color: #253671; border-radius: 7px; padding: 6px 9px; margin-top: 8px; font-weight: 680; font-size: .9rem; overflow-wrap: anywhere; }
.option-analysis .chips { margin-top: 9px; }
.parse-details { border-top: 1px solid #e4e3eb; margin-top: 9px; }
.inline-notes { display: grid; gap: 9px; }
.inline-grammar { padding: 9px 10px; background: #f8f7fc; border-radius: 8px; font-size: .91rem; }
.inline-grammar p { margin-top: 5px; }
.duplicate { margin-top: 20px; }
.source { margin-top: 18px; color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
.source p + p { margin-top: 5px; }
.footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 9px; margin-top: 35px; padding-block: 18px 26px; border-top: 1px solid var(--stroke); color: var(--muted); font-size: .88rem; }
#index-dialog { width: min(650px,calc(100% - 27px)); max-height: min(84dvh,720px); border-radius: 18px; border: 1px solid #acadd0; padding: 18px; background: var(--paper); color: var(--ink); box-shadow: 8px 10px 0 #2c315e; }
dialog::backdrop { background: rgba(36,38,72,.38); }
.dialog-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.index-summary { margin-bottom: 10px; color: var(--muted); font-size: .9rem; }
.coverage-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
.coverage-row { display: flex; justify-content: space-between; align-items: baseline; text-align: start; flex-wrap: wrap; gap: 2px 8px; border: 1px solid var(--stroke); border-radius: 8px; padding: 6px 9px; background: var(--white); min-width: 0; overflow-wrap: anywhere; }
button.coverage-row:hover { background: var(--pale-blue); }
.coverage-row span { font-size: .79rem; color: var(--muted); }
.coverage-row.cancelled { background: #efeae4; color: #665d5a; }
.directory-search { width: 100%; padding: 7px 9px; color: var(--ink); background: white; border: 1px solid #b8bbd4; border-radius: 7px; margin: 3px 0 8px; }
@media (max-width: 1020px) {
  .wrap { width: min(1220px, calc(100% - 52px)); }
  .hero { padding-inline: 28px; }
  .workspace { gap: 17px; }
  .network-panel { padding: 12px; }
}
@media (max-width: 840px) {
  .workspace { grid-template-columns: minmax(0,1fr); }
  .mobile-study-nav { display: flex; position: sticky; top: 0; z-index: 4; gap: 8px; padding: 6px 0; background: var(--paper); }
  .mobile-study-nav button { min-height: 44px; }
  #result, #network, #current-node, .option-analysis { scroll-margin-top: 64px; }
  #network { position: static; max-height: none; overflow: visible; }
  .hero { min-height: 345px; }
}
@media (max-width: 590px) {
  .wrap { width: calc(100% - 28px); }
  .masthead { height: 63px; gap: 5px; }
  .brand { font-size: .88rem; gap: 7px; letter-spacing: 0; }
  .brand-mark { width: 36px; height: 36px; }
  .nav { gap: 10px; font-size: .82rem; }
  .member-expiry { display: none; }
  .nav-outline { font-size: .8rem; padding: 5px 8px; }
  .hero { padding: 21px 16px 13px; border-radius: 19px; grid-template-columns: minmax(0,1fr); gap: 9px; min-height: auto; }
  h1 { margin-top: 7px; line-height: 1.15; }
  .subtitle { margin-bottom: 13px; }
  .search-box { gap: 7px; }
  .hero-recents { padding: 7px 9px 10px; }
  .recent-heading { margin-bottom: 3px; }
  .recent-clear { min-height: 44px; }
  .recent-list { gap: 7px; }
  .recent-chip { font-size: .89rem; padding-inline: 8px; }
  .search-icon { margin-left: 4px; }
  .primary { padding-inline: 11px; }
  body.browsing .hero { min-height: 0; padding-block: 14px; }
  .index-section { margin-top: 21px; }
  .index-cards { grid-template-columns: 1fr; gap: 12px; }
  .index-card { min-height: 84px; padding: 10px 14px; }
  .index-icon { width: 42px; height: 42px; font-size: 1.35rem; }
  .index-text strong { font-size: 1.22rem; }
  .index-text > span { font-size: .89rem; }
  .filter { min-height: 44px; padding-inline: 2px; font-size: .875rem; }
  button.coverage-row { min-height: 44px; }
  #index-dialog { max-height: 88dvh; padding: 13px; }
  .coverage-list { grid-template-columns: minmax(0,1fr); }
  .grid-paper { inset: 0; }
  .workspace { margin-top: 22px; }
  .question-sheet { padding-inline: 12px; }
  .detail-heading h2 { font-size: clamp(1.23rem, 5vw, 1.53rem); }
  .question-stem { font-size: 1rem; }
  .option-grid { grid-template-columns: minmax(0,1fr); }
  .footer { margin-top: 22px; }
}
@media (max-width: 345px) {
  .subtitle { font-size: .95rem; letter-spacing: 0; text-wrap: balance; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}


.login-wrap { width: min(470px,calc(100% - 32px)); margin: clamp(14px,5vh,55px) auto 50px; }
.login-card { position: relative; overflow: hidden; border: 1px solid #d9a99a; border-radius: 24px; background: #feece1; padding: clamp(20px,5vw,37px); box-shadow: 5px 6px 0 #393857; }
.login-card h1, .admin-head h1 { font-family: inherit; font-weight: 820; letter-spacing: 0; font-size: clamp(2rem,6vw,2.75rem); margin-block: 10px 8px; }
.login-card h1 { font-size: clamp(1.45rem,5.5vw,2.3rem); text-wrap: balance; }
.login-intro { color: var(--muted); margin-bottom: 19px; }
@font-face { font-family: "Tousou Song SC"; src: url("/assets/login-sc.woff") format("woff"); font-display: swap; }
@font-face { font-family: "Tousou Mincho JP"; src: url("/assets/login-jp.woff") format("woff"); font-display: swap; }
.member-login-page { font-family: "Songti SC", SimSun, "Tousou Song SC", "Noto Serif CJK SC", serif; }
.member-login-page [lang="ja"] { font-family: "Hiragino Mincho ProN", "Yu Mincho", "Tousou Mincho JP", "Noto Serif CJK JP", serif; }
.member-login-page .login-wrap { width: min(550px,calc(100% - 32px)); }
.member-login-page .scope, .member-login-page .brand { font-weight: 650; }
.member-login-page .login-card h1 { font-size: clamp(2rem,6vw,2.55rem); font-weight: 650; line-height: 1.24; margin-top: 18px; }
.member-login-page .login-bilingual > [lang="ja"] { display: block; margin-top: 2px; font-size: .85rem; line-height: 1.45; font-weight: 400; letter-spacing: 0; }
.member-login-page .login-card h1 > [lang="ja"] { color: var(--muted); font-size: 1.05rem; margin-top: 6px; }
.member-login-page .login-card h1 > [lang="ja"]::before { content: none; }
.member-login-page .login-intro { font-size: .94rem; margin-top: 12px; margin-bottom: 22px; }
.member-login-page .login-intro > [lang="ja"] { margin-top: 5px; }
.member-login-page .nav-outline { line-height: 1.25; }
.member-login-page .nav-outline > [lang="ja"] { font-size: .73rem; }
.login-art { position: absolute; right: 0; top: 0; width: 110px; height: 87px; pointer-events: none; color: var(--blue); }
.login-art > span { position: absolute; bottom: 18px; left: 36px; width: 40px; height: 40px; display: grid; place-items: center; transform: rotate(11deg); border: 1px solid var(--ink); border-radius: 8px; box-shadow: 2px 3px 0 var(--ink); background: var(--lime); }
.login-art > span::after { content: ""; width: 38%; aspect-ratio: 1; border: 1px solid currentColor; border-radius: 50%; }
.login-art > i { position: absolute; top: 8px; left: 20px; color: #a94e3c; font-style: normal; }
@media (max-width: 460px) {
  .login-art { width: 86px; height: 54px; }
  .login-art > span { bottom: 8px; left: 37px; width: 29px; height: 29px; }
}
.member-form { display: grid; gap: 8px; }
.member-form label { font-weight: 650; }
.member-form input, .admin-tools input { min-width: 0; min-height: 44px; border: 1px solid #a2a1bd; border-radius: 9px; background: var(--white); padding: 8px 11px; font: inherit; color: var(--ink); }
.member-form input + label { margin-top: 7px; }
.member-form .primary { min-height: 44px; }
.member-login-page .member-form .primary { margin-top: 6px; padding: 8px 12px; line-height: 1.22; font-weight: 650; }
.transfer-code { letter-spacing: .08em; font-family: ui-monospace, monospace; }
.form-feedback { color: #803d31; overflow-wrap: anywhere; }
.form-feedback:empty { display: none; }
.admin-head { padding-block: 3px 20px; }
.admin-head p, .admin-counts { color: var(--muted); }
.admin-card { border: 1px solid #bfc3e6; border-radius: 16px; padding: 17px; background: #f1f1fe; min-width: 0; }
.admin-card h2 { margin-bottom: 9px; font-size: 1.25rem; }
.admin-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 11px; }
.admin-tools input { min-width: min(100%,150px); flex: 1; }
.member-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.1fr) max-content; align-items: start; gap: 8px 12px; padding: 10px 0; border-top: 1px solid #dddff0; overflow-wrap: anywhere; }
.member-row:first-child { margin-top: 10px; }
.member-state { padding: 1px 6px; border-radius: 5px; font-size: .84rem; background: #fff4d9; color: #6d532b; white-space: nowrap; }
.member-state.active { background: #e1f0d8; color: #225c44; }
.member-state.expired { background: #ecebf0; color: #575667; }
.member-state.refunded { background: #ffe5dc; color: #842f25; }
.member-date { font-size: .85rem; color: var(--muted); }
@media (max-width: 550px) {
  .member-row { grid-template-columns: minmax(0,1fr) auto; }
  .member-row > div:nth-child(2) { grid-row: 2; grid-column: 1 / -1; }
}

.analysis-heading { display:flex; align-items:baseline; justify-content:space-between; gap:6px 12px; flex-wrap:wrap; }
.review-status { font-size:.85rem; font-weight:650; color:#675543; }
.review-status.verified { color:#225c44; }
.usage-list { list-style:none; padding:0; margin:8px 0; }
.usage-list > li { margin:8px 0; border-top:1px solid #dedeea; padding-top:8px; }
.usage-list strong { font-size:.92rem; }
.usage-list p { margin-top:3px; font-size:.91rem; line-height:1.65; }
.usage-list blockquote, .inline-grammar blockquote { margin-top:6px; padding:5px 8px; border-inline-start:3px solid #acc568; background:#f8f8e8; font-size:.91rem; line-height:1.65; }

