/* © 2026 FadeinIsrael. All rights reserved. Unauthorized copying prohibited. */
/* ============================================================
   Index Cards Pro Feature — Full screen overlay
   ============================================================ */

/* Overlay covers the entire screen — full-screen planning mode */
.ic-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1500;
    background-color: #07070a;
    background-image:
        linear-gradient(to bottom, rgba(8,8,11,0.85), rgba(5,5,8,0.9)),
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.4' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.28 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: auto, 200px 200px;
    display: flex;
    flex-direction: column;
    direction: rtl;
}
@keyframes icFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Hide editor + chrome when index cards is open — full focus mode */
body.ic-open #scriptScroll,
body.ic-open #sidebar,
body.ic-open #appHeader,
body.ic-open #headerTrigger { display: none; }

/* ============================================================
   Toolbar
   ============================================================ */
.ic-toolbar {
    position: relative;
    display: flex;
    align-items: flex-start;
    padding: 0.75rem 1.25rem 0.75rem;
    padding-bottom: 48px;
    background: linear-gradient(to bottom, #16161a, #0e0e10);
    border-bottom: none;
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
    flex-shrink: 0;
}

.ic-toolbar-side {
    display: flex;
    align-items: center;
    gap: 6px;
}
.ic-toolbar-left { justify-content: flex-start; }
.ic-toolbar-right { justify-content: flex-end; margin-right: auto; }

.ic-tb-btn {
    background: rgba(255,255,255,0.12);
    border: none;
    color: rgba(255,255,255,0.85);
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.ic-tb-btn:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}
.ic-tb-close:hover {
    background: rgba(204,51,51,0.15);
    color: #ff5555;
}

/* ============================================================
   Tabs (center)
   ============================================================ */
.ic-tabs {
    position: absolute;
    left: 50%;
    top: 0.75rem;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0,0,0,0.3);
    padding: 4px;
    border-radius: 12px;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.4);
}
.ic-tab {
    background: none;
    border: none;
    color: rgba(255,255,255,0.45);
    cursor: pointer;
    padding: 8px 18px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: all 0.18s;
}
.ic-tab:hover {
    color: rgba(255,255,255,0.85);
}
.ic-tab-active {
    background: linear-gradient(to bottom, #2a2c34, #1e2026);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.08);
}
.ic-tab svg { opacity: 0.7; }
.ic-tab-active svg { opacity: 1; color: var(--accent); }

/* Script name tab — bulges up from the subtoolbar border line */
.ic-script-badge {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%) translateY(-100%);
    margin-top: 1px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
    padding: 5px 18px 4px;
    white-space: nowrap;
    letter-spacing: 0.02em;
    z-index: 3;
    background: #07070a;
    border: 1px solid rgba(255,255,255,0.08);
    border-top-width: 3px;
    border-bottom: none;
    border-radius: 10px 10px 0 0;
}

/* ============================================================
   Sub-toolbar (mode-specific actions)
   ============================================================ */
.ic-subtoolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: 0;
    padding: 12px 1rem 8px;
    background: transparent;
    flex-shrink: 0;
}
/* Index-cards action bar — flat row of grouped icon buttons with tooltips */
.ic-actionbar {
    direction: rtl;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    background: transparent;
}
.ic-action-group {
    display: flex;
    align-items: center;
    gap: 4px;
}
.ic-action-label {
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255,255,255,0.55);
    padding: 0 6px 0 4px;
    letter-spacing: 0.02em;
    user-select: none;
}
.ic-action-btn {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 7px 9px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.ic-action-btn:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}
.ic-action-btn-active {
    background: linear-gradient(to bottom, #2a2c34, #1e2026);
    color: var(--accent, #0096db);
    box-shadow: 0 2px 6px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.06);
}
.ic-action-btn-active:hover {
    color: var(--accent, #0096db);
}
.ic-action-btn-disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}
.ic-action-divider {
    width: 1px;
    align-self: stretch;
    margin: 4px 2px;
    background: rgba(255,255,255,0.08);
}

/* ============================================================
   Search bar — floating real-time card filter
   ============================================================ */
.ic-searchbar {
    position: absolute;
    top: 96px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1700;
    direction: rtl;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: linear-gradient(to bottom, #1e2026, #16181d);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5), 0 2px 6px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.06);
    min-width: 280px;
    animation: icSearchSlide 0.18s ease;
}
@keyframes icSearchSlide {
    from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.ic-searchbar-icon {
    color: rgba(255,255,255,0.5);
    flex-shrink: 0;
}
.ic-search-input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-family: inherit;
    font-size: 0.92rem;
    flex: 1;
    direction: rtl;
    text-align: right;
}
.ic-search-input::placeholder {
    color: rgba(255,255,255,0.35);
}
.ic-search-close {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    padding: 4px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.ic-search-close:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

/* Card filter states — applied while search is active */
.bb-card-mini.bb-card-dim {
    opacity: 0.18;
    transition: opacity 0.18s;
}
.bb-card-mini.bb-card-match {
    box-shadow: 0 0 0 2px var(--accent, #0096db), 0 4px 14px rgba(0,150,219,0.35);
    transition: box-shadow 0.18s;
}
/* Whole act with no matching cards — dim its header bubble too */
.bb-act.bb-act-dim > .bb-act-header {
    opacity: 0.18;
    transition: opacity 0.18s;
}

/* ============================================================
   Template entry animation — structural cascade
   Acts slide + fade in from top, then cards stagger in below
   ============================================================ */
@keyframes bbTplActIn {
    from {
        opacity: 0;
        transform: translateY(-14px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
@keyframes bbTplCardIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
.bb-tpl-anim-act {
    animation: bbTplActIn 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}
.bb-tpl-anim-card {
    animation: bbTplCardIn 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}
@media (prefers-reduced-motion: reduce) {
    .bb-tpl-anim-act,
    .bb-tpl-anim-card {
        animation: none !important;
    }
}

/* ============================================================
   Template picker — premium modal with grid of structures
   ============================================================ */
.ic-tpl-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(5,5,8,0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    direction: rtl;
    animation: icTplFade 0.2s ease;
}
@keyframes icTplFade {
    from { opacity: 0; }
    to { opacity: 1; }
}
.ic-tpl-modal {
    width: min(1320px, 94vw);
    max-height: 88vh;
    background: #d2d2d2;
    border: 12px solid #ffffff;
    border-radius: 28px;
    box-shadow:
        0 24px 80px rgba(0,0,0,0.55),
        0 6px 18px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    animation: icTplPop 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
/* Inner stitching line — runs around the modal just inside the white frame */
.ic-tpl-modal::before {
    content: '';
    position: absolute;
    inset: 12px;
    border: 1.5px dashed rgba(40,40,40,0.32);
    border-radius: 9px;
    pointer-events: none;
    z-index: 5;
}
@keyframes icTplPop {
    from { opacity: 0; transform: scale(0.94) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Header */
.ic-tpl-header {
    padding: 28px 32px 22px;
    background: linear-gradient(to bottom, rgba(0,150,219,0.06), transparent);
    flex-shrink: 0;
}
.ic-tpl-header-row {
    display: flex;
    align-items: center;
    gap: 18px;
}
.ic-tpl-header-icon {
    width: 52px;
    height: 52px;
    border-radius: 13px;
    background: linear-gradient(135deg, #2a2c33 0%, #14161b 60%, #060709 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 6px 18px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.08);
    flex-shrink: 0;
}
.ic-tpl-header-icon svg { width: 26px; height: 26px; }
.ic-tpl-titles { flex: 1; }
.ic-tpl-title {
    margin: 0 0 4px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #14161b;
    letter-spacing: -0.01em;
}
.ic-tpl-subtitle {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(20,22,27,0.85);
}
.ic-tpl-close {
    background: rgba(0,0,0,0.05);
    border: none;
    color: rgba(20,22,27,0.55);
    cursor: pointer;
    padding: 10px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}
.ic-tpl-close:hover {
    background: rgba(220,74,90,0.15);
    color: #cc3344;
}

/* Explanation notice — clean black with subtle inner stitching */
.ic-tpl-notice {
    position: relative;
    margin: 0 28px 18px;
    padding: 16px 20px;
    background: #0a0b0e;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.35);
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.ic-tpl-notice::before {
    content: '';
    position: absolute;
    inset: 6px;
    border: 1px dashed rgba(255,255,255,0.18);
    border-radius: 7px;
    pointer-events: none;
}
.ic-tpl-notice-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #2a2c33 0%, #14161b 60%, #060709 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.08);
}
.ic-tpl-notice-icon svg { width: 20px; height: 20px; }
.ic-tpl-notice-text {
    flex: 1;
    min-width: 0;
}
.ic-tpl-notice-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 5px;
    letter-spacing: -0.005em;
}
.ic-tpl-notice-body {
    font-size: 0.83rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.65);
}
.ic-tpl-notice-body strong {
    color: rgba(0,150,219,0.95);
    font-weight: 600;
}

/* Grid of template cards — single long row */
.ic-tpl-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    padding: 14px 28px 28px;
    overflow-y: auto;
    flex: 1;
}
.ic-tpl-grid::-webkit-scrollbar { width: 8px; }
.ic-tpl-grid::-webkit-scrollbar-track { background: transparent; }
.ic-tpl-grid::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
    border-radius: 4px;
}

/* Individual template card */
.ic-tpl-card {
    background: linear-gradient(165deg, #1a1c20 0%, #0e0f12 60%, #060709 100%);
    border-radius: 12px;
    padding: 16px 14px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.04),
        0 6px 18px rgba(0,0,0,0.5),
        inset 0 1px 0 rgba(255,255,255,0.03);
    transition: transform 0.2s, box-shadow 0.2s;
}
.ic-tpl-card:hover {
    transform: translateY(-3px);
    box-shadow:
        0 0 0 1px rgba(0,150,219,0.22),
        0 14px 32px rgba(0,0,0,0.6),
        0 0 24px rgba(0,150,219,0.1),
        inset 0 1px 0 rgba(255,255,255,0.05);
}

/* Portrait area — circular B&W photo with gradient stroke ring */
.ic-tpl-card-portrait {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin-bottom: 11px;
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
    /* Outer gradient ring (stroke) */
    background: linear-gradient(160deg, #4a4d56 0%, #1a1c22 50%, #050608 100%);
    padding: 2px;
    box-shadow:
        0 6px 16px rgba(0,0,0,0.55),
        inset 0 1px 0 rgba(255,255,255,0.08);
}
.ic-tpl-card-portrait::before {
    /* Inner dark rim that separates the ring from the photo */
    content: '';
    position: absolute;
    inset: 1.2px;
    border-radius: 50%;
    background: #0a0b0e;
    z-index: 0;
}
.ic-tpl-card-img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    filter: grayscale(1) contrast(1.05);
    transition: filter 0.25s, transform 0.25s;
}
.ic-tpl-card:hover .ic-tpl-card-img {
    filter: grayscale(1) contrast(1.12) brightness(1.08);
}
/* Carol Clover image has wide margins — zoom in to fill the frame */
.ic-tpl-card[data-tpl="slasher"] .ic-tpl-card-img {
    transform: scale(1.22);
}
.ic-tpl-card-initials {
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: rgba(255,255,255,0.55);
    background: linear-gradient(135deg, #1a1c22, #0a0b0e);
    letter-spacing: 0.05em;
    z-index: 1;
}

.ic-tpl-card-name {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 3px;
    letter-spacing: -0.01em;
}
.ic-tpl-card-creator {
    font-size: 0.74rem;
    color: rgba(0,150,219,0.85);
    margin-bottom: 10px;
    font-weight: 500;
}
.ic-tpl-card-desc {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.45;
    margin-bottom: 11px;
    flex: 1;
}
.ic-tpl-card-meta {
    display: flex;
    gap: 6px;
    margin-bottom: 11px;
}
.ic-tpl-card-stat {
    font-size: 0.68rem;
    color: rgba(255,255,255,0.42);
    background: rgba(255,255,255,0.04);
    padding: 3px 8px;
    border-radius: 100px;
    font-weight: 500;
}
.ic-tpl-card-btn {
    width: 100%;
    background: linear-gradient(to bottom, #0096db, #007cb5);
    border: none;
    color: #fff;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow:
        0 3px 10px rgba(0,150,219,0.3),
        inset 0 1px 0 rgba(255,255,255,0.2);
    transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}
.ic-tpl-card-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow:
        0 6px 16px rgba(0,150,219,0.45),
        inset 0 1px 0 rgba(255,255,255,0.3);
}
.ic-tpl-card-btn:active {
    transform: translateY(0);
}

/* Responsive — wrap to fewer columns on smaller screens */
@media (max-width: 1100px) {
    .ic-tpl-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
    .ic-tpl-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .ic-tpl-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Help modal — premium guide design
   Distinct from confirm modal: blue glow, gradient stroke, sections
   ============================================================ */
/* ============================================================
   Help guide modal — matches template picker style
   White thick frame, light gray bg, inner stitching line
   ============================================================ */
.ic-help-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5,5,8,0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2200;
    display: flex;
    align-items: center;
    justify-content: center;
    direction: rtl;
    animation: icHelpFadeIn 0.2s ease;
}
@keyframes icHelpFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.ic-help-modal {
    position: relative;
    width: min(720px, 92vw);
    max-height: 86vh;
    background: #d2d2d2;
    border: 12px solid #ffffff;
    border-radius: 28px;
    padding: 0;
    box-shadow:
        0 24px 80px rgba(0,0,0,0.55),
        0 6px 18px rgba(0,0,0,0.3);
    overflow: hidden;
    animation: icHelpModalIn 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2);
    display: flex;
    flex-direction: column;
}
@keyframes icHelpModalIn {
    from { opacity: 0; transform: scale(0.94) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
/* Inner stitching line — runs around the modal just inside the white frame */
.ic-help-modal::before {
    content: '';
    position: absolute;
    inset: 12px;
    border: 1.5px dashed rgba(40,40,40,0.32);
    border-radius: 9px;
    pointer-events: none;
    z-index: 5;
}
/* Header */
.ic-help-header {
    padding: 28px 32px 18px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}
.ic-help-header-row {
    display: flex;
    align-items: center;
    gap: 18px;
}
.ic-help-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 13px;
    background: linear-gradient(135deg, #2a2c33 0%, #14161b 60%, #060709 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 6px 18px rgba(0,0,0,0.35),
        inset 0 1px 0 rgba(255,255,255,0.08);
}
.ic-help-icon svg { width: 26px; height: 26px; color: #fff; }
.ic-help-titles { flex: 1; min-width: 0; }
.ic-help-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #14161b;
    margin: 0 0 4px;
    letter-spacing: -0.01em;
}
.ic-help-subtitle {
    font-size: 0.95rem;
    color: rgba(20,22,27,0.85);
    margin: 0;
    font-weight: 500;
}
/* Body — scrollable section list */
.ic-help-body {
    padding: 8px 32px 26px;
    overflow-y: auto;
    flex: 1;
    text-align: right;
    direction: rtl;
    position: relative;
    z-index: 1;
}
.ic-help-body::-webkit-scrollbar { width: 8px; }
.ic-help-body::-webkit-scrollbar-track { background: transparent; }
.ic-help-body::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.18);
    border-radius: 4px;
}
.ic-help-body::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.32); }

/* Each section sits in its own subtle frame */
.ic-help-section {
    margin-bottom: 14px;
    padding: 16px 18px 14px;
    background: rgba(255,255,255,0.45);
    border-radius: 12px;
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.08),
        0 2px 6px rgba(0,0,0,0.05),
        inset 0 1px 0 rgba(255,255,255,0.6);
}
.ic-help-section:last-child { margin-bottom: 0; }
.ic-help-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #14161b;
    margin: 0 0 10px;
    letter-spacing: -0.005em;
}
.ic-help-section-title .ic-help-icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: linear-gradient(135deg, #2a2c33 0%, #14161b 60%, #060709 100%);
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.08);
}
.ic-help-section-title .ic-help-icon-box svg {
    width: 17px;
    height: 17px;
}
.ic-help-section p {
    margin: 0 0 8px;
    font-size: 0.9rem;
    line-height: 1.7;
    color: rgba(20,22,27,0.78);
    padding-right: 44px;
}
.ic-help-section p:last-child { margin-bottom: 0; }
.ic-help-section strong {
    color: #14161b;
    font-weight: 700;
}
/* Tip block — clean black with subtle inner stitching, matches template notice */
.ic-help-section .ic-help-tip {
    position: relative;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #0a0b0e;
    border-radius: 10px;
    padding: 14px 16px;
    margin: 10px 44px 0 0;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
    line-height: 1.6;
    box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}
.ic-help-tip-emoji {
    flex-shrink: 0;
    font-size: 1.05rem;
    line-height: 1.5;
    z-index: 1;
    position: relative;
}
.ic-help-tip span:not(.ic-help-tip-emoji) {
    flex: 1;
    z-index: 1;
    position: relative;
}
.ic-help-section .ic-help-tip::before {
    content: '';
    position: absolute;
    inset: 5px;
    border: 1px dashed rgba(255,255,255,0.18);
    border-radius: 6px;
    pointer-events: none;
}
.ic-help-section .ic-help-tip strong { color: #fff; }
.ic-help-shortcuts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding-right: 44px;
    margin-top: 10px;
}
.ic-help-shortcut {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    background: rgba(0,0,0,0.06);
    border-radius: 7px;
    font-size: 0.85rem;
    color: rgba(20,22,27,0.78);
}
.ic-help-shortcut kbd {
    display: inline-block;
    padding: 3px 9px;
    background: linear-gradient(180deg, #2a2c33, #14161b);
    border-radius: 5px;
    font-family: 'Inter', monospace;
    font-size: 0.75rem;
    color: #fff;
    direction: ltr;
    box-shadow: 0 2px 4px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.1);
}
/* Footer with close button — centered */
.ic-help-footer {
    padding: 14px 32px 22px;
    display: flex;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}
.ic-help-close-btn {
    padding: 10px 28px;
    background: linear-gradient(to bottom, #0096db, #007cb5);
    color: #fff;
    border: none;
    border-radius: 9px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
    box-shadow:
        0 4px 12px rgba(0,150,219,0.3),
        inset 0 1px 0 rgba(255,255,255,0.2);
}
.ic-help-close-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow:
        0 6px 16px rgba(0,150,219,0.45),
        inset 0 1px 0 rgba(255,255,255,0.3);
}
.ic-help-close-btn:active {
    transform: translateY(0);
}
.ic-sub-btn {
    background: linear-gradient(145deg, #2a2c32, #1a1c20);
    border: none;
    color: rgba(255,255,255,0.55);
    cursor: pointer;
    padding: 0;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    width: 39px;
    height: 39px;
    line-height: 0;
    flex-shrink: 0;
    vertical-align: middle;
    box-shadow:
        2px 2px 5px rgba(0,0,0,0.55),
        -1px -1px 4px rgba(255,255,255,0.025),
        inset 0 1px 0 rgba(255,255,255,0.05);
}
.ic-sub-btn svg {
    display: block;
    width: 19px;
    height: 19px;
    stroke-width: 1.6;
}
.ic-sub-icon {
    display: block;
    height: 19px;
    width: auto;
    max-width: 24px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.65;
    transition: all 0.2s;
}
.ic-sub-btn:hover {
    color: #f0a020;
    transform: translateY(-1px);
    box-shadow:
        3px 3px 7px rgba(0,0,0,0.65),
        -1px -1px 5px rgba(255,255,255,0.035),
        inset 0 1px 0 rgba(255,255,255,0.07);
}
.ic-sub-btn:hover svg {
    filter: drop-shadow(0 0 5px rgba(240,160,32,0.8)) drop-shadow(0 0 2px rgba(240,160,32,0.6));
}
.ic-sub-btn:hover .ic-sub-icon {
    opacity: 1;
    /* Orange tint for PNG icons */
    filter: brightness(0) saturate(100%) invert(70%) sepia(74%) saturate(1050%) hue-rotate(355deg) brightness(98%) contrast(95%)
            drop-shadow(0 0 5px rgba(240,160,32,0.7))
            drop-shadow(0 0 2px rgba(240,160,32,0.5));
}
.ic-sub-btn:active {
    transform: translateY(0);
    box-shadow:
        inset 2px 2px 4px rgba(0,0,0,0.6),
        inset -1px -1px 3px rgba(255,255,255,0.025);
}

body.light-mode .ic-sub-btn { color: rgba(0,0,0,0.4); }
body.light-mode .ic-sub-btn:hover { color: #000; background: rgba(0,0,0,0.05); }

/* ============================================================
   Content area
   ============================================================ */
.ic-content {
    flex: 1;
    overflow: auto;
    position: relative;
    padding: 2rem;
    box-sizing: border-box;
}

/* Empty state */
.ic-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    gap: 16px;
    color: rgba(255,255,255,0.4);
}
.ic-empty-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: rgba(255,255,255,0.7);
}
.ic-empty-desc {
    font-size: 0.92rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.35);
    max-width: 380px;
}

/* Modes inherit transparent background from overlay */
.ic-mode-beat-board,
.ic-mode-scene-cards,
.ic-mode-treatment {
    background: transparent;
}

/* Hide card numbers when toggle is off */
.bb-board.bb-no-numbers .bb-mini-num,
.bb-board.bb-no-numbers .bb-card-num { display: none; }

/* Drag & drop visual feedback */
.bb-dragging { opacity: 0.35; }

/* Card needs to be relative for drop indicators */
.bb-card-mini { position: relative; }

/* Card transitions — only box-shadow for hover, no transform animation during drag */
.bb-card-mini {
    transition: box-shadow 0.18s ease;
}

/* Drop indicator — line at insertion point */
.bb-card-mini.bb-drop-before::before,
.bb-card-mini.bb-drop-after::after {
    content: '';
    position: absolute;
    background: var(--accent);
    box-shadow: 0 0 12px rgba(0,150,219,0.9), 0 0 4px rgba(0,150,219,1);
    border-radius: 3px;
    z-index: 10;
    pointer-events: none;
    animation: bbDropPulse 1s ease-in-out infinite;
}
@keyframes bbDropPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

/* Horizontal layout: vertical line in the gap */
.bb-board.bb-layout-horizontal .bb-card-mini.bb-drop-before::before {
    top: -6px;
    bottom: -6px;
    right: -8px;
    width: 4px;
}
.bb-board.bb-layout-horizontal .bb-card-mini.bb-drop-after::after {
    top: -6px;
    bottom: -6px;
    left: -8px;
    width: 4px;
}

/* Vertical layout: horizontal line in the gap */
.bb-board.bb-layout-vertical .bb-card-mini.bb-drop-before::before {
    left: -6px;
    right: -6px;
    top: -8px;
    height: 4px;
}
.bb-board.bb-layout-vertical .bb-card-mini.bb-drop-after::after {
    left: -6px;
    right: -6px;
    bottom: -8px;
    height: 4px;
}

/* Swap mode — when cursor is in center, full overlay glow */
.bb-card-mini.bb-drop-swap {
    box-shadow:
        0 0 0 3px var(--accent),
        0 0 24px rgba(0,150,219,0.6),
        0 8px 20px rgba(0,0,0,0.5) !important;
    transform: scale(1.04);
    transition: transform 0.15s, box-shadow 0.15s;
}
.bb-card-mini[draggable="true"] { cursor: grab; }
.bb-card-mini[draggable="true"]:active { cursor: grabbing; }
.bb-act[draggable="true"] .bb-act-header { cursor: grab; }
.bb-act[draggable="true"]:active .bb-act-header { cursor: grabbing; }

/* ============================================================
   Confirm modal (delete card / act)
   ============================================================ */
.bb-confirm-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 2200;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    direction: rtl;
    animation: icFadeIn 0.18s ease;
}
.bb-confirm-modal {
    width: 360px;
    background: linear-gradient(to bottom, #1c1c1e, #0a0a0a);
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 24px 60px rgba(0,0,0,0.7);
    padding: 28px 32px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: bbCardIn 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.bb-confirm-icon {
    margin-bottom: 14px;
    opacity: 0.85;
}
.bb-confirm-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #cc3333;
    margin-bottom: 10px;
}
.bb-confirm-message {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.55);
    line-height: 1.6;
    margin-bottom: 22px;
}
.bb-confirm-actions {
    display: flex;
    gap: 10px;
    width: 100%;
}
.bb-confirm-yes,
.bb-confirm-no {
    flex: 1;
    border: none;
    cursor: pointer;
    padding: 9px 0;
    border-radius: 8px;
    font-size: 0.88rem;
    font-family: inherit;
    font-weight: 600;
    transition: all 0.15s;
}
.bb-confirm-yes {
    background: linear-gradient(135deg, #7f2222, #5c1a1a);
    color: rgba(255,255,255,0.92);
    box-shadow: 0 2px 8px rgba(120,30,30,0.3);
}
.bb-confirm-yes:hover {
    background: linear-gradient(135deg, #992a2a, #7f2222);
    transform: translateY(-1px);
}
.bb-confirm-no {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.65);
}
.bb-confirm-no:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}

/* ============================================================
   Beat Board — horizontal columns of acts with cards
   ============================================================ */
.bb-board {
    display: flex;
    padding: 0;
    direction: rtl;
    width: max-content;
    box-sizing: border-box;
}
/* Horizontal layout — acts stacked vertically, cards in horizontal rows */
.bb-board.bb-layout-horizontal {
    flex-direction: column;
    gap: 32px;
}
/* Vertical layout — acts side by side as columns, cards stacked vertically */
.bb-board.bb-layout-vertical {
    flex-direction: row;
    gap: 28px;
    align-items: flex-start;
    margin-left: auto;
    margin-right: auto;
}
.bb-board.bb-layout-vertical .bb-act-cards-row {
    flex-direction: column;
    gap: 14px;
    direction: rtl;
    padding-bottom: 0;
}
.bb-board.bb-layout-vertical .bb-add-card {
    height: 50px;
}
/* Rows wrapper — column in horizontal mode, row in vertical mode */
.bb-act-rows {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.bb-board.bb-layout-horizontal .bb-act-rows {
    flex-direction: column;
}
.bb-board.bb-layout-vertical .bb-act-rows {
    flex-direction: row;
    gap: 18px;
}
/* Multi-row act in vertical mode — header spans full width across the columns */
.bb-board.bb-layout-vertical .bb-act-multi-row { align-items: stretch; }
.bb-board.bb-layout-vertical .bb-act-multi-row > .bb-act-header {
    width: auto;
    max-width: none;
}

.bb-act {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: flex-start;
}
/* Spacer card at the end of every row — pushes the cards away from the left edge */
.bb-act-cards-row > .bb-spacer {
    flex: 0 0 32px;
    height: 1px;
}
.bb-act > .bb-act-header { align-self: flex-start; margin-right: 0; }
.bb-act-cards-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    align-self: flex-start;
    gap: 14px;
    direction: rtl;
    padding-bottom: 0;
    flex-wrap: nowrap;
    width: max-content;
}
.bb-board.bb-layout-vertical .bb-act-cards-row {
    padding-left: 0;
}
/* Spacer at the end (visual left in RTL) so cards don't touch the viewport edge */
.bb-act-cards-row::-webkit-scrollbar-track { background: transparent; }

/* Act header — colored block on RIGHT, white body extending left */
.bb-act-header {
    display: flex;
    align-items: stretch;
    width: 260px;
    min-width: 260px;
    max-width: 260px;
    height: 32px;
    flex-shrink: 0;
    background: linear-gradient(to bottom, #ffffff 0%, #f3f3f5 100%);
    border-radius: 2px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.45), 0 1px 2px rgba(0,0,0,0.3);
    overflow: hidden;
    direction: rtl;
    --act-color: #374a6e;
}
.bb-act-num-block {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px 0 22px;
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--act-color), #000 18%) 0%,
        var(--act-color) 100%);
    color: #fff;
    flex-shrink: 0;
    /* Diagonal cut on the LEFT edge (since it's on the right side in RTL) */
    clip-path: polygon(0 0, 100% 0, 100% 100%, 12px 100%);
    position: relative;
}
.bb-act-num {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    outline: none;
    cursor: text;
    min-width: 1ch;
    padding: 2px 4px;
    border-radius: 4px;
    transition: background 0.15s;
    /* Center any 1–3 character value */
    text-align: center;
}
.bb-act-num:hover {
    background: rgba(255,255,255,0.12);
}
.bb-act-num.bb-act-num-editing {
    background: rgba(255,255,255,0.18);
}
.bb-act-body {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 12px 0 6px;
    min-width: 0;
}
.bb-act-title {
    color: #1a1a1f;
    font-size: 0.85rem;
    font-weight: 700;
    outline: none;
    cursor: text;
    padding: 2px 5px;
    border-radius: 3px;
    transition: background 0.12s;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bb-act-title:hover { background: rgba(0,0,0,0.04); }
.bb-act-title:focus { background: rgba(0,0,0,0.08); }
.bb-act-title:empty::before {
    content: attr(data-placeholder);
    color: rgba(0,0,0,0.3);
    font-weight: 500;
    font-style: italic;
    pointer-events: none;
}
.bb-act-title.bb-act-title-editing {
    text-overflow: clip;
    overflow-x: auto;
    overflow-y: hidden;
    direction: rtl;
    white-space: nowrap;
}
.bb-act-title.bb-act-title-editing::-webkit-scrollbar { display: none; }
.bb-act-actions {
    display: flex;
    align-items: center;
    gap: 1px;
    padding: 0 6px 0 4px;
    flex-shrink: 0;
}
.bb-act-color-btn,
.bb-act-del {
    background: none;
    border: none;
    color: rgba(0,0,0,0.35);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    transition: all 0.12s;
}
.bb-act-color-btn:hover { color: var(--act-color); background: rgba(0,0,0,0.04); }
.bb-act-del:hover { color: #cc3333; background: rgba(204,51,51,0.08); }

/* Act color picker */
.bb-act-color-picker {
    position: fixed;
    z-index: 2100;
    background: #1a1a1f;
    border-radius: 10px;
    padding: 8px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.7);
    display: flex;
    gap: 6px;
    direction: rtl;
}
.bb-act-color-sw {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 1px 4px rgba(0,0,0,0.4);
    transition: transform 0.12s;
}
.bb-act-color-sw:hover { transform: scale(1.15); }

/* Cards container */
.bb-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ============================================================
   Mini card — IMPORTANT! Must keep EXACT proportions of big card.
   Big card: 560 wide × 328 tall  →  ratio 0.586
   Mini:     260 wide × 152 tall  →  ratio 0.586  ✓
   Big header: 62px (19% of total)  →  Mini header: 29px
   Big body: 266px (81% of total)   →  Mini body: 123px
   DO NOT CHANGE these dimensions without recalculating the ratio.
   ============================================================ */
.bb-card-mini {
    width: 260px;
    height: 152px; /* 29 header + 123 body area (110 lines + 13 margin) */
    background:
        radial-gradient(ellipse at top right, #ffffff 0%, #fafaf7 60%, #ececea 100%);
    border-radius: 2px;
    box-shadow:
        0 4px 12px rgba(0,0,0,0.5),
        0 1px 2px rgba(0,0,0,0.4),
        inset 0 1px 0 rgba(255,255,255,0.7);
    display: flex;
    flex-direction: column;
    overflow: visible;
    align-self: center;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.bb-card-mini {
    position: relative;
}
.bb-card-mini:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 20px rgba(0,0,0,0.6),
        0 2px 4px rgba(0,0,0,0.4),
        inset 0 1px 0 rgba(255,255,255,0.7);
}
.bb-mini-actions {
    position: absolute;
    bottom: 6px;
    left: 6px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.15s;
}
.bb-card-mini:hover .bb-mini-actions { opacity: 1; }
.bb-mini-action {
    background: rgba(255,255,255,0.85);
    border: none;
    color: rgba(0,0,0,0.55);
    cursor: pointer;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.35);
    transition: all 0.12s;
}
.bb-mini-action:hover {
    background: #fff;
    transform: scale(1.1);
}
.bb-mini-color:hover { color: #1a3a5c; }
.bb-mini-del:hover { color: #cc3333; }
/* IMPORTANT! Mini header is locked at 29px to maintain ratio with big card */
.bb-mini-header {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 29px;
    flex-shrink: 0;
    padding: 0 11px;
    border-bottom: 1.4px solid rgba(180,30,30,0.55);
    box-shadow: 0 0.5px 0 rgba(180,30,30,0.18);
}
.bb-mini-num {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #1a1a1f;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.bb-mini-title {
    flex: 1;
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1f;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1;
}
.bb-mini-title-empty {
    color: rgba(0,0,0,0.25);
    font-style: italic;
    font-weight: 500;
}
/* IMPORTANT! Mini body — exactly 5 visible lines, then bold ellipsis */
.bb-mini-body-wrap {
    overflow: hidden;
    padding: 5px 12px 8px;
    background-image: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 21px,
        rgba(180,140,80,0.32) 21px,
        rgba(180,140,80,0.32) 22px
    );
    background-position: 0 5px;
    background-size: 100% 110px;
    background-repeat: no-repeat;
}
.bb-mini-body {
    height: 110px; /* exactly 5 lines × 22px */
    color: #2a1f10;
    font-size: 14.5px;
    line-height: 22px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    word-wrap: break-word;
    word-break: break-word;
    font-weight: 500;
}
/* Bold ellipsis trick — won't change real chars but the overflow ellipsis inherits font-weight */

/* Card header — like a notebook line */
.bb-card-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px 6px;
    border-bottom: 1.5px solid rgba(180,30,30,0.55);
    box-shadow: 0 1px 0 rgba(180,30,30,0.18);
    background: linear-gradient(to bottom, rgba(255,255,255,0.3), transparent);
}
.bb-card .bb-card-num {
    font-size: 0.62rem;
    font-weight: 700;
    color: #fff;
    background: #1a1a1f;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.bb-card-big .bb-card-num {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    background: #1a1a1f;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.4);
}
.bb-card-title {
    flex: 1;
    font-size: 0.55rem;
    font-weight: 700;
    color: #2a1f10;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Card body */
.bb-card-body {
    height: 168px; /* exactly 9 lines × ~18.66px */
    padding: 0 14px 9px;
    font-size: 10.5px;
    line-height: 18.66px;
    color: #3a2e1f;
    overflow: hidden;
    background-image: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 17.66px,
        rgba(180,140,80,0.25) 17.66px,
        rgba(180,140,80,0.25) 18.66px
    );
    background-position: 0 0;
    background-size: 100% 168px;
    background-repeat: no-repeat;
    word-wrap: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 9;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}
.bb-card-title-empty {
    color: rgba(0,0,0,0.25);
    font-style: italic;
    font-weight: 500;
}

/* Make small card content non-clickable so the card itself opens the modal */
.bb-card * { pointer-events: none; }

/* ============================================================
   Big card modal
   ============================================================ */
.bb-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 2000;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    animation: icFadeIn 0.18s ease;
}
.bb-card-big {
    width: 560px;
    background:
        radial-gradient(ellipse at top right, #ffffff 0%, #fafaf7 60%, #ececea 100%);
    border-radius: 2px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.6);
    display: flex;
    flex-direction: column;
    overflow: visible;
    position: relative;
    animation: bbCardIn 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes bbCardIn {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
}
.bb-card-big-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 24px 16px;
    border-bottom: 2px solid rgba(180,30,30,0.55);
    box-shadow: 0 1px 0 rgba(180,30,30,0.18);
}
.bb-card-big-header .bb-card-num {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
}
.bb-card-big-title {
    flex: 1;
    background: transparent;
    border: none;
    color: #1a1a1f;
    font-family: inherit;
    font-size: 1.4rem;
    font-weight: 700;
    outline: none;
    direction: rtl;
}
.bb-card-big-title::placeholder { color: rgba(0,0,0,0.25); }
.bb-card-big-body {
    height: 252px; /* 9 lines × 28px */
    box-sizing: content-box;
    padding: 0 24px 14px; /* 14px bottom = half line margin */
    background: transparent;
    border: none;
    color: #2a1f10;
    font-family: inherit;
    font-size: 16px;
    line-height: 28px;
    outline: none;
    resize: none;
    direction: rtl;
    background-image: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 27px,
        rgba(180,140,80,0.28) 27px,
        rgba(180,140,80,0.28) 28px
    );
    background-position: 0 0;
    background-size: 100% 252px;
    background-repeat: no-repeat;
    overflow: hidden;
}
.bb-card-big-body::placeholder { color: rgba(120,80,30,0.35); font-style: italic; }

.bb-card-color-btn {
    background: none;
    border: none;
    color: rgba(0,0,0,0.4);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
    flex-shrink: 0;
}
.bb-card-color-btn:hover { color: #1a1a1f; }

/* Color picker dropdown */
.bb-color-picker {
    position: fixed;
    z-index: 2100;
    background: linear-gradient(to bottom, #1c1c1e, #0a0a0a);
    border-radius: 10px;
    padding: 6px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.06);
    min-width: 160px;
    direction: rtl;
    animation: icFadeIn 0.12s ease;
}
.bb-color-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 6px;
    cursor: pointer;
    color: rgba(255,255,255,0.7);
    font-size: 0.82rem;
    transition: all 0.1s;
}
.bb-color-item:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
}
.bb-color-swatch {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.2);
}
.bb-color-swatch-clear {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

.bb-card-confirm {
    background: linear-gradient(145deg, #1eb0ee, #0096db);
    border: none;
    color: #fff;
    cursor: pointer;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0,150,219,0.4), inset 0 1px 0 rgba(255,255,255,0.2);
    transition: all 0.18s;
}
.bb-card-confirm:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 12px 32px rgba(0,150,219,0.55), inset 0 1px 0 rgba(255,255,255,0.25);
}
.bb-card-confirm:active {
    transform: translateY(0);
}

/* Split add button — right half = card, left half = row */
.bb-add-card-split {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    flex-direction: row !important;
    gap: 6px !important;
    border-radius: 2px;
}
.bb-add-half {
    flex: 1;
    height: 100%;
    background: rgba(255,255,255,0.05);
    border: 1.5px dashed rgba(255,255,255,0.25);
    border-radius: 2px;
    color: rgba(255,255,255,0.65);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    transition: all 0.15s;
}
.bb-add-half:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.45);
    color: #fff;
}

/* Add card button — same dimensions as a card */
.bb-add-card {
    background: rgba(255,255,255,0.05);
    border: 1.5px dashed rgba(255,255,255,0.25);
    color: rgba(255,255,255,0.65);
    cursor: pointer;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    transition: all 0.15s;
    width: 260px;
    height: 152px;
    flex-shrink: 0;
}
.bb-add-card:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.45);
    color: #fff;
}

/* Light mode */
body.light-mode .ic-overlay {
    background: linear-gradient(to bottom, #f5f5f7 0%, #ececef 100%);
}
body.light-mode .ic-toolbar {
    background: linear-gradient(to bottom, #ffffff, #f0f0f3);
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
body.light-mode .ic-tb-btn {
    background: rgba(0,0,0,0.04);
    color: rgba(0,0,0,0.6);
}
body.light-mode .ic-tb-btn:hover {
    background: rgba(0,0,0,0.08);
    color: rgba(0,0,0,0.95);
}
body.light-mode .ic-tabs {
    background: rgba(0,0,0,0.05);
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.08);
}
body.light-mode .ic-tab { color: rgba(0,0,0,0.45); }
body.light-mode .ic-tab:hover { color: rgba(0,0,0,0.85); }
body.light-mode .ic-tab-active {
    background: linear-gradient(to bottom, #fff, #f0f0f3);
    color: #000;
}
body.light-mode .ic-empty-title { color: rgba(0,0,0,0.6); }
body.light-mode .ic-empty-desc { color: rgba(0,0,0,0.35); }

/* ============================================================
   Help guide modal — ALTERNATE STYLE (original dark/blue version)
   Available alongside the new light style for comparison
   ============================================================ */
.ic-help2-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4,6,12,0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2200;
    display: flex;
    align-items: center;
    justify-content: center;
    direction: rtl;
    animation: icHelp2FadeIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes icHelp2FadeIn { from { opacity: 0; } to { opacity: 1; } }
.ic-help2-modal {
    position: relative;
    width: min(640px, 92vw);
    max-height: 86vh;
    background: linear-gradient(160deg, #1a2332 0%, #0f1620 60%, #0a1018 100%);
    border-radius: 18px;
    padding: 0;
    box-shadow:
        0 30px 80px rgba(0,0,0,0.75),
        0 0 0 1px rgba(0,150,219,0.25),
        0 0 60px rgba(0,150,219,0.18),
        inset 0 1px 0 rgba(255,255,255,0.06);
    overflow: hidden;
    animation: icHelp2ModalIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}
@keyframes icHelp2ModalIn {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.ic-help2-modal::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 18px;
    padding: 1.5px;
    background: linear-gradient(135deg,
        rgba(0,150,219,0.85) 0%,
        rgba(64,200,255,0.4) 25%,
        rgba(0,150,219,0.15) 50%,
        rgba(64,200,255,0.4) 75%,
        rgba(0,150,219,0.85) 100%);
    background-size: 300% 300%;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    animation: icHelp2BorderShift 8s linear infinite;
}
@keyframes icHelp2BorderShift {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}
.ic-help2-header {
    padding: 28px 32px 22px;
    background:
        linear-gradient(180deg, rgba(0,150,219,0.12) 0%, transparent 100%),
        radial-gradient(ellipse at top right, rgba(64,200,255,0.15), transparent 70%);
    border-bottom: 1px solid rgba(0,150,219,0.18);
    flex-shrink: 0;
    position: relative;
}
.ic-help2-header-row { display: flex; align-items: center; gap: 16px; }
.ic-help2-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(145deg, #0096db, #006fa3);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 8px 24px rgba(0,150,219,0.45),
        inset 0 1px 0 rgba(255,255,255,0.25);
}
.ic-help2-icon svg { width: 28px; height: 28px; color: #fff; }
.ic-help2-titles { flex: 1; min-width: 0; }
.ic-help2-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px;
    letter-spacing: 0.01em;
    background: linear-gradient(180deg, #fff 0%, #cfe8f5 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.ic-help2-subtitle {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.55);
    margin: 0;
    font-weight: 500;
}
.ic-help2-body {
    padding: 22px 32px 26px;
    overflow-y: auto;
    flex: 1;
    text-align: right;
    direction: rtl;
}
.ic-help2-body::-webkit-scrollbar { width: 8px; }
.ic-help2-body::-webkit-scrollbar-track { background: transparent; }
.ic-help2-body::-webkit-scrollbar-thumb {
    background: rgba(0,150,219,0.25);
    border-radius: 4px;
}
.ic-help2-body::-webkit-scrollbar-thumb:hover { background: rgba(0,150,219,0.45); }

.ic-help2-section { margin-bottom: 22px; }
.ic-help2-section:last-child { margin-bottom: 0; }
.ic-help2-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.02rem;
    font-weight: 700;
    color: #6fc8ee;
    margin: 0 0 10px;
    letter-spacing: 0.01em;
}
.ic-help2-section-title .ic-help2-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    background: linear-gradient(145deg, rgba(0,150,219,0.25), rgba(0,150,219,0.1));
    border: 1px solid rgba(0,150,219,0.35);
    color: #aedcf0;
    font-size: 0.78rem;
    font-weight: 700;
    flex-shrink: 0;
}
.ic-help2-section p {
    margin: 0 0 8px;
    font-size: 0.9rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.78);
    padding-right: 34px;
}
.ic-help2-section p:last-child { margin-bottom: 0; }
.ic-help2-section strong { color: #fff; font-weight: 600; }
.ic-help2-section .ic-help2-tip {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: rgba(0,150,219,0.07);
    border-right: 3px solid rgba(0,150,219,0.6);
    border-radius: 6px;
    padding: 10px 14px;
    margin: 8px 34px 0 0;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.6;
}
.ic-help2-section .ic-help2-tip::before {
    content: '\1F4A1';
    flex-shrink: 0;
    font-size: 1rem;
    line-height: 1.4;
}
.ic-help2-shortcuts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding-right: 34px;
    margin-top: 8px;
}
.ic-help2-shortcut {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(255,255,255,0.04);
    border-radius: 6px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.75);
}
.ic-help2-shortcut kbd {
    display: inline-block;
    padding: 2px 8px;
    background: linear-gradient(180deg, #2a3240, #1a2030);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 4px;
    font-family: 'Inter', monospace;
    font-size: 0.75rem;
    color: #cfe8f5;
    direction: ltr;
    box-shadow: 0 1px 0 rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05);
}
.ic-help2-footer {
    padding: 18px 32px 24px;
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid rgba(255,255,255,0.05);
    background: linear-gradient(0deg, rgba(0,0,0,0.25), transparent);
    flex-shrink: 0;
}
.ic-help2-close-btn {
    padding: 11px 28px;
    background: linear-gradient(145deg, #0096db, #006fa3);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow:
        0 6px 18px rgba(0,150,219,0.4),
        inset 0 1px 0 rgba(255,255,255,0.2);
}
.ic-help2-close-btn:hover {
    transform: translateY(-1px);
    box-shadow:
        0 10px 26px rgba(0,150,219,0.55),
        inset 0 1px 0 rgba(255,255,255,0.25);
}
.ic-help2-close-btn:active { transform: translateY(0); }

/* ============================================================
   Outline view — bird's-eye compact list
   ============================================================ */
.bb-board.bb-layout-outline {
    flex-direction: column;
    gap: 28px;
    width: 820px;
    margin-left: auto;
    margin-right: auto;
    padding: 10px 0;
}

/* Act in outline — reuses bb-act base, vertical column */
.bb-outline-act {
    gap: 10px !important;
}
/* Act header stretches to outline width */
.bb-outline-act > .bb-act-header {
    width: 820px;
    min-width: 820px;
    max-width: 820px;
    height: 36px;
}

/* Cards container */
.bb-outline-cards {
    display: flex;
    flex-direction: column;
    gap: 4px;
    direction: rtl;
    width: 820px;
}

/* Individual card row */
.bb-outline-row {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 7px 16px;
    background: radial-gradient(ellipse at top right, #d5ccb8 0%, #c9c0ab 60%, #bdb49e 100%);
    border-radius: 2px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.35), 0 1px 2px rgba(0,0,0,0.25);
    cursor: pointer;
    transition: background 0.15s;
    direction: rtl;
    --chip-color: transparent;
    border-right: 3px solid var(--chip-color);
    position: relative;
    height: 38px;
}
.bb-outline-row:hover {
    background: radial-gradient(ellipse at top right, #cfc6b0 0%, #c4bba4 60%, #b8af98 100%);
}
.bb-outline-row[draggable="true"] { cursor: grab; }
.bb-outline-row[draggable="true"]:active { cursor: grabbing; }

.bb-outline-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #1a1a1f;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.bb-board.bb-no-numbers .bb-outline-num { display: none; }

.bb-outline-title {
    color: #1a1a1f;
    font-size: 0.92rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bb-outline-title:empty::after {
    content: 'ללא כותרת';
    color: rgba(0,0,0,0.25);
    font-style: italic;
    font-weight: 500;
}

/* Separator dot between title and body */
.bb-outline-sep {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.bb-outline-body {
    flex: 1;
    color: rgba(0,0,0,0.82);
    font-size: 0.88rem;
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

/* Drag feedback — line above/below */
.bb-outline-row.bb-dragging { opacity: 0.3; }

.bb-outline-row.bb-outline-drop-before::before,
.bb-outline-row.bb-outline-drop-after::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
    box-shadow: 0 0 10px rgba(0,150,219,0.8);
    border-radius: 2px;
    z-index: 10;
    pointer-events: none;
}
.bb-outline-row.bb-outline-drop-before::before { top: -2px; }
.bb-outline-row.bb-outline-drop-after::after { bottom: -2px; }

/* Search dimming in outline */
.bb-outline-row.bb-card-dim { opacity: 0.15; }
.bb-outline-row.bb-card-match { opacity: 1; }

/* Modal navigation arrows — positioned relative to the card */
.bb-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.08);
    border: none;
    color: rgba(255,255,255,0.5);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    z-index: 10;
}
.bb-modal-nav:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
    transform: translateY(-50%) scale(1.1);
}
.bb-modal-nav-right { right: -48px; }
.bb-modal-nav-left { left: -48px; }

/* Slide animation for card transitions */

/* Keyboard focus highlight */
.bb-card-mini.bb-card-focused {
    box-shadow:
        0 0 0 2px var(--accent),
        0 0 14px rgba(0,150,219,0.35),
        0 4px 12px rgba(0,0,0,0.5) !important;
    transform: translateY(-2px);
}
.bb-outline-row.bb-card-focused {
    box-shadow:
        0 0 0 2px var(--accent),
        0 0 10px rgba(0,150,219,0.25) !important;
}

/* ============================================================
   Status flags — badge on card header & outline row
   ============================================================ */

/* Badge on mini card header */
.bb-mini-status-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 4px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

/* Status picker popup — reuses color-picker style */
.bb-status-picker {
    position: fixed;
    z-index: 2100;
    background: linear-gradient(to bottom, #1c1c1e, #0a0a0a);
    border-radius: 10px;
    padding: 6px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.06);
    min-width: 160px;
    direction: rtl;
    animation: icFadeIn 0.12s ease;
}
.bb-status-active {
    background: rgba(255,255,255,0.08);
}
.bb-status-swatch {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Status button in card modal header — single icon */
.bb-card-big-status-bar {
    display: flex;
    align-items: center;
    margin-right: auto;
    margin-left: -12px;
}
.bb-card-status-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: none;
    color: rgba(0,0,0,0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    padding: 0;
}
.bb-card-status-btn:hover {
    color: #1a1a1f;
}
.bb-card-status-btn.bb-card-status-active {
    background: var(--st-color);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.bb-card-status-btn.bb-card-status-active:hover {
    opacity: 0.85;
    color: #fff;
}

/* ============================================================
   Multi-select — visual feedback & floating action bar
   ============================================================ */

/* Selected card glow */
.bb-card-mini.bb-selected {
    box-shadow:
        0 0 0 2px var(--accent),
        0 0 16px rgba(0,150,219,0.4),
        0 4px 12px rgba(0,0,0,0.5) !important;
    transform: translateY(-2px);
}
.bb-outline-row.bb-selected {
    box-shadow:
        0 0 0 2px var(--accent),
        0 0 12px rgba(0,150,219,0.3) !important;
    background: rgba(0,150,219,0.08) !important;
}

/* Floating selection bar */
.bb-selection-bar {
    position: sticky;
    bottom: 16px;
    left: 50%;
    width: fit-content;
    margin: 16px auto 0;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 20px;
    background: linear-gradient(to bottom, #2a2a2f, #111114);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.06);
    direction: rtl;
    z-index: 100;
    animation: icFadeIn 0.15s ease;
}
.bb-sel-count {
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
}
.bb-sel-actions {
    display: flex;
    gap: 6px;
}
.bb-sel-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.12s;
}
.bb-sel-btn:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
    transform: scale(1.08);
}
.bb-sel-delete:hover { color: #dc4a5a; background: rgba(220,74,90,0.15); }
.bb-sel-color:hover { color: #3fb8b8; }
.bb-sel-status:hover { color: #1a8a2a; }


/* ============================================================
   Outline notice — gentle info popup
   ============================================================ */
.bb-notice-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 2200;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: icFadeIn 0.15s ease;
}
.bb-notice {
    background: linear-gradient(to bottom, #2a2a2f, #111114);
    border-radius: 12px;
    padding: 28px 32px 24px;
    max-width: 380px;
    width: 90%;
    text-align: center;
    direction: rtl;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    animation: icFadeIn 0.2s ease;
    position: relative;
}
.bb-notice::before {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: 8px;
    border: 1.5px dashed rgba(255,255,255,0.1);
    pointer-events: none;
}
.bb-notice-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    margin-bottom: 10px;
}
.bb-notice-msg {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.55);
    line-height: 1.6;
    margin-bottom: 20px;
}
.bb-notice-btn {
    background: linear-gradient(145deg, #1eb0ee, #0096db);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 32px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.12s;
    box-shadow: 0 4px 16px rgba(0,150,219,0.4);
}
.bb-notice-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0,150,219,0.5);
}
}

/* ============================================================
   Print dialog — all styles inline in JS
   ============================================================ */

/* ============================================================
   Scene Cards Board
   ============================================================ */
.sc-board {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    padding: 0;
    direction: rtl;
}
.sc-card {
    width: 260px;
    height: 152px;
    background: radial-gradient(ellipse at top right, #ffffff 0%, #fafaf7 60%, #ececea 100%);
    border-radius: 2px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5), 0 1px 2px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.7);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    position: relative;
}
.sc-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.6), 0 2px 4px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.7);
}
.sc-card[draggable="true"] { cursor: grab; }
.sc-card[draggable="true"]:active { cursor: grabbing; }
.sc-dragging { opacity: 0.35; }

/* Drop indicators */
.sc-card.sc-drop-before::before,
.sc-card.sc-drop-after::after {
    content: '';
    position: absolute;
    top: -6px; bottom: -6px;
    width: 4px;
    background: var(--accent);
    box-shadow: 0 0 12px rgba(0,150,219,0.9);
    border-radius: 3px;
    z-index: 10;
    pointer-events: none;
}
.sc-card.sc-drop-before::before { right: -10px; }
.sc-card.sc-drop-after::after { left: -10px; }

/* Header */
.sc-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 29px;
    flex-shrink: 0;
    padding: 0 11px;
    border-bottom: 1.4px solid rgba(180,30,30,0.55);
    box-shadow: 0 0.5px 0 rgba(180,30,30,0.18);
}
.sc-card-num {
    width: 18px; height: 18px; border-radius: 50%;
    background: #1a1a1f; color: #fff;
    font-size: 10px; font-weight: 700; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.sc-card-title {
    flex: 1; font-size: 13px; font-weight: 700; color: #1a1a1f;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1;
}
.sc-card-status { margin-right: auto; flex-shrink: 0; }

/* Body preview */
.sc-card-body {
    flex: 1; padding: 5px 12px;
    background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 21px, rgba(180,140,80,0.32) 21px, rgba(180,140,80,0.32) 22px);
    background-position: 0 5px;
    background-size: 100% 88px;
    background-repeat: no-repeat;
}
.sc-card-preview {
    color: #2a1f10; font-size: 13px; line-height: 22px;
    overflow: hidden; height: 88px;
    display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
    text-overflow: ellipsis; word-wrap: break-word; font-weight: 400;
}

/* Footer */
.sc-card-footer {
    padding: 0 11px 4px;
    display: flex; justify-content: flex-end;
}
.sc-card-lines {
    font-size: 10px; color: rgba(0,0,0,0.3); font-weight: 500;
}

/* ============================================================
   Scene Preview Modal
   ============================================================ */
.sc-preview-modal {
    width: 560px;
    max-height: 80vh;
    background: radial-gradient(ellipse at top right, #ffffff 0%, #fafaf7 60%, #ececea 100%);
    border-radius: 4px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.6);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}
.sc-prev-header {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 18px;
    border-bottom: 1.5px solid rgba(180,30,30,0.55);
    flex-shrink: 0;
}
.sc-prev-num {
    width: 24px; height: 24px; border-radius: 50%;
    background: #1a1a1f; color: #fff;
    font-size: 12px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.sc-prev-title {
    font-size: 16px; font-weight: 700; color: #1a1a1f;
}
.sc-prev-content {
    flex: 1; overflow-y: auto;
    padding: 14px 20px;
    direction: rtl;
}
.sc-prev-line {
    font-size: 14px; line-height: 1.6; color: #1a1a1f;
    padding: 2px 0;
}
.sc-prev-action { text-align: right; }
.sc-prev-character { text-align: center; font-weight: 700; text-transform: uppercase; }
.sc-prev-dialogue { text-align: center; padding: 0 60px; }
.sc-prev-parenthetical { text-align: center; color: #555; font-style: italic; }
.sc-prev-transition { text-align: left; font-weight: 700; }
.sc-prev-empty { text-align: center; color: rgba(0,0,0,0.3); font-style: italic; padding: 40px; }

.sc-prev-actions {
    display: flex; gap: 10px; padding: 12px 20px;
    border-top: 1px solid rgba(0,0,0,0.08);
    justify-content: center;
}
.sc-prev-goto {
    background: linear-gradient(135deg, var(--accent) 0%, #1e94d0 100%);
    color: #fff; border: none; border-radius: 8px;
    padding: 8px 20px; font-size: 0.85rem; font-weight: 700;
    cursor: pointer; transition: all 0.15s;
}
.sc-prev-goto:hover { box-shadow: 0 4px 14px rgba(0,150,219,0.4); }
.sc-prev-del {
    background: none; color: rgba(0,0,0,0.35); border: none;
    padding: 8px 16px; font-size: 0.85rem; font-weight: 600;
    cursor: pointer; transition: color 0.15s;
}
.sc-prev-del:hover { color: #cc3333; }

/* Scene card hover actions — reuse beat board mini-actions */
.sc-card .bb-mini-actions { opacity: 0; }
.sc-card:hover .bb-mini-actions { opacity: 1; }
.sc-action-color:hover { color: #1a3a5c !important; }
.sc-action-del:hover { color: #cc3333 !important; }

/* Scene cards drop placeholder hover */
.sc-drop-target.sc-drop-hover {
    background: rgba(0,150,219,0.12) !important;
    border-color: var(--accent) !important;
    color: var(--accent) !important;
}
