:root {
  color-scheme: dark;
  --ink: #f3f4e9;
  --muted: #b9c8bd;
  --accent: #dbfb93;
  --ground: #111b17;
  --panel: #1a2a23;
  --line: #3e5447;
  --paper: #edf0de;
  --paper-ink: #1c2f24;
  --paper-muted: #43584a;
  font: 16px/1.6 system-ui, "Hiragino Sans", Meiryo, sans-serif;
  color: var(--ink);
  background: var(--ground);
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(ellipse at 78% 0, #2b4433, transparent 37rem); }
header, main, footer { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
header, footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
header { min-height: 80px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
footer { border-top: 1px solid var(--line); margin-top: 42px; padding-block: 24px; }
header nav a, footer > a:not(.brand) { font-size: .875rem; }
a { color: var(--accent); text-underline-offset: .26em; }
.brand { color: var(--ink); text-decoration: none; white-space: nowrap; font-weight: 850; }
.brand span { display: inline-grid; width: 32px; height: 32px; place-items: center; border: 1px solid #9cbc68; border-radius: 50%; color: var(--accent); margin-right: 5px; }
button, .button { display: inline-block; font: inherit; font-weight: 750; cursor: pointer; border-radius: 8px; padding: .77rem 1.12rem; border: 1px solid var(--line); color: var(--ink); background: #25382e; text-decoration: none; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
button:disabled { opacity: .48; cursor: default; }
.primary { color: #142019; background: var(--accent); border-color: var(--accent); }
.primary:hover { background: #edffb9; }
.quiet { background: transparent; font-size: .875rem; }
h1, h2, h3 { line-height: 1.28; text-wrap: balance; }
p { line-height: 1.78; color: var(--muted); }
.eyebrow { color: var(--accent); font-size: .875rem; font-weight: 800; letter-spacing: .09em; }
.fine { font-size: .875rem; }
.hero { display: grid; grid-template-columns: 1fr .96fr; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: #18271f; }
.intro { align-self: center; padding: clamp(26px, 5vw, 70px); }
.hero h1, .guide-hero h1, .home-preview h2 { font-family: Georgia, "Yu Mincho", "Hiragino Mincho ProN", serif; font-weight: 600; letter-spacing: -.075em; }
.hero h1, .guide-hero h1 { font-size: clamp(2.45rem, 5.5vw, 5rem); margin: .28em 0 .38em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.intro p { max-width: 32ch; }
.intro .primary { margin-top: 8px; }
.intro .fine { margin-bottom: 0; }
.hero-visual { margin: 0; position: relative; min-height: 500px; isolation: isolate; overflow: hidden; }
.hero-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg,#0d1915c9,transparent 66%); pointer-events: none; }
.hero-visual img { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: 55% 50%; }
.hero-visual figcaption { position: absolute; z-index: 1; left: 24px; right: 24px; bottom: 22px; display: flex; align-items: end; justify-content: space-between; gap: 7px; flex-wrap: wrap; border-top: 1px solid #dcf2c46e; padding-top: 13px; font-size: .875rem; }
.hero-visual b, .result-code, .sample-code { color: var(--accent); font: 800 clamp(1.7rem,4.5vw,3.3rem)/1.1 ui-monospace, Consolas, monospace; letter-spacing: .025em; }
.code-dash { opacity: .65; }
.home-preview { display: grid; grid-template-columns: .7fr 1.3fr; gap: clamp(18px,4vw,48px); align-items: center; margin-top: 16px; padding: clamp(20px,4vw,44px); background: var(--paper); color: var(--paper-ink); border-radius: 18px; }
.home-preview h2 { font-size: clamp(1.65rem,3vw,2.7rem); margin: 0; }
.home-preview p { color: var(--paper-muted); }
.home-preview a { color: #244b2c; font-weight: 760; }
.preview-roles { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.preview-roles figure { margin: 0; min-width: 0; }
.preview-roles img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.preview-roles figcaption { margin-top: 5px; font-size: .875rem; font-weight: 760; }
.card { border: 1px solid var(--line); border-radius: 20px; background: var(--panel); padding: clamp(19px,4vw,42px); }
.quiz-card { max-width: 890px; margin: 28px auto; display: grid; grid-template-columns: minmax(125px,.35fr) minmax(0,1fr); gap: clamp(20px,5vw,56px); }
.quiz-status { border-right: 1px solid var(--line); padding-right: clamp(12px,2vw,24px); }
.quiz-status p { margin: 0 0 10px; }
.quiz-status b { font-size: 1.7rem; }
.quiz-body h1 { font-size: clamp(1.45rem,3vw,2.15rem); margin: 0; }
.progress, .bar { height: 8px; background: #405b4a; border-radius: 10px; overflow: hidden; }
.progress span, .bar span { display: block; height: 100%; background: linear-gradient(90deg,#75c59b,var(--accent)); }
.choices { display: grid; gap: 7px; margin-block: 22px; }
.choices button { background: #1e3027; display: flex; align-items: center; gap: 10px; text-align: left; }
.choices button::before { content: ""; width: 13px; height: 13px; border: 1px solid #9eb7a6; border-radius: 50%; flex: 0 0 auto; }
.choices button:hover { border-color: #83b89b; }
.choices button[aria-pressed=true] { background: #354d33; border-color: var(--accent); color: var(--accent); }
.choices button[aria-pressed=true]::before { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 3px #354d33; }
.actions, .axis-label { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.result-hero { position: relative; display: flex; align-items: end; min-height: 420px; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--panel); }
.result-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% 52%; }
.result-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg,#101a17 4%,#101a17ad 48%,transparent),linear-gradient(0deg,#101a17dc,transparent 59%); }
.result-hero > div { position: relative; z-index: 1; padding: clamp(22px,5vw,54px); max-width: 650px; }
.result-code { font-size: clamp(2.4rem,7vw,5.4rem); margin: .18em 0; }
.result-hero p { color: #e2ecdc; }
.career-section { margin-block: clamp(30px,5vw,58px); }
.career-section h2, .guide section h2 { font-size: clamp(1.55rem,4vw,2.45rem); margin: 0 0 .45em; }
.career-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.career-card { display: grid; grid-template-rows: auto 1fr; overflow: hidden; border-radius: 16px; background: var(--paper); color: var(--paper-ink); }
.career-card img { display: block; width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; object-position: center 40%; }
.career-card > div { padding: clamp(14px,3vw,22px); }
.career-card h3 { margin: 0; }
.career-card p { margin: .65rem 0 0; color: var(--paper-muted); }
.career-card p + p { padding-top: .65rem; border-top: 1px solid #bdc9b8; }
.career-card strong { color: var(--paper-ink); font-size: .875rem; }
.result-axes .axis { display: grid; grid-template-columns: 63px minmax(0,1fr); align-items: center; gap: 13px; padding: 8px; margin: 9px 0; border: 1px solid var(--line); border-radius: 11px; }
.result-axes .axis img { width: 63px; height: 63px; border-radius: 6px; object-fit: cover; }
.axis-label { margin: 5px 0; font-size: .875rem; flex-wrap: nowrap; }
.axis-label span:last-child { text-align: right; }
.guide { max-width: 1020px; }
.guide-hero { border-radius: 20px; border: 1px solid var(--line); padding: clamp(23px,6vw,62px); background: radial-gradient(ellipse at 88% 12%,#3e6745,transparent 62%),#192b23; }
.guide-hero p { max-width: 49ch; margin-bottom: 0; }
.guide-nav { display: flex; flex-wrap: wrap; gap: 8px; padding-block: 17px; border-bottom: 1px solid var(--line); }
.guide-nav a { border: 1px solid var(--line); border-radius: 16px; padding: .25rem .65rem; font-size: .875rem; text-decoration: none; }
.guide-nav a:hover { background: #2d4935; }
.guide section[id] { margin-block: clamp(32px,6vw,70px); scroll-margin-top: 20px; }
.reading, .axis-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.reading > div, .axis-guide, .references li, .guide-end, .guide details { background: var(--panel); border: 1px solid var(--line); padding: clamp(15px,3vw,24px); border-radius: 14px; }
.reading h3 { margin: .3rem 0; }
.reading p, .axis-guide p, .references p { margin: .5rem 0 0; }
#read .reading > div:first-child { background: var(--paper); color: var(--paper-ink); }
#read .reading > div:first-child :is(p,.eyebrow,.sample-code) { color: var(--paper-ink); }
.sample-code { margin-top: .45em; }
.axis-guide h3 { margin: .5rem 0 .75rem; }
.axis-pair { display: inline-block; background: #304834; color: var(--accent); padding: .16rem .5rem; border-radius: 4px; font-weight: 850; letter-spacing: .08em; }
.axis-guide dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .5rem .7rem; }
.axis-guide dt { font-weight: 800; color: var(--accent); }
.axis-guide dd { margin: 0; color: var(--muted); }
.axis-guide p { border-top: 1px solid var(--line); padding-top: .72rem; margin-top: .8rem; font-size: .875rem; }
.guide-career-art { display: block; width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; object-position: center 39%; border-radius: 8px; margin-bottom: .6rem; }
.guide details { margin: .6rem 0; }
.guide summary { cursor: pointer; font-weight: 750; }
.guide details[open] summary { color: var(--accent); }
.formula { padding: .6rem .75rem; background: #2a4133; border-radius: 7px; color: var(--ink); }
.references { padding: 0; list-style: none; display: grid; gap: 7px; }
.references li { padding: 13px; }
.guide-end { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.guide-end h2 { margin: 0; }
@media (max-width: 700px) {
  header, main, footer { width: calc(100% - 28px); }
  header { min-height: 64px; margin-bottom: 14px; }
  .hero, .home-preview, .career-grid, .reading, .axis-grid, .quiz-card { grid-template-columns: 1fr; }
  .hero-visual { min-height: 224px; }
  .hero-visual figcaption { left: 15px; right: 15px; bottom: 14px; }
  .home-preview h2 br { display: none; }
  .preview-roles { gap: 6px; }
  .preview-roles figcaption { line-height: 1.35; }
  .quiz-card { margin-block: 16px; gap: 16px; }
  .quiz-status { padding: 0; border: 0; }
  .quiz-status b { font-size: 1.35rem; }
  .result-hero { min-height: 340px; }
  .result-hero::after { background: linear-gradient(0deg,#101a17 4%,#101a17db 35%,#101a1740 86%); }
  .career-card img { aspect-ratio: 16/9; }
  .result-axes .axis { grid-template-columns: 42px minmax(0,1fr); gap: 7px; }
  .result-axes .axis img { width: 42px; height: 52px; }
  .axis-label { font-size: .82rem; }
}
@media (prefers-reduced-motion: no-preference) {
  button, .button { transition: background-color .16s, border-color .16s; }
}
