:root {
  color-scheme: light;
  --navy: #1b2d43;
  --ink: #243449;
  --muted: #626b72;
  --paper: #f8f8f4;
  --line: #d6d9d5;
  --gold: #f5c34d;
  font: 16px/1.6 "Work Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans CJK JP", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column }
a { color: inherit; text-decoration: none }
button, input { font: inherit }
button, a { -webkit-tap-highlight-color: transparent }
:focus-visible { outline: 3px solid #2b6aa2; outline-offset: 4px }
svg { display: inline-block; vertical-align: middle; width: 21px; height: 21px; flex-shrink: 0 }
.wrap { width: min(1120px, 88%); margin-inline: auto }
.top { background: var(--navy); color: white; border-bottom: 3px solid var(--gold) }
.bar { height: 69px; display: flex; align-items: center; justify-content: space-between }
.brand { display: inline-flex; align-items: center; gap: 12px; letter-spacing: .045em; font-weight: 800; font-size: 22px }
.brandmark { display: grid; place-items: center; width: 38px; height: 38px; color: var(--navy); background: var(--gold); border-radius: 9px }
.brandmark svg { width: 27px; height: 27px }
nav { align-self: stretch; display: flex; gap: 28px }
nav a { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; position: relative; color: #d9dfe4 }
nav a[aria-current] { color: var(--gold) }
nav svg { width: 17px; height: 17px }
nav a[aria-current]::after { content: ""; position: absolute; bottom: 10px; left: 0; right: 0; height: 2px; border-radius: 2px; background: var(--gold) }
main { flex: 1; padding: 34px 0 44px }
main:focus { outline: none }
.hero { display: flex; position: relative; isolation: isolate; overflow: hidden; align-items: center; min-height: 266px; border: 1px solid #d4cdb5; border-radius: 14px; padding: 33px 42px; background-color: #fbf5df; background-image: radial-gradient(#dbcfa550 .8px, transparent .8px); background-size: 6px 6px }
.hero-copy { z-index: 1 }
.exam { display: inline-flex; align-items: center; gap: 7px; color: #50452a; font-size: 12px; font-weight: 700; letter-spacing: .06em; background: #f9e8aa; border: 1px solid #e6d28e; padding: 3px 10px; border-radius: 5px }
.exam i { width: 6px; height: 6px; border-radius: 50%; background: #b78b18 }
h1,h2,h3,p { margin: 0 }
h1,h2,h3 { line-height: 1.45 }
.hero h1 { font-size: clamp(28px,3.15vw,47px); letter-spacing: -.035em; margin: 12px 0 5px; font-weight: 800 }
.hero p { font-size: 14px; color: #53606b }
.primary { display: inline-flex; gap: 12px; align-items: center; justify-content: center; background: var(--gold); color: var(--navy); font-size: 15px; font-weight: 750; border-radius: 7px; border: 1px solid #d6a632; padding: 11px 19px; cursor: pointer; transition: background-color .15s, transform .15s }
.primary:hover { background: #f9cb5f; transform: translateY(-1px) }
.hero .primary { margin-top: 23px }
.primary svg { width: 18px; height: 18px }
.primary svg:last-child { margin-left: 6px }
.primary:disabled { background: #e4e5df; color: #707579; border-color: #dbddd7; cursor: default; transform: none }
.cover { width: 42%; height: 100%; object-fit: contain; position: absolute; right: 1.8%; top: 0; z-index: -1 }
.section { margin-top: 32px }
.section-head, .quiz-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px }
.section-head h2 { display: flex; align-items: center; gap: 10px; font-size: 23px; font-weight: 750; letter-spacing: .015em }
.heading-icon { display: grid; place-items: center }
.heading-icon svg { width: 23px; height: 23px }
.meta,.text-link { font-size: 12px; font-weight: 600; color: #667079 }
.slash { margin: 0 9px; color: #a6a7a0 }
.text-link { display: flex; align-items: center; gap: 7px; color: var(--ink) }
.text-link:hover,.back:hover { text-decoration: underline }
.text-link svg { width: 15px; height: 15px }
.cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px }
.subject { display: block; border-radius: 12px; border: 1px solid var(--line); background: #fff; padding: 21px 23px 15px; box-shadow: 0 2px 3px #1b2d4306; transition: border-color .16s, transform .16s }
.subject:hover { border-color: #8c979f; transform: translateY(-2px) }
.card-top { display: flex; align-items: center; justify-content: space-between }
.subject-icon,.stat-icon,.result-icon { display: inline-grid; place-items: center }
.subject-icon { width: 44px; height: 44px; border-radius: 10px; color: #5d7990; background: #e5eef3 }
.subject-icon svg { width: 27px; height: 27px }
.subject-icon.law { background: #fcf1d2; color: #97701d }
.subject-icon.equipment { background: #f7e6de; color: #af6141 }
.count { border-radius: 20px; padding: 2px 10px; color: #5d676a; border: 1px solid #e5e6df; background: #f6f7f3; font-size: 11px; font-weight: 600 }
.subject h3 { margin: 14px 0 4px; font-size: 21px }
.subject p,.muted { color: var(--muted); font-size: 14px }
.card-foot { margin-top: 18px; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #ebede8; font-size: 12px; font-weight: 650 }
.card-foot svg { width: 17px; height: 17px }
.summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 19px 0 }
.stat { display: flex; align-items: center; gap: 17px; padding-left: clamp(15px,3.1vw,48px) }
.stat + .stat { border-left: 1px solid #e2e4df }
.stat-icon { width: 40px; height: 40px; background: #f5f3e9; color: #736a49; border-radius: 50% }
.stat-label { font-size: 12px; color: var(--muted); display: block; font-weight: 600 }
.stat strong { font: 700 30px/1.2 "Work Sans",Arial,sans-serif; display: block; margin-top: 2px; font-variant-numeric: tabular-nums }
.stat small { font: 600 12px/1 sans-serif; margin-left: 6px; color: #60696e }
footer { border-top: 1px solid var(--line); display: flex; gap: 9px; align-items: center; padding: 19px 0 24px; color: #717a7b; font-size: 11px }
footer svg { width: 15px; height: 15px }
.footer-rule { height: 11px; width: 1px; background: #c9ccc7 }
.inner { max-width: 800px; margin: auto }
.back { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 600 }
.back svg { width: 16px; height: 16px }
.inner h1 { font-size: 32px; margin: 18px 0 8px }
.inner .summary { margin: 25px 0 32px }
.inner .stat { padding-left: 20px }
.record-list, .quiz-panel,.result { border: 1px solid var(--line); background: white; border-radius: 12px }
.record-list a { display: flex; align-items: center; gap: 20px; padding: 20px 24px }
.record-list a:hover { background: #faf9f1 }
.record-list a + a { border-top: 1px solid var(--line) }
.record-detail { flex: 1 }
.record-detail span { display: block; color: var(--muted); font-size: 12px }
progress { display: block; width: 100%; appearance: none; height: 6px; margin: 8px 0 0; overflow: hidden; border: 0; border-radius: 6px; background: #e3e5df }
progress::-webkit-progress-bar { background: #e3e5df }
progress::-webkit-progress-value { background: #e6b242 }
progress::-moz-progress-bar { background: #e6b242 }
.quiz-head { margin: 20px 0 10px }
.quiz-head h1 { margin: 0 }
.quiz-head span { font-size: 13px; color: var(--muted) }
.quiz-panel { margin: 24px 0; padding: clamp(20px,4vw,38px) }
.quiz-panel h2 { margin: 16px 0 22px; font-size: clamp(20px,2.3vw,25px) }
.choices { display: grid; gap: 10px }
.choice { border: 1px solid var(--line); display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 8px; cursor: pointer; position: relative }
.choice input { position: absolute; width: 1px; height: 1px; opacity: 0 }
.choice:has(:focus-visible) { outline: 3px solid #2b6aa2 }
.choice.selected { background: #fcf4dc; border-color: #c8a447 }
.choice.right { background: #eaf3e8; border-color: #699463 }
.choice.wrong { background: #faeeea; border-color: #bc7665 }
.choice svg { margin-left: auto }
.letter { display: inline-grid; place-items: center; width: 29px; height: 29px; flex-shrink: 0; border: 1px solid var(--line); border-radius: 6px; font: 600 14px/1 Arial,sans-serif }
.feedback { margin-top: 20px; padding: 17px 20px; border-radius: 8px; background: #f6f5ec }
.feedback b span { font-size: 13px }
.feedback p { font-size: 14px; margin-top: 6px }
.actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 22px }
.actions [role=status] { font-size: 12px }
.result { text-align: center; padding: 45px 22px }
.result-icon { background: #fff0bd; border-radius: 50%; width: 60px; height: 60px }
.result-icon svg { width: 30px; height: 30px }
.score { font-size: 58px; display: block; margin: 16px 0 }
.score small { font-size: 18px }
.result-links { display: flex; flex-direction: column; gap: 16px; align-items: center }
@media(max-width: 900px) {
  .wrap { width: 92% }
  .hero { padding: 26px; min-height: 235px }
  .cards { gap: 12px }
  .subject { padding: 16px 15px 12px }
  .subject h3 { font-size: 18px }
  .subject p { font-size: 12px }
}
@media(max-width: 650px) {
  .bar { height: 60px }
  .brand { font-size: 17px; gap: 7px }
  .brandmark { width: 29px; height: 31px; border-radius: 7px }
  .brandmark svg { width: 22px; height: 22px }
  nav { gap: 15px }
  nav a { font-size: 12px; gap: 4px }
  nav svg { display: none }
  main { padding: 20px 0 30px }
  .hero { min-height: 0; padding: 24px 18px; display: block }
  .hero-copy { position: relative }
  .hero h1 { font-size: clamp(23px,5.9vw,33px); margin: 12px 0 8px }
  .hero p { max-width: 55%; font-size: 12px }
  .hero .primary { font-size: 12px; padding: 10px; gap: 6px; margin-top: 20px }
  .cover { width: 45%; height: auto; right: -2%; top: auto; bottom: 0 }
  .section { margin-top: 24px }
  .section-head { margin-bottom: 12px }
  .section-head h2 { font-size: 20px }
  .cards { grid-template-columns: 1fr }
  .subject { display: grid; grid-template-columns: 43px 1fr auto; align-items: center; column-gap: 13px; row-gap: 2px; padding: 17px 13px }
  .card-top { display: contents }
  .subject-icon { grid-area: 1 / 1 / 3 / 2; width: 41px; height: 41px }
  .subject h3 { grid-area: 1 / 2; margin: 0 }
  .subject p { grid-area: 2 / 2 }
  .count { grid-area: 1 / 3; font-size: 10px; padding: 1px 7px }
  .card-foot { grid-area: 2 / 3; justify-content: flex-end; font-size: 0; padding: 0; margin: 0; border: 0 }
  .stat,.inner .stat { gap: 3px; padding: 0; justify-content: center; text-align: center }
  .stat-icon { display: none }
  .summary { padding: 13px 0 }
  .stat strong { font-size: 25px }
  .record-list a { padding: 15px; gap: 12px }
  .inner h1 { font-size: 27px }
  .choice { padding: 10px; gap: 9px; font-size: 14px }
}
@media(prefers-reduced-motion: reduce) { * { transition: none !important } }
