:root {
  color-scheme: light;
  --ink: #29232a;
  --muted: #756b75;
  --plum: #59355e;
  --plum-dark: #3e2344;
  --sage: #607b70;
  --cream: #f7f1e8;
  --paper: rgba(255, 253, 248, 0.94);
  --rose: #d69da5;
  --gold: #c69d54;
  --border: rgba(73, 50, 72, 0.15);
  --shadow: 0 24px 70px rgba(69, 44, 64, 0.13);
  --radius: 24px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--cream); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  background:
    radial-gradient(circle at 14% 8%, rgba(229, 186, 190, 0.28), transparent 32rem),
    radial-gradient(circle at 90% 80%, rgba(108, 143, 126, 0.17), transparent 30rem),
    #f7f1e8;
}
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

.ambient { position: fixed; z-index: -1; border-radius: 50%; filter: blur(2px); pointer-events: none; }
.ambient-one { width: 24rem; height: 24rem; top: 14%; left: -13rem; background: rgba(217, 164, 173, 0.14); }
.ambient-two { width: 28rem; height: 28rem; right: -15rem; bottom: 8%; background: rgba(91, 126, 111, 0.1); }

.topbar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 40px));
  min-height: 82px;
  margin: 0 auto;
}
.brand { display: inline-flex; align-items: center; gap: 11px; border: 0; background: transparent; cursor: pointer; font-weight: 750; letter-spacing: -0.02em; }
.brand-mark { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; color: #fff; background: var(--plum); font-family: var(--serif); font-size: 1.25rem; font-style: italic; box-shadow: 0 8px 24px rgba(76, 45, 80, 0.2); }
.save-status { min-width: 170px; color: var(--sage); font-size: 0.8rem; font-weight: 700; text-align: right; }

main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 44px 0 96px; }
.paper-card { border: 1px solid rgba(255,255,255,.75); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); backdrop-filter: blur(10px); }
.eyebrow, .section-kicker { margin: 0 0 14px; color: var(--plum); font-size: 0.72rem; font-weight: 850; letter-spacing: 0.16em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.035em; }
h1 em, h2 em { color: var(--plum); font-weight: 400; }

.loading-card { display: grid; min-height: 260px; place-items: center; align-content: center; gap: 16px; max-width: 520px; margin: 10vh auto; }
.loading-card p { color: var(--muted); }
.loader { width: 34px; height: 34px; border: 3px solid rgba(89,53,94,.16); border-top-color: var(--plum); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.landing-screen { display: grid; grid-template-columns: 1.02fr .98fr; gap: clamp(42px, 7vw, 92px); align-items: center; min-height: calc(100vh - 210px); }
.hero-copy h1 { max-width: 720px; margin-bottom: 26px; font-size: clamp(3.1rem, 6.4vw, 6rem); line-height: .92; }
.hero-lede { max-width: 610px; color: #5d535c; font-size: 1.12rem; line-height: 1.75; }
.privacy-callout { display: flex; gap: 12px; max-width: 570px; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--border); color: var(--muted); font-size: .85rem; line-height: 1.55; }
.privacy-callout span { color: var(--sage); font-size: .65rem; padding-top: 4px; }
.privacy-callout p { margin: 0; }

.start-card { padding: clamp(24px, 4vw, 42px); }
.card-kicker { display: flex; justify-content: space-between; margin-bottom: 20px; color: var(--muted); font-size: .75rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.start-card h2 { margin-bottom: 26px; font-size: 2.1rem; }
.phase-list { display: grid; gap: 7px; margin-bottom: 25px; }
.phase-card { display: grid; grid-template-columns: 34px 1fr auto; gap: 14px; align-items: start; padding: 13px 0; border-bottom: 1px solid var(--border); }
.phase-number { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; color: var(--plum); background: rgba(89,53,94,.08); font-size: .7rem; font-weight: 800; }
.phase-card h3 { margin: 1px 0 3px; font-size: .92rem; }
.phase-card p { margin: 0; color: var(--muted); font-size: .73rem; line-height: 1.4; }
.phase-count { color: var(--sage); font-size: .7rem; font-weight: 800; }
.microcopy { margin: 14px 0 0; color: var(--muted); font-size: .72rem; text-align: center; }

.primary-button, .secondary-button, .text-button, .back-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 18px; min-height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 780; cursor: pointer; transition: transform .18s, box-shadow .18s, background .18s, opacity .18s;
}
.primary-button { border: 1px solid var(--plum); color: #fff; background: var(--plum); box-shadow: 0 12px 28px rgba(77,45,81,.2); }
.primary-button:hover:not(:disabled) { transform: translateY(-2px); background: var(--plum-dark); box-shadow: 0 16px 34px rgba(77,45,81,.26); }
.primary-button[data-incomplete="true"] { opacity: .56; box-shadow: 0 8px 18px rgba(77,45,81,.12); }
.primary-button[data-incomplete="true"]:hover { opacity: .78; }
.secondary-button { border: 1px solid var(--border); background: rgba(255,255,255,.62); }
.secondary-button:hover:not(:disabled) { transform: translateY(-1px); border-color: rgba(89,53,94,.3); }
.text-button, .back-link { min-height: auto; padding: 8px 0; border: 0; border-radius: 0; color: var(--muted); background: transparent; font-size: .8rem; }
.primary-button:disabled, .secondary-button:disabled { cursor: not-allowed; opacity: .38; box-shadow: none; }
.full-button { width: 100%; }

.phase-intro { display: grid; min-height: calc(100vh - 235px); place-items: center; align-content: center; max-width: 750px; margin: 0 auto; text-align: center; }
.phase-orbit { display: grid; width: 150px; height: 150px; margin: 8px auto 28px; place-items: center; border: 1px solid rgba(89,53,94,.18); border-radius: 50%; color: var(--plum); background: radial-gradient(circle, rgba(255,255,255,.8), rgba(221,183,192,.18)); font-family: var(--serif); font-size: 3.4rem; font-style: italic; box-shadow: 0 26px 60px rgba(89,53,94,.1); }
.phase-intro h1 { margin-bottom: 15px; font-size: clamp(3rem, 7vw, 5.5rem); }
.phase-intro > p:not(.eyebrow) { max-width: 600px; color: var(--muted); font-size: 1.1rem; line-height: 1.7; }
.phase-meta { display: flex; gap: 25px; margin: 10px 0 32px; color: var(--sage); font-size: .78rem; font-weight: 800; text-transform: uppercase; }

.questionnaire-screen { width: min(100%, 980px); margin: 0 auto; }
.question-topline { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; color: var(--muted); font-size: .74rem; font-weight: 750; }
.question-topline p { margin: 0; }
.question-topline p:last-child { text-align: right; }
.progress-track { height: 4px; margin: 18px 0 56px; overflow: hidden; border-radius: 4px; background: rgba(89,53,94,.1); }
.progress-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--plum), var(--rose)); transition: width .3s ease; }
.question-heading { max-width: 820px; margin-bottom: 32px; }
.question-level { margin-bottom: 14px; color: var(--sage); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.question-level span { color: var(--plum); }
.question-heading h1 { margin-bottom: 14px; font-size: clamp(2.25rem, 5vw, 4.35rem); line-height: 1.02; }
.question-heading p { max-width: 720px; color: var(--muted); line-height: 1.65; }
.question-input { min-height: 240px; }
.question-error { max-width: 760px; margin: 22px 0 0; padding: 12px 15px; border: 1px solid rgba(166,59,69,.25); border-radius: 13px; color: #8f3039; background: rgba(255,244,243,.8); font-size: .78rem; font-weight: 750; line-height: 1.5; }
.question-nav { display: flex; justify-content: space-between; gap: 20px; margin-top: 38px; padding-top: 24px; border-top: 1px solid var(--border); }

.likert-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 0; padding: 0; border: 0; }
.likert-option { cursor: pointer; }
.likert-option input { position: absolute; opacity: 0; pointer-events: none; }
.likert-option span { display: grid; min-height: 148px; place-items: center; align-content: center; gap: 12px; padding: 18px 10px; border: 1px solid var(--border); border-radius: 18px; background: rgba(255,253,248,.7); text-align: center; transition: .18s; }
.likert-option strong { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 50%; color: var(--plum); background: rgba(89,53,94,.08); font-family: var(--serif); font-size: 1.25rem; }
.likert-option small { max-width: 110px; color: var(--muted); line-height: 1.3; }
.likert-option input:checked + span { border-color: var(--plum); background: #fff; box-shadow: 0 14px 34px rgba(89,53,94,.12); transform: translateY(-4px); }
.likert-option input:checked + span strong { color: #fff; background: var(--plum); }
.likert-option input:focus-visible + span, .choice-card input:focus-visible + .choice-visual { outline: 3px solid rgba(89,53,94,.25); outline-offset: 3px; }

.rating-catalog { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.catalog-card { display: grid; grid-template-columns: 76px minmax(120px, 1fr) auto; gap: 14px; align-items: center; min-height: 100px; padding: 12px; border: 1px solid var(--border); border-radius: 18px; background: rgba(255,253,248,.76); }
.catalog-visual, .choice-visual { display: grid; width: 72px; height: 72px; place-items: center; overflow: hidden; border-radius: 14px; background: #f1ebe3; }
.catalog-card.has-real-image { grid-template-columns: 112px minmax(0,1fr); grid-template-rows: auto auto; min-height: 138px; }
.catalog-card.has-real-image .catalog-visual { grid-row: 1 / 3; width: 112px; height: 112px; }
.catalog-card.has-real-image .compact-rating { grid-column: 2; justify-content: start; }
.catalog-card.has-real-image .option-image, .choice-card.has-real-image .option-image { object-fit: contain; }
.catalog-copy { display: grid; gap: 5px; }
.catalog-copy strong { font-size: .87rem; line-height: 1.25; }
.catalog-copy small { color: var(--muted); font-size: .7rem; }
.compact-rating { display: grid; grid-template-columns: repeat(5, 28px); gap: 4px; justify-content: end; }
.rating-dot, .rating-na { display: grid; width: 28px; height: 28px; place-items: center; padding: 0; border: 1px solid var(--border); border-radius: 50%; color: var(--muted); background: #fff; font-size: .68rem; font-weight: 800; cursor: pointer; }
.rating-dot:hover, .rating-dot.selected { border-color: var(--plum); color: #fff; background: var(--plum); }
.rating-na { grid-column: 1 / -1; width: 100%; border-radius: 9px; font-size: .62rem; }
.rating-na.selected { border-color: var(--sage); color: #fff; background: var(--sage); }
.rating-dot:focus-visible, .rating-na:focus-visible { outline: 3px solid rgba(89,53,94,.25); outline-offset: 2px; }
.option-image, .visual-swatch { width: 100%; height: 100%; object-fit: cover; }
.visual-swatch { display: block; background: linear-gradient(135deg, var(--swatch-a) 0 48%, var(--swatch-b) 52% 100%); }
.visual-emoji { font-size: 2.3rem; filter: saturate(.8); }
.visual-fallback { font-family: var(--serif); font-size: 2rem; color: var(--plum); }
.visual-shape { position: relative; display: grid; width: 100%; height: 100%; place-items: center; background: linear-gradient(145deg, #faf7f0, #e9dfd4); }
.visual-shape i { display: block; width: 34px; height: 34px; border: 2px solid var(--plum); border-radius: 5px 50% 50%; transform: rotate(45deg); box-shadow: inset 0 0 0 5px rgba(89,53,94,.06); }
.visual-shape[data-shape="round"] i, .visual-shape[data-shape="pearl"] i, .visual-shape[data-shape="studs"] i { border-radius: 50%; transform: none; }
.visual-shape[data-shape="oval"] i { width: 29px; height: 43px; border-radius: 50%; transform: none; }
.visual-shape[data-shape="emerald"] i, .visual-shape[data-shape="radiant"] i { width: 29px; height: 43px; border-radius: 3px; transform: none; }
.visual-shape[data-shape="princess"] i, .visual-shape[data-shape="asscher"] i { border-radius: 3px; transform: rotate(45deg); }
.visual-shape[data-shape="marquise"] i { width: 28px; height: 48px; border-radius: 100% 0; transform: rotate(45deg); }
.visual-shape[data-shape="heart"] i { width: 33px; height: 33px; border: 0; background: var(--rose); transform: rotate(-45deg); border-radius: 50% 50% 0; box-shadow: none; }
.visual-shape[data-shape="heart"] i::before { content: ""; position: absolute; width: 33px; height: 33px; border-radius: 50%; background: var(--rose); transform: translate(16px, -1px); }
.visual-shape[data-shape*="scale_"] i { border-radius: 50%; transform: none; }
.visual-shape[data-shape="scale_tiny"] i { width: 10px; height: 10px; }
.visual-shape[data-shape="scale_delicate"] i { width: 18px; height: 18px; }
.visual-shape[data-shape="scale_balanced"] i { width: 28px; height: 28px; }
.visual-shape[data-shape="scale_noticeable"] i { width: 39px; height: 39px; }
.visual-shape[data-shape="scale_dramatic"] i { width: 53px; height: 53px; }

.choice-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.choice-card { position: relative; display: grid; gap: 12px; justify-items: center; min-height: 150px; padding: 14px; border: 1px solid var(--border); border-radius: 18px; background: rgba(255,253,248,.76); text-align: center; cursor: pointer; }
.choice-card input { position: absolute; opacity: 0; }
.choice-card:has(input:checked) { border-color: var(--plum); background: #fff; box-shadow: 0 13px 32px rgba(89,53,94,.11); }
.choice-card:has(input:checked)::after { content: "✓"; position: absolute; top: 9px; right: 9px; display: grid; width: 23px; height: 23px; place-items: center; border-radius: 50%; color: #fff; background: var(--plum); font-size: .7rem; }
.choice-card strong { font-size: .8rem; }
.choice-card.has-real-image { align-content: start; min-height: 220px; }
.choice-card.has-real-image .choice-visual { width: 100%; height: 145px; }
.choice-grid[data-question-id="g_surprise"] .choice-card strong { font-size: 1rem; line-height: 1.35; }

.missing-answer { border-color: #b84b55 !important; box-shadow: 0 0 0 3px rgba(184,75,85,.12), 0 14px 32px rgba(94,35,42,.08); }
.catalog-card.missing-answer { background: rgba(255,247,245,.94); }
.choice-grid.missing-answer { padding: 8px; border: 1px solid #b84b55; border-radius: 22px; }
.choice-grid.missing-answer .choice-card { border-color: rgba(184,75,85,.48); background: rgba(255,247,245,.78); }
.likert-grid.missing-answer { padding: 8px; border: 1px solid #b84b55; border-radius: 22px; background: rgba(255,247,245,.52); }

.tag-editor, .long-answer { max-width: 760px; }
.tag-list, .pill-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { padding: 9px 12px; border: 1px solid rgba(89,53,94,.18); border-radius: 999px; color: var(--plum); background: #fff; font-size: .75rem; cursor: pointer; }
.ranked-tag-list { display: grid; gap: 8px; }
.ranked-tag { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; gap: 11px; align-items: center; min-height: 52px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 15px; background: rgba(255,255,255,.74); }
.ranked-tag strong { overflow: hidden; font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.tag-rank { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; color: #fff; background: var(--plum); font-family: var(--serif); font-size: .85rem; }
.tag-actions { display: flex; gap: 4px; }
.tag-actions button { display: grid; width: 34px; height: 34px; place-items: center; padding: 0; border: 1px solid var(--border); border-radius: 10px; color: var(--plum); background: #fff; cursor: pointer; }
.tag-actions button:hover:not(:disabled), .tag-actions button:focus-visible { border-color: var(--plum); background: rgba(89,53,94,.06); }
.tag-actions button:disabled { cursor: not-allowed; opacity: .28; }
.tag-input-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin: 20px 0 8px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; max-width: 820px; }
.field { display: grid; gap: 8px; color: var(--muted); font-size: .75rem; font-weight: 750; }
.field input, .field textarea, .tag-input-row input { width: 100%; border: 1px solid var(--border); border-radius: 14px; outline: none; color: var(--ink); background: rgba(255,255,255,.82); }
.field input, .tag-input-row input { height: 52px; padding: 0 15px; }
.field textarea { min-height: 170px; padding: 15px; resize: vertical; line-height: 1.55; }
.field input:focus, .field textarea:focus, .tag-input-row input:focus { border-color: var(--plum); box-shadow: 0 0 0 3px rgba(89,53,94,.08); }
.chip-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.choice-chip input { position: absolute; opacity: 0; }
.choice-chip span { display: inline-flex; padding: 9px 13px; border: 1px solid var(--border); border-radius: 999px; background: rgba(255,255,255,.7); font-size: .75rem; cursor: pointer; }
.choice-chip input:checked + span { border-color: var(--sage); color: #fff; background: var(--sage); }

.results-screen { width: min(100%, 1080px); margin: 0 auto; }
.result-hero { position: relative; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: clamp(28px, 6vw, 80px); align-items: center; min-height: 435px; padding: clamp(34px, 6vw, 70px); overflow: hidden; isolation: isolate; background: linear-gradient(135deg, rgba(255,253,248,.98), rgba(249,238,231,.94)); }
.result-hero::before { content: ""; position: absolute; z-index: -1; width: 330px; height: 330px; right: -115px; bottom: -155px; border: 1px solid rgba(89,53,94,.1); border-radius: 50%; box-shadow: 0 0 0 42px rgba(214,157,165,.06), 0 0 0 88px rgba(96,123,112,.04); }
.result-hero h1 { max-width: 760px; margin-bottom: 22px; font-size: clamp(3rem, 6vw, 5.25rem); line-height: .94; }
.result-hero-copy > p:not(.eyebrow) { max-width: 670px; margin-bottom: 25px; color: var(--muted); font-size: 1rem; line-height: 1.7; }
.completion-badge { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 34px; padding: 8px 13px 8px 8px; border-radius: 999px; color: #3e6658; background: rgba(96,123,112,.1); font-size: .7rem; font-weight: 800; letter-spacing: .02em; }
.completion-badge span { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; color: #fff; background: var(--sage); font-size: .68rem; }
.result-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--sage); font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.result-seal { display: grid; width: clamp(135px, 17vw, 190px); aspect-ratio: 1; place-items: center; align-content: center; border: 1px solid rgba(89,53,94,.15); border-radius: 50%; color: var(--plum); background: radial-gradient(circle at 35% 25%, #fff, rgba(214,157,165,.14)); box-shadow: 0 24px 60px rgba(89,53,94,.12), inset 0 0 0 10px rgba(255,255,255,.58); transform: rotate(4deg); }
.result-seal span { height: 54px; font-family: var(--serif); font-size: 4rem; line-height: .8; }
.result-seal small { font-family: var(--serif); font-size: .78rem; font-style: italic; line-height: 1.15; text-align: center; }

.export-panel { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 18px 36px; align-items: center; margin-top: 16px; padding: clamp(24px, 4vw, 38px); background: rgba(255,253,248,.78); box-shadow: 0 16px 45px rgba(69,44,64,.08); }
.export-panel h2 { margin-bottom: 8px; font-size: 2rem; }
.export-panel > div:first-child > p:last-child { max-width: 610px; margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.6; }
.export-actions { display: grid; grid-template-columns: auto auto; gap: 8px; align-items: center; }
.export-primary { grid-row: span 2; min-height: 54px; }
.export-secondary { min-height: 44px; font-size: .78rem; }
.technical-export { justify-self: end; padding: 2px 0; font-size: .67rem; text-decoration: underline; text-decoration-color: rgba(117,107,117,.28); text-underline-offset: 3px; }
.privacy-reminder { display: flex; grid-column: 1 / -1; gap: 8px; margin: 0; padding-top: 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: .68rem; line-height: 1.55; }
.privacy-reminder span { flex: none; padding-top: 3px; color: var(--sage); font-size: .5rem; }
.print-hint { grid-column: 1 / -1; margin: -10px 0 0; color: var(--muted); font-size: .63rem; text-align: right; }

.result-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; margin-top: 16px; }
.result-card { padding: clamp(24px, 4vw, 38px); border: 1px solid var(--border); border-radius: 24px; background: rgba(255,253,248,.82); box-shadow: 0 18px 48px rgba(69,44,64,.065); }
.result-card.wide { grid-column: 1 / -1; }
.result-card h2 { margin: 0; font-size: clamp(1.8rem, 3vw, 2.5rem); }
.result-card-heading { display: flex; gap: 14px; align-items: center; margin-bottom: 20px; }
.result-card-heading .section-kicker { margin-bottom: 4px; }
.result-icon { display: grid; flex: none; width: 47px; height: 47px; place-items: center; border-radius: 15px; color: var(--plum); background: rgba(89,53,94,.08); font-family: var(--serif); font-size: 1.45rem; }
.card-intro { max-width: 690px; margin-bottom: 24px; color: var(--muted); font-size: .82rem; line-height: 1.6; }
.personality-card { background: linear-gradient(145deg, rgba(255,253,248,.93), rgba(245,237,241,.78)); }
.trait-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; }
.trait-card { display: grid; gap: 14px; min-width: 0; padding: 18px 15px; border: 1px solid rgba(89,53,94,.07); border-radius: 17px; background: rgba(255,255,255,.56); }
.trait-topline { display: grid; gap: 6px; }
.trait-topline > span { min-height: 32px; color: var(--muted); font-size: .69rem; font-weight: 750; line-height: 1.35; }
.trait-topline strong { font-family: var(--serif); font-size: 1.65rem; font-weight: 500; }
.trait-topline strong small { color: var(--muted); font-family: var(--sans); font-size: .56rem; }
.trait-meter { height: 7px; overflow: hidden; border-radius: 999px; background: rgba(89,53,94,.08); }
.trait-meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--plum), var(--rose)); }
.trait-card > small { color: var(--sage); font-size: .66rem; font-weight: 750; }
.method-note, .muted { color: var(--muted); font-size: .7rem; line-height: 1.55; }
.method-note { margin: 18px 0 0; }
.card-insight { min-height: 45px; margin-bottom: 20px; color: var(--muted); font-family: var(--serif); font-size: .91rem; font-style: italic; line-height: 1.45; }
.rank-list { display: grid; }
.rank-row { display: grid; grid-template-columns: 28px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.rank-row:last-child { border-bottom: 0; }
.rank-number { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 50%; color: var(--plum); background: rgba(89,53,94,.07); font-family: var(--serif); font-size: .76rem; }
.rank-content { display: grid; gap: 7px; min-width: 0; }
.rank-content strong { overflow: hidden; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.results-screen .score-track { height: 4px; overflow: hidden; border-radius: 5px; background: rgba(89,53,94,.08); }
.results-screen .score-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--sage), #8fa497); }
.rank-row > small { color: var(--plum); font-family: var(--serif); font-size: 1rem; }
.rank-row > small span { color: var(--muted); font-family: var(--sans); font-size: .55rem; }
.empty-result { margin: 0; color: var(--muted); font-size: .75rem; font-style: italic; }
.appreciation-card { background: linear-gradient(145deg, rgba(255,253,248,.9), rgba(249,235,237,.74)); }
.values-card { background: linear-gradient(145deg, rgba(255,253,248,.9), rgba(237,243,239,.78)); }
.highlight-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.highlight-grid article { min-width: 0; padding: 18px; border-radius: 18px; background: rgba(89,53,94,.045); }
.highlight-grid article:nth-child(2) { background: rgba(198,157,84,.085); }
.highlight-grid article:nth-child(3) { background: rgba(214,157,165,.11); }
.highlight-grid article:nth-child(4) { background: rgba(96,123,112,.09); }
.highlight-grid .section-kicker { margin: 12px 0 4px; font-size: .59rem; }
.highlight-grid h3 { min-height: 38px; margin-bottom: 15px; font-family: var(--serif); font-size: 1.06rem; font-weight: 500; line-height: 1.2; }
.highlight-symbol { display: block; width: 39px; height: 39px; border: 5px solid #e9c5c9; border-radius: 50%; background: #7c506e; box-shadow: inset 0 0 0 6px #f5ece8; }
.palette-symbol { border: 0; background: conic-gradient(var(--rose), #e2bf8f, var(--sage), var(--plum), var(--rose)); box-shadow: inset 0 0 0 9px rgba(255,255,255,.8); }
.style-symbol, .experience-symbol { display: grid; place-items: center; border: 1px solid rgba(89,53,94,.12); color: var(--plum); background: rgba(255,255,255,.7); box-shadow: none; font-family: var(--serif); font-size: 1.1rem; font-style: italic; }
.experience-symbol { color: var(--sage); }
.highlight-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.result-pill { display: inline-flex; max-width: 100%; align-items: center; gap: 6px; padding: 7px 9px; border-radius: 999px; color: var(--plum); background: rgba(255,255,255,.72); font-size: .67rem; font-weight: 750; line-height: 1.25; }
.result-pill i { width: 5px; height: 5px; flex: none; border-radius: 50%; background: var(--rose); }
.result-pill small { color: var(--muted); font-size: .55rem; }
.completion-note { display: flex; gap: 18px; align-items: center; max-width: 730px; margin: 36px auto 0; padding: 24px 28px; color: var(--muted); text-align: left; box-shadow: 0 14px 35px rgba(69,44,64,.06); }
.completion-note > span { flex: none; color: var(--rose); font-family: var(--serif); font-size: 2.6rem; }
.completion-note strong { display: block; margin-bottom: 5px; color: var(--ink); font-family: var(--serif); font-size: 1.08rem; font-weight: 500; }
.completion-note p { margin: 0; font-size: .75rem; line-height: 1.55; }
.print-footer { display: none; }
.error-screen { max-width: 650px; margin: 12vh auto; padding: 60px; text-align: center; }
.error-screen > span { color: var(--rose); font-size: 3rem; }
.error-screen h1 { font-size: 2.6rem; }
.error-screen p { color: var(--muted); }

.toast { position: fixed; z-index: 100; left: 50%; bottom: 28px; padding: 12px 18px; border-radius: 999px; color: #fff; background: var(--ink); box-shadow: 0 12px 34px rgba(0,0,0,.2); font-size: .78rem; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: .2s; }
.toast.visible { transform: translate(-50%, 0); opacity: 1; }

/* Admin */
.admin-body { background: #eef0ea; }
.admin-body .brand-mark { background: #17433d; }
.admin-shell { width: min(1120px, calc(100% - 40px)); }
.admin-login { max-width: 480px; margin: 10vh auto; padding: 42px; }
.admin-login h1 { font-size: 2.8rem; }
.admin-login > p:not(.eyebrow) { color: var(--muted); line-height: 1.55; }
.admin-login form { display: grid; gap: 18px; margin-top: 28px; }
.form-error { margin: 0; color: #9d3139; font-size: .78rem; }
.admin-heading { display: flex; justify-content: space-between; margin-bottom: 28px; }
.admin-heading h1 { margin-bottom: 8px; font-size: 3.4rem; }
.admin-heading p:last-child { color: var(--muted); }
.submission-list { display: grid; gap: 12px; }
.submission-card { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; width: 100%; padding: 18px; color: inherit; text-align: left; cursor: pointer; }
.submission-card:hover { transform: translateY(-2px); }
.profile-avatar { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 50%; color: #fff; background: #17433d; font-family: var(--serif); font-size: 1.3rem; }
.profile-avatar.large { width: 78px; height: 78px; font-size: 2rem; }
.submission-copy { display: grid; gap: 5px; }
.submission-copy small { color: var(--muted); }
.empty-state { padding: 50px; text-align: center; }
.empty-state p { color: var(--muted); }
.detail-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.admin-export-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.admin-export-note { max-width: 780px; margin: -8px 0 22px auto; color: var(--muted); font-size: .72rem; line-height: 1.55; text-align: right; }
.admin-print-cover { display: none; }
.admin-profile-hero { display: flex; gap: 20px; align-items: center; padding: 30px; }
.admin-profile-hero h1 { margin-bottom: 5px; font-size: 3rem; }
.admin-profile-hero p:last-child { margin: 0; color: var(--muted); font-size: .75rem; }
.private-brief { margin: 18px 0; padding: clamp(24px, 4vw, 42px); border-radius: 24px; color: #f9f5eb; background: #173f3b; box-shadow: 0 24px 60px rgba(19,59,54,.18); }
.private-brief .eyebrow { color: #afc9bd; }
.private-brief .result-pill { color: #f8f2e8; background: rgba(255,255,255,.1); }
.private-brief .muted { color: rgba(255,255,255,.55); }
.section-heading { display: flex; justify-content: space-between; align-items: start; gap: 20px; margin-bottom: 22px; }
.section-heading h2 { margin: 0; font-size: 2.4rem; }
.source-pill { padding: 7px 10px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; font-size: .65rem; }
.brief-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.brief-grid article { display: grid; gap: 10px; min-height: 105px; padding: 16px; border: 1px solid rgba(255,255,255,.11); border-radius: 16px; background: rgba(255,255,255,.04); }
.brief-grid article > span { color: #afc9bd; font-size: .68rem; font-weight: 800; text-transform: uppercase; }
.brief-note { margin-top: 13px; padding: 18px; border-radius: 16px; background: rgba(255,255,255,.06); }
.brief-note p { color: rgba(255,255,255,.76); white-space: pre-wrap; }
.dashboard-section { margin-top: 54px; }
.admin-result-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.admin-result-card { padding: 22px; border: 1px solid var(--border); border-radius: 18px; background: rgba(255,255,255,.55); }
.admin-result-card h3 { margin-bottom: 18px; }
.metric-row { display: grid; grid-template-columns: 1fr 80px 35px; gap: 8px; align-items: center; padding: 8px 0; font-size: .7rem; }
.score-track { height: 5px; overflow: hidden; border-radius: 5px; background: rgba(23,63,59,.1); }
.score-track i { display: block; height: 100%; background: #46776c; }
.answer-phase { margin-bottom: 10px; box-shadow: none; }
.answer-phase summary { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 20px; cursor: pointer; list-style: none; }
.answer-phase summary::-webkit-details-marker { display: none; }
.answer-phase summary > span { color: var(--gold); font-family: var(--serif); }
.answer-phase summary small { color: var(--muted); }
.answer-list { border-top: 1px solid var(--border); }
.answer-list article { display: grid; grid-template-columns: minmax(240px,.75fr) 1.25fr; gap: 25px; padding: 22px; border-bottom: 1px solid var(--border); }
.answer-list article:last-child { border-bottom: 0; }
.answer-list article > div:first-child > span { color: var(--sage); font-size: .65rem; font-weight: 800; text-transform: uppercase; }
.answer-list h3 { margin: 5px 0 0; font-size: .83rem; line-height: 1.5; }
.answer-list p { margin: 0; white-space: pre-wrap; }
.answer-list > article > div:last-child { display: grid; gap: 6px; }
.answer-list > article > div:last-child > small { color: var(--muted); }
.answer-rating-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; }
.answer-rating { display: flex; justify-content: space-between; gap: 10px; padding: 7px 9px; border-radius: 8px; background: rgba(89,53,94,.05); font-size: .68rem; }
.answer-rating.is-na { opacity: .55; }
.answer-rank { display: grid; width: 18px; height: 18px; place-items: center; border-radius: 50%; color: #fff; background: var(--sage); font-size: .58rem; }
.raw-answer-value { max-width: 100%; margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; font: .68rem/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; }
.field-answer-list { display: grid; gap: 7px; margin: 0; }
.field-answer-list div { display: flex; justify-content: space-between; gap: 12px; }
.field-answer-list dt { color: var(--muted); }
.field-answer-list dd { margin: 0; font-weight: 750; }

@media (max-width: 960px) {
  .landing-screen { grid-template-columns: 1fr; min-height: auto; }
  .hero-copy { padding-top: 25px; }
  .hero-copy h1 { font-size: clamp(3.2rem, 11vw, 5.3rem); }
  .rating-catalog { grid-template-columns: 1fr; }
  .choice-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .trait-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .highlight-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .export-panel { grid-template-columns: 1fr; }
  .export-actions { justify-content: start; }
  .admin-result-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .topbar, main, .admin-shell { width: min(100% - 24px, 1180px); }
  .topbar { min-height: 68px; }
  main { padding: 24px 0 68px; }
  .brand > span:last-child { font-size: .8rem; }
  .brand-mark { width: 34px; height: 34px; }
  .save-status { min-width: 100px; font-size: .68rem; }
  .hero-copy h1 { font-size: 3.15rem; }
  .hero-lede { font-size: 1rem; }
  .start-card { padding: 22px; }
  .phase-card { grid-template-columns: 32px 1fr; }
  .phase-count { grid-column: 2; }
  .question-topline { grid-template-columns: 1fr auto; }
  .question-topline p:nth-child(2) { display: none; }
  .progress-track { margin: 14px 0 38px; }
  .question-heading h1 { font-size: 2.45rem; }
  .likert-grid { grid-template-columns: 1fr; gap: 7px; }
  .likert-option span { grid-template-columns: 40px 1fr; min-height: 62px; justify-items: start; text-align: left; }
  .likert-option small { max-width: none; }
  .catalog-card { grid-template-columns: 60px 1fr; }
  .catalog-visual { width: 58px; height: 58px; }
  .catalog-card.has-real-image { grid-template-columns: 98px minmax(0,1fr); min-height: 124px; }
  .catalog-card.has-real-image .catalog-visual { width: 98px; height: 98px; }
  .catalog-card.has-real-image .compact-rating { grid-column: 1 / -1; }
  .compact-rating { grid-column: 1 / -1; grid-template-columns: repeat(5, 1fr); width: 100%; }
  .rating-dot { width: 100%; border-radius: 10px; }
  .choice-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .choice-card.has-real-image { min-height: 190px; }
  .choice-card.has-real-image .choice-visual { height: 120px; }
  .ranked-tag { grid-template-columns: 30px minmax(0,1fr); }
  .tag-actions { grid-column: 2; }
  .field-grid { grid-template-columns: 1fr; }
  .question-nav { position: sticky; z-index: 10; bottom: 0; margin-inline: -12px; padding: 15px 12px calc(15px + env(safe-area-inset-bottom)); background: rgba(247,241,232,.94); backdrop-filter: blur(10px); }
  .results-screen { width: 100%; }
  .result-hero { grid-template-columns: 1fr; min-height: 0; padding: 30px 24px 35px; }
  .result-hero h1 { max-width: 88%; font-size: clamp(2.8rem, 14vw, 4rem); }
  .result-hero-copy > p:not(.eyebrow) { font-size: .88rem; }
  .completion-badge { max-width: calc(100% - 70px); margin-bottom: 28px; }
  .result-seal { position: absolute; top: 23px; right: 20px; width: 62px; opacity: .72; box-shadow: none; }
  .result-seal span { height: auto; font-size: 2rem; line-height: 1; }
  .result-seal small { display: none; }
  .result-meta { display: grid; gap: 7px; }
  .export-panel { padding: 24px; }
  .export-actions { grid-template-columns: 1fr; width: 100%; }
  .export-primary { grid-row: auto; width: 100%; }
  .export-secondary { width: 100%; }
  .technical-export { justify-self: center; padding: 8px 0; }
  .print-hint { margin-top: -5px; text-align: center; }
  .trait-grid { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: 1fr; }
  .result-card.wide { grid-column: auto; }
  .result-card { padding: 24px 20px; }
  .result-card-heading { align-items: flex-start; }
  .result-icon { width: 42px; height: 42px; }
  .trait-card { grid-template-columns: minmax(0,1fr) 1.2fr auto; gap: 12px; align-items: center; padding: 14px; }
  .trait-topline { gap: 2px; }
  .trait-topline > span { min-height: 0; }
  .trait-topline strong { font-size: 1.32rem; }
  .trait-card > small { text-align: right; }
  .highlight-grid { grid-template-columns: 1fr; }
  .highlight-grid article { padding: 17px; }
  .highlight-grid h3 { min-height: 0; }
  .completion-note { align-items: flex-start; margin-top: 22px; padding: 21px; }
  .completion-note > span { font-size: 2rem; }
  .brief-grid { grid-template-columns: 1fr; }
  .section-heading h2 { font-size: 2rem; }
  .answer-list article { grid-template-columns: 1fr; }
  .answer-rating-grid { grid-template-columns: 1fr; }
  .admin-login { padding: 28px; }
  .admin-profile-hero { align-items: flex-start; }
  .admin-profile-hero h1 { font-size: 2.35rem; }
  .detail-actions { align-items: flex-start; }
  .admin-export-actions { width: min(100%, 330px); }
  .admin-export-actions > * { width: 100%; }
  .admin-export-note { margin-left: 0; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@page {
  size: A4;
  margin: 13mm 12mm 18mm;
  @bottom-center {
    content: "Mala mapa tebe · Strana " counter(page) " / " counter(pages);
    color: #756b75;
    font-family: Arial, sans-serif;
    font-size: 8pt;
  }
}

@media print {
  html, body { background: #fff !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .ambient, .topbar, .detail-actions, .text-button, .no-print { display: none !important; }
  main { width: 100%; padding: 0; }
  .paper-card, .private-brief { box-shadow: none; }
  .answer-phase { break-inside: avoid; }
  .results-screen { width: 100%; }
  .result-hero { grid-template-columns: minmax(0,1fr) auto; min-height: 245mm; padding: 21mm 16mm; border: 0; border-radius: 0; break-after: page; background: linear-gradient(135deg, #fffdf8, #f9eee7) !important; }
  .result-hero h1 { font-size: 21mm; }
  .result-hero-copy > p:not(.eyebrow) { max-width: 125mm; font-size: 10.5pt; }
  .result-seal { position: static; width: 42mm; opacity: 1; }
  .result-seal span { height: 13mm; font-size: 17mm; }
  .result-seal small { display: block; }
  .result-grid { display: block; margin: 0; }
  .result-card { margin: 0 0 5mm; padding: 8mm; border-radius: 5mm; box-shadow: none; break-inside: avoid; }
  .personality-card { margin-top: 0; }
  .trait-grid { grid-template-columns: repeat(5,minmax(0,1fr)); }
  .trait-card { display: grid; grid-template-columns: 1fr; gap: 3mm; padding: 4mm 3mm; }
  .trait-card > small { text-align: left; }
  .ranking-card { min-height: 0; }
  .highlights-card { break-before: page; }
  .highlight-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .highlight-grid article { min-height: 48mm; }
  .completion-note { margin-top: 6mm; box-shadow: none; break-inside: avoid; }
  .print-footer { position: fixed; right: 0; bottom: -11mm; left: 0; display: flex; justify-content: space-between; padding-top: 3mm; border-top: .2mm solid rgba(73,50,72,.18); color: #756b75; font-size: 8pt; }
  .print-page::after { content: counter(page); }

  .admin-body.is-printing-admin { color: #252126; background: #fff !important; }
  .admin-body.is-printing-admin .admin-shell { width: 100%; }
  .admin-body.is-printing-admin .admin-export-note,
  .admin-body.is-printing-admin .admin-profile-hero { display: none !important; }
  .admin-body.is-printing-admin .admin-print-cover { display: grid; min-height: 245mm; align-content: center; padding: 18mm; border: .35mm solid rgba(23,63,59,.18); border-radius: 7mm; break-after: page; background: linear-gradient(145deg, #f7fbf7, #f9f1e9) !important; }
  .admin-body.is-printing-admin .admin-print-cover .eyebrow { color: #46776c; font-size: 9pt; }
  .admin-body.is-printing-admin .admin-print-mark { display: grid; width: 27mm; height: 27mm; margin: 7mm 0 11mm; place-items: center; border-radius: 50%; color: #fff; background: #173f3b !important; font-family: Georgia, serif; font-size: 34pt; font-style: italic; }
  .admin-body.is-printing-admin .admin-print-cover h1 { max-width: 150mm; margin-bottom: 7mm; font-size: 29pt; line-height: 1.05; }
  .admin-body.is-printing-admin .admin-print-cover > p:not(.eyebrow) { max-width: 135mm; color: #5f585f; font-size: 11pt; line-height: 1.65; }
  .admin-body.is-printing-admin .admin-print-cover dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4mm 8mm; margin: 15mm 0 0; }
  .admin-body.is-printing-admin .admin-print-cover dl div { padding-top: 3mm; border-top: .25mm solid rgba(23,63,59,.18); }
  .admin-body.is-printing-admin .admin-print-cover dt { margin-bottom: 1.5mm; color: #607b70; font-size: 7pt; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
  .admin-body.is-printing-admin .admin-print-cover dd { margin: 0; font-size: 9pt; font-weight: 700; }
  .admin-body.is-printing-admin .private-brief { margin: 0; padding: 9mm; border-radius: 5mm; break-after: page; }
  .admin-body.is-printing-admin .private-brief .section-heading h2 { font-size: 21pt; }
  .admin-body.is-printing-admin .brief-grid article { min-height: 0; break-inside: avoid; }
  .admin-body.is-printing-admin .core-results-section { margin-top: 0; break-after: page; }
  .admin-body.is-printing-admin .core-results-section .section-heading h2 { font-size: 22pt; }
  .admin-body.is-printing-admin .admin-result-grid { grid-template-columns: 1fr; gap: 4mm; }
  .admin-body.is-printing-admin .admin-result-card { padding: 5mm; break-inside: avoid; }
  .admin-body.is-printing-admin .answers-section { margin-top: 0; }
  .admin-body.is-printing-admin .answers-section > .section-heading { display: none; }
  .admin-body.is-printing-admin .answer-phase { margin: 0; border: 0; border-radius: 0; break-before: page; break-inside: auto; }
  .admin-body.is-printing-admin .answer-phase summary { padding: 0 0 6mm; border-bottom: .5mm solid #173f3b; }
  .admin-body.is-printing-admin .answer-phase summary > span { font-size: 20pt; }
  .admin-body.is-printing-admin .answer-phase summary > strong { font-family: Georgia, serif; font-size: 18pt; }
  .admin-body.is-printing-admin .answer-list { border-top: 0; }
  .admin-body.is-printing-admin .answer-list article { grid-template-columns: minmax(52mm,.8fr) 1.2fr; gap: 6mm; padding: 4mm 0; break-inside: avoid; }
  .admin-body.is-printing-admin .answer-list h3 { font-size: 8.5pt; }
  .admin-body.is-printing-admin .answer-list > article > div:last-child { font-size: 8.5pt; }
  .admin-body.is-printing-admin .answer-rating-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .admin-body.is-printing-admin .answer-rating { padding: 2mm 2.5mm; font-size: 7pt; }
  .admin-body.is-printing-admin .result-pill { border: .2mm solid rgba(89,53,94,.12); background: #f7f3f6 !important; }
}
