:root {
  --bg: #0f1216;
  --surface: #171b21;
  --surface-2: #1f242c;
  --border: #2a313b;
  --text: #e8ebf0;
  --text-2: #a7b0bd;
  --muted: #6f7a89;
  --accent: #f0a35e;
  --primary: #5b8def;
  --good: #56c596;
  --warn: #f2c14e;
  --bad: #ef6b6b;
  --purple: #c77dff;
  --radius: 10px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); height: 100%; }
body { display: flex; flex-direction: column; min-height: 100vh; }
.mono { font-variant-numeric: tabular-nums; font-family: ui-monospace, Consolas, monospace; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); margin: 18px 0 8px; }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 20px; border-bottom: 1px solid var(--border); background: var(--surface);
}
.brand { display: flex; align-items: center; gap: 12px; }
.logo { font-size: 22px; color: var(--accent); }
.title { font-weight: 700; font-size: 16px; }
.subtitle { font-size: 12px; color: var(--text-2); }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.btn {
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  padding: 8px 14px; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600;
}
.btn:hover { filter: brightness(1.12); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #1a1208; }
.btn.ghost { background: transparent; }
.btn.small { padding: 5px 10px; font-size: 12px; }
.file-btn { display: inline-block; }

.progress { padding: 8px 20px; background: var(--surface); border-bottom: 1px solid var(--border); }
.progress-bar { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.progress-bar > div { height: 100%; width: 0; background: var(--accent); transition: width .15s; }
.progress-text { font-size: 12px; color: var(--text-2); margin-top: 4px; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; padding: 16px 20px; flex: 1; }
@media (max-width: 1000px) { .layout { grid-template-columns: 1fr; } }

.stage { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.video-wrap {
  position: relative; background: #000; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 16 / 9; border: 1px solid var(--border);
}
.video-wrap.portrait { margin: 0 auto; min-height: 360px; }
.video-wrap video, .video-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.video-wrap video { object-fit: contain; }
.video-wrap canvas { pointer-events: none; }
.video-wrap.calibrating canvas { pointer-events: auto; cursor: crosshair; }
.drop-hint {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; color: var(--text-2); text-align: center; padding: 20px; background: radial-gradient(ellipse at center, #1b2029, #0b0d10);
}
.drop-hint .drop-icon { font-size: 40px; }
.video-wrap.dragover .drop-hint { outline: 2px dashed var(--accent); outline-offset: -10px; }
.calib-hint {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  background: rgba(240,163,94,.95); color: #1a1208; padding: 6px 12px; border-radius: 6px; font-size: 12px; font-weight: 600;
}

.controls { display: flex; align-items: center; gap: 8px; }
.icon-btn { background: var(--surface-2); border: 1px solid var(--border); color: var(--text); width: 34px; height: 30px; border-radius: 6px; cursor: pointer; }
.icon-btn:hover { filter: brightness(1.15); }
#seek { flex: 1; accent-color: var(--accent); }
.toggles { display: flex; gap: 14px; align-items: center; font-size: 13px; color: var(--text-2); flex-wrap: wrap; }
.toggles label { display: flex; gap: 5px; align-items: center; cursor: pointer; }
.toggles .spacer { flex: 1; }

.timeline-wrap { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; }
#timeline { width: 100%; height: 300px; display: block; cursor: crosshair; }
.tooltip {
  position: absolute; pointer-events: none; background: #0b0d10; border: 1px solid var(--border); color: var(--text);
  font-size: 12px; padding: 6px 8px; border-radius: 6px; white-space: nowrap; z-index: 5; box-shadow: 0 4px 16px rgba(0,0,0,.4);
}
.tooltip .tt-row { display: flex; gap: 10px; justify-content: space-between; }
.tooltip .sw { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; min-height: 0; max-height: calc(100vh - 96px); position: sticky; top: 16px; }
.tabs { display: flex; border-bottom: 1px solid var(--border); }
.tab { flex: 1; background: transparent; border: 0; color: var(--text-2); padding: 11px 6px; cursor: pointer; font-size: 13px; font-weight: 600; border-bottom: 2px solid transparent; }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
.tab-body { padding: 14px 16px; overflow: auto; font-size: 14px; line-height: 1.5; }
.empty { color: var(--muted); padding: 20px 0; text-align: center; }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat { background: var(--surface-2); border-radius: 8px; padding: 10px 12px; }
.stat .label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.stat .value { font-size: 20px; font-weight: 700; margin-top: 2px; }
.stat .value small { font-size: 12px; font-weight: 500; color: var(--text-2); margin-left: 3px; }
.stat .sub { font-size: 11px; color: var(--text-2); }

.event-list { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; }
.event-list li { display: flex; gap: 10px; align-items: flex-start; background: var(--surface-2); padding: 8px 10px; border-radius: 8px; cursor: pointer; border-left: 3px solid var(--border); }
.event-list li:hover { filter: brightness(1.15); }
.event-list li.warn { border-left-color: var(--bad); }
.event-list li.tip { border-left-color: var(--warn); }
.event-list li.good { border-left-color: var(--good); }
.event-list li.info { border-left-color: var(--primary); }
.event-list .t { color: var(--text-2); font-size: 12px; min-width: 64px; }
.event-list .txt { flex: 1; font-size: 13px; }

.fb-item { padding: 10px 12px; border-radius: 8px; background: var(--surface-2); margin-bottom: 8px; border-left: 3px solid var(--border); }
.fb-item.warn { border-left-color: var(--bad); }
.fb-item.tip { border-left-color: var(--warn); }
.fb-item.good { border-left-color: var(--good); }
.fb-item.info { border-left-color: var(--primary); }
.fb-item .fb-title { font-weight: 700; font-size: 13px; }
.fb-item .fb-detail { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.fb-item .fb-when { font-size: 12px; color: var(--muted); margin-top: 4px; }
.fb-item .fb-when span { cursor: pointer; text-decoration: underline dotted; margin-right: 8px; }

.row { display: flex; gap: 8px; align-items: center; margin: 8px 0; flex-wrap: wrap; }
.row input[type=password] { flex: 1; min-width: 160px; }
input[type=password], input[type=number], select {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text); padding: 7px 9px; border-radius: 6px; font-size: 13px;
}
.ai-out { background: var(--surface-2); border-radius: 8px; padding: 12px; font-size: 13px; white-space: pre-wrap; line-height: 1.55; margin-top: 8px; }
.ai-out.err { color: var(--bad); }

.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-2); margin-bottom: 10px; }
.field.check { flex-direction: row; align-items: center; gap: 8px; }
.guide { padding-left: 18px; font-size: 13px; color: var(--text-2); }
.guide li { margin-bottom: 6px; }
.guide b { color: var(--text); }

/* Mode awam / detail */
.mode-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg { background: transparent; border: 0; color: var(--text-2); padding: 7px 12px; font-size: 12px; font-weight: 600; cursor: pointer; }
.seg.active { background: var(--surface-2); color: var(--text); }
body.mode-awam .detail-only { display: none !important; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--text-2); }
.legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; }
.legend .sw.dash { border-radius: 0; height: 0; width: 18px; border-top: 2px dashed #f2c14e; vertical-align: 2px; }

.filmstrip-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; }
.filmstrip-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.filmstrip { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; scroll-behavior: smooth; }
.filmstrip .thumb { flex: 0 0 auto; width: 120px; cursor: pointer; border-radius: 6px; overflow: hidden; border: 2px solid transparent; background: #000; position: relative; }
.filmstrip .thumb.current { border-color: var(--accent); }
.filmstrip .thumb canvas { display: block; width: 100%; }
.filmstrip .thumb .tt { position: absolute; left: 4px; bottom: 4px; font-size: 10px; background: rgba(0,0,0,.6); color: #fff; padding: 1px 5px; border-radius: 4px; font-family: ui-monospace, monospace; }
.filmstrip .thumb .evbar { position: absolute; left: 0; right: 0; top: 0; height: 4px; }

.export-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.plain-cards { display: flex; flex-direction: column; gap: 8px; }
.plain-card { display: flex; gap: 12px; align-items: flex-start; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; border-left: 4px solid var(--border); }
.plain-card.good { border-left-color: var(--good); }
.plain-card.warn { border-left-color: var(--warn); }
.plain-card.bad { border-left-color: var(--bad); }
.plain-card.na { border-left-color: var(--muted); opacity: .8; }
.plain-card .pc-icon { font-size: 22px; line-height: 1; margin-top: 2px; }
.plain-card .pc-title { font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.plain-card .pc-text { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.lamp { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.lamp.good { background: var(--good); } .lamp.warn { background: var(--warn); } .lamp.bad { background: var(--bad); } .lamp.na { background: var(--muted); }

.fb-card { background: var(--surface-2); border-radius: 12px; padding: 12px; margin-bottom: 12px; border-left: 4px solid var(--border); }
.fb-card.warn { border-left-color: var(--bad); }
.fb-card.tip { border-left-color: var(--warn); }
.fb-card.good { border-left-color: var(--good); }
.fb-card.info { border-left-color: var(--primary); }
.fb-card .fb-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.fb-card .fb-head .ic { font-size: 20px; }
.fb-card .fb-visual { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.fb-card .fb-visual .cap { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.fb-card .fb-visual canvas { width: 100%; display: block; border-radius: 8px; cursor: pointer; background: #000; }
.fb-card .fb-visual.single { grid-template-columns: 1fr; }
.fb-card .fb-sec { font-size: 13px; color: var(--text-2); margin-top: 8px; }
.fb-card .fb-sec b { color: var(--text); display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.fb-card .fb-cue { margin-top: 10px; background: rgba(240,163,94,.12); border: 1px solid rgba(240,163,94,.4); color: var(--text); padding: 8px 10px; border-radius: 8px; font-size: 13px; }
.fb-card .fb-cue b { color: var(--accent); }
.fb-card .fb-when { font-size: 12px; color: var(--muted); margin-top: 8px; }
.fb-card .fb-when span { cursor: pointer; text-decoration: underline dotted; margin-right: 8px; }

.coach-notes { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 8px; }
.coach-notes li { display: flex; gap: 10px; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; border-left: 4px solid var(--border); font-size: 13px; line-height: 1.5; }
.coach-notes li.warn { border-left-color: var(--bad); } .coach-notes li.tip { border-left-color: var(--warn); } .coach-notes li.good { border-left-color: var(--good); } .coach-notes li.info { border-left-color: var(--primary); }
.coach-notes .ic { font-size: 20px; line-height: 1.2; }
.coach-notes .times { margin-top: 4px; font-size: 12px; color: var(--muted); }
.coach-notes .times span { cursor: pointer; text-decoration: underline dotted; margin-right: 8px; color: var(--accent); font-family: ui-monospace, monospace; }
.glossary { margin: 6px 0 0; font-size: 13px; }
.glossary dt { font-weight: 700; color: var(--text); margin-top: 8px; }
.glossary dd { margin: 2px 0 0; color: var(--text-2); }

.site-footer { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 20px 18px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-2); background: var(--surface); }
.site-footer b { color: var(--text); }
.site-footer .sep { color: var(--muted); }
.site-footer a { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); text-decoration: none; font-weight: 600; padding: 4px 10px; border: 1px solid rgba(240,163,94,.4); border-radius: 999px; }
.site-footer a:hover { background: rgba(240,163,94,.12); }

.legend .sw.grad { border-radius: 3px; width: 26px; height: 8px; background: linear-gradient(90deg, #2f9e70, #f2c14e, #ef6b6b); }
.eff-block { display: flex; gap: 16px; align-items: center; background: var(--surface-2); border-radius: 12px; padding: 14px; }
.eff-ring { flex: 0 0 auto; position: relative; width: 112px; height: 112px; }
.eff-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.eff-ring .num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800; }
.eff-info .ttl { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.eff-info .verdict { font-size: 16px; font-weight: 700; margin: 2px 0 6px; }
.eff-info ul { margin: 0; padding: 0; list-style: none; font-size: 12px; color: var(--text-2); }
.eff-info li { display: flex; justify-content: space-between; gap: 12px; }
.eff-info li b { color: var(--bad); font-weight: 600; }
.muscle-bars { display: flex; flex-direction: column; gap: 8px; }
.muscle-bars .mb { display: grid; grid-template-columns: 120px 1fr 38px; gap: 8px; align-items: center; font-size: 13px; }
.muscle-bars .track { height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.muscle-bars .fill { height: 100%; border-radius: 5px; }
.muscle-bars .pct { text-align: right; color: var(--text-2); font-variant-numeric: tabular-nums; }
.muscle-note { font-size: 13px; color: var(--text-2); margin-top: 8px; }

.move-list { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 5px; }
.move-list li { display: grid; grid-template-columns: 30px 1fr auto; gap: 8px; align-items: center; background: var(--surface-2); border-radius: 8px; padding: 7px 10px; font-size: 13px; cursor: pointer; border-left: 3px solid var(--good); }
.move-list li.warn { border-left-color: var(--bad); } .move-list li.tip { border-left-color: var(--warn); }
.move-list li:hover { filter: brightness(1.15); }
.move-list .n { font-weight: 800; color: var(--text-2); }
.move-list .sub { color: var(--muted); font-size: 12px; }
.move-list .crux { background: var(--accent); color: #1a1208; font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 999px; margin-left: 6px; }
.move-list .t { color: var(--accent); font-family: ui-monospace, monospace; font-size: 12px; }
.event-list .lab { display: flex; gap: 4px; }
.event-list .lab button { width: 26px; height: 24px; border-radius: 6px; border: 1px solid var(--border); background: transparent; color: var(--text-2); cursor: pointer; font-size: 13px; }
.event-list .lab button.on[data-ok="1"] { background: var(--good); color: #fff; border-color: var(--good); }
.event-list .lab button.on[data-ok="0"] { background: var(--bad); color: #fff; border-color: var(--bad); }

.field input[type=text] { background: var(--surface-2); border: 1px solid var(--border); color: var(--text); padding: 7px 9px; border-radius: 6px; font-size: 13px; }
.move-list .sc { font-weight: 800; font-size: 14px; }
.move-list li.muted, .move-list li.warn { display: block; cursor: default; border-left-color: var(--border); }
.tab { padding-left: 2px; padding-right: 2px; font-size: 12px; }

.share-cta { display: flex; gap: 14px; align-items: center; justify-content: space-between; background: rgba(240,163,94,.12); border: 1px solid rgba(240,163,94,.45); border-radius: var(--radius); padding: 12px 14px; font-size: 13px; line-height: 1.5; }
.share-cta.done { background: rgba(86,197,150,.12); border-color: rgba(86,197,150,.45); }
.review-box { background: rgba(91,141,239,.12); border: 1px solid rgba(91,141,239,.4); border-radius: 8px; padding: 9px 11px; font-size: 13px; color: var(--text-2); margin: 8px 0; line-height: 1.5; }
.review-box b { color: var(--text); }
.review-box .btn { margin-top: 6px; display: block; }
.modal { position: fixed; inset: 0; background: rgba(5,7,10,.72); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; max-width: 520px; width: 100%; max-height: 92vh; overflow: auto; padding: 22px 24px; }
.modal-card h2 { margin: 0 0 6px; font-size: 20px; }
.modal-card .lead { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.5; }
.modal-card .lead b { color: var(--accent); }
.tips { margin: 0; padding-left: 18px; font-size: 13px; color: var(--text-2); line-height: 1.55; }
.tips b { color: var(--text); }
.modal-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; flex-wrap: wrap; }

.q-row { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.q-row .k { color: var(--text-2); }
.q-row .v { font-weight: 600; text-align: right; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.badge.good { background: rgba(86,197,150,.18); color: var(--good); }
.badge.warn { background: rgba(242,193,78,.18); color: var(--warn); }
.badge.bad { background: rgba(239,107,107,.18); color: var(--bad); }
.q-notes { margin-top: 10px; }
.q-notes li { margin-bottom: 6px; font-size: 13px; color: var(--text-2); }

/* ===== Layout v2: perjalanan 3 langkah, lebih lega ===== */
html, body { font-size: 15px; }
.topbar { padding: 12px 24px; }
.topbar .subtitle { display: none; }
#analyzeBtn { display: none !important; }
.layout { max-width: 1320px; width: 100%; margin: 0 auto; grid-template-columns: minmax(0, 1fr) 430px; gap: 22px; padding: 20px 24px 28px; }
.btn.big { padding: 14px 34px; font-size: 16px; border-radius: 12px; align-self: center; }
.steps { list-style: none; display: flex; justify-content: center; gap: 10px; margin: 0; padding: 14px 16px 2px; flex-wrap: wrap; }
.steps li { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
.steps li + li::before { content: ""; width: 34px; height: 2px; background: var(--border); margin-right: 2px; }
.steps li span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; }
.steps li em { font-style: normal; }
.steps li.on { color: var(--text); } .steps li.on span { background: var(--accent); border-color: var(--accent); color: #1a1208; }
.steps li.past span { background: var(--good); border-color: var(--good); color: #fff; }

body.st-empty .layout, body.st-ready .layout { grid-template-columns: 1fr; max-width: 820px; }
body.st-empty .panel, body.st-ready .panel,
body.st-empty .controls, body.st-empty .opts, body.st-empty #analyzeBig, body.st-empty .timeline-wrap,
body.st-ready .opts, body.st-ready .timeline-wrap, body.st-done #analyzeBig { display: none; }
body.st-empty .video-wrap { aspect-ratio: auto; min-height: 380px; border-style: dashed; border-width: 2px; }
body.st-empty .file-btn { display: none; }
body.mode-awam .timeline-wrap { display: none; }
.drop-hint { gap: 14px; }
.drop-hint .hero-title { font-size: 19px; font-weight: 700; color: var(--text); }
.drop-hint .drop-icon { font-size: 52px; }

.stage { gap: 14px; }
.video-wrap { border-radius: 16px; }
.opts { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 12px; }
.opts summary, .fold summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-2); list-style: none; display: flex; align-items: center; gap: 8px; }
.opts summary::before, .fold summary::before { content: "▸"; color: var(--muted); }
.opts[open] summary::before, .fold[open] summary::before { content: "▾"; }
.opts[open] summary { margin-bottom: 10px; }
.opts .legend { margin-top: 10px; }
.fold { border-top: 1px solid var(--border); margin-top: 16px; padding-top: 12px; }
.fold summary { text-transform: uppercase; letter-spacing: .06em; font-size: 12px; }
.fold[open] summary { margin-bottom: 8px; }

.panel { border-radius: 16px; max-height: calc(100vh - 40px); top: 20px; }
.tabs { padding: 6px 8px 0; gap: 4px; }
.tab { font-size: 14px; padding: 11px 8px; border-radius: 8px 8px 0 0; }
.tab-body { padding: 18px 20px 22px; }
.tab-body h3 { margin-top: 22px; }
.eff-block { padding: 18px; border-radius: 16px; gap: 18px; }
.eff-ring { width: 124px; height: 124px; } .eff-ring .num { font-size: 31px; }
.eff-info .verdict { font-size: 18px; }
.coach-notes li, .plain-card { border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.plain-card .pc-title { font-size: 14px; } .plain-card .pc-text { font-size: 13.5px; }
.share-cta { border-radius: 14px; padding: 14px 16px; font-size: 14px; }
.export-row { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; }
.filmstrip-wrap { border-radius: 14px; }
@media (max-width: 1000px) { .layout { grid-template-columns: 1fr; padding: 14px; } .panel { position: static; max-height: none; } .steps li + li::before { width: 14px; } }

/* Timeline & technique library */
.feed { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.feed.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.feed-card { background: var(--surface-2); border-radius: 14px; overflow: hidden; }
.fc-video { position: relative; aspect-ratio: 9 / 12; background: linear-gradient(160deg, #232a35, #12161c); display: grid; place-items: center; cursor: pointer; }
.fc-video .play { font-size: 34px; color: #fff; opacity: .85; }
.fc-video .sc { position: absolute; left: 8px; top: 8px; background: rgba(0,0,0,.6); padding: 3px 8px; border-radius: 999px; font-weight: 800; font-size: 13px; }
.fc-video .top { position: absolute; right: 8px; top: 8px; background: var(--good); color: #fff; padding: 3px 8px; border-radius: 999px; font-weight: 800; font-size: 11px; }
.fc-video video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.fc-info { padding: 9px 11px 11px; font-size: 13px; line-height: 1.45; }
.fc-info .sub { color: var(--muted); font-size: 12px; }
.feed-section { max-width: 1320px; width: 100%; margin: 0 auto; padding: 4px 24px 30px; }
.feed-section h2 { font-size: 18px; margin: 0 0 4px; }
.feed-section p { margin: 0 0 6px; font-size: 13px; }
body.st-done .feed-section { display: none; }
.tech-list { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; }
.tech-list li { display: flex; justify-content: space-between; gap: 10px; align-items: center; background: var(--surface-2); border-radius: 10px; padding: 8px 11px; font-size: 13px; opacity: .78; }
.tech-list li.seen { opacity: 1; border-left: 3px solid var(--good); }
.tech-list li.none { opacity: .55; }
.tech-list .sub { color: var(--text-2); font-size: 12px; }
.tech-list .cnt { font-weight: 800; color: var(--good); }
.tech-list a { color: var(--accent); text-decoration: none; font-weight: 600; white-space: nowrap; font-size: 12px; }
.opt-help { margin: 12px 0 4px; padding-left: 18px; font-size: 12.5px; color: var(--text-2); line-height: 1.55; }
.opt-help b { color: var(--text); }
.fc-video video.pv { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.fc-video .play, .fc-video .sc, .fc-video .top { z-index: 1; }
.fc-video.playing .play { display: none; } .fc-video.playing video.pv { object-fit: contain; }
.gym-search { width: 100%; max-width: 420px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); padding: 9px 12px; border-radius: 10px; font-size: 14px; margin: 8px 0 4px; }
.export-row { flex-direction: column; align-items: stretch; }
.exp-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.exp-card { background: var(--surface-2); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 6px; align-items: stretch; text-align: center; }
.exp-card canvas { width: 100%; height: 170px; object-fit: contain; background: #0b0d10; border-radius: 8px; }
.exp-card .btn { width: 100%; }
@media (max-width: 640px) { .exp-cards { grid-template-columns: 1fr; } }
.chips { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-2); cursor: pointer; }
.chip:has(input:checked) { border-color: var(--accent); color: var(--text); background: rgba(240,163,94,.12); }
.chip input { accent-color: var(--accent); margin: 0; }
.exp-cards { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.impact-line { font-size: 13px; color: var(--text-2); margin: 4px 0; } .impact-line b { color: var(--accent); }
.contrib-board { font-size: 12.5px; color: var(--text-2); margin: 2px 0 6px; } .contrib-board b { color: var(--text); }
.ubadge { font-size: 10.5px; font-weight: 700; background: rgba(242,193,78,.16); color: var(--warn); padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
.fc-verify { border-top: 1px solid var(--border); padding: 8px 11px 10px; font-size: 12.5px; color: var(--text-2); display: flex; flex-direction: column; gap: 6px; }
.fc-verify b { color: var(--text); } .fc-verify .ok { color: var(--good); }
.fc-verify div { display: flex; gap: 6px; justify-content: flex-end; }
.fc-verify button { background: var(--surface); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 5px 11px; cursor: pointer; font-size: 13px; }
.fc-verify button:hover { border-color: var(--accent); } .fc-verify button:disabled { opacity: .5; }
.trim { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.trim label { display: grid; grid-template-columns: 56px 1fr 62px; gap: 10px; align-items: center; color: var(--text-2); }
.trim input[type=range] { accent-color: var(--accent); width: 100%; }
body:not(.st-ready) .trim { display: none; }
.inapp-warn { background: rgba(242,193,78,.16); border-bottom: 1px solid rgba(242,193,78,.5); color: var(--text); padding: 10px 16px; font-size: 13px; text-align: center; line-height: 1.5; }
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; gap: 8px; padding: 10px 12px; }
  .topbar .title { font-size: 15px; }
  .actions { width: 100%; justify-content: flex-start; }
  .steps { gap: 6px; padding: 10px 8px 0; } .steps li { font-size: 12px; }
  .layout { padding: 12px; }
}
.upload-tips { background: rgba(91,141,239,.10); border: 1px solid rgba(91,141,239,.4); border-radius: var(--radius); padding: 12px 14px; font-size: 13px; line-height: 1.55; color: var(--text-2); }
.upload-tips > b { color: var(--text); font-size: 14px; }
.upload-tips ul { margin: 6px 0 0; padding-left: 18px; } .upload-tips li b { color: var(--text); }
body:not(.st-ready) .upload-tips { display: none; }
/* Video tegak: tips, potong, dan tombol Analisa di sebelah frame video (layar lebar) */
@media (min-width: 760px) {
  body.st-ready .stage:has(.video-wrap.portrait) { display: grid; grid-template-columns: auto minmax(280px, 1fr); column-gap: 20px; align-items: start; }
  body.st-ready .stage:has(.video-wrap.portrait) .video-wrap { grid-column: 1; grid-row: 1 / span 4; margin: 0; }
  body.st-ready .stage:has(.video-wrap.portrait) > :not(.video-wrap) { grid-column: 2; }
  body.st-ready .stage:has(.video-wrap.portrait) .controls { grid-column: 1 / -1; }
  body.st-ready .stage:has(.video-wrap.portrait) #analyzeBig { justify-self: start; }
}
.export-toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); width: min(440px, calc(100vw - 24px)); background: var(--surface); border: 1px solid var(--accent); border-radius: 14px; padding: 14px 16px; z-index: 90; box-shadow: 0 12px 40px rgba(0,0,0,.55); display: flex; flex-direction: column; gap: 9px; font-size: 14px; }
.export-toast .et-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.export-toast .progress-bar { height: 10px; border-radius: 5px; } .export-toast .progress-bar > div { background: var(--accent); height: 100%; border-radius: 5px; transition: width .2s; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; margin-top: 8px; }
.badge-item { background: var(--surface-2); border-radius: 12px; padding: 8px 6px 10px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; opacity: .6; }
.badge-item.have { opacity: 1; }
.badge-item canvas { width: 66px; height: 66px; }
.badge-item b { font-size: 12px; } .badge-item span { font-size: 10.5px; color: var(--muted); line-height: 1.3; }
.badge-item .new { background: var(--warn); color: #1a1208; border-radius: 999px; padding: 0 5px; font-size: 9px; font-weight: 800; }
.export-toast.ready { border-color: var(--good); z-index: 95; }
.fc-video img.pv { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fc-video .arch { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.65); color: var(--text-2); font-size: 11px; text-align: center; padding: 4px; z-index: 1; }
.quota-line { font-size: 12.5px; color: var(--text-2); text-align: center; line-height: 1.5; } .quota-line b { color: var(--accent); font-size: 14px; }
body:not(.st-ready) .quota-line { display: none; }
