:root {
  --bg: #0f1115; --panel: #171a21; --panel2: #1e222b; --line: #2a2f3a;
  --text: #e6e8ee; --muted: #8b93a3; --accent: #5b8cff;
  --pending: #8b93a3; --under_review: #e0a93b; --approved: #3fb97a; --rejected: #e5594f;
  --hover: rgba(255,255,255,.06); --on: rgba(91,140,255,.2); --on-text: #fff; color-scheme: dark;
}
:root[data-theme=light] {
  --bg: #f3f4f8; --panel: #ffffff; --panel2: #edeff4; --line: #d8dce6;
  --text: #1b1f29; --muted: #5f687a; --accent: #3a6af0;
  --hover: rgba(0,0,0,.05); --on: rgba(58,106,240,.13); --on-text: #1b1f29; color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font: 14px/1.45 system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 6px 12px; cursor: pointer; }
button:hover { border-color: var(--accent); }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.danger:hover { border-color: var(--rejected); color: var(--rejected); }
button:disabled { opacity: .5; cursor: default; }
input, select, textarea { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; width: 100%; }
textarea { resize: vertical; min-height: 64px; }
.hidden { display: none !important; }

header.top { display: flex; align-items: center; gap: 16px; padding: 10px 20px; border-bottom: 1px solid var(--line); background: var(--panel); }
header.top .brand { font-weight: 700; font-size: 16px; color: var(--text); }
header.top nav { display: flex; gap: 12px; flex: 1; }
header.top .navbtn { padding: 4px 9px; font-size: 16px; line-height: 1; margin-right: -6px; }
header.top .who { color: var(--muted); }

main.page { padding: 20px; max-width: 1100px; margin: 0 auto; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 20px; }
.center { max-width: 380px; margin: 12vh auto; }
.center h1 { margin-top: 0; }
.field { margin-bottom: 12px; }
.field label { display: block; color: var(--muted); margin-bottom: 4px; font-size: 12px; }
.err { color: var(--rejected); margin: 8px 0; min-height: 1em; }

.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .spacer { flex: 1; }
.chips { display: flex; gap: 6px; }
.chip { border-radius: 999px; padding: 3px 12px; font-size: 12px; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; font-size: 12px; }
tr.row:hover { background: var(--panel); cursor: pointer; }
.muted { color: var(--muted); }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; color: #111; }
.badge.pending { background: var(--pending); }
.badge.under_review { background: var(--under_review); }
.badge.approved { background: var(--approved); }
.badge.rejected { background: var(--rejected); color: #fff; }

/* review screen */
.review { display: grid; grid-template-columns: 1fr var(--sidew, 360px); height: calc(100vh - var(--hh, 49px)); height: calc(100dvh - var(--hh, 49px)); }
.review { grid-template-rows: minmax(0, 1fr); }
.review > * { min-height: 0; }
.review.theater { grid-template-columns: 1fr; }
.review.theater .side { display: none; }
.stage { display: flex; flex-direction: column; min-width: 0; padding: 14px 16px; gap: 10px; }
.stage .titlebar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.stage .titlebar h2 { margin: 0; font-size: 16px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.statusctl { display: flex; gap: 6px; }
.statusctl button.active { color: #111; font-weight: 600; }
.statusctl button.active[data-s=pending] { background: var(--pending); }
.statusctl button.active[data-s=under_review] { background: var(--under_review); }
.statusctl button.active[data-s=approved] { background: var(--approved); }
.statusctl button.active[data-s=rejected] { background: var(--rejected); color: #fff; }
.vwrap { flex: 1 1 0; min-height: 0; background: #000; border-radius: 8px; display: flex; align-items: center; justify-content: center; position: relative; }
.vwrap video { max-width: 100%; max-height: 100%; margin: auto; }
.vwrap.scroll { overflow: auto; }
.vwrap.scroll video { flex: none; }
.side { position: relative; }
.split { position: absolute; left: -3px; top: 0; bottom: 0; width: 7px; cursor: col-resize; z-index: 5; touch-action: none; }
.split:hover, .split:active { background: var(--accent); opacity: .5; }
.review.theater ~ * .split { display: none; }
.vwrap .overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.6); color: #fff; }
.scrub { position: relative; height: 28px; background: var(--panel); border-radius: 6px; cursor: pointer; border: 1px solid var(--line); }
.scrub .fill { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(91,140,255,.25); border-radius: 6px 0 0 6px; pointer-events: none; }
.scrub .head { position: absolute; top: -3px; bottom: -3px; width: 2px; background: #fff; pointer-events: none; }
.scrub .mark { position: absolute; top: 3px; bottom: 3px; width: 6px; margin-left: -3px; border-radius: 3px; background: var(--under_review); }
.scrub .mark.resolved { background: var(--approved); opacity: .6; }
.transport { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.transport .tc { font: 600 18px ui-monospace, SFMono-Regular, Menlo, monospace; min-width: 130px; }
.transport .fr { color: var(--muted); font: 12px ui-monospace, Menlo, monospace; }
.transport select { width: auto; padding: 4px 6px; }
.hint { color: var(--muted); font-size: 12px; }

.side { border-left: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; min-height: 0; }
.side .composer { padding: 12px; border-bottom: 1px solid var(--line); }
.side .composer .at { color: var(--accent); font: 12px ui-monospace, Menlo, monospace; margin-bottom: 6px; display: flex; justify-content: space-between; }
.side .composer .row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.clist { overflow-y: auto; flex: 1; padding: 6px 0; }
.cmt { padding: 10px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.cmt.active { background: var(--panel2); box-shadow: inset 3px 0 0 var(--accent); }
.cmt.resolved .body { opacity: .5; text-decoration: line-through; }
.cmt .meta { display: flex; gap: 8px; align-items: baseline; font-size: 12px; color: var(--muted); }
.cmt .tcb { font: 600 12px ui-monospace, Menlo, monospace; color: var(--accent); }
.cmt .body { margin: 4px 0; white-space: pre-wrap; word-break: break-word; }
.cmt .acts { display: flex; gap: 10px; font-size: 12px; }
.cmt .acts a { color: var(--muted); cursor: pointer; }
.cmt .acts a:hover { color: var(--text); }
.reply { margin: 8px 0 0 14px; padding-left: 10px; border-left: 2px solid var(--line); }
.history { font-size: 12px; color: var(--muted); padding: 8px 14px; border-top: 1px solid var(--line); max-height: 90px; overflow: auto; }

@media (max-width: 900px) { .review { grid-template-columns: 1fr; grid-template-rows: none; height: auto; } .side { border-left: 0; border-top: 1px solid var(--line); } .vwrap { min-height: 220px; max-height: 70vh; } }

/* range comments */
.scrub .sel { position: absolute; top: 0; bottom: 0; background: rgba(91,140,255,.45); border: 1px solid var(--accent); border-radius: 3px; pointer-events: none; }
.scrub .band { position: absolute; top: 3px; bottom: 3px; background: rgba(224,169,59,.28); border-radius: 3px; pointer-events: none; }
.scrub .band.resolved { background: rgba(63,185,122,.18); }
.side .composer .at > span:last-child a { margin-left: 8px; }

/* settings */
.ok { color: var(--approved); margin: 8px 0; min-height: 1em; }
.connstatus { padding: 10px 12px; border-radius: 8px; margin-bottom: 14px; background: var(--panel2); border-left: 4px solid var(--pending); }
.connstatus.ready { border-left-color: var(--approved); }
.connstatus.starting { border-left-color: var(--under_review); }
.connstatus.error { border-left-color: var(--rejected); }
.connstatus .detail { color: var(--muted); font-size: 12px; margin-top: 4px; word-break: break-word; }

/* export dialog */
dialog.dlg { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 20px; max-width: 460px; width: calc(100% - 32px); }
dialog.dlg::backdrop { background: rgba(0,0,0,.6); }

/* comment links */
.cmt.flash { animation: cflash 2.4s ease-out; }
@keyframes cflash { 0%, 35% { background: color-mix(in srgb, var(--accent) 38%, transparent); } 100% { background: transparent; } }
.notice { margin: 8px 12px 0; padding: 8px 10px; border-radius: 6px; background: var(--panel2); border-left: 3px solid var(--under_review); font-size: 12px; }
@media (prefers-reduced-motion: reduce) { .cmt.flash { animation: none; background: var(--panel2); } }

/* thumbnails & grid */
main.page.wide { max-width: 1500px; }
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.vcard { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; cursor: pointer; transition: transform .12s, border-color .12s, box-shadow .12s; outline: none; }
.vcard:hover, .vcard:focus-visible { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.thumb { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .ph { position: absolute; inset: 0; display: none; place-items: center; color: var(--muted); font-size: 28px; background: linear-gradient(135deg, var(--panel2), var(--bg)); }
.thumb.empty .ph { display: grid; }
.thumb.loading .ph { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.thumb .sbadge { position: absolute; top: 8px; left: 8px; }
.thumb .sbadge .badge { box-shadow: 0 1px 6px rgba(0,0,0,.5); }
.thumb .cc { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.72); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.vmeta { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vmeta strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.vmeta .muted { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thumb.mini { width: 72px; border-radius: 6px; }
.thumb.mini .ph { font-size: 14px; }
@media (prefers-reduced-motion: reduce) { .vcard { transition: none; } .thumb.loading .ph { animation: none; } }

/* review-only: no selecting / long-press saving of the picture */
.vwrap video, .thumb img { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }

/* ---- projects & share links ---- */
.phead { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.phead .spacer { flex: 1; }
.pacts { display: flex; gap: 8px; flex-wrap: wrap; }
.thumb .pbtn { position: absolute; top: 8px; right: 8px; padding: 2px 8px; font-size: 12px; background: rgba(0,0,0,.72); border-color: transparent; color: #fff; opacity: 0; transition: opacity .12s; }
.vcard:hover .pbtn, .vcard:focus-within .pbtn, .pbtn:focus-visible { opacity: 1; }
td .pbtn { padding: 1px 8px; font-size: 12px; margin-left: 6px; }
.mosaic { display: grid; grid-template-columns: 1fr 1fr; aspect-ratio: 16 / 9; background: #000; overflow: hidden; position: relative; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mosaic img:only-child { grid-column: 1 / -1; grid-row: 1 / -1; }
.mosaic.empty { background: linear-gradient(135deg, var(--panel2), var(--bg)); place-items: center; }
.mosaic .ph { grid-column: 1 / -1; color: var(--muted); font-size: 34px; align-self: center; justify-self: center; }
dialog.dlg.wide { max-width: 640px; }
.picklist { display: flex; flex-direction: column; gap: 2px; max-height: 240px; overflow: auto; margin: 8px 0; }
.picklist.tall { max-height: 360px; }
.pick { display: flex; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.pick:hover { background: var(--panel2); }
.pick.dim { opacity: .55; cursor: default; }
.sharelist { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 14px; }
.sharerow { border: 1px solid var(--line); border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.sharerow.expired { opacity: .6; }
.sr-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.sr-acts { display: flex; gap: 8px; justify-content: flex-end; }
.newshare { border-top: 1px solid var(--line); padding-top: 14px; }
.gtag { font-size: 10px; text-transform: uppercase; letter-spacing: .04em; border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; color: var(--muted); }

/* multi-select */
.vcard.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
tr.row.sel td { background: rgba(80,140,255,.16); }
.marquee { position: fixed; z-index: 50; pointer-events: none; border: 1px solid var(--accent); background: rgba(80,140,255,.16); }
body.nosel { user-select: none; -webkit-user-select: none; cursor: crosshair; }
.selbar { position: sticky; bottom: 14px; z-index: 40; display: flex; align-items: center; gap: 8px; margin-top: 16px; padding: 10px 14px; background: var(--panel); border: 1px solid var(--accent); border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,.45); }
.selbar.hidden { display: none; }

/* project access */
.access { margin-top: 6px; font-size: 13px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; text-decoration: underline; }
h4.sect { margin: 14px 0 4px; }
.people { display: flex; flex-direction: column; gap: 6px; }
.person { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }
.person .pname { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; }
.person .tag { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

/* left navigation */
.frame { display: flex; align-items: flex-start; }
.frame > .content { flex: 1; min-width: 0; }
aside.nav { position: sticky; top: 0; flex: none; width: 232px; height: calc(100vh - var(--hh, 49px)); height: calc(100dvh - var(--hh, 49px)); overflow-y: auto; padding: 12px 8px; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.frame.navoff > aside.nav { display: none; }
.navitem { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 7px; color: var(--text); text-decoration: none; min-width: 0; }
.navitem:hover { background: var(--hover); }
.navitem.on { background: var(--on); color: var(--on-text); }
.navitem .ic { width: 16px; text-align: center; color: var(--muted); }
.navitem.grow { flex: 1; }
.navhead { display: flex; align-items: center; }
.navtoggle { background: none; border: 0; padding: 6px 8px; color: var(--muted); cursor: pointer; border-radius: 6px; }
.navtoggle:hover { background: var(--hover); color: var(--text); }
.navlist { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 0 14px; padding-left: 8px; border-left: 1px solid var(--line); }
.navitem.sub { padding: 5px 8px; font-size: 13px; }
.navitem .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.navitem .ct { color: var(--muted); font-size: 11px; }
@media (max-width: 899px) {
  aside.nav { position: fixed; left: 0; top: var(--hh, 49px); height: auto; bottom: 0; z-index: 60; box-shadow: 8px 0 30px rgba(0,0,0,.5); }
}
.navsep { height: 1px; background: var(--line); margin: 8px 6px; }

/* light theme touch-ups */
:root[data-theme=light] .vcard:hover, :root[data-theme=light] .vcard:focus-visible { box-shadow: 0 8px 24px rgba(20,30,60,.15); }
.themeopts { display: flex; gap: 8px; }
.threadbar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.threadbar select { flex: 1; min-width: 0; }


/* sidebar folder tree */
.navtree { display: flex; flex-direction: column; gap: 1px; margin-bottom: 6px; }
.navrow { display: flex; align-items: center; border-radius: 7px; }
.navrow:hover { background: var(--hover); }
.navrow.on { background: var(--on); }
.navrow .navitem:hover, .navrow .navitem.on { background: none; }
.navrow .navitem { padding: 5px 8px 5px 2px; }
.navrow .navitem.root { font-weight: 600; }
.navrow .navitem.sub { font-size: 13px; }
.fcaret { width: 18px; flex: none; background: none; border: 0; padding: 2px 0; color: var(--muted); cursor: pointer; }
.fcaret.none { cursor: default; }
.navitem .nm.two { display: flex; flex-direction: column; line-height: 1.2; }
.navitem .nm.two small { font-weight: 400; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.navrow .navitem.root { padding: 7px 10px; }
.fcaret { text-align: center; pointer-events: none; }
.navitem .ic.ll { display: inline-block; height: 13px; background: currentColor; color: var(--text); -webkit-mask: url(/lucidlink-icon.png) center / contain no-repeat; mask: url(/lucidlink-icon.png) center / contain no-repeat; }

/* link stats */
.sr-stats { font-size: 12px; color: var(--muted); margin: 6px 0 2px; }
.statrow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 6px 0 4px; }
.stat { background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; }
.stat strong { font-size: 20px; }
.viewer { border-top: 1px solid var(--line); padding: 10px 0; }
.vtop { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vtable { width: 100%; margin: 8px 0 0 0; font-size: 13px; }
.vtable th, .vtable td { padding: 4px 8px; }
@media (max-width: 600px) { .statrow { grid-template-columns: repeat(2, 1fr); } }

/* notification bell */
.bell { position: relative; }
.bellbtn { position: relative; padding: 4px 9px; font-size: 15px; line-height: 1.2; }
.bellbadge { position: absolute; top: -6px; right: -6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--rejected); color: #fff; font-size: 11px; font-weight: 700; line-height: 17px; text-align: center; }
.bellmenu { position: absolute; right: 0; top: calc(100% + 8px); width: 320px; max-height: 70vh; overflow: auto; z-index: 70; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.4); }
.bellhead { padding: 10px 12px; font-weight: 600; border-bottom: 1px solid var(--line); }
.bellitem { display: flex; flex-direction: column; gap: 2px; padding: 9px 12px; color: var(--text); border-bottom: 1px solid var(--line); }
.bellitem:last-child { border-bottom: 0; }
.bellitem:hover { background: var(--hover); }
.bellitem.new { background: var(--on); }
.bellitem .muted { font-size: 12px; }
@media (max-width: 500px) { .bellmenu { position: fixed; left: 8px; right: 8px; top: var(--hh, 49px); width: auto; } }

/* ---------- mobile (html.mobile: phones, and touch tablets) ---------- */
html.mobile .desk-only, html.mobile .hint, html.mobile .split { display: none !important; }
html.mobile input, html.mobile select, html.mobile textarea { font-size: 16px; } /* iOS zooms the page on smaller inputs */
html.mobile button { min-height: 40px; }
html.mobile .chip { min-height: 34px; padding: 4px 14px; font-size: 13px; }

/* header: one compact row */
html.mobile header.top { padding: 8px 12px; gap: 10px; flex-wrap: nowrap; }
html.mobile header.top .brand { white-space: nowrap; font-size: 15px; }
html.mobile header.top nav { min-width: 0; overflow: hidden; }
html.mobile header.top nav a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
html.mobile header.top .who, html.mobile header.top a[href^="/about"] { display: none; }
html.mobile header.top button { white-space: nowrap; }
html.mobile .navbtn { margin-right: 0; }

/* library + join page */
html.mobile main.page { padding: 14px 12px 28px; }
html.mobile .center { margin: 5vh 12px; max-width: none; }
html.mobile .toolbar input { max-width: none !important; flex: 1 1 100%; }
html.mobile .toolbar .chips { overflow-x: auto; max-width: 100%; padding-bottom: 2px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
html.mobile .toolbar .chips::-webkit-scrollbar { display: none; }
html.mobile .chip { flex: none; white-space: nowrap; }
html.mobile .vgrid { grid-template-columns: 1fr; gap: 14px; }
html.mobile .phead { flex-wrap: wrap; }

/* review: video + controls stay on screen, the comments scroll under them */
html.mobile .review { display: flex; flex-direction: column; height: calc(100vh - var(--hh, 49px)); height: calc(100dvh - var(--hh, 49px)); }
html.mobile .stage { flex: none; padding: 8px 12px; gap: 8px; }
html.mobile .stage .titlebar { flex-wrap: nowrap; gap: 8px; }
html.mobile .stage .titlebar > a { font-size: 20px; padding: 4px 6px; }
html.mobile .stage .titlebar button { min-height: 34px; padding: 4px 8px; font-size: 12px; }
html.mobile .vwrap { flex: none; height: 32vh; height: 32dvh; max-height: none; min-height: 0; }
html.mobile .statusctl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
html.mobile .statusctl button { padding: 6px 2px; font-size: 12px; min-height: 36px; }
html.mobile .scrub { height: 40px; touch-action: none; }
html.mobile .transport { gap: 6px; }
html.mobile .transport button { min-width: 42px; padding: 4px 8px; }
html.mobile .transport .tc { font-size: 16px; min-width: 0; }
html.mobile .side { flex: 1 1 0; min-height: 0; border-left: 0; border-top: 1px solid var(--line); }
html.mobile .threadbar { padding: 6px 12px; }
html.mobile .side .composer { padding: 8px 12px; }
html.mobile .side .composer textarea { min-height: 48px; }
html.mobile .side .composer .row button { min-height: 38px; }

/* phone held sideways: video left, comments right, like the desktop layout */
@media (orientation: landscape) and (max-height: 520px) {
  html.mobile .review { display: grid; grid-template-columns: 1fr minmax(250px, 36%); grid-template-rows: minmax(0, 1fr); }
  html.mobile .stage { overflow-y: auto; min-height: 0; }
  html.mobile .vwrap { height: 56vh; height: 56dvh; }
  html.mobile .side { border-left: 1px solid var(--line); border-top: 0; }
}

/* download-link watermark options */
.wmpanel { border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; }
.wmpanel[hidden], .wmopts[hidden] { display: none; }
.wmline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wmopts { display: grid; grid-template-columns: 64px 1fr; gap: 6px 10px; align-items: center; margin-left: 24px; }
.pospick { display: grid; grid-template-columns: repeat(3, 22px); gap: 3px; }
.pospick button { width: 22px; height: 16px; padding: 0; border: 1px solid var(--line); border-radius: 3px; background: transparent; cursor: pointer; }
.pospick button.on { background: var(--accent, #2f6fed); border-color: transparent; }
.sliderrow { display: flex; gap: 8px; align-items: center; } .sliderrow input { flex: 1; padding: 0; }
.wmstage { position: relative; aspect-ratio: 16 / 9; width: min(100%, 360px); background: linear-gradient(135deg, #3a4a5e, #1c232e); border-radius: 6px; overflow: hidden; }
.wmitem { position: absolute; max-width: 94%; }
.wmtext { padding: .25em .5em; border-radius: 3px; white-space: nowrap; line-height: 1.2; }
