/* Video Planner — dark theme on top of Bootstrap 5.3 */
:root, [data-bs-theme="dark"] {
    --vp-bg:        #0f1115;
    --vp-surface:   #171a21;
    --vp-surface-2: #1e222b;
    --vp-border:    #2a2f3a;
    --vp-accent:    #ff4d5e;
    --vp-accent-2:  #ff7a59;
    --vp-purple:    #a78bfa;
    --vp-sidebar-w: 240px;
    --bs-body-bg: var(--vp-bg);
    --bs-border-color: var(--vp-border);
    --bs-primary: var(--vp-accent);
    --bs-primary-rgb: 255, 77, 94;
    --bs-link-color: #ff8b97;
    --bs-link-hover-color: #ffb3bb;
    --bs-link-color-rgb: 255, 139, 151;
    --bs-link-hover-color-rgb: 255, 179, 187;
}

body { background: var(--vp-bg); }
.min-w-0 { min-width: 0; }

/* Primary buttons in the accent colour */
.btn-primary {
    --bs-btn-bg: var(--vp-accent); --bs-btn-border-color: var(--vp-accent);
    --bs-btn-hover-bg: #ff6371; --bs-btn-hover-border-color: #ff6371;
    --bs-btn-active-bg: #e8424f; --bs-btn-active-border-color: #e8424f;
    --bs-btn-disabled-bg: var(--vp-accent); --bs-btn-disabled-border-color: var(--vp-accent);
}
.btn-outline-primary {
    --bs-btn-color: var(--vp-accent); --bs-btn-border-color: var(--vp-accent);
    --bs-btn-hover-bg: var(--vp-accent); --bs-btn-hover-border-color: var(--vp-accent);
    --bs-btn-active-bg: var(--vp-accent); --bs-btn-active-border-color: var(--vp-accent);
}
.form-control:focus, .form-select:focus, .form-check-input:focus {
    border-color: rgba(255, 77, 94, .6);
    box-shadow: 0 0 0 .2rem rgba(255, 77, 94, .2);
}
.form-check-input:checked { background-color: var(--vp-accent); border-color: var(--vp-accent); }
.progress-bar { background-color: var(--vp-accent); }

/* Extra "purple" status colour (Scheduled) */
.text-bg-purple { color: #fff !important; background-color: #7c5cff !important; }
.bg-purple { background-color: #7c5cff !important; }
.text-purple { color: var(--vp-purple) !important; }
.border-purple { border-color: #7c5cff !important; }

.card { background: var(--vp-surface); border-color: var(--vp-border); }
.card-header, .card-footer { background: var(--vp-surface-2); border-color: var(--vp-border); }
.table { --bs-table-bg: transparent; }
.modal-content { background: var(--vp-surface); }
.list-group-item { background: var(--vp-surface-2); }

/* ---------- Shell ---------- */
.app-shell { display: flex; min-height: 100vh; }
.app-sidebar {
    width: var(--vp-sidebar-w);
    background: var(--vp-surface);
    border-right: 1px solid var(--vp-border);
}
@media (min-width: 992px) {
    .app-sidebar { position: sticky; top: 0; height: 100vh; flex-shrink: 0; }
}
.app-sidebar .offcanvas-body { overflow-y: auto; }
.brand {
    display: flex; align-items: center; gap: .5rem;
    font-weight: 700; font-size: 1.1rem; color: var(--bs-body-color);
    text-decoration: none; padding: 1.1rem 1.25rem;
}
.brand i { color: var(--vp-accent); font-size: 1.3rem; }
.side-nav .nav-link, .side-user .nav-link {
    color: var(--bs-secondary-color);
    padding: .55rem 1.25rem; display: flex; gap: .65rem; align-items: center;
    border-left: 3px solid transparent; background: none; border-top: 0; border-right: 0; border-bottom: 0;
}
.side-nav .nav-link:hover, .side-user .nav-link:hover { color: var(--bs-body-color); background: var(--vp-surface-2); }
.side-nav .nav-link.active, .side-user .nav-link.active {
    color: #fff; background: var(--vp-surface-2); border-left-color: var(--vp-accent);
}
.side-label { text-transform: uppercase; font-size: .7rem; letter-spacing: .08em; color: var(--bs-secondary-color); padding: 1rem 1.25rem .25rem; }
.side-user { border-top: 1px solid var(--vp-border); padding: .5rem 0; }

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-topbar {
    display: flex; align-items: center; gap: .5rem; padding: .5rem 16px;
    background: var(--vp-surface); border-bottom: 1px solid var(--vp-border);
    position: sticky; top: 0; z-index: 1020;
}
.app-topbar .brand { padding: 0; font-size: 1rem; }
.app-content { padding: 1.5rem; max-width: 1600px; width: 100%; }
@media (max-width: 575.98px) { .app-content { padding: 1rem 16px; } }

/* ---------- Auth ---------- */
.auth-body { min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: radial-gradient(1200px 600px at 20% -10%, rgba(255,77,94,.12), transparent), var(--vp-bg); }
.auth-wrap { width: 100%; max-width: 420px; padding: 16px; }
.auth-brand { text-align: center; font-weight: 700; font-size: 1.4rem; margin-bottom: 1rem; }
.auth-brand i { color: var(--vp-accent); }

/* ---------- Board ---------- */
.quick-add { min-width: min(100%, 360px); }
.upcoming-item { color: var(--bs-body-color); display: inline-flex; align-items: center; gap: .35rem; }
.dot { width: .55rem; height: .55rem; border-radius: 50%; display: inline-block; }
.board {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(165px, 1fr);
    gap: 1rem; overflow-x: auto; padding-bottom: .5rem; align-items: start;
}
.board-col { background: var(--vp-surface); border: 1px solid var(--vp-border); border-radius: .6rem; display: flex; flex-direction: column; max-height: calc(100vh - 210px); min-width: 0; }
.board-col-head { display: flex; justify-content: space-between; align-items: center; padding: .7rem .85rem; font-weight: 600; border-top: 3px solid; border-radius: .6rem .6rem 0 0; }
.board-list { padding: .5rem; display: flex; flex-direction: column; gap: .5rem; min-height: 60px; overflow-y: auto; flex: 1; }
.board-card {
    position: relative; background: var(--vp-surface-2); border: 1px solid var(--vp-border);
    border-radius: .5rem; padding: .65rem .75rem; cursor: grab; transition: border-color .15s, transform .15s;
}
.board-card:hover { border-color: #3d4452; }
.board-meta { display: flex; flex-wrap: wrap; gap: .25rem .7rem; font-size: .75rem; color: var(--bs-secondary-color); margin-top: .35rem; }
.board-add { display: block; padding: .5rem .85rem; font-size: .85rem; color: var(--bs-secondary-color); text-decoration: none; border-top: 1px solid var(--vp-border); }
.board-add:hover { color: var(--bs-body-color); }
.sortable-ghost { opacity: .35; }
.sortable-chosen { border-color: var(--vp-accent) !important; }

/* ---------- Video pages ---------- */
.video-header { margin-bottom: 1.25rem; }
.status-badge { font-size: .8rem; padding: .45em .7em; }
.nav-tabs .nav-link { color: var(--bs-secondary-color); }
.nav-tabs .nav-link.active { color: #fff; background: var(--vp-surface); border-bottom-color: var(--vp-surface); }
.stat-card { color: var(--bs-body-color); transition: border-color .15s; }
.stat-card:hover { border-color: #3d4452; }
.stat-label { font-size: .8rem; color: var(--bs-secondary-color); margin-bottom: .2rem; }
.stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1.2; }

/* Script */
.point-list { display: flex; flex-direction: column; gap: .35rem; }
.point-item { display: flex; align-items: flex-start; gap: .5rem; padding: .45rem .5rem; border-radius: .4rem; background: var(--vp-surface-2); border: 1px solid var(--vp-border); }
.point-item .form-check-input { margin-top: .2rem !important; flex-shrink: 0; }
.point-text { flex: 1; min-width: 0; outline: none; word-break: break-word; border-radius: .2rem; }
.point-text:focus { box-shadow: 0 0 0 1px rgba(255,77,94,.5); padding: 0 .2rem; }
.point-item.covered .point-text { text-decoration: line-through; color: var(--bs-secondary-color); }
.drag-handle { cursor: grab; color: var(--bs-secondary-color); }
textarea.script-editor {
    border: 0; border-radius: 0 0 var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius);
    min-height: 60vh; resize: vertical; padding: 1.25rem;
    font-family: "Courier Prime", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1rem; line-height: 1.75; background: var(--vp-surface);
}
textarea.script-editor:focus { box-shadow: none; background: var(--vp-surface); }

/* Shots */
.roll-a .card-header { border-left: 4px solid var(--vp-accent); }
.roll-b .card-header { border-left: 4px solid #3dd5f3; }
.roll-c .card-header { border-left: 4px solid var(--vp-purple); }
.shot-row.captured .shot-desc { text-decoration: line-through; color: var(--bs-secondary-color); }
.shot-table { table-layout: fixed; min-width: 640px; }
.shot-table .c-handle { width: 28px; } .shot-table .c-num { width: 48px; } .shot-table .c-check { width: 36px; }
.shot-table .c-frame { width: 20%; } .shot-table .c-loc { width: 14%; } .shot-table .c-gear { width: 18%; }
.shot-table .c-len { width: 70px; } .shot-table .c-act { width: 80px; }
@media (max-width: 991.98px) { .shot-table .c-loc, .shot-table .c-gear { display: none; } }
@media (max-width: 767.98px) { .shot-table { min-width: 0; } .shot-table .c-frame { display: none; } }
@media (max-width: 575.98px) { .shot-table .c-len { display: none; } }
.equip-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .25rem 1rem; max-height: 200px; overflow-y: auto; padding: .5rem .75rem; border: 1px solid var(--vp-border); border-radius: .4rem; }

/* Ideas */
.thumb-img { aspect-ratio: 16 / 9; object-fit: cover; }
.thumb-placeholder { aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: var(--bs-secondary-color); background: var(--vp-surface-2); border-radius: var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius) 0 0; }

/* Calendar */
.calendar { overflow: hidden; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head div { padding: .5rem; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--bs-secondary-color); background: var(--vp-surface-2); text-align: center; }
.cal-day { min-height: 110px; border-top: 1px solid var(--vp-border); border-left: 1px solid var(--vp-border); padding: .35rem; display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.cal-grid .cal-day:first-child { border-left: 0; }
.cal-day.out { background: rgba(0,0,0,.25); }
.cal-day.out .cal-date { opacity: .4; }
.cal-day.today .cal-date { background: var(--vp-accent); color: #fff; border-radius: 50%; width: 1.7rem; height: 1.7rem; display: flex; align-items: center; justify-content: center; }
.cal-date { font-size: .8rem; font-weight: 600; }
.cal-event { display: block; font-size: .72rem; padding: .15rem .35rem; border-radius: .25rem; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.cal-event.cal-film { background: rgba(255, 193, 7, .22); border-left: 3px solid #ffc107; }
.cal-event.cal-publish { background: rgba(255, 77, 94, .22); border-left: 3px solid var(--vp-accent); }
.cal-time { opacity: .75; }
.cal-key { display: inline-block; width: .8rem; height: .8rem; border-radius: .2rem; vertical-align: -1px; }
.cal-key.cal-film { background: #ffc107; }
.cal-key.cal-publish { background: var(--vp-accent); }
@media (max-width: 767.98px) {
    .cal-day { min-height: 70px; padding: .2rem; }
    .cal-event { font-size: 0; padding: .2rem; }
    .cal-event i { font-size: .7rem; }
}

/* Empty states */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--bs-secondary-color); }
.empty-state i { font-size: 2.5rem; display: block; margin-bottom: .5rem; }

/* Print (shot list) */
@media print {
    .app-sidebar, .app-topbar, .no-print, .alert, .toast-container { display: none !important; }
    body, .card, .card-header { background: #fff !important; color: #000 !important; }
    .app-content { padding: 0; }
    .table { color: #000; }
    .roll-card { break-inside: avoid; border: 1px solid #999; }
    a { color: #000; text-decoration: none; }
}

/* ---------- Video types ---------- */
.type-badge { font-weight: 600; letter-spacing: .01em; }
.type-badge-sm { font-size: .68rem; padding: .3em .55em; }
.board-card[style*="--type"], .idea-card[style*="--type"] { border-left: 3px solid var(--type); }
.type-filter { display: flex; flex-wrap: wrap; gap: .4rem; }
.type-chip {
    display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .7rem; border-radius: 999px;
    border: 1px solid var(--vp-border); background: var(--vp-surface); color: var(--bs-secondary-color);
    font-size: .82rem; text-decoration: none;
}
.type-chip:hover { color: var(--bs-body-color); border-color: #3d4452; }
.type-chip.active { color: #fff; border-color: var(--chip, var(--vp-accent)); background: var(--vp-surface-2); box-shadow: inset 0 0 0 1px var(--chip, var(--vp-accent)); }
#type-list .form-control-color { width: 3rem; flex-shrink: 0; }
#type-list .type-name-input { min-width: 140px; max-width: 320px; }
.form-section-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--bs-secondary-color); border-bottom: 1px solid var(--vp-border); padding-bottom: .35rem; margin-top: .5rem; }

/* ---------- Idea planner ---------- */
.planner-tabs .nav-link { color: var(--bs-secondary-color); padding: .35rem .8rem; }
.planner-tabs .nav-link.active { background: var(--vp-surface-2); color: #fff; box-shadow: inset 0 -2px 0 var(--vp-accent); }
.idea-card { transition: border-color .15s; }
.idea-card:hover { border-color: #3d4452; }
.idea-card .card-footer { position: relative; z-index: 2; }
.idea-card.parked { opacity: .6; }
.idea-notes { color: var(--bs-body-color); opacity: .85; white-space: pre-line; }

/* ---------- Channels & insights ---------- */
.channel-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--vp-surface-2); color: var(--bs-secondary-color); font-size: 1.4rem; }
.channel-avatar-lg { width: 72px; height: 72px; }
.channel-card { transition: border-color .15s; }
.channel-card:hover { border-color: #3d4452; }
.usage-meter { min-width: 200px; }
.lift-list .list-group-item { background: transparent; padding: .5rem .9rem; }
.lift-bar { position: relative; height: 6px; background: var(--vp-surface-2); border-radius: 3px; margin-top: .3rem; overflow: hidden; }
.lift-bar span { position: absolute; inset: 0 auto 0 0; border-radius: 3px; }
.lift-bar i { position: absolute; top: -2px; bottom: -2px; width: 1px; background: rgba(255,255,255,.35); }
.lift-bar span.lift-good { background: #22c55e; } .lift-bar span.lift-mid { background: #64748b; } .lift-bar span.lift-weak { background: #475569; }
strong.lift-good, .lift-good { color: #4ade80; } strong.lift-mid { color: var(--bs-body-color); } strong.lift-weak { color: var(--bs-secondary-color); }
.yt-card { color: var(--bs-body-color); transition: border-color .15s, transform .15s; }
.yt-card:hover { border-color: #3d4452; transform: translateY(-1px); }
.yt-thumb { aspect-ratio: 16 / 9; object-fit: cover; }
.yt-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Idea generator ---------- */
.insight-strip { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.insight-chip { font-size: .8rem; padding: .2rem .6rem; border-radius: 999px; background: var(--vp-surface); border: 1px solid var(--vp-border); }
.insight-chip b { color: #4ade80; font-weight: 600; }
.gen-card { transition: border-color .15s; }
.gen-card:hover { border-color: #3d4452; }
.gen-reasons li { margin-bottom: .15rem; }
.gen-card .card-footer .form-select { max-width: 150px; }

/* ---------- Title helper ---------- */
.title-checks { display: flex; flex-wrap: wrap; gap: .25rem .6rem; margin-top: .15rem; }
.title-check { font-size: .75rem; color: var(--bs-secondary-color); }
.title-check.ok i { color: #4ade80; }
.title-check.warn { color: #fbbf24; }
.suggestion { padding: .55rem .7rem; border: 1px solid var(--vp-border); border-radius: .45rem; background: var(--vp-surface-2); height: 100%; }

/* ---------- Thumbnail board ---------- */
.thumb-concept { padding: .75rem; text-align: center; font-size: .85rem; color: var(--bs-body-color); background: linear-gradient(135deg, var(--vp-surface-2), #252a35); }
.thumb-card { color: var(--bs-body-color); }

/* ---------- Description ---------- */
textarea.description-editor { border: 0; border-radius: 0; min-height: 55vh; resize: vertical; padding: 1.1rem 1.25rem; line-height: 1.6; background: var(--vp-surface); }
textarea.description-editor:focus { box-shadow: none; background: var(--vp-surface); }
.desc-preview { white-space: pre-wrap; word-break: break-word; font-size: .9rem; background: var(--vp-surface-2); border-radius: .4rem; padding: .7rem .8rem; min-height: 3rem; }
.desc-preview .more { color: var(--bs-secondary-color); font-weight: 600; }
#desc-checks .ok { color: #4ade80; } #desc-checks .warn { color: #fbbf24; } #desc-checks .muted { color: var(--bs-secondary-color); }

/* ---------- Roles, teams & admin ---------- */
.imp-banner { position: sticky; top: 0; z-index: 1050; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .6rem;
    padding: .45rem 16px; background: #7c3aed; color: #fff; font-size: .9rem; }
.ws-banner { font-size: .85rem; padding: .45rem .8rem; margin-bottom: 1rem; border-radius: .45rem; background: rgba(59,130,246,.12); border: 1px solid rgba(59,130,246,.35); }
.ws-switch .form-select { background-color: var(--vp-surface-2); }
.side-nav .nav-link .badge, .side-user .nav-link .badge { font-size: .65rem; }
body.read-only .app-content form[method="post"] :disabled { cursor: not-allowed; }
body.read-only .board-card { cursor: default; }
.announcement { font-size: .9rem; }
.secret-box { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.15rem; letter-spacing: .05em; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; font-size: .875rem; }
.kv dt { color: var(--bs-secondary-color); font-weight: 400; }
.kv dd { margin: 0; min-width: 0; word-break: break-word; }
.audit-row .bi { width: 1.25rem; text-align: center; }
.cap-matrix td, .cap-matrix th { text-align: center; }
.cap-matrix td:first-child, .cap-matrix th:first-child { text-align: left; }
.danger-zone { border-color: rgba(220,53,69,.45) !important; }

/* Admin charts: one series, one hue, thin rounded bars on a hairline baseline */
.vchart { --bar: #ff6b78; display: flex; align-items: flex-end; gap: 2px; height: 140px; padding-top: 1.25rem; border-bottom: 1px solid var(--vp-border); position: relative; }
.vchart .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; min-width: 0; position: relative; }
.vchart .bar { width: 100%; max-width: 24px; background: var(--bar); border-radius: 4px 4px 0 0; min-height: 1px; transition: opacity .15s; }
.vchart .bar.zero { background: var(--vp-border); }
.vchart .col:hover .bar { opacity: .75; }
.vchart .tip { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); background: #0b0d11; border: 1px solid var(--vp-border);
    color: var(--bs-body-color); font-size: .72rem; padding: .2rem .45rem; border-radius: .3rem; white-space: nowrap; pointer-events: none; opacity: 0; z-index: 2; }
.vchart .col:hover .tip, .vchart .col:focus-within .tip { opacity: 1; }
.vchart-axis { display: flex; justify-content: space-between; font-size: .7rem; color: var(--bs-secondary-color); margin-top: .3rem; }
.vchart-max { position: absolute; top: 0; left: 0; font-size: .7rem; color: var(--bs-secondary-color); }
.hbars { list-style: none; padding: 0; margin: 0; }
.hbars li { display: grid; grid-template-columns: minmax(80px, 30%) 1fr max-content; align-items: center; gap: .6rem; font-size: .85rem; padding: .2rem 0; }
.hbars .track { height: 8px; background: var(--vp-surface-2); border-radius: 4px; overflow: hidden; }
.hbars .fill { display: block; height: 100%; background: #ff6b78; border-radius: 0 4px 4px 0; }
.hbars .val { color: var(--bs-body-color); font-variant-numeric: tabular-nums; }

/* ---- Daily vlog ---------------------------------------------------------- */
.topic-card { border-left: 4px solid #ff6b78; }
.topic-text { font-size: 1.35rem; font-weight: 600; line-height: 1.35; }
.jar-picks { display: flex; flex-wrap: wrap; gap: .4rem; }
.jar-picks .btn { white-space: normal; max-width: 100%; }
.jar-list li { padding: .35rem 0; border-bottom: 1px solid var(--bs-border-color-translucent); }
.jar-list li:last-child { border-bottom: 0; }
.jar-list form { line-height: 1; }

/* ---- Public homepage ------------------------------------------------------ */
.public-body { background: radial-gradient(1100px 560px at 85% -10%, rgba(255,77,94,.14), transparent), var(--vp-bg); }
.public-nav { position: sticky; top: 0; z-index: 10; padding: .8rem 0; background: rgba(15,17,21,.85); backdrop-filter: blur(8px); border-bottom: 1px solid var(--vp-border); }
.public-nav .brand { padding: 0; color: var(--bs-body-color); }
.public-link { color: var(--bs-secondary-color); text-decoration: none; }
.public-link:hover { color: var(--bs-body-color); }
.public-hero { padding: 4.5rem 0 3rem; }
.hero-kicker { display: inline-flex; gap: .4rem; align-items: center; font-size: .8rem; font-weight: 600; color: var(--vp-accent-2); background: rgba(255,122,89,.1); border: 1px solid rgba(255,122,89,.25); padding: .3rem .7rem; border-radius: 999px; }
.hero-title { font-size: clamp(2rem, 4.6vw, 3.3rem); font-weight: 800; line-height: 1.08; letter-spacing: -.02em; margin: 1rem 0; }
.hero-lead { font-size: 1.15rem; color: var(--bs-secondary-color); max-width: 34rem; }
.hero-board { background: var(--vp-surface); border: 1px solid var(--vp-border); border-radius: .9rem; box-shadow: 0 30px 80px rgba(0,0,0,.45); overflow: hidden; }
.hero-board-bar { display: flex; align-items: center; gap: .35rem; padding: .6rem .8rem; background: var(--vp-surface-2); border-bottom: 1px solid var(--vp-border); }
.hero-board-bar span { width: .6rem; height: .6rem; border-radius: 50%; background: var(--vp-border); }
.hero-board-bar em { font-style: normal; font-size: .75rem; color: var(--bs-secondary-color); margin-left: .5rem; }
.hero-board-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; padding: .8rem; }
.hero-col { background: var(--vp-bg); border: 1px solid var(--vp-border); border-radius: .5rem; padding: .5rem; min-height: 11rem; }
.hero-col-head { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-bottom: .5rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-card { background: var(--vp-surface-2); border: 1px solid var(--vp-border); border-left: 3px solid var(--type); border-radius: .4rem; padding: .45rem .5rem; margin-bottom: .45rem; }
.hero-card-title { font-size: .78rem; font-weight: 600; line-height: 1.25; margin-bottom: .35rem; }
.status-strip { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .6rem 1rem; padding: 1rem; border: 1px solid var(--vp-border); border-radius: .8rem; background: var(--vp-surface); font-weight: 600; font-size: .9rem; }
.public-section { padding: 4.5rem 0; }
.public-section-alt { background: var(--vp-surface); border-top: 1px solid var(--vp-border); border-bottom: 1px solid var(--vp-border); }
.public-section h2, .cta-band h2 { font-weight: 800; letter-spacing: -.01em; }
.section-head { text-align: center; max-width: 40rem; margin: 0 auto 2.5rem; }
.section-head p { color: var(--bs-secondary-color); margin: 0; }
.feature-card, .step-card { background: var(--vp-surface); border: 1px solid var(--vp-border); border-radius: .8rem; padding: 1.25rem; transition: border-color .15s, transform .15s; }
.feature-card:hover { border-color: #3d4452; transform: translateY(-2px); }
.feature-card h3, .step-card h3 { font-size: 1.05rem; font-weight: 700; margin: .8rem 0 .4rem; }
.feature-card p, .step-card p { color: var(--bs-secondary-color); font-size: .92rem; margin: 0; }
.feature-icon { display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: .6rem; background: rgba(255,77,94,.12); color: var(--vp-accent); font-size: 1.15rem; }
.step-num { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--vp-accent); color: #fff; font-weight: 800; }
.check-list { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: .7rem; }
.check-list li { display: flex; gap: .6rem; }
.check-list i { color: var(--bs-success); font-size: 1.1rem; line-height: 1.4; }
.insight-demo { background: var(--vp-bg); border: 1px solid var(--vp-border); border-radius: .9rem; padding: 1.4rem; }
.insight-row { display: grid; grid-template-columns: minmax(110px, 38%) 1fr 3rem; gap: .75rem; align-items: center; padding: .4rem 0; font-size: .9rem; }
.insight-track { height: 8px; background: var(--vp-surface-2); border-radius: 4px; overflow: hidden; }
.insight-track span { display: block; height: 100%; background: #ff6b78; border-radius: 0 4px 4px 0; }
.insight-val { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.cta-band { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: space-between; padding: 2rem; border-radius: 1rem; border: 1px solid rgba(255,77,94,.35); background: linear-gradient(120deg, rgba(255,77,94,.16), rgba(255,122,89,.06) 60%, transparent), var(--vp-surface); }
.public-footer { padding: 1.5rem 0; border-top: 1px solid var(--vp-border); }
@media (max-width: 575.98px) {
    .public-hero { padding: 2.5rem 0 2rem; }
    .public-section { padding: 3rem 0; }
    .hero-board-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero-col { min-height: 0; }
}

/* ---- Phones: chart tooltips stay on screen; 16px fields stop iOS zooming in on focus ---- */
.vchart .col:nth-child(-n+4) .tip { left: 0; transform: none; }
.vchart .col:nth-last-child(-n+3) .tip { left: auto; right: 0; transform: none; }
@media (max-width: 767.98px) {
    .form-control, .form-select, .form-control-sm, .form-select-sm, textarea.script-editor { font-size: 16px; }
}

/* ---- Shooting plan (screen + print) --------------------------------------- */
.print-only { display: none; }
.plan-sheet { background: var(--vp-surface); border: 1px solid var(--vp-border); border-radius: .8rem; padding: 1.5rem; }
.plan-kicker { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--vp-accent); }
.plan-title { font-size: 1.5rem; font-weight: 800; margin: .15rem 0 .5rem; }
.plan-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; font-size: .85rem; color: var(--bs-secondary-color); }
.plan-boxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .75rem; margin: 1.25rem 0; }
.plan-box { border: 1px solid var(--vp-border); border-radius: .6rem; padding: .75rem .9rem; }
.plan-box h3, .plan-extra h3 { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .5rem; }
.plan-checks { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.plan-checks li { display: flex; gap: .5rem; align-items: flex-start; padding: .15rem 0; }
.plan-sheet .box { flex: none; display: inline-block; width: .85rem; height: .85rem; border: 1.5px solid var(--bs-secondary-color); border-radius: 2px; margin-top: .2rem; }
.plan-table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.plan-table th { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--bs-secondary-color); padding: .4rem .6rem; border-bottom: 2px solid var(--vp-border); }
.plan-table td { vertical-align: top; padding: .7rem .6rem; border-bottom: 1px solid var(--vp-border); }
.plan-c-shot { width: 34%; }
.plan-table tr > td:first-child { border-left: 4px solid transparent; }
.plan-table tr.roll-a > td:first-child { border-left-color: var(--vp-accent); }
.plan-table tr.roll-b > td:first-child { border-left-color: #3dd5f3; }
.plan-table tr.roll-c > td:first-child { border-left-color: var(--vp-purple); }
.plan-code { font-weight: 800; font-size: .8rem; letter-spacing: .03em; }
.plan-desc { font-weight: 600; }
.plan-small { font-size: .8rem; color: var(--bs-secondary-color); }
.plan-flag { font-size: .8rem; color: var(--bs-warning); margin-top: .25rem; }
.plan-script { line-height: 1.6; }
.plan-dir { font-style: italic; color: var(--bs-secondary-color); }
.plan-time { font-size: .75rem; color: var(--bs-secondary-color); margin-top: .3rem; text-align: right; }
.plan-table-compact td { padding: .4rem .6rem; }
.plan-extra { margin-top: 1.5rem; }
.plan-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; margin-top: 1.25rem; font-size: .75rem; color: var(--bs-secondary-color); }
@media (max-width: 575.98px) {
    .plan-sheet { padding: 1rem; }
    .plan-table thead { display: none; }
    .plan-table, .plan-table tbody, .plan-table tr, .plan-table td { display: block; width: 100%; }
    .plan-table tr { border-bottom: 1px solid var(--vp-border); border-left: 4px solid transparent; }
    .plan-table tr.roll-a { border-left-color: var(--vp-accent); } .plan-table tr.roll-b { border-left-color: #3dd5f3; } .plan-table tr.roll-c { border-left-color: var(--vp-purple); }
    .plan-table td, .plan-table tr > td:first-child { border: 0; }
    .plan-table td.plan-script { padding-top: 0; }
}
@media print {
    @page { margin: 14mm; }
    .print-only { display: inline; }
    body:has(.plan-sheet) .video-header, body:has(.plan-sheet) .no-print { display: none !important; }
    .plan-sheet { border: 0; padding: 0; background: #fff !important; color: #000; }
    .plan-kicker, .plan-meta, .plan-small, .plan-time, .plan-dir, .plan-table th, .plan-foot { color: #444 !important; }
    .plan-box, .plan-table td, .plan-table th { border-color: #bbb !important; }
    .plan-sheet .box { border-color: #000; }
    .plan-table tr { break-inside: avoid; }
    .plan-table tr.roll-a > td:first-child { border-left-color: #d6283a !important; }
    .plan-table tr.roll-b > td:first-child { border-left-color: #0a8fb0 !important; }
    .plan-table tr.roll-c > td:first-child { border-left-color: #7c5cd6 !important; }
    .plan-flag { color: #8a5a00 !important; }
    .plan-sheet .text-body-secondary { color: #555 !important; }
    .plan-sheet code { color: #000; }
    * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---- Shooting plan: learned suggestions, sections, hints ------------------ */
.learned-h { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .35rem; }
.learned-list { padding-left: 1.2rem; margin: 0; font-size: .92rem; }
.learned-list li { padding: .15rem 0; }
.learned-list li span:last-child { margin-left: .35rem; }
.learned-shots li { padding: .4rem 0; border-bottom: 1px solid var(--vp-border); font-size: .92rem; }
.learned-shots li:last-child { border-bottom: 0; }
.roll-pill { min-width: 1.6rem; color: #fff; }
.roll-pill.roll-a { background: var(--vp-accent); } .roll-pill.roll-b { background: #0a8fb0; } .roll-pill.roll-c { background: #7c5cd6; }
.learned-dl dt { font-size: .75rem; font-weight: 600; color: var(--bs-secondary-color); }
.learned-dl dd { margin-bottom: .5rem; }
.plan-table tr.plan-section td { background: var(--vp-surface-2); border-left: 0 !important; padding: .55rem .6rem; }
.plan-section-title { font-weight: 800; font-size: 1rem; }
.plan-off { color: var(--bs-warning) !important; font-weight: 600; }
.plan-cont td.plan-shot { opacity: .85; }
.plan-hint { margin-top: .5rem; padding: .5rem .6rem; border: 1px dashed var(--vp-border); border-radius: .4rem; font-size: .8rem; }
.plan-hint code { font-size: .75rem; }
@media print {
    .plan-table tr.plan-section td { background: #eee !important; color: #000; }
    .plan-off { color: #8a5a00 !important; }
}

/* ---- Trending topics ------------------------------------------------------ */
.trend-video { background: var(--vp-surface-2); border: 1px solid var(--vp-border); border-radius: .6rem; padding: .6rem; }
.trend-thumb { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: .4rem; background: var(--vp-bg); margin-bottom: .45rem; display: block; }
.trend-title { font-weight: 600; font-size: .92rem; line-height: 1.3; margin-bottom: .2rem; }
.trend-list li { padding: .55rem 0; border-bottom: 1px solid var(--vp-border); }
.trend-list li:last-child, .trend-sug li:last-child { border-bottom: 0; }
.trend-sug li { padding: .3rem 0; border-bottom: 1px solid var(--vp-border); font-size: .92rem; }

/* ---- Plan features ---------------------------------------------------------- */
.plan-feature-list { list-style: none; padding: 0; columns: 2; column-gap: 1rem; }
.plan-feature-list li { padding: .1rem 0; break-inside: avoid; }
.plan-feature-list li.off { color: var(--bs-secondary-color); opacity: .6; }
.plan-feature-check { border: 1px solid var(--vp-border); border-radius: .5rem; padding: .5rem .75rem .5rem 2.2rem; height: 100%; }

/* ---- Homepage plan cards ---------------------------------------------------- */
.plan-card { position: relative; display: flex; flex-direction: column; background: var(--vp-bg); border: 1px solid var(--vp-border); border-radius: .9rem; padding: 1.5rem 1.25rem 1.25rem; }
.plan-card-default { border-color: rgba(255,77,94,.6); box-shadow: 0 0 0 1px rgba(255,77,94,.25); }
.plan-flag-top { position: absolute; top: -.7rem; left: 1.25rem; font-size: .72rem; font-weight: 700; background: var(--vp-accent); color: #fff; padding: .15rem .6rem; border-radius: 999px; }
.plan-card h3 { font-size: 1.25rem; font-weight: 800; margin-bottom: .2rem; }
.plan-price { font-size: 1.5rem; font-weight: 800; color: var(--vp-accent); margin-bottom: .25rem; }
.plan-desc { color: var(--bs-secondary-color); font-size: .92rem; }
.plan-limits, .plan-features { list-style: none; padding: 0; margin: 0 0 1rem; font-size: .9rem; }
.plan-limits li { padding: .2rem 0; border-bottom: 1px solid var(--vp-border); }
.plan-limits li:last-child { border-bottom: 0; }
.plan-features li { padding: .15rem 0; }
.plan-features i { color: var(--bs-success); margin-right: .25rem; }
.plan-features li.off { color: var(--bs-secondary-color); opacity: .55; }
.plan-features li.off i { color: inherit; }
/* Plan cards: let the label wrap, keep values like "Unlimited" whole */
.kv-plan { grid-template-columns: 1fr max-content; }
.kv-plan dd { word-break: normal; text-align: right; }
.flex-none { flex: none; }
.role-matrix th, .role-matrix td { white-space: nowrap; }

/* ---- Contact form (homepage) ----------------------------------------------- */
.contact-card { background: var(--vp-surface); border: 1px solid var(--vp-border); border-radius: .9rem; padding: 1.4rem; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
