/* 前台样式:设计 token 对齐"造界 · AI 游戏工坊"(src/web/styles.css)的纸感体系——暖白画布、暖橙主色、深色顶栏、
   克制圆角。颜色、圆角、间距集中在 :root,改风格只需要改这里。 */
:root {
  color-scheme: light;
  --bg: #f4f1e9;            /* canvas */
  --bg-2: #ece7dc;          /* canvas-deep */
  --panel: #fbfaf6;         /* surface */
  --panel-2: #ffffff;       /* surface-raised */
  --dark: #101714;          /* surface-dark:顶栏 */
  --dark-2: #17211d;        /* surface-dark-raised */
  --line: #d8d3c8;          /* border */
  --line-strong: #bbb7ad;
  --text: #171b18;
  --muted: #59615c;         /* text-muted */
  --subtle: #737c76;        /* text-subtle */
  --accent: #d65d35;        /* primary */
  --accent-2: #b84a27;      /* primary-hover */
  --accent-tint: #fae8df;   /* primary-tint */
  --ok-tint: #e8f3ed;       /* success-bg */
  --on-accent: #ffffff;
  --lime: #d65d35;          /* 旧样式里的"强调色"统一映射到主色 */
  --ok: #237958;
  --warn: #8a5e17;
  --bad: #a83b32;
  --radius: 18px;           /* radius-lg */
  --radius-sm: 10px;        /* radius-md */
  --rail: 186px;
  --top: 64px;
  --shadow: 0 24px 64px rgba(63, 54, 41, 0.12);   /* shadow-raised */
}
* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.6 "Segoe UI Variable Text", "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- 顶栏 ---------- */
.topbar { position: sticky; top: 0; z-index: 30; height: var(--top); display: flex; align-items: center; gap: 14px; padding: 0 18px; background: var(--dark); backdrop-filter: blur(12px); border-bottom: 1px solid var(--dark-2); color: #edf2ee; }
.topbar .search { background: var(--dark-2); color: #a5b0aa; }
.topbar .search:focus-within { background: #22302a; color: #edf2ee; border-color: var(--accent); }
.topbar .search input { color: #edf2ee; }
.topbar .search input::placeholder { color: #a5b0aa; }
.topbar .pill { background: var(--dark-2); border-color: #33423b; color: #edf2ee; }
.topbar .pill:hover { background: #22302a; border-color: #46534d; }
.topbar .pill.lime { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.topbar .pill.lime:hover { background: var(--accent-2); }
.topbar .icon-btn { color: #a5b0aa; }
.topbar .icon-btn:hover { background: var(--dark-2); color: #edf2ee; }
.topbar .who { color: #a5b0aa; }
/* 顶栏的名字是"我的主页"的入口,得看得出能点 */
.topbar .who:hover { color: #edf2ee; text-decoration: underline; }
.topbar .brand { color: #edf2ee; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: 0.2px; white-space: nowrap; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: #2c3a33; color: #f4f1e9; font-family: "楷体", "KaiTi", "STKaiti", serif; font-size: 18px; font-weight: 700; box-shadow: inset 0 0 0 1px #46534d; }
.brand-mark::before { content: "界"; }
.search { flex: 1; max-width: 520px; margin: 0 auto; display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 16px; border-radius: 999px; background: var(--panel); border: 1px solid transparent; color: var(--muted); transition: border-color 0.15s, background 0.15s; }
.search:focus-within { border-color: var(--accent); background: var(--panel-2); color: var(--text); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; }
.search input::placeholder { color: var(--muted); }
.top-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.pill { height: 38px; padding: 0 16px; display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-weight: 600; font-size: 14px; transition: background 0.15s, border-color 0.15s; white-space: nowrap; }
.pill:hover { background: var(--bg-2); border-color: var(--line-strong); }
.pill.lime { background: var(--lime); color: #17200a; border-color: transparent; }
.pill.lime:hover { background: var(--accent-2); }
.pill.ghost { background: transparent; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: transparent; border: 0; color: var(--muted); }
.icon-btn:hover { background: var(--panel); color: var(--text); }
.menu-toggle { display: none; }
.who { color: var(--muted); font-size: 13px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }

/* ---------- 布局 ---------- */
.shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: calc(100vh - var(--top)); }
/* 分类从 5 个变成 13 个游戏类型,导航改成"色点 + 名称 + 款数"的横排列表,竖排图标放不下 */
.rail { position: sticky; top: var(--top); align-self: start; height: calc(100vh - var(--top)); padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--line); overflow-y: auto; scrollbar-width: thin; }
.rail a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; color: var(--muted); font-size: 13px; font-weight: 600; text-align: left; transition: background 0.15s, color 0.15s; }
.rail a svg { width: 18px; height: 18px; flex: 0 0 auto; }
.rail a:hover { background: var(--panel); color: var(--text); }
.rail a.active { background: var(--accent-tint); color: var(--accent-2); }
.rail .sep { height: 1px; background: var(--line); margin: 10px 4px; flex: 0 0 auto; }
/* 分类色点与右侧计数:计数没取到之前整块隐藏,避免出现一个空括号 */
.catdot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.catn { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.rail a.active .catn { color: var(--accent-2); }
/* 投稿表单里的分类多选 */
.catpick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.cat-chip { border: 1px solid var(--line); background: var(--panel); color: var(--muted); border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 600; cursor: pointer; transition: border-color 0.15s, background 0.15s, color 0.15s; }
.cat-chip:hover { color: var(--text); }
.cat-chip.on { border-color: var(--text); background: var(--text); color: var(--bg); }
/* 智造草稿在提交审核页的"改编自原作"出处行 */
.basedon { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 10px; background: var(--panel); font-size: 13px; }
.basedon .basedon-label { color: var(--muted); flex: 0 0 auto; }
.basedon a { color: var(--accent-2); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.basedon[hidden] { display: none; }
.main { padding: 22px 26px 64px; min-width: 0; }
.scrim { display: none; }

/* ---------- 分类横幅 ---------- */
.chips { display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 14px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; min-width: 150px; height: 84px; padding: 14px 16px; border-radius: var(--radius); display: flex; align-items: flex-end; font-weight: 800; font-size: 15px; border: 1px solid transparent; transition: transform 0.15s, border-color 0.15s; position: relative; overflow: hidden; }
.chip::after { content: ""; position: absolute; right: -14px; top: -14px; width: 70px; height: 70px; border-radius: 50%; background: rgba(255, 255, 255, 0.22); }
.chip:hover { transform: translateY(-2px); }
.chip.active { border-color: var(--text); box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text); }
/* 分类横幅:参考站的暖色系,避免彩虹式渐变 */
.chip.c0 { background: linear-gradient(135deg, #d65d35, #b84a27); color: #fff8f2; }
.chip.c1 { background: linear-gradient(135deg, #2f6b5a, #1f4a3e); color: #e9f6f0; }
.chip.c2 { background: linear-gradient(135deg, #b78a2e, #8a5e17); color: #fff6e0; }
.chip.c3 { background: linear-gradient(135deg, #3c5e8a, #26405f); color: #e8f0fb; }
.chip.c4 { background: linear-gradient(135deg, #6b7f3a, #4a5a25); color: #f4f8e8; }
.chip.c5 { background: linear-gradient(135deg, #7a4f6e, #55344b); color: #f7ecf4; }

/* ---------- 区块标题 ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 0 14px; gap: 12px; }
.section-head h2 { margin: 0; font-size: 20px; font-weight: 800; }
.section-head .meta { color: var(--muted); font-size: 13px; }
/* 推荐分区标题右侧的「查看全部 N 款」入口 */
.more-link { flex: none; color: var(--accent-2); font-size: 13px; font-weight: 700; white-space: nowrap; }
.more-link:hover { text-decoration: underline; }

/* ---------- 封面墙:大小混排 ---------- */
.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); grid-auto-flow: dense; grid-auto-rows: auto; gap: 14px; }

/* 加载骨架:先撑住版式,别让一行"加载中…"孤零零挂在空白页上 */
.tile.skel { background: linear-gradient(100deg, var(--panel) 20%, var(--panel-2) 40%, var(--panel) 60%); background-size: 220% 100%; box-shadow: none; animation: skel 1.2s linear infinite; }
@keyframes skel { from { background-position: 140% 0; } to { background-position: -40% 0; } }
@media (prefers-reduced-motion: reduce) { .tile.skel { animation: none; } }
.load-note { margin: 14px 2px 0; color: var(--muted); font-size: 13px; }
.tile { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--panel); isolation: isolate; box-shadow: 0 0 0 1px var(--line) inset; transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.18s; }
.tile.big { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.tile img, .tile .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s; }
.tile .ph { display: grid; place-items: center; color: var(--muted); font-size: 13px; background: linear-gradient(135deg, var(--panel-2), var(--panel)); }
.tile:hover { transform: translateY(-4px) scale(1.015); box-shadow: var(--shadow), 0 0 0 2px var(--accent) inset; z-index: 2; }
.tile:hover img { transform: scale(1.06); }
/* 名称叠在封面上:封面可能是深色、浅色或花哨的,所以不能依赖封面颜色。
   做法:底部固定一层足够深的渐变遮罩(浅色封面上也能把文字托住),标题固定白色,再加双层阴影兜底。 */
.tile .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 48px 12px 10px; background: linear-gradient(to top, rgba(10, 15, 13, 0.94) 0%, rgba(10, 15, 13, 0.86) 45%, rgba(10, 15, 13, 0.45) 75%, rgba(10, 15, 13, 0) 100%); transform: translateY(35%); opacity: 0.0; transition: transform 0.2s, opacity 0.2s; z-index: 1; }
.tile:hover .cap, .tile:focus-visible .cap, .tile.big .cap { transform: none; opacity: 1; }
.tile .cap b { display: block; color: #ffffff; font-size: 14px; line-height: 1.25; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85), 0 0 8px rgba(0, 0, 0, 0.55); }
.tile .cap span { display: block; margin-top: 2px; color: #e6e2d8; font-size: 12px; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8); }
.tile.big .cap b { font-size: 20px; }
.tile.big .cap { padding-top: 70px; }
.tile .play-btn { position: absolute; right: 12px; top: 12px; z-index: 1; padding: 6px 12px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 12px; opacity: 0; transform: translateY(-4px); transition: opacity 0.2s, transform 0.2s; }
.tile:hover .play-btn, .tile:focus-visible .play-btn { opacity: 1; transform: none; }
.tile .kicker { position: absolute; left: 12px; top: 12px; z-index: 1; padding: 4px 10px; border-radius: 999px; background: rgba(16, 23, 20, 0.78); backdrop-filter: blur(6px); font-size: 11px; font-weight: 800; letter-spacing: 0.4px; color: #fbd9c8; }
.tile .badge { position: absolute; left: 10px; top: 10px; z-index: 1; }

/* ---------- 徽标 / 通用 ---------- */
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid currentColor; background: var(--panel-2); }
.badge.draft { color: var(--muted); }
.badge.pending { color: var(--warn); }
.badge.approved { color: var(--ok); }
.badge.rejected { color: var(--bad); }
.badge.verdict-pass { color: var(--ok); }
.badge.verdict-warn { color: var(--warn); }
.badge.verdict-fail { color: var(--bad); }
.meta { color: var(--muted); font-size: 13px; }
.empty { color: var(--muted); padding: 64px 0; text-align: center; }
.error { color: var(--bad); font-size: 13px; min-height: 18px; }
.pager { display: flex; gap: 12px; justify-content: center; align-items: center; margin-top: 28px; }
.btn { height: 40px; padding: 0 18px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--panel-2); color: var(--text); font-weight: 700; display: inline-flex; align-items: center; gap: 8px; transition: background 0.15s, border-color 0.15s; }
.btn:hover:not(:disabled) { background: var(--bg-2); border-color: var(--line-strong); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.btn.primary:hover:not(:disabled) { background: var(--accent-2); }
.btn.lime { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.btn.lime:hover:not(:disabled) { background: var(--accent-2); }
.btn.danger { background: transparent; color: var(--bad); border-color: rgba(168, 59, 50, 0.45); }
.btn.danger:hover:not(:disabled) { background: rgba(168, 59, 50, 0.08); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 10px; }

/* ---------- 播放页 ---------- */
.play { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.stage-wrap { min-width: 0; }
.stage { height: min(72vh, 720px); min-height: 380px; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow), 0 0 0 1px var(--line); }
.stage iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.stage .poster { width: 100%; height: 100%; object-fit: cover; display: block; }
.stage .noplay { height: 100%; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--muted); background: var(--panel); }
.stage-bar { display: flex; align-items: center; gap: 12px; padding: 12px 4px; flex-wrap: wrap; }
.stage-bar h1 { margin: 0; font-size: 22px; font-weight: 800; flex: 1 1 200px; min-width: 0; }
.stage-bar .tools { display: flex; gap: 8px; }
.about { margin-top: 8px; padding: 20px 22px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.about h2 { margin: 0 0 8px; font-size: 16px; }
.about p { margin: 0 0 10px; white-space: pre-wrap; color: var(--text); }
.about .howto { color: var(--muted); font-size: 14px; }
.side { display: grid; gap: 18px; min-width: 0; }
.card { padding: 18px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.card h3 { margin: 0 0 12px; font-size: 14px; color: var(--muted); font-weight: 700; letter-spacing: 0.3px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.mini { display: grid; gap: 10px; }
.mini a { display: flex; gap: 12px; align-items: center; padding: 6px; border-radius: 12px; transition: background 0.15s; }
.mini a:hover { background: var(--panel-2); }
.mini img, .mini .ph { width: 76px; aspect-ratio: 4 / 3; border-radius: 10px; object-fit: cover; flex: none; background: var(--panel-2); }
.mini b { display: block; font-size: 14px; line-height: 1.3; }

/* 游玩档案(个人页顶部,只读)。三个数字并排,是 1-b 唯一"看得见在动"的东西,
   所以字号故意比正文大一档:玩家扫一眼就知道今天玩了多久、几局、几款。 */
.pstats { margin-bottom: 18px; }
.pstats h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pstats-day { font-weight: 600; font-size: 12px; color: var(--subtle); letter-spacing: 0; }
.pstats-row { display: flex; gap: 26px; margin: 0 0 2px; }
.pstats-row > div { display: grid; gap: 2px; }
.pstats-row b { font-size: 24px; line-height: 1.1; font-weight: 800; font-variant-numeric: tabular-nums; }
.pstats-row span { color: var(--muted); font-size: 12px; }
.pstats-sub { margin: 14px 0 6px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0.3px; }
.pstats-best { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.pstats-best li { display: flex; align-items: baseline; gap: 10px; }
.pstats-best a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.pstats-best a:hover { color: var(--accent-2); }
.pstats-best .meta { flex: none; }
.pstats-best b { flex: none; font-variant-numeric: tabular-nums; }
.pstats-note { margin: 12px 0 0; font-size: 12px; }
/* 积分卡(2026-11-01 充值送积分/积分加购智造次数) */
.pt-actions { margin: 10px 0 4px; display: flex; gap: 10px; align-items: center; }
.pt-txs li span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-plus { color: var(--accent-2); }
.pt-minus { color: #c62828; }

/* 详情页「这一款可以改什么」:三段式只读说明。颜色沿用站点已有的语义色 ——
   现在能改=绿(ok)、正在建=柔和灰(还没法用,不该用醒目色骗人点)、不会改=更暗的灰。 */
.defcard .def-sec { margin: 0 0 12px; }
.defcard .def-sec:last-of-type { margin-bottom: 0; }
.defcard .def-sec > b { display: block; margin: 0 0 5px; font-size: 12px; font-weight: 700; letter-spacing: 0.3px; }
.defcard .def-sec.now > b { color: var(--ok, #3ecf8e); }
.defcard .def-sec.soon > b { color: var(--muted); }
.defcard .def-sec.fixed > b { color: var(--subtle); }
.defcard .def-sec ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.defcard .def-sec li { padding: 3px 10px; border-radius: 999px; font-size: 13px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); }
.defcard .def-sec.fixed li { color: var(--subtle); }
.defcard .def-note { margin: 12px 0 0; font-size: 12px; }

/* ---------- 表单 / 面板 ---------- */
.narrow { max-width: 760px; margin: 0 auto; }
h1.page { margin: 4px 0 18px; font-size: 26px; font-weight: 800; }
/* 页面内的小节标题(比如"我的投稿")—— 比 h1 小一号,只做分区 */
h2.page-sub { margin: 20px 0 10px; font-size: 15px; font-weight: 700; color: var(--muted); }
.panel { padding: 22px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
form.stack { display: grid; gap: 16px; }
label.field { display: grid; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 600; }
input[type="text"], input[type="email"], input[type="password"], input[type="url"], input:not([type]), select, textarea { width: 100%; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; color: var(--text); transition: border-color 0.15s; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--accent); }
textarea { min-height: 120px; resize: vertical; }
.auth { max-width: 420px; margin: 40px auto; }
.oauth-box { display: grid; gap: 10px; margin-bottom: 4px; }
.oauth-box[hidden] { display: none; }
.oauth-btn { display: flex; align-items: center; justify-content: center; gap: 10px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); font-weight: 700; cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.oauth-btn:hover:not(:disabled) { background: var(--bg-2); border-color: var(--line-strong); }
.oauth-btn:disabled { opacity: 0.5; cursor: default; }
.oauth-sep { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 6px 0 2px; }
.oauth-sep::before, .oauth-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth .alt { margin-top: 14px; text-align: center; }
.auth .alt a { color: var(--accent-2); }

.flow { display: grid; gap: 22px; }
.flow h2 { margin: 0 0 10px; font-size: 17px; }
.drop { display: grid; gap: 6px; justify-items: center; text-align: center; padding: 38px 20px; border: 2px dashed var(--line-strong); border-radius: var(--radius); cursor: pointer; background: var(--panel); transition: border-color 0.15s, background 0.15s; }
.drop strong { font-size: 16px; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-tint); }
.drop.busy { opacity: 0.6; pointer-events: none; }
.findings { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 6px; }
.findings li { padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); font-size: 14px; }
.findings li b { margin-right: 6px; font-size: 12px; }
.findings .lv-fail { border-color: rgba(168, 59, 50, 0.6); }
.findings .lv-fail b { color: var(--bad); }
.findings .lv-warn b { color: var(--warn); }
.findings .lv-info b { color: var(--muted); }
.found { margin: 12px 0; padding: 14px 16px; border-radius: 12px; background: var(--ok-tint, #e8f3ed); border: 1px solid rgba(35, 121, 88, 0.3); }
.found h3 { margin: 0 0 6px; font-size: 14px; color: var(--ok); }
.found p { margin: 0 0 8px; color: var(--text); }
.found .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.busy { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.45; } }
.cover-box { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.cover-preview { position: relative; width: 260px; aspect-ratio: 3 / 2; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2) center / contain no-repeat; display: grid; place-items: center; color: var(--muted); font-size: 13px; overflow: hidden; }
.cover-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-actions { display: grid; gap: 8px; justify-items: start; }
.cover-actions .row2 { display: flex; gap: 8px; flex-wrap: wrap; }
.cover-spec { flex-basis: 100%; margin-top: 4px; padding: 12px 14px; border-radius: 12px; background: var(--accent-tint); border: 1px solid rgba(214, 93, 53, 0.3); font-size: 13px; color: var(--text); }
.cover-spec b { color: var(--text); }
.cover-spec ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); }
.cover-spec li { margin: 2px 0; }
.cover-badge { position: absolute; right: 6px; bottom: 6px; padding: 2px 8px; border-radius: 999px; background: rgba(16, 23, 20, 0.78); font-size: 11px; font-weight: 700; }
.cover-badge.warn { color: #ffd58a; }
.cover-badge.ok { color: #b7f0c9; }

/* ---------- 封面编辑器(弹窗) ---------- */
.cropper-modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(5, 5, 10, 0.72); backdrop-filter: blur(4px); }
.cropper-card { width: min(760px, 100%); max-height: calc(100dvh - 32px); overflow: auto; padding: 18px 20px 16px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); }
.cropper-head { display: flex; align-items: center; justify-content: space-between; }
.cropper-head h2 { margin: 0; font-size: 18px; }
.cropper-tip { margin: 6px 0 10px; }
.cropper-stage { position: relative; aspect-ratio: 3 / 2; width: 100%; border-radius: 12px; overflow: hidden; background: #0a0a12; cursor: grab; touch-action: none; user-select: none; border: 1px solid var(--line); }
.cropper-stage.dragging { cursor: grabbing; }
.cropper-stage canvas { width: 100%; height: 100%; display: block; }
/* 首页卡片是 4:3:在 3:2 的取景框里,左右各有 1/16 的宽度会被卡片裁掉。用两条竖带标出来。 */
.cropper-safe { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to right, rgba(0, 0, 0, 0.55) 0, rgba(0, 0, 0, 0.55) 6.25%, transparent 6.25%, transparent 93.75%, rgba(0, 0, 0, 0.55) 93.75%); }
.cropper-safe::before, .cropper-safe::after { content: ""; position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px dashed rgba(214, 93, 53, 0.9); }
.cropper-safe::before { left: 6.25%; } .cropper-safe::after { left: 93.75%; }
.cropper-safe[hidden] { display: none; }
.cropper-hint { position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(16, 23, 20, 0.78); font-size: 11px; color: #e6e2d8; pointer-events: none; }
.cropper-controls { display: grid; gap: 10px; margin-top: 12px; }
.cp-row { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; font-weight: 600; }
.cp-row input[type="range"] { flex: 1; accent-color: var(--accent); }
.cp-row input[type="color"] { width: 44px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: none; cursor: pointer; }
.cp-modes { display: flex; gap: 8px; flex-wrap: wrap; }
.cp-modes .btn.primary { background: var(--accent); }
.cp-check { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; cursor: pointer; }
.cropper-warn { margin-top: 10px; padding: 8px 12px; border-radius: 10px; background: rgba(255, 176, 32, 0.1); border: 1px solid rgba(255, 176, 32, 0.4); color: var(--warn); font-size: 13px; }
.cropper-warn[hidden] { display: none; }
.cropper-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
@media (max-width: 560px) { .cropper-card { padding: 14px 14px 12px; } .cover-preview { width: 100%; } }
.ghost-file { display: inline-flex; align-items: center; height: 40px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); font-weight: 700; cursor: pointer; }
.ghost-file:hover { background: var(--panel-2); }
.rows { display: grid; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row .left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.row .thumb { width: 84px; aspect-ratio: 4 / 3; border-radius: 10px; object-fit: cover; background: var(--panel-2); flex: none; }
.row .title { font-weight: 700; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .right { display: flex; align-items: center; gap: 10px; flex: none; }

/* ---------- 播放页:点赞 / 不喜欢 / 试玩次数 ---------- */
.reacts { display: flex; gap: 10px; flex-wrap: wrap; }
.react { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-weight: 700; font-size: 13px; transition: background 0.15s, border-color 0.15s, color 0.15s; }
.react svg { width: 17px; height: 17px; flex: none; }
.react b { font-variant-numeric: tabular-nums; }
.react:hover:not(:disabled) { background: var(--bg-2); }
.react:disabled { opacity: 0.55; cursor: default; }
.react.like.on { border-color: var(--ok); background: var(--ok-tint); color: var(--ok); }
.react.dislike.on { border-color: var(--bad); background: #f7e6e4; color: var(--bad); }
.react-plays { display: flex; align-items: center; gap: 6px; margin: 12px 0 0; color: var(--muted); font-size: 13px; font-weight: 600; }
.react-plays svg { width: 15px; height: 15px; flex: none; }
.react-hint { margin: 6px 0 0; font-size: 12px; }

.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(10px); background: var(--text); color: var(--panel-2); border: 1px solid var(--text); padding: 11px 20px; border-radius: 12px; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 60; box-shadow: var(--shadow); font-weight: 600; }
.toast.show { opacity: 1; transform: translateX(-50%); }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) { .play { grid-template-columns: 1fr; } .stage { height: min(64vh, 560px); } }
@media (max-width: 860px) {
  :root { --rail: 0px; }
  /* 窄屏只有两列:大图改成横跨两列、保持 16:10,不再占两行,避免把相邻小图压扁 */
  .tile.big { grid-column: span 2; grid-row: auto; aspect-ratio: 16 / 10; }
  .tile.big .cap { padding-top: 48px; }
  .tile.big .cap b { font-size: 17px; }
  .topbar { gap: 8px; padding: 0 10px; }
  .search { min-width: 0; margin: 0; }
  .top-actions { gap: 6px; }
  .pill { padding: 0 12px; height: 36px; }
  .top-actions .pill.lime span { display: none; }
  .top-actions .pill.lime { padding: 0 10px; }
  .menu-toggle { display: grid; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail { position: fixed; z-index: 40; top: var(--top); left: 0; width: min(240px, 72vw); background: var(--bg); transform: translateX(-100%); transition: transform 0.2s; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35); }
  .rail.open { transform: none; }
  .scrim.show { display: block; position: fixed; inset: var(--top) 0 0 0; background: rgba(0, 0, 0, 0.55); z-index: 35; }
  .main { padding: 16px 14px 56px; }
  .wall { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .search { max-width: none; }
  .brand span:last-child { display: none; }
  .who { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---- 广告过门覆盖层 ---- */
#ad-overlay {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px;
  background: rgba(10, 11, 18, .82); backdrop-filter: blur(3px);
}
#ad-overlay[hidden] { display: none; }
#ad-overlay .ad-box {
  width: min(520px, 100%); background: var(--panel, #1b1d2b); border: 1px solid #2e3147;
  border-radius: 14px; overflow: hidden; box-shadow: 0 18px 50px rgba(0, 0, 0, .5);
}
#ad-overlay .ad-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid #2e3147;
}
#ad-overlay .ad-tag {
  font-size: 12px; letter-spacing: .06em; color: #c6f432;
  background: rgba(198, 244, 50, .14); border-radius: 999px; padding: 3px 10px;
}
#ad-overlay .ad-count { font-size: 13px; color: #9b9eb8; }
#ad-overlay .ad-slot { height: 260px; background: #14161f; }
#ad-overlay .ad-slot iframe { display: block; width: 100%; height: 100%; border: 0; }
#ad-overlay .ad-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border-top: 1px solid #2e3147;
}
#ad-overlay .ad-foot .meta { font-size: 12px; color: #7d8099; }
#ad-overlay .ad-foot .btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---- 评论 ---- */
.cmt-list { display: grid; gap: 10px; margin-bottom: 10px; }
.cmt { border-top: 1px solid var(--line, #2e3147); padding-top: 10px; }
.cmt:first-child { border-top: 0; padding-top: 0; }
.cmt-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cmt-head b { font-size: 13px; }
.cmt-head .meta { font-size: 12px; }
.cmt-head .btn { margin-left: auto; padding: 2px 8px; font-size: 12px; }
.cmt p { margin: 6px 0 0; font-size: 14px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
#cmt-form textarea { width: 100%; min-height: 72px; resize: vertical; }
#cmt-form .row { margin-top: 8px; }
#cmt-form .meta { margin-top: 6px; font-size: 12px; }

/* ---- 全站页脚(法务页链接) ---- */
.site-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  max-width: 1180px;
  margin: 8px auto 28px;
  padding: 0 22px;
  font-size: 12px;
  color: var(--subtle);
}
.site-foot a { color: var(--subtle); text-decoration: none; border-bottom: 1px solid transparent; }
.site-foot a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.site-foot .sp { flex: 1; }
/* ---- 广告位(仅在配置了 AdSense 时才会出现) ---- */
.ad-slot { margin: 18px 0; padding: 0; }
.ad-slot .ad-label { margin: 0 0 4px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--subtle); }
.ad-slot ins.adsbygoogle { min-height: 50px; background: transparent; }
/* 没有填充时不留大块空白 */
.ad-slot ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }
.ad-slot:has(ins.adsbygoogle[data-ad-status="unfilled"]) { display: none; }