:root { color-scheme: light; --ink: #131313; --muted: #6B6B6B; --mint: #3CFFD0; --green: #309875; }
* { box-sizing: border-box; }
body { margin: 0; background: #fff; color: var(--ink); font: 15px/1.6 'Noto Sans TC', sans-serif; -webkit-font-smoothing: antialiased; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible, textarea:focus-visible { outline: 3px solid #5200FF; outline-offset: 4px; }
h1, h2, p { margin: 0; }
.shell { width: 100%; max-width: 720px; margin: 0 auto; padding: 0 20px 48px; }
.masthead { height: 60px; border-bottom: 1px solid var(--ink); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.masthead img { height: 44px; width: auto; display: block; }
.masthead span { color: var(--muted); }
.mono { font-family: 'Space Mono', 'Noto Sans TC', monospace; font-size: 11px; letter-spacing: 1.8px; text-transform: uppercase; }
.section-label { color: var(--green); font-weight: 400; }
.screen { animation: enter 180ms ease-out; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.intro { padding-top: 32px; display: flex; flex-direction: column; gap: 28px; }
.intro-heading { display: flex; flex-direction: column; gap: 14px; }
h1 { font-family: 'Space Grotesk', 'Noto Sans TC', sans-serif; font-size: 58px; font-weight: 900; line-height: .98; letter-spacing: .01em; }
.intro-heading p { font-size: 16px; font-weight: 500; color: #2D2D2D; }
.charms { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.charms img { width: 100%; aspect-ratio: 1; object-fit: contain; border: 1px solid var(--dim); border-radius: 16px; }
.identities { display: flex; flex-direction: column; gap: 22px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 10px; }
.identity-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.identity-options.love { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.identity-options button { min-height: 48px; padding: 10px 12px; border: 1px solid var(--ink); border-radius: 24px; background: #fff; font-weight: 500; }
.identity-options.love button { padding: 10px 6px; font-size: 14px; white-space: nowrap; }
.identity-options button[aria-pressed="true"] { background: var(--mint); }
.primary { width: 100%; min-height: 52px; display: flex; align-items: center; justify-content: center; padding: 12px 16px; background: var(--mint); border: 1px solid var(--ink); border-radius: 30px; color: var(--ink); font-weight: 700; text-decoration: none; transition: background 180ms, color 180ms; }
.primary:disabled { opacity: .4; }
@media (hover: hover) { .primary:not(:disabled):hover { background: var(--ink); color: var(--mint); } }
.quiz, .review { padding-top: 12px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; }
.toolbar .mono { white-space: nowrap; }
.toolbar h2 { font-size: 20px; }
.nav-button { min-height: 48px; padding: 0 14px; border-radius: 40px; border: 1px solid #D0D0D0; background: #fff; }
.nav-button.green { border-color: var(--green); color: var(--green); }
.nav-placeholder { width: 104px; }
.progress { height: 6px; background: #E0E0E0; border-radius: 20px; overflow: hidden; margin-top: 14px; }
.progress > div { height: 100%; background: var(--mint); }
.question-card { margin-top: 28px; margin-bottom: 16px; min-height: 220px; padding: 24px; border: 1px solid var(--ink); border-radius: 28px; background: var(--tile); color: var(--tile-ink); display: flex; flex-direction: column; gap: 18px; }
.question-card header { display: flex; align-items: center; justify-content: space-between; }
.question-number { font-family: 'Space Grotesk', sans-serif; font-size: 40px; font-weight: 900; line-height: .9; }
.question-card h2 { font-size: 20px; line-height: 1.5; font-weight: 700; text-wrap: pretty; }
.options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.option { height: 80px; padding: 10px 2px; border: 1px solid var(--ink); border-radius: 20px; background: #fff; color: var(--ink); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; }
.option[aria-pressed="true"] { background: var(--tile); color: var(--tile-ink); }
.option-number { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 24px; line-height: 1; }
.option-label { font-size: 11px; white-space: nowrap; }
.skip { width: 100%; height: 44px; margin-top: 12px; border: 1px solid #D0D0D0; border-radius: 24px; background: transparent; color: var(--muted); font-size: 14px; }
.skip[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); }
.review-list { display: flex; flex-direction: column; gap: 10px; margin: 20px 0 0 46px; border-left: 1px dashed #5200FF; padding-left: 16px; }
.review-row { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 14px 18px; border: 1px solid var(--ink); border-radius: 20px; background: #fff; text-align: left; }
.review-number { position: absolute; left: -62px; top: 16px; width: 40px; text-align: right; color: var(--muted); letter-spacing: 1.1px; }
.review-question { font-size: 14px; line-height: 1.5; font-weight: 500; }
.review-answer { font-size: 10px; letter-spacing: 1.5px; color: var(--green); }
.review-row.unanswered { border-color: #5200FF; }
.unanswered .review-answer { color: #5200FF; }
.skipped .review-answer { color: var(--muted); }
.review-action { position: sticky; bottom: 0; padding: 18px 0 8px; background: #fff; margin-top: 12px; }
.result { display: flex; flex-direction: column; gap: 32px; padding-top: 16px; }
.notice-card { border: 1px solid var(--ink); background: #F0F0F0; border-radius: 28px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.notice-card h2 { font-size: 24px; }
.skipped-note { font-size: 12px; color: var(--muted); }
.hero { border: 1px solid var(--ink); border-radius: 28px; padding: 24px; background: var(--dim); color: var(--dim-ink); display: flex; flex-direction: column; gap: 22px; }
.hero-top { display: flex; justify-content: space-between; gap: 8px; font-size: 10px; letter-spacing: 1.5px; }
.hero-main { display: flex; gap: 20px; align-items: center; }
.seal { display: flex; align-items: center; justify-content: center; border-radius: 50%; font-family: 'Space Grotesk', 'Noto Sans TC', sans-serif; font-weight: 900; line-height: 1; flex: 0 0 auto; }
.hero .seal { width: 96px; height: 96px; background: #fff; color: var(--dim); font-size: 60px; }
.hero .seal.double { font-size: 36px; }
.hero-detail { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.hero h2 { font-size: 34px; font-weight: 900; line-height: 1.15; }
.hero h2.double { font-size: 30px; }
.hero-english { font-size: 10px; letter-spacing: 1.5px; opacity: .8; overflow-wrap: anywhere; }
.hero-score { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.hero-score .mono { font-size: 10px; letter-spacing: 1.5px; }
.hero-score strong { font-family: 'Space Grotesk', sans-serif; font-size: 56px; font-weight: 900; line-height: .9; }
.facet { align-self: flex-start; padding: 5px 12px; border-radius: 20px; background: #fff; color: var(--ink); font-weight: 700; }
.hero p { border-top: 1px solid currentColor; padding-top: 18px; font-size: 17px; line-height: 1.6; font-weight: 700; }
.result-section { display: flex; flex-direction: column; gap: 12px; }
.ranking { display: flex; flex-direction: column; gap: 10px; }
.rank-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid #D0D0D0; border-radius: 20px; color: var(--muted); }
.rank-row.top-three { border: 2px solid var(--ink); color: var(--ink); background: color-mix(in srgb, var(--dim) 18%, white); }
.rank-row .seal { width: 44px; height: 44px; border: 1px solid var(--ink); background: var(--dim); color: var(--dim-ink); font-size: 22px; }
.rank-row .seal.double { font-size: 14px; }
.rank-detail { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rank-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.rank-title strong { font-size: 16px; line-height: 1; }
.rank-badge { border: 1px solid var(--ink); background: var(--dim); color: var(--dim-ink); border-radius: 20px; padding: 2px 8px; font-size: 10px; letter-spacing: 1.5px; }
.rank-desc { font-size: 12px; color: var(--muted); }
.rank-progress { height: 6px; border: 1px solid var(--ink); border-radius: 20px; overflow: hidden; }
.grow-bar { width: 0; height: 100%; background: var(--dim); transition: width 600ms ease; }
.rank-score { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 28px; line-height: 1; }
.rank-row.not-scored { border: 1px solid #D0D0D0; color: var(--muted); }
.not-scored .rank-score { font: 12px/1.6 'Noto Sans TC', sans-serif; white-space: nowrap; }
.mix-box { border: 1px solid var(--ink); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.mix-bar { display: flex; height: 28px; border-radius: 20px; border: 1px solid var(--ink); overflow: hidden; }
.mix-bar .grow-bar { flex: 0 0 auto; }
.mix-legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; }
.mix-legend span { display: flex; gap: 6px; align-items: center; font-size: 12px; white-space: nowrap; }
.dot { width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--ink); background: var(--dim); flex: 0 0 auto; }
.actions { display: flex; flex-direction: column; gap: 10px; }
.secondary-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.secondary { min-height: 48px; border: 0; background: #F0F0F0; border-radius: 24px; padding: 10px; }
.feedback { position: relative; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; padding-top: 12px; border-top: 1px solid #E0E0E0; }
.feedback .mono { font-size: 10px; letter-spacing: 1.5px; color: var(--muted); }
.feedback-options { display: flex; gap: 8px; }
.feedback button { min-height: 48px; padding: 0 16px; border-radius: 40px; border: 1px solid var(--ink); background: #fff; font-size: 13px; }
.feedback-options button[aria-pressed="true"] { background: var(--mint); }
.feedback textarea { display: block; width: 100%; min-width: 0; resize: vertical; padding: 14px; border: 1px solid #D0D0D0; border-radius: 20px; background: #fff; color: var(--ink); font: inherit; }
.feedback textarea::placeholder { color: var(--muted); opacity: 1; }
.feedback-foot { width: 100%; display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.feedback .secondary { background: #F0F0F0; border: 0; }
.feedback button:disabled { opacity: .4; }
.thanks { color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
@media (prefers-reduced-motion: reduce) { .screen { animation: none; } .grow-bar { transition: none; } }
