/* 发情节拍器 · 样式（定版：樱粉软糖，2026-10-16 董事长和嫂子选的）
   浅色奶粉底 + 玫红，圆滚滚按钮、粗环，可爱但一眼 18+。风格色由 html[data-style] 切换。 */

:root {
  --bg: #fff1f6;
  --bg2: #ffd9e6;
  --card: #ffffff;
  --card2: #ffe4ee;
  --line: rgba(255, 77, 148, 0.18);
  --ink: #3b1427;
  --ink2: #8c4f6b;
  --ink3: #b98aa0;
  --gold: #f2a33a;
  --accent: #ff4d94;
  --accent2: #ff8fb8;
  --glow: rgba(255, 77, 148, 0.35);
  --shadow: rgba(255, 77, 148, 0.4);
  --font-display: 'ZCOOL KuaiLe', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --track: rgba(255, 77, 148, 0.12);
  --veil: rgba(255, 228, 238, 0.65);
  --veil-strong: rgba(255, 241, 246, 0.96);
  --chip: rgba(255, 255, 255, 0.92);
  --sheet: #fff7fa;
  --surface: #ffffff;   /* 白底小部件：分段按钮、白按钮、结束页小标签、滑块圆钮 */
  --bg3: #ffe3c2;       /* 右下角那团暖光 */
  --cue: #e0245e;       /* 催促句的颜色 */
}
html[data-style="G"] { --accent: #ff4d94; --accent2: #ff8fb8; --glow: rgba(255, 77, 148, 0.35); --bg2: #ffd9e6; }
html[data-style="P"] { --accent: #ff6b6b; --accent2: #ffa3a3; --glow: rgba(255, 107, 107, 0.35); --bg2: #ffe0dc; }
html[data-style="S"] { --accent: #e0245e; --accent2: #ff5c8a; --glow: rgba(224, 36, 94, 0.35); --bg2: #ffc9db; }

/* touch-action: manipulation：手机上连点「跳过」不会被当成双击放大页面（董事长 2026-10-26），两指缩放照旧能用 */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
html, body { height: 100%; }
/* 整站：html 不滚，body 当滚动容器。苹果的下拉刷新只认最外层页面，所以永远触发不到；
   body 自己还能上下弹（.screen 故意比屏幕高 1 像素，没内容可滚也能弹一下）。 */
html { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--font-body);
  position: fixed; inset: 0; width: 100%; height: 100%;
  overflow-x: hidden; overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(90% 50% at 10% 0%, var(--bg2) 0%, transparent 60%),
    radial-gradient(70% 40% at 100% 100%, var(--bg3) 0%, transparent 60%),
    var(--bg);
  transition: background 0.6s ease;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hidden { display: none !important; }

.screen { max-width: 480px; margin: 0 auto; padding: 12px 16px calc(20px + var(--safe-b)); min-height: calc(100% + 1px); display: flex; flex-direction: column; }

/* ---------- 品牌 ---------- */
.brand { position: relative; padding: 8px 0 2px; }
.brand-row { display: flex; align-items: baseline; gap: 12px; padding-right: 86px; }
.brand-title {
  margin: 0;
  font: 400 44px/1 var(--font-display);
  color: var(--accent);
  letter-spacing: 0.02em;
}
/* 标题五个字跟着节拍一个接一个跳，一直跳 */
.brand-title span { display: inline-block; animation: hop 1.6s ease-in-out infinite; transform-origin: 50% 100%; }
.brand-title span:nth-child(1) { animation-delay: 0s; }
.brand-title span:nth-child(2) { animation-delay: 0.12s; }
.brand-title span:nth-child(3) { animation-delay: 0.24s; }
.brand-title span:nth-child(4) { animation-delay: 0.36s; }
.brand-title span:nth-child(5) { animation-delay: 0.48s; }
@keyframes hop {
  0%, 55%, 100% { transform: translateY(0) scale(1); }
  18% { transform: translateY(-10px) scale(1.08, 0.94); }
  32% { transform: translateY(0) scale(0.96, 1.06); }
  42% { transform: translateY(-3px) scale(1); }
}
.seal {
  display: inline-block; transform: rotate(-8deg); align-self: center;
  border: 2px solid var(--accent); color: var(--accent); background: var(--surface); border-radius: 999px;
  padding: 1px 8px; font: 700 13px/1.4 var(--font-body); letter-spacing: 0.08em;
}
.brand-sub { margin: 8px 0 0; color: var(--ink2); font-size: 13px; letter-spacing: 0.04em; }
/* 右上角两个小圆钮：亮暗切换 + 设置 */
.head-btns { position: absolute; right: -8px; top: 4px; display: flex; gap: 0; }
.icon-btn { width: 38px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--ink2); }
.icon-btn:active { background: var(--card2); }
.icon-btn .ico-sun { display: none; }
html[data-theme="dark"] .icon-btn .ico-sun { display: block; }
html[data-theme="dark"] .icon-btn .ico-moon { display: none; }
@media (max-width: 400px) { .brand-title { font-size: 40px; } }

/* 称号小牌：主页上一枚胶囊，点开称号墙（位置待董事长定：顶部副标题下 / 底部开始键下） */
.badge {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 5px 12px 5px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 4px 14px -10px var(--shadow);
  font-size: 12px; color: var(--ink2); letter-spacing: 0.04em;
}
.badge svg { color: var(--gold); }
.badge b { font-weight: 700; color: var(--ink); }
.badge span { color: var(--ink3); }
.badge:active { transform: scale(0.97); }
/* 跟在副标题后面：一行放得下就同一行，放不下就换到下一行靠右 */
/* 小字和勋章一行：放不下时小字在左边折成两行，勋章不再单独掉到下一行（2026-10-25 小屏上整页因此高出 38px） */
.brand-sub.with-badge { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 6px 8px; font-size: 12px; }
.brand-sub.with-badge > span { flex: 1 1 auto; min-width: 0; text-wrap: balance; }   /* 折两行时两行差不多长，别第二行只剩两个字 */
.brand-sub.with-badge .badge { margin-top: 0; margin-left: auto; flex: none; }
.badge.badge-mini { padding: 3px 10px 3px 8px; gap: 5px; }
.badge.badge-mini > span { display: none; }
/* 结束页：本局新解锁的称号 */
.new-titles { margin: 14px 0 2px; }
.nt-label { font-size: 12px; color: var(--ink3); letter-spacing: 0.3em; text-indent: 0.3em; margin-bottom: 8px; }
.nt-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.nt-chips .badge { margin: 0; font-size: 14px; padding: 7px 14px 7px 12px; animation: pop 0.5s ease-out; border-color: var(--accent); }
.nt-chips .badge b { color: var(--accent); }
/* 称号墙 */
.t-head { display: flex; align-items: center; gap: 4px; padding: 6px 0 2px; }
.t-head h2 { margin: 0; font: 400 30px/1.2 var(--font-display); color: var(--accent); flex: 1; }
.t-count { font-size: 13px; color: var(--ink3); letter-spacing: 0.05em; }
.t-back { width: 40px; height: 40px; margin-left: -12px; border-radius: 50%; display: grid; place-items: center; color: var(--ink2); font-size: 30px; line-height: 1; padding-bottom: 4px; }
.t-back:active { background: var(--card2); }
.titles { display: grid; gap: 8px; margin-top: 12px; }
.title-item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 16px; text-align: left; background: var(--card); border: 1px solid transparent; box-shadow: 0 6px 20px -12px var(--shadow); color: var(--ink); transition: transform 0.15s; }
.title-item:active { transform: scale(0.985); }
.title-item .medal { width: 26px; height: 26px; flex: none; color: var(--gold); }
.title-item .t-text { flex: 1; min-width: 0; }
.title-item b { display: block; font-size: 15px; }
.title-item small { display: block; font-size: 12px; color: var(--ink3); margin-top: 1px; }
.title-item .t-side { font-size: 11px; color: var(--ink3); white-space: nowrap; }
.title-item .t-side.on { color: var(--accent); font-weight: 700; }
.title-item.locked { opacity: 0.55; }
.title-item.locked .medal { color: var(--ink3); }
/* 没解锁的「？？？」全角问号字形比汉字靠左一点，看着凸出来（董事长 2026-10-21），往右挪 1 像素 */
.title-item.locked small { text-indent: 0.1em; }
.title-item.worn { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset, 0 10px 26px -12px var(--glow); }
html[data-theme="dark"] .title-item { border-color: var(--line); }
html[data-theme="dark"] .title-item.worn { border-color: var(--accent); }
/* 无限模式的「求高潮」：三个控制键上面一整条，轻轻呼吸 */
.cum { width: 100%; margin-top: 14px; padding: 13px; border-radius: 999px; font-size: 17px; font-weight: 900; letter-spacing: 0.3em; text-indent: 0.3em; color: #fff; position: relative; z-index: 21;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: 0 14px 30px -12px var(--glow); animation: cumPulse 1.8s ease-in-out infinite; }
@keyframes cumPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.025); } }
.cum:active { transform: scale(0.97); animation: none; }
.cum + .controls { margin-top: 10px; }
.badge-row .badge { margin-top: 0; }

/* ---------- 区块 ---------- */
.block { margin-top: 16px; }
.block.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
/* 时长 5 个、强度 3 个按钮要一样宽（董事长 2026-10-21：时长是竖椭圆不好看，强度字太散）：
   按按钮个数分两栏。每栏外框 = 按钮 + 按钮间 4px + 左右内边距 4px + 边框 1px；左栏 5b+26，右栏 3b+18，中间 14px */
.block.two { grid-template-columns: calc((100% - 58px) * 5 / 8 + 26px) 1fr; }
.label {
  margin: 0 0 8px; font-size: 12px; font-weight: 500; color: var(--ink3); letter-spacing: 0.3em;
  display: flex; align-items: center; gap: 10px;
}
.label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.styles { display: grid; gap: 8px; }
.style-card {
  position: relative; text-align: left; padding: 11px 16px 10px; border-radius: 18px;
  background: var(--card); border: 1px solid transparent; box-shadow: 0 6px 20px -12px var(--shadow);
  display: grid; gap: 2px; transition: border-color 0.25s, box-shadow 0.25s, transform 0.15s;
  overflow: hidden;
}
.style-card::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(90% 120% at 100% 0%, var(--glow), transparent 60%);
}
.style-card b { font-size: 17px; font-weight: 700; letter-spacing: 0.06em; position: relative; }
.style-card span { font-size: 12px; color: var(--ink2); position: relative; }
.style-card i { font-style: normal; font-size: 12px; color: var(--ink3); position: relative; margin-top: 4px; }
/* 有没有语音的小标（三套都有语音后 app.js 就不画了） */
/* 「语音录制中」只是淡色小字（不带框，不像按钮）；「真人语音」保留粉色小标签 */
.voice-tag { position: absolute; top: 16px; right: 14px; font-style: normal; font-size: 11px; line-height: 1; color: var(--ink3); opacity: 0.75; }
.voice-tag.on { top: 12px; padding: 4px 8px; border-radius: 999px; border: 1px solid transparent; color: var(--accent); background: var(--card2); font-weight: 700; opacity: 1; }
.style-card[data-style="G"] { --accent: #ff4d94; --glow: rgba(255, 77, 148, 0.35); }
.style-card[data-style="P"] { --accent: #ff6b6b; --glow: rgba(255, 107, 107, 0.35); }
.style-card[data-style="S"] { --accent: #e0245e; --glow: rgba(224, 36, 94, 0.35); }
.style-card.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset, 0 10px 26px -12px var(--glow); }
.style-card.on::before { opacity: 0.2; }
.style-card.on b { color: var(--accent); }
.style-card:active { transform: scale(0.985); }

.seg {
  display: flex; background: var(--surface); border: 1px solid transparent; border-radius: 999px; padding: 4px; gap: 4px;
  box-shadow: 0 4px 14px -10px var(--shadow);
}
.seg button {
  flex: 1; padding: 8px 0; border-radius: 999px; font-size: 16px; font-weight: 700; color: var(--ink2);
  display: flex; flex-direction: column; align-items: center; line-height: 1.15; transition: background 0.2s, color 0.2s;
}
.seg button small { font-size: 11px; font-weight: 500; color: var(--ink3); letter-spacing: 0.05em; }
.seg button.on { background: var(--accent); color: #fff; box-shadow: 0 4px 16px -4px var(--glow); }
.seg button.on small { color: rgba(255, 255, 255, 0.8); }
.seg.small button { padding: 7px 0; font-size: 14px; }
/* 结局四档（董事长 2026-10-23 定名：允许高潮 / 禁止高潮 / 延迟高潮 / 随机高潮，四个字一样长）：字号跟着屏幕宽度走，小屏不挤 */
#endList button { font-size: min(15px, 3.75vw); white-space: nowrap; }
.hint { margin: 6px 2px 0; font-size: 12px; color: var(--ink3); min-height: 1.5em; }

.start {
  margin-top: 16px; width: 100%; padding: 12px; border-radius: 999px;
  font-size: 18px; font-weight: 900; letter-spacing: 0.5em; text-indent: 0.5em; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 14px 30px -12px rgba(255, 77, 148, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  transition: transform 0.15s, filter 0.2s;
}
.start:active { transform: scale(0.98); filter: brightness(1.05); }
.foot { margin: 14px 0 0; text-align: center; font-size: 12px; color: var(--ink3); }
/* 首页「开始」下面的旧入口（已停用）：淡色小字只加下划线，整行可点 */
.home-more { margin-top: 16px; }   /* 离「开始」按钮远一点（董事长 2026-10-23：太近了） */
.home-more a { display: inline-block; padding: 3px 8px; color: inherit; text-decoration: underline; text-decoration-color: currentColor; text-underline-offset: 3px; }
.home-more a:active { opacity: 0.6; }

/* ---------- 18+ ---------- */
.gate { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: var(--veil-strong); backdrop-filter: blur(10px); padding: 24px; }
.gate-card { max-width: 360px; width: 100%; text-align: center; }
/* 矮屏时居中弹窗（18+、投稿、续玩）比屏幕高也能滑到上下两头（11-23） */
.gate { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.gate::-webkit-scrollbar { display: none; }
.gate-title { font: 400 48px/1.1 var(--font-display); color: var(--accent); }
.gate-card p { color: var(--ink2); margin: 14px 0 6px; }
.gate-card .start { letter-spacing: 0.1em; text-indent: 0; font-size: 18px; }

/* 一次性公告（2026-10-26 粗口调教语音上线，董事长从三种里挑了中间卡片）：颜色固定用粗口调教的玫红 */
.notice { position: fixed; inset: 0; z-index: 60; --accent: #e0245e; --accent2: #ff5c8a; }
.notice-back { position: absolute; inset: 0; background: var(--veil); backdrop-filter: blur(6px); animation: noticeFade 0.25s ease-out; }
.notice-card { position: relative; background: var(--card); border: 1px solid var(--line); color: var(--ink); }
.notice-icon { flex: none; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: 0 10px 24px -10px rgba(224, 36, 94, 0.7); }
.notice-icon svg { width: 28px; height: 28px; }
.notice-tag { display: inline-block; padding: 0 8px; border-radius: 999px; border: 1.5px solid var(--accent); color: var(--accent); font: 700 12px/1.6 var(--font-body); letter-spacing: 0.1em; text-indent: 0.1em; }
.notice-title { margin-top: 6px; font: 400 26px/1.25 var(--font-display); color: var(--accent); }
.notice-body { margin: 6px 0 0; color: var(--ink2); font-size: 15px; text-wrap: balance; }   /* 两行时平均分，不让「体验」两个字单独掉到第二行 */
.notice-a { display: grid; place-items: center; padding: 24px; }
.notice-a .notice-card { width: 100%; max-width: 340px; border-radius: 28px; padding: 28px 22px 20px; text-align: center; box-shadow: 0 30px 70px -30px var(--shadow); animation: noticePop 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.25); }
.notice-a .notice-icon { width: 64px; height: 64px; margin: 0 auto 14px; }
.notice-a .notice-acts .start { margin-top: 20px; letter-spacing: 0.3em; text-indent: 0.3em; }
@keyframes noticePop { from { transform: scale(0.88); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes noticeFade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- 游戏页 ---------- */
#screenPlay { padding-top: 14px; }
.loadbar { height: 2px; background: var(--track); border-radius: 2px; overflow: hidden; margin-bottom: 10px; opacity: 1; transition: opacity 0.6s; }
.loadbar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.3s; }
.loadbar.done { opacity: 0; }

.phases { display: flex; justify-content: center; align-items: center; gap: 12px; padding: 6px 2px 0; }
/* 阶段只留小点、不写字（董事长 2026-10-21：不让听众知道是哪个阶段，更有未知感）；
   小点居中排，最后一个是颗心（董事长 2026-10-21：去掉字之后太分散，选了「居中小点·结尾一颗心」） */
.phases span { font-size: 0; width: 6px; height: 6px; position: relative; }
.phases span::before {
  content: ""; position: absolute; left: 50%; top: 0; width: 6px; height: 6px; border-radius: 50%; transform: translateX(-50%);
  background: var(--ink3); opacity: 0.35; transition: all 0.3s;
}
.phases span.done::before { background: var(--accent); opacity: 0.6; }
.phases span.on::before { width: 9px; height: 9px; top: -1.5px; background: var(--accent); opacity: 1; box-shadow: 0 0 0 4px var(--glow); }
.phases span:last-child { width: 12px; }
.phases span:last-child::before { content: "♥"; background: none; width: auto; height: auto; top: -3px; font-size: 12px; line-height: 1; color: var(--accent); opacity: 0.45; border-radius: 0; box-shadow: none; }
.phases span:last-child.on::before { opacity: 1; top: -4px; font-size: 14px; text-shadow: 0 0 8px var(--glow); }

.stage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; padding: 10px 0; }
/* 台词框按三行留了高度，常见两行时最下面空一行，整块看起来偏上、下面空一大块：整块往下挪半行（董事长 2026-10-24：追问句离按钮太空）；矮屏不挪，放不下 */
@media (min-height: 600px) { .stage { padding-top: 44px; } }
.glow {
  position: absolute; width: min(90vw, 420px); aspect-ratio: 1; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, var(--glow) 0%, transparent 62%); opacity: 0.28; filter: blur(10px);
  animation: breathe 5s ease-in-out infinite;
}
@keyframes breathe { 0%, 100% { transform: scale(0.92); opacity: 0.2; } 50% { transform: scale(1.05); opacity: 0.32; } }

.ring-wrap { position: relative; width: min(68vw, 290px); aspect-ratio: 1; }
/* 随节拍跳：只跳圆环和中间的字，上面的三盏红绿灯不跟着跳（董事长 2026-10-23：灯是标识，跟着抖显得晃） */
.ring, .center { transition: transform 0.08s ease-out; }
.ring-wrap.beat .ring { transform: rotate(-90deg) scale(1.035); transition-duration: 0.05s; }
.ring-wrap.beat .center { transform: scale(1.035); transition-duration: 0.05s; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ring-bg { fill: none; stroke: var(--track); stroke-width: 14; }
.ring-fg {
  fill: none; stroke: var(--accent); stroke-width: 14; stroke-linecap: round;
  stroke-dasharray: 741.4; stroke-dashoffset: 0; transition: stroke-dashoffset 0.12s linear, stroke 0.4s, opacity .35s;
}
.ring-wrap.hold .ring-fg { stroke: var(--gold); }
.center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.center-num {
  font: 900 min(26vw, 108px)/1 var(--font-body); color: var(--accent); letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.center-num.pop { animation: pop 0.35s ease-out; }
@keyframes pop { 0% { transform: scale(1.18); } 100% { transform: scale(1); } }
.center-label { margin-top: 4px; font-size: 14px; color: var(--ink2); letter-spacing: 0.3em; text-indent: 0.3em; }
/* 高潮倒数：中间一颗心跟着节拍跳；语音关了心下面再给剩余秒数 */
.heart-ico { display: none; width: min(22vw, 92px); height: auto; margin: 0 auto 2px; fill: var(--accent); filter: drop-shadow(0 6px 18px var(--glow)); transform-origin: 50% 60%; animation: heartbeat 1.1s ease-in-out infinite; }
.ring-wrap.heart .heart-ico { display: block; }
.ring-wrap.heart .center-num { font-size: 30px; min-height: 0; }
.ring-wrap.heart.beat .heart-ico { transform: scale(1.16); animation: none; }
@keyframes heartbeat { 0%, 100% { transform: scale(1); } 14% { transform: scale(1.12); } 28% { transform: scale(1); } 42% { transform: scale(1.08); } 70% { transform: scale(1); } }
.ring-wrap.hold .center-label { color: var(--gold); }
.ring-wrap.hold .center-num { color: var(--gold); }

.instruction {
  margin: 0; padding: 0 6px; width: 100%; text-align: center;
  font-size: 22px; font-weight: 700; line-height: 1.55; letter-spacing: 0.02em; color: var(--ink);
}
/* 台词 + 小字整块：高度按三行台词 + 一行小字固定，小字紧跟台词（董事长 2026-10-23：小字离台词太远；之后又发现台词行数不同圆环会上下跳，所以整块定高） */
.say-box { margin-top: 26px; width: 100%; min-height: calc(22px * 1.55 * 3 + 17px * 1.7 + 4px); display: flex; flex-direction: column; align-items: center; }
.instruction.rise { animation: rise 0.45s ease-out; }
@keyframes rise { from { opacity: 0.35; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.cue { margin: 4px 0 0; min-height: 1.7em; text-align: center; font-size: 17px; color: var(--cue); opacity: 0; letter-spacing: 0.08em; }
.cue.show { animation: cueFlash 2.2s ease-out forwards; }
@keyframes cueFlash { 0% { opacity: 0; transform: translateY(4px) scale(0.98); } 12% { opacity: 1; transform: none; } 70% { opacity: 1; } 100% { opacity: 0; } }

/* 节拍档（四个小点）挪进圆环里、数字下面（董事长 2026-10-23 选的「乙」：圆环管状态，圆环下面只放台词和一句小字）；原来那行文字不显示 */
.center .dots { display: flex; justify-content: center; gap: 6px; margin: 10px auto 0; transition: opacity .3s; }
html:not([data-light]) .center .dots[data-n="0"] { opacity: 0; }
.tempo { display: none !important; }
.dots { display: inline-flex; gap: 5px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink3); opacity: 0.35; }
.dots[data-n="1"] i:nth-child(-n+1), .dots[data-n="2"] i:nth-child(-n+2), .dots[data-n="3"] i:nth-child(-n+3), .dots[data-n="4"] i:nth-child(-n+4) { background: var(--accent); opacity: 1; box-shadow: 0 0 8px var(--glow); }

.paused-veil {
  position: fixed; inset: 0; z-index: 20; display: none; place-items: center; pointer-events: none;
  background: var(--veil); backdrop-filter: blur(3px);
}
.paused-veil span { font-size: 18px; letter-spacing: 0.3em; color: var(--ink); border: 1px solid var(--line); padding: 10px 22px; border-radius: 999px; background: var(--chip); }
.paused-veil.show { display: grid; }

/* ---------- 红绿灯（董事长 2026-10-23）：命令里切灯时，三盏灯亮一盏，圆环、中间大字、插话、整屏淡色跟着灯变 ---------- */
:root { --lt-r: #ff3030; --lt-y: #f7b500; --lt-g: #12b76a; }
html[data-light="green"]  { --lt: var(--lt-g); --lt-glow: color-mix(in srgb, var(--lt-g) 38%, transparent); }
html[data-light="yellow"] { --lt: var(--lt-y); --lt-glow: color-mix(in srgb, var(--lt-y) 42%, transparent); }
html[data-light="red"]    { --lt: var(--lt-r); --lt-glow: color-mix(in srgb, var(--lt-r) 40%, transparent); }
#screenPlay { position: relative; }
.light-tint { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.light-tint i { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; }
.light-tint .g { background: radial-gradient(120% 75% at 50% 38%, color-mix(in srgb, var(--lt-g) 38%, transparent) 0%, transparent 72%); }
.light-tint .y { background: radial-gradient(120% 75% at 50% 38%, color-mix(in srgb, var(--lt-y) 42%, transparent) 0%, transparent 72%); }
.light-tint .r { background: radial-gradient(120% 75% at 50% 38%, color-mix(in srgb, var(--lt-r) 40%, transparent) 0%, transparent 72%); }
html[data-light="green"] .light-tint .g, html[data-light="yellow"] .light-tint .y, html[data-light="red"] .light-tint .r { opacity: 1; }
.light-tint.flash { animation: lightFlash .5s ease-out; }
@keyframes lightFlash { 0% { filter: brightness(1.35); } 100% { filter: none; } }
/* 三盏灯在圆环正上方（董事长 2026-10-23 从 7 种摆法里选的 ②），不挤动圆环；不要外框，只有灯。这条命令一开始就暗着出现（提示是红绿灯），亮灯时那盏亮起来；出现、消失都淡入淡出 */
.lights { display: inline-flex; position: absolute; bottom: calc(100% + 18px); left: 50%; transform: translate(-50%, 0); gap: 14px; z-index: 2;
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .45s ease, visibility 0s linear .45s, gap 0s linear .45s, padding 0s linear .45s; }   /* 只淡入淡出，不滑、不拉开（董事长 2026-10-24：开场说明那组灯出来往左挪一下）；收起时等淡完再变回玩的时候的间距 */
html[data-light] .lights, html[data-light-ready] .lights { opacity: 1; visibility: visible; transition: opacity .45s ease, visibility 0s; }   /* 开场说明那句的灯在圆环中间（见下面 .center-lamps），上面这组不出 */
/* 三盏灯都带一圈同色的圈，不亮时灯和圈一起淡，亮时一起亮；三盏一样大（董事长 2026-10-23：亮的那盏多一圈光、还放大，比别的大） */
.lamp { width: 24px; height: 24px; border-radius: 50%; opacity: .22; box-shadow: 0 0 0 4px var(--ring); transition: opacity .35s ease; position: relative; font-style: normal; }
.lamp.r { background: var(--lt-r); --ring: color-mix(in srgb, var(--lt-r) 35%, transparent); }
.lamp.y { background: var(--lt-y); --ring: color-mix(in srgb, var(--lt-y) 40%, transparent); }
.lamp.g { background: var(--lt-g); --ring: color-mix(in srgb, var(--lt-g) 35%, transparent); }
html[data-light="red"] .lamp.r, html[data-light="yellow"] .lamp.y, html[data-light="green"] .lamp.g { opacity: 1; }
/* 开场说明那句：三盏都亮，下面标「停 慢 快」 */
html[data-light-intro] .center .dots { opacity: 0; }   /* 开场说明不显示节拍点 */
/* 矮屏（iPhone SE 这类 667 高）：圆环小一点、灯小一号、离圆环近一点，不和顶部进度小点挤在一起 */
@media (max-height: 700px) {
  .ring-wrap { width: min(64vw, 290px); }   /* 2026-10-24：圆环放大一点，把空白用上（原 60vw） */
  .lights { bottom: calc(100% + 12px); gap: 12px; }
  .lamp { width: 20px; height: 20px; }
}
html[data-light] .ring-fg { stroke: var(--lt); }
html[data-light] .glow { background: radial-gradient(circle, var(--lt-glow) 0%, transparent 62%); opacity: .5; }
html[data-light] .center-num { color: var(--lt); font-size: min(30vw, 120px); }
html[data-light] .center-label { color: var(--lt); font-weight: 700; }
html[data-light] .cue { color: var(--lt); font-weight: 700; }
html[data-light] .dots[data-n] i:nth-child(-n+4) { background: var(--ink3); opacity: .35; box-shadow: none; }
html[data-light] .dots[data-n="1"] i:nth-child(-n+1), html[data-light] .dots[data-n="2"] i:nth-child(-n+2), html[data-light] .dots[data-n="3"] i:nth-child(-n+3), html[data-light] .dots[data-n="4"] i:nth-child(-n+4) { background: var(--lt); opacity: 1; box-shadow: 0 0 8px var(--lt-glow); }
html[data-light] .tempo { color: var(--lt); }
/* 红绿灯命令全程不报还剩多久（圆环满圈不走，董事长 2026-10-24：神秘感）；念台词那几秒三盏灯暗着放进圆环中间等着，灯亮后中间换成快 / 慢 / 停 */
.center-lamps { display: flex; gap: min(4vw, 16px); justify-content: center; position: absolute; left: 0; right: 0; top: 50%;
  transform: translateY(calc(-50% - 21px)); opacity: 0; pointer-events: none; transition: opacity .35s ease; }   /* 叠在大字「快」的位置上（下面小字 + 节拍点约 42px，所以往上挪 21px），淡入淡出 */
.center-lamps i { width: min(10vw, 40px); height: min(10vw, 40px); border-radius: 50%; opacity: .28; }
.center-lamps .r { background: var(--lt-r); } .center-lamps .y { background: var(--lt-y); } .center-lamps .g { background: var(--lt-g); }
html[data-light-ready]:not([data-light]) .center-lamps { opacity: 1; }
/* 开场说明「有的指令会变成红绿灯：红灯停，绿灯快，黄灯…」：三盏灯放进圆环中间、下面标「停 慢 快」，说到哪盏亮哪盏；圆环淡、不走（董事长 2026-10-25：中间空着一个圆环） */
html[data-light-intro] .center-lamps { opacity: 1; transform: translateY(calc(-50% - 18px)); gap: min(7vw, 30px); }   /* 灯 + 下面的字整组在圆环正中 */
html[data-light-intro] .center-lamps i { position: relative; font-style: normal; opacity: .3; transition: opacity .35s ease, box-shadow .35s ease; }
html[data-light-intro] .center-lamps .r { box-shadow: 0 0 0 5px color-mix(in srgb, var(--lt-r) 35%, transparent); }   /* 默认款：和玩的时候上面那组灯一样，外面一圈半透明的环（董事长 2026-10-25 选的） */
html[data-light-intro] .center-lamps .y { box-shadow: 0 0 0 5px color-mix(in srgb, var(--lt-y) 40%, transparent); }
html[data-light-intro] .center-lamps .g { box-shadow: 0 0 0 5px color-mix(in srgb, var(--lt-g) 35%, transparent); }
html[data-light-intro] .center-lamps i::after { position: absolute; top: calc(100% + 14px); left: 50%; transform: translateX(-50%); font-size: 17px; font-weight: 700; color: var(--ink2); white-space: nowrap; transition: color .3s; }
html[data-light-intro] .center-lamps i::after { content: attr(data-l); }   /* 停 / 慢 / 快 写在 index.html 的 data-l 上，换语言时跟着换 */
html[data-intro-lit="r"] .center-lamps .r, html[data-intro-lit="g"] .center-lamps .g, html[data-intro-lit="y"] .center-lamps .y, html[data-intro-lit="all"] .center-lamps i { opacity: 1; }
html[data-intro-lit="r"] .center-lamps .r, html[data-intro-lit="all"] .center-lamps .r { box-shadow: 0 0 0 5px color-mix(in srgb, var(--lt-r) 35%, transparent), 0 0 20px color-mix(in srgb, var(--lt-r) 55%, transparent); }
html[data-intro-lit="y"] .center-lamps .y, html[data-intro-lit="all"] .center-lamps .y { box-shadow: 0 0 0 5px color-mix(in srgb, var(--lt-y) 40%, transparent), 0 0 20px color-mix(in srgb, var(--lt-y) 55%, transparent); }
html[data-intro-lit="g"] .center-lamps .g, html[data-intro-lit="all"] .center-lamps .g { box-shadow: 0 0 0 5px color-mix(in srgb, var(--lt-g) 35%, transparent), 0 0 20px color-mix(in srgb, var(--lt-g) 55%, transparent); }
html[data-intro-lit="r"] .center-lamps .r::after, html[data-intro-lit="all"] .center-lamps .r::after { color: var(--lt-r); }
html[data-intro-lit="g"] .center-lamps .g::after, html[data-intro-lit="all"] .center-lamps .g::after { color: var(--lt-g); }
html[data-intro-lit="y"] .center-lamps .y::after, html[data-intro-lit="all"] .center-lamps .y::after { color: var(--lt-y); }
/* 说明这句圆环整圈点亮、不走，颜色跟着说到的灯变：红灯停→红、绿灯快→绿、黄灯慢→黄，三盏全亮回到粉色（董事长 2026-10-25 选的；和正式玩时亮哪盏圆环变哪个色一致），颜色渐变不跳 */
html[data-light-intro] .ring-fg { stroke-dashoffset: 0 !important; transition: stroke-dashoffset 0.12s linear, stroke .45s ease, opacity .35s; }
html[data-intro-lit="r"] .ring-fg { stroke: var(--lt-r); } html[data-intro-lit="g"] .ring-fg { stroke: var(--lt-g); } html[data-intro-lit="y"] .ring-fg { stroke: var(--lt-y); }
html[data-light-ready] .center-num { min-height: min(30vw, 120px); }   /* 念台词时也先占住大字的位置，亮灯时下面的小字和节拍点不往下跳（董事长 2026-10-24：红绿灯出来顿一下、跳一下） */
html[data-light-ready]:not([data-light]) .lights { opacity: 0; visibility: hidden; transition: opacity .45s ease, visibility 0s linear .45s, gap 0s linear .45s, padding 0s linear .45s; }
html[data-light-ready]:not([data-light]) .ring-fg { opacity: .35; }

/* 游戏页三个按钮：一样高一样宽，只有「暂停」是实心，「结束」最淡；点一下「结束」变成描边确认态 */
.controls { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; align-items: center; margin-top: 16px; position: relative; z-index: 21; }
.controls button {
  height: 46px; padding: 0 6px; border-radius: 999px; font-size: 15px; font-weight: 700; letter-spacing: 0.15em; text-indent: 0.15em;
  white-space: nowrap; border: 1px solid transparent; transition: transform 0.15s, background 0.2s, color 0.2s, border-color 0.2s;
}
.controls button:active { transform: scale(0.96); }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: 0 10px 24px -12px rgba(255, 77, 148, 0.6); }
.btn-ghost { color: var(--ink2); background: var(--surface); box-shadow: 0 4px 14px -10px var(--shadow); }
.btn-quiet { color: var(--ink2); background: var(--track); }
.btn-quiet.arm { color: var(--accent); background: var(--surface); border-color: var(--accent); letter-spacing: 0.08em; text-indent: 0.08em; }
/* 结束页 / 弹层里的宽按钮 */
.btn-ghost.wide { width: 100%; margin-top: 12px; padding: 14px; border-radius: 999px; font-size: 16px; letter-spacing: 0.2em; text-indent: 0.2em; transition: transform 0.15s; }
.btn-ghost.wide:active { transform: scale(0.97); }


/* ---------- 结束页 ---------- */
.end-wrap { flex: 1; display: flex; flex-direction: column; justify-content: center; text-align: center; }
.end-title { font: 400 64px/1.1 var(--font-display); color: var(--accent); }
.end-line { margin: 16px 0 0; font-size: 19px; font-weight: 700; line-height: 1.6; }
.summary { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 22px 0 6px; }
.summary span { font-size: 13px; color: var(--ink2); border: 1px solid transparent; background: var(--surface); border-radius: 999px; padding: 6px 12px; box-shadow: 0 4px 14px -10px var(--shadow); }
.summary span b { color: var(--accent); font-weight: 700; margin-left: 4px; }
/* 结束页最底下：引导去听更多作品（董事长 2026-10-21 定的「分隔线·两行」：大按钮太显眼，就是个小跳转提示；不写站名） */
.more-works { display: block; margin: 26px 0 0; padding-top: 16px; border-top: 1px solid var(--line); text-decoration: none; text-align: center; }
.more-works small { display: block; font-size: 12px; color: var(--ink3); letter-spacing: 0.12em; }
.more-works span { display: block; margin-top: 6px; font-size: 15px; font-weight: 700; color: var(--accent); }
.more-works span::after { content: " ›"; }
.more-works:active span { opacity: 0.7; }

/* ---------- 设置抽屉 ---------- */
.sheet { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; }
.sheet-back { position: absolute; inset: 0; background: var(--veil); backdrop-filter: blur(4px); }
.sheet-panel {
  position: relative; width: 100%; max-width: 480px; margin: 0 auto; background: var(--sheet); border: 1px solid var(--line); border-bottom: 0;
  border-radius: 26px 26px 0 0; padding: 18px 18px calc(20px + var(--safe-b)); animation: up 0.3s ease-out;
}
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
/* 矮屏（小手机 + 浏览器地址栏、横屏）抽屉比屏幕高时自己滑，不然顶上几行被切掉够不着；滚动条藏起来别压开关（踩坑清单 043，11-23） */
.sheet-panel { max-height: 100%; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.sheet-panel::-webkit-scrollbar { display: none; }
.sheet-panel h3 { margin: 0 0 10px; font-size: 15px; letter-spacing: 0.3em; color: var(--ink3); font-weight: 500; }
.sheet-panel .row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.sheet-panel .row > span { font-size: 15px; color: var(--ink); white-space: nowrap; }
.sheet-panel .seg { flex: 0 0 auto; width: min(240px, calc(100% - 120px)); }   /* 几组按钮一样宽、左边对齐（「红绿灯出现频率」字多，按它留出 120px） */
/* 语言这组 5 个选项、「日本語」「한국어」较宽：label 短只留 88px，把胶囊拉宽，选项一行放下不换行（董事长 2026-11-20） */
.sheet-panel #langList { width: min(320px, calc(100% - 88px)); }
.sheet-panel #langList button { white-space: nowrap; }
@media (max-width: 340px) { .sheet-panel #langList { width: calc(100% - 66px); } .sheet-panel #langList button { font-size: 12px; letter-spacing: 0; } }   /* 320 宽五种语言放得下（11-23） */
/* 音量条：粉色轨道 + 白圆钮，走过的部分填色（--p 由 js 写） */
/* 语音静音小喇叭：设置里在语音音量条右边（节拍那行留同宽空位，两条音量条对齐）；游戏页在右上角。静音时喇叭带叉、变强调色 */
.mute-btn { width: 34px; height: 34px; flex: none; margin-left: -8px; margin-right: -6px; border-radius: 50%; display: grid; place-items: center; color: var(--ink2); }
.mute-btn:active { background: var(--card2); }
.mute-btn .ico-off, .mute-btn.off .ico-on { display: none; }
.mute-btn.off .ico-off { display: block; }
.mute-btn.off { color: var(--accent); }
.mute-spacer { width: 34px; flex: none; margin-left: -8px; margin-right: -6px; }
/* 游戏页的小喇叭：放右上角显眼（董事长 2026-11-18；原来 10-21 放底部，现在改回右上）。射了按钮挪到左上，两个不打架 */
.play-mute { position: absolute; top: 12px; right: 14px; z-index: 23; width: 42px; height: 42px; margin: 0; padding: 0; letter-spacing: 0; text-indent: 0; background: var(--surface); box-shadow: 0 4px 14px -10px var(--shadow); }
input[type="range"] { -webkit-appearance: none; appearance: none; flex: 1; max-width: 240px; height: 28px; margin: 0; background: transparent; --p: 50%; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--accent) var(--p), var(--track) var(--p)); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 999px; background: var(--track); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--accent); }
input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); }
/* 音量小面板：点游戏页右上角喇叭，从喇叭下方落下的小卡片（董事长 2026-11-18） */
.volpop { position: fixed; inset: 0; z-index: 41; }
.volpop-back { position: absolute; inset: 0; }
.volpop-card {
  position: absolute; top: 60px; right: 14px; width: min(300px, calc(100vw - 28px));
  background: var(--sheet); border: 1px solid var(--line); border-radius: 18px;
  padding: 4px 16px 10px; box-shadow: 0 16px 44px -18px var(--shadow); animation: volIn 0.2s ease-out;
}
@keyframes volIn { from { transform: translateY(-10px) scale(0.98); opacity: 0; } to { transform: none; opacity: 1; } }
.volpop-card .row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 0; }
.volpop-card .row > span { font-size: 15px; color: var(--ink); white-space: nowrap; }
.cn-note { margin: -2px 0 6px; padding-left: 2px; font-size: 12px; color: var(--ink2); opacity: 0.8; line-height: 1.3; }
.volpop-card input[type="range"] { max-width: 180px; }
/* 手机语言一种都不支持、退回英文时底部那条一次性小提示（董事长 2026-11-18 各游戏统一语言规矩） */
#langHint { position: fixed; left: 50%; bottom: calc(14px + var(--safe-b)); transform: translateX(-50%); z-index: 45;
  width: min(calc(100% - 28px), 460px); display: flex; align-items: center; gap: 8px; padding: 9px 6px 9px 14px;
  background: var(--sheet); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 34px -14px var(--shadow);
  font-size: 13px; line-height: 1.4; }
#langHint[hidden] { display: none; }
#langHint .lh-text { flex: 1; min-width: 0; }
#langHint .lh-switch { position: relative; flex: none; border: 1.5px solid var(--accent); color: var(--accent); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 700; white-space: nowrap; cursor: pointer; }
#langHint .lh-switch select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
#langHint .lh-close { flex: none; width: 30px; height: 30px; padding: 0; border: 0; background: none; color: var(--ink); opacity: 0.5; font-size: 20px; line-height: 1; cursor: pointer; }
.switch { position: relative; width: 48px; height: 28px; display: inline-block; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--card2); border: 1px solid transparent; transition: background 0.2s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15); transition: transform 0.2s; }
.switch input:checked + i { background: var(--accent); border-color: var(--accent); }
.switch input:checked + i::after { transform: translateX(20px); }

@media (min-width: 560px) {
  .brand-title { font-size: 58px; }
  .instruction { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .glow { animation: none; }
  .brand-title span { animation: none; }
  .ring-wrap.beat .ring { transform: rotate(-90deg); }
  .ring-wrap.beat .center { transform: none; }
}
@media (max-height: 599px) { .ring-wrap { width: min(60vw, 290px); } }   /* 很矮的屏（iPhone SE 浏览器里）圆环还是原来大小 */

/* ---------- 多语言（董事长 2026-10-25：英文、繁体中文，只翻文字）----------
   繁体：ZCOOL KuaiLe 只有简体字，标题换成圆体 Zen Maru Gothic（董事长 2026-10-25 从 9 种里挑的 H）：500 档再加 0.005em 描边，笔画粗细量过和原来简体标题差不多（约 98%）。
   英文：中文那套宽字距、单个大字放到英文上会撑破，这里统一收；台词超过三行、小字超过一行，app.js 的 fitLines 再缩字号 */
html[lang="zh-Hant"] { --font-display: 'Zen Maru Gothic', 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif; }
html[lang="zh-Hant"] .brand-title, html[lang="zh-Hant"] .gate-title, html[lang="zh-Hant"] .end-title, html[lang="zh-Hant"] .t-head h2 { font-weight: 500; -webkit-text-stroke-width: 0.005em; }
html[lang="en"] { --font-display: 'Fredoka', 'Noto Sans SC', sans-serif; }
html[lang="en"] .brand-title { font-size: min(27px, 6.6vw); font-weight: 600; letter-spacing: 0; white-space: nowrap; }
html[lang="en"] .gate-title { font-size: 38px; font-weight: 600; }
html[lang="en"] .end-title { font-size: 54px; font-weight: 600; }
html[lang="en"] .t-head h2 { font-weight: 600; }
html[lang="en"] .start { letter-spacing: 0.06em; text-indent: 0; }
html[lang="en"] .label, html[lang="en"] .nt-label, html[lang="en"] .sheet-panel h3 { letter-spacing: 0.1em; text-indent: 0; }
html[lang="en"] .center-label, html[lang="en"] .cum, html[lang="en"] .paused-veil span { letter-spacing: 0.04em; text-indent: 0; }
html[lang="en"] .cue { letter-spacing: 0; }
html[lang="en"] .more-works small { letter-spacing: 0.04em; }
html[lang="en"] .instruction { font-size: 20px; line-height: 1.45; letter-spacing: 0; }
html[lang="en"] #intList button { font-size: 14px; }
html[lang="en"] .sheet-panel .seg { width: min(240px, calc(100% - 132px)); }
html[lang="en"] .sheet-panel .row > span { font-size: 14px; }
/* 红绿灯大字 GO / SLOW / STOP 比一个汉字宽，缩小；行高照旧占那么高，亮灯时下面的小字和节拍点不跳 */
html[lang="en"][data-light] .center-num { font-size: min(15vw, 60px); line-height: min(30vw, 120px); letter-spacing: 0.02em; }
/* 日文「ストップ / ゆっくり」、韩文「빠르게 / 느리게」同样比汉字宽，不缩会撑出圆圈折行，照英文那条缩小、行高照旧占位 */
html[lang="ja"][data-light] .center-num { font-size: min(11vw, 44px); line-height: min(30vw, 120px); letter-spacing: 0; }
html[lang="ko"][data-light] .center-num { font-size: min(12.5vw, 50px); line-height: min(30vw, 120px); letter-spacing: 0; }
html[lang="en"][data-light-intro] .center-lamps i::after { font-size: 14px; letter-spacing: 0.04em; }
html[lang="en"] .controls button, html[lang="en"] .btn-ghost.wide, html[lang="en"] .btn-quiet.arm { letter-spacing: 0.02em; text-indent: 0; }   /* 中文按钮的宽字距放到英文上成了「P a u s e」 */
html[lang="zh-Hant"] .brand-title { font-size: min(40px, 10.4vw); white-space: nowrap; }   /* 繁体标题字比 ZCOOL 宽一点，小屏上别折成两行 */

/* 日文：和繁体一样是 CJK 方块字，用 Zen Maru Gothic；字距沿用中文那套（董事长 2026-11-18 加日/韩） */
html[lang="ja"] { --font-display: 'Zen Maru Gothic', 'Noto Sans JP', 'Yu Gothic', sans-serif; }
html[lang="ja"] .brand-title, html[lang="ja"] .gate-title, html[lang="ja"] .end-title, html[lang="ja"] .t-head h2 { font-weight: 500; }
html[lang="ja"] .brand-title { font-size: min(29px, 6.55vw); white-space: nowrap; }   /* 日文标题缩到约 25.7px，给返回图标留 10px（董事长 2026-11-18） */
/* 韩文：圆体 Jua；韩文有词间空格，字距收小、台词不拉大字距 */
html[lang="ko"] { --font-display: 'Jua', 'Noto Sans KR', 'Malgun Gothic', sans-serif; }
html[lang="ko"] .brand-title { font-size: min(34px, 8.6vw); white-space: nowrap; letter-spacing: 0; }
html[lang="ko"] .gate-title, html[lang="ko"] .end-title, html[lang="ko"] .t-head h2 { letter-spacing: 0.02em; }
html[lang="ko"] .label, html[lang="ko"] .nt-label, html[lang="ko"] .sheet-panel h3 { letter-spacing: 0.12em; text-indent: 0; }
html[lang="ko"] .center-label, html[lang="ko"] .cum, html[lang="ko"] .paused-veil span { letter-spacing: 0.08em; text-indent: 0; }
html[lang="ko"] .instruction, html[lang="ko"] .cue { letter-spacing: 0; }
html[lang="ja"] #intList button, html[lang="ko"] #intList button { font-size: 13px; letter-spacing: 0; white-space: nowrap; }   /* 激しめ / 약하게 3 字别在窄按钮里折行 */

/* ---------- 男生版（女声给男生，董事长 2026-11-18）：J 温柔宝贝 / Q 女王调教 / C 粗口调教 ---------- */
/* 「风格」那一行右边放男女切换，不加高度（首页已经满了） */
.label-row { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; }
.label-row .label { flex: 1; margin: 0; }
.gender-seg { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--surface); border: 1px solid transparent; box-shadow: 0 4px 14px -10px var(--shadow); }
.gender-seg button { padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: 0.05em; color: var(--ink2); transition: background 0.2s, color 0.2s; }
.gender-seg button.on { background: var(--accent); color: #fff; }
/* 男女各显示自己的三张卡片 */
.style-card[data-g="m"] { display: none; }
html[data-gender="m"] .style-card[data-g="m"] { display: grid; }
html[data-gender="m"] .style-card:not([data-g="m"]) { display: none; }
/* 18+ 页：两个按钮一样大，一次点完（满 18 岁 + 男女） */
.gate-pick { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.gate-pick .start { margin-top: 0; }
.gate-pick .btn-ghost { width: 100%; padding: 12px; border-radius: 999px; font-size: 18px; letter-spacing: 0.1em; text-indent: 0.1em; }
/* 18+ 门同意条款（董事长 2026-11-21，和情趣乐园统一；没勾时「进入」变暗、点了闪粉框晃一下） */
.agree { position: relative; display: flex; justify-content: center; align-items: flex-start; gap: 10px; margin-top: 20px; padding: 10px 12px; border: 1px solid transparent; border-radius: 14px; text-align: left; font-size: 13px; line-height: 1.6; color: var(--ink2); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.agree input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.agree i { flex: none; display: grid; place-items: center; width: 19px; height: 19px; margin-top: 1px; border: 1.5px solid var(--ink3); border-radius: 6px; transition: background 0.15s, border-color 0.15s; }
.agree input:checked + i { background: var(--accent); border-color: var(--accent); }
.agree input:checked + i::after { content: ""; width: 9px; height: 5px; margin-top: -2px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg); }
.agree input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.agree a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.agree.need { border-color: var(--accent); background: rgba(255, 77, 148, 0.08); animation: agreeShake 0.42s; }
@keyframes agreeShake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
#adultPick .start.off { opacity: 0.45; }

/* 游戏页右上角「提前高潮了 / 又高潮了」：低调小按钮（暂停才是这页唯一的实心按钮） */
#screenPlay { position: relative; }
.cum-row { position: absolute; bottom: 82px; left: 0; right: 0; margin: 0 auto; width: fit-content; z-index: 22; display: flex; gap: 10px; }
.cum-now { display: flex; align-items: center; gap: 6px; padding: 8px 18px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.04em; color: var(--accent); background: var(--surface); border: 1px solid var(--line); box-shadow: 0 4px 14px -10px var(--shadow); transition: transform 0.15s; }
.cum-now:active { transform: scale(0.94); }
.cum-now i { font-style: normal; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; display: none; place-items: center; font-size: 11px; color: #fff; background: var(--accent); }
.cum-now.has i { display: grid; }
.cum-now.pop { animation: cumNowPop 0.35s ease; }
@keyframes cumNowPop { 0% { transform: scale(1); } 40% { transform: scale(1.15); } 100% { transform: scale(1); } }
html[data-theme="dark"] .cum-now { background: rgba(255, 255, 255, 0.06); }
.cum-now.edge { color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent2)); border-color: transparent; font-weight: 900; }
html[data-theme="dark"] .cum-now.edge { background: linear-gradient(135deg, var(--accent), var(--accent2)); }
.edge-veil { position: fixed; inset: 0; z-index: 40; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: var(--veil-strong); backdrop-filter: blur(8px); }
.edge-veil.show { display: flex; }
.edge-veil span { font-size: 20px; color: var(--ink); letter-spacing: 0.12em; }
.edge-num { font: 900 76px/1 var(--font-display); color: var(--accent); }
.edge-veil .start { width: auto; min-width: 150px; margin-top: 6px; }
#screenEnd { position: relative; }
.dl-card { position: absolute; top: 14px; right: 14px; z-index: 5; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--ink2); background: var(--surface); border: 1px solid var(--line); box-shadow: 0 4px 14px -10px var(--shadow); }
.dl-card:active { transform: scale(0.94); }
.dl-card:disabled { opacity: 0.5; }

/* 男生三套主色和女生版一样（董事长 2026-11-18）：温柔姐姐 = 温柔宝宝，女王调教 = 主人小狗，粗口调教 = 粗口调教 */
:root { --m-j: #ff4d94; --m-j2: #ff8fb8; }
html[data-style="J"] { --accent: #ff4d94; --accent2: #ff8fb8; --glow: rgba(255, 77, 148, 0.35); --bg2: #ffd9e6; }
html[data-style="Q"] { --accent: #ff6b6b; --accent2: #ffa3a3; --glow: rgba(255, 107, 107, 0.35); --bg2: #ffe0dc; }
html[data-style="C"] { --accent: #e0245e; --accent2: #ff5c8a; --glow: rgba(224, 36, 94, 0.35); --bg2: #ffc9db; }
.style-card[data-style="J"] { --accent: #ff4d94; --glow: rgba(255, 77, 148, 0.35); }
.style-card[data-style="Q"] { --accent: #ff6b6b; --glow: rgba(255, 107, 107, 0.35); }
.style-card[data-style="C"] { --accent: #e0245e; --glow: rgba(224, 36, 94, 0.35); }


/* ---------- 听众投稿（董事长 2026-11-18） ---------- */
/* 设置抽屉底部的入口：整行可点的淡色链接，右边一个箭头，不像实心按钮 */
.sheet-link { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin-top: 14px; padding: 12px 2px 2px; border-top: 1px solid var(--line); color: var(--accent); font-size: 15px; font-weight: 700; }
.sheet-link svg { opacity: 0.7; }
.sheet-link:active { opacity: 0.6; }
/* 投稿卡片：复用 .gate 的居中遮罩，卡片自己一套 */
.fb-card { max-width: 400px; width: 100%; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 22px 20px 18px; box-shadow: 0 18px 50px -20px var(--shadow); }
.fb-title { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: 0.04em; color: var(--ink); }
.fb-sub { margin: 8px 0 0; font-size: 13px; line-height: 1.6; color: var(--ink2); }
.fb-cats { margin: 16px 0 0; }
#fbText { width: 100%; margin-top: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.6; resize: none; }
#fbText::placeholder { color: var(--ink3); }
#fbText:focus { outline: none; border-color: var(--accent); }
.fb-count { margin-top: 6px; text-align: right; font-size: 12px; color: var(--ink3); }
.fb-acts { display: grid; grid-template-columns: 1fr 1.8fr; gap: 10px; margin-top: 10px; align-items: center; }
.fb-acts .start { margin-top: 0; }
.fb-acts .btn-ghost { padding: 12px; border-radius: 999px; font-size: 16px; font-weight: 700; border: 1px solid var(--line); color: var(--ink2); background: var(--surface); }
.fb-acts .start.sending { opacity: 0.6; pointer-events: none; }
.fb-note { margin: 12px 0 0; text-align: center; font-size: 12px; color: var(--ink3); }
/* 感谢页 */
.fb-done { text-align: center; padding: 8px 0 2px; }
.fb-done .fb-title, .fb-done .fb-sub { text-align: center; }
.fb-check { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 999px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: 0 10px 24px -10px var(--glow); }
.fb-done .start { margin-top: 18px; }


/* ---------- 玩完页改版（董事长 2026-11-18）：成绩卡 + 分享 + 作品推荐区 + 广告位 ---------- */
.score-card { margin: 18px 0 2px; padding: 16px 14px 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 8px 24px -16px var(--shadow); }
.score-card { text-align: center; position: relative; overflow: hidden; }
.score-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--accent), var(--accent2)); }
.sc-top { font-size: 11px; letter-spacing: 0.22em; color: var(--ink3); margin-top: 2px; }
.sc-title { font-size: 26px; font-weight: 900; color: var(--accent); letter-spacing: 0.04em; margin: 5px 0 0; }
.sc-verdict { font-size: 13px; color: var(--ink2); margin-top: 10px; }
.score-card .summary { margin: 12px 0 0; }
/* 朋友点开分享战绩链接（/r?...）的战绩弹窗（09 分享卡会话 2026-11-20） */
#friendScore .gate-card { position: relative; max-width: 380px; }
.fs-intro { color: var(--ink2); font-size: 14px; margin: 0 0 2px; }
.fs-close { position: absolute; top: -6px; right: -4px; width: 36px; height: 36px; padding: 0; border: none; background: transparent; color: var(--ink3); font-size: 28px; line-height: 1; cursor: pointer; border-radius: 999px; }
.fs-close:hover { color: var(--accent); }
#friendScore .score-card { margin-top: 14px; }
#friendScore .start { margin-top: 16px; }
/* 换个玩法（主）在上、再来一局（描边）在下；分享做成低调的小胶囊，别太抢眼（董事长 2026-11-18） */
/* 换个玩法（主）在上；再来一局 + 分享到 X 并排在下（董事长 2026-11-18）。分享用描边粉色，有存在感但不刺眼 */
.end-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.end-row2 .btn-ghost, .btn-share { padding: 12px; border-radius: 999px; font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 7px; }
.end-row2 .btn-ghost { border: 1px solid var(--line); color: var(--ink2); background: var(--surface); box-shadow: 0 4px 14px -10px var(--shadow); }
.btn-share { border: 1px solid var(--accent); color: var(--accent); background: var(--surface); box-shadow: 0 4px 14px -10px var(--glow); }
.btn-share svg { fill: currentColor; opacity: 0.9; }   /* X 图标跟随主题色（董事长 2026-11-18：用粉色、适配主题） */
.end-row2 .btn-ghost:active, .btn-share:active { transform: scale(0.98); }
/* 高窗口（细长安卓机、电脑竖长窗口）：内容最高 880px、整块垂直居中，多出来的上下平分（董事长 2026-11-20）；
   背景、灯色、遮罩都是 fixed 铺满不受影响；矮于 881px 的屏幕不走这里，和原来一模一样。
   内容超过 880px 时 auto 边距归零、照常从顶部开始滚动，不会被裁。 */
@media (min-height: 881px) {
  body { display: flex; flex-direction: column; }
  .screen { width: 100%; min-height: 880px; margin: auto; flex: none; }
  /* 原来靠 .screen 比屏幕高 1 像素让 body 能弹；居中后改由这根看不见的 1 像素细条撑出来 */
  body::after { content: ""; position: absolute; top: 0; left: 0; width: 1px; height: calc(100% + 1px); pointer-events: none; visibility: hidden; }
  /* 跟着内容走的浮层：语言小提示贴内容区底边，音量小卡片贴内容区顶上的喇叭 */
  #langHint { bottom: calc(14px + var(--safe-b) + (100dvh - 880px) / 2); }
  .volpop-card { top: calc(60px + (100dvh - 880px) / 2); }
}
/* 作品推荐区：一行小字链接，像以前那样低调 */
.ad-slot {
}   /* 上面 .ad-slot 那一行原来没闭合，补上（不然后面加的样式都不生效） */

/* 线上补丁 2026-11-23（反馈 #13：无限模式「求高潮」大按钮出来时，寸止 / 提前高潮了两个小按钮压在它上面、矮屏底下按钮挤出屏幕）
   大按钮缩短一截，两个小按钮放它右边同一行；屏幕矮的时候圆环跟着缩、台词框少留一行 */
#screenPlay:has(#cumBtn:not(.hidden)) .cum { width: calc(100% - 162px); }
#screenPlay:has(#cumBtn:not(.hidden)) .cum-row { bottom: 82px; left: auto; right: 16px; margin: 0; gap: 6px; }
#screenPlay:has(#cumBtn:not(.hidden)) .cum-row .cum-now { padding: 8px 11px; font-size: 13px; }
@media (max-height: 600px) {
  #screenPlay .ring-wrap { width: max(110px, min(68vw, 290px, calc(100dvh - 340px))); }
  #screenPlay .say-box { margin-top: 8px; min-height: calc(22px * 1.55 * 2 + 17px * 1.7 + 4px); }
  #screenPlay .stage { padding: 4px 0 0; }
  #screenPlay .cum { margin-top: 8px; padding: 11px; }
  #screenPlay .controls { margin-top: 8px; }
  #screenPlay .phases { padding-top: 2px; }
}

/* 旧版提示条（/classic/，2026-11-23）：首页顶部一行小字，点了回新版 */
.classic-bar { display: block; margin: 0 auto 6px; padding: 6px 12px; width: fit-content; max-width: 100%; border-radius: 999px; background: var(--track); color: var(--ink2); font-size: 12px; text-align: center; text-decoration: none; }
.classic-bar:active { opacity: 0.6; }
