/* 设计参考：motionsites（深色、超大标题、横向分类条、大封面卡片）；作品页参考 CrazyGames / Poki；评分参考 Steam；建议状态参考 Canny */
:root {
  --bg: #0c0c10; --surface: #15151b; --surface-2: #1f1f28; --ink: #f5f5f8; --ink-2: #a1a1b3; --line: #2a2a35;
  --brand: #8b74ff; --brand-ink: #ffffff; --ok: #3ccf8e; --warn: #f0b13d; --bad: #ff6b6b; --info: #6aa2ff;
  --star: #f5b041; --star-off: #4a4a5a; --warn-bg: #2f2612;
  --glow: linear-gradient(92deg, #ffd6e8 0%, #f3b6ff 35%, #b9a8ff 68%, #a5d8ff 100%);
  --radius: 16px; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.35);
  color-scheme: dark;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; }
body.playing { overflow: hidden; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
main { max-width: 1320px; margin: 0 auto; padding: 20px 24px 72px; outline: none; }
h1, h2, h3 { line-height: 1.3; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row.spread { justify-content: space-between; align-items: flex-start; }
.row.center { justify-content: center; }

/* 顶栏：Logo + 纯文字导航 + 一个亮色投稿按钮 */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 64px; padding: 0 28px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -.02em; text-decoration: none; white-space: nowrap; }
.logo { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: #fff; font-size: 14px;
  background: linear-gradient(135deg, #8b5cf6, #ec4899); box-shadow: 0 0 20px rgba(200,100,255,.35); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a, .lang { white-space: nowrap; }
.nav a { text-decoration: none; padding: 6px 14px; border-radius: 999px; color: var(--ink-2); font-weight: 600; transition: color .15s; }
.nav a:hover, .nav a.active { color: var(--ink); }
.nav a.nav-submit { color: #111118; background: #f2f2f7; margin-left: 6px; }
.nav a.nav-submit:hover { background: #fff; }
.lang { border: 1px solid var(--line); background: transparent; color: var(--ink-2); border-radius: 999px; padding: 4px 10px; cursor: pointer; font-size: 13px; margin-left: 4px; }
@media (max-width: 760px) { .nav-agents { display: none; } }
@media (max-width: 640px) { .topbar { height: 54px; padding: 0 14px; } .nav-about { display: none; } .nav a.nav-submit { padding: 5px 12px; font-size: 14px; } }
.footer { text-align: center; color: var(--ink-2); font-size: 13px; padding: 28px 16px 44px; border-top: 1px solid color-mix(in srgb, var(--line) 50%, transparent); }

/* 按钮：实心品牌色只用在主操作上，其余一律中性 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); padding: 8px 14px;
  border-radius: 10px; cursor: pointer; font-weight: 600; text-decoration: none; min-height: 38px; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn.primary { border-color: var(--brand); color: var(--brand-ink); background: var(--brand); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--bad); }
.btn.small { min-height: 30px; padding: 4px 10px; font-size: 13px; }
.btn.wide { width: 100%; }
.btn.big { min-height: 48px; font-size: 17px; }
.btn.icon { min-width: 38px; padding: 8px 10px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* 首页大标题：小标签 + 超大粗体 + 发光渐变字 + 亮色胶囊按钮 */
.hero { position: relative; text-align: center; padding: 76px 0 44px; display: flex; flex-direction: column; align-items: center; }
.hero::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 40px; width: min(900px, 100%); height: 420px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(150,110,255,.16), transparent 70%); pointer-events: none; }
.hero-badge { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; padding: 5px 14px; border-radius: 999px;
  color: #ffd2a1; border: 1px solid rgba(255,186,120,.55); background: rgba(255,160,80,.07); }
.hero h1 { font-size: clamp(38px, 7.4vw, 92px); line-height: .98; letter-spacing: -.035em; font-weight: 900; text-transform: uppercase; margin: 24px 0 20px; }
.hero h1 em { font-style: italic; letter-spacing: -.02em; }
.hero h1 .glow { background: var(--glow); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 28px rgba(200,160,255,.35)); }
:lang(zh-CN) .hero h1 { letter-spacing: -.01em; line-height: 1.12; }
:lang(zh-CN) .hero h1 em { font-style: normal; }
.hero p { color: var(--ink-2); max-width: 580px; font-size: 18px; margin: 0 auto; }
.hero-actions { display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; margin-top: 30px; }
.cta { border: 0; cursor: pointer; font-weight: 700; font-size: 18px; padding: 16px 32px; border-radius: 999px; color: #14141a;
  background: linear-gradient(180deg, #f4f6ff, #c8d2ff); box-shadow: 0 10px 40px rgba(140,160,255,.28), inset 0 1px 0 rgba(255,255,255,.9);
  transition: transform .15s ease, box-shadow .15s ease; }
.cta:hover { transform: translateY(-1px); box-shadow: 0 14px 50px rgba(140,160,255,.4), inset 0 1px 0 rgba(255,255,255,.9); }
.cta-ghost { color: var(--ink); font-weight: 600; text-decoration: none; padding: 14px 18px; border-radius: 999px; }
.cta-ghost:hover { background: var(--surface); }

/* 分类条：一行胶囊，放不下就横滑 */
.cat-wrap { border: 1px solid var(--line); border-radius: 999px; padding: 6px; background: var(--surface); margin: 6px 0 26px; }
.cat-bar { display: flex; flex-wrap: nowrap; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.cat-bar::-webkit-scrollbar { display: none; }
.cat-chip { flex: none; padding: 8px 20px; border-radius: 999px; color: var(--ink-2); font-weight: 600; text-decoration: none; white-space: nowrap; transition: color .15s, background .15s; }
.cat-chip:hover { color: var(--ink); }
.cat-chip.on { background: var(--surface-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.toolbar { display: flex; justify-content: flex-end; margin: -10px 0 18px; }
.toolbar:empty { display: none; }
.search { flex: 1 1 220px; max-width: 320px; }
.search input { width: 100%; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }

/* 作品卡片：大封面（16:10）+ 粗标题 + 分类；鼠标放上去封面里直接跑作品 */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px 22px; }
.card { display: flex; flex-direction: column; gap: 12px; text-decoration: none; min-width: 0; }
.cover-wrap { position: relative; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--surface);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.card:hover .cover-wrap { transform: translateY(-3px); border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); box-shadow: 0 22px 50px rgba(0,0,0,.55); }
.card .cover { aspect-ratio: 16 / 10; }
.cover-wrap iframe.live { position: absolute; top: 0; left: 0; transform-origin: 0 0; border: 0; pointer-events: none; opacity: 0; transition: opacity .35s ease; background: #fff; }
.cover-wrap.live-on iframe.live { opacity: 1; }
.card .body { padding: 0 4px; min-width: 0; }
.title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-width: 0; }
.card h3 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.title-row > span { flex: none; font-size: 13px; }
.meta { display: flex; gap: 8px; font-size: 13px; color: var(--ink-2); margin-top: 2px; min-width: 0; white-space: nowrap; overflow: hidden; }
.meta span + span::before { content: "·"; margin-right: 8px; opacity: .6; }
.meta .author { overflow: hidden; text-overflow: ellipsis; }
.stars { color: var(--star); font-weight: 700; }
.card.dashed { border: 2px dashed var(--line); border-radius: 18px; align-items: center; justify-content: center; min-height: 220px; color: var(--ink-2); font-weight: 700; }
/* 手机：两列，第一屏至少露出 4 个作品；标题最多两行 */
@media (max-width: 560px) {
  main { padding: 16px 14px 56px; }
  .hero { padding: 44px 0 30px; }
  .hero p { font-size: 16px; }
  .cta { font-size: 16px; padding: 14px 24px; }
  .cat-wrap { margin-bottom: 18px; }
  .cat-chip { padding: 7px 14px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 20px 12px; }
  .card { gap: 8px; }
  .cover-wrap { border-radius: 14px; }
  .title-row { flex-direction: column; gap: 0; }
  .card h3 { font-size: 15px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
  .title-row > span { font-size: 12px; }
  .meta { font-size: 12px; }
  .meta .author { display: none; }
  .card.dashed { min-height: 160px; }
}
.empty { text-align: center; color: var(--ink-2); padding: 56px 16px; border: 1px dashed var(--line); border-radius: var(--radius); }
.more { display: flex; justify-content: center; margin-top: 28px; }

/* 封面通用 */
.cover, .launch-cover, .run-cover, .mini-cover { aspect-ratio: 4 / 3; width: 100%; overflow: hidden; display: grid; place-items: center; }
.cover img, .launch-cover img, .run-cover img, .mini-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 没封面时显示完整作品名，比只放一个字更能看出是什么 */
.gradient { padding: 12%; }
.cover-title { color: #fff; font-weight: 800; font-size: 22px; line-height: 1.25; text-align: center; text-shadow: 0 2px 12px rgba(0,0,0,.2);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.launch-cover .cover-title, .run-cover .cover-title { font-size: 32px; }
.mini-cover .cover-title { font-size: 13px; }
@media (max-width: 560px) { .cover .cover-title { font-size: 16px; } }
.pill { position: absolute; top: 10px; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; backdrop-filter: blur(6px); z-index: 1; }
.pill.tl { left: 10px; } .pill.tr { right: 10px; }
.pill.bl { top: auto; bottom: 10px; left: 10px; }

/* 作品页：桌面 */
.work-title { margin-bottom: 12px; }
.work-title h1 { margin: 0; font-size: 24px; }
.tagline { margin: 2px 0 0; color: var(--ink-2); }
.work-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.work-top { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
@media (max-width: 1000px) { .work-top { grid-template-columns: 1fr; } }
.player { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.holder { position: relative; height: min(62vh, 560px); background: #0c0c11; }
.holder iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.runcover { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; cursor: pointer; background: #0c0c11; }
.runcover .run-cover { height: 100%; aspect-ratio: auto; filter: brightness(.7); }
.runcover .run-cover .cover-title { opacity: .35; }
a.runbtn { text-decoration: none; }
.runbtn { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 14px 30px; border-radius: 999px; font-weight: 800; font-size: 18px;
  color: var(--brand-ink); background: var(--brand); box-shadow: 0 10px 30px rgba(0,0,0,.35); white-space: nowrap; }
.runcover:hover .runbtn { transform: translate(-50%, -50%) scale(1.04); }
.frame-status { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center;
  background: var(--surface); color: var(--ink); padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.player-bar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; padding: 8px 10px; border-top: 1px solid var(--line); }
/* 铺满屏幕：用固定定位，不调用 requestFullscreen（iPhone、微信不支持），iframe 不移动不重载 */
.holder.is-full { position: fixed; inset: 0; height: 100dvh; z-index: 100; background: #000; }
.full-bar { display: none; }
.holder.is-full .full-bar { display: flex; align-items: center; gap: 10px; position: absolute; z-index: 2; left: 0; right: 0; top: 0;
  height: calc(44px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) calc(10px + env(safe-area-inset-right)) 0 calc(8px + env(safe-area-inset-left)); background: #111; color: #fff; }
/* iframe 是替换元素，height:auto 不会被上下边距拉伸，必须显式算高度 */
.holder.is-full iframe { top: calc(44px + env(safe-area-inset-top)); height: calc(100% - 44px - env(safe-area-inset-top)); }
.holder.is-full .frame-status { top: calc(50% + 22px); }
.exit-pill { border: 0; border-radius: 999px; padding: 5px 12px; min-height: 32px; font-weight: 700; color: #fff; background: rgba(255,255,255,.16); cursor: pointer; white-space: nowrap; }
.full-title { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu { position: relative; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 10; display: grid; min-width: 170px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: var(--shadow); padding: 6px; }
.menu-pop a, .menu-pop button { text-align: left; padding: 8px 10px; border: 0; background: none; border-radius: 8px; cursor: pointer; text-decoration: none; font-size: 14px; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--surface-2); }
.related h2 { font-size: 16px; margin: 0 0 10px; }
.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.mini { display: flex; flex-direction: column; gap: 2px; text-decoration: none; font-size: 13px; }
.mini-cover { border-radius: 10px; }
.mini-cover .initial { font-size: 28px; }
.mini-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini.dashed { border: 2px dashed var(--line); border-radius: 10px; display: grid; place-items: center; text-align: center; padding: 10px; aspect-ratio: 4 / 3; color: var(--ink-2); font-weight: 700; }
.cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; margin-top: 20px; }
@media (max-width: 860px) { .cols { grid-template-columns: 1fr; } }
.list { display: grid; gap: 16px; align-content: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.panel h2 { margin: 0 0 10px; font-size: 17px; }
.panel.flash { animation: flash 1.6s ease; }
@keyframes flash { 0%, 100% { box-shadow: var(--shadow); } 30% { box-shadow: 0 0 0 3px var(--brand); } }
.panel.danger { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.desc { white-space: pre-wrap; margin: 0; }
.author-tag { font-size: 13px; color: var(--ok); }

/* 作品页：手机启动块（参考 CrazyGames） */
.stack { display: grid; gap: 16px; }
.launch { display: grid; gap: 8px; }
.launch-cover { border-radius: 12px; aspect-ratio: 16 / 10; }
.launch h1 { font-size: 22px; margin: 6px 0 0; }
.launch .start { min-height: 50px; font-size: 18px; width: 100%; margin-top: 4px; }
.launch .actions .btn { flex: 1 1 auto; }
.player.mobile { border: 0; }
.player.mobile .holder:not(.is-full) { display: none; }
@media (max-width: 760px) { .related { margin-top: 16px; } }

/* 评分（参考 Steam、App Store）：不满 5 人不显示均分 */
.rate-summary { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 10px; }
.rate-summary .big { font-size: 40px; font-weight: 800; line-height: 1; }
.dist { display: grid; gap: 2px; min-width: 160px; flex: 1; }
.dist-row { display: grid; grid-template-columns: 30px 1fr; gap: 6px; align-items: center; font-size: 12px; color: var(--ink-2); }
.bar { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--star); }
.your-rating { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; padding-top: 10px; border-top: 1px solid var(--line); }
.your-rating .label { font-weight: 600; }
.stars-input { display: flex; }
.star { border: 0; background: none; font-size: 30px; cursor: pointer; color: var(--star-off); padding: 0 2px; line-height: 1; min-width: 36px; min-height: 40px; }
.star.on { color: var(--star); }

/* 建议（参考 Canny、少数派） */
.sugg-form { display: flex; gap: 8px; margin-bottom: 12px; }
.sugg-form input { flex: 1; min-width: 0; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn { border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px; padding: 5px 12px; cursor: pointer; font-size: 13px; }
.chip-btn:hover { border-color: var(--brand); }
.sugg { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.sugg:first-child { border-top: 0; }
.vote { flex: none; display: flex; flex-direction: column; align-items: center; min-width: 58px; border: 1px solid var(--line); background: var(--surface);
  border-radius: 10px; padding: 4px 6px; cursor: pointer; font-size: 12px; color: var(--ink-2); }
.vote b { font-size: 16px; color: var(--ink); }
.vote.on { border-color: var(--brand); color: var(--brand); }
.sugg .text { flex: 1; min-width: 0; word-break: break-word; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; margin-left: 6px; vertical-align: 1px; white-space: nowrap; }
.badge.open { background: var(--surface-2); color: var(--ink-2); }
.badge.planned { background: color-mix(in srgb, var(--info) 15%, transparent); color: var(--info); }
.badge.done, .badge.approved { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.badge.declined, .badge.rejected { background: var(--surface-2); color: var(--ink-2); }
.badge.pending, .badge.uploading { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pill-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 14px; min-height: 36px; cursor: pointer; font-size: 14px; color: var(--ink-2); }
@media (max-width: 640px) { .pill-btn { min-height: 44px; } }
.pill-btn.on.open { background: var(--surface-2); color: var(--ink); border-color: var(--ink-2); }
.pill-btn.on.planned { background: color-mix(in srgb, var(--info) 15%, transparent); color: var(--info); border-color: var(--info); }
.pill-btn.on.done { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); border-color: var(--ok); }
.pill-btn.on.declined { background: var(--surface-2); color: var(--ink); border-color: var(--ink-2); }

/* 表单 */
.form { max-width: 720px; display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 600; }
.form .hint { font-weight: 400; color: var(--ink-2); font-size: 13px; }
.form input[type=text], .form input[type=url], .form textarea, .form input[type=password] { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.form textarea { min-height: 110px; resize: vertical; }
.req::after { content: " *"; color: var(--bad); }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg label { display: flex; align-items: center; gap: 6px; font-weight: 600; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: var(--surface); }
.seg input { accent-color: var(--brand); }
.drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 20px; text-align: center; background: var(--surface); display: grid; gap: 10px; }
.drop.over { border-color: var(--brand); }
.field { display: grid; gap: 6px; }
.label { font-weight: 600; }
.help summary { cursor: pointer; color: var(--info); font-size: 14px; }
.help p { margin: 6px 0 0; font-size: 14px; color: var(--ink-2); }
.warns { margin: 6px 0 0; padding-left: 20px; }
.form .check { display: flex; flex-direction: row; gap: 8px; font-weight: 400; align-items: flex-start; }
.form .check input { margin-top: 5px; }
progress { height: 8px; accent-color: var(--brand); width: 100%; }
.callout { border-left: 4px solid var(--brand); background: var(--surface); padding: 12px 14px; border-radius: 8px; }
.callout.ok { border-color: var(--ok); }
.callout.bad { border-color: var(--bad); }
.callout.warn { border-color: var(--warn); background: var(--warn-bg); }
.copyrow { display: flex; gap: 8px; margin-top: 8px; }
.copyrow input { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; }
.prose { max-width: 720px; }
.prose h2 { margin-top: 26px; font-size: 19px; }

#toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px); opacity: 0; background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: 10px; transition: all .2s ease; pointer-events: none; max-width: calc(100vw - 32px); z-index: 200; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 退出后的底部评分卡 */
.sheet-wrap { position: fixed; inset: 0; z-index: 150; background: rgba(0,0,0,.35); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s ease; }
.sheet { width: min(560px, 100%); background: var(--surface); border-radius: 18px 18px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); display: grid; gap: 12px; box-shadow: 0 -8px 30px rgba(0,0,0,.2); animation: rise .2s ease; }
.big-stars { justify-content: center; }
.big-stars .star { font-size: 38px; min-width: 48px; min-height: 48px; }
@keyframes rise { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
/* 微信分享引导 */
.wx-guide { position: fixed; inset: 0; z-index: 160; background: rgba(0,0,0,.72); color: #fff; padding: 20px; text-align: right; }
.wx-arrow { font-size: 48px; line-height: 1; margin-right: 6px; }
.wx-guide p { font-size: 18px; font-weight: 700; margin: 8px 0 0; }
.cover-preview { width: 96px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }

/* 让 AI 帮你发布 */
.agent-cta { display: grid; gap: 2px; margin-top: 16px; text-decoration: none; border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--line)); background: color-mix(in srgb, var(--brand) 7%, var(--surface)); }
.agent-cta:hover { border-color: var(--brand); }
.agents .lead { font-size: 17px; }
.code-wrap { position: relative; margin: 8px 0 12px; }
.code { margin: 0; padding: 12px 76px 12px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; overflow-x: auto;
  font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.copy-btn { position: absolute; top: 6px; right: 6px; min-height: 32px; padding: 2px 12px; font-size: 13px; }
details.tool { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 0 14px; margin: 8px 0; }
details.tool > summary { cursor: pointer; padding: 12px 0; font-weight: 700; min-height: 44px; }
details.tool[open] { padding-bottom: 4px; }
.code.plain { font: 15px/1.6 inherit; font-family: inherit; }

/* 怎么做的 */
.recipe { display: grid; gap: 10px; }
.recipe h2 { margin: 0; }
.prompt-text { margin: 0; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
  font: 14px/1.6 inherit; font-family: inherit; white-space: pre-wrap; overflow-wrap: anywhere; }
.prompt-text.collapsed { max-height: 11.5em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.files { display: grid; gap: 8px; }
.file-list { display: grid; gap: 2px; max-height: 220px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.file { display: flex; justify-content: space-between; gap: 12px; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 8px; cursor: pointer; min-height: 40px; font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.file:hover, .file.on { background: var(--surface-2); }
.file span:first-child { overflow-wrap: anywhere; }
.file-view { max-height: 60vh; overflow: auto; padding-right: 14px; }
details.share-box { border: 1px dashed var(--line); border-radius: 12px; padding: 0 14px; }
details.share-box > summary { cursor: pointer; padding: 12px 0; font-weight: 700; min-height: 44px; }
details.share-box[open] { display: grid; gap: 12px; padding-bottom: 14px; }
details.share-box p { margin: 0; }

/* 账号：头像、顶栏菜单 */
.avatar { display: inline-grid; place-items: center; border-radius: 50%; object-fit: cover; flex: none; color: #fff; font-weight: 800; background: var(--surface-2); }
.avatar.xs { width: 22px; height: 22px; font-size: 11px; }
.avatar.sm { width: 32px; height: 32px; font-size: 14px; }
.avatar.md { width: 44px; height: 44px; font-size: 18px; }
.avatar.lg { width: 72px; height: 72px; font-size: 28px; }
.avatar.xl { width: 112px; height: 112px; font-size: 44px; box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--line); }
#account-slot { display: inline-flex; align-items: center; }
.nav-login { margin-left: 2px; }
.account-menu { position: relative; margin-left: 6px; }
.account-menu > summary { list-style: none; cursor: pointer; display: flex; border-radius: 50%; }
.account-menu > summary::-webkit-details-marker { display: none; }
.account-menu .menu-pop { right: 0; left: auto; top: calc(100% + 10px); bottom: auto; min-width: 210px; box-shadow: 0 18px 40px rgba(0,0,0,.5); }
.menu-head { display: grid; padding: 8px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.byline { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 600; color: var(--ink); }
.byline:hover { text-decoration: underline; }

/* 登录 */
.auth-wrap { display: grid; place-items: center; padding: 48px 0; }
.auth-card { width: min(440px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: var(--shadow); display: grid; gap: 12px; }
.auth-card h1 { margin: 0; font-size: 26px; }
.auth-card p { margin: 0; }
.code-input { font-size: 28px !important; letter-spacing: 10px; text-align: center; font-weight: 800; }
.small-hero { padding-top: 56px; }

/* 我的账号 */
.me-page { display: grid; gap: 20px; }
.me-page h1 { margin: 0; }
.me-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 860px) { .me-cols { grid-template-columns: 1fr; } }
.wide-form { max-width: none; }
.links-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.links-grid .sub { font-weight: 500; font-size: 13px; color: var(--ink-2); }
@media (max-width: 560px) { .links-grid { grid-template-columns: 1fr; } }
.my-works, .keys { display: grid; gap: 10px; }
.my-work, .key-row { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.my-work .mini-cover { width: 72px; flex: none; border-radius: 8px; aspect-ratio: 16 / 10; }
.grow { flex: 1 1 auto; min-width: 0; }
@media (max-width: 560px) { .my-work { flex-wrap: wrap; } }

/* 个人主页：头像 + 名字 + 求职标记 + 数据 + 作品 */
.profile-head { display: flex; gap: 28px; align-items: flex-start; padding: 40px 0 24px; }
.profile-head h1 { margin: 0; font-size: clamp(28px, 4vw, 40px); letter-spacing: -.02em; }
.profile-bio { font-size: 17px; margin: 12px 0; max-width: 680px; }
.profile-links { margin: 6px 0 10px; }
.open-badge { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); border: 1px solid color-mix(in srgb, var(--ok) 45%, transparent); font-weight: 700; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin: 8px 0 18px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; display: grid; gap: 2px; }
.stat b { font-size: 28px; letter-spacing: -.02em; }
.stat span { color: var(--ink-2); font-size: 13px; }
.tools-row { margin-bottom: 26px; }
.tool-chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 3px 12px; font-size: 13px; }
@media (max-width: 640px) {
  .profile-head { flex-direction: column; align-items: center; text-align: center; gap: 16px; padding-top: 28px; }
  .profile-head .row { justify-content: center; }
  .avatar.xl { width: 92px; height: 92px; font-size: 36px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* 所有文本输入框统一样式（没写 type 的 input 也算） */
input:not([type]), input[type=text], input[type=email], input[type=url], input[type=search], input[type=password], select, textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid color-mix(in srgb, var(--brand) 70%, transparent); outline-offset: 1px; border-color: transparent; }
.row > input:not([type]), .row > input[type=text] { flex: 1 1 200px; width: auto; }
