﻿:root {
  color-scheme: dark;
  --ink: #e8f5fc;
  --muted: #9bb2c4;
  --line: rgba(191, 226, 242, .18);
  --accent: #eac28a;
  --glass: linear-gradient(145deg, rgba(191, 231, 242, .14), rgba(79, 136, 157, .07) 48%, rgba(15, 29, 43, .28));
  font-family: 'Segoe UI', Arial, sans-serif;
  color: var(--ink);
  background: #0b1220;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; background: radial-gradient(ellipse at 12% 12%, rgba(93,183,255,.14), transparent 55%), radial-gradient(ellipse at 90% 75%, rgba(234,194,138,.09), transparent 55%), #0b1220; }
body::before { content: ''; position: fixed; width: 34vw; height: 34vw; min-width: 220px; min-height: 220px; left: 22%; top: 24%; border-radius: 50%; background: rgba(93,183,255,.05); filter: blur(55px); pointer-events: none; }
button, input, textarea { font: inherit; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
.site-header { position: relative; height: 78px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(20px,5vw,72px); border-bottom: 1px solid var(--line); background: rgba(11,18,32,.45); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 12px; border: 1px solid rgba(234,194,138,.35); background: linear-gradient(145deg,rgba(234,194,138,.2),rgba(234,194,138,.04)); box-shadow: inset 0 1px 0 rgba(255,255,255,.17); color: var(--accent); font-size: 20px; font-weight: 700; }
.module-wordmark { display: flex; flex-direction: column; gap: 4px; }
.module-wordmark strong { font-size: 12px; font-weight: 800; letter-spacing: .18em; color: var(--accent); }
.module-wordmark small { color: var(--muted); font-size: 10px; }
.module-wordmark b { color: var(--ink); }
.header-back { color: var(--muted); text-decoration: none; font-size: 12px; }
.header-back:hover { color: var(--accent); }
.shell { position: relative; width: min(100% - 40px, 660px); margin: auto; padding: 35px 0 40px; }
.workspace { min-width: 0; }
.progress-head { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; font-weight: 600; margin-bottom: 12px; }
#section-name { color: var(--accent); }
#remaining { color: var(--muted); font-weight: 400; white-space: nowrap; }
progress { display: block; width: 100%; height: 4px; border: 0; border-radius: 20px; overflow: hidden; background: rgba(255,255,255,.08); }
progress::-webkit-progress-bar { background: rgba(255,255,255,.08); }
progress::-webkit-progress-value { background: linear-gradient(90deg,#a8d9e8,var(--accent)); border-radius: 20px; transition: width .25s; }
progress::-moz-progress-bar { background: var(--accent); }
.progress-note { color: var(--muted); text-align: right; font-size: 10px; min-height: 12px; margin: 8px 0 18px; }
.card-stack { position: relative; margin-bottom: 24px; }
.stack-back { position: absolute; inset: 12px 12px -9px; border: 1px solid rgba(191,226,242,.1); background: linear-gradient(140deg,rgba(174,224,245,.05),rgba(234,194,138,.035)); border-radius: 28px; transform: rotate(1deg); }
.question-card { position: relative; background: var(--glass); border: 1px solid rgba(180,235,235,.24); border-radius: 26px; padding: 32px; min-height: 380px; max-height: min(660px,calc(100dvh - 270px)); overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(191,226,242,.2) transparent; overscroll-behavior-y: contain; box-shadow: 0 28px 90px rgba(0,0,0,.34),inset 0 1px 0 rgba(255,255,255,.2),inset 0 -1px 0 rgba(234,194,138,.08); backdrop-filter: blur(30px) saturate(145%); -webkit-backdrop-filter: blur(30px) saturate(145%); touch-action: pan-y; transition: transform .16s,opacity .16s; }
.question-card::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(115deg,rgba(255,255,255,.07),transparent 35%,transparent 75%,rgba(234,194,138,.035)); }
.question-card > * { position: relative; }
.question-card.enter-next { animation: fromRight .22s ease-out; }
.question-card.enter-back { animation: fromLeft .22s ease-out; }
@keyframes fromRight { from { opacity: .35; transform: translateX(28px) rotate(1deg); } to { opacity: 1; transform: none; } }
@keyframes fromLeft { from { opacity: .35; transform: translateX(-28px) rotate(-1deg); } to { opacity: 1; transform: none; } }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 26px; }
.card-number { color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.pill { border: 1px solid rgba(191,226,242,.13); border-radius: 20px; padding: 5px 10px; color: var(--muted); font-size: 10px; background: rgba(255,255,255,.025); }
.question-card h2 { font-size: 27px; font-weight: 500; line-height: 1.35; letter-spacing: -.5px; margin: 0 0 18px; outline: none; }
.question-hint { font-size: 13px; line-height: 1.65; color: var(--muted); margin: 10px 0 18px; }
.hint-detail { font-size: 11px; color: var(--muted); margin: -5px 0 16px; }
.hint-detail summary { cursor: pointer; width: fit-content; }
.selection-note { font-size: 11px; color: var(--muted); margin: 0 0 16px; }
.answers { display: grid; gap: 10px; margin: 22px 0 0; padding: 0; border: 0; min-width: 0; }
.option { display: flex; align-items: center; gap: 12px; padding: 13px 15px; min-height: 50px; border: 1px solid rgba(191,226,242,.17); border-radius: 13px; background: linear-gradient(135deg,rgba(191,226,242,.055),rgba(4,15,22,.16)); box-shadow: inset 0 1px 0 rgba(255,255,255,.035); color: var(--ink); font-size: 14px; line-height: 1.45; cursor: pointer; transition: background .15s,border-color .15s; }
.option:hover { border-color: rgba(234,194,138,.4); background: rgba(234,194,138,.065); }
.option:has(input:checked) { background: linear-gradient(135deg,rgba(234,194,138,.19),rgba(234,194,138,.055)); border-color: rgba(234,194,138,.65); color: #f7dbb1; box-shadow: inset 0 1px 0 rgba(255,255,255,.12),0 0 20px rgba(234,194,138,.04); }
.option input { width: 17px; height: 17px; flex-shrink: 0; margin: 0; accent-color: var(--accent); }
.field { width: 100%; min-height: 56px; border: 1px solid rgba(191,226,242,.2); border-radius: 14px; background: rgba(4,11,22,.32); padding: 16px; color: var(--ink); font-size: 16px; }
textarea.field { resize: vertical; min-height: 155px; line-height: 1.6; }
.scale { display: grid; grid-template-columns: repeat(6,1fr); gap: 8px; }
.scale-option { position: relative; }
.scale-option input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.scale-option span { display: grid; place-items: center; min-height: 48px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.025); }
.scale-option input:checked + span { background: linear-gradient(135deg,rgba(234,194,138,.25),rgba(234,194,138,.1)); color: var(--accent); border-color: var(--accent); }
.scale-option input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.scale-labels { display: flex; justify-content: space-between; gap: 25px; font-size: 11px; color: var(--muted); margin: 5px 0 12px; }
.scale-labels span:last-child { text-align: right; }
.error { color: #ffb6a5; font-size: 13px; line-height: 1.5; margin-top: 20px; }
.navigation { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nav-back,.nav-next,.start-button,.secondary-button { min-height: 46px; padding: 12px 22px; border: 1px solid var(--line); border-radius: 13px; font-size: 13px; font-weight: 600; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.nav-back,.secondary-button { color: var(--ink); background: rgba(191,226,242,.045); box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.nav-back:disabled { opacity: .3; cursor: default; }
.nav-next,.start-button { color: #18212a; border-color: rgba(255,232,193,.5); background: linear-gradient(135deg,rgba(234,194,138,.95),rgba(201,153,97,.82)); box-shadow: 0 10px 28px rgba(234,194,138,.12),inset 0 1px 0 rgba(255,255,255,.5),inset 0 -1px 0 rgba(62,43,16,.2); }
.nav-next:hover,.start-button:hover { background: linear-gradient(135deg,#f5d5a7,#dcad77); }
.swipe-hint { font-size: 21px; color: #6e8a9c; }
.site-footer { display: flex; justify-content: space-between; gap: 16px; padding: 18px clamp(20px,5vw,72px); border-top: 1px solid rgba(191,226,242,.09); color: #7893a6; font-size: 10px; }
.site-footer span:first-child { color: var(--accent); font-weight: 700; letter-spacing: .12em; }
.welcome { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; min-height: 380px; }
.welcome-symbol { display: grid; place-items: center; width: 55px; height: 55px; border-radius: 17px; border: 1px solid rgba(234,194,138,.28); background: linear-gradient(145deg,rgba(234,194,138,.15),rgba(234,194,138,.03)); color: var(--accent); font-size: 27px; margin: 4px 0 28px; box-shadow: inset 0 1px 0 rgba(255,255,255,.14); }
.start-button { width: 100%; margin-top: 18px; }
.welcome .start-button { max-width: 280px; }
.local-note { color: var(--muted); font-size: 10px; line-height: 1.6; text-align: center; margin: 16px 0 0; }
.question-card.review { max-height: none; }
.review-preview > h3 { font-size: 12px; color: var(--accent); margin: 28px 0 4px; }
.review-item { padding: 18px 0; border-bottom: 1px solid var(--line); }
.review-item h3 { font-size: 13px; font-weight: 500; margin: 0 0 8px; }
.review-item p { font-size: 13px; color: var(--muted); line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.review-item button { border: 0; background: none; color: var(--accent); font-size: 12px; padding: 10px 0; }
.review-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 22px; }
.review-actions button { width: 100%; margin: 0; padding: 12px 10px; }
.transfer-panel { margin-top: 24px; padding: 18px; border: 1px solid rgba(234,194,138,.3); border-radius: 16px; background: linear-gradient(135deg,rgba(234,194,138,.08),rgba(191,226,242,.035)); }
.transfer-title { margin: 0 0 14px; font-size: 13px; font-weight: 600; color: #f5d291; }
.transfer-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.data-export,.data-share { display: block; width: 100%; min-height: 48px; padding: 12px 10px; border: 1px solid rgba(234,194,138,.5); border-radius: 12px; background: rgba(234,194,138,.1); color: #f5d291; font-size: 12px; font-weight: 600; }
.data-share { background: linear-gradient(135deg,rgba(234,194,138,.24),rgba(234,194,138,.1)); }
.data-share:hover { background: rgba(234,194,138,.28); }
.data-share:disabled { opacity: .5; cursor: wait; }
.data-export:hover { background: rgba(234,194,138,.17); }
.transfer-note { margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.print-summary { display: none; }
@media (min-width: 700px) { .answers:has(input[type=checkbox]) { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 600px) {
  .site-header { height: 68px; padding: 0 18px; }
  .module-wordmark strong { font-size: 10px; }
  .module-wordmark small,.header-back { font-size: 10px; }
  .header-back { max-width: 135px; text-align: right; line-height: 1.5; }
  .shell { width: calc(100% - 32px); padding: 24px 0 28px; }
  .question-card { min-height: 300px; max-height: calc(100dvh - 255px); padding: 24px 20px; border-radius: 22px; }
  .question-card h2 { font-size: 23px; }
  .card-top { margin-bottom: 22px; }
  .progress-head { font-size: 11px; }
  .welcome { min-height: 340px; }
  .site-footer { padding: 16px 18px; }
}
@media (max-height: 650px) { .question-card { min-height: 220px; }.shell { margin: 0 auto; } }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { animation: none !important; transition: none !important; } }
@media print {
  :root { color-scheme: light; background: white; }
  body { display: block; background: white; }
  body::before { display: none; }
  body > *:not(.print-summary) { display: none !important; }
  .print-summary { display: block !important; color: #111; background: white; font: 12pt Arial,sans-serif; }
  .print-summary h1 { font-size: 20pt; }
  .print-summary h2 { font-size: 14pt; margin-top: 25px; }
  .print-summary h3 { font-size: 11pt; }
  .print-summary p { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
  .print-summary article { break-inside: avoid; border-bottom: 1px solid #ddd; padding-bottom: 8px; }
  .print-summary button { display: none; }
  @page { size: A4; margin: 18mm; }
}
