/* 情趣炸弹 · 样式
   版式：清爽版（白卡片、苹果式分段按钮、手机自带字体，不用渐变/光晕/花字）
   配色：玫瑰（浅粉白底 + 玫瑰粉主色），董事长 11-18 从六套里定的「第一列」。只有这一套，不做深色。
   新写样式不要写死颜色，用下面的变量。 */
:root {
  /* 底色 11-18 董事长要「暧昧一点」→ 定 B 蜜桃玫瑰（对比图 docs/设计样稿/底色对比.jpg，原来是 #fbf6f7） */
  --bg: #f3dde4; --bg-rgb: 243, 221, 228; --card: #ffffff; --track: #e9ced7; --pick: #ffffff;
  --ink: #2b1d22; --sub: #7a6a70; --dim: #b3a5aa; --line: #eed7de;
  --acc: #e14d7e; --acc-rgb: 225, 77, 126; --acc-soft: #fbe7ee;
  --m: #3b78e7; --f: #e14d7e;
  --bomb: #1d1d1f; --bomb-hi: #4a4a4f; --cap: #3a3a3d; --fuse: #c9a074;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 6px 20px rgba(0, 0, 0, .05);
  --font: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color-scheme: light;
}

/* ═════════ 基础 ═════════ */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* 董事长 11-18：往上滑别触发浏览器「下拉刷新」——整页不滚，只让里面的内容区滚，滚到头也不往外传 */
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; background: var(--bg); color: var(--ink); }
body { font: 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; overscroll-behavior: none; -webkit-user-select: none; user-select: none; }
input, textarea { -webkit-user-select: text; user-select: text; font-family: var(--font); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
a { color: inherit; }
h1, h2, p { margin: 0; }
#app { position: fixed; inset: 0; max-width: 480px; margin: 0 auto; overflow: hidden; background: var(--bg); }
.screen { position: absolute; inset: 0; display: none; flex-direction: column; }
.screen.on { display: flex; animation: fadeIn .2s ease-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.scroll { flex: 1; overflow-y: auto; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; padding: 0 16px 24px; }
#setup .scroll { padding-bottom: 110px; }
.num, .stepper b, .seg button { font-variant-numeric: tabular-nums; }

/* ═════════ 通用件 ═════════ */
.card { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); }
.group-t { display: flex; align-items: center; justify-content: space-between; margin: 0 2px 10px; font-size: 13px; color: var(--sub); }
.note { font-size: 12px; color: var(--dim); margin: 8px 4px 18px; }
.box { padding: 14px; margin-bottom: 18px; }
.box.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.box .span2 { grid-column: 1 / -1; margin-top: -2px; }
.lab { font-size: 13px; color: var(--sub); margin-bottom: 8px; }
.hint { font-size: 12px; color: var(--sub); margin-top: 10px; line-height: 1.6; }
.hint b { color: var(--acc); font-weight: 600; }
.foot { text-align: center; font-size: 12px; color: var(--dim); margin-top: 8px; }
.foot a { color: var(--sub); text-underline-offset: 3px; }

/* 分段按钮：灰底槽，选中的是白块 */
.seg { display: flex; background: var(--track); border-radius: 10px; padding: 2px; }
.seg button { flex: 1; height: 32px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--sub); white-space: nowrap; transition: background .15s, color .15s; }
.seg button.on { background: var(--pick); color: var(--ink); font-weight: 700; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }

.stepper { display: flex; align-items: center; background: var(--track); border-radius: 10px; padding: 2px; }
.stepper button { width: 34px; height: 28px; border-radius: 8px; font-size: 18px; color: var(--ink); }
.stepper button:active { background: var(--pick); }
.stepper b { min-width: 26px; text-align: center; font-size: 15px; font-weight: 700; color: var(--ink); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { padding: 7px 12px; border-radius: 10px; background: var(--track); font-size: 14px; font-weight: 500; color: var(--sub); transition: background .15s, color .15s; }
.chips button.on { background: var(--acc-soft); color: var(--acc); font-weight: 700; box-shadow: inset 0 0 0 1.5px rgba(var(--acc-rgb), .35); }

/* 最狠到哪一档：三档下面配火苗（1 / 2 / 3 个），选中的那档火苗变玫瑰色 */
.seg.tiers button { height: 50px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 15px; }
.seg.tiers .heat { display: flex; gap: 1px; }
.seg.tiers .heat svg { width: 11px; height: 11px; fill: var(--dim); }
.seg.tiers button.on { color: var(--acc); }
.seg.tiers button.on .heat svg { fill: var(--acc); }

.switch-row { display: none; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; cursor: pointer; }
.switch-row input { display: none; }
.switch { position: relative; width: 46px; height: 28px; border-radius: 999px; background: var(--track); transition: background .2s; flex: none; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s; }
.switch-row input:checked + .switch { background: var(--acc); }
.switch-row input:checked + .switch::after { transform: translateX(18px); }
#sameRow.show, #jumpRow.show { display: flex; }

.btn { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; width: 100%; height: 54px; border-radius: 16px; font-size: 17px; font-weight: 700; letter-spacing: .04em; transition: transform .12s, opacity .2s; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--acc); color: #fff; }
.btn.white { background: #fff; color: var(--acc); }
.btn.ghost { height: 48px; background: var(--track); color: var(--ink); font-size: 15px; font-weight: 600; }
.btn.locking { pointer-events: none; }
.text-btn { font-size: 14px; color: var(--sub); padding: 8px 4px; }
.text-btn.center { display: block; margin: 2px auto 0; }
.dock { padding: 10px 16px calc(18px + env(safe-area-inset-bottom)); flex: none; }
.dock.fade { position: absolute; left: 0; right: 0; bottom: 0; padding-top: 26px; background: linear-gradient(to bottom, rgba(var(--bg-rgb), 0), var(--bg) 40%); }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; color: var(--sub); border-radius: 50%; }
.icon-btn:active { background: var(--track); }
.icon-btn svg { width: 22px; height: 22px; }

/* ═════════ 开局 ═════════ */
/* 标题横幅：浅玫瑰底 + 标题右边一颗小炸弹 */
.hero { margin: 18px 0 18px; padding: 0 4px; }
.hero-top { display: flex; align-items: center; justify-content: space-between; }
.hero h1 { display: flex; align-items: center; gap: 6px; font-size: 30px; font-weight: 800; letter-spacing: .02em; }
.title-bomb { width: 36px; height: 36px; overflow: visible; margin-top: -4px; }
.hero .icon-btn { margin-right: -6px; color: var(--acc); }
.hero-sub { font-size: 14px; color: var(--sub); margin-top: 4px; }

/* 小节标题：玫瑰色小图标 + 粗一点的字 */
.gt { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--ink); }
.gt small { font-size: 12px; font-weight: 400; color: var(--dim); }
.gi { width: 26px; height: 26px; border-radius: 50%; background: var(--acc-soft); display: grid; place-items: center; flex: none; }
.gi svg { width: 15px; height: 15px; fill: none; stroke: var(--acc); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* 18 岁确认 */
.gate { position: absolute; inset: 0; z-index: 40; display: none; align-items: center; justify-content: center; padding: 28px; background: rgba(43, 29, 34, .45); }
.gate.on { display: flex; }
.gate-box { width: 100%; max-width: 320px; background: var(--card); border-radius: 24px; padding: 26px 20px 20px; text-align: center; animation: fadeIn .25s; }
.gate-bomb { width: 76px; height: 76px; overflow: visible; }
.gate-title { font-size: 24px; font-weight: 800; margin-top: 8px; }
.gate-sub { font-size: 14px; color: var(--sub); line-height: 1.7; margin: 8px 0 20px; }
.players { padding: 0 14px; }
.seat { display: flex; align-items: center; gap: 12px; height: 54px; }
.seat + .seat { border-top: 1px solid var(--line); }
.seat .no { width: 26px; height: 26px; border-radius: 50%; background: var(--track); display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--sub); flex: none; transition: background .15s, color .15s; }
.seat .no.m { background: #e7effd; color: var(--m); }
.seat .no.f { background: var(--acc-soft); color: var(--f); }
.seat input { flex: 1; min-width: 0; height: 40px; border: 0; background: none; color: var(--ink); font-size: 16px; font-weight: 600; outline: none; padding: 0; }
.seat input::placeholder { color: var(--dim); font-weight: 400; }
.seat .seg { width: 104px; flex: none; }
.seat .seg button.on.m { color: var(--m); }
.seat .seg button.on.f { color: var(--f); }

/* ═════════ 顶栏（游戏中） ═════════ */
.topbar { display: flex; align-items: center; justify-content: space-between; height: 52px; padding: 0 8px 0 16px; flex: none; }
.round-info { font-size: 15px; font-weight: 600; color: var(--ink); }
.round-info b { color: var(--acc); margin-left: 6px; font-weight: 600; }
.top-actions { display: flex; align-items: center; gap: 2px; }
.top-actions .text-btn { font-size: 15px; padding: 8px; }

/* ═════════ 每轮开始 ═════════ */
.intro-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 16px; text-align: center; }
.intro-kicker { font-size: 15px; color: var(--sub); }
.intro-tier { font-size: 56px; font-weight: 900; color: var(--acc); margin: 6px 0 12px; letter-spacing: .06em; }
.intro-from { font-size: 16px; font-weight: 600; }
.rules { list-style: none; width: 100%; padding: 14px 18px; margin: 28px 0 0; text-align: left; font-size: 14px; color: var(--sub); line-height: 2; counter-reset: r; }
.rules li { counter-increment: r; padding-left: 28px; position: relative; }
.rules li::before { content: counter(r); position: absolute; left: 0; top: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--track); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; color: var(--sub); }

/* ═════════ 炸弹 ═════════ */
.bomb-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.b-body { fill: var(--bomb); }
.b-hi { stroke: var(--bomb-hi); }
.b-cap { fill: var(--cap); }
.b-fuse { stroke: var(--fuse); }
.flame { transform-origin: 146px 30px; animation: flick .35s ease-in-out infinite alternate; }
@keyframes flick { from { transform: scale(.92) rotate(-4deg); } to { transform: scale(1.08) rotate(4deg); } }
.stage { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.bomb-wrap { position: relative; width: min(46vw, 28vh, 180px); aspect-ratio: 1; transition: transform .08s ease-out; }
.bomb-wrap.tk { transform: scale(1.04) rotate(-1.5deg); }
.bomb-wrap.tk2 { transform: scale(1.04) rotate(1.5deg); }
.whisper { position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); white-space: nowrap; font-size: 15px; font-weight: 600; letter-spacing: .2em; color: var(--acc); opacity: 0; pointer-events: none; transition: opacity .5s; }
.whisper.show { opacity: 1; }
.holder-label { font-size: 13px; color: var(--sub); margin-top: 18px; }
.holder { font-size: 36px; font-weight: 800; letter-spacing: .02em; margin-top: 2px; text-align: center; padding: 0 16px; line-height: 1.25; }
.pass-count { font-size: 13px; color: var(--sub); margin-top: 4px; min-height: 19px; }

.task { margin: 0 16px; padding: 18px 18px 20px; text-align: center; flex: none; }
.task-label { font-size: 13px; font-weight: 600; color: var(--acc); }
/* 董事长 11-18：换一条时卡片别跟着行数上下跳——按最长的词条固定高度（node docs/tools/measure_lines.js 量：小动作最多 2 行、惩罚最多 3 行），字上下居中 */
.task-text { margin-top: 8px; font-size: 22px; font-weight: 700; line-height: 1.5; min-height: 3em; display: flex; align-items: center; justify-content: center; }
.who { color: var(--acc); font-weight: 700; margin: 0 .15em; }
.task-meta { display: flex; align-items: center; justify-content: flex-end; padding: 6px 20px 0; font-size: 13px; color: var(--dim); flex: none; min-height: 34px; }

/* ═════════ 炸了：整屏主色 ═════════ */
#boom { background: var(--acc); color: #fff; }
#boom .round-info, #boom .round-info b, #boom .text-btn, #boom .icon-btn { color: rgba(255, 255, 255, .88); }
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 5; }
.flash.go { animation: flash .55s ease-out forwards; }
@keyframes flash { 0% { opacity: .7; } 100% { opacity: 0; } }
#boom.shake { animation: shake .4s ease-out; }
@keyframes shake { 0%, 100% { transform: none; } 20% { transform: translate(-8px, 3px); } 40% { transform: translate(7px, -4px); } 60% { transform: translate(-4px, 2px); } 80% { transform: translate(2px, -1px); } }
.boom-head { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 16px; }
.boom-title { font-size: 76px; font-weight: 900; line-height: 1; letter-spacing: .08em; padding-left: .08em; animation: pop .4s cubic-bezier(.2, 1.5, .4, 1) both; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.boom-who { font-size: 18px; margin-top: 14px; color: rgba(255, 255, 255, .92); }
.boom-who .who { color: #fff; font-weight: 800; }
.penalty { margin: 0 16px; padding: 18px; text-align: center; color: var(--ink); flex: none; }
.pen-text { margin-top: 8px; font-size: 21px; font-weight: 700; line-height: 1.5; min-height: 4.5em; display: flex; align-items: center; justify-content: center; }
.timer-btn { display: none; margin-right: auto; height: 32px; padding: 0 14px; border-radius: 999px; background: rgba(255, 255, 255, .2); color: #fff; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.timer-btn.show { display: inline-flex; align-items: center; }
.timer-btn.running { background: #fff; color: var(--acc); }
#boom .task-meta { color: rgba(255, 255, 255, .8); }
#stopBtn { margin-top: 6px; padding: 8px 16px; }
#stopBtn.locking { pointer-events: none; }
/* 换一条：只把词条卡片翻一页（0.38 秒），董事长说这个动画好，别去掉 */
.flip { animation: flip .38s ease-out; }
@keyframes flip { from { transform: perspective(700px) rotateX(-75deg); opacity: .25; } to { transform: none; opacity: 1; } }


/* ═════════ 战报 ═════════ */
/* 董事长 11-18：页面别太长、战报放中间——内容短就整体竖着居中，长了照常往下滚 */
.rep-scroll { display: flex; flex-direction: column; }
.rep-inner { margin: auto 0; padding: 6px 0 4px; }
.rep-top { height: 44px; display: flex; align-items: center; justify-content: center; }
.rep-top b { font-size: 17px; font-weight: 700; }
.title-card { padding: 16px 16px 14px; text-align: center; }
.rep-kicker { font-size: 13px; color: var(--sub); }
.big-title { font-size: 34px; font-weight: 900; color: var(--acc); margin-top: 4px; letter-spacing: .04em; line-height: 1.2; }
.title-sub { font-size: 14px; color: var(--sub); margin-top: 2px; }
.nums { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.nums div { text-align: center; }
.nums div + div { border-left: 1px solid var(--line); }
.nums b { display: block; font-size: 22px; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.nums span { font-size: 12px; color: var(--sub); }
.awards { padding: 0 16px; margin: 10px 0; }
.award { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 42px; font-size: 14px; }
.award + .award { border-top: 1px solid var(--line); }
.award .t { color: var(--sub); flex: none; }
.award .d { font-weight: 600; text-align: right; }
.award .d small { color: var(--dim); font-weight: 400; font-size: 13px; margin-left: 6px; }
.ptable-wrap { padding: 4px 16px; }
.ptable { width: 100%; border-collapse: collapse; font-size: 14px; }
.ptable th { font-weight: 400; color: var(--dim); font-size: 12px; text-align: right; padding: 8px 0 4px; }
.ptable th:first-child, .ptable td:first-child { text-align: left; }
.ptable td { text-align: right; padding: 7px 0; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.ptable td:first-child { font-weight: 600; }
.ptable .gdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
.ptable .gdot.m { background: var(--m); } .ptable .gdot.f { background: var(--f); }
.ptable td.hot { color: var(--acc); font-weight: 700; }
.story { font-size: 13px; color: var(--sub); line-height: 1.7; padding: 10px 4px 0; }
.story:empty { display: none; }
.story q { color: var(--ink); quotes: "「" "」"; }
.rep-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.rep-row { display: flex; gap: 8px; }
.rep-row .btn { flex: 1; height: 48px; font-size: 15px; letter-spacing: .02em; }
.home-link { text-decoration: none; }

/* ═════════ 弹窗 ═════════ */
.modal, .sheet { position: absolute; inset: 0; z-index: 20; display: none; background: rgba(30, 20, 24, .4); }
.modal.on { display: flex; align-items: center; justify-content: center; padding: 28px; }
.modal-box { width: 100%; max-width: 320px; background: var(--card); border-radius: 20px; padding: 22px 18px 18px; text-align: center; animation: fadeIn .2s; }
.modal-title { font-size: 18px; font-weight: 700; }
.modal-body { font-size: 14px; color: var(--sub); line-height: 1.6; margin-top: 6px; }
.modal-btns { display: flex; gap: 10px; margin-top: 18px; }
.modal-btns .btn { height: 46px; font-size: 15px; }
.sheet.on { display: flex; align-items: flex-end; }
.sheet-box { width: 100%; background: var(--bg); border-radius: 22px 22px 0 0; padding: 18px 16px calc(14px + env(safe-area-inset-bottom)); animation: up .22s ease-out; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
#cardImg { display: block; height: min(40vh, 300px); aspect-ratio: 4 / 5; margin: 0 auto; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); }
.sheet-tip { font-size: 12px; color: var(--sub); text-align: center; margin: 12px 0; }
.sheet-row { display: flex; gap: 10px; margin-top: 10px; }

/* ═════════ 反馈（董事长 11-18；入口和表单照共享约定，不用实心色抢主按钮） ═════════ */
.fb-link { font-size: 12px; color: var(--sub); text-decoration: underline; text-underline-offset: 3px; padding: 6px 8px; }
.fb-card { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 12px 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .5); }
.fb-card p { flex: 1; font-size: 13px; color: var(--sub); line-height: 1.5; }
.btn.line { width: auto; flex: none; height: 36px; padding: 0 14px; border-radius: 10px; font-size: 14px; font-weight: 600; letter-spacing: 0; color: var(--acc); box-shadow: inset 0 0 0 1.5px rgba(var(--acc-rgb), .55); }
/* 卡片靠上放，手机键盘弹出来不挡输入框 */
.fb { position: absolute; inset: 0; z-index: 25; display: none; background: rgba(30, 20, 24, .4); overflow-y: auto; overscroll-behavior: contain; }
.fb.on { display: flex; align-items: flex-start; justify-content: center; padding: max(20px, 6vh) 16px 20px; }
.fb-box { width: 100%; max-width: 360px; background: var(--card); border-radius: 20px; padding: 10px 16px 14px; animation: fadeIn .2s; }
.fb-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.fb-title { font-size: 17px; font-weight: 700; }
.fb-head .icon-btn { margin-right: -10px; }
.fb-field { position: relative; margin-top: 12px; }
.fb textarea { display: block; width: 100%; border: 0; border-radius: 12px; background: rgba(var(--bg-rgb), .5); color: var(--ink); font-size: 16px; outline: none; }
.fb textarea { height: 132px; resize: none; padding: 12px 12px 28px; line-height: 1.55; }
.fb textarea:focus { box-shadow: inset 0 0 0 1.5px rgba(var(--acc-rgb), .45); }
.fb textarea::placeholder { color: var(--dim); }
.fb-count { position: absolute; right: 12px; bottom: 8px; font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; pointer-events: none; }
.fb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
#fbSend { height: 50px; margin-top: 14px; }
#fbSend:disabled { opacity: .4; cursor: default; }
.fb-privacy { font-size: 12px; color: var(--dim); text-align: center; margin-top: 10px; }

.toast { position: absolute; left: 50%; bottom: 100px; transform: translate(-50%, 10px); z-index: 30; max-width: 80%; background: rgba(43, 29, 34, .92); color: #fff; border-radius: 12px; padding: 10px 16px; font-size: 14px; text-align: center; opacity: 0; pointer-events: none; transition: all .25s; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (min-height: 760px) {
  .task-text { font-size: 24px; }
  .holder { font-size: 40px; }
}

/* 只有中文的提示条（手机语言不是中文才出，一次，15 秒自己消失；js/lang-hint.js）；浮在底部大按钮上面，不挡「开始」 */
.langhint { position: fixed; left: 12px; right: 12px; bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 60; max-width: 420px; margin: 0 auto; display: none; align-items: center; gap: 8px; padding: 9px 6px 9px 14px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow), 0 10px 30px rgba(0, 0, 0, .12); font-size: 13px; line-height: 1.45; color: var(--sub); -webkit-user-select: text; user-select: text; }
.langhint.on { display: flex; }
.langhint span { flex: 1; min-width: 0; }
.langhint button { flex: none; width: 30px; height: 30px; border-radius: 50%; font-size: 19px; line-height: 1; color: var(--dim); }
