/* Mithila Video — viewer, shorts and studio styles (loaded on video.* pages only). */
.m-eyebrow { font-size: .8rem; font-weight: 650; color: var(--pink-ink); margin: 0 0 6px; }
.verified { color: #2B7FFF; }
.strong { font-weight: 650; color: var(--ink); text-decoration: none; }
.chips-sep { width: 1px; background: var(--line); margin: 0 4px; flex: none; }
.v-chips { position: sticky; top: calc(var(--header-h) + env(safe-area-inset-top)); z-index: 20; background: var(--bg); padding: 10px 0; margin: -8px 0 12px; }
@media (max-width: 760px) { .v-chips { top: calc(var(--header-h) + env(safe-area-inset-top)); } }

/* ---------- Cards & grids ---------- */
.v-grid { display: grid; gap: 28px 18px; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); }
@media (max-width: 640px) { .v-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; margin: 0 calc(var(--gutter) * -1); } .v-grid .v-thumb { border-radius: 0; } .v-grid .v-info { padding: 0 var(--gutter); } }
.v-card { min-width: 0; }
.v-thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--r-md); overflow: hidden; background: #160C12; }
.v-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s var(--ease); }
.v-card:hover .v-thumb img { transform: scale(1.02); }
.v-dur { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.8); color: #fff; font-size: .75rem; font-weight: 650; padding: 1px 6px; border-radius: 4px; font-variant-numeric: tabular-nums; }
.v-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.35); }
.v-progress span { display: block; height: 100%; background: var(--pink); }
.v-info { display: flex; gap: 12px; margin-top: 10px; }
.v-avatar img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: none; }
.v-title { font-size: 1rem; line-height: 1.35; margin: 0 0 4px; font-weight: 650; }
.v-title a { color: var(--ink); text-decoration: none; }
.v-title a:hover { text-decoration: underline; }
.v-channel { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-3); font-size: .875rem; text-decoration: none; }
.v-channel:hover { color: var(--ink); }
.v-meta { color: var(--ink-3); font-size: .85rem; }
.v-card-row { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 10px; align-items: start; margin-bottom: 10px; }
.v-card-row .v-thumb { border-radius: var(--r-sm); }
.v-card-row .v-info { margin-top: 0; }
.v-card-row .v-title { font-size: .92rem; }
.v-list .v-card-row { grid-template-columns: minmax(200px, 360px) minmax(0, 1fr); gap: 16px; margin-bottom: 18px; }
.v-list .v-card-row .v-title { font-size: 1.1rem; }
@media (max-width: 640px) { .v-list .v-card-row { grid-template-columns: 150px minmax(0, 1fr); gap: 10px; } .v-list .v-card-row .v-title { font-size: .95rem; } .v-desc { display: none; } }
.v-scroller { --col: 280px; }
@media (max-width: 640px) { .v-scroller { --col: 72vw; } }

/* Shorts shelf */
.s-scroller { --col: 180px; }
.s-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.s-card { display: grid; gap: 6px; text-decoration: none; color: var(--ink); }
.s-thumb { display: block; aspect-ratio: 9 / 16; border-radius: var(--r-md); overflow: hidden; background: #160C12; }
.s-thumb img { width: 100%; height: 100%; object-fit: cover; }
.s-title { font-weight: 650; font-size: .92rem; line-height: 1.3; }
.s-meta { color: var(--ink-3); font-size: .8rem; }
@media (max-width: 640px) { .s-scroller { --col: 40vw; } .s-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Featured hero */
.v-hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 28px; align-items: center; padding: 20px; margin-bottom: 12px;
  border-radius: var(--r-lg); background: radial-gradient(140% 120% at 100% 0%, var(--pink-pale), var(--bg-soft)); border: 1px solid var(--line); }
.v-hero-media { display: block; border-radius: var(--r-md); overflow: hidden; aspect-ratio: 16 / 9; background: #000; }
.v-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.v-hero h1 a { color: var(--ink); text-decoration: none; }
@media (max-width: 900px) { .v-hero { grid-template-columns: minmax(0, 1fr); padding: 14px; gap: 14px; } }

/* ---------- Watch page ---------- */
.watch { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
.watch.is-theater { grid-template-columns: minmax(0, 1fr); }
.watch.is-theater .vp-wrap { margin: 0 calc(var(--gutter) * -1); }
.watch.is-theater .vp { border-radius: 0; max-height: 78vh; }
.watch.is-theater .watch-side { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 0 18px; }
.watch.is-theater .watch-side h2 { grid-column: 1 / -1; }
@media (max-width: 1100px) { .watch { grid-template-columns: minmax(0, 1fr) 320px; } }
@media (max-width: 900px) { .watch { grid-template-columns: minmax(0, 1fr); } }
.vp-wrap { position: relative; }
.vp { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: var(--r-md); max-height: 72vh; }
.vp-missing { display: grid; place-items: center; color: #fff; }
@media (max-width: 640px) { .vp-wrap { margin: -16px calc(var(--gutter) * -1) 0; } .vp { border-radius: 0; } }
.vp-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 4px; }
.vp-tool { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.vp-tool .select { width: auto; min-height: 36px; padding-top: 4px; padding-bottom: 4px; }
[data-captions][aria-pressed="true"], [data-theater][aria-pressed="true"] { background: var(--pink-pale); color: var(--pink-ink); }
.watch-title { font-size: clamp(1.2rem, 1rem + .8vw, 1.5rem); margin: 10px 0 12px; }
.watch-bar { display: flex; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; align-items: center; }
.watch-channel { display: flex; align-items: center; gap: 12px; min-width: 0; }
.avatar-md { width: 44px; height: 44px; }
.avatar-md img, img.avatar-md { border-radius: 50%; object-fit: cover; }
.watch-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.watch-actions form { margin: 0; }
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: var(--r-pill); border: 0; background: var(--bg-soft);
  color: var(--ink); font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; text-decoration: none; white-space: nowrap; }
.pill:hover { background: var(--line); text-decoration: none; }
.pill.is-on, .is-on > .pill { color: var(--pink-ink); }
.pill.is-on .i-sm, .is-on > .pill .i-sm { fill: currentColor; }
.pill-group { display: inline-flex; border-radius: var(--r-pill); background: var(--bg-soft); }
.pill-group .pill { background: transparent; }
.pill-group form + form .pill { border-left: 1px solid var(--line-strong); border-radius: 0 var(--r-pill) var(--r-pill) 0; }
.pill-group form:first-child .pill { border-radius: var(--r-pill) 0 0 var(--r-pill); }
.sub-form .when-on, .sub-form.is-on .when-off { display: none; }
.sub-form.is-on .when-on { display: inline-flex; align-items: center; gap: 6px; }
.sub-form.is-on .sub-btn { --b-bg: var(--bg-soft); --b-fg: var(--ink); --b-line: var(--line); }
.watch-desc { margin: 16px 0; padding: 12px 14px; border-radius: var(--r-md); background: var(--bg-soft); }
.watch-desc summary { cursor: pointer; list-style: none; }
.watch-desc summary::-webkit-details-marker { display: none; }
.watch-desc summary .clamp-2 { display: -webkit-box; margin-top: 4px; }
.watch-desc[open] summary .clamp-2 { display: none; }
.watch-desc-full { white-space: pre-line; margin-top: 8px; }
.watch-side h2 { margin-top: 0; }
.kbd-list { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; }
.kbd-list dt { margin: 0; } .kbd-list dd { margin: 0; color: var(--ink-2); }
kbd { display: inline-block; min-width: 26px; text-align: center; padding: 2px 6px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 6px; font: 600 .85rem/1.4 var(--font); background: var(--bg-soft); }
.save-row { background: none; border: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; border-bottom: 1px solid var(--line); }

/* Comments */
.comments { margin-top: 20px; }
.comment-form { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 20px; }
.comment-form .form-actions { justify-content: flex-end; }
.comment { display: flex; gap: 12px; margin-bottom: 18px; }
.comment-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .92rem; }
.comment-body { margin: 2px 0 4px; white-space: pre-line; overflow-wrap: anywhere; }
.comment-actions { display: flex; gap: 4px; align-items: flex-start; flex-wrap: wrap; }
.comment-actions form { margin: 0; }
.comment-actions .reply summary { list-style: none; }
.comment-actions .reply summary::-webkit-details-marker { display: none; }
.comment-actions .reply[open] { flex-basis: 100%; }
.replies { margin-top: 10px; }
.replies .avatar { width: 28px; height: 28px; font-size: .7rem; }

/* ---------- Channel ---------- */
.channel-banner { aspect-ratio: 6 / 1; min-height: 100px; border-radius: var(--r-lg); background: linear-gradient(120deg, #E0177A, #3B1230) center / cover; margin-bottom: 18px; }
.channel-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.channel-head h1 { margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.channel-avatar { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; flex: none; }
.channel-avatar.sm { width: 88px; height: 88px; }
@media (max-width: 640px) { .channel-banner { aspect-ratio: 3 / 1; border-radius: var(--r-md); } .channel-avatar { width: 72px; height: 72px; } .channel-head { gap: 12px; } }
.channel-result { display: flex; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.sub-scroller { --col: 88px; }
.sub-chan { display: grid; justify-items: center; gap: 6px; text-decoration: none; color: var(--ink); font-size: .8rem; font-weight: 600; text-align: center; max-width: 88px; }
.sub-chan img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.pl-card { display: grid; gap: 6px; text-decoration: none; color: var(--ink); }
.pl-card .i-lg { color: var(--pink-ink); }

/* ---------- Shorts feed ---------- */
body.shorts-page { background: #0E0709; }
body.shorts-page .site-header { background: rgba(14, 7, 9, .9); border-color: transparent; color: #fff; }
body.shorts-page .site-header .icon-btn, body.shorts-page .site-header .brand-name, body.shorts-page .site-header .btn-ghost { color: #fff; }
body.shorts-page .subnav { background: #0E0709; border-color: transparent; }
body.shorts-page .subnav a { color: rgba(255,255,255,.7); }
body.shorts-page .subnav a.is-active { color: #fff; }
.shorts-main { padding: 0; }
.shorts-feed {
  height: calc(100dvh - var(--header-h) - 45px); overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior-y: contain; scrollbar-width: none;
}
.shorts-feed::-webkit-scrollbar { display: none; }
@media (max-width: 760px) {
  .shorts-feed { height: calc(100dvh - var(--header-h) - var(--bottom-h) - env(safe-area-inset-bottom) - env(safe-area-inset-top)); }
  body.shorts-page { padding-bottom: calc(var(--bottom-h) + env(safe-area-inset-bottom)); }
  body.shorts-page .bottom-nav { background: #0E0709; border-color: rgba(255,255,255,.08); }
  body.shorts-page .bottom-nav a { color: rgba(255,255,255,.6); } body.shorts-page .bottom-nav a.is-active { color: #fff; }
}
.short { height: 100%; scroll-snap-align: start; scroll-snap-stop: always; display: grid; place-items: center; padding: 10px 0; }
.short-stage { position: relative; height: 100%; aspect-ratio: 9 / 16; max-width: 100vw; border-radius: var(--r-md); overflow: hidden; background: #000; }
.short-video { width: 100%; height: 100%; object-fit: cover; background: #000; }
.short-tap { position: absolute; inset: 0; background: transparent; border: 0; cursor: pointer; }
.short-unmute { position: absolute; top: 12px; left: 12px; display: inline-flex; gap: 6px; align-items: center; min-height: 36px; padding: 0 12px; border-radius: var(--r-pill);
  border: 0; background: rgba(0,0,0,.6); color: #fff; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.shorts-feed.is-unmuted .short-unmute { display: none; }
.short-info { position: absolute; left: 0; right: 72px; bottom: 0; padding: 60px 14px 16px; color: #fff; background: linear-gradient(180deg, transparent, rgba(0,0,0,.7)); pointer-events: none; }
.short-info a, .short-info button, .short-info form { pointer-events: auto; }
.short-channel { display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 650; }
.short-channel img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.short-sub { --b-bg: #fff; --b-fg: #160C12; --b-line: #fff; }
.sub-form.is-on .short-sub { --b-bg: rgba(255,255,255,.2); --b-fg: #fff; --b-line: transparent; }
.short-title { color: #fff; font-size: 1rem; font-weight: 600; margin: 8px 0 0; }
.short-actions { position: absolute; right: 8px; bottom: 16px; display: grid; gap: 14px; justify-items: center; }
.short-actions form { margin: 0; }
.short-act { display: grid; justify-items: center; gap: 2px; width: 52px; min-height: 52px; border: 0; background: none; color: #fff; text-decoration: none; font: inherit; font-size: .75rem; font-weight: 600; cursor: pointer; }
.short-act .i { width: 26px; height: 26px; padding: 10px; box-sizing: content-box; border-radius: 50%; background: rgba(255,255,255,.14); }
.short-act.is-on { color: var(--pink); }
.short-act.is-on .i { fill: currentColor; }
.short-act .ic-vol, .shorts-feed.is-unmuted .short-act .ic-muted { display: none; }
.shorts-feed.is-unmuted .short-act .ic-vol { display: block; }
@media (max-width: 760px) {
  .short { padding: 0; }
  .short-stage { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; }
}
@media (min-width: 761px) { .short-actions { right: -72px; } .short-stage { overflow: visible; } .short-video { border-radius: var(--r-md); } .short-info { right: 0; border-radius: 0 0 var(--r-md) var(--r-md); }
  .short-act { color: #fff; } }

/* ---------- Studio ---------- */
.dropzone { display: grid; gap: 8px; justify-items: start; padding: 22px; border: 2px dashed var(--line-strong); border-radius: var(--r-md); background: var(--bg-soft); }
.dropzone.is-over { border-color: var(--pink); background: var(--pink-pale); }
.dropzone .i-lg { color: var(--pink-ink); }
.upload-preview { width: 100%; max-width: 360px; max-height: 240px; border-radius: var(--r-md); background: #000; margin-top: 12px; }
.upload-progress { margin: 16px 0 4px; display: grid; gap: 6px; }
.studio-preview { width: 100%; aspect-ratio: 16 / 9; border-radius: var(--r-sm); background: #000; object-fit: cover; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0; }
.kv dt { color: var(--ink-3); } .kv dd { margin: 0; overflow-wrap: anywhere; }

/* Elements toggled with the hidden attribute must stay hidden even when a class sets display. */
[hidden] { display: none !important; }

/* Studio (layouts.dashboard): the mobile scrim must not take a grid cell on desktop. */
@media (min-width: 1001px) { .dash-scrim { display: none; } }
