/* Inkore Marketing Agent · light Inkore look with the sand accent. Built on ../shared/base.css tokens. */
body.marketing {
  --accent: #6b5534; --accent-hover: #58452a; --on-accent: #fff;
  --sand-deep: #6b5534; --sand-cream: #f4ecdc; --ink-dark: #203c43;
  --pass-bg: #dcefe4; --pass-ink: #2e6a4f; --warn-bg: #f5e9c8; --warn-ink: #7a5a12; --fail-bg: #f3e1de; --fail-ink: #8a3b36;
  --meta: #52636a;
  min-height: 100vh;
  background:
    radial-gradient(1100px 560px at 92% -12%, rgba(231, 220, 198, 0.85), transparent 62%),
    radial-gradient(900px 520px at -12% 28%, rgba(202, 219, 211, 0.38), transparent 60%),
    var(--page);
}
[hidden] { display: none !important; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; text-decoration: none; }
.skip:focus { top: 12px; }
.mono { font-family: var(--mono); font-size: 13px; }
textarea { resize: vertical; line-height: 1.45; }
input, textarea, select { background: #fff; border-color: rgba(57, 85, 91, 0.18); transition: border-color var(--fast), box-shadow var(--fast); }
input:hover, textarea:hover, select:hover { border-color: rgba(57, 85, 91, 0.32); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--sand-deep); box-shadow: 0 0 0 3px rgba(182, 161, 126, 0.32); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--fail-ink); box-shadow: 0 0 0 3px rgba(138, 59, 54, 0.14); }
:focus-visible { outline: 2px solid var(--sand-deep); outline-offset: 2px; }
button { transition: background var(--fast), border-color var(--fast), color var(--fast), transform var(--fast), box-shadow var(--fast); color: var(--ink); background: #fff; display: inline-flex; align-items: center; gap: 7px; font-weight: 550; font-size: 14px; }
button:hover:not(:disabled) { border-color: rgba(57, 85, 91, 0.3); }
button:active:not(:disabled) { transform: translateY(1px); }
button.primary { background: linear-gradient(180deg, #7a6240, #634e30); color: #fff; box-shadow: 0 8px 22px -12px rgba(99, 78, 48, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.18); }
button.primary:hover:not(:disabled) { background: linear-gradient(180deg, #846a46, #58452a); }
button.ghost { background: transparent; }
button.ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.6); }
.icon-btn { padding: .45em; border-radius: 12px; background: transparent; border-color: transparent; color: var(--muted); }
.icon-btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.75); color: var(--ink); border-color: var(--line); }
.icon-btn.small { padding: 6px; border-radius: 10px; }
.link-btn { background: none; border: none; padding: 4px 2px; color: var(--sand-deep); font-weight: 600; font-size: 13px; border-radius: 6px; }
.link-btn:hover:not(:disabled) { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.link-btn svg { transition: transform var(--fast); }
.link-btn:hover svg { transform: translateX(2px); }

/* ---------- header ---------- */
.app-header { position: sticky; top: 0; z-index: 30; background: rgba(236, 236, 231, 0.78); backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px); border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1480px; margin: 0 auto; padding: 12px 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brandmark { display: flex; align-items: center; gap: 11px; text-decoration: none; color: inherit; border-radius: 12px; }
.logo { display: grid; width: 34px; height: 34px; border-radius: 11px; box-shadow: 0 6px 16px -8px rgba(99, 78, 48, 0.8); overflow: hidden; }
.logo svg { width: 34px; height: 34px; }
.names { display: flex; flex-direction: column; line-height: 1.1; }
.kicker { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--sand-deep); font-weight: 650; }
.product { font-size: 17px; font-weight: 680; color: var(--ink); letter-spacing: -.01em; }
.header-tools { display: flex; align-items: center; gap: 10px; }
.mode-pill { padding: 7px 14px 7px 11px; font-size: 13px; background: rgba(255, 255, 255, 0.72); gap: 8px; white-space: nowrap; }
.mode-pill .short { display: none; }
.mode-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #b6a17e; box-shadow: 0 0 0 3px rgba(182, 161, 126, 0.25); }
.mode-pill.mode-own .dot { background: #3f8a6c; box-shadow: 0 0 0 3px rgba(63, 138, 108, 0.2); }
.mode-pill.mode-inkore .dot { background: #3a6682; box-shadow: 0 0 0 3px rgba(58, 102, 130, 0.2); }
.mode-k { color: var(--meta); font-weight: 600; }
.mode-v { color: var(--ink); font-weight: 650; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.6); border: 1px solid var(--line); }
.seg button { border: none; background: transparent; padding: 5px 11px; font-size: 12.5px; font-weight: 650; color: var(--meta); border-radius: 999px; }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.settings-btn { color: var(--ink); gap: 6px; padding: 7px 12px; border-radius: 999px; border-color: var(--line); background: rgba(255, 255, 255, 0.72); }
.settings-btn .lbl { font-size: 13.5px; }

/* ---------- banner ---------- */
.banner { max-width: 1424px; margin: 16px auto 0; padding: 12px 14px 12px 16px; display: flex; align-items: center; gap: 14px; border-radius: 18px;
  background: linear-gradient(90deg, rgba(239, 230, 211, 0.95), rgba(246, 241, 230, 0.9)); border: 1px solid rgba(182, 161, 126, 0.35); box-shadow: var(--shadow); }
.banner p { margin: 0; flex: 1; color: var(--ink); font-weight: 520; }
.banner-actions { display: flex; align-items: center; gap: 8px; }
.banner-actions button { font-size: 13.5px; padding: 7px 14px; }
.banner-actions .icon-btn { padding: 6px; }
#banner:empty { display: none; }
#banner { padding: 0 28px; }

/* ---------- layout ---------- */
.layout { max-width: 1480px; margin: 0 auto; padding: 22px 28px 40px; display: grid; grid-template-columns: minmax(340px, 410px) minmax(0, 1fr); gap: 24px; align-items: start; }
.card { border-radius: var(--r-md); background: var(--paper); }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 2px; }
.card-head h2 { margin: 0; font-size: 19px; letter-spacing: -.01em; }
.sub { margin: 4px 0 16px; color: var(--meta); font-size: 13.5px; }
.saved { margin-left: auto; font-size: 12px; color: var(--pass-ink); opacity: 0; transition: opacity var(--normal); font-weight: 600; }
.saved.on { opacity: 1; }

/* ---------- brand profile ---------- */
/* --banner-h is the demo banner's height (set by app.js): the card's bottom, with the sticky "Write my week" bar, stays on screen */
.profile-card { position: sticky; top: 82px; max-height: calc(100vh - 100px - var(--banner-h, 0px)); overflow: auto; padding: 22px 22px 0; scrollbar-width: thin; scroll-padding-bottom: 150px; }
#profile-title { outline: none; }
.field { margin: 0 0 14px; border: 0; padding: 0; min-width: 0; }
.field > label, .field > legend { display: block; font-size: 13px; font-weight: 650; color: var(--ink); margin-bottom: 6px; padding: 0; }
.hint { margin: 6px 0 0; font-size: 12.5px; color: var(--meta); line-height: 1.4; }
.field > label.remember { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; font-size: 13.5px; font-weight: 500; cursor: pointer; }
.remember input { width: 18px; height: 18px; margin: 0; padding: 0; flex: none; accent-color: var(--sand-deep); }
fieldset.field > .hint { margin: -2px 0 8px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row2 .field { margin-bottom: 14px; }
.toggles { display: flex; flex-wrap: wrap; gap: 7px; }
.toggle { position: relative; display: inline-flex; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.toggle span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(57, 85, 91, 0.18); background: #fff; font-size: 13px; font-weight: 560; color: var(--text); transition: all var(--fast); }
.toggle span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid rgba(57, 85, 91, 0.35); transition: all var(--fast); }
.toggle input:checked + span { background: #efe6d3; border-color: rgba(107, 85, 52, 0.45); color: #4f3f26; }
.toggle input:checked + span::before { background: var(--sand-deep); border-color: var(--sand-deep); }
.toggle input:focus-visible + span { outline: 2px solid var(--sand-deep); outline-offset: 2px; }
.pillar-list { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 7px; }
.pillar-list li { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 9px; }
.pdot { width: 10px; height: 10px; border-radius: 50%; }
.avoid-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.avoid-chips:empty { display: none; }
.avoid-chip { font-size: 12px; padding: 2px 9px; border-radius: 999px; background: var(--fail-bg); color: var(--fail-ink); text-decoration: line-through; text-decoration-color: rgba(138, 59, 54, 0.45); }
.generate { position: sticky; bottom: 0; margin: 6px -22px 0; padding: 16px 22px 20px; background: linear-gradient(to top, rgba(254, 254, 251, 1) 78%, rgba(254, 254, 251, 0)); border-radius: 0 0 var(--r-md) var(--r-md); }
button.big { width: 100%; justify-content: center; padding: 14px 18px; font-size: 15.5px; font-weight: 650; border-radius: 16px; letter-spacing: -.005em; }
button.big.loading svg { animation: spin 1.4s linear infinite; }
button.big.loading:disabled { opacity: .88; cursor: progress; }
#profile-form textarea { field-sizing: content; min-height: 4.8em; max-height: 15em; }
.gen-note { margin: 10px 2px 0; font-size: 12.5px; color: var(--meta); }
.gen-error { margin: 8px 2px 0; font-size: 13.5px; color: var(--fail-ink); font-weight: 560; scroll-margin: 110px 0 24px; outline: none; }
.gen-error:empty { display: none; }

/* pillar colours (5) */
.p0 { --pb: #efe6d3; --pi: #5f4c2e; --pd: #b6a17e; }
.p1 { --pb: #dbe8e2; --pi: #2f5d53; --pd: #87a69a; }
.p2 { --pb: #dde8ef; --pi: #325a72; --pd: #7497ae; }
.p3 { --pb: #e8e3ef; --pi: #584c6b; --pd: #a59cb8; }
.p4 { --pb: #efe3e0; --pi: #6c4746; --pd: #b39492; }
.pdot { background: var(--pd); }
.pillar { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--pb); color: var(--pi); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.pillar::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--pd); flex: none; }

/* ---------- pack ---------- */
.pack-area { min-width: 0; outline: none; scroll-margin-top: 76px; }
.pack-head { padding: 24px 26px 20px; margin-bottom: 16px; }
.pack-title-row { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.eyebrow { margin: 0 0 4px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--sand-deep); font-weight: 700; }
.pack-head h2 { font-size: clamp(22px, 2.2vw, 30px); letter-spacing: -.02em; margin: 0; outline: none; }
.by { margin: 6px 0 0; color: var(--meta); font-size: 13.5px; }
.notice { margin: 14px 0 0; padding: 10px 14px; border-radius: 14px; background: #f6f0e3; color: #5a4a33; font-size: 13.5px; border: 1px solid rgba(182, 161, 126, 0.35); }
.stats { list-style: none; margin: 20px 0 14px; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.stats li { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.stats .n { font-size: 26px; font-weight: 700; color: var(--ink); line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stats .k { font-size: 12.5px; color: var(--meta); font-weight: 560; }
.summary { display: flex; flex-wrap: wrap; gap: 8px; }
.sum { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 8px; border-radius: 999px; font-size: 13px; font-weight: 620; }
.sum svg { width: 18px; height: 18px; padding: 3px; border-radius: 50%; background: rgba(255, 255, 255, 0.7); stroke-width: 2.6; }
.sum.pass { background: var(--pass-bg); color: var(--pass-ink); }
.sum.warn { background: var(--warn-bg); color: var(--warn-ink); }
.sum.fail { background: var(--fail-bg); color: var(--fail-ink); }
.sum.zero { background: rgba(255, 255, 255, 0.6); color: var(--meta); border: 1px solid var(--line); }
.answer-checks { margin-top: 12px; }
.answer-checks summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--meta); width: fit-content; border-radius: 6px; }
.answer-checks summary:hover { color: var(--ink); }
.answer-checks .checks { margin-top: 10px; }
.pack-actions { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.exports { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.exports .lbl { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--meta); font-weight: 700; margin-right: 4px; }
.exports button { font-size: 13px; padding: 7px 13px; }
.pack-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pack-tools button { font-size: 13px; padding: 7px 13px; }
.history { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--meta); font-weight: 600; }
.history select { width: auto; max-width: 260px; font-size: 13px; padding: 6px 10px; border-radius: 999px; }

/* tabs */
.tabs { display: flex; gap: 4px; padding: 5px; border-radius: 999px; background: rgba(255, 255, 255, 0.55); border: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; width: fit-content; max-width: 100%; }
.tabs::-webkit-scrollbar { display: none; }
.tabs [role=tab] { border: none; background: transparent; border-radius: 999px; padding: 8px 15px; font-size: 14px; font-weight: 620; color: var(--meta); white-space: nowrap; position: relative; }
.tabs [role=tab]:hover { color: var(--ink); }
.tabs [role=tab][aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 4px 14px -8px rgba(36, 59, 66, 0.45); }
.tabs .count { font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: rgba(57, 85, 91, 0.08); color: var(--meta); font-variant-numeric: tabular-nums; }
.tabs [aria-selected="true"] .count { background: #efe6d3; color: #5f4c2e; }
.tab-dot { width: 7px; height: 7px; border-radius: 50%; position: absolute; top: 6px; right: 6px; }
.tab-dot.warn { background: #c89a2c; }
.tab-dot.fail { background: #b4524b; }
.panel { outline: none; }
.panel:focus-visible { outline: 2px solid var(--sand-deep); outline-offset: 4px; border-radius: 12px; }

/* checks */
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 580; padding: 3px 10px 3px 4px; border-radius: 999px; line-height: 1.35; }
.chk .ci { display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: rgba(255, 255, 255, 0.75); flex: none; }
.chk .ci svg { stroke-width: 2.8; }
.chk.pass { background: var(--pass-bg); color: var(--pass-ink); }
.chk.warn { background: var(--warn-bg); color: var(--warn-ink); }
.chk.fail { background: var(--fail-bg); color: var(--fail-ink); }
.checks.small .chk { font-size: 12px; }

/* week */
.week-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 2px 2px 12px; }
.week-head h3 { margin: 0; font-size: 16px; }
.week { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(208px, 1fr)); gap: 12px; }
.day { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 14px 15px 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.day-top { display: flex; align-items: baseline; gap: 8px; }
.wd { font-size: 13px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.dt { font-size: 13px; color: var(--meta); font-weight: 560; }
.time { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 650; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; font-variant-numeric: tabular-nums; }
.time svg { color: var(--meta); }
.day-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fmt { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 650; padding: 3px 9px; border-radius: 999px; background: var(--ink-dark); color: #fff; }
.fmt.carousel { background: #584c6b; }
.day-hook { margin: 0; color: var(--ink); font-weight: 620; font-size: 15px; line-height: 1.38; letter-spacing: -.005em; }
.plats { margin: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.plats span { font-size: 11.5px; font-weight: 600; color: var(--meta); padding: 1px 7px; border-radius: 6px; background: rgba(57, 85, 91, 0.06); }
.day-note { margin: 0; font-size: 12.5px; color: var(--meta); line-height: 1.4; }
.day-links { margin-top: auto; display: flex; flex-wrap: wrap; gap: 4px 12px; padding-top: 4px; border-top: 1px dashed var(--line); }

/* items */
.items { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.items > li, .item, .panel { min-width: 0; }
.item { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 16px 18px; box-shadow: var(--shadow); scroll-margin-top: 90px; }
.item.flash { animation: flash 1.6s var(--ease); }
.item-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 12px; }
.item-id { font: 700 12px/1 var(--mono); color: #5f4c2e; background: #efe6d3; padding: 5px 8px; border-radius: 8px; }
.item-title { margin: 0; font-size: 16px; outline: none; }
.when { font-size: 12.5px; color: var(--meta); font-weight: 560; }
.edited { font-size: 11.5px; font-weight: 650; color: var(--blue-ink); background: #dde8ef; padding: 2px 8px; border-radius: 999px; }
.item-actions { margin-left: auto; display: flex; gap: 2px; }
.item-checks { margin-top: 12px; }
.hook-text { margin: 0; font-size: 19px; font-weight: 640; color: var(--ink); line-height: 1.35; letter-spacing: -.012em; }
.hook-ref { margin: -2px 0 10px; font-size: 13px; color: var(--meta); }
.table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--line); background: #fff; }
.beats { width: 100%; border-collapse: collapse; font-size: 14px; }
.beats th { text-align: left; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--meta); font-weight: 700; padding: 10px 12px; background: rgba(233, 235, 234, 0.55); border-bottom: 1px solid var(--line); }
.beats td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.45; }
.beats tr:last-child td { border-bottom: none; }
.beats td.n { width: 34px; color: var(--meta); font: 700 12px/1.9 var(--mono); }
.beats td.say { color: var(--ink); width: 42%; }
.beats td.ost { width: 24%; }
.beats td.ost span { display: inline-block; background: var(--ink-dark); color: #fff; font-weight: 650; font-size: 13px; padding: 3px 8px; border-radius: 7px; line-height: 1.35; }
.beats td.shot { color: var(--meta); font-size: 13.5px; }
.post { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.post .first { margin: 0; color: var(--ink); font-weight: 650; font-size: 15.5px; line-height: 1.4; }
.post .cut { display: flex; align-items: center; gap: 10px; margin: 10px 0; font-size: 12px; color: var(--meta); }
.post .cut::after { content: ""; flex: 1; border-top: 1px dashed rgba(57, 85, 91, 0.25); order: 1; }
.post .cut span:first-child { font-weight: 700; color: var(--meta); }
.post .cut .cut-note { order: 2; }
.post .body { margin: 0; color: var(--text); line-height: 1.55; }
.post .tags { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.post .tags span { color: #325a72; font-weight: 620; font-size: 13.5px; }
.slides { list-style: none; margin: 0; padding: 2px 2px 8px; display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; border-radius: 12px; }
/* 4:5 by default, taller when the text needs it (never cut off) */
.slide { flex: 0 0 178px; min-height: 222px; scroll-snap-align: start; border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 6px; background: var(--sand-cream); color: #5a4a33; border: 1px solid rgba(182, 161, 126, 0.35); }
.slide .sn { font: 700 11px/1 var(--mono); opacity: .75; }
.slide .st { margin: 0; font-weight: 700; font-size: 14.5px; line-height: 1.3; color: #3d3222; }
.slide .sx { margin: 0; font-size: 13px; line-height: 1.42; }
.slide.cover { background: linear-gradient(160deg, #4a3c27, #2f261a); color: #f4ecdc; border-color: transparent; justify-content: space-between; }
.slide.cover .st { color: #fffdf8; font-size: 18px; letter-spacing: -.01em; }
.slide.last { background: #efe6d3; border-color: rgba(107, 85, 52, 0.45); }

/* edit */
.edit { display: grid; gap: 4px; }
.edit .field { margin-bottom: 8px; }
.beat-edit { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 10px; padding: 10px 12px 2px; border-radius: 14px; background: rgba(233, 235, 234, 0.5); margin-bottom: 8px; }
.carousels .beat-edit { grid-template-columns: 1fr 1.6fr; }
.edit-actions { display: flex; gap: 8px; margin-top: 6px; }

/* empty + busy */
.empty { padding: 34px 30px 30px; text-align: center; }
.empty h2 { font-size: 22px; margin: 18px 0 8px; outline: none; }
.empty p { max-width: 560px; margin: 0 auto 18px; color: var(--meta); }
.ghost-week { list-style: none; padding: 0; margin: 0 auto; max-width: 620px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.ghost-week li { aspect-ratio: 3 / 4; border-radius: 14px; border: 1.5px dashed rgba(182, 161, 126, 0.55); background: rgba(244, 236, 220, 0.45); display: flex; flex-direction: column; gap: 6px; padding: 10px 8px; }
.ghost-week li span { height: 6px; border-radius: 4px; background: rgba(182, 161, 126, 0.35); }
.ghost-week li span:nth-child(1) { width: 50%; } .ghost-week li span:nth-child(2) { width: 85%; } .ghost-week li span:nth-child(3) { width: 65%; }
.busy .progress { margin-top: 18px; height: 6px; border-radius: 999px; background: rgba(182, 161, 126, 0.22); overflow: hidden; }
.busy .progress span { display: block; height: 100%; width: 38%; border-radius: inherit; background: linear-gradient(90deg, #b6a17e, #6b5534); animation: indet 1.25s var(--ease) infinite; }
.skeleton .day { gap: 10px; }
.sk { display: block; height: 11px; border-radius: 6px; background: linear-gradient(90deg, #ece6da 0%, #f8f4ec 45%, #ece6da 90%); background-size: 220% 100%; animation: shimmer 1.3s linear infinite; animation-delay: calc(var(--i, 0) * 90ms); }
.sk.w40 { width: 40%; } .sk.w60 { width: 60%; } .sk.w70 { width: 70%; height: 16px; } .sk.w90 { width: 90%; height: 16px; }

/* entrance */
.pack-head.enter { animation: rise .55s var(--ease) both; }
.panel.enter .day, .panel.enter .items > li { animation: rise .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms + 120ms); }

/* dialogs */
dialog { border: none; padding: 0; border-radius: 26px; width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 48px); background: #fbfaf6; color: var(--text); box-shadow: 0 40px 90px -30px rgba(20, 36, 41, 0.55); }
dialog::backdrop { background: rgba(28, 44, 49, 0.38); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
dialog[open] { animation: pop .28s var(--ease); }
.dialog-inner { padding: 22px 24px 24px; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dialog-head h2 { margin: 0; font-size: 21px; }
.set-block { border: 0; padding: 16px 0 8px; margin: 0; box-shadow: inset 0 1px 0 var(--line); min-width: 0; }
.set-block:first-of-type { box-shadow: none; padding-top: 6px; }
.set-block legend { float: left; width: 100%; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--meta); font-weight: 700; padding: 0; margin-bottom: 10px; }
.set-block legend + * { clear: both; }
.seg.big { padding: 4px; }
.seg.big label { position: relative; }
.seg.big input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg.big span { display: inline-block; padding: 7px 16px; border-radius: 999px; font-weight: 620; font-size: 14px; color: var(--meta); }
.seg.big input:checked + span { background: var(--ink); color: #fff; }
.seg.big input:focus-visible + span { outline: 2px solid var(--sand-deep); outline-offset: 2px; }
.mode-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.mode-card { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 13px 14px; border-radius: 16px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; transition: border-color var(--fast), background var(--fast); }
.mode-card input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.mode-card.on { border-color: var(--sand-deep); background: #f8f2e6; }
.mode-card.off { cursor: not-allowed; background: rgba(255, 255, 255, 0.55); border-style: dashed; }
.mode-card.off input { cursor: not-allowed; }
.mode-card:has(input:focus-visible) { outline: 2px solid var(--sand-deep); outline-offset: 2px; }
.mc-title { font-weight: 680; color: var(--ink); font-size: 14.5px; }
.mc-desc { font-size: 12.5px; color: var(--meta); line-height: 1.4; }
.data-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.data-actions button, .file-btn span { font-size: 13px; padding: 7px 13px; }
.file-btn { position: relative; display: inline-flex; }
.file-btn span { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font-weight: 550; cursor: pointer; }
.file-btn:focus-within span { outline: 2px solid var(--sand-deep); outline-offset: 2px; }
.privacy { margin: 14px 0 0; font-size: 12.5px; color: var(--meta); }
.data-status { margin: 10px 2px 0; font-size: 13.5px; font-weight: 560; color: var(--pass-ink); }
.data-status.bad { color: var(--fail-ink); }
.data-status:empty { display: none; }

/* toast + footer */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 60; background: var(--ink-dark); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 560; box-shadow: 0 18px 40px -16px rgba(20, 36, 41, 0.6); transition: opacity var(--normal) var(--ease), transform var(--normal) var(--ease); max-width: calc(100vw - 32px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.app-footer { max-width: 1480px; margin: 0 auto; padding: 8px 28px 36px; text-align: center; font-size: 12.5px; color: var(--meta); }
.app-footer p { margin: 2px 0; }
.noscript { text-align: center; padding: 40px; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
@keyframes indet { 0% { transform: translateX(-110%); } 100% { transform: translateX(290%); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes flash { 0%, 100% { box-shadow: var(--shadow); } 25% { box-shadow: 0 0 0 4px rgba(182, 161, 126, 0.55), var(--shadow); } }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .profile-card { position: static; max-height: none; overflow: visible; }
  .generate { position: static; background: none; }
}
@media (max-width: 720px) {
  .header-inner { padding: 10px 16px; gap: 8px; }
  .kicker { display: none; }
  .product { font-size: 15.5px; }
  .logo, .logo svg { width: 30px; height: 30px; }
  .mode-k, .settings-btn .lbl { display: none; }
  .mode-pill { padding: 6px 11px 6px 9px; font-size: 12.5px; }
  .settings-btn { padding: 7px; }
  #banner { padding: 0 16px; }
  .banner { flex-wrap: wrap; gap: 10px; padding: 12px 12px 12px 14px; }
  .banner p { flex-basis: calc(100% - 70px); font-size: 14px; }
  .banner-actions { width: 100%; }
  .banner-actions .icon-btn { margin-left: auto; }
  .layout { padding: 16px 16px 32px; gap: 16px; }
  .profile-card { padding: 18px 16px 0; }
  .generate { margin: 6px -16px 0; padding: 12px 16px 18px; }
  .row2 { grid-template-columns: 1fr; gap: 0; }
  .pack-head { padding: 18px 16px 16px; }
  .stats { gap: 6px; }
  .stats li { padding: 10px 8px; border-radius: 13px; align-items: center; text-align: center; }
  .stats .n { font-size: 21px; }
  .stats .k { font-size: 11px; }
  .week { grid-template-columns: minmax(0, 1fr); }
  .item { padding: 14px; border-radius: 18px; }
  .hook-text { font-size: 17.5px; }
  .table-wrap { border: none; background: none; overflow: visible; }
  .beats thead { display: none; }
  .beats, .beats tbody, .beats tr, .beats td { display: block; width: 100% !important; }
  .beats tr { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; position: relative; }
  .beats td { border: none; padding: 3px 0 3px 34px; }
  .beats td.n { position: absolute; left: 12px; top: 10px; padding: 0; width: auto !important; }
  .beats td[data-label]::before { content: attr(data-label); display: block; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--meta); font-weight: 700; margin-bottom: 1px; }
  .slide { flex-basis: 160px; min-height: 200px; }
  .mode-pill .long { display: none; }
  .mode-pill .short { display: inline; }
  .beat-edit, .carousels .beat-edit { grid-template-columns: 1fr; }
  .mode-cards { grid-template-columns: 1fr; }
  .dialog-inner { padding: 18px 16px 20px; }
  .ghost-week { gap: 5px; }
  .ghost-week li { padding: 7px 5px; border-radius: 10px; }
  .pack-actions { flex-direction: column; align-items: stretch; }
}
/* long words and links never run out of their card */
.day-hook, .day-note, .hook-text, .hook-ref, .post p, .item-title, .eyebrow, .pack-head h2, .by, .notice, .slide p, .beats td, .avoid-chip, .chk, .plats span { overflow-wrap: anywhere; }
.chk { min-width: 0; max-width: 100%; }

@media (prefers-reduced-motion: reduce) {
  .item { scroll-margin-top: 90px; }
}
