:root {
  color-scheme: light;
  --wall: #eeeade;
  --paper: #faf7ec;
  --raised: #e8ebdc;
  --ink: #1c3227;
  --dim: #4f5e4f;
  --gold: #6f532f;
  --line: #c5c9b4;
  --body: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, system-ui, sans-serif;
  --serif: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif CJK JP", Georgia, serif;
  --number: Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
body { position: relative; isolation: isolate; margin: 0; min-height: 100vh; background: var(--wall); color: var(--ink); font: 1rem/1.72 var(--body); }
button, summary, a, input { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; font: inherit; }
a { color: var(--gold); text-underline-offset: 4px; }
:focus-visible { outline: 2px solid #53734d; outline-offset: 4px; }
h1:focus { outline: none; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2 { font-family: var(--serif); line-height: 1.18; font-weight: 600; }
h2 { font-size: clamp(1.42rem, 2.5vw, 2rem); }
.shell { width: min(1160px, calc(100% - 80px)); margin-inline: auto; }
.top { background: #20392c; border-bottom: 1px solid #45644d; }
.masthead { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { padding: 9px 0; border: 0; background: none; color: var(--gold); font: 600 clamp(.9rem, 2vw, 1.1rem) var(--serif); letter-spacing: .15em; }
.lang { display: flex; gap: 5px; }
main.shell { padding-block: clamp(27px, 5.4vw, 74px) clamp(28px, 5vw, 66px); }
.hero { display: grid; grid-template-columns: 1fr 1.12fr; min-height: min(600px, 75vh); background: var(--paper); border: 1px solid var(--line); }
.hero-content { align-self: center; padding: clamp(30px, 5.3vw, 76px); }
.hero h1 { margin-block: 15px 23px; font-size: clamp(2.2rem, 4.6vw, 4.1rem); letter-spacing: -.035em; overflow-wrap: anywhere; }
html[lang="ja"] .hero-content { container-type: inline-size; }
html[lang="ja"] .hero h1 { font-size: min(clamp(2.2rem, 4.6vw, 4.1rem), 14cqw); }
.hero-title-line { display: block; white-space: nowrap; }
html[lang="en"] .hero h1 { font-size: clamp(3rem, 6.5vw, 6rem); line-height: .99; }
.eyebrow { color: var(--gold); font-size: .78rem; font-weight: 650; letter-spacing: .13em; }
.intro { color: var(--dim); max-width: 34ch; margin-bottom: 28px; }
.plate { position: relative; min-width: 0; min-height: 340px; background: var(--wall); }
.plate img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 24px; color: var(--dim); font-size: .85rem; }
.facts span + span::before { content: "·"; margin-right: 10px; color: var(--gold); }
.primary, .secondary { display: inline-flex; align-items: center; justify-content: center; padding: 10px 19px; min-height: 46px; border: 1px solid var(--gold); text-decoration: none; font-weight: 650; text-align: center; }
.primary { background: #254534; border-color: #254534; color: #faf7ec; }
.primary:hover:not(:disabled) { background: #365b41; }
.primary:disabled { background: #e8e8da; color: #657062; border-color: #bfc5b3; cursor: default; }
.secondary { color: var(--ink); background: transparent; border-color: #88957d; }
.secondary:hover, .secondary[aria-pressed="true"] { background: #e1e9d8; border-color: #638365; }
.paper { background: var(--paper); border: 1px solid var(--line); }
.quiz { max-width: 780px; margin-inline: auto; padding: clamp(22px, 5.4vw, 58px); }
.quiz-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.counter { color: var(--gold); font: 1.12rem var(--number); white-space: nowrap; }
progress { display: block; width: 100%; height: 3px; appearance: none; border: 0; margin: 16px 0 30px; background: #d7ddcc; }
progress::-webkit-progress-bar { background: #d7ddcc; }
progress::-webkit-progress-value { background: #527553; }
progress::-moz-progress-bar { background: var(--gold); }
.quiz h1 { font-size: clamp(1.6rem, 4vw, 2.7rem); }
.muted { color: var(--dim); }
.quiz h1 + p { margin-block: 13px 19px; }
.choices { display: grid; gap: 5px; margin-block: 20px 30px; }
.choices label { display: flex; align-items: center; gap: 13px; min-height: 48px; padding: 9px 13px; border: 1px solid transparent; cursor: pointer; }
.choices label:hover { background: var(--raised); }
.choices label:has(input:checked) { background: #e1e9d8; border-color: #799579; }
.choices input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--gold); cursor: pointer; }
.choices label > span { min-width: 0; line-height: 1.45; overflow-wrap: anywhere; }
.quiz-nav, .actions, .tie-options { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.quiz-nav { justify-content: space-between; }
.result-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); grid-template-areas: "profile art" "profile chart"; gap: 20px; align-items: start; }
.result-main, .chart, .ranking, .result-actions { padding: clamp(20px, 3.8vw, 40px); min-width: 0; }
.result-main { grid-area: profile; }
.result-illustration { grid-area: art; margin: 0; display: grid; place-items: center; padding: 18px; border: 1px solid var(--line); background: #ede6cf; min-width: 0; }
.result-illustration img { display: block; width: 100%; height: auto; max-height: 360px; object-fit: contain; }
.result-illustration.sprite img { width: min(100%, 192px); image-rendering: pixelated; }

.result-main h1 { font-size: clamp(2.15rem, 5.5vw, 4.55rem); margin-top: 9px; overflow-wrap: anywhere; }
.epithet { margin-top: 8px; color: var(--gold); font: italic clamp(1.22rem, 2.4vw, 1.8rem)/1.24 Georgia, serif; }
.result-label { margin-top: 10px; color: var(--dim); }
.score { display: flex; flex-wrap: wrap; align-items: baseline; gap: 9px; padding-block: 12px 15px; }
.score strong { color: var(--gold); font: 600 clamp(2.25rem, 5.8vw, 3.8rem)/1.16 var(--number); }
.score span { color: var(--dim); }
.tie-options { margin-bottom: 15px; }
.job-info { display: grid; gap: 15px; padding-block: 20px; border-top: 1px solid var(--line); }
.job-info h3 { font-size: 1rem; margin-bottom: 3px; }
.execution-rating { display: flex; flex-wrap: wrap; gap: 3px 12px; margin: 0; }
.execution-rating dt { color: var(--dim); }
.execution-rating dd { margin: 0; font-weight: 650; }
.job-info a { justify-self: start; }
.job-copy { white-space: pre-line; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; list-style: none; padding: 0; margin: 6px 0 0; }
.tags li { background: #edf0e4; border: 1px solid var(--line); font-size: .85rem; padding: 3px 8px; }
.notice:empty { display: none; }
.chart { grid-area: chart; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart svg text { fill: var(--ink); font-family: var(--body); font-weight: 650; font-size: 14px; }
.grid-line { fill: none; stroke: #a4ad99; }
.radar-job { fill: #a3783d30; stroke: #87642f; stroke-width: 2; }
.radar-user { fill: #47714e38; stroke: #3f6b4b; stroke-width: 2; }
.legend { display: flex; justify-content: center; gap: 8px 15px; flex-wrap: wrap; margin-bottom: 12px; font-size: .9rem; }
.legend i { display: inline-block; width: .72em; height: .72em; margin-right: 5px; background: #3f6b4b; }
.legend span:nth-child(2) i { background: #87642f; }
.chart-data { margin-top: 10px; }
summary { cursor: pointer; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: .875rem; }
td, th { padding: 6px; border-bottom: 1px solid var(--line); }
.rank-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; align-items: start; }
.result-actions { margin-top: 20px; }
.catalog-action { padding-block: clamp(14px, 2.4vw, 23px); }
.ranking h2 + p { margin-block: 8px 17px; }
.rank-list { border-top: 1px solid var(--line); }
.rank-list details { border-bottom: 1px solid var(--line); }
.rank-list summary { list-style: none; display: grid; min-height: 59px; grid-template-columns: 2ch minmax(0, 1fr) auto 12px; align-items: center; gap: 10px; padding: 9px 7px; }
.rank-list summary::-webkit-details-marker { display: none; }
.ranking.best .rank-list summary { grid-template-columns: 2ch minmax(0, 1fr) 12px; }
.rank-list summary::after { content: "+"; color: var(--gold); font: 1.12rem var(--number); }
.rank-list details[open] summary::after { content: "−"; }
.rank-list summary:hover, .rank-list details[open] summary { background: var(--raised); }
.rank-no, .rank-score { color: var(--gold); font: 1.07rem var(--number); white-space: nowrap; }
.rank-list small { color: var(--dim); font: .8rem var(--body); }
.rank-list b + small { display: block; }
.rank-art { display: none; width: min(144px, 100%); height: auto; aspect-ratio: 1; object-fit: contain; margin: 12px auto 0; image-rendering: pixelated; }
.rank-list details[open] .rank-art { display: block; }
.rank-list .job-info { padding: 13px 8px 20px; border-top: 0; }
.catalog { padding: clamp(17px, 4vw, 44px); }
.catalog-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; margin-bottom: 28px; }
.catalog-role { margin-bottom: 40px; }
.catalog-role h2 { margin-bottom: 16px; }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 236px), 1fr)); align-items: start; gap: 18px; }
.catalog-entry { min-width: 0; background: #f5f2e6; border: 1px solid var(--line); }
.catalog-entry summary { display: block; list-style: none; }
.catalog-entry summary::-webkit-details-marker { display: none; }
.catalog-entry summary:hover { background: var(--raised); }
.catalog-art { display: block; width: 100%; height: 120px; object-fit: contain; background: #ecebdc; padding: 12px; image-rendering: pixelated; border-bottom: 1px solid var(--line); }
.catalog-card-text { position: relative; display: grid; gap: 10px; padding: 13px 16px; }
.catalog-card-text::after { position: absolute; top: 12px; right: 14px; content: "+"; color: var(--gold); font: 1.3rem var(--number); }
.catalog-entry[open] .catalog-card-text::after { content: "−"; }
.catalog-name { min-width: 0; display: grid; gap: 3px; padding-right: 20px; font: 600 1.25rem/1.35 var(--serif); overflow-wrap: anywhere; }
.catalog-name i { color: var(--gold); font: italic .97rem/1.3 Georgia, serif; }
.catalog-meta { color: var(--dim); display: flex; justify-content: space-between; flex-wrap: wrap; align-items: baseline; gap: 4px 9px; font-size: .8rem; }
.catalog-fit-label, .catalog-meta small { font: .75rem var(--body); }
.catalog-entry .job-info { margin-inline: 16px; }
footer { padding-block: 0 28px; color: var(--dim); font-size: .875rem; }
.foot-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-bottom: 7px; }
.foot-links b { color: var(--gold); font: 650 .8rem var(--body); letter-spacing: .09em; }
.enter { animation: appear .23s ease-out both; }
@keyframes appear { from { opacity: .7; transform: translateY(3px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .enter { animation: none; } }
@media (max-width: 800px) {
  .shell { width: calc(100% - 32px); }
  .masthead { min-height: 60px; }
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-content { padding: 29px clamp(19px, 5vw, 36px); }
  .hero h1 { margin-block: 10px 13px; }
  .intro { margin-bottom: 19px; }
  .plate { min-height: 0; aspect-ratio: 4 / 3; }
  .plate img { object-position: center 54%; }
  .result-grid { grid-template-columns: 1fr; grid-template-areas: "art" "profile" "chart"; gap: 14px; }
  .rank-panels { grid-template-columns: 1fr; gap: 14px; }
  .chart svg { max-width: 425px; margin-inline: auto; }
}
@media (max-width: 410px) {
  .quiz { padding-inline: 14px; }
}
/* An engraved plate and book cloth carry the botanical motif across the UI. */
body {
  background-color: var(--wall);
  background-image: radial-gradient(#6c795118 .65px, transparent .75px);
  background-size: 6px 6px;
}
.top { color: #f5f0dc; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; letter-spacing: .18em; }
.brand::before { content: ""; display: block; width: 14px; height: 19px; background: #bec7a2; border-radius: 0 100% 0 100%; transform: rotate(60deg); }
.top :focus-visible { outline-color: #ebd8a7; }
.hero {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 540px;
  padding: 12px;
  background: #faf7ec;
  box-shadow: 0 10px 32px #374a2a0f;
}
.hero-content { padding: clamp(28px, 5vw, 68px); }
.hero-content .eyebrow { margin-bottom: 19px; }
.hero h1 { margin-block: 0 21px; letter-spacing: -.035em; }
.hero h1::after { content: ""; display: block; width: 44px; height: 2px; background: #819469; margin-top: 23px; }
.intro { max-width: 33ch; }
.plate { display: grid; place-items: center; isolation: isolate; background: #eee6cf; overflow: hidden; border: 1px solid #bec3a6; }
.plate::after { z-index: 1; content: ""; position: absolute; inset: 12px; border: 1px solid #7e8d607d; pointer-events: none; }
.plate img.plate-engraving { position: absolute; inset: 20px; width: calc(100% - 40px); height: calc(100% - 40px); object-fit: contain; mix-blend-mode: multiply; }
.facts { padding-top: 13px; margin-top: 21px; border-top: 1px solid var(--line); }
.paper { box-shadow: 0 5px 21px #374a2a0a; }
.quiz, .result-main { border-top: 3px solid #778e67; }
.result-illustration:not(.sprite) img { mix-blend-mode: multiply; }
.choices input { accent-color: #345b3d; }
@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding: 8px; }
  .hero-content { padding: 26px clamp(16px, 4.5vw, 33px); }
  .hero-content .eyebrow { margin-bottom: 13px; }
  .hero h1::after { margin-top: 15px; }
  .plate { aspect-ratio: 4 / 3; min-height: 0; }
}
/* Keep authored line breaks while letting long Japanese and English copy reflow. */
.intro, .job-copy, .muted, .notice, .tags li { overflow-wrap: break-word; text-wrap: pretty; }
.intro-sentence { display: block; }
.intro-sentence + .intro-sentence { margin-top: .38em; }
html[lang="ja"] :is(.intro-sentence, .quiz h1, .choices label span, .job-copy, .ranking p) { word-break: auto-phrase; }
.lang a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid transparent;
  color: #e0e8d9;
  font-size: .875rem;
  white-space: nowrap;
  text-decoration: none;
}
.lang a[aria-current="page"] { color: #fff9e9; border-color: #789279; background: #314f39; }
.foot-legal p { margin: .4em 0; }
.policy { max-width: 760px; margin: 24px auto; overflow-wrap: break-word; }
.policy h2 { margin: 1.5em 0 .4em; font-size: 1.2rem; }
.policy-back { margin-top: 1.5em; }
.offline-policy:not(:target) { display: none; }
@media (max-width: 410px) { .lang a { padding-inline: 7px; } }
.quiz h1, .job-info h3, .ranking h2, .catalog-header h1, .chart h2 { text-wrap: balance; }
.hero .intro { max-width: none; }
html[lang="en"] .hero .intro { max-width: 42ch; }
html[lang="ja"] main { line-break: strict; }
.catalog-card-text, .rank-list summary > span { min-width: 0; }
.rank-list summary b, .rank-list summary small { overflow-wrap: break-word; text-wrap: pretty; }
.actions > *, .quiz-nav > *, .catalog-header > * { max-width: 100%; }
.catalog-art, .result-illustration.sprite img { object-fit: contain; }
.result-illustration.sprite img { max-height: 260px; }
@media (max-width: 360px) {
  .hero h1 .hero-title-line { white-space: normal; }
  .catalog-meta { gap: 4px 8px; }
  .rank-list summary { gap: 6px; }
}
