/* 테스트·결과·영수증·물어보기 페이지. 토큰은 styles.css 의 :root. */
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.button.big { min-height: 52px; font-size: 1.0625rem; border-radius: 14px; width: 100%; cursor: pointer; font-family: inherit; }
.button.plaza { background: var(--ink); border-color: var(--ink); color: #fff; }
.share-row, .next-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.next-row .button:last-child { width: 100%; min-height: 52px; }
.service-icon.plaza { background: #fff1e6; }

/* ---------- 테스트 ---------- */
.quiz { max-width: 560px; margin: 0 auto; padding: 40px 0 64px; }
.quiz-hero { display: flex; gap: 4px; margin-bottom: 16px; }
.quiz-start .button.big { margin-top: 24px; }
.quiz-progress { height: 8px; border-radius: 999px; background: var(--surface-subtle); overflow: hidden; }
.quiz-progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.quiz-step { margin: 16px 0 4px; color: var(--muted); font-weight: 700; }
.quiz h2 { margin: 0 0 20px; font-size: 1.625rem; letter-spacing: -.03em; line-height: 1.35; outline: none; }
.quiz-options { display: grid; gap: 10px; }
.quiz-options button { min-height: 60px; padding: 12px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); font: inherit; font-size: 1.0625rem; font-weight: 600; text-align: left; color: inherit; cursor: pointer; transition: border-color .15s, background-color .15s; }
.quiz-options button:hover, .quiz-options button:focus-visible { border-color: var(--accent); background: #fff8f3; }

/* ---------- 결과 ---------- */
.result { max-width: 560px; margin: 0 auto; padding: 32px 0 64px; }
.result-card { padding: 28px 24px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); border-top: 8px solid var(--type); text-align: center; }
.result-wallet { display: grid; place-items: center; }
.result h1 { margin: 8px 0 4px; font-size: clamp(1.625rem, 6vw, 2.125rem); color: var(--type); }
.result-short { margin: 0; font-size: 1.125rem; font-weight: 700; }
.result-lines { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; color: var(--muted); }
.result-tip { margin: 18px 0 0; padding: 14px; border-radius: 12px; background: var(--surface-subtle); text-align: left; }
.result-tip b { display: block; margin-bottom: 2px; color: var(--ink); }
.result-match { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.result-match a { display: grid; justify-items: center; gap: 2px; padding: 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; text-align: center; }
.result-match span { color: var(--muted); font-size: .875rem; font-weight: 700; }
.result-match b { font-size: .9375rem; line-height: 1.35; }
.all-types { margin-top: 40px; }
.all-types h2 { font-size: 1.25rem; }
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.type-grid a { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; font-size: .875rem; font-weight: 600; line-height: 1.3; }
.type-grid a[aria-current] { border-color: var(--accent); }
.type-grid svg { flex: none; }

/* ---------- 영수증 ---------- */
.receipt-wrap { max-width: 440px; margin: 0 auto; padding: 32px 0 64px; }
.receipt { position: relative; padding: 28px 24px 32px; background: #fffdf8; border: 1px solid var(--line); font-variant-numeric: tabular-nums; box-shadow: 0 8px 24px rgba(0, 0, 0, .06); }
.receipt::after { content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 10px; background: linear-gradient(-45deg, transparent 6px, #fffdf8 0) 0 0 / 12px 12px, linear-gradient(45deg, transparent 6px, #fffdf8 0) 0 0 / 12px 12px; }
.receipt h2 { margin: 0; text-align: center; font-size: 1.375rem; letter-spacing: .02em; }
.receipt .meta { margin: 4px 0 16px; text-align: center; color: var(--muted); font-size: .875rem; }
.receipt hr { border: 0; border-top: 2px dashed var(--line-strong); margin: 14px 0; }
.receipt .row { display: flex; justify-content: space-between; gap: 12px; margin: 6px 0; }
.receipt .row span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.receipt .row .tag { flex: none; font-weight: 800; }
.receipt .skip { color: #2f9e6e; }
.receipt .buy { color: #c4531f; }
.receipt .total { font-size: 1.125rem; font-weight: 800; }
.receipt .verdict { margin: 16px 0 0; text-align: center; font-size: 1.5rem; font-weight: 800; }
.receipt .defense { text-align: center; font-size: 3rem; font-weight: 800; letter-spacing: -.04em; margin: 4px 0 0; }
.receipt .empty { text-align: center; color: var(--muted); }
.receipt-note { color: var(--muted); font-size: .875rem; margin-top: 16px; }

/* ---------- 물어보기 ---------- */
.ask { max-width: 480px; margin: 0 auto; padding: 32px 0 64px; }
.ask h1 { margin: 4px 0 16px; font-size: 2rem; }
.ask-card { padding: 20px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.ask-card img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 14px; background: var(--surface-subtle); }
.ask-card h2 { margin: 12px 0 4px; font-size: 1.25rem; line-height: 1.4; }
.ask-card .price { margin: 0; display: flex; gap: 8px; align-items: baseline; }
.ask-card .price b { color: #c4531f; }
.ask-card .price strong { font-size: 1.75rem; }
.ask-votes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.ask-votes button { min-height: 56px; border: 2px solid transparent; border-radius: 14px; font: inherit; font-size: 1.0625rem; font-weight: 800; color: #fff; cursor: pointer; }
.ask-votes .buy { background: #e8743b; }
.ask-votes .skip { background: #2f9e6e; }
.ask-votes button[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 2px #fff; }
.ask-bar { display: flex; height: 10px; margin-top: 12px; border-radius: 999px; overflow: hidden; background: var(--surface-subtle); }
.ask-bar span:first-child { background: #e8743b; } .ask-bar span:last-child { background: #2f9e6e; }
.ask-result { margin: 8px 0 0; color: var(--muted); font-weight: 600; text-align: center; }
.ask-card .deal-link { display: inline-block; margin-top: 8px; font-weight: 700; }

@media (max-width: 480px) { .share-row, .next-row { grid-template-columns: 1fr; } }
.page-toast { position: fixed; left: 50%; bottom: 32px; transform: translate(-50%, 20px); max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 999px; background: rgba(29, 36, 32, .92); color: #fff; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; }
.page-toast.show { opacity: 1; transform: translate(-50%, 0); }
.receipt-wrap .share-row { margin-top: 24px; }
