/* Studio: three columns on desktop, stacked on phones. */
@media (min-width: 1101px) { body.in-studio { overflow: hidden; } }
.studio { display: grid; grid-template-columns: 300px minmax(0, 1fr) 380px; grid-template-rows: calc(100vh - var(--topbar)); gap: 0; }
.studio > aside, .studio > section { min-height: 0; }
.col-left { border-right: 1px solid var(--line); background: var(--bg-2); display: flex; flex-direction: column; overflow: hidden; }
.col-right { border-left: 1px solid var(--line); background: var(--bg-2); display: flex; flex-direction: column; overflow: hidden; }
.col-center { display: flex; flex-direction: column; min-width: 0; background: radial-gradient(800px 400px at 50% 0%, rgba(139,108,255,0.08), transparent 70%); }
.col-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; }
.col-head h3 { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); font-family: var(--font); }
.col-body { flex: 1; overflow: auto; padding: 0 12px 16px; }

/* ---------- Studio top bar extras ---------- */
.pname { font-family: var(--display); font-weight: 700; font-size: 16px; background: transparent; border: 1px solid transparent; padding: 6px 10px; border-radius: 10px; min-width: 120px; max-width: 320px; }
.pname:hover { border-color: var(--line); }
.pname:focus { border-color: var(--line-2); background: var(--bg-3); box-shadow: none; }
.pclient { font-size: 12.5px; color: var(--text-2); background: transparent; border: 1px solid transparent; padding: 5px 8px; border-radius: 8px; width: 120px; }
.pclient:hover { border-color: var(--line); }
.pclient:focus { border-color: var(--line-2); background: var(--bg-3); box-shadow: none; }
.taskpill { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 14px 0 12px; border-radius: 999px; background: var(--bg-3); border: 1px solid var(--line-2); font-size: 12.5px; max-width: 360px; }
.taskpill .bar { width: 90px; flex: none; }
.taskpill b { white-space: nowrap; }
.taskpill .msg { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }

/* ---------- Clips column ---------- */
.dropzone { margin: 0 4px 12px; border: 1.5px dashed var(--line-2); border-radius: 14px; padding: 16px 12px; text-align: center; color: var(--text-2); transition: border-color .15s, background .15s; cursor: pointer; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: rgba(139, 108, 255, 0.08); color: var(--text); }
.dropzone b { display: block; color: var(--text); margin-bottom: 2px; }
.dropzone small { font-size: 11.5px; color: var(--text-3); }
.clips { display: flex; flex-direction: column; gap: 8px; }
.clip { position: relative; display: grid; grid-template-columns: 54px 1fr auto; gap: 10px; align-items: center; padding: 8px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); cursor: grab; transition: border-color .15s, background .15s, transform .15s; }
.clip:hover { border-color: var(--line-2); background: var(--panel-2); }
.clip.selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(139,108,255,0.25); }
.clip.dragging { opacity: 0.4; }
.clip.over-top { box-shadow: 0 -2px 0 var(--accent); }
.clip.over-bottom { box-shadow: 0 2px 0 var(--accent); }
.clip .th { width: 54px; height: 72px; border-radius: 8px; overflow: hidden; background: var(--bg-4); position: relative; }
.clip .th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.clip .th .n { position: absolute; top: 4px; left: 4px; width: 18px; height: 18px; border-radius: 6px; background: rgba(0,0,0,0.7); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.clip .info { min-width: 0; }
.clip .info .nm { font-weight: 600; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clip .info .meta { font-size: 11px; color: var(--text-3); margin-top: 2px; display: flex; gap: 6px; flex-wrap: wrap; }
.clip .info .meta .on-device { color: var(--lime); font-weight: 600; }
.clip .info .meta .elsewhere { color: var(--warn); }
.server-backup { margin-top: 6px; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.07); }
.server-backup summary { cursor: pointer; font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.server-backup[open] summary { margin-bottom: 8px; }
.server-backup .stack { margin-top: 8px; }
.speed-test { margin-top: 12px; }
.speed-test .live-step { color: var(--lime); margin-top: 8px; }
.speed-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 12px; }
.speed-table th { text-align: left; font-weight: 600; color: var(--text-3); padding: 6px 4px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.speed-table td { padding: 8px 4px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); vertical-align: top; }
.speed-table td .dim { font-size: 11px; margin-top: 2px; }
.speed-table td .warn-text { font-size: 11px; color: var(--warn); margin-top: 2px; }
.speed-table .num { white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.speed-table .num.new { color: var(--lime); font-weight: 600; }
.speed-table .num.x { color: var(--lime); }
.device-sources { font-size: 12px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.device-sources .src { display: flex; align-items: center; gap: 8px; justify-content: space-between; padding: 6px 8px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); }
.device-sources .src span { flex: 1 1 auto; min-width: 0; line-height: 1.35; }
.device-sources .src .btn { flex: none; }
.device-sources .ok { color: var(--lime); }
.device-sources .miss { color: var(--warn); }
.clip .acts { display: flex; flex-direction: column; gap: 4px; opacity: 0; transition: opacity .15s; }
.clip:hover .acts, .clip.selected .acts { opacity: 1; }
.clip .heat { grid-column: 1 / -1; height: 6px; border-radius: 4px; background: var(--bg-4); position: relative; overflow: hidden; }
.clip .heat i { position: absolute; top: 0; bottom: 0; border-radius: 4px; background: var(--grad); opacity: 0.7; }
.clip .heat i.used { background: var(--lime); opacity: 1; }
.clip .heat i.lock { background: var(--warn); opacity: 0.9; }
.clip .up { grid-column: 1 / -1; }
.clip .up .bar { height: 4px; }
.clip .up small { color: var(--text-3); font-size: 11px; }
.clip .badge { position: absolute; top: -6px; right: -4px; font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 6px; background: var(--lime); color: #0b0b10; }

/* Filmstrip / slip editor */
.strip { margin: 8px 4px 0; padding: 10px; border-radius: 12px; background: var(--bg-3); border: 1px solid var(--line); }
.strip .film { position: relative; height: 56px; border-radius: 8px; overflow: hidden; background: var(--bg-4) center / auto 100% repeat-x; cursor: crosshair; }
.strip .film .win { position: absolute; top: 0; bottom: 0; border: 2px solid var(--lime); border-radius: 6px; background: rgba(182,255,59,0.12); box-shadow: 0 0 0 200px rgba(0,0,0,0.35); cursor: grab; }
.strip .film .win::before, .strip .film .win::after { content: ''; position: absolute; top: 50%; width: 4px; height: 18px; margin-top: -9px; border-radius: 2px; background: var(--lime); }
.strip .film .win::before { left: 2px; } .strip .film .win::after { right: 2px; }
.strip .film .lockwin { position: absolute; top: 0; bottom: 0; border: 2px dashed var(--warn); border-radius: 6px; background: rgba(255,200,61,0.12); }
.strip .film .mom { position: absolute; bottom: 2px; height: 3px; border-radius: 2px; background: var(--accent-2); opacity: 0.8; }
.strip .meta { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; color: var(--text-3); }

/* ---------- Center: preview ---------- */
.preview-wrap { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 12px 18px 4px; position: relative; }
/* The phone is a size container: everything drawn inside scales with the phone (cqw), like a real device. */
.phone-frame { position: relative; height: 100%; max-height: min(100%, calc((100vw - 40px) * 16 / 9)); aspect-ratio: 9 / 16; border-radius: 26px; background: #000; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.12); flex: none; container-type: size; }
.phone-frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.phone-frame .live-canvas { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; display: block; }
.phone-frame .live-canvas.hidden, .phone-frame video.hidden { display: none; }
/* Source videos of the live preview: decoding, never shown (the canvas paints them). */
.phone-frame .live-src { position: absolute; left: 0; top: 0; width: 2px; height: 2px; overflow: hidden; opacity: 0.01; pointer-events: none; }
.phone-frame .live-src video, .phone-frame .live-src audio { position: static; width: 2px; height: 2px; }
.phone-frame .layer { position: absolute; inset: 0; pointer-events: none; }
/* Each text image sits in a holder (.cap): the holder is moved / scaled by hand, the image keeps its entry
   animation. The images never take the touch themselves (they cover the whole phone); .text-grab does. */
.phone-frame .layer .cap { position: absolute; inset: 0; pointer-events: none; will-change: transform; }
.phone-frame .layer img { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.phone-frame .layer img.on { opacity: 1; }
.phone-frame .layer img.on.anim-pop { animation: cap-pop .26s var(--spring) both; }
.phone-frame .layer img.on.anim-rise { animation: cap-rise .28s var(--ease) both; }
.phone-frame .layer img.on.anim-fade { animation: cap-fade .24s ease both; }
@keyframes cap-pop { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: none; } }
@keyframes cap-rise { from { opacity: 0; transform: translateY(1.4%); } to { opacity: 1; transform: none; } }
@keyframes cap-fade { from { opacity: 0; } to { opacity: 1; } }
.phone-frame .safe { position: absolute; left: 10.185%; right: 12.96%; top: 22.9%; bottom: 30.2%; border: 1px dashed rgba(182,255,59,0.55); border-radius: 4px; pointer-events: none; opacity: 0; transition: opacity .2s; }
.phone-frame .igui { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .2s; background: url('../img/ig-ui.svg') center / 100% 100% no-repeat; }
.phone-frame.guides .safe, .phone-frame.guides .igui { opacity: 1; }
.phone-frame .empty-state { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 10cqw; color: var(--text-2); background: radial-gradient(400px 300px at 50% 30%, rgba(139,108,255,0.18), transparent 70%), #0d0d14; }
.phone-frame .empty-state h3 { font-size: clamp(16px, 7cqw, 30px); margin-bottom: 2cqw; }
.phone-frame .empty-state .muted { font-size: clamp(12px, 4.4cqw, 18px); }
.phone-frame .empty-state .steps { display: flex; flex-direction: column; gap: 2.6cqw; margin-top: 5cqw; text-align: left; }
.phone-frame .empty-state .steps div { display: flex; gap: 3.2cqw; align-items: center; font-size: clamp(12px, 4.4cqw, 18px); }
.phone-frame .empty-state .steps i { width: 7.4cqw; height: 7.4cqw; min-width: 20px; min-height: 20px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: clamp(10px, 3.6cqw, 14px); background: var(--bg-4); border: 1px solid var(--line-2); flex: none; }
.phone-frame .empty-state .steps div.done i { background: var(--lime); color: #0b0b10; border-color: transparent; }
.phone-frame .empty-state .btn { font-size: clamp(12.5px, 4.4cqw, 17px); height: auto; padding: 2.8cqw 5cqw; }
.phone-frame .caption-hint { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; font-size: 11px; color: rgba(255,255,255,0.6); pointer-events: none; }

/* AI progress scene inside the phone: every size follows the phone width (cqw). */
.ai-scene { position: absolute; inset: 0; background: #0b0b12; display: flex; flex-direction: column; justify-content: flex-end; padding: 6cqw; overflow: hidden; }
.ai-scene .eq { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 4px; padding: 0 18px; opacity: 0.9; }
.ai-scene .eq i { width: 6px; border-radius: 4px; background: var(--grad); height: 10%; animation: eq 1.1s ease-in-out infinite; }
@keyframes eq { 0%, 100% { transform: scaleY(0.3); opacity: 0.5; } 50% { transform: scaleY(1); opacity: 1; } }
.ai-scene .stages { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 2.4cqw; background: rgba(10,10,16,0.74); backdrop-filter: blur(10px); border: 1px solid var(--line-2); border-radius: 5cqw; padding: 4.2cqw; }
.ai-scene .stage { display: flex; align-items: center; gap: 3cqw; font-size: clamp(11px, 4.1cqw, 17px); line-height: 1.3; color: var(--text-3); transition: color .2s; white-space: nowrap; }
.ai-scene .stage i { width: 6cqw; height: 6cqw; min-width: 16px; min-height: 16px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; font-size: clamp(9px, 3.3cqw, 13px); font-style: normal; flex: none; transition: all .2s; }
.ai-scene .stage.active { color: var(--text); }
.ai-scene .stage.active i { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(139,108,255,0.2); animation: pulse 1.2s infinite; }
.ai-scene .stage.done { color: var(--text-2); }
.ai-scene .stage.done i { background: var(--lime); border-color: transparent; color: #0b0b10; font-weight: 800; }
.ai-scene .msg { position: relative; z-index: 2; margin-top: 2.4cqw; font-size: clamp(10.5px, 3.9cqw, 15px); color: var(--text-2); min-height: 1.4em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-scene .elapsed { position: absolute; top: 5cqw; right: 6cqw; font-family: var(--display); font-weight: 700; font-size: clamp(16px, 7.5cqw, 34px); z-index: 2; }
.ai-scene .title { position: absolute; top: 5.6cqw; left: 6cqw; z-index: 2; font-family: var(--display); font-weight: 700; font-size: clamp(12px, 5cqw, 22px); }

/* Player row: transport, Ask Tempo, view buttons — one line under the phone. */
.controls { display: flex; align-items: center; gap: 8px; padding: 6px 18px 6px; position: relative; z-index: 3; }
.controls .time { font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.controls .spacer { flex: 0 0 4px; }
.controls .present-btn { gap: 6px; padding: 0 12px; }
.controls .present-btn .lbl { font-size: 12px; font-weight: 600; }

/* ---------- Ask Tempo ---------- */
.ask-wrap { flex: 1; min-width: 0; padding: 0; }
.askbar { display: flex; gap: 8px; align-items: center; padding: 3px 3px 3px 14px; border-radius: 999px; background: var(--bg-3); border: 1px solid var(--line-2); box-shadow: 0 0 0 0 rgba(139,108,255,0); transition: box-shadow .2s, border-color .2s; }
.askbar:focus-within { border-color: rgba(139,108,255,0.6); box-shadow: 0 0 0 4px rgba(139,108,255,0.15), 0 10px 30px rgba(139,108,255,0.12); }
.ask-input { flex: 1; background: transparent; border: 0; padding: 7px 0; font-size: 13.5px; min-width: 0; }
.ask-input:focus { box-shadow: none; }
.ask-reply { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12.5px; padding: 9px 14px; color: var(--text-2); background: rgba(16,16,24,0.94); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 16px 40px rgba(0,0,0,0.5); backdrop-filter: blur(10px); animation: rise .3s var(--ease); }
.ask-reply b { color: var(--text); }

/* ---------- Timeline ---------- */
.timeline { height: 240px; flex: none; border-top: 1px solid var(--line); background: var(--bg-2); position: relative; display: flex; flex-direction: column; transition: height .25s var(--ease); }
.timeline.collapsed { height: 44px; }
.timeline.collapsed .tl-canvas-wrap { display: none; }
.timeline .tl-head { display: flex; align-items: center; gap: 10px; padding: 8px 14px 4px; font-size: 12px; color: var(--text-2); }
.timeline .tl-head .legend { display: flex; gap: 12px; margin-left: auto; }
.timeline .tl-collapse { margin-left: 4px; flex: none; }
.note { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; line-height: 1.45; padding: 8px 10px; border-radius: 10px; margin-top: 8px; }
.note .ico { flex: none; margin-top: 1px; }
.note.warn { color: var(--warn); background: rgba(255,200,61,0.08); border: 1px solid rgba(255,200,61,0.25); }
.timeline .tl-head .legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }
.timeline canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; cursor: default; touch-action: none; }
.timeline .tip { position: absolute; padding: 4px 8px; border-radius: 6px; background: rgba(20,20,28,0.95); border: 1px solid var(--line-2); font-size: 11px; pointer-events: none; transform: translate(-50%, -110%); white-space: nowrap; z-index: 5; }

/* ---------- Right column: tabs ---------- */
.tabs { display: flex; gap: 2px; padding: 12px 12px 0; border-bottom: 1px solid var(--line); }
.tabs button { flex: 1; height: 38px; border-radius: 10px 10px 0 0; color: var(--text-3); font-weight: 600; font-size: 12.5px; position: relative; transition: color .15s; display: flex; align-items: center; justify-content: center; gap: 6px; }
.tabs button svg { width: 15px; height: 15px; }
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--text); }
.tabs button.active::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--grad); border-radius: 2px; }
.tab-body { flex: 1; overflow: auto; padding: 14px 14px 30px; display: flex; flex-direction: column; gap: 16px; }
.tab-body h4 { font-family: var(--font); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); margin: 0 0 8px; }
.textarea-big { min-height: 160px; font-size: 14px; }
.screens { display: flex; flex-direction: column; gap: 8px; }
.screen { padding: 10px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); cursor: pointer; transition: border-color .15s, background .15s; }
.screen:hover { border-color: var(--line-2); }
.screen.active { border-color: var(--accent); background: rgba(139,108,255,0.08); }
.screen .sh { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-3); margin-bottom: 6px; }
.screen .sh .warn { color: var(--warn); }
.screen .words { line-height: 1.7; font-size: 13.5px; }
.screen .words .w { padding: 1px 4px; border-radius: 5px; cursor: pointer; transition: background .12s; }
.screen .words .w:hover { background: var(--panel-2); }
.screen .words .w.hl { background: rgba(255,226,39,0.22); color: #ffe227; }
.screen .tools { display: flex; gap: 6px; margin-top: 8px; align-items: center; }
.tpl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tpl { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-3); cursor: pointer; transition: transform .15s var(--spring), border-color .15s; position: relative; }
.tpl:hover { transform: translateY(-2px); border-color: var(--line-2); }
.tpl.active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(139,108,255,0.3); }
.tpl .tp { aspect-ratio: 9 / 12; background: #1a1a22 url('../img/scene.jpg') center / cover; position: relative; overflow: hidden; }
.tpl .tp .tx { position: absolute; left: 8%; right: 8%; top: 50%; transform: translateY(-50%); text-align: center; }
.tpl .tn { padding: 8px 10px; font-size: 12.5px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.tpl .tn i { width: 8px; height: 8px; border-radius: 50%; }
.tpl .busy { position: absolute; inset: 0; background: rgba(0,0,0,0.4); display: grid; place-items: center; }
.music-box { padding: 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.wave { position: relative; height: 70px; border-radius: 8px; background: var(--bg-4); overflow: hidden; cursor: pointer; margin-top: 10px; }
.wave canvas { width: 100%; height: 100%; display: block; }
.wave .sel { position: absolute; top: 0; bottom: 0; background: rgba(139,108,255,0.22); border-left: 2px solid var(--accent); border-right: 2px solid var(--accent); pointer-events: none; }
.wave .drop { position: absolute; top: 0; width: 2px; height: 100%; background: var(--accent-2); opacity: 0.7; pointer-events: none; }
.stat { display: flex; gap: 14px; margin-top: 8px; font-size: 12px; color: var(--text-2); }
.stat b { color: var(--text); }
.opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opt { padding: 10px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); cursor: pointer; transition: border-color .15s, background .15s; }
.opt:hover { border-color: var(--line-2); }
.opt.active { border-color: var(--accent); background: rgba(139,108,255,0.1); }
.opt b { display: block; font-size: 13px; }
.opt span { font-size: 11.5px; color: var(--text-3); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.toggle-row b { font-size: 13px; display: block; }
.toggle-row span { font-size: 11.5px; color: var(--text-3); }
.exports { display: flex; flex-direction: column; gap: 10px; }
.export { padding: 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.export .qa { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.export video { width: 100%; border-radius: 8px; margin-top: 8px; background: #000; max-height: 260px; }
.shot-card { padding: 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.shot-card .sr { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--text-2); }
.shot-card .reason { font-size: 12px; color: var(--text-2); margin-top: 6px; line-height: 1.4; }
.big-cta { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 4; }
.hint { font-size: 12px; color: var(--text-3); line-height: 1.5; }

/* ---------- Mobile studio ---------- */
.mobile-tabs { display: none; }
@media (max-width: 1100px) {
  .studio { grid-template-columns: 1fr; grid-template-rows: auto; }
  .col-left, .col-right { border: 0; display: none; }
  .col-left.show, .col-right.show { display: flex; max-height: 70vh; }
  .col-center { height: calc(100vh - var(--topbar) - 54px); }
  .preview-wrap { padding: 10px 12px 4px; }
  .timeline { height: 240px; }
  .controls { flex-wrap: wrap; gap: 6px; padding: 6px 12px; }
  .controls .ask-wrap { order: 10; flex-basis: 100%; }
  .controls .present-btn { padding: 0; width: 30px; }
  .controls .present-btn .lbl { display: none; }
  .timeline .tl-collapse { margin-left: auto; }
  .mobile-tabs { display: flex; position: sticky; bottom: 0; z-index: 20; background: rgba(11,11,16,0.9); backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); gap: 4px; }
  .mobile-tabs button { flex: 1; height: 40px; border-radius: 10px; font-size: 12px; font-weight: 600; color: var(--text-2); }
  .mobile-tabs button.active { background: var(--panel-2); color: var(--text); }
  .topbar { padding: 0 10px; gap: 6px; }
  .pname { max-width: 130px; min-width: 0; flex: 1; }
  .pclient, .desk-only, .topbar .brand { display: none; }
  .topbar .btn .lbl { display: none; }
  .topbar .btn.primary, .topbar .btn { padding: 0 12px; }
  .taskpill .msg, .taskpill b { display: none; }
  .taskpill { padding: 0 8px; }
  .chip { white-space: nowrap; }
  .timeline .tl-head .info, .timeline .tl-head .legend { display: none; }
  .ask-input { font-size: 13px; }
}

/* Client style (learned from the client's own HK Reels) */
.house-chip { cursor: pointer; font-family: inherit; }
.house-chip svg { width: 12px; height: 12px; }
.house-chip.off { color: var(--text-2); border-color: var(--line); background: var(--panel-2); }
.house-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.house-facts .chip { height: auto; min-height: 24px; padding: 4px 10px; white-space: normal; line-height: 1.35; }
.tpl .tpl-badge { position: absolute; top: 8px; left: 8px; height: 20px; font-size: 10.5px; z-index: 2; }
.tpl.house .face.front { box-shadow: inset 0 0 0 1px rgba(61, 220, 151, 0.35); }
