:root {
  --bg: #0b0b0f;
  --bg-2: #14141b;
  --bg-3: #1d1d27;
  --bg-4: #262633;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f4f4f6;
  --muted: #9a9aa8;
  --accent: #fabe1a;      /* 与 logo 一致的黄色 */
  --accent-2: #ffd54a;
  --on-accent: #241a00;   /* 黄色按钮上的文字 */
  --danger: #ff6b5e;
  --radius: 14px;
  --header-h: 56px;
  --bar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  background: radial-gradient(1200px 600px at 50% -200px, #23161c 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--text);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { display: block; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
code { background: var(--bg-3); padding: 1px 6px; border-radius: 6px; font-size: 0.9em; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 6px 12px; border-radius: 8px; }
.skip-link:focus { left: 8px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20; height: calc(var(--header-h) + var(--safe-t));
  display: flex; align-items: center; gap: 4px;
  padding: var(--safe-t) max(12px, var(--safe-r)) 0 max(12px, var(--safe-l));
  background: rgba(11, 11, 15, 0.8);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-back { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; flex: none; }
.header-back:hover { background: var(--bg-3); }
.header-back svg { width: 24px; height: 24px; fill: currentColor; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.brand-logo { width: 32px; height: 32px; flex: none; display: block; filter: drop-shadow(0 2px 6px rgba(250,190,26,.25)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-text strong { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-nav a { font-size: 14px; color: var(--muted); padding: 6px 10px; border-radius: 8px; white-space: nowrap; }
.header-nav a:hover, .header-nav a.active { color: var(--text); background: var(--bg-3); }

main { flex: 1; width: 100%; outline: none; }
.view { width: 100%; max-width: 1200px; margin: 0 auto; padding: 16px 16px 32px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 999px; padding: 9px 22px; cursor: pointer; white-space: nowrap;
  background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: var(--on-accent); font-weight: 700; font-size: 14px;
}
.btn:hover { filter: brightness(1.08); }
.btn svg { width: 20px; height: 20px; fill: currentColor; }
.btn-lg { padding: 12px 28px; font-size: 16px; }
.btn-ghost { background: rgba(255,255,255,.1); }
.btn-ghost:hover { background: rgba(255,255,255,.16); filter: none; }
.btn[disabled], .btn.disabled { opacity: .4; pointer-events: none; }

/* 首页：小红书风格瀑布流（列由 app.js 按最矮列分配，卡片按封面原始宽高比占位） */
.home { max-width: 1440px; padding: 14px 10px 32px; }
@media (min-width: 600px) { .home { padding: 20px 20px 40px; } }
.home-head { display: flex; align-items: baseline; gap: 10px; margin: 2px 4px 14px; }
.home-head h1 { margin: 0; font-size: 20px; }
.home-head .muted { font-size: 13px; }
.masonry { --gap: 8px; display: flex; align-items: flex-start; gap: var(--gap); }
.m-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: var(--gap); }
.w-card {
  display: block; border-radius: 14px; overflow: hidden; background: var(--bg-2); border: 1px solid var(--line);
  outline-offset: 3px; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.w-card:hover, .w-card:focus-visible { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0,0,0,.45); border-color: rgba(255,255,255,.16); }
.w-thumb { position: relative; width: 100%; overflow: hidden; background: linear-gradient(160deg, var(--bg-4), var(--bg-3)); }
.w-thumb::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.06) 50%, transparent 70%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.w-thumb.loaded::before, .w-thumb.broken::before { display: none; }
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
.w-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s ease, transform .4s ease; }
.w-thumb.loaded img { opacity: 1; }
.w-card:hover .w-thumb img { transform: scale(1.03); }
.w-thumb::after { content: ""; position: absolute; inset: auto 0 0; height: 40%; background: linear-gradient(180deg, transparent, rgba(0,0,0,.55)); pointer-events: none; }
.w-play {
  position: absolute; z-index: 1; left: 8px; top: 8px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(0,0,0,.42); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.w-play svg { width: 14px; height: 14px; fill: #fff; margin-left: 2px; }
.w-dur {
  position: absolute; z-index: 1; right: 8px; bottom: 8px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums;
  padding: 1px 7px; border-radius: 999px; background: rgba(0,0,0,.5); color: #fff;
}
.w-progress { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.2); }
.w-progress i { display: block; height: 100%; background: var(--accent); }
.w-info { height: 62px; padding: 9px 11px 0; overflow: hidden; }
.w-title { margin: 0; font-size: 14px; font-weight: 600; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-meta { margin: 5px 0 0; display: flex; align-items: center; gap: 6px; font-size: 12px; line-height: 18px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.w-meta .chip { padding: 0 6px; border-radius: 5px; background: rgba(255,255,255,.08); color: #cfcfda; font-size: 11px; }
.w-meta .resume { color: var(--accent-2); }
.cover-ph { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.35); font-size: 13px; }
.empty { color: var(--muted); text-align: center; padding: 60px 0; }

/* 播放页布局：播放器外框宽高比 = 视频原始比例（--ar，由 app.js 设置），在可用区域内尽量放大且不裁切 */
.watch { --avail-h: calc(100dvh - var(--header-h) - var(--safe-t) - var(--bar-h) - var(--safe-b)); display: grid; gap: 0; padding: 0; max-width: none; }
.watch-stage { --ar: 1.7778; display: flex; justify-content: center; align-items: center; background: #000; min-height: min(56vw, var(--avail-h)); }
.player {
  position: relative; overflow: hidden; outline: none; background: #000;
  aspect-ratio: var(--ar); height: auto;
  width: min(100%, calc(var(--avail-h) * var(--ar)));
  user-select: none; -webkit-user-select: none;
  touch-action: none;            /* 手机上下滑切换作品；页面滚动可在播放器外进行 */
}
.player:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
@media (min-width: 640px) {
  .watch { --avail-h: calc(100dvh - var(--header-h) - var(--safe-t) - var(--bar-h) - var(--safe-b) - 48px); padding: 16px 16px 0; }
  .watch-stage { background: transparent; }
  .player { border-radius: var(--radius); box-shadow: 0 30px 80px rgba(0,0,0,.55); }
}
@media (min-width: 960px) {
  .watch { --avail-h: calc(100dvh - var(--header-h) - var(--safe-t) - 48px); grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; max-width: 1500px; padding: 20px 24px 32px; align-items: start; }
  .watch-stage { position: sticky; top: calc(var(--header-h) + var(--safe-t) + 20px); min-height: var(--avail-h); }
  .player { touch-action: manipulation; }
  .watch-bar { display: none !important; }
}
body.route-watch .site-footer { display: none; }
@media (max-width: 639px) { body.route-watch .header-nav { display: none; } }

.player-backdrop { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(36px) brightness(.55) saturate(1.2); transform: scale(1.1); }
.player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: transparent; display: block; }
.player:fullscreen { width: 100vw; height: 100vh; max-height: none; border-radius: 0; aspect-ratio: auto; }
.player:-webkit-full-screen { width: 100vw; height: 100vh; max-height: none; border-radius: 0; aspect-ratio: auto; }
.player.is-overlay .big-play, .player.is-overlay .controls { display: none; }
.state-next, .state-end { background: rgba(8, 8, 12, .78); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: 6; }
.state-end strong, .state-next strong { font-size: 18px; }
.state-end p, .state-next p { margin: 0; color: #c9c9d3; }
.state-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.countdown { position: relative; width: 72px; height: 72px; border: 0; background: none; padding: 0; cursor: pointer; margin: 6px 0; }
.countdown svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.countdown circle { fill: none; stroke-width: 3; }
.cd-track { stroke: rgba(255,255,255,.18); }
.cd-bar { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 131.95; stroke-dashoffset: 0; transition: stroke-dashoffset 1s linear; }
.countdown span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.toast {
  position: absolute; z-index: 7; left: 50%; top: 54px; transform: translateX(-50%);
  background: rgba(0,0,0,.72); padding: 7px 14px; border-radius: 999px; font-size: 13px; white-space: nowrap;
  animation: toastIn .25s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translate(-50%, 0); } }
.swipe-hint {
  position: absolute; z-index: 7; left: 50%; bottom: 96px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px; white-space: nowrap;
  background: rgba(0,0,0,.6); padding: 7px 14px; border-radius: 999px; font-size: 13px; pointer-events: none;
  animation: hint 1.6s ease-in-out infinite;
}
.swipe-hint svg { width: 18px; height: 18px; fill: #fff; }
@keyframes hint { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -6px); } }
.player.swipe-out-up video { transition: transform .22s ease, opacity .22s; transform: translateY(-30%); opacity: 0; }
.player.swipe-out-down video { transition: transform .22s ease, opacity .22s; transform: translateY(30%); opacity: 0; }

/* 手机底部信息条 */
.watch-bar {
  height: calc(var(--bar-h) + var(--safe-b)); padding: 0 8px var(--safe-b) 14px;
  display: flex; align-items: center; gap: 4px; background: var(--bg-2); border-top: 1px solid var(--line);
}
@media (min-width: 640px) { .watch-bar { max-width: 640px; width: 100%; margin: 0 auto; background: transparent; border: 0; } }
.watch-bar-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.watch-bar-info strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.watch-bar-info span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-btn { height: 40px; min-width: 40px; border: 0; border-radius: 12px; background: transparent; display: inline-flex; align-items: center; justify-content: center; gap: 4px; cursor: pointer; padding: 0 8px; }
.bar-btn svg { width: 22px; height: 22px; fill: currentColor; }
.bar-btn:hover { background: var(--bg-3); }
.bar-btn[disabled] { opacity: .3; pointer-events: none; }
.bar-btn-main { background: var(--bg-3); padding: 0 14px; font-size: 14px; font-weight: 600; }
.watch-desc-m { margin: 0; padding: 12px 16px 0; color: #cfcfda; font-size: 14px; white-space: pre-line; }
@media (min-width: 960px) { .watch-desc-m { display: none !important; } }

/* 右栏（桌面）/ 下方列表（手机）：作品信息 + 更多作品 */
.watch-aside { padding: 16px 16px 32px; }
.watch-aside .back { display: none; align-items: center; gap: 4px; color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.watch-aside .back svg { width: 20px; height: 20px; fill: currentColor; }
.watch-aside .back:hover { color: var(--text); }
.watch-aside > h1, .aside-meta, .aside-desc, .aside-nav, .kbd-help { display: none; }
@media (min-width: 960px) {
  .watch-aside { position: sticky; top: calc(var(--header-h) + var(--safe-t) + 20px); padding: 0; max-height: calc(100dvh - var(--header-h) - 40px); display: flex; flex-direction: column; }
  .watch-aside .back { display: inline-flex; }
  .watch-aside > h1 { display: block; font-size: 22px; margin: 0; }
  .aside-meta { display: block; margin: 2px 0 10px; color: var(--muted); }
  .aside-desc { display: block; margin: 0 0 14px; color: #cfcfda; font-size: 14px; white-space: pre-line; }
  .aside-nav { display: flex; gap: 10px; margin-bottom: 18px; }
  .aside-nav .btn { flex: 1; }
  .kbd-help { display: block; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 14px; }
  .more-list { flex: 1; min-height: 120px; overflow-y: auto; }
}
.aside-desc[hidden], .watch-desc-m[hidden] { display: none !important; }
.more-list { list-style: none; margin: 0; padding: 0 2px 0 0; display: grid; gap: 8px; }
.more-item { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 12px; border: 1px solid transparent; }
.more-item:hover { background: var(--bg-2); }
.more-item.current { background: rgba(250,190,26,.1); border-color: rgba(250,190,26,.5); }
.more-thumb { position: relative; width: 86px; aspect-ratio: 16 / 10; flex: none; border-radius: 8px; overflow: hidden; background: var(--bg-3); }
.more-thumb img { width: 100%; height: 100%; object-fit: cover; }
.more-txt { min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.more-txt strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.more-txt small { font-size: 12px; color: var(--muted); }
.more-item.current small { color: #ff8a7a; }
.kbd-help h2 { font-size: 14px; margin: 0 0 8px; color: var(--muted); }
.kbd-help ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 13px; color: #cfcfda; }
kbd { display: inline-block; min-width: 22px; text-align: center; padding: 0 6px; border-radius: 6px; background: var(--bg-3); border: 1px solid var(--line); font-size: 12px; font-family: inherit; }
.section-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.section-head h2 { margin: 0; font-size: 16px; }
.section-head .muted { font-size: 13px; }

.notfound { text-align: center; padding: 80px 16px; }
.notfound h1 { margin: 0 0 8px; }
.notfound p { margin: 0 0 20px; }
.site-footer { text-align: center; color: var(--muted); font-size: 12px; padding: 16px 16px calc(16px + var(--safe-b)); border-top: 1px solid var(--line); }

.big-play {
  position: absolute; z-index: 3; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px;
  border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(0,0,0,.45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: grid; place-items: center; transition: transform .2s, background .2s, opacity .2s;
}
.big-play svg { width: 36px; height: 36px; fill: #fff; margin-left: 4px; }
.big-play:hover { transform: scale(1.06); background: rgba(250,190,26,.85); }
.player.is-playing .big-play, .player.is-loading .big-play, .player.is-error .big-play { opacity: 0; pointer-events: none; }

.state {
  position: absolute; z-index: 4; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; text-align: center; padding: 24px; font-size: 14px;
}
.state-loading { pointer-events: none; background: rgba(0,0,0,.15); }
.spinner {
  width: 40px; height: 40px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.2); border-top-color: #fff;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.state-error { background: rgba(8, 8, 12, .86); backdrop-filter: blur(4px); }
.state-error svg { width: 44px; height: 44px; fill: var(--danger); }
.state-error strong { font-size: 17px; }
.state-error p { margin: 0; color: #c9c9d3; max-width: 300px; }


/* Controls */
.controls {
  position: absolute; z-index: 5; left: 0; right: 0; bottom: 0;
  padding: 28px 12px calc(8px + var(--safe-b));
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.75));
  transition: opacity .25s, transform .25s;
}
.player.controls-hidden .controls { opacity: 0; transform: translateY(8px); pointer-events: none; }
.player.controls-hidden { cursor: none; }
.player.is-error .controls { display: none; }
.progress { position: relative; height: 22px; display: flex; align-items: center; cursor: pointer; touch-action: none; outline: none; }
.progress-track { position: relative; width: 100%; height: 4px; border-radius: 4px; background: rgba(255,255,255,.22); transition: height .15s; }
.progress:hover .progress-track, .progress.dragging .progress-track, .progress:focus-visible .progress-track { height: 6px; }
.progress-buffer, .progress-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; width: 0; }
.progress-buffer { background: rgba(255,255,255,.38); }
.progress-fill { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.progress-thumb {
  position: absolute; top: 50%; left: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); transform: scale(0); transition: transform .15s;
}
.progress:hover .progress-thumb, .progress.dragging .progress-thumb, .progress:focus-visible .progress-thumb { transform: scale(1); }
@media (hover: none) { .progress-thumb { transform: scale(.85); } }
.progress-tip {
  position: absolute; bottom: 22px; transform: translateX(-50%);
  font-size: 12px; padding: 2px 6px; border-radius: 6px; background: rgba(0,0,0,.8); pointer-events: none; font-variant-numeric: tabular-nums;
}
.controls-row { display: flex; align-items: center; gap: 4px; }
.ctrl {
  width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; cursor: pointer;
  display: grid; place-items: center; flex: none;
}
.ctrl:hover, .ctrl:focus-visible { background: rgba(255,255,255,.12); outline: none; }
.ctrl svg { width: 24px; height: 24px; fill: #fff; }
.ctrl-text { width: auto; padding: 0 10px; font-size: 13px; font-weight: 600; }
.i-pause, .i-mute, .i-fs-exit { display: none; }
.player.is-playing .i-play { display: none; }
.player.is-playing .i-pause { display: block; }
.player.is-muted .i-vol { display: none; }
.player.is-muted .i-mute { display: block; }
.player.is-fullscreen .i-fs { display: none; }
.player.is-fullscreen .i-fs-exit { display: block; }
.time { font-size: 13px; margin-left: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.time .sep { margin: 0 4px; color: rgba(255,255,255,.55); }
.spacer { flex: 1; }
.quality { position: relative; }
.quality-menu {
  position: absolute; right: 0; bottom: 46px; min-width: 120px; margin: 0; padding: 6px; list-style: none;
  background: rgba(20,20,27,.96); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.5);
}
.quality-menu button {
  width: 100%; text-align: left; border: 0; background: transparent; padding: 7px 10px; border-radius: 8px; cursor: pointer; font-size: 13px;
  display: flex; justify-content: space-between; gap: 10px;
}
.quality-menu button:hover, .quality-menu button:focus-visible { background: var(--bg-3); outline: none; }
.quality-menu button[aria-checked="true"] { color: var(--accent-2); font-weight: 700; }
.quality-menu .cur { color: var(--muted); font-weight: 400; font-size: 12px; }


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation-duration: 1.5s !important; }
}

.player .state-next, .player .state-end { z-index: 6; }

/* ---------- 访问码门禁 ---------- */
body.locked > .site-header, body.locked > main, body.locked > .site-footer { display: none !important; }
body:not(.locked) > .gate { display: none; }
.nav-btn { border: 0; background: transparent; color: var(--muted); font-size: 14px; padding: 6px 10px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.nav-btn:hover { color: var(--text); background: var(--bg-3); }
.access-left {
  flex: none; font-size: 12px; padding: 3px 10px; border-radius: 999px; margin-right: 4px;
  background: rgba(255,255,255,.08); color: #d8d8e0; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.access-left.warn { background: rgba(255,77,79,.18); color: #ff8a7a; }
.gate {
  position: relative; min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center;
  padding: 24px 20px calc(24px + var(--safe-b));
  background:
    radial-gradient(600px 420px at 15% 8%, rgba(250,190,26,.20), transparent 70%),
    radial-gradient(520px 420px at 90% 92%, rgba(255,213,74,.12), transparent 70%), var(--bg);
}
.gate-card {
  width: 100%; max-width: 380px; text-align: center; padding: 36px 24px 26px;
  background: rgba(20,20,27,.72); border: 1px solid var(--line); border-radius: 22px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 30px 80px rgba(0,0,0,.5);
}
.gate-card.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.gate-logo { display: block; width: 72px; height: 72px; margin: 0 auto 16px; filter: drop-shadow(0 8px 22px rgba(250,190,26,.35)); }
.gate-site { margin: 0; font-size: 24px; }
.gate-tagline { margin: 4px 0 22px; font-size: 13px; min-height: 1em; }
.gate-notice { margin: -6px 0 18px; padding: 10px 12px; border-radius: 12px; font-size: 14px; font-weight: 600; background: rgba(255,77,79,.14); color: #ff8a7a; border: 1px solid rgba(255,77,79,.3); }
.gate-form { text-align: left; }
.gate-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.gate-input { position: relative; }
.gate-input input {
  width: 100%; height: 50px; padding: 0 48px 0 16px; border-radius: 14px; border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.35); color: var(--text); font-size: 17px; letter-spacing: .12em; outline: none; text-transform: uppercase;
  transition: border-color .2s, box-shadow .2s;
}
.gate-input input::placeholder { letter-spacing: 0; color: rgba(255,255,255,.35); text-transform: none; }
.gate-input input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(250,190,26,.22); }
.gate-input input:disabled { opacity: .5; }
.gate-eye { position: absolute; right: 6px; top: 7px; width: 36px; height: 36px; border: 0; background: transparent; border-radius: 10px; cursor: pointer; display: grid; place-items: center; }
.gate-eye svg { width: 20px; height: 20px; fill: var(--muted); }
.gate-eye[aria-pressed="true"] svg { fill: var(--accent-2); }
.gate-msg { min-height: 22px; margin: 8px 2px 10px; font-size: 13px; color: var(--muted); }
.gate-msg.error { color: #ff7875; }
.gate-submit { width: 100%; height: 50px; }
.gate-submit[disabled] { opacity: .55; cursor: not-allowed; }
.gate-submit .spinner.sm { width: 18px; height: 18px; border-width: 2px; display: none; }
.gate-submit.loading .spinner.sm { display: inline-block; }
.gate-foot { margin: 18px 0 0; line-height: 1.7; }
.gate-boot { display: none; position: absolute; inset: 0; align-items: center; justify-content: center; background: var(--bg); }
body.booting .gate-boot { display: flex; }
@media (max-width: 380px) { .brand-text small { display: none; } }

/* ---------- 手机适配（375–430px 为主） ---------- */
.header-back { width: 44px; height: 44px; }
.nav-btn, .header-nav a { min-height: 40px; display: inline-flex; align-items: center; }
.w-card { -webkit-touch-callout: none; }
.w-card:active { transform: scale(.98); }
@media (hover: none) {
  .w-card:hover, .w-card:focus-visible { transform: none; box-shadow: none; border-color: var(--line); }
  .w-card:hover .w-thumb img { transform: none; }
  .ctrl { width: 44px; height: 44px; }
  .bar-btn { height: 44px; min-width: 44px; }
  .progress { height: 30px; }
}
@media (max-width: 480px) {
  .header-nav a[data-nav="home"] { display: none; }
  .brand-text small { display: none; }
  .brand-text strong { font-size: 15px; }
  .access-left { padding: 3px 8px; font-size: 11px; }
  .home { padding: 10px max(8px, var(--safe-l)) calc(24px + var(--safe-b)) max(8px, var(--safe-r)); }
  .home-head { margin: 2px 4px 10px; }
  .home-head h1 { font-size: 18px; }
  .w-card { border-radius: 10px; }
  .w-info { padding: 8px 9px 0; }
  .w-title { font-size: 13.5px; }
  .w-play { width: 24px; height: 24px; left: 6px; top: 6px; }
  .w-dur { right: 6px; bottom: 6px; font-size: 11px; }
  .gate { padding: max(24px, var(--safe-t)) 16px calc(24px + var(--safe-b)); }
  .gate-card { padding: 30px 20px 22px; border-radius: 20px; }
  .gate-site { font-size: 22px; }
  .gate-eye { width: 44px; height: 44px; top: 3px; right: 3px; }
  .controls { padding-left: max(8px, var(--safe-l)); padding-right: max(8px, var(--safe-r)); }
  .time { font-size: 12px; }
  .big-play { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
  .big-play svg { width: 30px; height: 30px; }
  .state-actions .btn { min-height: 42px; }
  .watch-aside { padding: 14px max(12px, var(--safe-l)) calc(24px + var(--safe-b)) max(12px, var(--safe-r)); }
  .more-item { padding: 8px 6px; }
}
/* 手机横过来看视频：隐藏顶栏，播放器占满高度 */
@media (orientation: landscape) and (max-height: 500px) and (hover: none) {
  body.route-watch .site-header { display: none; }
  .watch { --avail-h: calc(100dvh - var(--safe-b)); padding: 0 var(--safe-r) 0 var(--safe-l); }
  .watch-stage { background: #000; min-height: var(--avail-h); }
  .player { border-radius: 0; box-shadow: none; }
  .watch-bar { max-width: none; background: var(--bg-2); }
}
/* 全屏：控制栏避开刘海/圆角 */
.player.is-fullscreen .controls { padding: 28px max(16px, var(--safe-r)) calc(12px + var(--safe-b)) max(16px, var(--safe-l)); }
.player.is-fullscreen { border-radius: 0; }

/* 小屏播放器高度有限时，控制栏渐变层会盖住中央播放键：渐变层本身不接收点击，只让按钮/进度条可点 */
.controls { pointer-events: none; }
.controls > * { pointer-events: auto; }
.big-play { z-index: 6; }
.brand { min-height: 44px; }
.player.controls-hidden .controls > *, .player.is-error .controls > * { pointer-events: none; }

/* ---------- 防盗：视频区域禁止选择/长按菜单/拖拽；动态水印；iPhone 网页内全屏 ---------- */
.player, .player video { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-user-drag: none; }
.player video::-internal-media-controls-download-button { display: none; }
.watermark {
  position: absolute; left: 0; top: 0; z-index: 4; pointer-events: none; white-space: nowrap;
  font-size: 13px; line-height: 1; letter-spacing: .5px; font-weight: 600; color: rgba(255,255,255,.26);
  text-shadow: 0 0 2px rgba(0,0,0,.35); transition: transform 1.6s ease; will-change: transform;
}
.player.is-fullscreen .watermark { font-size: 15px; }
.player.is-pseudo-fs {
  position: fixed !important; inset: 0 !important; z-index: 2000; width: 100vw !important; height: 100vh !important;
  height: 100dvh !important; max-width: none !important; max-height: none !important; aspect-ratio: auto !important;
  margin: 0 !important; border-radius: 0 !important; background: #000;
}
html.pseudo-fs-lock, html.pseudo-fs-lock body { overflow: hidden !important; overscroll-behavior: none; }
@media (prefers-reduced-motion: reduce) { .watermark { transition: none; } }
