:root {
  --accent: #f5a3c8; --accent-2: #b8a4ff; --accent-soft: #f5a3c824;
  --background: #130c16; --background-elevated: #1a1220;
  --foreground: #f7eef3; --foreground-soft: #e6d9e0; --muted: #f7eef385; --muted-strong: #f7eef3bd;
  --card-bg: #ffffff0d; --card-border: #ffffff1a; --card-border-hover: #b8a4ff73; --card-hover: #ffffff14;
  --go: #5ee3a1; --slow: #f0c35a; --stop: #ff6b7d; --nipple: #f7a8dc; --glans: #8cc4ff;
  --sans: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, sans-serif;
  --serif: "Noto Serif SC", "Songti SC", STSong, "Noto Serif CJK SC", serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--background); color: var(--foreground); font: 16px/1.6 var(--sans); -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; background: radial-gradient(80% 50% at 50% 0%, #2a1830 0%, transparent 70%), var(--background); }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
input, select { font: inherit; color: inherit; }
.kw { word-break: keep-all; overflow-wrap: anywhere; }
.wrap { max-width: 720px; margin: 0 auto; padding: 24px 16px 64px; }
.brand { display: flex; align-items: center; gap: 10px; margin: 4px 0 20px; }
.brand b { font-family: var(--serif); font-size: 22px; }
.badge { border: 1px solid var(--accent); color: var(--accent); border-radius: 999px; font-size: 11px; padding: 0 8px; font-weight: 700; }
.card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 20px; padding: 24px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
h1, h2 { font-family: var(--serif); margin: 0; }
h2 { font-size: 26px; }
.sub { color: var(--muted-strong); font-size: 13px; }
.muted { color: var(--muted); font-size: 13px; }
.note { color: var(--muted); font-size: 12.5px; margin: 6px 0 0; }
.btn-main { display: block; width: 100%; height: 56px; border: 0; border-radius: 999px; background: linear-gradient(100deg, #f5a3c8, #b8a4ff); color: #1a0a10; font-size: 18px; font-weight: 700; letter-spacing: .1em; box-shadow: 0 10px 28px rgba(245,163,200,.3); }
.btn-main:active { transform: scale(.99); }
.btn-sub { height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--card-border); background: transparent; font-size: 14px; color: var(--muted-strong); }
.btn-sub:hover { border-color: var(--card-border-hover); color: var(--foreground); }
.btn-accent { border-color: #f5a3c880; color: var(--accent); }
.btn-dark { background: #000; color: #fff; border-color: #000; }
.row { display: flex; flex-wrap: wrap; gap: 8px; }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.seg.c3 { grid-template-columns: repeat(3, 1fr); }
.seg.c2 { grid-template-columns: repeat(2, 1fr); }
.opt { min-height: 44px; padding: 6px 8px; border-radius: 999px; border: 1px solid var(--card-border); background: transparent; color: var(--foreground-soft); font-size: 14.5px; line-height: 1.25; }
.opt:hover { border-color: var(--card-border-hover); }
.opt[aria-checked="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.field { margin-top: 22px; }
.label { font-size: 12px; font-weight: 700; letter-spacing: .15em; color: var(--muted-strong); margin-bottom: 8px; }
.tabs { display: flex; border-bottom: 1px solid var(--card-border); margin: 18px 0 4px; }
.tab { flex: 1; background: none; border: 0; padding: 10px 0; color: var(--muted); font-size: 15px; border-bottom: 2px solid transparent; }
.tab[aria-selected="true"] { color: var(--foreground); font-weight: 700; border-bottom-color: var(--accent); }
.switch-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--card-border); background: transparent; margin-top: 8px; }
.switch-card.hl { border-color: #f5a3c899; background: #f5a3c80f; }
.switch-card .t { flex: 1; }
.switch-card .t b { display: block; font-weight: 500; font-size: 15px; }
.switch-card .t span { display: block; font-size: 12.5px; color: var(--muted); }
.sw { width: 48px; height: 28px; border-radius: 999px; background: #ffffff1f; position: relative; flex: none; transition: background .2s; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left .2s; }
.switch-card[aria-checked="true"] .sw { background: var(--accent); }
.switch-card[aria-checked="true"] .sw::after { left: 23px; }
.mixbar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; margin-top: 10px; }
.mixbar span:nth-child(1) { background: var(--go); } .mixbar span:nth-child(2) { background: var(--slow); } .mixbar span:nth-child(3) { background: var(--stop); }
.mixlegend { display: flex; gap: 14px; font-size: 12px; color: var(--muted-strong); margin-top: 6px; }
details.tune { margin-top: 10px; border: 1px solid var(--card-border); border-radius: 14px; padding: 10px 14px; }
details.tune summary { cursor: pointer; color: var(--muted-strong); font-size: 14px; }
.slider { display: grid; grid-template-columns: 7em 1fr 3.5em; align-items: center; gap: 10px; margin-top: 10px; font-size: 14px; }
.slider input { width: 100%; accent-color: var(--accent); }
.num { width: 80px; height: 38px; border-radius: 10px; border: 1px solid var(--card-border); background: #ffffff0a; padding: 0 10px; }
.txt { flex: 1; min-width: 0; height: 42px; border-radius: 12px; border: 1px solid var(--card-border); background: #ffffff0a; padding: 0 12px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.legend { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--card-border); font-size: 13px; color: var(--muted-strong); }
.legend p { margin: 4px 0; }
.list { margin-top: 10px; max-height: 420px; overflow: auto; border: 1px solid var(--card-border); border-radius: 12px; }
.list .item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid #ffffff0f; font-size: 14px; }
.list .item:last-child { border-bottom: 0; }
.list .item .grow { flex: 1; }
.list .item.off { opacity: .45; }
.mini { height: 30px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--card-border); background: transparent; font-size: 12px; color: var(--muted-strong); }
.top-actions { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.link { background: none; border: 0; color: var(--accent); font-size: 13px; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.age { max-width: 420px; margin: 18vh auto 0; text-align: center; }
.age h2 { margin: 10px 0 20px; }

/* ---------- 游戏中 ---------- */
.play { position: fixed; inset: 0; z-index: 50; background: var(--background); color: #fff; overflow: hidden; display: flex; flex-direction: column; user-select: none; -webkit-user-select: none; }
.play .bg { position: absolute; inset: 0; transition: background .5s ease; }
.play.paused .bg { filter: brightness(.45); }
.play .topbar { position: relative; display: flex; align-items: center; gap: 8px; padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top)); }
.play .count { font-family: var(--serif); font-weight: 800; color: #ffffffb3; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.play .count span { margin-left: 8px; color: #ffffff80; }
.play .clock { font-size: 18px; font-weight: 700; margin-right: 6px; font-variant-numeric: tabular-nums; }
.pill { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid #ffffff40; background: transparent; color: #fff; font-size: 12px; font-weight: 500; white-space: nowrap; }
.pill[aria-pressed="true"] { background: #ffffff1f; }
.icon { width: 30px; padding: 0; color: #ffffffcc; }
.play .center { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 24px; text-align: center; }
.modeline { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.modelabel { border: 1px solid; border-radius: 999px; padding: 3px 14px; font-size: 12px; font-weight: 700; letter-spacing: .25em; }
.bpm { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .2em; color: #ffffffb3; }
.beat { display: inline-block; width: 12px; height: 12px; border-radius: 50%; animation: beat var(--beat, .6s) ease-out infinite; }
@keyframes beat { 0% { opacity: .55; transform: scale(1); } 12% { opacity: 1; transform: scale(1.35); } to { opacity: .55; transform: scale(1); } }
.paused .beat, .paused .taskbar i { animation-play-state: paused; }
.toneline { font-size: 15px; color: #ffffffcc; margin: 4px 0; font-family: var(--serif); }
.cmd { font-family: var(--serif); font-weight: 700; font-size: calc(36px * var(--ts, 1)); line-height: 1.35; max-width: 1000px; text-shadow: 0 0 24px #0009, 0 2px 8px #000a; }
.cmd p { margin: 0; }
.hint { margin-top: 8px; font-size: 13px; color: #ffffffb3; }
.taskbar { width: 160px; height: 4px; border-radius: 999px; background: #ffffff1a; margin: 18px 0 26px; overflow: hidden; }
.taskbar i { display: block; height: 100%; border-radius: 999px; transform-origin: left; animation: shrink linear forwards; }
@keyframes shrink { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.edgebtn { min-width: 112px; height: 52px; padding: 0 22px; border-radius: 999px; border: 2px solid #ffffff99; background: #ffffff0d; color: #fff; font-size: 16px; font-weight: 700; }
.edgebtn:disabled { border-color: #ffffff33; color: #ffffff4d; background: transparent; }
.edgebtn:not(:disabled):active { transform: scale(.96); }
.edgehint { font-size: 12px; color: #ffffff80; margin: 10px 0 14px; }
.lostbtn { background: none; border: 0; color: #ffffff8c; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; padding: 6px 12px; }
.confirm { margin-top: 8px; background: #0e0a0ef2; border: 1px solid #ffffff14; border-radius: 12px; padding: 14px 16px; }
.confirm p { margin: 0 0 10px; }
.confirm .b1 { height: 38px; padding: 0 16px; border-radius: 999px; border: 0; background: #fff; color: #000; font-weight: 700; }
.confirm .b2 { height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid #ffffff59; background: transparent; color: #fff; margin-left: 8px; }
.play .bottom { position: relative; padding: 0 16px 12px; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
.sessionbar { display: flex; align-items: center; gap: 10px; }
.sessionbar .track { flex: 1; height: 8px; border-radius: 999px; background: #ffffff1a; overflow: hidden; }
.sessionbar .fill { height: 100%; border-radius: 999px; transition: background .5s; }
.sessionbar span { font-size: 11px; color: #ffffff99; font-variant-numeric: tabular-nums; }
.keys { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; font-size: 11px; color: #ffffff99; }
.toast { position: absolute; left: 50%; top: 70px; transform: translateX(-50%); background: #000c; border-radius: 999px; padding: 6px 16px; font-size: 13px; z-index: 3; }
.pop { position: absolute; right: 16px; top: 52px; z-index: 5; width: 260px; background: #1a1220f2; border: 1px solid var(--card-border); border-radius: 14px; padding: 10px 14px; }
.pop .slider { grid-template-columns: 4.5em 1fr 3em; }
.guide { position: absolute; inset: 0; z-index: 6; background: #000a; display: flex; align-items: flex-end; justify-content: center; padding: 24px; }
.guide .g { width: min(420px, 100%); background: var(--background-elevated); border: 1px solid var(--card-border); border-radius: 16px; padding: 18px; margin-bottom: 8vh; }
.guide .g small { color: var(--accent); }
.guide .g h3 { margin: 4px 0 6px; font-family: var(--serif); }
.guide .g p { margin: 0 0 14px; color: var(--foreground-soft); font-size: 14px; }
.ring { position: absolute; z-index: 6; border: 2px solid var(--accent); border-radius: 16px; box-shadow: 0 0 0 9999px #0000; pointer-events: none; transition: all .25s; }


/* 兴奋状态条（温度计） */
.meter { --glow: rgba(245,163,200,.6); --breath: 2.4s; position: absolute; z-index: 2; left: 16px; top: 64px; bottom: 74px; width: 76px; display: flex; flex-direction: column; align-items: center; }
.meter[hidden] { display: none; }
.meter .tube { position: relative; flex: 1; min-height: 110px; width: 24px; border-radius: 12px 12px 0 0; border: 1px solid var(--card-border); border-bottom: 0; background: #ffffff0f; animation: mglow var(--breath) ease-in-out infinite; }
.meter .zone { position: absolute; left: 0; right: 0; top: 0; height: 33.333%; border-radius: 12px 12px 0 0; background: #b8a4ff1a; }
.meter .split { position: absolute; left: -6px; right: -6px; top: 33.333%; border-top: 1px dashed #f5a3c899; }
.meter .merc { position: absolute; left: 4px; right: 4px; bottom: 0; height: 0; border-radius: 8px 8px 0 0; background: linear-gradient(0deg, #f5a3c8 0%, #b8a4ff 60%, #ff6b7d 100%) no-repeat bottom / 100% 100%; box-shadow: 0 0 14px var(--glow); transition: height .15s linear; }
.meter .merc .top { position: absolute; left: -5px; right: -5px; top: -2px; height: 4px; border-radius: 999px; background: #fff; box-shadow: 0 0 10px #fff; animation: blink 1s ease-in-out infinite; }
.meter .pct { position: absolute; left: calc(100% + 8px); bottom: 0; transform: translateY(50%); font-size: 12px; font-weight: 700; color: #fff; white-space: nowrap; text-shadow: 0 1px 4px #000; animation: blink 1s ease-in-out infinite; transition: bottom .15s linear; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.paused .meter .top, .paused .meter .pct { animation-play-state: paused; }
.dial { flex: none; width: 72px; height: 72px; margin-top: -4px; border-radius: 50%; border: 0; background: linear-gradient(140deg, #f5a3c8, #b8a4ff); color: #1a0a10; display: grid; place-items: center; animation: dglow var(--breath) ease-in-out infinite; touch-action: manipulation; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; transition: filter .2s, transform .2s; }
.dial.draining { filter: saturate(.55) brightness(.8); transform: scale(.94); }
.dial:disabled { opacity: .45; animation: none; }
.dial.bump { animation: bump .18s ease-out, dglow var(--breath) ease-in-out infinite; }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(.9); } 100% { transform: scale(1); } }
@keyframes mglow { 0%, 100% { box-shadow: 0 0 6px 0 var(--glow); } 50% { box-shadow: 0 0 24px 6px var(--glow); } }
@keyframes dglow { 0%, 100% { box-shadow: 0 0 0 5px rgba(255,255,255,.06), 0 0 16px 2px var(--glow); } 50% { box-shadow: 0 0 0 12px rgba(255,255,255,.03), 0 0 36px 10px var(--glow); } }
.paused .meter .tube, .paused .dial { animation-play-state: paused; }
.mopts { position: absolute; left: calc(100% + 14px); bottom: 12px; display: flex; gap: 10px; align-items: flex-end; }
.optbtn { height: 48px; padding: 0 22px; border-radius: 999px; border: 2px solid #ffffffb3; background: #0000004d; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); color: #fff; font-size: 16px; font-weight: 700; white-space: nowrap; animation: fadeup .2s ease-out; }
.optbtn.lost { border-color: var(--stop); color: #ffd6dc; }
.optbtn:disabled { border-color: #ffffff33; color: #ffffff4d; }
.optbtn:not(:disabled):active { transform: scale(.96); }
.mopts .confirm { width: 230px; margin: 0; animation: fadeup .2s ease-out; }
.mopts .confirm .b2 { margin-left: 6px; }
@keyframes fadeup { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.play .center { padding: 0 120px; }
@media (max-width: 760px) { .play .center { padding-left: 104px; padding-right: 16px; } }
@media (max-height: 480px) and (orientation: landscape) { .meter { top: 52px; bottom: 56px; } .dial { width: 56px; height: 56px; } .meter .tube { min-height: 70px; } }

/* 许可 */
.reward .center h1 { font-size: 44px; margin: 6px 0; }
.eyebrow { font-size: 11px; letter-spacing: .35em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.rewardbar { width: min(420px, 80vw); height: 8px; border-radius: 999px; background: #ffffff26; margin: 22px 0 10px; overflow: hidden; }
.rewardbar i { display: block; height: 100%; background: #fff; transform-origin: left; animation: shrink linear forwards; }

/* 结果 */
.arc { width: 100%; display: block; overflow: visible; }
.arc .line { stroke-dasharray: 2000; stroke-dashoffset: 2000; animation: draw 1.6s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.arc .pt { opacity: 0; transform-box: fill-box; transform-origin: center; animation: popin .6s forwards; }
@keyframes popin { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }
.axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 2px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0 8px; }
.stats dt { font-size: 12px; color: var(--muted); }
.stats dd { margin: 0; font-family: var(--serif); font-size: 24px; }
.stamps { display: inline-flex; gap: 4px; vertical-align: middle; margin: 0 10px; }
.stamps i { width: 12px; height: 12px; border-radius: 50%; border: 1px solid #f5a3c866; }
.stamps i.on { background: var(--accent); border-color: var(--accent); }
.streak { display: flex; gap: 16px; align-items: center; margin-top: 16px; padding: 16px; border-radius: 16px; background: #1a122066; border: 1px solid var(--card-border); }
.streak .big { font-family: var(--serif); font-size: 40px; line-height: 1; }
.streak .big small { font-size: 14px; margin-left: 2px; }
.steps { display: flex; gap: 4px; margin-top: 8px; }
.steps i { flex: 1; height: 4px; border-radius: 999px; background: #ffffff1a; }
.steps i.on { background: var(--accent); }
.history { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 10px; }
.history td { padding: 6px 4px; border-bottom: 1px solid #ffffff0f; color: var(--foreground-soft); }
.lobby { text-align: center; }
.lobby .big { font-family: var(--serif); font-size: 56px; font-variant-numeric: tabular-nums; margin: 10px 0; }
.linkbox { word-break: break-all; font-size: 12px; background: #ffffff0a; border: 1px solid var(--card-border); border-radius: 10px; padding: 10px; text-align: left; margin: 12px 0; user-select: all; }

@media (max-width: 560px) {
  .card { padding: 18px 14px; }
  .seg { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .opt { font-size: 13.5px; padding: 6px 4px; }
  .cmd { font-size: calc(28px * var(--ts, 1)); }
  .play .keys .k { display: none; }
  .pill { padding: 0 9px; }
  .pill.fs { display: none; }
  .play .count { font-size: 14px; }
  .reward .center h1 { font-size: 36px; }
}
@media (hover: none) { .play .keys .k { display: none; } }
@media (max-height: 480px) and (orientation: landscape) {
  .cmd { font-size: calc(24px * var(--ts, 1)); }
  .taskbar { margin: 8px 0 12px; }
  .edgehint { display: none; }
}

/* ---------- 多人玩法 ---------- */
.seg.c5 { grid-template-columns: repeat(5, 1fr); }
.brand .btn-sub { height: 36px; font-size: 13px; }
.roomcard { display: block; width: 100%; text-align: left; margin-top: 10px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--card-border); background: #ffffff08; color: var(--foreground); font-size: 15px; line-height: 1.5; }
.roomcard:hover { border-color: var(--card-border-hover); background: var(--card-hover); }
.roomcard small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.rtag { font-size: 12px; color: #ffffffb3; border: 1px solid #ffffff2e; border-radius: 999px; padding: 3px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
/* 圆盘旁的引导文字：比指令淡很多 */
.dialhint { position: absolute; left: calc(100% + 14px); bottom: 26px; width: max-content; max-width: 46vw; font-size: 12px; line-height: 1.4; color: #ffffff59; pointer-events: none; }
.mopts:not(:empty) ~ .dialhint { display: none; }
.meter.ro .dial { cursor: default; }
/* 控制者选指令面板 */
.play.with-picker .center { padding-right: 400px; }
.play.with-picker .meter { bottom: 74px; }
.picker { position: absolute; z-index: 4; right: 16px; top: 60px; bottom: 74px; width: 368px; display: flex; flex-direction: column; background: #1a1220e6; border: 1px solid var(--card-border); border-radius: 16px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); overflow: hidden; }
.picker .ph { padding: 12px 14px; border-bottom: 1px solid var(--card-border); display: flex; flex-direction: column; gap: 4px; }
.picker .ph .mini { align-self: flex-start; }
.picker .pgroups { overflow: auto; padding: 6px 8px 12px; scrollbar-color: #ffffff33 transparent; scrollbar-width: thin; }
.picker details { border-bottom: 1px solid #ffffff0f; }
.picker summary { cursor: pointer; padding: 10px 6px; font-weight: 700; font-size: 14px; display: flex; justify-content: space-between; color: var(--foreground-soft); }
.picker summary small { color: var(--muted); font-weight: 400; }
.pitem { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 8px 10px; margin: 2px 0; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--foreground-soft); font-size: 14px; line-height: 1.4; }
.pitem:hover { background: #ffffff0d; }
.pitem .kw { flex: 1; }
.pitem small { color: var(--muted); font-size: 11px; }
.pitem.sel { background: var(--accent-soft); border-color: var(--accent); color: #fff; box-shadow: 0 0 14px #f5a3c84d; }
.play .overlay { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; background: #130c16d9; text-align: center; padding: 24px; }
.play .overlay[hidden] { display: none; }
.play .overlay .big { font-family: var(--serif); font-size: 72px; line-height: 1.1; margin: 10px 0; }
/* 管理页内嵌画面 */
.play.embed { position: relative; inset: auto; height: 46vh; min-height: 300px; border-radius: 16px; border: 1px solid var(--card-border); z-index: 1; }
.play.embed .cmd { font-size: calc(26px * var(--ts, 1)); }
@media (max-width: 760px) {
  .play.with-picker .center { padding-right: 16px; justify-content: flex-start; padding-top: 8px; }
  .play.with-picker .picker { left: 104px; right: 8px; top: auto; bottom: 64px; height: 46vh; width: auto; }
  .play.with-picker .center .cmd { font-size: 22px; }
  .seg.c5 { grid-template-columns: repeat(3, 1fr); }
  .brand .btn-sub { padding: 0 12px; }
}

/* 麦克风出错说明 */
.mhelp { position: fixed; inset: 0; z-index: 100; background: #000a; display: grid; place-items: center; padding: 16px; }
.mhelp-card { width: min(460px, 100%); max-height: 86vh; overflow: auto; background: var(--background-elevated); border: 1px solid var(--card-border); border-radius: 16px; padding: 18px 20px; }
.mhelp-card h3 { margin: 0 0 8px; font-family: var(--serif); }
.mhelp-card p, .mhelp-card li { font-size: 14px; color: var(--foreground-soft); line-height: 1.6; }
.mhelp-card ol { padding-left: 20px; margin: 8px 0; }
.mhelp-card li { margin: 6px 0; }

/* 圆盘：心形 + “兴奋” */
.dial { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.dial .dlabel { font-size: 12px; font-weight: 800; letter-spacing: .15em; line-height: 1; margin-left: .15em; }
@media (max-height: 480px) and (orientation: landscape) { .dial svg { width: 18px; height: 18px; } .dial .dlabel { font-size: 10px; } }

/* 红色确认按钮 */
.btn-danger { border-color: var(--stop); color: #fff; background: #ff6b7d33; }

/* 匹配大厅：收起后的筛选标题 */
.filters.collapsed { padding: 12px 16px; }
.ftitle { display: flex; align-items: center; gap: 12px; width: 100%; background: none; border: 0; padding: 4px 0; text-align: left; color: var(--foreground-soft); font-size: 14px; }
.ftitle .kw { flex: 1; }
.ftitle .fedit { color: var(--accent); white-space: nowrap; font-size: 13px; }
.btn-main:disabled { opacity: .4; box-shadow: none; }

/* 房间卡片：发光 + 呼吸。待匹配 = 红色快闪，可旁听 = 淡绿色慢呼吸 */
.roomcard { display: flex; align-items: center; gap: 14px; cursor: default; }
.roomcard:hover { background: #ffffff08; }
.roomcard .rc-text { flex: 1; min-width: 0; }
.roomcard.wait { border-color: #ff6b7d; animation: rcWait 1s ease-in-out infinite; }
.roomcard.watch { border-color: #8fe3b4; animation: rcWatch 3.2s ease-in-out infinite; }
@keyframes rcWait { 0%, 100% { box-shadow: 0 0 4px 0 #ff6b7d55, inset 0 0 0 0 #ff6b7d00; } 50% { box-shadow: 0 0 22px 4px #ff6b7dcc, inset 0 0 12px 0 #ff6b7d33; } }
@keyframes rcWatch { 0%, 100% { box-shadow: 0 0 3px 0 #8fe3b433; } 50% { box-shadow: 0 0 18px 3px #8fe3b488; } }
.rcbtn { flex: none; height: 40px; padding: 0 18px; border-radius: 999px; font-weight: 700; font-size: 14px; border: 0; white-space: nowrap; }
.roomcard.wait .rcbtn { background: #ff6b7d; color: #fff; box-shadow: 0 4px 14px #ff6b7d66; }
.roomcard.watch .rcbtn { background: #8fe3b4; color: #0b2a1b; }
.rcbtn:active { transform: scale(.96); }
.roomcard.nowatch { opacity: .75; }
.roomcard.nowatch .rcbtn, .rcbtn:disabled { background: #ffffff1a; color: #ffffff66; box-shadow: none; cursor: not-allowed; }
.rcbtn:disabled:active { transform: none; }
@media (prefers-reduced-motion: reduce) { .roomcard.wait, .roomcard.watch { animation: none; } }

/* 管理页：语音诊断 */
.vdiag .vd { margin-top: 10px; border: 1px solid var(--card-border); border-radius: 12px; padding: 10px 12px; background: #ffffff06; font-size: 13px; }
.vdiag .vd b { font-size: 14px; }
.vdiag table.t tr.bad td { color: var(--stop); }
.vderr { margin-top: 8px; border-left: 3px solid var(--stop); padding: 4px 10px; background: #ff6b7d12; border-radius: 6px; max-height: 160px; overflow: auto; }
.vderr div { color: #ffd6dc; margin: 2px 0; }
.vderr div.minor { color: var(--muted-strong); }
.vdiag table.kv th { width: 7.5em; white-space: nowrap; }
.vdiag table.t td small { line-height: 1.4; }
.vdiag table.t { table-layout: auto; }
.vdiag .vd { overflow-x: auto; }

/* 站点标识：非游戏页面左上角粗体 + 页尾居中；游戏画面右下角小字（与底部说明同字号同颜色） */
.site-top { padding: 14px 20px 0; }
.site-top a, .site-top span { font-weight: 800; font-size: 17px; letter-spacing: .02em; color: var(--foreground); text-decoration: none; }
.site-foot { text-align: center; padding: 28px 16px 36px; color: var(--muted); font-size: 13px; letter-spacing: .04em; }
.play .keys .site-mini { margin-left: auto; }
/* 首页：标题单独一行，18+ 和“我要控制别人”放在下一行 */
.brand.home-title { margin-bottom: 8px; }
.brand-row { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; }
.brand-row .btn-sub { height: 36px; font-size: 13px; }

/* 等待匹配：分享房间 */
.sharebox { margin: 18px 0 6px; padding: 14px; border: 1px solid var(--card-border); border-radius: 14px; background: #ffffff06; }
.sharebox .linkbox { margin: 10px 0 0; text-align: center; }
.btn-x { background: #000; color: #fff; border-color: #ffffff33; }

/* 控制者自己写指令 */
.pcustom { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.pcustom .txt { flex: none; height: 40px; min-height: 40px; font-size: 14px; }
.cbtns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cbtn { height: 36px; border-radius: 999px; border: 0; font-weight: 700; font-size: 13px; color: #10130f; }
.cbtn.go { background: var(--go); }
.cbtn.slow { background: var(--slow); }
.cbtn.stop { background: var(--stop); color: #fff; }
.cbtn:active { transform: scale(.96); }

/* ---------- 被控者快捷回馈 ---------- */
.fbbtn { position: absolute; z-index: 4; right: 16px; bottom: 74px; height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid #ffffff66; background: #00000059; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); color: #fff; font-size: 15px; font-weight: 700; }
.fbbtn.on { background: #ffffff26; border-color: #fff; }
.fbsheet { position: absolute; z-index: 5; right: 16px; bottom: 126px; width: min(340px, calc(100vw - 120px)); max-height: calc(100% - 200px); overflow: auto; background: #1a1220f2; border: 1px solid var(--card-border); border-radius: 16px; padding: 12px; animation: fadeup .15s ease-out; }
.fbsheet[hidden] { display: none; }
.fbhead { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.fbhead small { color: var(--muted); font-size: 11px; }
.fbtitle { font-size: 12px; color: var(--muted); margin: 10px 0 6px; }
.fbkeys { display: flex; flex-wrap: wrap; gap: 6px; }
.fbk { padding: 8px 12px; border-radius: 999px; border: 1px solid #ffffff40; background: #ffffff0d; color: #fff; font-size: 14px; }
.fbk:active { transform: scale(.96); }
.fbk:disabled { opacity: .4; }
.fbgroup.stop .fbk { border-color: #ff6b7d99; color: #ffd6dc; background: #ff6b7d1a; }
.fbk.resume { width: 100%; margin: 4px 0 2px; border-color: var(--go); color: #d8ffe9; background: #5ee3a124; font-weight: 700; }
/* 控制者 / 旁观者 / 管理页看到的回馈 */
.fbfeed { position: absolute; z-index: 6; left: 50%; top: 58px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; }
.fbmsg { background: #000000b3; border: 1px solid #ffffff40; border-radius: 999px; padding: 7px 16px; font-size: 15px; font-weight: 700; white-space: nowrap; animation: fadeup .2s ease-out; }
.fbmsg.stop { border-color: var(--stop); color: #ffd6dc; box-shadow: 0 0 16px #ff6b7d66; }
.fbmsg.ok { border-color: var(--go); color: #d8ffe9; }
.fblog { font-size: 13px; line-height: 1.7; max-height: 160px; overflow: auto; }
.fblog .stop { color: var(--stop); }
@media (max-width: 760px) {
  .play .fbbtn { top: max(58px, calc(env(safe-area-inset-top) + 46px)); bottom: auto; right: 12px; height: 38px; padding: 0 16px; }
  .play .fbsheet { top: max(102px, calc(env(safe-area-inset-top) + 90px)); bottom: auto; right: 12px; max-height: calc(100% - 190px); }
  .play .toast { max-width: calc(100vw - 200px); white-space: normal; border-radius: 14px; }
  .fbmsg { font-size: 14px; }
}

/* ---------- 首页三种玩法 ---------- */
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 18px; }
.modes.two { grid-template-columns: repeat(2, 1fr); }
.modecard { --c: 245,163,200; position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-height: 230px; padding: 22px 20px; text-align: left; border-radius: 20px; border: 1px solid rgba(var(--c), .35); background: radial-gradient(120% 90% at 0% 0%, rgba(var(--c), .22), transparent 70%), #ffffff08; color: var(--foreground); box-shadow: 0 0 22px rgba(var(--c), .12); transition: transform .15s, box-shadow .2s, border-color .2s; }
.modecard:hover { transform: translateY(-3px); border-color: rgba(var(--c), .8); box-shadow: 0 0 34px rgba(var(--c), .3); }
.modecard:active { transform: scale(.98); }
.modecard b { font-family: var(--serif); font-size: 20px; line-height: 1.3; white-space: nowrap; }
.mc-desc { text-wrap: pretty; }
.mc-tag { font-size: 11px; letter-spacing: .2em; font-weight: 700; color: rgb(var(--c)); border: 1px solid rgba(var(--c), .5); border-radius: 999px; padding: 2px 10px; }
.mc-desc { font-size: 14px; line-height: 1.6; color: var(--foreground-soft); flex: 1; }
.mc-go { font-weight: 700; color: rgb(var(--c)); }
.m-solo { --c: 94,227,161; } .m-online { --c: 245,163,200; } .m-private { --c: 184,164,255; }
@media (max-width: 760px) { .modes, .modes.two { grid-template-columns: 1fr; gap: 12px; } .modecard { min-height: 0; padding: 18px 16px; } .modecard b { font-size: 21px; } }
/* 大厅顶部两个建房按钮 */
.creates { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.createbtn { --c: 245,163,200; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 10px; border-radius: 18px; border: 1px solid rgba(var(--c), .55); background: rgba(var(--c), .12); color: var(--foreground); text-align: center; transition: box-shadow .2s, transform .15s; }
.createbtn.c-dom { --c: 184,164,255; }
.createbtn:hover { box-shadow: 0 0 26px rgba(var(--c), .35); }
.createbtn:active { transform: scale(.98); }
.createbtn small { font-size: 12px; letter-spacing: .15em; color: rgb(var(--c)); font-weight: 700; }
.createbtn b { font-family: var(--serif); font-size: 19px; line-height: 1.35; }
.createbtn span { font-size: 12px; color: var(--muted); }
.frow { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.frow .fl { flex: none; width: 3.6em; font-size: 13px; color: var(--muted); }
.frow .seg { flex: 1; }
.roomopts { margin-top: 18px; padding: 14px 14px 4px; border-radius: 16px; border: 1px solid var(--card-border); background: #ffffff06; }
.roomopts .field:first-of-type { margin-top: 8px; }
/* 旁听人数角标 */
.specchip { position: absolute; z-index: 3; left: 104px; top: 54px; display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; border: 1px solid #ffffff33; background: #00000059; color: #ffffffb3; font-size: 12px; white-space: nowrap; pointer-events: none; }
.specchip[hidden] { display: none; }
.specchip i { width: 7px; height: 7px; border-radius: 50%; background: #9be8c0; }
.specchip.new { border-color: #9be8c0; color: #fff; animation: specin .45s cubic-bezier(.2,1.4,.4,1), specglow 1.3s ease-in-out .45s 3; }
.specchip.new i { animation: blink .65s ease-in-out infinite; }
@keyframes specin { from { opacity: 0; transform: translateX(-14px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes specglow { 0%, 100% { box-shadow: 0 0 0 0 #9be8c000; } 50% { box-shadow: 0 0 14px 2px #9be8c080; } }
@media (max-width: 760px) { .play .fbfeed { top: 86px; } .play .toast { top: 100px; } }
@media (prefers-reduced-motion: reduce) { .specchip.new, .specchip.new i { animation: none; } }

/* ---------- 再玩一局 ---------- */
.rm-box { margin-top: 16px; text-align: center; min-height: 44px; }
.rm-box:empty { display: none; }
.rm-btn { height: 46px; padding: 0 26px; font-size: 16px; font-weight: 700; }
.rm-msg { margin: 6px 0 10px; font-size: 15px; }
.rm-ask { padding: 12px; border-radius: 14px; border: 1px solid var(--accent); background: var(--accent-soft); animation: fadeup .2s ease-out; }
.rm-dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--accent); animation: blink 1s ease-in-out infinite; }
.ov .rm-box { margin: 14px 0; }
.rm-box.top { margin: 0 0 16px; }

/* ---------- 页面下方的说明文字、页脚导航 ---------- */
.seo { max-width: 720px; margin: 0 auto; padding: 8px 16px 8px; color: var(--foreground-soft); font-size: 14.5px; line-height: 1.8; }
.seo[hidden] { display: none; }
.seo h1 { font-family: var(--serif); font-size: 22px; margin: 18px 0 8px; color: var(--foreground); }
.seo h2 { font-family: var(--serif); font-size: 17px; margin: 22px 0 6px; color: var(--foreground); }
.seo h3 { font-size: 15px; margin: 16px 0 2px; color: var(--foreground); }
.seo p { margin: 6px 0; }
.seo ul, .seo ol { margin: 6px 0; padding-left: 1.3em; }
.seo a { color: var(--accent); }
.foot-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-bottom: 14px; }
.foot-nav a { color: var(--foreground-soft); text-decoration: none; font-size: 13px; }
.foot-nav a:hover { color: var(--accent); }
