/* 短视频 feed (pilot 2026-10-27). Theme via --sv-accent on :root. */
:root { --sv-accent: #ff6b2c; --sv-bg: #000; --sv-fg: #fff; --sv-dim: rgba(255,255,255,.72); color-scheme: dark; }
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--sv-bg); color: var(--sv-fg); overflow: hidden;
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; }
a { color: inherit; }
.sv-top { position: fixed; z-index: 20; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 8px) 12px 8px; background: linear-gradient(rgba(0,0,0,.55), transparent); pointer-events: none; }
.sv-top > * { pointer-events: auto; }
.sv-home { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: 22px; text-decoration: none; font-weight: 600; background: rgba(0,0,0,.35); }
.sv-home img { height: 26px; width: auto; display: block; }
.sv-top h1 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: .5px; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.sv-mute { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border: 0; border-radius: 22px; color: #fff; background: rgba(0,0,0,.45); font: inherit; font-size: 13px; cursor: pointer; }
.sv-mute .sv-wave { display: none; } .sv-mute.on .sv-wave { display: inline; } .sv-mute.on .sv-x { display: none; }
#sv-feed { position: fixed; inset: 0; overflow-y: auto; overflow-x: hidden; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
#sv-feed::-webkit-scrollbar { display: none; }
.sv-card { position: relative; height: 100vh; height: 100dvh; width: 100%; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; background: #000; }
.sv-bg { position: absolute; inset: -40px; background: center/cover no-repeat; filter: blur(28px) brightness(.45); transform: scale(1.1); }
.sv-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: transparent; }
.sv-tap { position: absolute; inset: 0; z-index: 2; border: 0; background: transparent; cursor: pointer; padding: 0; color: #fff; }
.sv-playicon { display: none; opacity: .85; filter: drop-shadow(0 2px 8px rgba(0,0,0,.6)); }
.sv-paused .sv-playicon { display: inline-block; }
.sv-spin { position: absolute; z-index: 3; left: 50%; top: 50%; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.25); border-top-color: #fff; animation: sv-rot .8s linear infinite; display: none; pointer-events: none; }
.sv-loading .sv-spin { display: block; }
.sv-paused .sv-spin { display: none; }
@keyframes sv-rot { to { transform: rotate(360deg); } }
.sv-side { position: absolute; z-index: 4; right: 8px; bottom: calc(env(safe-area-inset-bottom) + 150px); display: flex; flex-direction: column; gap: 14px; }
.sv-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 52px; min-height: 52px; border: 0; background: none; color: #fff; font: inherit; font-size: 12px; cursor: pointer; text-shadow: 0 1px 3px rgba(0,0,0,.7); }
.sv-btn svg { filter: drop-shadow(0 1px 3px rgba(0,0,0,.6)); }
.sv-like svg path { fill: rgba(255,255,255,.92); }
.sv-like.on svg path { fill: #ff3b5c; }
.sv-info { position: absolute; z-index: 4; left: 0; right: 72px; bottom: 0; padding: 40px 14px calc(env(safe-area-inset-bottom) + 22px); background: linear-gradient(transparent, rgba(0,0,0,.75)); pointer-events: none; }
.sv-info > * { pointer-events: auto; }
.sv-title { margin: 0 0 2px; font-size: 18px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; text-shadow: 0 1px 3px rgba(0,0,0,.7); }
.sv-ep { margin: 0 0 4px; color: var(--sv-dim); font-size: 13px; }
.sv-tags { margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; color: var(--sv-dim); }
.sv-full { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 20px; border-radius: 22px; background: var(--sv-accent); color: #fff; font-weight: 700; text-decoration: none; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.sv-prog { position: absolute; z-index: 5; left: 0; right: 0; bottom: env(safe-area-inset-bottom); height: 3px; background: rgba(255,255,255,.18); }
.sv-prog i { display: block; height: 100%; background: var(--sv-accent); transform-origin: left; transform: scaleX(0); }
.sv-dead .sv-tap, .sv-dead .sv-side { display: none; }
.sv-dead .sv-info::before { content: "该片段暂时无法播放，已跳过"; display: block; margin-bottom: 8px; color: #ffd27a; font-size: 13px; }
.sv-ad .sv-adlink { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 80px 20px; text-decoration: none; }
.sv-ad img { max-width: min(92%, 420px); max-height: 62vh; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,.5); object-fit: contain; }
.sv-adtitle { font-size: 17px; font-weight: 700; text-align: center; }
.sv-adcta { display: inline-flex; align-items: center; min-height: 44px; padding: 0 22px; border-radius: 22px; background: var(--sv-accent); font-weight: 700; }
.sv-adlabel { position: absolute; z-index: 3; right: 10px; bottom: calc(env(safe-area-inset-bottom) + 10px); padding: 2px 8px; border-radius: 4px; font-size: 12px; background: rgba(0,0,0,.55); color: rgba(255,255,255,.8); }
.sv-empty { padding: 40vh 20px 0; text-align: center; color: var(--sv-dim); }
.sv-nav { display: none; }
#sv-toast { position: fixed; z-index: 30; left: 50%; top: 45%; transform: translate(-50%,-50%); padding: 10px 18px; border-radius: 8px; background: rgba(0,0,0,.8); font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s; }
#sv-toast.on { opacity: 1; }
.sv-backdrop { display: none; }
/* desktop: centered 9:16 column with blurred backdrop */
@media (min-width: 768px) {
  .sv-backdrop { display: block; position: fixed; inset: 0; background: radial-gradient(ellipse at 30% 20%, rgba(255,255,255,.08), transparent 60%), #0b0b0d; }
  #sv-feed { left: 50%; right: auto; width: min(calc(100vh * 9 / 16), 100vw); transform: translateX(-50%); box-shadow: 0 0 80px rgba(0,0,0,.8); }
  .sv-card { border-left: 1px solid rgba(255,255,255,.06); border-right: 1px solid rgba(255,255,255,.06); }
  .sv-top { padding-left: 24px; padding-right: 24px; }
  .sv-nav { display: flex; flex-direction: column; gap: 12px; position: fixed; z-index: 20; top: 50%; right: max(24px, calc(50% - 100vh * 9 / 32 - 84px)); transform: translateY(-50%); }
  .sv-nav button { width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 20px; cursor: pointer; }
  .sv-nav button:hover { background: rgba(255,255,255,.22); }
}
@media (prefers-reduced-motion: reduce) {
  #sv-feed { scroll-behavior: auto; }
  .sv-spin { animation: none; border-top-color: rgba(255,255,255,.25); }
  #sv-toast { transition: none; }
}
.sv-seo { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
/* 2026-10-27 hashtags + 举报广告 */
a.sv-tag { color: inherit; text-decoration: none; }
a.sv-tag:hover, a.sv-tag:focus-visible { color: #fff; text-decoration: underline; }
.sv-report span { font-size: 11px; }
.sv-hidden .sv-info::before { content: "已举报，不再显示此视频"; }
/* ---------- v2 2026-10-27: shared shorts design (counter, chips, end overlay, heart, share sheet, hint, small screens) ---------- */
.sv-top { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
.sv-top h1 { display: flex; align-items: baseline; gap: 6px; }
.sv-count { font-size: 12px; font-weight: 500; color: var(--sv-dim); font-variant-numeric: tabular-nums; }
.sv-count:empty { display: none; }
.sv-info { left: env(safe-area-inset-left); padding-bottom: calc(env(safe-area-inset-bottom) + 18px); }
.sv-side { right: max(6px, env(safe-area-inset-right)); }
.sv-btn { min-width: 48px; min-height: 48px; }
.sv-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sv-tags { max-height: 42px; overflow: hidden; }
a.sv-tag { display: inline-flex; align-items: center; min-height: 24px; }
.sv-chips { display: flex; gap: 6px; margin: 0 0 10px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.sv-chips::-webkit-scrollbar { display: none; }
.sv-chip { flex: none; display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 16px; font-size: 13px; text-decoration: none; color: #fff; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.18); white-space: nowrap; }
.sv-chip.on { background: rgba(255,255,255,.32); border-color: rgba(255,255,255,.5); font-weight: 600; }
.sv-chip-next { background: var(--sv-accent); border-color: transparent; font-weight: 700; }
.sv-prog { height: 2px; z-index: 6; }
.sv-prog i { transition: transform .25s linear; }
.sv-end { position: absolute; z-index: 7; left: 50%; top: 42%; transform: translate(-50%,-50%); display: none; flex-direction: column; align-items: stretch; gap: 10px; width: min(78%, 300px); padding: 18px; border-radius: 16px; background: rgba(0,0,0,.62); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); overflow: hidden; }
.sv-ended .sv-end { display: flex; }
.sv-ended .sv-playicon { display: none !important; }
.sv-end a, .sv-end button { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 0 16px; border: 0; border-radius: 23px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; color: #fff; }
.sv-end-full { background: var(--sv-accent); }
.sv-end-next { background: rgba(255,255,255,.18); }
.sv-end-replay { background: none !important; min-height: 44px !important; font-weight: 500 !important; color: var(--sv-dim) !important; font-size: 13px !important; }
.sv-end-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--sv-accent); transform-origin: left; transform: scaleX(0); }
.sv-ended .sv-end-bar { animation: sv-endbar 5s linear forwards; }
@keyframes sv-endbar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.sv-heart { position: absolute; z-index: 8; width: 96px; height: 96px; margin: -48px 0 0 -48px; pointer-events: none; opacity: 0; color: #ff3b5c; }
.sv-heart svg { width: 96px; height: 96px; } .sv-heart svg path { fill: #ff3b5c; }
.sv-heart.on { animation: sv-heart .8s ease-out forwards; }
@keyframes sv-heart { 0% { opacity: 0; transform: scale(.4); } 15% { opacity: 1; transform: scale(1.15); } 30% { transform: scale(.95); } 70% { opacity: 1; transform: scale(1) translateY(-10px); } 100% { opacity: 0; transform: scale(1.3) translateY(-60px); } }
.sv-like.pop svg { animation: sv-pop .35s ease-out; }
@keyframes sv-pop { 50% { transform: scale(1.3); } }
.sv-hint { position: fixed; z-index: 25; left: 50%; bottom: 34%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 22px; border-radius: 14px; background: rgba(0,0,0,.6); text-align: center; cursor: pointer; }
.sv-hint b { font-size: 15px; } .sv-hint small { font-size: 12px; color: var(--sv-dim); }
.sv-hint-arrow { font-size: 28px; line-height: 1; animation: sv-hint 1.2s ease-in-out infinite; }
@keyframes sv-hint { 0%,100% { transform: translateY(6px); opacity: .6; } 50% { transform: translateY(-8px); opacity: 1; } }
.sv-sheet { position: fixed; z-index: 40; inset: 0; display: none; align-items: flex-end; justify-content: center; background: rgba(0,0,0,.5); }
.sv-sheet.on { display: flex; }
.sv-sheet-in { width: 100%; max-width: 480px; display: flex; flex-direction: column; gap: 10px; padding: 18px 16px calc(env(safe-area-inset-bottom) + 16px); border-radius: 16px 16px 0 0; background: #17181c; }
.sv-sheet-t { margin: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-sheet-u { width: 100%; min-height: 40px; padding: 0 10px; border: 1px solid rgba(255,255,255,.15); border-radius: 8px; background: #0e0f12; color: var(--sv-dim); font: inherit; font-size: 13px; }
.sv-sheet button { min-height: 46px; border: 0; border-radius: 23px; font: inherit; font-weight: 700; color: #fff; background: rgba(255,255,255,.12); cursor: pointer; }
.sv-sheet .sv-sheet-copy { background: var(--sv-accent); }
.sv-sheet .sv-sheet-x { background: none; color: var(--sv-dim); font-weight: 500; }
/* iPhone SE / small phones: keep caption clear of the action column and the bottom edge */
@media (max-width: 380px), (max-height: 680px) {
  .sv-title { font-size: 16px; }
  .sv-side { gap: 8px; bottom: calc(env(safe-area-inset-bottom) + 132px); }
  .sv-btn span { font-size: 11px; }
  .sv-info { right: 64px; padding-top: 28px; }
  .sv-tags { max-height: 22px; margin-bottom: 8px; }
  .sv-mute span { display: none; }
}
@media (min-width: 768px) {
  .sv-end, .sv-heart { } 
  .sv-sheet { align-items: center; } .sv-sheet-in { border-radius: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .sv-hint-arrow, .sv-heart.on, .sv-like.pop svg, .sv-ended .sv-end-bar { animation: none; }
  .sv-prog i { transition: none; }
}
