/* ==========================================================================
   SESSION BUILDER — shared component
   Used by: muscle-mender.html (and, going forward, other massage service
   pages). Driven entirely by window.SESSION_BUILDER_CONFIG — see
   js/session-builder.js. Class prefix: sb-
   ========================================================================== */

.sb-modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 500;
  background: rgba(26,26,24,0.9); backdrop-filter: blur(8px);
}
.sb-modal-overlay.open { display: flex; flex-direction: column; }

.sb-modal-inner {
  position: relative; display: flex; flex-direction: column;
  width: 100%; height: 100%; max-height: 100vh; overflow: hidden;
  animation: sbSlideUp 0.26s ease;
}
@keyframes sbSlideUp { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }

/* TOP BAR */
.sb-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; height: 56px; flex-shrink: 0;
  background: #1a1a18; border-bottom: 1px solid rgba(255,255,255,0.07);
}
.sb-topbar-left { display: flex; align-items: center; gap: 16px; }
.sb-topbar-title { font-family: 'Cormorant Garamond', serif; font-size: 1.1rem; font-weight: 400; color: #f5f0e8; letter-spacing: 0.02em; }
.sb-topbar-title em { font-style: italic; color: #c9a090; }
.sb-topbar-subtitle { font-size: 0.65rem; font-weight: 400; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(245,240,232,0.3); }
.sb-topbar-close { background: rgba(255,255,255,0.08); border: none; color: rgba(245,240,232,0.6); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 0.95rem; display: flex; align-items: center; justify-content: center; transition: all 0.15s; }
.sb-topbar-close:hover { background: rgba(255,255,255,0.16); color: #f5f0e8; }

/* SCROLLABLE BODY */
.sb-body { flex: 1; overflow-y: auto; overflow-x: hidden; background: #f5f0e8; scrollbar-width: thin; scrollbar-color: rgba(42,34,32,0.15) transparent; }

/* HERO STRIP */
.sb-hero { background: #1a1a18; padding: 28px 40px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.sb-hero-eyebrow { font-size: 0.6rem; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; color: #c9a090; margin-bottom: 8px; }
.sb-hero-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 24px; flex-wrap: wrap; }
.sb-hero-left { flex: 1; }
.sb-hero-h2 { font-family: 'Cormorant Garamond', serif; font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 300; color: #f5f0e8; line-height: 1.12; }
.sb-hero-h2 em { font-style: italic; color: #c9a090; }
.sb-hero-sub { font-size: 0.83rem; font-weight: 300; color: rgba(245,240,232,0.48); line-height: 1.7; max-width: 400px; margin-top: 8px; }
.sb-hero-steps { display: flex; border: 1px solid rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; flex-shrink: 0; }
.sb-hero-step { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 12px 18px; border-right: 1px solid rgba(255,255,255,0.06); min-width: 100px; text-align: center; }
.sb-hero-step:last-child { border-right: none; }
.sb-step-num { width: 22px; height: 22px; border-radius: 50%; border: 1px solid #b08070; display: flex; align-items: center; justify-content: center; font-size: 0.6rem; font-weight: 500; color: #c9a090; }
.sb-step-label { font-size: 0.58rem; font-weight: 400; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(245,240,232,0.28); }

/* TEMPLATES STRIP */
.sb-templates-strip { background: rgba(255,255,255,0.03); border-top: 1px solid rgba(255,255,255,0.06); padding: 16px 0 0; }
.sb-templates-label { font-size: 0.57rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(245,240,232,0.26); margin-bottom: 10px; padding: 0 4px; }
.sb-templates-scroll { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 16px; }
.sb-templates-scroll::-webkit-scrollbar { display: none; }
.sb-template-card { flex-shrink: 0; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 3px; padding: 14px 18px; cursor: pointer; transition: all 0.2s; min-width: 200px; max-width: 220px; }
.sb-template-card:hover { border-color: #b08070; background: rgba(176,128,112,0.08); }
.sb-template-card-name { font-family: 'Cormorant Garamond', serif; font-size: 1rem; font-weight: 400; color: #f5f0e8; line-height: 1.2; margin-bottom: 4px; }
.sb-template-card-meta { font-size: 0.6rem; font-weight: 400; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(245,240,232,0.26); margin-bottom: 9px; }
.sb-template-card-dots { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 7px; }
.sb-template-load-btn { font-size: 0.58rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: #c9a090; background: none; border: none; cursor: pointer; font-family: 'Jost', sans-serif; padding: 0; transition: color 0.2s; }
.sb-template-load-btn:hover { color: #f5f0e8; }

/* APP LAYOUT */
.sb-app-layout { display: grid; grid-template-columns: 1fr 300px; align-items: start; }

/* LIBRARY PANEL */
.sb-library-panel { padding: 28px 36px 60px; border-right: 1px solid #ddd5c5; min-width: 0; }

/* SESSION CLOCK */
.sb-sct { background: #1a1a18; border-radius: 4px; padding: 17px 20px; margin-bottom: 22px; border: 1px solid rgba(255,255,255,0.07); }
.sb-sct-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; }
.sb-sct-label { font-size: 0.57rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(245,240,232,0.36); }
.sb-sct-nums { display: flex; align-items: baseline; gap: 5px; }
.sb-sct-used { font-family: 'Cormorant Garamond', serif; font-size: 2.1rem; font-weight: 300; color: #f5f0e8; line-height: 1; }
.sb-sct-sep { font-size: 1rem; font-weight: 300; color: rgba(245,240,232,0.16); }
.sb-sct-total { font-family: 'Cormorant Garamond', serif; font-size: 1.25rem; font-weight: 300; color: rgba(245,240,232,0.36); line-height: 1; }
.sb-sct-unit { font-size: 0.68rem; font-weight: 300; color: rgba(245,240,232,0.26); margin-left: 2px; }
.sb-sct-bar-track { height: 6px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; margin-bottom: 9px; }
.sb-sct-segs { display: flex; height: 100%; gap: 1px; }
.sb-sct-seg { height: 100%; border-radius: 1px; transition: width 0.38s ease; }
.sb-ss-prep { background: #7a9e8a; } .sb-ss-rel { background: #8a6a7a; } .sb-ss-rest { background: #6a7a9e; } .sb-ss-over { background: #c05040; }
.sb-sct-footer { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.sb-sct-legend { display: flex; gap: 12px; }
.sb-sct-leg-item { display: flex; align-items: center; gap: 4px; font-size: 0.55rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(245,240,232,0.26); }
.sb-sct-leg-dot { width: 6px; height: 6px; border-radius: 50%; }
.sb-sct-rem { font-size: 0.67rem; font-weight: 400; color: rgba(245,240,232,0.36); text-align: right; }
.sb-sct-rem .v { font-weight: 600; color: rgba(245,240,232,0.75); }
.sb-sct-rem.warn .v { color: #e0a060; } .sb-sct-rem.over .v { color: #e07060; }

/* SESSION LENGTH */
.sb-length-selector { background: white; border: 1px solid #ddd5c5; border-radius: 4px; padding: 17px 19px; margin-bottom: 22px; }
.sb-selector-label { font-size: 0.59rem; font-weight: 500; letter-spacing: 0.17em; text-transform: uppercase; color: #8a8070; margin-bottom: 9px; }
.sb-length-options { display: flex; gap: 9px; }
.sb-length-btn { flex: 1; padding: 12px 8px; border: 1px solid #ddd5c5; border-radius: 3px; background: #f5f0e8; cursor: pointer; text-align: center; transition: all 0.2s; font-family: 'Jost', sans-serif; color: #1a1a18; width: 100%; }
.sb-length-btn:hover { border-color: #b08070; }
.sb-length-btn.active { background: #1a1a18; border-color: #1a1a18; color: #f5f0e8; }
.sb-length-btn .sb-mins { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; font-weight: 500; display: block; line-height: 1; margin-bottom: 2px; }
.sb-length-btn .sb-mins-label { font-size: 0.55rem; font-weight: 400; letter-spacing: 0.13em; text-transform: uppercase; opacity: 0.45; display: block; }
.sb-length-btn .sb-price { font-size: 0.75rem; font-weight: 500; margin-top: 4px; display: block; color: #b08070; }
.sb-length-btn.active .sb-price { color: #c9a090; }

/* AREA TABS */
.sb-area-tabs-label { font-size: 0.59rem; font-weight: 500; letter-spacing: 0.17em; text-transform: uppercase; color: #8a8070; margin-bottom: 7px; }
.sb-area-tabs { display: flex; overflow-x: auto; margin-bottom: 17px; border-bottom: 1px solid #ddd5c5; scrollbar-width: none; }
.sb-area-tabs::-webkit-scrollbar { display: none; }
.sb-area-tab { flex-shrink: 0; padding: 10px 16px; font-size: 0.66rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: #8a8070; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; transition: all 0.2s; background: none; border-top: none; border-left: none; border-right: none; font-family: 'Jost', sans-serif; display: block; }
.sb-area-tab:hover { color: #1a1a18; } .sb-area-tab.active { color: #1a1a18; border-bottom-color: #b08070; }

/* PHASE FILTER */
.sb-phase-filter { display: flex; gap: 8px; margin-bottom: 20px; align-items: center; flex-wrap: wrap; }
.sb-phase-filter-label { font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; color: #8a8070; flex-shrink: 0; }
.sb-phase-pill { padding: 6px 16px; border-radius: 20px; font-size: 0.63rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; border: 1px solid #ddd5c5; background: white; color: #1a1a18; transition: all 0.2s; font-family: 'Jost', sans-serif; display: inline-flex; align-items: center; white-space: nowrap; }
.sb-phase-pill:hover { border-color: #1a1a18; }
.sb-phase-pill.all.active { background: #1a1a18; color: #f5f0e8; border-color: #1a1a18; }
.sb-phase-pill.prepare.active { background: #7a9e8a; color: white; border-color: #7a9e8a; }
.sb-phase-pill.release.active { background: #8a6a7a; color: white; border-color: #8a6a7a; }
.sb-phase-pill.restore.active { background: #6a7a9e; color: white; border-color: #6a7a9e; }

/* RESULTS COUNT */
.sb-results-count { font-size: 0.66rem; font-weight: 400; color: #8a8070; margin-bottom: 14px; }
.sb-results-count strong { color: #1a1a18; font-weight: 600; }

/* BUDGET WARNING */
.sb-budget-warning { background: rgba(224,160,96,0.1); border: 1px solid rgba(224,160,96,0.25); border-radius: 3px; padding: 9px 13px; margin: 0 0 14px; font-size: 0.66rem; font-weight: 300; color: rgba(224,160,96,0.9); line-height: 1.55; display: none; }
.sb-budget-warning.show { display: block; }

/* ── SHORTS-STYLE TECHNIQUE GRID ──────────────────────────────────────── */
.sb-technique-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }

.sb-card {
  position: relative; aspect-ratio: 9/16; border-radius: 14px; overflow: hidden;
  background: #14100e; cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 8px rgba(26,26,24,0.14);
}
.sb-card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(26,26,24,0.28); }
.sb-card.added { box-shadow: 0 0 0 2px #b08070, 0 10px 26px rgba(176,128,112,0.22); }

.sb-card-media { position: absolute; inset: 0; }
.sb-card-media-bg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.sb-cbg-prepare { background: linear-gradient(160deg,#213c30 0%,#345540 55%,#1a2e26 100%); }
.sb-cbg-release { background: linear-gradient(160deg,#3a2530 0%,#4d3040 55%,#2a1a26 100%); }
.sb-cbg-restore { background: linear-gradient(160deg,#232840 0%,#33395a 55%,#1a1e2e 100%); }
.sb-card-media-icon { opacity: 0.14; }
.sb-card-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.sb-has-video .sb-card-thumb { display: block; }
.sb-has-video .sb-card-media-bg { display: none; }

/* top + bottom scrims for legibility over any art */
.sb-card-scrim-top { position: absolute; top: 0; left: 0; right: 0; height: 46%; background: linear-gradient(to bottom, rgba(0,0,0,0.55), rgba(0,0,0,0)); pointer-events: none; }
.sb-card-scrim-bottom { position: absolute; bottom: 0; left: 0; right: 0; height: 64%; background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.55) 42%, rgba(0,0,0,0) 100%); pointer-events: none; }

.sb-card-phase-chip { position: absolute; top: 10px; left: 10px; display: flex; align-items: center; gap: 5px; background: rgba(20,16,14,0.55); backdrop-filter: blur(3px); padding: 4px 10px 4px 8px; border-radius: 20px; font-size: 0.6rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: white; }
.sb-card-phase-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.sb-card-time-chip { position: absolute; top: 10px; right: 10px; background: rgba(20,16,14,0.55); backdrop-filter: blur(3px); padding: 4px 9px; border-radius: 20px; font-size: 0.58rem; font-weight: 500; letter-spacing: 0.03em; color: rgba(255,255,255,0.85); white-space: nowrap; }

.sb-card-play-hint { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%) scale(0.85); width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,0.16); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; opacity: 0; transition: all 0.18s ease; pointer-events: none; }
.sb-card:hover .sb-card-play-hint { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.sb-card-play-tri { width: 0; height: 0; border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent #fff; margin-left: 3px; }

.sb-card-clip-tag { position: absolute; left: 14px; bottom: 74px; font-size: 0.58rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.4); }
.sb-has-video .sb-card-clip-tag { display: none; }

.sb-card-caption { position: absolute; left: 14px; right: 54px; bottom: 14px; }
.sb-card-name { font-family: 'Cormorant Garamond', serif; font-size: 1.15rem; font-weight: 600; color: #fff; line-height: 1.2; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sb-card-tag { font-size: 0.62rem; font-weight: 500; color: rgba(255,255,255,0.6); letter-spacing: 0.02em; }

.sb-card-add-btn {
  position: absolute; right: 12px; bottom: 12px; width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.14); backdrop-filter: blur(3px); border: 1.5px solid rgba(255,255,255,0.5);
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.15rem; line-height: 1;
  cursor: pointer; transition: all 0.18s ease; font-family: 'Jost', sans-serif; flex-shrink: 0;
}
.sb-card-add-btn:hover { background: rgba(255,255,255,0.28); }
.sb-card-add-btn.added { background: #b08070; border-color: #b08070; }
.sb-card-add-btn.added:hover { background: #c9a090; }

/* ── SESSION PANEL ─────────────────────────────────────────────────────── */
.sb-session-panel { position: sticky; top: 0; width: 300px; min-width: 300px; max-height: calc(100vh - 56px); overflow-y: auto; background: #1a1a18; color: #f5f0e8; display: flex; flex-direction: column; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.07) transparent; }
.sb-session-header { padding: 20px 20px 0; }
.sb-s-eyebrow { font-size: 0.57rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: #c9a090; margin-bottom: 3px; }
.sb-s-title { font-family: 'Cormorant Garamond', serif; font-size: 1.2rem; font-weight: 400; color: #f5f0e8; margin-bottom: 14px; }
.sb-s-title em { font-style: italic; }
.sb-cart-body { padding: 10px 20px; flex: 1; }
.sb-cart-empty { text-align: center; padding: 26px 12px; }
.sb-cart-empty-icon { font-size: 1.5rem; opacity: 0.1; margin-bottom: 9px; }
.sb-cart-empty p { font-size: 0.72rem; font-weight: 300; color: rgba(245,240,232,0.26); line-height: 1.63; }
.sb-cart-area-grp { margin-bottom: 12px; }
.sb-cart-area-lbl { font-size: 0.54rem; font-weight: 600; letter-spacing: 0.17em; text-transform: uppercase; color: rgba(245,240,232,0.22); margin-bottom: 4px; padding-bottom: 4px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.sb-cart-item { display: flex; align-items: flex-start; gap: 7px; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,0.04); animation: sbSlideIn 0.22s ease; }
@keyframes sbSlideIn { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:translateY(0); } }
.sb-ci-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; }
.sb-ci-info { flex: 1; min-width: 0; }
.sb-ci-name { font-family: 'Cormorant Garamond', serif; font-size: 0.88rem; font-weight: 400; color: #f5f0e8; line-height: 1.3; margin-bottom: 1px; }
.sb-ci-meta { font-size: 0.56rem; font-weight: 400; letter-spacing: 0.06em; color: rgba(245,240,232,0.26); }
.sb-ci-remove { background: none; border: none; color: rgba(245,240,232,0.18); cursor: pointer; font-size: 0.95rem; line-height: 1; padding: 2px 4px; transition: color 0.15s; flex-shrink: 0; }
.sb-ci-remove:hover { color: #e07060; }
.sb-ci-time-row { display: flex; align-items: center; gap: 5px; margin-top: 4px; }
.sb-ci-stepper { display: flex; align-items: center; border: 1px solid rgba(255,255,255,0.12); border-radius: 3px; overflow: hidden; }
.sb-ci-step-btn { background: rgba(255,255,255,0.06); border: none; color: rgba(245,240,232,0.55); width: 22px; height: 22px; cursor: pointer; font-size: 0.85rem; line-height: 1; display: flex; align-items: center; justify-content: center; transition: all 0.15s; font-family: 'Jost', sans-serif; flex-shrink: 0; }
.sb-ci-step-btn:hover { background: rgba(255,255,255,0.13); color: #f5f0e8; }
.sb-ci-step-btn:disabled { opacity: 0.22; cursor: not-allowed; }
.sb-ci-step-val { font-size: 0.7rem; font-weight: 500; color: #f5f0e8; min-width: 26px; text-align: center; padding: 0 2px; }
.sb-ci-step-unit { font-size: 0.58rem; font-weight: 400; color: rgba(245,240,232,0.33); }
.sb-ci-range-hint { font-size: 0.53rem; color: rgba(245,240,232,0.2); }

/* FORM */
.sb-session-form { padding: 13px 20px 20px; border-top: 1px solid rgba(255,255,255,0.06); }
.sb-form-group { margin-bottom: 9px; }
.sb-form-label { display: block; font-size: 0.56rem; font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase; color: rgba(245,240,232,0.3); margin-bottom: 4px; }
.sb-form-input, .sb-form-textarea, .sb-form-select { width: 100%; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); border-radius: 3px; padding: 9px 11px; font-family: 'Jost', sans-serif; font-size: 0.79rem; font-weight: 300; color: #f5f0e8; outline: none; transition: border-color 0.2s; display: block; }
.sb-form-input::placeholder, .sb-form-textarea::placeholder { color: rgba(245,240,232,0.16); }
.sb-form-input:focus, .sb-form-textarea:focus, .sb-form-select:focus { border-color: #b08070; }
.sb-form-select { appearance: none; -webkit-appearance: none; cursor: pointer; }
.sb-form-select option { background: #2e2e2a; color: #f5f0e8; }
.sb-form-textarea { resize: vertical; min-height: 62px; }
.sb-submit-btn { width: 100%; background: #b08070; color: #f5f0e8; border: none; border-radius: 3px; padding: 13px; font-family: 'Jost', sans-serif; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; cursor: pointer; transition: all 0.2s; margin-top: 4px; display: block; text-align: center; }
.sb-submit-btn:hover { background: #c9a090; color: #1a1a18; }
.sb-submit-btn:disabled { opacity: 0.48; cursor: not-allowed; }
.sb-submit-note { font-size: 0.59rem; font-weight: 300; color: rgba(245,240,232,0.2); text-align: center; margin-top: 7px; line-height: 1.5; }
.sb-submit-error { font-size: 0.63rem; color: #e07060; margin-top: 5px; text-align: center; display: none; }

/* ── VERTICAL SHORTS PLAYER MODAL ─────────────────────────────────────── */
.sb-video-modal { display: none; position: fixed; inset: 0; z-index: 600; align-items: center; justify-content: center; padding: 24px; }
.sb-video-modal.open { display: flex; }
.sb-modal-backdrop { position: absolute; inset: 0; background: rgba(10,8,7,0.94); backdrop-filter: blur(10px); }

.sb-shorts-stage { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; animation: sbSlideUp 0.24s ease; }
.sb-shorts-nav-btn {
  width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.14);
  color: rgba(245,240,232,0.7); display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
  transition: all 0.15s ease; font-family: 'Jost', sans-serif;
}
.sb-shorts-nav-btn:hover { background: rgba(255,255,255,0.16); color: #f5f0e8; }
.sb-shorts-nav-btn:disabled { opacity: 0.25; cursor: not-allowed; }
.sb-shorts-nav-col { display: flex; flex-direction: column; gap: 10px; }

.sb-shorts-player {
  position: relative; height: min(80vh, 760px); aspect-ratio: 9/16; border-radius: 20px; overflow: hidden;
  background: #000; box-shadow: 0 30px 70px rgba(0,0,0,0.6); touch-action: pan-x pinch-zoom;
}
.sb-shorts-close {
  position: absolute; top: 12px; right: 12px; z-index: 5; background: rgba(0,0,0,0.4); border: none;
  color: rgba(255,255,255,0.85); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 0.95rem;
  display: flex; align-items: center; justify-content: center; transition: all 0.15s;
}
.sb-shorts-close:hover { background: rgba(0,0,0,0.6); color: #fff; }

/* Each clip is its own slide so two can coexist mid-transition, TikTok-style */
.sb-shorts-slide {
  position: absolute; inset: 0;
  transition: transform 0.34s cubic-bezier(.22,.61,.36,1), opacity 0.34s ease;
  transform: translateY(0); opacity: 1;
}
.sb-shorts-slide.sb-enter-bottom { transform: translateY(100%); }
.sb-shorts-slide.sb-enter-top { transform: translateY(-100%); }
.sb-shorts-slide.sb-exit-top { transform: translateY(-100%); opacity: 0.7; }
.sb-shorts-slide.sb-exit-bottom { transform: translateY(100%); opacity: 0.7; }

.sb-shorts-media { position: absolute; inset: 0; }
.sb-shorts-media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }

.sb-shorts-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 30px; text-align: center; }
.sb-shorts-ph-icon { opacity: 0.14; }
.sb-shorts-ph-label { font-size: 0.63rem; font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase; color: rgba(245,240,232,0.4); }
.sb-shorts-ph-spec { padding: 10px 16px; border: 1px solid rgba(255,255,255,0.1); border-radius: 20px; font-size: 0.6rem; font-weight: 300; color: rgba(245,240,232,0.32); line-height: 1.6; max-width: 220px; }

.sb-shorts-top { position: absolute; top: 0; left: 0; right: 0; z-index: 2; padding: 14px 16px; display: flex; align-items: center; gap: 8px; background: linear-gradient(to bottom, rgba(0,0,0,0.6), rgba(0,0,0,0)); }
.sb-shorts-phase-chip { display: flex; align-items: center; gap: 5px; background: rgba(255,255,255,0.14); backdrop-filter: blur(3px); padding: 4px 10px; border-radius: 20px; font-size: 0.56rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: white; }
.sb-shorts-phase-dot { width: 6px; height: 6px; border-radius: 50%; }
.sb-shorts-index { margin-left: auto; font-size: 0.58rem; font-weight: 500; color: rgba(255,255,255,0.55); letter-spacing: 0.06em; }

.sb-shorts-bottom { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 60px 16px 18px; background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.6) 55%, rgba(0,0,0,0) 100%); }
.sb-shorts-name { font-family: 'Cormorant Garamond', serif; font-size: 1.35rem; font-weight: 500; color: #fff; line-height: 1.16; margin-bottom: 5px; }
.sb-shorts-tag { font-size: 0.62rem; font-weight: 500; color: rgba(255,255,255,0.55); margin-bottom: 8px; }
.sb-shorts-desc { font-size: 0.72rem; font-weight: 300; color: rgba(255,255,255,0.7); line-height: 1.6; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sb-shorts-footer-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sb-shorts-time { font-size: 0.63rem; font-weight: 500; color: rgba(255,255,255,0.6); }
.sb-shorts-add-btn { background: #b08070; color: white; border: none; padding: 11px 20px; border-radius: 22px; cursor: pointer; font-family: 'Jost', sans-serif; font-size: 0.65rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; transition: all 0.2s; white-space: nowrap; display: inline-flex; align-items: center; }
.sb-shorts-add-btn:hover { background: #c9a090; color: #1a1a18; }
.sb-shorts-add-btn.remove { background: rgba(255,255,255,0.14); color: #fff; }
.sb-shorts-add-btn.remove:hover { background: rgba(255,255,255,0.24); }

/* SUCCESS OVERLAY */
.sb-success-overlay { display: none; position: fixed; inset: 0; background: rgba(26,26,24,0.88); z-index: 700; align-items: center; justify-content: center; }
.sb-success-overlay.show { display: flex; }
.sb-success-card { background: #f5f0e8; max-width: 450px; width: 90%; padding: 46px; border-radius: 4px; text-align: center; animation: sbPopIn 0.28s ease; }
@keyframes sbPopIn { from { opacity:0; transform:scale(0.94); } to { opacity:1; transform:scale(1); } }
.sb-success-glyph { font-size: 1.9rem; margin-bottom: 13px; }
.sb-success-card h3 { font-family: 'Cormorant Garamond', serif; font-size: 1.75rem; font-weight: 400; color: #1a1a18; margin-bottom: 11px; }
.sb-success-card h3 em { font-style: italic; color: #b08070; }
.sb-success-card p { font-size: 0.8rem; font-weight: 300; color: #8a8070; line-height: 1.73; margin-bottom: 22px; }
.sb-success-actions { display: flex; gap: 10px; justify-content: center; }
.sb-s-btn { padding: 12px 22px; border-radius: 3px; font-family: 'Jost', sans-serif; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer; border: none; transition: all 0.2s; text-decoration: none; display: inline-flex; align-items: center; }
.sb-s-btn.primary { background: #1a1a18; color: #f5f0e8; }
.sb-s-btn.primary:hover { background: #b08070; }
.sb-s-btn.secondary { background: transparent; border: 1px solid #ddd5c5; color: #1a1a18; }
.sb-s-btn.secondary:hover { background: #ede6d6; }

/* TOAST */
.sb-toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(18px); background: #2e2e2a; border: 1px solid rgba(255,255,255,0.1); color: #f5f0e8; padding: 11px 20px; border-radius: 3px; font-size: 0.73rem; font-weight: 400; letter-spacing: 0.04em; opacity: 0; transition: all 0.3s; z-index: 800; white-space: nowrap; box-shadow: 0 8px 28px rgba(0,0,0,0.4); }
.sb-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.sb-toast em { color: #c9a090; font-style: normal; font-weight: 500; }

/* MOBILE */
.sb-mobile-toggle { display: none; }
@media (max-width: 860px) {
  .sb-app-layout { grid-template-columns: 1fr; }
  .sb-library-panel { padding: 18px 18px 80px; }
  .sb-technique-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 12px; }
  .sb-hero { padding: 22px 20px 0; }
  .sb-hero-top { flex-direction: column; gap: 18px; }
  .sb-hero-steps { max-width: 100%; }
  .sb-hero-step { min-width: 0; padding: 11px 14px; }
  .sb-topbar { padding: 0 18px; }
  .sb-topbar-subtitle { display: none; }
  .sb-session-panel {
    position: fixed; bottom: 0; left: 0; right: 0; top: auto;
    width: 100% !important; min-width: 0 !important; max-width: 100% !important;
    max-height: 58vh; z-index: 550;
    transform: translateY(calc(100% - 60px));
    transition: transform 0.3s ease;
    border-top: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px 12px 0 0;
  }
  .sb-session-panel.open { transform: translateY(0); }
  .sb-mobile-toggle {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 20px; height: 60px; cursor: pointer; flex-shrink: 0;
  }
  .sb-mobile-toggle-left { display: flex; align-items: center; gap: 11px; }
  .sb-mobile-toggle-lbl { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.13em; text-transform: uppercase; color: #f5f0e8; }
  .sb-mci-used { font-family: 'Cormorant Garamond', serif; font-size: 1.05rem; font-weight: 400; color: #f5f0e8; line-height: 1; }
  .sb-mci-sep { font-size: 0.72rem; color: rgba(245,240,232,0.23); }
  .sb-mci-total { font-family: 'Cormorant Garamond', serif; font-size: 0.82rem; font-weight: 300; color: rgba(245,240,232,0.38); }
  .sb-mci-unit { font-size: 0.58rem; color: rgba(245,240,232,0.28); }
  .sb-mci-bar { width: 56px; height: 3px; background: rgba(255,255,255,0.1); border-radius: 2px; overflow: hidden; }
  .sb-mci-fill { height: 100%; background: #b08070; border-radius: 2px; transition: width 0.3s; }
  .sb-mobile-badge { background: #b08070; color: white; font-size: 0.6rem; font-weight: 700; min-width: 21px; height: 21px; border-radius: 11px; display: flex; align-items: center; justify-content: center; padding: 0 5px; }
  .sb-session-header { display: none; }

  .sb-shorts-stage { gap: 8px; }
  .sb-shorts-player { height: min(72vh, 640px); border-radius: 16px; }
  .sb-shorts-nav-col { flex-direction: row; }
  .sb-shorts-nav-btn { width: 34px; height: 34px; }
}
@media (min-width: 861px) { .sb-mobile-toggle { display: none !important; } }
