/* =========================================================================
   SELFBOOTH — phòng lab phim đêm.
   Nền mực ấm + grain + vignette, điểm nhấn chartreuse #c9f24e & coral #ff5d73.
   Display: Archivo Black (local) · Mono: Space Mono · Wordmark: Pacifico (local)
   ========================================================================= */

@font-face {
    font-family: 'Archivo';
    src: url('/fonts/Archivo/static/Archivo-Black.ttf') format('truetype');
    font-weight: 900;
    font-display: swap;
}
@font-face {
    font-family: 'Archivo';
    src: url('/fonts/Archivo/static/Archivo-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-display: swap;
}
@font-face {
    font-family: 'ArchivoExp';
    src: url('/fonts/Archivo/static/Archivo_Expanded-Black.ttf') format('truetype');
    font-weight: 900;
    font-display: swap;
}
@font-face {
    font-family: 'Pacifico';
    src: url('/fonts/Pacifico/Pacifico-Regular.ttf') format('truetype');
    font-display: swap;
}

:root {
    --ink: #0c0c0e;
    --ink-2: #141417;
    --ink-3: #1d1d22;
    --line: #2a2a30;
    --paper: #f4f1ea;
    --muted: #8c8b86;
    --lime: #c9f24e;
    --lime-dim: #9fc23a;
    --coral: #ff5d73;
    --mono: 'Space Mono', ui-monospace, monospace;
    --disp: 'ArchivoExp', 'Archivo', system-ui, sans-serif;
    --body: 'Archivo', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
}

body {
    background:
        radial-gradient(120% 80% at 50% -10%, #1b1a16 0%, var(--ink) 55%, #060607 100%);
    color: var(--paper);
    font-family: var(--body);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    min-height: 100dvh;
}

/* ---- Không khí ---- */
#grain {
    position: fixed; inset: -50%;
    z-index: 60; pointer-events: none;
    opacity: .055; mix-blend-mode: screen;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    animation: grain 6s steps(6) infinite;
}
@keyframes grain {
    0%{transform:translate(0,0)} 20%{transform:translate(-4%,3%)} 40%{transform:translate(3%,-2%)}
    60%{transform:translate(-2%,4%)} 80%{transform:translate(4%,-3%)} 100%{transform:translate(0,0)}
}
#vignette {
    position: fixed; inset: 0; z-index: 55; pointer-events: none;
    box-shadow: inset 0 0 220px 60px rgba(0,0,0,.75);
}
#flash-global {
    position: fixed; inset: 0; z-index: 70; pointer-events: none;
    background: #fff; opacity: 0; transition: opacity .08s;
}
#flash-global.fire { opacity: .85; transition: opacity .5s; }

/* ---- Nút ---- */
.sb-btn {
    font-family: var(--disp); font-weight: 900; letter-spacing: .04em;
    font-size: 14px; text-transform: uppercase;
    background: var(--lime); color: #11140a; border: none; cursor: pointer;
    padding: 14px 22px; border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    box-shadow: 0 0 0 0 rgba(201,242,78,.5);
    transition: transform .15s, box-shadow .25s, background .2s;
}
.sb-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -8px rgba(201,242,78,.7); }
.sb-btn:active { transform: translateY(0) scale(.98); }
.sb-btn-lg { font-size: 16px; padding: 16px 30px; }
.sb-btn .arr { transition: transform .2s; }
.sb-btn:hover .arr { transform: translateX(4px); }

.sb-btn-ghost {
    font-family: var(--disp); font-weight: 900; letter-spacing: .03em;
    text-transform: uppercase; font-size: 13px;
    background: transparent; color: var(--paper);
    border: 1.5px solid var(--line); cursor: pointer;
    padding: 13px 20px; border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    transition: border-color .2s, color .2s, background .2s;
}
.sb-btn-ghost:hover { border-color: var(--lime); color: var(--lime); }
.sb-btn-ghost.wide { width: 100%; margin-top: 14px; }
/* icon SVG nét trong nút (thay emoji) */
.ico { width: 1.05em; height: 1.05em; flex: none; }

/* ---- Overlay (intro / loading / result) ---- */
.overlay {
    position: fixed; inset: 0; z-index: 40;
    display: flex; align-items: center; justify-content: center;
    padding: 28px; text-align: center;
    opacity: 0; visibility: hidden;
    transition: opacity .5s ease;
}
.overlay.show { opacity: 1; visibility: visible; }
.overlay { overflow-y: auto; }
/* màn kết quả dài hơn -> canh trên + cuộn được, không bị cắt */
#sb-result { align-items: flex-start; }
.hidden { display: none !important; }

/* ---- Intro ---- */
.intro-inner { max-width: 680px; width: 100%; min-width: 0; }
.eyebrow {
    font-family: var(--mono); font-size: 12px; letter-spacing: .35em;
    color: var(--lime); margin-bottom: 18px;
}
.eyebrow.center { text-align: center; }
.title-xl {
    font-family: var(--disp); font-weight: 900;
    font-size: clamp(34px, 8.5vw, 82px); line-height: .9;
    letter-spacing: -.02em; max-width: 100%;
    text-shadow: 0 6px 40px rgba(0,0,0,.6);
    animation: rise .7s cubic-bezier(.2,.8,.2,1) both;
}
.title-accent { color: var(--lime); }
.intro-sub {
    max-width: 520px; margin: 22px auto 0; color: #d8d6cf;
    font-size: 17px; line-height: 1.6; font-weight: 600;
    animation: rise .7s .1s cubic-bezier(.2,.8,.2,1) both;
}
.intro-chips {
    display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
    margin: 28px auto; max-width: 560px;
    animation: rise .7s .2s cubic-bezier(.2,.8,.2,1) both;
}
.ichip {
    font-family: var(--mono); font-size: 12.5px; color: var(--paper);
    border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px;
    background: rgba(255,255,255,.02);
}
#enter-btn { animation: rise .7s .3s cubic-bezier(.2,.8,.2,1) both; }
.intro-note {
    margin: 22px auto 0; max-width: 440px; color: var(--muted);
    font-size: 13px; line-height: 1.6; font-family: var(--mono);
}
.home-link {
    display: inline-block; margin-top: 18px; color: var(--muted);
    text-decoration: none; font-size: 13px; font-family: var(--mono);
    border-bottom: 1px dashed transparent; transition: color .2s, border-color .2s;
}
.home-link:hover { color: var(--lime); border-color: var(--lime); }
.home-link.sm { margin: 0; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

/* Hero canh giữa màn đầu, nội dung SEO cuộn xuống dưới */
#sb-intro { align-items: flex-start; }
.intro-hero {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: calc(100dvh - 56px);
}
.scroll-hint {
    display: inline-block; margin-top: 20px; color: var(--muted);
    font-family: var(--mono); font-size: 12px; letter-spacing: .12em;
    text-decoration: none; border-bottom: 1px dashed transparent;
    transition: color .2s, border-color .2s;
}
.scroll-hint:hover { color: var(--lime); border-color: var(--lime); }

/* ---- Khối nội dung mô tả (SEO) trong intro ---- */
.intro-seo { text-align: left; padding: 12px 0 64px; }
.seo-block { margin-bottom: 34px; }
.seo-h {
    font-family: var(--disp); font-weight: 900; letter-spacing: -.01em;
    font-size: clamp(20px, 4.4vw, 27px); color: var(--paper);
    padding-bottom: 12px; margin-bottom: 16px;
    border-bottom: 1px solid var(--line);
}
.seo-steps, .seo-feats { padding-left: 0; list-style: none; }
.seo-steps li, .seo-feats li {
    position: relative; padding: 0 0 0 30px; margin-bottom: 12px;
    color: #d8d6cf; font-size: 15px; line-height: 1.55;
}
.seo-steps { counter-reset: step; }
.seo-steps li { counter-increment: step; }
.seo-steps li::before {
    content: counter(step); position: absolute; left: 0; top: 1px;
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--lime); color: #11140a;
    font-family: var(--disp); font-weight: 900; font-size: 11px;
    display: flex; align-items: center; justify-content: center;
}
.seo-feats li::before {
    content: "✦"; position: absolute; left: 4px; top: 0; color: var(--lime);
}
.seo-steps b, .seo-feats b { color: var(--paper); }

/* FAQ */
.seo-faq details {
    border: 1px solid var(--line); border-radius: 12px;
    background: var(--ink-2); margin-bottom: 10px; overflow: hidden;
}
.seo-faq summary {
    cursor: pointer; list-style: none; padding: 14px 44px 14px 16px;
    font-family: var(--disp); font-weight: 900; font-size: 14.5px;
    color: var(--paper); position: relative;
}
.seo-faq summary::-webkit-details-marker { display: none; }
.seo-faq summary::after {
    content: "+"; position: absolute; right: 16px; top: 50%;
    transform: translateY(-50%); color: var(--lime);
    font-family: var(--mono); font-size: 18px; transition: transform .2s;
}
.seo-faq details[open] summary::after { content: "−"; }
.seo-faq details[open] summary { color: var(--lime); }
.seo-faq p {
    padding: 0 16px 16px; color: var(--muted); font-size: 14px; line-height: 1.6;
}

/* Link nội bộ + dòng mô tả cuối */
.seo-links {
    display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px;
}
.seo-links a {
    font-family: var(--mono); font-size: 12.5px; color: var(--paper);
    text-decoration: none; border: 1px solid var(--line); border-radius: 999px;
    padding: 9px 15px; transition: color .2s, border-color .2s, background .2s;
}
.seo-links a:hover { color: var(--lime); border-color: var(--lime); background: var(--ink-2); }
.seo-lede {
    color: var(--muted); font-size: 12.5px; line-height: 1.7;
    font-family: var(--mono); border-top: 1px solid var(--line); padding-top: 18px;
}

/* ---- Studio layout ---- */
#sb-studio {
    min-height: 100dvh;
    display: flex; flex-direction: column;
    max-width: 1180px; margin: 0 auto;
    padding: 16px clamp(14px, 3vw, 26px) 28px;
    animation: rise .5s ease both;
}
.sb-top {
    display: flex; align-items: center; justify-content: space-between;
    padding: 6px 4px 16px;
}
.brand {
    font-family: var(--disp); font-weight: 900; letter-spacing: .06em;
    font-size: 18px; display: flex; align-items: center; gap: 9px;
}
.top-right { display: flex; align-items: center; gap: 16px; }
.step-label {
    font-family: var(--mono); font-size: 11px; letter-spacing: .25em;
    color: var(--lime); border: 1px solid var(--line); padding: 5px 11px; border-radius: 999px;
}
.rec-dot {
    width: 10px; height: 10px; border-radius: 50%; background: var(--coral);
    display: inline-block; box-shadow: 0 0 0 0 rgba(255,93,115,.6);
    animation: rec 1.4s infinite;
}
.rec-dot.big { width: 16px; height: 16px; }
@keyframes rec { 0%{box-shadow:0 0 0 0 rgba(255,93,115,.6)} 70%{box-shadow:0 0 0 9px rgba(255,93,115,0)} 100%{box-shadow:0 0 0 0 rgba(255,93,115,0)} }

.sb-work {
    display: flex; gap: 16px; align-items: stretch;
}
.sb-stage-wrap { flex: 1; min-width: 0; }

/* ---- Sân khấu camera ---- */
.sb-stage {
    position: relative; width: 100%;
    aspect-ratio: 4 / 3;
    background: #000;
    border-radius: 18px; overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: 0 30px 80px -30px #000, inset 0 0 0 1px rgba(255,255,255,.03);
    /* hai dải răng cưa film hai bên */
    background-image:
        repeating-linear-gradient(to bottom, var(--ink-3) 0 14px, transparent 14px 30px),
        repeating-linear-gradient(to bottom, var(--ink-3) 0 14px, transparent 14px 30px);
    background-size: 12px 100%, 12px 100%;
    background-position: left center, right center;
    background-repeat: no-repeat;
}
#cam {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; display: block;
}
#cam.mirror { transform: scaleX(-1); }
#sticker-layer { position: absolute; inset: 0; z-index: 6; }
.sticker {
    position: absolute; touch-action: none; cursor: grab; user-select: none;
    line-height: 1; will-change: left, top, transform;
}
.sticker:active { cursor: grabbing; }
.sticker .st-emoji { display: block; filter: drop-shadow(0 2px 6px rgba(0,0,0,.45)); }
.sticker .st-img { display: block; height: auto; filter: drop-shadow(0 2px 6px rgba(0,0,0,.45)); pointer-events: none; }
.sticker .st-del, .sticker .st-handle { display: none; }
.sticker.selected { outline: 1.5px dashed var(--lime); outline-offset: 6px; border-radius: 6px; }
.sticker.selected .st-del, .sticker.selected .st-handle { display: flex; }
.st-del {
    position: absolute; top: -14px; right: -14px; width: 24px; height: 24px;
    border-radius: 50%; border: none; background: var(--coral); color: #2a0a0f;
    font-size: 16px; font-weight: 700; cursor: pointer; align-items: center; justify-content: center;
    line-height: 1; padding: 0;
}
.st-handle {
    position: absolute; bottom: -14px; right: -14px; width: 22px; height: 22px;
    border-radius: 50%; background: var(--lime); cursor: nwse-resize;
    box-shadow: 0 0 0 2px var(--ink);
}

.stage-corner {
    position: absolute; width: 22px; height: 22px; z-index: 7;
    border: 2px solid rgba(255,255,255,.5); pointer-events: none;
}
.stage-corner.tl { top: 12px; left: 12px; border-right: none; border-bottom: none; }
.stage-corner.tr { top: 12px; right: 12px; border-left: none; border-bottom: none; }
.stage-corner.bl { bottom: 12px; left: 12px; border-right: none; border-top: none; }
.stage-corner.br { bottom: 12px; right: 12px; border-left: none; border-top: none; }

.shot-tag {
    position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
    z-index: 8; font-family: var(--mono); font-size: 12px; letter-spacing: .2em;
    background: rgba(0,0,0,.55); border: 1px solid var(--line);
    color: var(--paper); padding: 5px 13px; border-radius: 999px; backdrop-filter: blur(4px);
}
.countdown {
    position: absolute; inset: 0; z-index: 9;
    display: none; align-items: center; justify-content: center;
    font-family: var(--disp); font-weight: 900; color: #fff;
    font-size: clamp(120px, 30vw, 260px); line-height: 1;
    text-shadow: 0 0 50px rgba(0,0,0,.5);
}
.countdown.go { display: flex; }
.countdown .num { animation: pop .8s cubic-bezier(.2,.9,.2,1); }
.countdown .smile {
    font-size: clamp(26px, 7vw, 54px); letter-spacing: .04em; color: var(--lime);
    animation: pop .5s cubic-bezier(.2,.9,.2,1);
}
@keyframes pop { 0%{transform:scale(.3);opacity:0} 30%{opacity:1} 60%{transform:scale(1.05)} 100%{transform:scale(.9);opacity:.85} }

.flash-stage { position: absolute; inset: 0; background: #fff; opacity: 0; z-index: 10; pointer-events: none; }
.flash-stage.fire { animation: stageflash .45s ease; }
@keyframes stageflash { 0%{opacity:0} 8%{opacity:.95} 100%{opacity:0} }

.cam-msg {
    position: absolute; inset: 0; z-index: 11; display: flex;
    align-items: center; justify-content: center; flex-direction: column; gap: 14px;
    text-align: center; padding: 30px; background: rgba(8,8,10,.86);
    font-size: 15px; color: #d8d6cf; line-height: 1.6;
}

/* ---- Rail cuộn phim ---- */
.sb-rail {
    width: 116px; flex: none;
    background: var(--ink-2); border: 1px solid var(--line); border-radius: 16px;
    padding: 12px 10px; display: flex; flex-direction: column;
}
.rail-head {
    font-family: var(--mono); font-size: 10px; letter-spacing: .18em; color: var(--muted);
    display: flex; justify-content: space-between; margin-bottom: 10px;
}
.rail-head span { color: var(--lime); }
.rail-track {
    flex: 1; display: flex; flex-direction: column; gap: 9px; overflow-y: auto;
}
.rail-slot {
    aspect-ratio: 4 / 3; border-radius: 8px; flex: none;
    background: repeating-linear-gradient(45deg, #18181c 0 8px, #141417 8px 16px);
    border: 1px dashed var(--line);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--mono); font-size: 11px; color: var(--muted);
    overflow: hidden; position: relative;
}
.rail-slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rail-slot.filled { border-style: solid; border-color: var(--lime-dim); }
.rail-slot .develop {
    position: absolute; inset: 0; background: #0b0b0d;
    animation: develop 1.1s ease forwards;
}
@keyframes develop { from { opacity: 1; backdrop-filter: blur(6px); } to { opacity: 0; } }

/* ---- Deck ---- */
.sb-deck {
    margin-top: 16px; background: var(--ink-2); border: 1px solid var(--line);
    border-radius: 18px; padding: 18px clamp(14px, 3vw, 24px);
    position: relative;
}
.deck-panel { display: none; animation: rise .35s ease both; }
.deck-panel.show { display: block; }

.ctrl-group { margin-bottom: 16px; }
.ctrl-group.grow { flex: 1; margin-bottom: 0; }
.ctrl-label {
    display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .22em;
    color: var(--muted); margin-bottom: 10px;
}
.ctrl-label .hint { color: #5d5c57; letter-spacing: .04em; text-transform: none; font-size: 11px; }
.cap-counter { float: right; color: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: .04em; }

.chip-row { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
    font-family: var(--body); font-weight: 600; font-size: 13px;
    background: var(--ink-3); color: #cfcec8; border: 1.5px solid transparent;
    padding: 9px 14px; border-radius: 11px; cursor: pointer;
    display: inline-flex; align-items: center; gap: 8px;
    transition: border-color .15s, color .15s, background .15s, transform .12s;
    user-select: none;
}
.chip:hover { transform: translateY(-1px); color: #fff; }
.chip.is-active { border-color: var(--lime); color: var(--lime); background: rgba(201,242,78,.08); }
.chip .swatch { width: 14px; height: 14px; border-radius: 4px; border: 1px solid rgba(255,255,255,.2); }
.chip-ico { width: 18px; height: 18px; flex: none; display: block; }

/* Chọn tông màu: thẻ preview mini dải film */
.theme-chip {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    background: var(--ink-3); border: 1.5px solid transparent; border-radius: 12px;
    padding: 8px 9px; cursor: pointer; transition: border-color .15s, transform .12s;
}
.theme-chip:hover { transform: translateY(-2px); }
.theme-chip.is-active { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(201,242,78,.18); }
.theme-prev { width: 40px; height: 58px; display: block; border-radius: 5px; box-shadow: 0 3px 8px -3px rgba(0,0,0,.5); }
.tc-label { font-family: var(--body); font-weight: 600; font-size: 12px; color: #cfcec8; }
.theme-chip.is-active .tc-label { color: var(--lime); }

/* sticker: nút Thêm + bảng chọn */
.sticker-add {
    font-family: var(--body); font-weight: 600; font-size: 14px; color: var(--paper);
    background: var(--ink-3); border: 1.5px dashed var(--line); border-radius: 12px;
    padding: 12px 16px; cursor: pointer; display: inline-flex; align-items: center; gap: 9px;
    transition: border-color .2s, color .2s, transform .12s;
}
.sticker-add:hover { border-color: var(--lime); color: var(--lime); transform: translateY(-1px); }

.sticker-picker {
    position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center;
    padding: 22px; background: rgba(8, 8, 10, .92);
    animation: rise .2s ease both;
}
.sp-card {
    width: 100%; max-width: 460px; max-height: 80vh; display: flex; flex-direction: column;
    background: var(--ink-2); border: 1px solid var(--line); border-radius: 18px; padding: 18px;
    box-shadow: 0 30px 80px -30px #000;
}
.sp-head {
    display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px;
    font-family: var(--disp); font-weight: 900; letter-spacing: .03em; font-size: 16px;
}
.sp-close {
    width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line);
    background: var(--ink-3); color: var(--paper); font-size: 20px; line-height: 1; cursor: pointer;
    transition: color .2s, border-color .2s;
}
.sp-close:hover { color: var(--coral); border-color: var(--coral); }
.sp-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 8px;
    overflow-y: auto; padding: 2px; margin-bottom: 14px;
}
.sp-grid button {
    aspect-ratio: 1; padding: 5px; line-height: 1;
    background: var(--ink-3); border: 1.5px solid transparent; border-radius: 11px;
    cursor: pointer; transition: border-color .12s, background .12s;
    display: flex; align-items: center; justify-content: center;
    content-visibility: auto; contain-intrinsic-size: 46px;   /* bỏ render nút ngoài tầm nhìn */
}
/* translateZ(0): cache raster SVG vào layer GPU -> hover/repaint không raster lại (hết lag) */
.sp-grid button img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; transform: translateZ(0); }
/* hover chỉ đổi viền + nền (paint rẻ) — KHÔNG scale để tránh raster lại SVG */
.sp-grid button:hover { border-color: var(--lime); background: var(--ink-2); }
.sp-upload { width: 100%; }

/* toggles */
.sb-toggle {
    font-family: var(--mono); font-size: 12px; color: var(--muted);
    background: var(--ink-3); border: 1.5px solid var(--line); border-radius: 999px;
    padding: 11px 16px; cursor: pointer; display: inline-flex; align-items: center; gap: 9px;
    transition: color .2s, border-color .2s;
}
.sb-toggle .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); transition: background .2s, box-shadow .2s; }
.sb-toggle.is-on { color: var(--lime); border-color: var(--lime-dim); }
.sb-toggle.is-on .dot { background: var(--lime); box-shadow: 0 0 8px var(--lime); }

.setup-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    margin-top: 18px; flex-wrap: wrap;
}
.setup-foot .sb-btn-lg { margin-left: auto; }

.sb-input {
    width: 100%; font-family: var(--body); font-size: 15px; color: var(--paper);
    background: var(--ink-3); border: 1.5px solid var(--line); border-radius: 11px;
    padding: 12px 14px; outline: none; transition: border-color .2s;
}
.sb-input:focus { border-color: var(--lime); }
.sb-input::placeholder { color: #5d5c57; }
.finish-row { display: flex; align-items: flex-end; gap: 14px; }

/* session */
.session-live { display: flex; align-items: center; gap: 16px; }
.session-title { font-family: var(--disp); font-weight: 900; font-size: 22px; letter-spacing: .04em; }
.session-progress { font-family: var(--mono); font-size: 13px; color: var(--lime); margin-top: 4px; }
#deck-session.show { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; }

/* review */
.review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.review-cell {
    position: relative; aspect-ratio: 4/3; border-radius: 12px; overflow: hidden;
    border: 1px solid var(--line); cursor: pointer; background: #000;
}
.review-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.review-cell .rc-num {
    position: absolute; top: 7px; left: 7px; font-family: var(--mono); font-size: 11px;
    background: rgba(0,0,0,.55); padding: 3px 8px; border-radius: 8px; color: var(--paper);
}
.review-cell .rc-retake {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    gap: 6px; background: rgba(8,8,10,.55); opacity: 0; transition: opacity .2s;
    font-family: var(--disp); font-weight: 900; font-size: 12px; letter-spacing: .05em; color: var(--lime);
}
.review-cell:hover .rc-retake { opacity: 1; }

/* loading */
.loading-overlay { flex-direction: column; gap: 18px; background: rgba(8,8,10,.92); }
.dev-reel {
    width: 76px; height: 76px; border-radius: 50%;
    border: 5px solid var(--ink-3); border-top-color: var(--lime); border-right-color: var(--coral);
    animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-family: var(--disp); font-weight: 900; font-size: 19px; letter-spacing: .03em; }
.loading-sub { color: var(--muted); font-size: 13px; font-family: var(--mono); }

/* result */
.result-inner { max-width: 560px; width: 100%; }
.result-tabs { display: inline-flex; gap: 6px; background: var(--ink-2); border: 1px solid var(--line); padding: 5px; border-radius: 999px; margin: 14px auto 18px; }
.rtab {
    font-family: var(--body); font-weight: 600; font-size: 13px; color: var(--muted);
    background: transparent; border: none; cursor: pointer; padding: 9px 16px; border-radius: 999px;
    transition: color .2s, background .2s;
}
.rtab.is-active { color: #11140a; background: var(--lime); }
.result-stage {
    display: flex; align-items: center; justify-content: center;
    min-height: 320px; max-height: 60vh; margin-bottom: 18px;
}
#result-img, #result-vid {
    max-height: 60vh; max-width: 100%; border-radius: 12px;
    box-shadow: 0 30px 70px -25px #000; background: var(--ink-2);
}
.result-actions { display: flex; gap: 10px; justify-content: center; }
.result-dl-mini { display: flex; gap: 8px; justify-content: center; margin-top: 14px; }
.mini-dl {
    font-family: var(--mono); font-size: 12px; color: var(--muted);
    background: var(--ink-2); border: 1px solid var(--line); border-radius: 8px;
    padding: 7px 12px; cursor: pointer; transition: color .2s, border-color .2s;
}
.mini-dl:hover { color: var(--lime); border-color: var(--lime-dim); }
.result-expire { color: var(--muted); font-size: 12px; font-family: var(--mono); margin-top: 16px; line-height: 1.5; }

/* Khám phá thêm các tính năng khác */
.sb-explore { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.sb-explore .eyebrow { margin-bottom: 14px; }
.explore-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.explore-card {
    position: relative;
    display: flex; flex-direction: column; gap: 3px; text-align: left;
    padding: 13px 26px 13px 14px; background: var(--ink-2); border: 1px solid var(--line);
    border-radius: 12px; text-decoration: none; color: var(--paper);
    transition: border-color .2s, transform .12s, background .2s;
}
.explore-card::after {
    content: "→"; position: absolute; top: 13px; right: 13px;
    font-family: var(--mono); color: var(--muted); transition: color .2s, transform .2s;
}
.explore-card:hover { border-color: var(--lime); transform: translateY(-2px); background: var(--ink-3); }
.explore-card:hover::after { color: var(--lime); transform: translateX(2px); }
.ex-name { font-family: var(--disp); font-weight: 900; font-size: 14px; letter-spacing: .02em; }
.ex-desc { font-size: 11.5px; color: var(--muted); line-height: 1.4; }

/* toast */
.toast {
    position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
    z-index: 90; background: var(--coral); color: #2a0a0f; font-weight: 700; font-size: 14px;
    padding: 13px 20px; border-radius: 12px; box-shadow: 0 20px 50px -15px rgba(0,0,0,.6);
    opacity: 0; transition: opacity .25s, transform .25s; max-width: 88vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- Mobile ---- */
@media (max-width: 720px) {
    .sb-work { flex-direction: column; }
    .sb-stage { aspect-ratio: 3 / 4; }
    .sb-rail { width: 100%; flex-direction: column; }
    .rail-head { margin-bottom: 8px; }
    .rail-track { flex-direction: row; overflow-x: auto; overflow-y: hidden; padding-bottom: 4px; }
    .rail-slot { width: 84px; }
    .setup-foot .sb-btn-lg, .setup-foot .sb-btn-ghost { flex: 1; }
    .finish-row { flex-direction: column; align-items: stretch; }
    .finish-row .sb-toggle { align-self: flex-start; }
}
