/* Shop TV · iOS 端样式：触屏优先，深色观影主题，适配刘海与底部安全区 */
:root {
  --bg: #0d1017;
  --bg2: #121722;
  --card: #1a202d;
  --card2: #222a3a;
  --line: rgba(255, 255, 255, .08);
  --tx: #f2f5fb;
  --tx2: #9aa5ba;
  --tx3: #6b768c;
  --accent: #6c7bff;
  --accent2: #8f7bff;
  --live: #ff5c7a;
  --ok: #35c98a;
  --top-h: 52px;
  --tab-h: 58px;
  /* 海报统一规格：全站所有海报（横滑 / 网格 / 详情 / 缓存页）
     都用同一个宽度和同一个宽高比，视觉上完全一致。 */
  --poster-w: 108px;
  --poster-ar: 2 / 3;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--bg); color: var(--tx);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC",
               "Helvetica Neue", "Microsoft YaHei", sans-serif;
  font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
body { -webkit-user-select: none; user-select: none; }
input { -webkit-user-select: text; user-select: text; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor;
      stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hidden { display: none !important; }

/* ---------------------------------------------------------- 顶栏 */
.topbar {
  position: fixed; left: 0; right: 0; top: 0; z-index: 30;
  height: calc(var(--top-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 16px 0;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(13, 16, 23, .82);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 9px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; font-size: 12px; font-weight: 800; letter-spacing: -.4px;
}
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: -.3px; }
.top-actions { display: flex; gap: 4px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; color: var(--tx2);
}
.icon-btn:active { background: var(--card2); color: var(--tx); }

/* ---------------------------------------------------------- 安装提示 */
.install-tip {
  position: fixed; z-index: 29; left: 12px; right: 12px;
  top: calc(var(--top-h) + env(safe-area-inset-top) + 10px);
  padding: 12px 12px 12px 14px; border-radius: 14px;
  background: linear-gradient(135deg, #242c52, #2a2447);
  border: 1px solid rgba(140, 150, 255, .3);
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.it-tx { flex: 1; min-width: 0; }
.it-tx b { display: block; font-size: 14px; }
.it-tx span { display: block; font-size: 12px; color: #c3c9e6; margin-top: 2px; }
.it-close { width: 32px; height: 32px; display: grid; place-items: center; color: #c3c9e6; }
.it-close svg { width: 17px; height: 17px; }

/* ---------------------------------------------------------- 页面 / 底栏 */
#main {
  position: fixed; inset: 0;
  padding-top: calc(var(--top-h) + env(safe-area-inset-top));
  padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom));
  overflow: hidden;
}
.page {
  display: none; height: 100%; overflow-y: auto;
  -webkit-overflow-scrolling: touch; padding: 14px 16px 24px;
}
.page.active { display: block; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: flex; align-items: stretch;
  background: rgba(16, 20, 29, .9);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
}
.tab {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  color: var(--tx3); font-size: 10px;
}
.tab svg { width: 22px; height: 22px; }
.tab.active { color: var(--accent); }
.tab:active { opacity: .7; }

/* ---------------------------------------------------------- 通用区块 */
.sec { margin-bottom: 22px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.sec-title { font-size: 17px; font-weight: 700; letter-spacing: -.3px; }
.sec-sub { font-size: 12px; color: var(--tx3); }
.hero {
  position: relative; height: 190px; border-radius: 18px; overflow: hidden;
  background: linear-gradient(120deg, #1d2440, #2b2145 60%, #3a2340);
  margin-bottom: 22px; border: 1px solid var(--line);
}
.hero-in { position: absolute; inset: 0; display: flex; flex-direction: column;
           justify-content: flex-end; padding: 16px; }
.hero-tag {
  align-self: flex-start; display: flex; align-items: center; gap: 6px;
  padding: 4px 9px; border-radius: 20px; margin-bottom: 8px;
  background: rgba(255, 92, 122, .18); color: #ff9db0;
  font-size: 11px; font-weight: 700; letter-spacing: .6px;
}
.hero-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--live);
            box-shadow: 0 0 8px var(--live); }
.hero-name { font-size: 22px; font-weight: 800; letter-spacing: -.6px; }
.hero-sub { font-size: 12px; color: #b9c0d8; margin-top: 2px; }
.hero-play {
  position: absolute; right: 16px; bottom: 16px;
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  display: grid; place-items: center; color: #fff;
}
.hero-play svg { width: 22px; height: 22px; margin-left: 2px; }
.hero:active .hero-play { background: rgba(255, 255, 255, .3); }

/* 横向滑动片单 */
.hscroll {
  display: flex; gap: 11px; overflow-x: auto; padding: 2px 16px 6px;
  margin: 0 -16px; scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.hscroll::-webkit-scrollbar { display: none; }
.poster {
  flex: 0 0 var(--poster-w); width: var(--poster-w); scroll-snap-align: start;
  position: relative; min-width: 0;
}
/* 海报框：固定宽高比 + overflow hidden，
   任何比例的源图都被裁成同一个形状，绝不会大小不一。 */
.poster-img {
  width: 100%; aspect-ratio: var(--poster-ar); border-radius: 11px;
  background: var(--card2) center/cover no-repeat;
  border: 1px solid var(--line); overflow: hidden;
  display: grid; place-items: center; color: var(--tx3);
  font-size: 28px; font-weight: 700;
}
/* 图没加载出来时（onerror 移除了 img），占位文字要居中且不撑破框 */
.poster-img > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis;
                    white-space: nowrap; }
.poster-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.poster-title {
  font-size: 12.5px; font-weight: 600; margin-top: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.poster-sub { font-size: 11px; color: var(--tx3); white-space: nowrap;
              overflow: hidden; text-overflow: ellipsis; }
.rating {
  position: absolute; top: 6px; left: 6px; z-index: 2;
  padding: 2px 6px; border-radius: 6px; font-size: 10px; font-weight: 700;
  background: rgba(0, 0, 0, .62); color: #ffd479;
}
.live-badge {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  padding: 2px 6px; border-radius: 6px; font-size: 9px; font-weight: 800;
  background: var(--live); color: #fff; letter-spacing: .5px;
}
.poster:active .poster-img { opacity: .75; }

/* 网格
   minmax(0, 1fr) 而不是 1fr ——
   1fr 的最小尺寸是 auto（内容最小宽度），片名一长（「小丑回魂：德里故事」）
   就会把所在列撑到 198px，三列变成 87px / 198px / 97px，海报大小立刻参差。
   minmax(0, 1fr) 把列宽死死钉在等分上，片名再长也只在自己的格子里省略。 */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 11px; }
.grid .poster { width: 100%; flex: none; min-width: 0; }
.grid .poster-img { width: 100%; aspect-ratio: var(--poster-ar); }

/* 分段 / 标签 */
.segmented {
  display: flex; gap: 4px; padding: 4px; border-radius: 13px;
  background: var(--card); margin-bottom: 14px; overflow-x: auto;
  scrollbar-width: none;
}
.segmented::-webkit-scrollbar { display: none; }
.seg {
  flex: 1; min-width: 66px; padding: 8px 6px; border-radius: 10px;
  font-size: 13px; font-weight: 600; color: var(--tx2); text-align: center;
  white-space: nowrap;
}
.seg.active { background: var(--accent); color: #fff; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 7px 13px; border-radius: 20px; background: var(--card);
  color: var(--tx2); font-size: 12.5px; border: 1px solid var(--line);
  white-space: nowrap;
}
.chip.active { background: rgba(108, 123, 255, .18); color: #b9c1ff;
               border-color: rgba(108, 123, 255, .5); }

/* 搜索框 */
.searchbar { display: flex; align-items: center; gap: 9px; padding: 0 12px;
             height: 44px; border-radius: 13px; background: var(--card);
             border: 1px solid var(--line); margin-bottom: 14px; }
.searchbar svg { width: 18px; height: 18px; color: var(--tx3); flex: none; }
.searchbar input {
  flex: 1; min-width: 0; border: 0; outline: none; background: none;
  color: var(--tx); font-size: 15px; -webkit-appearance: none;
}
.searchbar input::placeholder { color: var(--tx3); }
.searchbar .clear { width: 28px; height: 28px; display: grid; place-items: center;
                    color: var(--tx3); }
.searchbar .clear svg { width: 15px; height: 15px; }

/* 直播列表 */
.live-groups { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 14px;
               padding: 0 16px 4px; scrollbar-width: none; }
.live-groups::-webkit-scrollbar { display: none; }
.live-list { display: flex; flex-direction: column; gap: 8px; }
.live-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: 13px; background: var(--card); border: 1px solid var(--line);
  min-height: 62px;
}
.live-item:active { background: var(--card2); }
.li-logo {
  width: 46px; height: 46px; flex: none; border-radius: 10px;
  background: var(--card2); display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: var(--tx2); overflow: hidden;
  border: 1px solid var(--line);
}
.li-logo img { width: 100%; height: 100%; object-fit: contain; }
.li-tx { flex: 1; min-width: 0; }
.li-name { font-size: 14px; font-weight: 600; white-space: nowrap;
           overflow: hidden; text-overflow: ellipsis; }
.li-sub { font-size: 11px; color: var(--tx3); margin-top: 2px; }
.li-state { font-size: 10px; padding: 3px 7px; border-radius: 8px; flex: none; }
.li-state.ok { background: rgba(53, 201, 138, .13); color: var(--ok); }
.li-state.no { background: rgba(255, 255, 255, .06); color: var(--tx3); }
.li-play { color: var(--accent); flex: none; }
.li-play svg { width: 18px; height: 18px; }

/* 我的页 */
.mine-row {
  display: flex; align-items: center; gap: 12px; padding: 14px 4px;
  border-bottom: 1px solid var(--line); font-size: 14px;
}
.mine-row svg { width: 19px; height: 19px; color: var(--tx2); }
.mine-row .mr-tx { flex: 1; }
.mine-row .mr-val { color: var(--tx3); font-size: 12px; }
.mine-row:active { opacity: .7; }

/* ---------------------------------------------------------- 缓存（下载到 NAS）
   卡片结构与海报区完全一致：同样的宽度、同样的宽高比，
   这样「我的缓存」和「影视」里的海报看起来是一套的。 */
.cache-card { position: relative; min-width: 0; }
.cache-wrap { position: relative; }
.cache-state {
  position: absolute; left: 6px; bottom: 6px; z-index: 3;
  padding: 2px 7px; border-radius: 6px; font-size: 10px; font-weight: 700;
  background: rgba(0, 0, 0, .68); color: var(--tx2);
}
.cache-state.done { color: var(--ok); }
.cache-state.ing { color: #ffd479; }
.cache-del {
  position: absolute; top: 6px; right: 6px; z-index: 3;
  width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center; color: #fff;
  background: rgba(0, 0, 0, .55);
  border: 1px solid rgba(255, 255, 255, .18);
}
.cache-del svg { width: 14px; height: 14px; }
.cache-del:active { background: rgba(220, 60, 80, .8); }
.cache-card:active .poster-img { opacity: .75; }

/* 下载按钮（详情页 / 选集面板） */
.dl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; padding: 0 16px; border-radius: 13px;
  background: var(--card2); color: var(--tx); font-size: 14px; font-weight: 600;
  border: 1px solid var(--line);
}
.dl-btn svg { width: 18px; height: 18px; }
.dl-btn:active { opacity: .8; }
.dl-btn.busy { opacity: .6; }

/* 选集列表：勾选框 + 集号 + 标题 */
.eps { display: flex; flex-direction: column; gap: 6px; }
.ep-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 11px;
  background: var(--card2); border: 1px solid var(--line);
}
.ep-row:active { opacity: .85; }
.ep-check { display: flex; align-items: center; padding: 2px; flex: none; }
.ep-chk { position: absolute; opacity: 0; width: 0; height: 0; }
.ep-chk-box {
  width: 21px; height: 21px; border-radius: 7px;
  border: 1.6px solid var(--line); background: rgba(255, 255, 255, .05);
  display: grid; place-items: center; color: transparent;
  transition: background .14s, border-color .14s, color .14s;
}
.ep-chk-box svg { width: 13px; height: 13px; }
.ep-chk:checked + .ep-chk-box {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.ep-name {
  flex: 1; min-width: 0; font-size: 13px; color: var(--tx2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ep-done {
  flex: none; width: 16px; height: 16px; border-radius: 50%;
  display: grid; place-items: center; color: var(--ok);
}
.ep-done.on { background: rgba(53, 201, 138, .16); }
.ep-done.on::after {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok);
}

/* 底部操作条：全选 + 下载选中 */
.ep-bar {
  display: flex; align-items: center; gap: 10px;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--line);
}
.ep-bar-all {
  flex: none; padding: 10px 14px; border-radius: 11px;
  background: var(--card2); color: var(--tx2);
  font-size: 13px; font-weight: 600; border: 1px solid var(--line);
}
.ep-bar-all:active { opacity: .8; }
.ep-bar-dl {
  flex: 1; display: inline-flex; align-items: center; justify-content: center;
  gap: 7px; min-height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; font-size: 14px; font-weight: 600; border: none;
}
.ep-bar-dl svg { width: 18px; height: 18px; }
.ep-bar-dl:disabled { opacity: .4; }
.ep-bar-dl:active:not(:disabled) { opacity: .85; }
.ep-bar-dl.busy { opacity: .6; }

.ep { position: relative; }

/* 状态占位 */
.loading, .empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; min-height: 180px; color: var(--tx3); font-size: 13px; text-align: center;
}
.spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .14);
  border-top-color: var(--accent); animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.retry { padding: 8px 16px; border-radius: 10px; background: var(--card2);
         color: var(--tx); font-size: 13px; }

/* ---------------------------------------------------------- 底部弹出面板 */
.overlay { position: fixed; inset: 0; z-index: 60; }
.sheet-mask { position: absolute; inset: 0; background: rgba(0, 0, 0, .6);
              -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: 86vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 10px 18px calc(24px + env(safe-area-inset-bottom));
  background: #151a26; border-radius: 22px 22px 0 0;
  border-top: 1px solid var(--line);
  box-shadow: 0 -14px 40px rgba(0, 0, 0, .45);
  animation: sheetUp .24s ease-out;
}
@keyframes sheetUp { from { transform: translateY(30px); opacity: .5; } }
.sheet-grab { width: 38px; height: 4px; border-radius: 3px; background: #3a4357;
              margin: 2px auto 14px; }
.sheet-close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px;
               border-radius: 50%; background: rgba(255, 255, 255, .08);
               display: grid; place-items: center; color: var(--tx2); }
.sheet-close svg { width: 17px; height: 17px; }

.dt-head { display: flex; gap: 14px; margin-bottom: 16px; padding-right: 30px; }
.dt-poster {
  width: 96px; aspect-ratio: var(--poster-ar); flex: none; border-radius: 12px;
  background: var(--card2) center/cover no-repeat; border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--tx3); font-size: 26px; font-weight: 700;
  overflow: hidden;
}
.dt-info { flex: 1; min-width: 0; padding-top: 2px; }
.dt-title { font-size: 19px; font-weight: 800; letter-spacing: -.4px; line-height: 1.3; }
.dt-meta { font-size: 12px; color: var(--accent); margin-top: 6px; }
.dt-desc { font-size: 12px; color: var(--tx2); margin-top: 8px;
           display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
           overflow: hidden; line-height: 1.55; }
.dt-actions { display: flex; gap: 10px; margin-bottom: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; padding: 0 18px; border-radius: 13px;
  background: var(--card2); color: var(--tx); font-size: 14px; font-weight: 600;
  border: 1px solid var(--line);
}
.btn svg { width: 18px; height: 18px; }
.btn.primary { flex: 1; background: linear-gradient(135deg, var(--accent), var(--accent2));
               border-color: transparent; color: #fff; }
.btn:active { opacity: .82; }
.dt-status { font-size: 12px; color: var(--tx3); margin-bottom: 14px; }
.dt-status.err { color: #ff8a9f; }
.dt-status.ok { color: var(--ok); }
.dt-section { margin-top: 16px; }
.dt-sec-title { font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.dt-sec-title span { font-size: 11px; color: var(--tx3); font-weight: 400; margin-left: 4px; }
/* 选集容器：改成纵向列表（勾选框 + 集号 + 标题） */
.eps { display: flex; flex-direction: column; gap: 6px; }
.ep {
  flex: none; min-width: 42px; min-height: 38px; padding: 0 12px;
  border-radius: 10px; background: var(--card);
  display: grid; place-items: center; font-size: 13px; color: var(--tx2);
  border: 1px solid var(--line);
}
.ep.active { background: var(--accent); color: #fff; border-color: transparent; }

/* ---------------------------------------------------------- 播放器 */
.player { position: fixed; inset: 0; z-index: 80; background: #000; }
.pl-bg { position: absolute; inset: 0; background: #000; }
#video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; background: #000;
}
.pl-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 4;
  padding: calc(env(safe-area-inset-top) + 10px) 12px 10px;
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .78), transparent);
}
.pl-title { flex: 1; min-width: 0; font-size: 14px; font-weight: 600;
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-top-right { display: flex; gap: 4px; }
.pl-btn { width: 40px; height: 40px; border-radius: 12px;
          display: grid; place-items: center; color: #fff;
          background: rgba(255, 255, 255, .12); }
.pl-btn:active { background: rgba(255, 255, 255, .26); }
.pl-tools {
  position: absolute; z-index: 4; left: 0; right: 0;
  bottom: calc(env(safe-area-inset-bottom) + 76px);
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
  padding: 0 12px; pointer-events: none;
}
.pl-tool {
  pointer-events: auto; display: flex; align-items: center; gap: 6px;
  padding: 9px 13px; border-radius: 22px; font-size: 12px; font-weight: 600;
  color: #fff; background: rgba(20, 22, 30, .72);
  border: 1px solid rgba(255, 255, 255, .15);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.pl-tool svg { width: 16px; height: 16px; }
.pl-tool:active { background: rgba(60, 66, 90, .85); }
.pl-loading {
  position: absolute; z-index: 3; inset: 0; display: flex;
  flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  color: #cfd6e8; font-size: 13px; pointer-events: none;
}
.pl-error {
  position: absolute; z-index: 5; inset: 0; display: flex;
  flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: rgba(0, 0, 0, .82); padding: 30px; text-align: center;
}
.ple-title { font-size: 18px; font-weight: 700; }
.ple-sub { font-size: 13px; color: var(--tx2); max-width: 320px; }
.pl-panel {
  position: absolute; z-index: 6; left: 0; right: 0; bottom: 0;
  max-height: 56vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 14px 16px calc(20px + env(safe-area-inset-bottom));
  background: rgba(21, 26, 38, .97); border-radius: 20px 20px 0 0;
  border-top: 1px solid var(--line);
}
.plp-head { display: flex; align-items: center; justify-content: space-between;
            font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.plp-body .eps { grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); }
.src-row { padding: 13px 4px; border-bottom: 1px solid var(--line);
           font-size: 14px; display: flex; align-items: center; gap: 10px; }
.src-row .sr-tx { flex: 1; }
.src-row .sr-tag { font-size: 11px; color: var(--tx3); }
.src-row.active { color: var(--accent); }

/* ---------------------------------------------------------- 设置 */
.st-title { font-size: 19px; font-weight: 800; margin: 4px 0 18px; }
.st-item { margin-bottom: 18px; }
.st-label { font-size: 12px; color: var(--tx3); margin-bottom: 6px; }
.st-value { font-size: 14px; word-break: break-all; color: var(--tx); }
.st-hint { font-size: 11.5px; color: var(--tx3); margin-top: 6px; line-height: 1.5; }
.st-input {
  width: 100%; height: 44px; padding: 0 12px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line);
  color: var(--tx); font-size: 14px; outline: none;
}
.st-input:focus { border-color: var(--accent); }
.st-btns { display: flex; gap: 10px; }
.st-btns .btn { flex: 1; }
.st-state { font-size: 12px; color: var(--tx3); margin-top: 14px; }

/* ---------------------------------------------------------- Toast */
.toast {
  position: fixed; z-index: 100; left: 50%; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 22px);
  transform: translateX(-50%) translateY(12px);
  max-width: 82vw; padding: 10px 18px; border-radius: 22px;
  background: rgba(28, 34, 48, .96); color: #fff; font-size: 13px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, .4);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* iPad / 横屏 */
@media (min-width: 700px) {
  :root { --poster-w: 130px; }
  .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
  .hero { height: 250px; }
  .poster { flex-basis: var(--poster-w); width: var(--poster-w); }
  .poster-img { width: 100%; aspect-ratio: var(--poster-ar); }
  .sheet { left: 50%; right: auto; width: 620px; transform: translateX(-50%);
           border-radius: 22px 22px 0 0; }
  .dt-poster { width: 120px; aspect-ratio: var(--poster-ar); }
  .page { padding-left: 24px; padding-right: 24px; }
  .hscroll { margin: 0 -24px; padding-left: 24px; padding-right: 24px; }
}
