/* 613Tube (2026 rebuild). Laid out like YouTube on purpose, so swapping one for the other feels familiar. */
:root {
  --bg: #fff; --fg: #0f0f0f; --muted: #606060; --line: #e5e5e5; --soft: #f2f2f2; --soft2: #e5e5e5;
  --hover: rgba(0,0,0,.06); --skel: #e9e9e9; --card: #fff; --shadow: 0 4px 32px rgba(0,0,0,.14);
  --red: #e53935; --blue: #1e88e5; --green: #43a047; --accent: #065fd4;
  --top: 56px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0f0f; --fg: #f1f1f1; --muted: #aaa; --line: #303030; --soft: #272727; --soft2: #3f3f3f;
    --hover: rgba(255,255,255,.1); --skel: #222; --card: #212121; --shadow: 0 4px 32px rgba(0,0,0,.6); --accent: #3ea6ff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f0f0f; --fg: #f1f1f1; --muted: #aaa; --line: #303030; --soft: #272727; --soft2: #3f3f3f;
  --hover: rgba(255,255,255,.1); --skel: #222; --card: #212121; --shadow: 0 4px 32px rgba(0,0,0,.6); --accent: #3ea6ff;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 14px/1.45 Roboto, "Segoe UI", system-ui, -apple-system, Arial, sans-serif; min-height: 100vh; display: flex; flex-direction: column; overflow-y: scroll; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
svg { display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; }
.icon-btn:hover { background: var(--hover); }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.linklike { color: inherit; text-decoration: none; }
.linklike:hover, #foot a:hover { text-decoration: underline; }

/* ---------- top bar ---------- */
#top { position: sticky; top: 0; z-index: 40; height: var(--top); display: flex; align-items: center; gap: 12px; padding: 0 16px; background: var(--bg); }
.logo { display: flex; align-items: center; gap: 6px; flex: none; padding: 6px 4px; }
.logo-mark { width: 34px; height: 24px; }
.logo-word { font-size: 21px; font-weight: 700; letter-spacing: -.6px; color: var(--blue); }
.logo-word b { color: var(--red); font-weight: 800; }
#sf { flex: 1; display: flex; max-width: 640px; margin: 0 auto; min-width: 0; }
.sbox { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; border: 1px solid var(--soft2); border-right: 0; border-radius: 40px 0 0 40px; padding-left: 16px; background: var(--bg); }
.sbox:focus-within { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
#q { flex: 1; min-width: 0; height: 38px; border: 0; outline: 0; background: transparent; font-size: 16px; }
#q::-webkit-search-cancel-button { display: none; }
#q-clear { width: 34px; height: 34px; margin-right: 2px; }
.sbtn { width: 64px; height: 40px; flex: none; border: 1px solid var(--soft2); border-radius: 0 40px 40px 0; background: var(--soft); display: grid; place-items: center; }
.sbtn:hover { background: var(--soft2); }
.sbtn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.top-actions { display: flex; gap: 4px; flex: none; }
.q-drop { position: absolute; left: 0; right: -64px; top: calc(100% + 4px); background: var(--card); border-radius: 12px; box-shadow: var(--shadow); padding: 8px 0; z-index: 60; border: 1px solid var(--line); }
.q-drop a { display: flex; align-items: center; gap: 12px; padding: 7px 16px; font-size: 15px; }
.q-drop a:hover, .q-drop a.on { background: var(--hover); }
.q-drop svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; flex: none; }
.q-drop .q-head { display: flex; justify-content: space-between; padding: 2px 16px 6px; font-size: 12px; color: var(--muted); }

#app { flex: 1; width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 24px 40px; }
.view { display: block; }

/* ---------- home ---------- */
.hero { text-align: center; padding: 9vh 0 28px; }
.hero h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.12; letter-spacing: -1px; font-weight: 800; }
.hero h1 b { color: var(--red); }
.hero h1 i { color: var(--blue); font-style: normal; }
.hero p { color: var(--muted); font-size: 17px; margin: 14px auto 0; max-width: 560px; }
.hero-search { display: flex; max-width: 620px; margin: 28px auto 0; }
.hero-search input { flex: 1; min-width: 0; height: 52px; border: 1px solid var(--soft2); border-right: 0; border-radius: 52px 0 0 52px; padding: 0 22px; font-size: 17px; background: var(--bg); outline: 0; }
.hero-search input:focus { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.hero-search button { height: 52px; padding: 0 26px; border-radius: 0 52px 52px 0; background: var(--red); color: #fff; font-weight: 600; font-size: 16px; }
.hero-search button:hover { filter: brightness(1.08); }
.swap { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 26px; padding: 10px 18px; border-radius: 14px; background: var(--soft); font-size: 15px; }
.swap code { font: 600 15px/1 ui-monospace, Consolas, monospace; }
.swap s { color: var(--muted); text-decoration-thickness: 2px; }
.swap u { text-decoration: none; color: var(--red); font-weight: 800; }
.perks { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin: 34px auto 8px; max-width: 980px; }
.perk { background: var(--soft); border-radius: 16px; padding: 18px; text-align: left; }
.perk h3 { font-size: 16px; margin-bottom: 4px; }
.perk p { color: var(--muted); font-size: 14px; }
.perk .dot { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 12px; color: #fff; }
.perk .dot svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 34px 0 14px; }
.sec-head h2 { font-size: 20px; font-weight: 700; }
.sec-head button, .sec-head a { color: var(--accent); font-weight: 500; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px 16px; }
.empty { color: var(--muted); padding: 30px 0; text-align: center; font-size: 15px; }
.empty b { color: var(--fg); display: block; font-size: 18px; margin-bottom: 6px; }

/* ---------- video cards ---------- */
.card { position: relative; display: flex; gap: 16px; border-radius: 12px; }
.thumb { position: relative; flex: none; width: min(360px, 42%); aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: var(--skel); display: block; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.badge { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.8); color: #fff; font-size: 12px; font-weight: 500; padding: 1px 5px; border-radius: 4px; }
.badge.live { background: var(--red); }
.prog { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--red); }
.c-body { min-width: 0; flex: 1; padding-right: 36px; }
.c-title-link { display: block; }
.card h3 { font-size: 18px; line-height: 26px; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.c-meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.c-ch { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; margin: 10px 0; }
.c-ch img, .av { width: 24px; height: 24px; border-radius: 50%; background: var(--skel); flex: none; object-fit: cover; }
.c-desc { color: var(--muted); font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.c-more { position: absolute; top: -4px; right: -6px; width: 36px; height: 36px; opacity: .001; }
.card:hover .c-more, .c-more:focus-visible, .c-more[aria-expanded="true"] { opacity: 1; }
@media (hover: none) { .c-more { opacity: 1; } }
.card.now h3 { color: var(--accent); }
.card.gone { opacity: 0; transform: scale(.97); transition: .35s; }

.list { display: flex; flex-direction: column; gap: 16px; max-width: 1096px; margin: 0 auto; }
#v-results { padding-top: 6px; }

.card.tile { flex-direction: column; gap: 10px; }
.card.tile .thumb { width: 100%; }
.card.tile h3 { font-size: 15px; line-height: 21px; }
.card.tile .c-ch { margin: 4px 0 0; }
.card.tile .c-ch img, .card.tile .c-desc { display: none; }

.card.compact { gap: 8px; }
.card.compact .thumb { width: 168px; border-radius: 8px; }
.card.compact h3 { font-size: 14px; line-height: 20px; }
.card.compact .c-ch { margin: 4px 0 0; }
.card.compact .c-ch img, .card.compact .c-desc { display: none; }
.card.compact .c-body { padding-right: 26px; }
.card.compact .c-more { right: -10px; }

.skel .thumb, .skel .sk { background: linear-gradient(100deg, var(--skel) 40%, var(--soft) 50%, var(--skel) 60%) 0 0/300% 100%; animation: shimmer 1.4s infinite linear; }
.skel .sk { height: 14px; border-radius: 6px; margin: 6px 0 12px; }
@keyframes shimmer { to { background-position: -150% 0; } }

/* ---------- results chips ---------- */
.chips { display: flex; gap: 10px; overflow-x: auto; padding: 8px 0 14px; max-width: 1096px; margin: 0 auto; scrollbar-width: none; align-items: center; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 32px; padding: 0 12px; border-radius: 8px; background: var(--soft); font-weight: 500; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; border: 0; }
.chip:hover { background: var(--soft2); }
.chip.on { background: var(--fg); color: var(--bg); }
.chip-sep { width: 1px; height: 20px; background: var(--line); flex: none; }
.notice { max-width: 620px; margin: 40px auto; text-align: center; background: var(--soft); border-radius: 16px; padding: 28px 22px; }
.notice h2 { font-size: 20px; margin-bottom: 8px; }
.notice p { color: var(--muted); font-size: 15px; }
.notice .btn { margin-top: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 16px; border-radius: 18px; background: var(--soft); font-weight: 500; white-space: nowrap; }
.btn:hover { background: var(--soft2); }
.btn.primary { background: var(--fg); color: var(--bg); }
.btn.primary:hover { opacity: .88; }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn.on svg { fill: currentColor; }
.more { text-align: center; padding: 24px 0; color: var(--muted); min-height: 60px; }

/* ---------- watch page ---------- */
body.r-watch #app { display: grid; grid-template-columns: minmax(0, 1fr) 402px; grid-template-rows: auto 1fr; column-gap: 24px; max-width: 1754px; padding-top: 8px; align-items: start; }
body.r-watch #main, body.r-watch #v-watch { display: contents; }
body.r-watch .dock:not(.mini) { grid-column: 1; grid-row: 1; }
.w-info { grid-column: 1; grid-row: 2; min-width: 0; padding-top: 12px; }
.w-side { grid-column: 2; grid-row: 1 / span 2; min-width: 0; }
.w-info h1 { font-size: 20px; line-height: 28px; font-weight: 700; overflow-wrap: anywhere; }
.w-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.w-ch { display: flex; align-items: center; gap: 12px; min-width: 0; margin-right: auto; }
.w-ch .av { width: 40px; height: 40px; }
.w-ch b { display: block; font-size: 16px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-ch span { color: var(--muted); font-size: 12px; }
.w-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.w-desc { margin-top: 14px; background: var(--soft); border-radius: 12px; padding: 12px; font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.w-desc .w-stats { font-weight: 500; margin-bottom: 4px; }
.w-desc .w-text { white-space: pre-wrap; }
.w-desc.clamp { cursor: pointer; }
.w-desc.clamp .w-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.w-desc.clamp:hover { background: var(--soft2); }
.w-desc a { color: var(--accent); }
.w-desc .w-toggle { font-weight: 500; margin-top: 6px; display: inline-block; }
.w-calm { margin-top: 18px; color: var(--muted); font-size: 13px; }
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.side-head h2 { font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-head label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; cursor: pointer; flex: none; }
.switch { appearance: none; width: 36px; height: 20px; border-radius: 20px; background: var(--soft2); position: relative; cursor: pointer; transition: .15s; margin: 0; }
.switch::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .15s; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.switch:checked { background: var(--accent); }
.switch:checked::after { left: 18px; }
.side-list { display: flex; flex-direction: column; gap: 8px; }
.side-empty { background: var(--soft); border-radius: 12px; padding: 18px; color: var(--muted); }
.side-empty b { color: var(--fg); display: block; font-size: 15px; margin-bottom: 4px; }

/* ---------- player ---------- */
.dock { position: relative; z-index: 30; }
.stage { position: relative; width: 100%; aspect-ratio: 16/9; max-height: calc(100vh - var(--top) - 150px); min-height: 200px; background: #000; overflow: hidden; border-radius: 12px; color: #fff; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.vid { position: absolute; overflow: visible; }
.frame { position: absolute; left: 0; width: 100%; }
.frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; z-index: 1; opacity: 0; transition: opacity .25s; pointer-events: none; }
.dock.show-poster .poster { opacity: 1; }
.shield { position: absolute; inset: 0; z-index: 2; cursor: pointer; }
.dock.hide-cursor .shield { cursor: none; }
.dock.native .shield, .dock.native .poster, .dock.native .bigplay, .dock.native .chrome { display: none; }
.dock.basic .frame { top: 0 !important; height: 100% !important; }
.dock.basic .shield, .dock.basic .poster, .dock.basic .bigplay, .dock.basic .c-bottom, .dock.basic .spinner, .dock.basic .bump, .dock.basic .endscreen { display: none !important; }
.spinner { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px; border: 4px solid rgba(255,255,255,.25); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; z-index: 3; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.bigplay { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px; border-radius: 50%; background: rgba(0,0,0,.6); display: grid; place-items: center; z-index: 4; color: #fff; transition: transform .15s, background .15s; }
.bigplay:hover { background: var(--red); transform: scale(1.06); }
.bigplay svg { width: 40px; height: 40px; fill: currentColor; }
.bump { position: absolute; left: 50%; top: 50%; min-width: 64px; height: 64px; padding: 0 18px; transform: translate(-50%, -50%); border-radius: 32px; background: rgba(0,0,0,.6); display: grid; place-items: center; z-index: 3; pointer-events: none; opacity: 0; font-size: 16px; font-weight: 500; }
.bump svg { width: 34px; height: 34px; fill: currentColor; }
.bump.go { animation: bump .55s ease-out; }
.bump.left { left: 22%; } .bump.right { left: 78%; }
@keyframes bump { 0% { opacity: .95; transform: translate(-50%, -50%) scale(.8); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.25); } }

.chrome { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; opacity: 0; transition: opacity .18s; }
.dock.show-ui .chrome { opacity: 1; }
.dock.show-ui .c-top > *, .dock.show-ui .c-bottom { pointer-events: auto; }
.c-top { display: flex; align-items: center; gap: 4px; padding: 6px 8px 28px; background: linear-gradient(rgba(0,0,0,.6), transparent); min-height: 60px; }
.c-title { flex: 1; min-width: 0; font-size: 16px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 8px; text-shadow: 0 1px 2px rgba(0,0,0,.6); opacity: 0; }
.dock:fullscreen .c-title, .dock.pfs .c-title, .dock.mini .c-title { opacity: 1; }
.c-bottom { padding: 26px 12px 4px; background: linear-gradient(transparent, rgba(0,0,0,.75)); }
.c-row { display: flex; align-items: center; gap: 2px; height: 46px; }
.c-space { flex: 1; }
.c-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff; font-weight: 600; font-size: 14px; }
.c-btn:hover { background: rgba(255,255,255,.15); }
.c-btn svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#c-play svg, #c-next svg { fill: currentColor; stroke: none; width: 30px; height: 30px; }
#c-mute svg path:first-child { fill: currentColor; stroke: none; }
#c-mini rect + rect { fill: currentColor; stroke: none; }
#c-cc[aria-pressed="true"] { box-shadow: inset 0 -3px 0 var(--red); border-radius: 6px; }
.i-pause, .i-muted { display: none; }
.dock.playing .i-play { display: none; } .dock.playing .i-pause { display: block; }
.dock.muted .i-vol { display: none; } .dock.muted .i-muted { display: block; }
.c-time { font-size: 13px; padding: 0 8px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.c-time .live { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.c-time .live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.vol { width: 0; opacity: 0; transition: width .15s, opacity .15s; accent-color: #fff; height: 4px; margin: 0; }
#c-mute:hover + .vol, .vol:hover, .vol:focus-visible { width: 64px; opacity: 1; margin: 0 6px 0 2px; }
.bar { position: relative; height: 18px; cursor: pointer; touch-action: none; outline-offset: 0; }
.bar-track { position: absolute; left: 0; right: 0; top: 7px; height: 4px; background: rgba(255,255,255,.3); border-radius: 4px; overflow: hidden; transition: transform .1s; }
.bar:hover .bar-track, .bar.drag .bar-track { transform: scaleY(1.5); }
.bar-buf { position: absolute; inset: 0 auto 0 0; background: rgba(255,255,255,.4); width: 0; }
.bar-fill { position: absolute; inset: 0 auto 0 0; background: var(--red); width: 0; }
.bar-knob { position: absolute; top: 2px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--red); transform: scale(0); transition: transform .1s; left: 0; }
.bar:hover .bar-knob, .bar.drag .bar-knob { transform: scale(1); }
.bar-tip { position: absolute; bottom: 22px; transform: translateX(-50%); background: rgba(0,0,0,.85); padding: 3px 7px; border-radius: 6px; font-size: 12px; font-variant-numeric: tabular-nums; pointer-events: none; }
.c-menu { position: absolute; right: 12px; bottom: 62px; background: rgba(28,28,28,.95); border-radius: 12px; padding: 8px 0; min-width: 150px; max-height: 70%; overflow: auto; pointer-events: auto; z-index: 7; }
.c-menu button { display: flex; width: 100%; padding: 8px 18px; color: #fff; font-size: 14px; text-align: left; gap: 10px; }
.c-menu button:hover { background: rgba(255,255,255,.12); }
.c-menu button.on { font-weight: 700; }
.c-menu button.on::after { content: "✓"; margin-left: auto; }
.endscreen, .errscreen { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 20px; background: rgba(0,0,0,.72); }
.errscreen { z-index: 6; background: #111; }
.endscreen h3, .errscreen h3 { font-size: 20px; font-weight: 600; }
.endscreen p, .errscreen p { color: #ccc; max-width: 460px; font-size: 14px; }
.end-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.pbtn { height: 40px; padding: 0 18px; border-radius: 20px; background: rgba(255,255,255,.16); color: #fff; font-weight: 500; display: inline-flex; align-items: center; gap: 8px; }
.pbtn:hover { background: rgba(255,255,255,.28); }
.pbtn.primary { background: #fff; color: #000; }
.pbtn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.end-next { display: flex; gap: 12px; align-items: center; text-align: left; max-width: 420px; }
.end-next img { width: 140px; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; flex: none; }
.end-next small { color: #bbb; display: block; }
.end-next b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 500; }
.only-mini { display: none; }

.dock.mini { position: fixed; right: 16px; bottom: 16px; width: 400px; max-width: calc(100vw - 32px); z-index: 50; border-radius: 12px; box-shadow: var(--shadow); }
.dock.mini .stage { max-height: none; min-height: 0; }
.dock.mini .only-mini { display: grid; }
.dock.mini .not-mini, .dock.mini .vol, .dock.mini #c-mute, .dock.mini #c-speed, .dock.mini #c-cc { display: none; }
.dock.mini .c-title { font-size: 13px; }
.dock.mini .bigplay { width: 56px; height: 56px; margin: -28px; }
.dock:fullscreen, .dock.pfs { background: #000; }
.dock.pfs { position: fixed; inset: 0; z-index: 999; width: auto; }
.dock:fullscreen .stage, .dock.pfs .stage { width: 100%; height: 100%; aspect-ratio: auto; max-height: none; border-radius: 0; }
.dock:fullscreen .not-mini, .dock.pfs .not-mini { display: none; }
@media (hover: none) { .hide-touch { display: none !important; } .c-btn { width: 42px; } }

/* ---------- pages, sheets, toast, footer ---------- */
.page { max-width: 760px; margin: 0 auto; padding: 24px 0; }
.page h1 { font-size: 28px; margin-bottom: 14px; }
.page h2 { font-size: 18px; margin: 24px 0 6px; }
.page p, .page li { color: var(--muted); font-size: 15px; line-height: 1.6; }
.page p a, .page li a { color: var(--accent); }
.sheet { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.5); display: grid; place-items: center; padding: 16px; }
.sheet-box { background: var(--card); border-radius: 16px; width: 100%; max-width: 420px; padding: 22px; box-shadow: var(--shadow); max-height: 90vh; overflow: auto; }
.sheet-box h2 { font-size: 19px; margin-bottom: 6px; }
.sheet-box p { color: var(--muted); margin-bottom: 14px; }
.opt { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 10px; cursor: pointer; font-size: 15px; }
.opt:hover { background: var(--hover); }
.opt input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.sheet-box textarea, .sheet-box input[type="email"] { width: 100%; border: 1px solid var(--soft2); border-radius: 10px; padding: 10px 12px; background: var(--bg); margin-bottom: 10px; outline: 0; resize: vertical; }
.sheet-box textarea:focus, .sheet-box input[type="email"]:focus { border-color: var(--accent); }
.sheet-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.pop { position: absolute; z-index: 90; background: var(--card); border-radius: 12px; box-shadow: var(--shadow); padding: 8px 0; min-width: 220px; border: 1px solid var(--line); }
.pop button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 16px; text-align: left; font-size: 14px; }
.pop button:hover { background: var(--hover); }
.pop svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.toast { position: fixed; left: 24px; bottom: 24px; z-index: 120; background: #0f0f0f; color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 14px; max-width: min(480px, calc(100vw - 48px)); box-shadow: var(--shadow); border: 1px solid #333; }
#foot { display: flex; gap: 6px 18px; justify-content: center; flex-wrap: wrap; padding: 18px 16px 26px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }
#foot a, #foot button { color: var(--fg); font-weight: 500; }
body.r-watch #foot { border: 0; }
.noscript { padding: 30px; text-align: center; }

/* ---------- narrower screens ---------- */
@media (max-width: 1040px) {
  body.r-watch #app { grid-template-columns: minmax(0, 1fr); }
  .w-side { grid-column: 1; grid-row: 3; margin-top: 24px; }
  .card.compact .thumb { width: 168px; }
}
@media (max-width: 700px) {
  #top { padding: 0 8px; gap: 6px; }
  .logo-word { font-size: 19px; }
  .logo-mark { width: 28px; height: 20px; }
  .sbtn { width: 46px; }
  #btn-theme { display: none; }
  #app { padding: 0 12px 32px; }
  .hero { padding-top: 5vh; }
  .list { gap: 20px; }
  #v-results .card:not(.compact), #v-page .list .card { flex-direction: column; gap: 10px; }
  #v-results .card:not(.compact) .thumb, #v-page .list .card .thumb { width: 100%; }
  #v-results .card:not(.compact) h3 { font-size: 16px; line-height: 22px; }
  #v-results .card:not(.compact) .c-ch { margin: 4px 0 0; }
  #v-results .card:not(.compact) .c-desc { display: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px 10px; }
  /* Watch page: the bar scrolls away and the player sticks to the top, like the YouTube app. */
  body.r-watch #top { position: static; }
  body.r-watch #app { padding-top: 0; }
  body.r-watch .dock:not(.mini) { position: sticky; top: 0; margin: 0 -12px; }
  body.r-watch .dock:not(.mini) .stage { border-radius: 0; max-height: 56vh; min-height: 0; }
  .w-info h1 { font-size: 18px; line-height: 24px; }
  .dock.mini { right: 8px; bottom: 8px; width: min(72vw, 320px); }
  .toast { left: 12px; right: 12px; bottom: 12px; max-width: none; }
  .sheet { place-items: end center; padding: 0; }
  .sheet-box { border-radius: 16px 16px 0 0; max-width: none; padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
  .c-bottom { padding: 20px 6px 0; }
  .c-time { padding: 0 4px; font-size: 12px; }
}
@media (max-width: 420px) { .card.compact .thumb { width: 140px; } .logo-word { display: none; } }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .001s !important; transition-duration: .001s !important; } }
