/* CareerSketch — shared styles. Palette kept from the original: blue #3498db → teal #1abc9c, pink accent #db3498, deep blue #0066cc */
:root {
  --blue: #3498db;
  --teal: #1abc9c;
  --pink: #db3498;
  --deep: #0066cc;
  --grad: linear-gradient(135deg, #3498db 0%, #1abc9c 100%);
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --text: #14202e;
  --muted: #5b6878;
  --line: #dde3eb;
  --focus: #0066cc;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 32, 46, .06), 0 8px 24px rgba(20, 32, 46, .08);
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Bricolage Grotesque", "DM Sans", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d141d; --surface: #141d28; --surface-2: #1b2633; --text: #e8eef5; --muted: #9aa8b8; --line: #263445; --focus: #5fb4f0;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d141d; --surface: #141d28; --surface-2: #1b2633; --text: #e8eef5; --muted: #9aa8b8; --line: #263445; --focus: #5fb4f0;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35); color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--deep); }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 .5em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-family: var(--display); font-weight: 700; font-size: 1.15rem; letter-spacing: .02em; }
.brand img { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a { text-decoration: none; color: var(--muted); padding: 8px 12px; border-radius: 8px; font-weight: 500; }
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
@media (max-width: 640px) { .nav-links a:not(.btn) { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 10px; border: 1px solid transparent; font: 600 .95rem/1 var(--font); cursor: pointer; text-decoration: none; transition: transform .12s ease, background .12s ease, box-shadow .12s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--pink); color: #fff !important; box-shadow: 0 4px 14px rgba(219, 52, 152, .3); }
.btn-primary:hover { background: #c42b86; }
.btn-ghost { background: var(--surface); color: var(--text) !important; border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: .875rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }

/* Landing */
.hero { background: var(--grad); color: #fff; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; padding: 72px 0 80px; }
.hero h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); }
.hero p.lead { font-size: 1.15rem; max-width: 34ch; opacity: .95; margin: 0 0 28px; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .btn-ghost { background: rgba(255,255,255,.14); color: #fff !important; border-color: rgba(255,255,255,.4); }
.hero .btn-ghost:hover { background: rgba(255,255,255,.24); }
.hero-note { margin-top: 18px; font-size: .9rem; opacity: .9; }
.demo-card { background: #fff; color: #14202e; border-radius: 18px; padding: 20px 20px 12px; box-shadow: 0 24px 60px rgba(0, 40, 80, .28); transform: rotate(-1.2deg); }
.demo-card .who { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.demo-card .avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; color: #fff; font-weight: 700; }
.demo-card strong { display: block; font-family: var(--display); }
.demo-card small { color: #5b6878; }
.demo-chip { margin-left: auto; align-self: flex-start; padding: 5px 11px; border-radius: 999px; background: #f0f5fb; color: #0066cc; font: 600 .78rem var(--font); text-decoration: none; white-space: nowrap; }
.demo-chip:hover { background: #e2edf8; }
.demo-chart { height: 260px; }
.phone { position: relative; width: 240px; margin: 0; padding: 7px; border-radius: 30px; background: #0b1220; box-shadow: 0 24px 60px rgba(0, 40, 80, .35), inset 0 0 0 1.5px rgba(255,255,255,.12); transform: rotate(2deg); }
.phone::before { content: ""; position: absolute; top: 13px; left: 50%; width: 46px; height: 5px; margin-left: -23px; border-radius: 3px; background: rgba(255,255,255,.18); z-index: 1; }
.video-split { display: grid; grid-template-columns: 1fr 240px; gap: 48px; align-items: center; }
.video-split .phone { transform: rotate(-1.5deg); }
.block-sep { border-top: 1px solid var(--line); }
.phone video { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; border-radius: 23px; background: #0b1220; object-fit: cover; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; padding: 48px 0 56px; gap: 36px; } .demo-card { transform: none; } .phone video { border-radius: 20px; } .video-split { grid-template-columns: 1fr; } .video-split .phone { width: 56%; justify-self: center; } }

.manifesto { background: #0b1220; color: #e6f0ff; padding: 72px 0; }
.manifesto p { font-family: var(--display); font-weight: 700; font-size: clamp(1.9rem, 4.6vw, 3.4rem); line-height: 1.08; letter-spacing: -.02em; margin: 0 0 36px; max-width: 20ch; }
.manifesto em { font-style: normal; background: linear-gradient(90deg, #1abc9c, #3498db); -webkit-background-clip: text; background-clip: text; color: transparent; }
.manifesto ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 40px; }
.manifesto li { font-size: 1.15rem; font-weight: 600; padding: 16px 0; border-top: 1px solid rgba(255,255,255,.14); }
.manifesto li em { background: none; color: #ff7ac4; }
@media (max-width: 700px) { .manifesto { padding: 52px 0; } .manifesto ul { grid-template-columns: 1fr; gap: 0; } }
section.block { padding: 80px 0; }
section.block.alt { background: var(--surface); border-block: 1px solid var(--line); }
.eyebrow { color: var(--pink); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; margin-bottom: 8px; }
.block h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); max-width: 22ch; }
.block p.sub { color: var(--muted); max-width: 60ch; font-size: 1.05rem; margin: 0 0 40px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.alt .step { background: var(--bg); }
.step::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--grad); color: #fff; font-weight: 700; margin-bottom: 14px; }
.step h3 { font-size: 1.15rem; }
.step p { margin: 0; color: var(--muted); }
.faq { max-width: 780px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; font: 600 1.05rem/1.35 var(--display); color: var(--text); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--deep); font: 600 1.1rem/1 var(--font); }
.faq details[open] summary::after { content: "–"; }
.faq summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 6px; }
.faq details p { margin: -4px 0 18px; color: var(--muted); max-width: 64ch; }
.uses { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.use { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; }
.use-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--grad); color: #fff; margin-bottom: 14px; }
.use h3 { font-size: 1.15rem; margin: 0 0 6px; }
.use p { margin: 0 0 16px; color: var(--muted); }
.use-tag { margin-top: auto; align-self: flex-start; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--deep) 9%, transparent); color: var(--deep); font: 600 .8rem var(--font); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .use-tag { color: var(--focus); } }
@media (max-width: 1000px) { .uses { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .uses { grid-template-columns: 1fr; } }
.views { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.view { background: var(--bg); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; }
.views.three { grid-template-columns: repeat(3, 1fr); }
.view-chart { background: #fff; padding: 14px; height: 210px; }
.views.three .body h3 { margin: 0 0 6px; }
.views.three .body p { margin: 0; }
@media (max-width: 960px) { .views.three { grid-template-columns: 1fr; } .view-chart { height: 200px; } }
.view img { aspect-ratio: 16/10; object-fit: cover; background: #fff; }
.view .body { padding: 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.view .body p { color: var(--muted); margin: 0 0 8px; flex: 1; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.fact { padding: 4px 0; }
.fact h3 { font-size: 1.1rem; display: flex; align-items: center; gap: 10px; }
.fact h3 span { width: 10px; height: 10px; border-radius: 50%; background: var(--teal); flex: none; }
.fact p { color: var(--muted); margin: 0; }
@media (max-width: 860px) { .steps, .facts, .views { grid-template-columns: 1fr; } section.block { padding: 56px 0; } }

.contact { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: start; }
form.stack { display: grid; gap: 14px; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }

.cta-band { background: var(--grad); color: #fff; border-radius: 20px; padding: 40px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.cta-band h2 { margin: 0; }
footer.site { padding: 32px 0; color: var(--muted); font-size: .9rem; }
footer.site .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
footer.site a { color: var(--muted); }

/* Form controls */
label.field { display: grid; gap: 6px; font-weight: 600; font-size: .9rem; }
label.field .hint { font-weight: 400; color: var(--muted); font-size: .8rem; }
input[type="text"], input[type="email"], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font: 400 1rem var(--font);
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }

/* ===== App ===== */
.app { display: grid; grid-template-columns: 400px 1fr; gap: 24px; padding: 24px 0 48px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.editor { padding: 20px; display: grid; gap: 22px; }
.editor h2 { font-size: 1.05rem; margin: 0; }
.group { display: grid; gap: 12px; }
.group-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); padding: 4px; border-radius: 12px; gap: 4px; }
.tabs button { min-height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: 600 .92rem var(--font); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.moods { display: flex; gap: 6px; }
.moods button { flex: 1; min-height: 44px; font-size: 1.35rem; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; cursor: pointer; filter: grayscale(.7); opacity: .7; }
.moods button[aria-pressed="true"] { filter: none; opacity: 1; border-color: var(--pink); box-shadow: 0 0 0 2px color-mix(in srgb, var(--pink) 30%, transparent); }
input[type="range"] { width: 100%; accent-color: var(--pink); min-height: 32px; }
.photo { display: flex; align-items: center; gap: 12px; }
.photo .thumb { width: 48px; height: 48px; border-radius: 50%; background: var(--surface-2) center/cover; border: 1px solid var(--line); flex: none; }
.items { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.items li { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.items li.editing { border-color: var(--pink); }
.items .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.items .txt { flex: 1; min-width: 0; }
.items .txt b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.items .txt small { color: var(--muted); }
.icon-btn { width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.empty { color: var(--muted); font-size: .9rem; padding: 12px; border: 1px dashed var(--line); border-radius: 10px; text-align: center; }
.alert { color: #b0206f; font-size: .875rem; min-height: 1.2em; margin: 0; }
:root[data-theme="dark"] .alert { color: #ff7ac4; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { min-height: 36px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 500 .875rem var(--font); cursor: pointer; }
.chips button[aria-pressed="true"] { background: var(--text); color: var(--surface); border-color: var(--text); }
.text-btn { background: none; border: 0; color: var(--muted); font: 500 .85rem var(--font); cursor: pointer; text-decoration: underline; padding: 6px 0; min-height: 32px; }
.text-btn:hover { color: var(--text); }
.text-btn.danger { color: #b0206f; }

.stage { position: sticky; top: 88px; display: grid; gap: 14px; }
.stage-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.stage-bar .actions { display: flex; gap: 8px; position: relative; }
.preview { padding: 20px; display: grid; place-items: center; background: repeating-conic-gradient(var(--surface-2) 0% 25%, transparent 0% 50%) 0 0/20px 20px; }
.share-menu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; display: grid; min-width: 180px; z-index: 5; }
.share-menu[hidden] { display: none; }
.share-menu button { text-align: left; min-height: 40px; padding: 8px 12px; border: 0; background: none; border-radius: 8px; color: var(--text); font: 500 .92rem var(--font); cursor: pointer; }
.share-menu button:hover { background: var(--surface-2); }
.share-menu p { margin: 4px 12px 6px; font-size: .78rem; color: var(--muted); }

/* The exported card */

.card { container-type: inline-size; --c-bg: #ffffff; --c-text: #14202e; --c-muted: #5b6878; --c-accent: #0066cc;
  width: 100%; max-width: 900px; aspect-ratio: 16 / 9; background: var(--c-bg); color: var(--c-text); border-radius: 16px; padding: 4% 4.5% 2.5%; display: flex; flex-direction: column; box-shadow: 0 12px 40px rgba(20,32,46,.18); overflow: hidden; font-family: var(--font); }
.card.r-square { aspect-ratio: 1 / 1; max-width: 640px; }
.card.r-portrait { aspect-ratio: 4 / 5; max-width: 560px; }
.card-head { display: flex; align-items: center; gap: 14px; }
.card-head .pic { width: 56px; height: 56px; border-radius: 50%; background: var(--grad) center/cover; flex: none; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 1.2rem; }
.card-head .pic.has-img { color: transparent; }
.card-head .name { font-family: var(--display); font-weight: 700; font-size: 1.3rem; line-height: 1.15; }
.card-head .role { color: var(--c-muted); font-size: .92rem; }
.card-title { margin: 14px 0 0; font-family: var(--display); font-weight: 700; font-size: 1.05rem; color: var(--c-accent); }
.card-chart { position: relative; flex: 1; min-height: 0; margin-top: 8px; }
.card-foot { display: flex; justify-content: space-between; align-items: center; font-size: .72rem; color: var(--c-muted); padding-top: 6px; }
.card-foot .mk { display: flex; align-items: center; gap: 6px; }
.card-foot .mk i { width: 10px; height: 10px; border-radius: 3px; background: var(--grad); display: inline-block; }
.card.t-creative { --c-bg: linear-gradient(160deg, #ffffff 0%, #eaf6fd 55%, #e3f8f2 100%); --c-accent: #db3498; background: linear-gradient(160deg, #ffffff 0%, #eaf6fd 55%, #e3f8f2 100%); }
.card.t-creative .card-title { font-size: 1.35rem; }
.card.t-tech { --c-bg: #0b1220; --c-text: #e6f0ff; --c-muted: #8aa0bd; --c-accent: #39ff14; background: #0b1220; font-family: "JetBrains Mono", ui-monospace, monospace; }
.card.t-tech .card-head .name, .card.t-tech .card-title { font-family: "JetBrains Mono", ui-monospace, monospace; letter-spacing: -.01em; }
@container (max-width: 480px) { .card-chart { min-height: 240px; } .card-head .pic { width: 40px; height: 40px; font-size: 1rem; } .card-head .name { font-size: 1.05rem; } .card-head .role { font-size: .8rem; } .card-title { font-size: .92rem; margin-top: 8px; } }

@media (max-width: 600px) { #card-host .card { aspect-ratio: auto; } #card-host .card-chart { min-height: 240px; } }
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; padding-top: 16px; }
  .stage { position: static; order: -1; }
  .preview { padding: 12px; }
}
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: var(--surface); padding: 10px 16px; border-radius: 10px; font-size: .9rem; box-shadow: var(--shadow); z-index: 50; }
.toast[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* Import + pathways */
.import { display: grid; gap: 12px; padding: 18px; border-radius: 14px; background: linear-gradient(135deg, rgba(52,152,219,.10), rgba(26,188,156,.12)); border: 1px solid color-mix(in srgb, var(--teal) 35%, transparent); }
.import h2 { font-size: 1.1rem; margin-bottom: 4px; }
.import p { margin: 0; color: var(--muted); font-size: .92rem; }
.import-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.fine { font-size: .8rem; color: var(--muted); }
.hint-box summary { cursor: pointer; font-weight: 600; font-size: .88rem; min-height: 32px; display: flex; align-items: center; }
.hint-box p { font-size: .88rem; margin-top: 4px; }
.status { display: flex; align-items: center; gap: 10px; font-size: .9rem; padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.status.err { border-color: #e7a3c8; color: #b0206f; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--pink); animation: sp 0.8s linear infinite; flex: none; }
@keyframes sp { to { transform: rotate(360deg); } }
.confirm { display: grid; gap: 10px; padding: 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.confirm p { color: var(--text); }
.confirm .row { grid-template-columns: auto auto; justify-content: start; }
.badge { font-size: .7rem; font-weight: 700; letter-spacing: .06em; padding: 3px 8px; border-radius: 999px; background: var(--grad); color: #fff; }
.pw-list { display: grid; gap: 10px; }
.pw { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--bg); display: grid; gap: 8px; }
.pw[aria-current="true"] { border-color: var(--pink); box-shadow: 0 0 0 2px color-mix(in srgb, var(--pink) 25%, transparent); }
.pw h3 { font-size: 1rem; margin: 0; font-family: var(--display); }
.pw p { margin: 0; font-size: .88rem; color: var(--muted); }
.pw .steps-line { font-size: .85rem; font-weight: 600; color: var(--text); }
.pw .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.pw .tags span { font-size: .78rem; padding: 3px 9px; border-radius: 999px; border: 1px dashed var(--pink); color: var(--text); }
.pw .first { font-size: .85rem; color: var(--text); }

/* LinkedIn banner format: keep the left side clear for the profile photo */
.card.r-banner { aspect-ratio: 4 / 1; max-width: 900px; padding: 2% 2.5% 1.2% 26%; position: relative; }
.card.r-banner .card-head { position: absolute; left: 3%; top: 12%; width: 21%; align-items: flex-start; }
.card.r-banner .card-head .pic, .card.r-banner .card-title { display: none; }
.card.r-banner .card-head .name { font-size: 1.15rem; }
.card.r-banner .card-head .role { font-size: .8rem; }
.card.r-banner .card-chart { margin-top: 0; }
.card.r-banner .card-foot { position: absolute; left: 3%; bottom: 8%; width: 21%; flex-direction: column; align-items: flex-start; gap: 2px; font-size: .62rem; }
.card.r-banner .card-foot > span:first-child { display: none; }
@media (max-width: 600px) { #card-host .card.r-banner { aspect-ratio: 4 / 1.6; padding-left: 30%; } #card-host .card.r-banner .card-chart { min-height: 0; } }
.post-panel { padding: 16px; display: grid; gap: 12px; }
.post-panel textarea { min-height: 200px; font-size: .95rem; line-height: 1.5; }
.cap-actions { display: flex; align-items: center; gap: 14px; }
.pulse { animation: pulse 1.4s ease-in-out 3; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(219, 52, 152, .25); } }
.card-foot .mk i { display: block; flex: none; }

#cs-consent { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--surface); color: var(--text); border-top: 1px solid var(--line); box-shadow: 0 -4px 18px rgba(20,32,46,.08); padding: 10px max(16px, calc((100vw - 1100px) / 2)); display: flex; align-items: center; gap: 8px 20px; flex-wrap: wrap; animation: cc-in .25s ease-out; }
#cs-consent p { margin: 0; font-size: .875rem; line-height: 1.4; flex: 1 1 360px; }
#cs-consent p a { color: inherit; }
#cs-consent .cc-gpc { color: var(--muted); }
.cc-btns { display: flex; gap: 8px; flex: none; }
.cc-btn { min-width: 112px; min-height: 40px; padding: 8px 16px; border-radius: 999px; font: 600 .9rem var(--font); cursor: pointer; border: 2px solid #0066cc; }
.cc-no { background: transparent; color: var(--text); border-color: var(--text); }
.cc-yes { background: #0066cc; color: #fff; }
.cc-btn:hover { filter: brightness(1.08); }
.cc-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
body:has(#cs-consent) .toast { bottom: 96px; }
@media (max-width: 600px) { body:has(#cs-consent) .toast { bottom: 170px; } }
@keyframes cc-in { from { transform: translateY(100%); } to { transform: none; } }
@media (max-width: 600px) { .cc-btns { width: 100%; } .cc-btn { flex: 1; } }
@media (prefers-reduced-motion: reduce) { #cs-consent { animation: none; } }
.legal { max-width: 760px; padding: 40px 0 64px; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.6rem); }
.legal h2 { font-size: 1.3rem; margin-top: 2em; }
.legal h3 { font-size: 1.02rem; margin: 1.4em 0 .3em; font-family: var(--font); letter-spacing: 0; }
.legal p, .legal li { color: var(--text); }
.legal li { margin-bottom: 6px; }

.items .txt small.why { display: block; font-style: italic; opacity: .85; white-space: normal; }

/* Story mode: template picker | preview | selected scene, with the scene strip along the bottom */
.story { position: fixed; inset: 0; z-index: 70; background: var(--bg); display: grid; grid-template-rows: auto minmax(0, 1fr); }
.story-top { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; padding: 10px 20px; border-bottom: 1px solid var(--line); background: var(--surface); }
.st-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.st-actions .icon-btn { font-size: 1.1rem; }
.story-body { display: grid; grid-template-columns: 196px minmax(0, 1fr) 320px; grid-template-rows: minmax(0, 1fr) auto; grid-template-areas: "tpl stage side" "strip strip strip"; min-height: 0; }
.story h3 { font-size: .95rem; margin: 0; }
.story h4 { font-size: .85rem; margin: 0; }
.story-tpl { grid-area: tpl; overflow-y: auto; padding: 16px; display: grid; gap: 10px; align-content: start; border-right: 1px solid var(--line); background: var(--surface); }
.tpl-card { display: grid; gap: 2px; text-align: left; padding: 10px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); color: var(--text); font: 400 .8rem var(--font); cursor: pointer; }
.tpl-card b { font-size: .9rem; }
.tpl-card span { color: var(--muted); }
.tpl-card[aria-pressed="true"] { border-color: var(--pink); }
.tpl-sw { display: block; height: 64px; border-radius: 8px; margin-bottom: 6px; }
.tpl-documentary { background: linear-gradient(180deg, rgba(9,13,22,0) 45%, rgba(9,13,22,.92) 62%), linear-gradient(135deg, #6a8caf, #c9a77c 60%, #3c5a78); position: relative; }
.tpl-documentary::after { content: ""; position: absolute; left: 8px; right: 30%; bottom: 10px; height: 6px; border-radius: 3px; background: #fff; box-shadow: 0 -11px 0 -1px #db3498; }
.tpl-list { display: grid; gap: 10px; }
.st-music { margin-top: 8px; gap: 8px; }
.st-extras { margin-top: 8px; gap: 4px; }
.st-extras .check { font-size: .85rem; align-items: flex-start; }
.st-extras input:disabled + span { color: var(--muted); }
.tpl-shorts { background: radial-gradient(circle at 70% 30%, rgba(219,52,152,.55), transparent 60%), linear-gradient(160deg, #13294a, #0b1220); position: relative; }
.tpl-shorts::after { content: "13 years."; position: absolute; left: 8px; top: 22px; font: 800 1rem/1 var(--display); color: #fff; }
.tpl-scrapbook { background: radial-gradient(rgba(43,38,32,.12) 1.5px, transparent 1.6px) 0 0/10px 10px, #f4ede1; position: relative; overflow: hidden; }
.tpl-scrapbook::after { content: ""; position: absolute; left: 30%; top: 12px; width: 38px; height: 44px; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2), 46px 6px 0 -2px #fdf0b8; transform: rotate(-4deg); }
.tpl-bold { background: linear-gradient(120deg, #db3498 0 50%, #1abc9c 50%); position: relative; }
.tpl-bold::after { content: "Bold."; position: absolute; left: 8px; bottom: 8px; font: 800 1.3rem/1 var(--display); color: #fff; }
.tpl-minimal { background: linear-gradient(180deg, #ffffff, #eaf4fc); border: 1px solid var(--line); position: relative; overflow: hidden; }
.tpl-minimal::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 8px; height: 32px; background: linear-gradient(160deg, transparent 48%, #3498db 49%, #3498db 54%, transparent 55%); }
.story-stage { grid-area: stage; display: grid; grid-template-rows: minmax(0, 1fr) auto auto; justify-items: center; align-items: center; padding: 16px; min-height: 0; gap: 10px; }
.story-stage canvas { max-height: calc(100vh - 290px); max-width: 100%; width: auto; height: auto; border-radius: 12px; box-shadow: var(--shadow); background: #0b1220; }
.st-canvas { width: 100%; height: 100%; }
.st-canvas canvas { max-height: 100%; }
.story-play { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; }
#story-len.warn { color: #b0206f; }
.story-side { grid-area: side; overflow-y: auto; padding: 16px 18px; display: grid; gap: 16px; align-content: start; border-left: 1px solid var(--line); background: var(--surface); }
.ph-focus { position: relative; justify-self: start; touch-action: none; cursor: crosshair; border-radius: 10px; overflow: hidden; }
.ph-focus img { display: block; max-width: 100%; max-height: 240px; user-select: none; -webkit-user-drag: none; }
#ph-dot { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; border: 3px solid #fff; background: rgba(219,52,152,.55); box-shadow: 0 0 0 2px rgba(0,0,0,.35); pointer-events: none; }
.ph-row { display: flex; flex-wrap: wrap; gap: 8px; }
.ph-item { position: relative; }
.ph-item > button:first-child { padding: 0; border: 2px solid transparent; border-radius: 9px; background: none; cursor: pointer; display: block; }
.ph-item.on > button:first-child { border-color: var(--pink); }
.ph-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 7px; display: block; }
.ph-rm { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--text); color: var(--surface); font-size: .7rem; cursor: pointer; }
.ph-add { width: 68px; height: 68px; border-radius: 9px; border: 2px dashed var(--line); display: grid; place-items: center; text-align: center; font: 600 .72rem var(--font); color: var(--muted); cursor: pointer; padding: 4px; }
.ph-add.big { width: 100%; height: auto; min-height: 120px; gap: 4px; align-content: center; font: 500 .8rem var(--font); border-color: color-mix(in srgb, var(--pink) 55%, var(--line)); background: color-mix(in srgb, var(--pink) 5%, transparent); }
.ph-add.big b { font: 700 .95rem var(--display); color: var(--pink); }
.ph-add:hover, .ph-add:focus-within { border-color: var(--pink); color: var(--text); }
.ph-note { margin: 0; font-size: .8rem; font-weight: 600; color: var(--teal); }
.ph-note::before { content: "🔒 "; }
.story-bottom { grid-area: strip; display: grid; border-top: 1px solid var(--line); background: var(--surface); min-width: 0; }
.ph-call { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: color-mix(in srgb, var(--pink) 9%, var(--surface)); border-bottom: 1px solid var(--line); }
.ph-call b { font-family: var(--display); }
.ph-call .fine { display: block; }
.ph-count { font: 600 .8rem var(--font); color: var(--pink); margin-left: 4px; }
.ph-call .btn { flex: none; cursor: pointer; }
.st-canvas { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; max-width: 100%; }
.stage-add { position: absolute; display: grid; justify-items: center; gap: 2px; padding: 14px 22px; border-radius: 16px; background: rgba(255,255,255,.94); color: #14202e; border: 2px dashed var(--pink); box-shadow: 0 6px 24px rgba(0,0,0,.25); cursor: pointer; font: 500 .85rem var(--font); }
.stage-add b { font: 700 1.05rem var(--display); color: var(--pink); }
.stage-add:hover, .stage-add:focus-within { transform: scale(1.03); }
.story-strip { display: flex; gap: 10px; overflow-x: auto; padding: 12px 16px; }
.sc-card { position: relative; flex: none; border-radius: 12px; border: 2px dashed transparent; padding: 2px; }
.sc-card.drop { border-color: var(--pink); background: color-mix(in srgb, var(--pink) 10%, transparent); }
.sc-pick { display: grid; gap: 2px; justify-items: start; padding: 4px; border: 2px solid transparent; border-radius: 10px; background: none; cursor: pointer; color: var(--text); font: 600 .72rem var(--font); max-width: 140px; text-align: left; }
.sc-pick canvas { border-radius: 6px; box-shadow: 0 1px 4px rgba(0,0,0,.18); display: block; }
.sc-pick[aria-current="true"] { border-color: var(--pink); }
.sc-name { max-width: 128px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-meta { color: var(--muted); font-weight: 500; }
.sc-card.off canvas { opacity: .35; }
.sc-add { position: absolute; top: 2px; right: 2px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--pink); color: #fff; font: 700 1.1rem/1 var(--font); cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.sc-add.empty { width: auto; height: 28px; padding: 0 10px; border-radius: 999px; font-size: .78rem; top: 10px; right: 50%; transform: translateX(50%); white-space: nowrap; }
.sc-add:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.check { display: flex; align-items: center; gap: 8px; font-size: .9rem; min-height: 32px; }
@media (max-width: 960px) {
  .story { overflow-y: auto; display: block; }
  .story-top { position: sticky; top: 0; z-index: 2; padding: 8px 12px; }
  .story-body { display: flex; flex-direction: column; }
  .story-tpl { order: 0; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; }
  .story-tpl h3 { display: none; }
  .tpl-list { display: flex; overflow-x: auto; gap: 8px; }
  .st-music { margin-top: 2px; }
  .tpl-card { flex: 1 0 140px; grid-template-columns: 40px 1fr; column-gap: 8px; align-items: center; }
  .tpl-card .tpl-sw { grid-row: span 2; height: 40px; margin: 0; }
  .tpl-documentary::after, .tpl-minimal::after, .tpl-shorts::after, .tpl-scrapbook::after, .tpl-bold::after { display: none; }
  .story-stage { order: 1; padding: 12px; }
  .story-stage canvas { max-height: 62vh; }
  .story-bottom { order: 2; border-bottom: 1px solid var(--line); }
  .ph-call { flex-wrap: wrap; }
  .story-side { order: 3; border-left: 0; padding-bottom: 40px; }
}

.card-chart.locked canvas { opacity: .3; filter: grayscale(.4); }
.lock-msg { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 4px; padding: 16px; pointer-events: none; }
.lock-msg b { font-size: 1.05rem; }
.lock-msg span { font-size: .85rem; opacity: .75; }
#clear.armed { background: #b0206f; color: #fff !important; border-color: #b0206f; }
@media (max-width: 960px) { body.is-empty .stage { order: 1; } }

/* Story builder */
.builder { position: fixed; inset: 0; z-index: 75; background: rgba(13,20,29,.55); display: grid; place-items: center; padding: 16px; }
.b-panel { width: min(720px, 100%); max-height: calc(100vh - 32px); background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; }
.b-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.b-steps { display: flex; gap: 14px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); font-weight: 600; }
.b-steps .on { color: var(--pink); } .b-steps .done { color: var(--text); }
.b-head .icon-btn { margin-left: auto; }
.b-body { overflow-y: auto; padding: 20px 22px; display: grid; gap: 14px; align-content: start; }
.b-body h2 { font-size: 1.35rem; margin: 0; }
.b-body > .fine { margin: -6px 0 4px; }
.b-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); }
.b-angles button { min-height: 40px; }
.b-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.b-pick { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); cursor: pointer; }
.b-pick:has(input:checked) { border-color: var(--pink); background: color-mix(in srgb, var(--pink) 6%, var(--bg)); }
.b-pick input { width: 20px; height: 20px; accent-color: var(--pink); flex: none; }
.b-year { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 3ch; }
.b-txt { flex: 1; min-width: 0; display: grid; }
.b-txt small { color: var(--muted); }
.b-txt small.why { font-style: italic; font-size: .78rem; }
.b-mood { font-size: 1.2rem; }
.b-card { border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: grid; gap: 10px; background: var(--bg); }
.b-row { display: flex; align-items: center; gap: 10px; }
.b-row .b-name { font-weight: 700; }
.b-moods button { min-height: 40px; }
.b-caps button { text-align: left; }
.b-titles { display: grid; gap: 8px; }
@media (max-width: 600px) { .builder { padding: 0; } .b-panel { max-height: 100vh; height: 100vh; border-radius: 0; } }

.story-bar { display: grid; gap: 10px; padding: 14px 16px; border-radius: 14px; background: linear-gradient(135deg, rgba(52,152,219,.10), rgba(26,188,156,.12)); border: 1px solid color-mix(in srgb, var(--teal) 35%, transparent); }
.story-bar b { display: block; font-family: var(--display); font-size: 1.05rem; }
.sb-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.items li.form-host { display: block; padding: 12px; border-color: var(--pink); background: var(--surface); }
.items li.add-row { padding: 0; border: 1px dashed var(--line); background: none; }
.items li.add-row button { width: 100%; min-height: 44px; border: 0; background: none; color: var(--muted); font: 600 .92rem var(--font); cursor: pointer; border-radius: 10px; }
.items li.add-row button:hover { color: var(--text); background: var(--surface-2); }

.import .mini-line { display: none; margin: 0; }
.import.mini { padding: 10px 14px; }
.import.mini > * { display: none !important; }
.import.mini > .mini-line { display: block !important; }
.import.dragging { outline: 3px dashed var(--pink); outline-offset: -6px; background: color-mix(in srgb, var(--pink) 8%, var(--surface)); }
.drop-hint { margin: -4px 0 0; }
.li-help { display: grid; gap: 8px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: .9rem; }
.li-help ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
@media (hover: none) { .drop-hint { display: none; } }
