/* 大锤你画我猜 · 明亮奶油手账画室 × 阳光涂鸦派对主题 */
.draw-page {
  --dw-bg: #f4f7ff;
  --dw-paper: #ffffff;
  --dw-cream: #fffdf8;
  --dw-panel: #f8fafc;
  --dw-border: #dbe4f3;
  --dw-gold: #f59e0b;
  --dw-accent: #2563eb;
  --dw-ink: #1e293b;
  --dw-muted: #64748b;
  background-color: #f4f7ff;
  background-image:
    radial-gradient(circle at 12% 10%, rgba(254, 240, 138, 0.55) 0%, transparent 36%),
    radial-gradient(circle at 88% 12%, rgba(191, 219, 254, 0.65) 0%, transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(254, 205, 211, 0.42) 0%, transparent 38%),
    radial-gradient(rgba(148, 163, 184, 0.24) 1.2px, transparent 1.2px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 20px 20px;
  color: var(--dw-ink);
  overscroll-behavior: none;
}

/* 无障碍跳转链接非聚焦隐藏 & 顶栏共享导航轻亮协调化 */
.draw-page .skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.draw-page .skip-link:focus {
  position: fixed;
  left: 10px;
  top: 10px;
  width: auto;
  height: auto;
  z-index: 999;
  padding: 6px 12px;
  border-radius: 9px;
  background: #2563eb;
  color: #ffffff;
}
/* 亮色奶油画室下全量定义顶栏与全屏浮顶工具栏令牌（特异性高于 game-shell.css，修复「官网」微标、手机标题与全屏按钮白字隐形） */
body.merge-page.draw-page,
body.merge-page.draw-page[data-game].xh-nav-v2 {
  --gn-bg: rgba(255, 255, 255, 0.9);
  --gn-bg-hover: #ffffff;
  --gn-border: rgba(15, 23, 42, 0.14);
  --gn-ink: #0f172a;
  --gn-muted: #475569;
  --gn-sep: rgba(15, 23, 42, 0.12);
  --gn-coin-bg: rgba(254, 243, 199, 0.94);
  --gn-coin-border: rgba(217, 119, 6, 0.34);
  --gn-coin-ink: #78350f;
  --gn-cta-bg: #1e293b;
  --gn-cta-ink: #ffffff;
}
body.merge-page.draw-page .merge-nav {
  background: rgba(255, 255, 255, 0.92) !important;
  border-bottom: 1px solid rgba(203, 213, 225, 0.72) !important;
  color: #0f172a !important;
}
body.merge-page.draw-page[data-game].xh-nav-v2 .merge-nav .nav-home-tag {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.14);
  color: #475569;
}
body.merge-page.draw-page[data-game].xh-nav-v2 .merge-nav .identity:hover .nav-home-tag {
  background: #e2e8f0;
  color: #0f172a;
}
body.merge-page.draw-page[data-game].xh-nav-v2 .merge-nav .game-nav-sep {
  color: #64748b;
  opacity: 0.55;
}
/* 全屏专注模式：恢复宽屏画室视野（告别 36rem 窄条挤压）并保证浮顶工具栏高对比清晰可见 */
body.merge-page.draw-page[data-game].game-focus .game-screen {
  --game-screen-width: min(1360px, calc(100vw - 24px));
  gap: 8px;
  padding: max(8px, env(safe-area-inset-top)) 12px max(10px, env(safe-area-inset-bottom));
}
body.merge-page.draw-page[data-game].xh-nav-v2.game-focus .game-screen > .game-tools {
  padding: 2px 0;
  background: transparent;
}
body.merge-page.draw-page[data-game].xh-nav-v2.game-focus .game-screen > .game-tools .game-tool {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(15, 23, 42, 0.16);
  color: #0f172a;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.08);
}
body.merge-page.draw-page[data-game].xh-nav-v2.game-focus .game-screen > .game-tools .game-tool:hover {
  background: #ffffff;
  border-color: rgba(37, 99, 235, 0.36);
  color: #1d4ed8;
}
body.merge-page.draw-page[data-game].xh-nav-v2.game-focus .game-screen > .game-tools .game-tool[aria-pressed="true"] {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}
body.merge-page.draw-page[data-game].xh-nav-v2.game-focus .game-screen > .game-tools .gn-ico-mobile {
  display: none;
}
body.merge-page.draw-page[data-game].game-focus .draw-studio {
  height: calc(var(--game-viewport-height, 100dvh) - 124px);
  min-height: 440px;
  max-height: none;
}
/* 桌面端令顶栏导航、状态条与画室 100% 严格等宽左右对齐，消除两边突出 */
@media (min-width: 821px) {
  body.draw-page:not([data-gsm-view="menu"]) .merge-nav {
    box-sizing: border-box;
    width: min(1236px, calc(100% - 24px));
    max-width: none;
    margin: 6px auto 0;
    padding: 6px 16px;
    border-radius: 16px;
    border: 1.5px solid #dbe4f3 !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.06);
  }
}
body.draw-page .gsm-play-bar {
  --gsm-hud-bg: rgba(255, 255, 255, 0.92);
  --gsm-hud-border: #dbe4f3;
  --gsm-hud-ink: #0f172a;
  --gsm-hud-pill-bg: #eff6ff;
  --gsm-hud-pill-border: #bfdbfe;
  --gsm-hud-pill-ink: #1d4ed8;
  --gsm-hud-btn-bg: #f1f5f9;
  --gsm-hud-btn-hover: #e2e8f0;
  --gsm-hud-menu-bg: #2563eb;
  --gsm-hud-menu-border: #1d4ed8;
  --gsm-hud-menu-ink: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
}

.draw-layout,
.draw-layout * {
  box-sizing: border-box;
}
.draw-layout {
  width: min(1260px, 100%);
  max-width: 100%;
  margin: 0 auto;
  padding: 6px 12px 10px;
}

.draw-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.draw-header h1 { margin: 0; font-size: 1.35rem; color: #0f172a; }
.draw-header h1 span { color: #2563eb; }
.draw-modes { display: flex; gap: 6px; }

/* 单屏定框奶油手账画室主框架 */
.draw-studio {
  position: relative;
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 154px);
  min-height: 460px;
  max-height: 860px;
  border-radius: 22px;
  border: 2.5px solid #cbd5e1;
  background: linear-gradient(180deg, #fffdf8 0%, #f8fbff 100%);
  box-shadow:
    0 18px 44px rgba(37, 99, 235, 0.13),
    0 4px 0 #cbd5e1;
  overflow: hidden;
  overscroll-behavior: contain;
}

/* 精简单行顶栏：活泼晴空配色，突出「核心提示 + 倒计时」 */
.draw-top-bar {
  position: relative;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 12px;
  background: linear-gradient(180deg, #eff6ff 0%, #f8fbff 100%);
  border-bottom: 1.5px solid #dbeafe;
  flex-shrink: 0;
}
.draw-top-left,
.draw-top-right {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.draw-top-left {
  flex: 1 1 auto;
}
.draw-top-right {
  flex-shrink: 0;
}
.draw-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #334155;
  white-space: nowrap;
  flex-shrink: 0;
}
.draw-pill[hidden] { display: none; }
.draw-pill-mode {
  background: #fef3c7;
  border-color: #fbbf24;
  color: #92400e;
}
.draw-pill-round {
  background: #e0e7ff;
  border-color: #a5b4fc;
  color: #3730a3;
}
.draw-top-bar.is-live {
  background: linear-gradient(110deg, #eff6ff 0%, #fffbeb 48%, #f0f9ff 100%);
  background-size: 220% 100%;
  animation: dwTopShimmer 9s ease-in-out infinite;
}
@keyframes dwTopShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.draw-pill-score {
  background: linear-gradient(135deg, #ecfdf5, #dcfce7);
  border-color: #4ade80;
  color: #166534;
  gap: 3px;
  font-variant-numeric: tabular-nums;
}
.draw-score-val {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
}
.draw-score-label {
  font-size: 0.7rem;
  font-weight: 800;
  opacity: 0.85;
}
.draw-pill-score.is-score-pop {
  animation: dwScorePop 0.48s cubic-bezier(0.22, 1, 0.36, 1);
  background: linear-gradient(135deg, #fef08a, #bbf7d0);
  border-color: #22c55e;
}
@keyframes dwScorePop {
  0% { transform: scale(1); }
  40% { transform: scale(1.16); }
  100% { transform: scale(1); }
}
.draw-pill-double {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  border-color: #fcd34d;
  color: #ffffff;
  animation: dwPulse 1.1s ease-in-out infinite;
}
.draw-pill-blind {
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  border-color: #c4b5fd;
  color: #ffffff;
}
.draw-pill-spec {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #334155;
}
.draw-pill-mono {
  background: #1e293b;
  border-color: #475569;
  color: #f8fafc;
}
.draw-pill-strokes {
  background: #eff6ff;
  border-color: #60a5fa;
  color: #1d4ed8;
}
.draw-pill-strokes.is-low {
  background: #fee2e2;
  border-color: #f87171;
  color: #b91c1c;
}
.draw-pill-sprint {
  background: linear-gradient(135deg, #f97316, #e11d48);
  border-color: #fda4af;
  color: #ffffff;
  animation: dwPulse 0.85s ease-in-out infinite;
}
.draw-friends-top-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
}
.draw-player-row.is-spectator {
  opacity: 0.78;
  background: #f8fafc;
  border-style: dashed;
}
.draw-mini-player.is-spectator {
  background: #f1f5f9;
  border-style: dashed;
  color: #475569;
}
.draw-guess-form input:disabled {
  background: #f1f5f9;
  color: #64748b;
  cursor: not-allowed;
}
.draw-guess-form button[type="submit"]:disabled {
  opacity: 0.45 !important;
  cursor: not-allowed;
}
.draw-word-banner {
  padding: 4px 13px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  border: 1.5px solid #93c5fd;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.24);
  font-size: 0.86rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.draw-timer-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 900;
  background: #fef3c7;
  border: 1.5px solid #f59e0b;
  color: #b45309;
  white-space: nowrap;
}
.draw-timer-pill.is-warn {
  background: #ffedd5;
  border-color: #f97316;
  color: #c2410c;
}
.draw-timer-pill.is-urgent {
  background: #fee2e2;
  border-color: #ef4444;
  color: #dc2626;
  animation: dwPulse 0.7s ease-in-out infinite;
}
@keyframes dwPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
.draw-mini-btn {
  padding: 4px 10px !important;
  min-height: 28px !important;
  font-size: 0.76rem !important;
  font-weight: 800 !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  box-shadow: 0 2px 0 #cbd5e1 !important;
  color: #1e293b !important;
}
.draw-mini-btn.merge-primary {
  background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
  border-color: #1d4ed8 !important;
  box-shadow: 0 2px 0 #1d4ed8 !important;
  color: #ffffff !important;
}

/* 统一极简线性 SVG 图标规范（告别杂乱多色 Emoji，轻量清晰继承文字色） */
.dw-ico {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -2px;
}
.dw-caret {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 通用轻弹窗（更多菜单 / 表情弹窗） */
.draw-more-wrap {
  position: relative;
}
.draw-more-btn {
  min-width: 32px !important;
  padding: 4px 8px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}
.draw-popover {
  position: absolute;
  z-index: 38;
  border-radius: 15px;
  background: #ffffff;
  border: 2px solid #cbd5e1;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
}
.draw-popover[hidden] { display: none !important; }
.draw-more-popover {
  top: calc(100% + 6px);
  right: 0;
  min-width: 196px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.draw-pop-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  padding: 8px 10px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: #1e293b;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.draw-pop-item[hidden] { display: none; }
.draw-pop-item:hover {
  background: #eff6ff;
  color: #1d4ed8;
}
.draw-pop-item.is-danger {
  color: #e11d48;
}
.draw-pop-item.is-danger:hover {
  background: #fff1f2;
}

/* 手机端动态舞台条（左侧固定当前画手 + 右侧可滑得分玩家条；桌面端隐藏） */
.draw-stage-strip {
  display: none;
}
.draw-players-bar {
  display: none;
}

/* 桌面端侧栏专属「当前画手」动态焦点卡 */
.draw-drawer-card {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 13px;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1.5px solid #f59e0b;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.14);
  flex-shrink: 0;
}
.draw-drawer-card[hidden] { display: none; }
.draw-drawer-card-av {
  position: relative;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}
.draw-drawer-card-av img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #f59e0b;
  background: #ffffff;
  display: block;
}
.draw-drawer-card.is-active .draw-drawer-card-av img {
  animation: dwDrawerRing 2.2s ease-in-out infinite;
}
@keyframes dwDrawerRing {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.45); }
  50% { box-shadow: 0 0 0 5px rgba(245, 158, 11, 0); }
}
.draw-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 2px #ffffff;
  flex-shrink: 0;
  animation: dwDotPulse 1.6s ease-in-out infinite;
}
.draw-drawer-card-av .draw-live-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
}
@keyframes dwDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.84); }
}
.draw-drawer-card-info {
  flex: 1 1 auto;
  min-width: 0;
}
.draw-drawer-card-head {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 1px;
}
.draw-drawer-card-kicker {
  display: inline-block;
  font-size: 0.64rem;
  font-weight: 800;
  color: #b45309;
  line-height: 1.15;
  white-space: nowrap;
}
.draw-drawer-card-namerow {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.draw-drawer-card-info strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 900;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.draw-drawer-card-state {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #fcd34d;
  color: #92400e;
  font-size: 0.62rem;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
}
.draw-drawer-card-right {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.draw-card-pts[hidden] { display: none !important; }

/* 最高分王冠 ACE 徽章 */
.draw-ace-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1px 5px 1px 4px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fef08a 0%, #fbbf24 100%);
  border: 1px solid #d97706;
  color: #78350f;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.25;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(217, 119, 6, 0.22);
}
.draw-ace-badge[hidden] { display: none !important; }
.draw-ace-badge .dw-crown {
  width: 9px;
  height: 9px;
  fill: #d97706;
  stroke: #78350f;
  stroke-width: 1.4;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.draw-live-dots::after {
  content: '…';
  display: inline-block;
  width: 11px;
  text-align: left;
  animation: dwDotsEllipsis 1.4s steps(3, end) infinite;
}
@keyframes dwDotsEllipsis {
  0% { content: '.'; }
  33% { content: '..'; }
  66%, 100% { content: '...'; }
}

/* 画板动态生命力光晕 + 冲刺态 + 轻量庆祝礼花 */
.draw-easel.is-live-drawing {
  animation: dwEaselBreathe 3.6s ease-in-out infinite;
}
@keyframes dwEaselBreathe {
  0%, 100% { box-shadow: inset 0 0 0 2px rgba(254, 243, 199, 0.9), 0 8px 22px rgba(180, 83, 9, 0.12); }
  50% { box-shadow: inset 0 0 0 2px rgba(254, 243, 199, 1), 0 10px 28px rgba(245, 158, 11, 0.24); }
}
.draw-easel.is-sprint {
  border-color: #f97316;
  animation: dwSprintGlow 0.95s ease-in-out infinite;
}
@keyframes dwSprintGlow {
  0%, 100% { box-shadow: inset 0 0 0 2px rgba(254, 215, 170, 0.9), 0 0 0 0 rgba(249, 115, 22, 0.35); }
  50% { box-shadow: inset 0 0 0 2px rgba(254, 215, 170, 1), 0 0 22px rgba(249, 115, 22, 0.38); }
}
.draw-confetti-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 9;
}
.draw-confetti-dot {
  position: absolute;
  top: -8px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  opacity: 0;
  animation: dwConfettiFall 1.15s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
@keyframes dwConfettiFall {
  0% { opacity: 1; transform: translate3d(0, 0, 0) rotate(0deg); }
  100% { opacity: 0; transform: translate3d(var(--dx, 0px), 170px, 0) rotate(320deg); }
}

/* 主画室双栏 */
.draw-workspace {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 10px;
  padding: 10px;
}

.draw-canvas-col {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 纯白画纸 + 温暖木质画框 */
.draw-easel {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  border-radius: 18px;
  border: 3px solid #f59e0b;
  box-shadow:
    inset 0 0 0 2px rgba(254, 243, 199, 0.9),
    0 8px 22px rgba(180, 83, 9, 0.12);
  background: #ffffff;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.draw-canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: crosshair;
  background: #ffffff;
}
.draw-canvas.is-readonly {
  cursor: default;
}
.draw-canvas.has-ring-cursor {
  cursor: none;
}

/* 选词期间猜词人画布中央实时倒计时等待条 */
.draw-choose-wait {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 14px;
  pointer-events: none;
  z-index: 14;
}
.draw-choose-wait[hidden] { display: none !important; }
.draw-choose-wait-card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.96);
  border: 2px solid #93c5fd;
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.16);
  color: #1e293b;
  font-size: 0.88rem;
  font-weight: 800;
}
.draw-choose-wait-card strong {
  color: #1d4ed8;
}

/* 选词完成 2.4 秒画布中央大字提示卡片 */
.draw-round-splash {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 14px;
  pointer-events: none;
  z-index: 15;
}
.draw-round-splash[hidden] { display: none !important; }
.draw-splash-card {
  padding: 16px 26px;
  border-radius: 22px;
  background: rgba(255, 253, 247, 0.96);
  border: 3px solid #3b82f6;
  box-shadow:
    0 16px 38px rgba(37, 99, 235, 0.24),
    0 4px 0 #93c5fd;
  text-align: center;
  animation: dwSplashPop 2.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.draw-splash-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 6px;
}
.draw-splash-main {
  font-size: 1.65rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.25;
  margin-bottom: 6px;
}
.draw-splash-sub {
  display: inline-block;
  padding: 4px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1.5px solid #f59e0b;
  color: #92400e;
  font-size: 1.05rem;
  font-weight: 900;
}
@keyframes dwSplashPop {
  0% { opacity: 0; transform: scale(0.76) translateY(10px); }
  12% { opacity: 1; transform: scale(1.04) translateY(0); }
  20% { opacity: 1; transform: scale(1); }
  82% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.92) translateY(-16px); }
}

/* 实时笔刷圆环光标与大锤震屏、隐形盲画提示 */
.draw-cursor-ring {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  border-radius: 50%;
  border: 2px solid #1e293b;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.95);
  transform: translate(-50%, -50%);
  z-index: 9;
}
.draw-cursor-ring[hidden] { display: none; }

.draw-blind-banner {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(109, 40, 217, 0.92);
  border: 1.5px solid #ddd6fe;
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
  max-width: 92%;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 7;
  pointer-events: none;
}
.draw-blind-banner[hidden] { display: none; }

.draw-easel.is-hammer-shake {
  animation: dwHammerShake 0.34s cubic-bezier(0.36, 0.07, 0.19, 0.97);
  box-shadow:
    inset 0 0 0 4px rgba(245, 158, 11, 0.9),
    0 0 28px rgba(245, 158, 11, 0.45);
}
@keyframes dwHammerShake {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  20% { transform: translate(-4px, 2px) rotate(-0.45deg); }
  45% { transform: translate(4px, -3px) rotate(0.45deg); }
  70% { transform: translate(-3px, -1px) rotate(-0.25deg); }
}

/* 防剧透三轨道画布弹幕（糖果漫画气泡风，白底清晰易读、绝不拦画笔） */
.draw-danmaku-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 7;
}
.draw-danmaku-item {
  position: absolute;
  left: 100%;
  padding: 3px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1.5px solid #93c5fd;
  color: #1e293b;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
  will-change: transform;
  animation: dwDanmakuFly 6.2s linear forwards;
}
.draw-danmaku-item.is-close {
  background: rgba(254, 243, 199, 0.96);
  border-color: #f59e0b;
  color: #92400e;
}
.draw-danmaku-item.is-ok {
  background: rgba(220, 252, 231, 0.96);
  border-color: #22c55e;
  color: #166534;
}
.draw-danmaku-item.is-warn {
  background: rgba(255, 241, 242, 0.96);
  border-color: #fb7185;
  color: #be123c;
}
@keyframes dwDanmakuFly {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(calc(-100% - 1020px), 0, 0); }
}

/* 飘浮互动表情 */
.draw-float-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 8;
}
.draw-float-emoji {
  position: absolute;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  border: 1.5px solid #fbbf24;
  color: #0f172a;
  font-size: 0.92rem;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.15);
  animation: dwFloatUp 2.1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes dwFloatUp {
  0% { opacity: 0; transform: translateY(12px) scale(0.8); }
  15% { opacity: 1; transform: translateY(-14px) scale(1.06); }
  100% { opacity: 0; transform: translateY(-180px) scale(0.95); }
}

.draw-artist-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 4px;
  border-radius: 999px;
  background: rgba(255, 251, 235, 0.94);
  border: 1.5px solid #f59e0b;
  color: #92400e;
  font-size: 0.74rem;
  font-weight: 800;
  z-index: 6;
  pointer-events: none;
}
.draw-artist-tag[hidden] { display: none; }
.draw-artist-tag img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

/* 糖果立体画具栏（猜词态自动隐藏释放画布空间） */
.draw-bottom-dock {
  position: relative;
  flex-shrink: 0;
  background: #f1f5f9;
  border: 1.5px solid #dbe4f3;
  border-radius: 15px;
  padding: 7px 10px;
}
.draw-bottom-dock[hidden],
.draw-toolbar[hidden],
.draw-guess-helper[hidden] { display: none !important; }

.draw-toolbar {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.draw-mob-bar {
  display: none;
}
.draw-tray-color {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.draw-palette {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.draw-swatch {
  width: 23px;
  height: 23px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  padding: 0;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.draw-swatch:hover { transform: scale(1.14); }
.draw-swatch[aria-pressed="true"] {
  transform: scale(1.2);
  border-color: #ffffff;
  box-shadow: 0 0 0 3px #2563eb;
}

.draw-tools-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}
.draw-tool-group,
.draw-size-group,
.draw-ops-group {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.draw-ops-group {
  padding-right: 7px;
  border-right: 1.5px solid #cbd5e1;
}
.draw-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 9px;
  border-radius: 10px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  box-shadow: 0 2px 0 #cbd5e1;
  color: #1e293b;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.08s ease;
}
.draw-tool-btn.is-icon-only {
  padding: 5px 8px;
}
.draw-tool-btn:active {
  transform: translateY(1px);
}
.draw-tool-btn[hidden] { display: none !important; }
.draw-tool-btn[aria-pressed="true"] {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  border-color: #1d4ed8;
  box-shadow: 0 2px 0 #1e40af;
  color: #ffffff;
}
.draw-tool-btn.is-undo,
.draw-tool-btn.is-redo {
  background: #eff6ff;
  border-color: #93c5fd;
  box-shadow: 0 2px 0 #93c5fd;
  color: #1d4ed8;
}
.draw-tool-btn.is-redo:disabled,
.draw-tool-btn.is-undo:disabled {
  opacity: 0.42;
  cursor: default;
}
.draw-tool-btn.is-skip {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: 0 2px 0 #cbd5e1;
  color: #475569;
}
.draw-tool-btn.is-skip:disabled {
  opacity: 0.45;
  cursor: default;
}
.draw-tool-btn.is-skip.is-armed {
  background: #e11d48;
  border-color: #be123c;
  box-shadow: 0 2px 0 #9f1239;
  color: #ffffff;
}
.draw-palette.is-mono .draw-swatch:not(:first-child) {
  opacity: 0.18;
  pointer-events: none;
  filter: grayscale(1);
}
.draw-tool-btn.is-clear {
  background: #fff1f2;
  border-color: #fda4af;
  box-shadow: 0 2px 0 #fda4af;
  color: #e11d48;
}
.draw-tool-btn.is-hammer[aria-pressed="true"] {
  background: linear-gradient(135deg, #7c3aed, #f59e0b);
  border-color: #d97706;
  box-shadow: 0 2px 0 #b45309;
  color: #ffffff;
}
.draw-tool-btn.is-done {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  border-color: #15803d;
  box-shadow: 0 2px 0 #15803d;
  color: #ffffff;
}
.draw-tool-btn.is-hint {
  background: #fef3c7;
  border-color: #fbbf24;
  box-shadow: 0 2px 0 #f59e0b;
  color: #92400e;
}
.draw-tool-btn.is-hint:disabled {
  opacity: 0.45;
  cursor: default;
}
.draw-active-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid #94a3b8;
  background: #1e293b;
  vertical-align: middle;
}
.draw-size-dot {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}
.draw-size-dot[aria-pressed="true"] {
  background: #fef3c7;
  border-color: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.35);
}
.draw-size-dot i {
  display: block;
  border-radius: 50%;
  background: #1e293b;
}

/* 单人快捷猜词选项条 */
.draw-guess-helper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.draw-quick-options {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
}
.draw-opt-chip {
  padding: 5px 13px;
  border-radius: 999px;
  border: 1.5px solid #93c5fd;
  background: #ffffff;
  box-shadow: 0 2px 0 #bfdbfe;
  color: #1d4ed8;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease;
}
.draw-opt-chip:hover {
  transform: translateY(-1px);
  background: #eff6ff;
}
.draw-opt-chip.is-wrong {
  opacity: 0.36;
  text-decoration: line-through;
  pointer-events: none;
}
.draw-helper-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* 右侧/底侧手账笔记风格玩家与评论列 */
.draw-side-col {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f1f5f9;
  border: 1.5px solid #dbe4f3;
  border-radius: 16px;
  padding: 8px;
  overflow: visible;
}

.draw-players {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 176px;
  overflow-y: auto;
  flex-shrink: 0;
}
.draw-player-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border-radius: 11px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  font-size: 0.78rem;
  color: #1e293b;
}
.draw-player-row.is-drawer {
  border-color: #f59e0b;
  background: #fffbeb;
}
.draw-player-row.is-guessed {
  border-color: #22c55e;
  background: #f0fdf4;
}
.draw-player-row.is-offline {
  opacity: 0.68;
  background: #f8fafc;
  border-style: dashed;
  border-color: #cbd5e1;
}
.draw-player-row.is-offline .draw-player-av {
  filter: grayscale(0.75);
}
.draw-av-wrap {
  position: relative;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
.draw-conn-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid #ffffff;
  background: #22c55e;
}
.draw-conn-dot.is-offline {
  background: #94a3b8;
}
.draw-live-dot.is-offline {
  background: #94a3b8;
  animation: none !important;
}
.draw-conn-tag {
  display: inline-flex;
  align-items: center;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 800;
  line-height: 1.4;
  white-space: nowrap;
  flex-shrink: 0;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #64748b;
}
.draw-conn-tag[hidden] { display: none !important; }
.draw-player-av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e2e8f0;
  flex-shrink: 0;
  background: #f1f5f9;
  display: block;
}
.draw-player-info {
  min-width: 0;
  flex: 1;
}
.draw-player-name-row {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.draw-player-info strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #0f172a;
}
.draw-player-info small {
  font-size: 0.68rem;
  color: #64748b;
  font-weight: 600;
}
.draw-player-pts {
  font-weight: 900;
  color: #d97706;
  white-space: nowrap;
}
.draw-add-fr-btn {
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.66rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.draw-add-fr-btn:hover { background: #dbeafe; }
.draw-add-fr-btn[hidden] { display: none !important; }
.draw-fr-tag {
  padding: 1px 6px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 0.64rem;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
}
.draw-fr-tag.is-pending {
  background: #f1f5f9;
  color: #64748b;
}
.draw-fr-tag[hidden] { display: none !important; }

.draw-chat-feed {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 2px;
  font-size: 0.8rem;
  line-height: 1.42;
}
.draw-msg {
  padding: 5px 9px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #1e293b;
  word-break: break-word;
  font-weight: 600;
}
.draw-msg.is-sys {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}
.draw-msg.is-ok {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
  font-weight: 800;
}
.draw-msg.is-close {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
  font-weight: 800;
}
.draw-msg.is-spectator {
  background: #f5f3ff;
  border-color: #ddd6fe;
  color: #4c1d95;
}
.draw-lobby-chip {
  animation: dwChipIn 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes dwChipIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* 输入框 + 内嵌表情弹窗按钮 */
.draw-guess-form {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.draw-react-wrap {
  position: relative;
  flex-shrink: 0;
}
.draw-react-trigger {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  box-shadow: 0 2px 0 #cbd5e1;
  color: #475569;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}
.draw-react-trigger .dw-ico {
  width: 19px;
  height: 19px;
  vertical-align: 0;
}
.draw-react-trigger[aria-expanded="true"] {
  border-color: #f59e0b;
  background: #fef3c7;
  color: #b45309;
}
.draw-react-bar {
  bottom: calc(100% + 8px);
  left: 0;
  width: min(296px, calc(100vw - 24px));
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 8px;
}
.draw-react-stickers {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}
.draw-react-stickers button {
  height: 35px;
  border-radius: 10px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  font-size: 1.08rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}
.draw-react-stickers button:hover {
  background: #fef3c7;
  border-color: #fbbf24;
  transform: translateY(-1px);
}
.draw-quick-phrases {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  padding-top: 7px;
  border-top: 1px solid #e2e8f0;
}
.draw-phrase-btn {
  padding: 6px 7px;
  border-radius: 9px;
  border: 1px solid #dbe4f3;
  background: #f8fafc;
  color: #1e293b;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.draw-phrase-btn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}
.draw-phrase-btn:active {
  transform: scale(0.97);
}
.draw-guess-form input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 6px 11px;
  border-radius: 11px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-size: 16px;
  font-weight: 600;
}
@media (min-width: 821px) {
  .draw-guess-form input { font-size: 0.84rem; }
}
.draw-guess-form input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}
.draw-guess-form button[type="submit"] {
  padding: 6px 14px !important;
  min-height: 36px !important;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  border-radius: 11px !important;
  background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
  border: 1.5px solid #1d4ed8 !important;
  box-shadow: 0 2px 0 #1d4ed8 !important;
  color: #ffffff !important;
  flex-shrink: 0;
}

/* 全画室级明亮派对弹窗浮层（铺满整个画室，零框中框） */
.draw-overlay {
  position: absolute;
  inset: 0;
  background: rgba(241, 245, 249, 0.86);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 40;
  overflow-y: auto;
}
.draw-overlay[hidden] { display: none !important; }

.draw-modal-card {
  width: min(480px, 100%);
  max-height: 100%;
  overflow-y: auto;
  padding: 18px 20px;
  border-radius: 22px;
  background: #fffdf8;
  border: 2.5px solid #fbbf24;
  box-shadow:
    0 20px 48px rgba(37, 99, 235, 0.16),
    0 4px 0 #f59e0b;
  color: #1e293b;
  text-align: center;
}
.draw-modal-card h2 {
  margin: 0 0 4px;
  font-size: 1.22rem;
  font-weight: 900;
  color: #0f172a;
}
.draw-modal-sub {
  margin: 0 0 12px;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.45;
  font-weight: 600;
}
.draw-modal-card .merge-button {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 2px 0 #cbd5e1;
  color: #1e293b;
  font-weight: 800;
  border-radius: 12px;
}
.draw-modal-card .merge-button.merge-primary {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  border-color: #1d4ed8;
  box-shadow: 0 3px 0 #1d4ed8;
  color: #ffffff;
}
.draw-modal-card .merge-button.is-danger-btn {
  background: #fff1f2;
  border-color: #fda4af;
  box-shadow: 0 2px 0 #fda4af;
  color: #be123c;
}
.draw-modal-card .merge-button.is-danger-btn.is-armed {
  background: #e11d48;
  border-color: #be123c;
  box-shadow: 0 2px 0 #9f1239;
  color: #ffffff;
}
.draw-modal-card .merge-button:disabled {
  opacity: 0.56;
}

.draw-lobby-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
}
.draw-pack-label {
  display: block;
  margin-bottom: 10px;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
}
.draw-wait-settings {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

/* 柔和圆角自定义下拉选择（替代系统生硬方角下拉框） */
.draw-soft-select {
  position: relative;
  display: block;
  width: 100%;
  margin-top: 4px;
}
.draw-wait-settings .draw-soft-select {
  margin-top: 0;
}
.draw-soft-select > select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  margin: 0;
}
.draw-soft-select-btn {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 12px;
  border: 1.5px solid #dbe4f3;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.05);
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.draw-wait-settings .draw-soft-select-btn {
  padding: 6px 10px;
  font-size: 0.78rem;
  border-radius: 11px;
}
.draw-soft-select-btn:hover:not(:disabled) {
  border-color: #93c5fd;
  background: #ffffff;
}
.draw-soft-select-btn[aria-expanded="true"] {
  border-color: #60a5fa;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}
.draw-soft-select-btn:disabled {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #64748b;
  box-shadow: none;
  cursor: default;
}
.draw-soft-select-val {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.draw-soft-select-btn .dw-caret {
  color: #64748b;
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}
.draw-soft-select-btn[aria-expanded="true"] .dw-caret {
  transform: rotate(180deg);
  color: #2563eb;
}
.draw-soft-menu {
  position: fixed;
  z-index: 260;
  min-width: 124px;
  max-width: calc(100vw - 24px);
  max-height: 256px;
  overflow-y: auto;
  padding: 5px;
  border-radius: 16px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  box-shadow:
    0 18px 40px rgba(15, 23, 42, 0.16),
    0 4px 12px rgba(37, 99, 235, 0.1);
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: dwSoftPop 0.13s cubic-bezier(0.22, 1, 0.36, 1);
}
.draw-soft-menu[hidden] { display: none !important; }
@keyframes dwSoftPop {
  from { opacity: 0.92; transform: translateY(-3px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.draw-soft-opt {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 11px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s ease, color 0.12s ease;
}
.draw-soft-opt:hover {
  background: #eff6ff;
  color: #1d4ed8;
}
.draw-soft-opt.is-selected {
  background: linear-gradient(135deg, #eff6ff 0%, #fefce8 100%);
  color: #1d4ed8;
  font-weight: 800;
}
.draw-soft-opt .dw-ico {
  width: 13px;
  height: 13px;
  color: #2563eb;
  opacity: 0;
}
.draw-soft-opt.is-selected .dw-ico {
  opacity: 1;
}

.draw-mode-toggles {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.draw-mode-toggles.is-wait {
  margin-bottom: 8px;
}
/* 清爽自定义开关胶囊：左侧拨动开关、轻点右侧模式名弹出玩法说明气泡 */
.draw-toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px 4px 7px;
  border-radius: 999px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  font-size: 0.76rem;
  font-weight: 800;
  color: #475569;
  user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.draw-toggle-pill.is-checked,
.draw-toggle-pill:has(input:checked) {
  border-color: #f59e0b;
  background: #fef3c7;
  color: #92400e;
}
.draw-switch-hit {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.draw-toggle-pill input {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 28px;
  height: 16px;
  margin: 0;
  border-radius: 999px;
  border: none;
  background: #cbd5e1;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.16s ease;
}
.draw-toggle-pill input::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.28);
  transition: transform 0.16s ease;
}
.draw-toggle-pill input:checked {
  background: #f59e0b;
}
.draw-toggle-pill input:checked::after {
  transform: translateX(12px);
}
.draw-toggle-pill input:disabled {
  opacity: 0.72;
  cursor: default;
}
.draw-mode-name-btn {
  border: 0;
  background: transparent;
  padding: 1px 0;
  color: inherit;
  font: inherit;
  line-height: 1.25;
  cursor: pointer;
  border-bottom: 1.5px dashed rgba(100, 116, 139, 0.42);
  transition: color 0.14s ease, border-color 0.14s ease;
}
.draw-toggle-pill.is-checked .draw-mode-name-btn,
.draw-toggle-pill:has(input:checked) .draw-mode-name-btn {
  border-bottom-color: rgba(180, 83, 9, 0.45);
}
.draw-mode-name-btn:hover,
.draw-mode-name-btn[aria-expanded="true"] {
  color: #1d4ed8;
  border-bottom-color: #3b82f6;
}
.draw-toggle-pill.is-checked .draw-mode-name-btn:hover,
.draw-toggle-pill.is-checked .draw-mode-name-btn[aria-expanded="true"] {
  color: #b45309;
  border-bottom-color: #d97706;
}

/* 轻点模式名弹出的玩法说明轻弹窗 */
.draw-mode-tip-pop {
  position: fixed;
  z-index: 270;
  width: min(286px, calc(100vw - 24px));
  padding: 11px 13px;
  border-radius: 15px;
  background: #fffdf8;
  border: 1.5px solid #f59e0b;
  box-shadow:
    0 18px 40px rgba(15, 23, 42, 0.18),
    0 3px 0 rgba(245, 158, 11, 0.35);
  color: #1e293b;
  text-align: left;
  animation: dwSoftPop 0.13s cubic-bezier(0.22, 1, 0.36, 1);
}
.draw-mode-tip-pop[hidden] { display: none !important; }
.draw-mode-tip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}
.draw-mode-tip-head strong {
  font-size: 0.86rem;
  font-weight: 900;
  color: #0f172a;
}
.draw-mode-tip-state {
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 800;
  background: #f1f5f9;
  color: #64748b;
}
.draw-mode-tip-state.is-on {
  background: #fef3c7;
  color: #b45309;
}
.draw-mode-tip-desc {
  margin: 0;
  font-size: 0.77rem;
  font-weight: 600;
  line-height: 1.5;
  color: #475569;
}
.draw-custom-word-form {
  display: flex;
  align-items: stretch;
  gap: 6px;
  width: 100%;
  margin-bottom: 6px;
}
.draw-custom-word-form input {
  flex: 1 1 0;
  min-width: 0;
  width: 0;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1.5px solid #fcd34d;
  background: #fffbeb;
  color: #0f172a;
  font-size: 16px;
  font-weight: 600;
}
.draw-custom-word-form button {
  flex: 0 0 auto;
  white-space: nowrap;
}
@media (min-width: 821px) {
  .draw-custom-word-form input { font-size: 0.78rem; }
}
.draw-custom-count {
  margin: 0 0 8px;
  font-size: 0.75rem;
  font-weight: 800;
  color: #b45309;
}
.draw-custom-count[hidden] { display: none; }
.draw-lobby-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px 4px 5px;
  border-radius: 999px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  font-size: 0.78rem;
  font-weight: 700;
  color: #1e293b;
}
.draw-lobby-chip.is-ready {
  border-color: #22c55e;
  background: #f0fdf4;
}
.draw-lobby-chip.is-offline {
  opacity: 0.66;
  border-style: dashed;
  border-color: #cbd5e1;
  background: #f8fafc;
}
.draw-lobby-chip.is-offline img {
  filter: grayscale(0.75);
}
.draw-chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}
.draw-chip-dot.is-offline {
  background: #94a3b8;
}
.draw-ready-tag {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-style: normal;
}
.draw-lobby-chip.is-ready .draw-ready-tag {
  background: #dcfce7;
  color: #166534;
}
.draw-kick-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  margin-left: 3px;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #dc2626;
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: background-color 0.14s ease, color 0.14s ease, border-color 0.14s ease, transform 0.1s ease;
}
.draw-kick-btn.is-row {
  height: 21px;
  padding: 0 7px;
  margin-left: 2px;
  font-size: 0.65rem;
}
.draw-kick-btn.is-mini {
  height: 17px;
  padding: 0 5px;
  margin-left: 2px;
  font-size: 0.6rem;
}
.draw-kick-btn.is-offline-target {
  background: #fee2e2;
  border-color: #f87171;
  color: #b91c1c;
}
.draw-kick-btn.is-armed,
.draw-kick-btn:hover {
  background: #ef4444;
  border-color: #dc2626;
  color: #ffffff;
}
.draw-kick-btn:active {
  transform: scale(0.95);
}
.draw-kick-btn[hidden] {
  display: none !important;
}
.draw-lobby-chip.is-offline .draw-kick-btn {
  opacity: 1;
}
[data-draw-ready-btn].is-nudged {
  animation: dwNudgeBounce 0.45s ease-in-out 3;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.6) !important;
}
@keyframes dwNudgeBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.09); }
}
[data-draw-ready-btn][hidden],
[data-draw-start-online][hidden],
[data-draw-nudge-btn][hidden] {
  display: none !important;
}
.draw-cta-lg {
  width: 100%;
  justify-content: center;
}
.draw-entry-quick-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 8px;
}
.draw-entry-quick-row .merge-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
}
.draw-wordbook-card {
  width: min(460px, 100%);
}
.draw-wb-form {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 10px;
}
.draw-wb-form textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.84rem;
  font-weight: 600;
  resize: vertical;
  font-family: inherit;
}
.draw-wb-form-row {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}
.draw-wb-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  max-height: 150px;
  overflow-y: auto;
  margin-bottom: 12px;
  padding: 6px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.draw-wb-tags:empty::after {
  content: '词本还是空的，粘贴几个朋友外号或内部梗试试～';
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 600;
}
.draw-wb-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #92400e;
  font-size: 0.74rem;
  font-weight: 800;
}
.draw-wb-tag button {
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 50%;
  background: rgba(146, 64, 14, 0.14);
  color: #92400e;
  font-size: 0.72rem;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}
.draw-divider {
  margin: 10px 0;
  font-size: 0.74rem;
  font-weight: 700;
  color: #64748b;
}
.draw-join-form {
  display: flex;
  align-items: stretch;
  gap: 6px;
  width: 100%;
}
.draw-join-form input {
  flex: 1 1 0;
  min-width: 0;
  width: 0;
  padding: 7px 10px;
  border-radius: 11px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 16px;
}
.draw-join-form button {
  flex: 0 0 auto;
  white-space: nowrap;
  padding-inline: 12px;
}
@media (min-width: 821px) {
  .draw-join-form input { font-size: 0.88rem; }
}
.draw-code-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 11px;
  border-radius: 13px;
  background: #eff6ff;
  border: 2px dashed #60a5fa;
  margin-bottom: 9px;
}
.draw-code-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 0;
}
.draw-code-left span {
  font-size: 0.68rem;
  font-weight: 700;
  color: #2563eb;
  white-space: nowrap;
}
.draw-code-hero strong {
  font-size: 1.24rem;
  letter-spacing: 0.12em;
  color: #1e3a8a;
  cursor: pointer;
  white-space: nowrap;
}
.draw-code-btns {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}
.draw-lobby-players {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-bottom: 12px;
}
.draw-lobby-chip img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  background: #f1f5f9;
}
.draw-lobby-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.draw-lobby-msg {
  margin: 6px 0 0;
  min-height: 16px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #e11d48;
}

/* 选词弹窗顶栏轮次 + 实时倒计时 + 进度条 */
.draw-choose-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}
.draw-choose-bar {
  height: 5px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  margin: 0 auto 12px;
}
.draw-choose-bar i {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #2563eb, #f59e0b);
  transition: width 0.2s linear;
}

/* 漫画选词三连卡 */
.draw-word-choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-bottom: 12px;
}
.draw-word-choice {
  padding: 13px 8px;
  border-radius: 15px;
  border: 2px solid #93c5fd;
  background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
  box-shadow: 0 3px 0 #93c5fd;
  color: #0f172a;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  transition: transform 0.12s ease;
}
.draw-word-choice:hover {
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
  border-color: #f59e0b;
  box-shadow: 0 3px 0 #f59e0b;
  transform: translateY(-2px);
}
.draw-word-choice strong { font-size: 1.02rem; font-weight: 900; color: #1e3a8a; }
.draw-word-choice span { font-size: 0.72rem; font-weight: 700; color: #475569; }

.draw-relay-secret {
  padding: 14px;
  border-radius: 15px;
  background: #fef3c7;
  border: 2px solid #f59e0b;
  font-size: 1.4rem;
  font-weight: 900;
  color: #92400e;
  margin-bottom: 14px;
}

.draw-result-card {
  width: min(560px, 100%);
}
/* 揭晓评分窗内嵌 2.5× 倍速画作缩略图预览舞台 */
.draw-turn-preview {
  position: relative;
  display: block;
  width: min(272px, 82%);
  margin: 0 auto 10px;
  padding: 0;
  border-radius: 13px;
  border: 2px solid #f59e0b;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(180, 83, 9, 0.14);
  overflow: hidden;
  cursor: pointer;
}
.draw-turn-preview[hidden] { display: none !important; }
.draw-turn-canvas {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #ffffff;
}
.draw-preview-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.88);
  color: #ffffff;
  font-size: 0.66rem;
  font-weight: 800;
  pointer-events: none;
}
.draw-preview-save {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  background: rgba(15, 23, 42, 0.82);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25);
}
.draw-preview-save:hover {
  background: #2563eb;
}
.draw-rate-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 11px;
}
.draw-rate-bar[hidden] { display: none; }
.draw-rate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  box-shadow: 0 2px 0 #cbd5e1;
  color: #1e293b;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}
.draw-rate-btn:hover:not(:disabled) {
  background: #fef3c7;
  border-color: #f59e0b;
}
.draw-rate-btn.is-picked {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
}
.draw-rate-btn:disabled { opacity: 0.72; cursor: default; }
.draw-rate-btn.is-readonly:disabled {
  opacity: 1;
  background: #fffbeb;
  border-color: #fcd34d;
  color: #1e293b;
}
.draw-rate-feed {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  margin: -3px 0 9px;
}
.draw-rate-feed[hidden],
.draw-rate-feed:empty { display: none; }
.draw-rate-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  animation: dwRatePop 0.16s ease-out;
}
.draw-rate-chip.is-like {
  background: #fef3c7;
  border: 1.5px solid #f59e0b;
  color: #92400e;
}
.draw-rate-chip.is-abstract {
  background: #eef2ff;
  border: 1.5px solid #6366f1;
  color: #3730a3;
}
.draw-rate-chip.is-picasso {
  background: #ecfdf5;
  border: 1.5px solid #10b981;
  color: #065f46;
}
.draw-rate-chip.is-hilarious {
  background: #fff1f2;
  border: 1.5px solid #fb7185;
  color: #be123c;
}
@media (max-width: 520px) {
  .draw-turn-preview { width: min(230px, 78%); margin-bottom: 8px; }
  .draw-rate-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .draw-rate-btn { padding: 6px 8px; font-size: 0.76rem; }
}
@keyframes dwRatePop {
  from { opacity: 0.75; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}
.draw-rate-note {
  margin: -2px 0 10px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #64748b;
}
.draw-rate-note[hidden] { display: none; }
.draw-awards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}
.draw-awards-grid[hidden] { display: none; }
.draw-award-pill {
  padding: 7px 9px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fffbeb, #eff6ff);
  border: 1.5px solid #fcd34d;
  text-align: left;
}
.draw-award-pill strong { display: flex; align-items: center; gap: 5px; font-size: 0.74rem; color: #b45309; }
.draw-award-pill strong i {
  display: inline-block;
  font-style: normal;
  font-size: 0.62rem;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 6px;
  background: #fde68a;
  color: #92400e;
}
.draw-award-pill span { display: block; font-size: 0.84rem; font-weight: 900; color: #0f172a; margin-top: 2px; }
.draw-award-pill small { display: block; font-size: 0.67rem; color: #475569; }
.draw-result-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 6px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fef3c7;
  border: 2px solid #f59e0b;
  color: #b45309;
}
.draw-result-icon.is-ok {
  background: #dcfce7;
  border-color: #22c55e;
  color: #15803d;
}
.draw-result-icon.is-info {
  background: #eff6ff;
  border-color: #60a5fa;
  color: #1d4ed8;
}
.draw-result-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.draw-result-icon:empty { display: none; }
.draw-podium-list {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: left;
}
.draw-podium-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 11px;
  border-radius: 11px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.84rem;
  font-weight: 700;
  color: #0f172a;
}
.draw-gallery-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  margin-bottom: 8px;
}
.draw-gallery-thumb {
  position: relative;
  flex: 0 0 auto;
  width: 126px;
  background: #ffffff;
  border-radius: 11px;
  padding: 5px;
  border: 1.5px solid #fbbf24;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.08);
  color: #1e293b;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}
.draw-gallery-thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  display: block;
  border-radius: 7px;
  background: #fffdf7;
}
.draw-gallery-meta strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.74rem;
  color: #0f172a;
}
.draw-gallery-sub {
  display: flex;
  justify-content: space-between;
  font-size: 0.63rem;
  color: #64748b;
  margin-top: 1px;
}
.draw-replay-badge {
  position: absolute;
  top: 7px;
  right: 7px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.9);
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 800;
}

.draw-replay-card {
  width: min(560px, 100%);
}
.draw-replay-stage {
  border-radius: 14px;
  overflow: hidden;
  border: 2.5px solid #f59e0b;
  background: #ffffff;
  margin-bottom: 8px;
}
.draw-replay-canvas {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
}
.draw-replay-progress {
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  margin-bottom: 12px;
}
.draw-replay-progress i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #3b82f6, #f59e0b);
  transition: width 0.08s linear;
}

/* ================= 移动端原生定框手账布局（<=820px：省掉冗余顶栏 + 更大画布 + 零空隙真 iOS 键盘贴合） ================= */
@media (max-width: 820px) {
  /* 移动端进入对局后隐去重复的 gsm-play-bar，把整整 52px 高度直接还给画布（「主菜单」收纳进右上角 ⋯） */
  body.draw-page[data-gsm-view="play"] {
    overflow: hidden;
    height: 100dvh;
  }
  body.draw-page[data-gsm-view="play"] .gsm-play-bar {
    display: none !important;
  }
  body.draw-page.gsm-enabled[data-gsm-view="play"] main.draw-layout {
    padding: 2px 2px 3px !important;
  }
  .draw-layout {
    padding: 2px 2px 3px;
  }
  .draw-studio {
    height: var(--dw-studio-h, calc(100dvh - 58px));
    min-height: 0;
    max-height: none;
    border-radius: 16px;
    border-width: 2px;
  }
  /* 真 iOS Safari 软键盘弹出贴合：用 fixed 紧贴 visualViewport 顶/高，零黑洞、零顶飞、零中间白缝 */
  .draw-studio.is-kbd-open {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    z-index: 120 !important;
    border-radius: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    box-shadow: none !important;
  }

  /* 1. 极简单行顶栏：只突出核心提示、倒计时与比分（挑战徽章全开时也不截断题目） */
  .draw-top-bar {
    padding: 4px 6px;
    gap: 3px;
  }
  .draw-top-left,
  .draw-top-right {
    gap: 3px;
  }
  .draw-pill-mode,
  .draw-friends-top-btn {
    display: none !important;
  }
  .draw-pill-score {
    display: inline-flex;
    font-size: 0.67rem;
    padding: 2px 5px;
    gap: 2px;
  }
  .draw-pill-score[hidden] {
    display: none !important;
  }
  .draw-pill-score .draw-score-label {
    font-size: 0.6rem;
  }
  .draw-pill-round,
  .draw-pill-mono,
  .draw-pill-strokes,
  .draw-pill-blind,
  .draw-pill-double,
  .draw-pill-sprint,
  .draw-pill-spec {
    font-size: 0.62rem;
    padding: 2px 4px;
  }
  .draw-word-banner {
    font-size: 0.78rem;
    padding: 3px 9px;
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
  }
  .draw-timer-pill {
    font-size: 0.72rem;
    padding: 2px 5px;
    gap: 1px;
  }
  .draw-timer-pill .dw-ico {
    display: none;
  }
  .draw-more-btn {
    min-height: 24px !important;
    padding: 2px 5px !important;
  }

  /* 2. 画板上方动态舞台条：左侧固定「当前画手」+ 右侧实时得分玩家条 */
  .draw-stage-strip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 7px;
    background: linear-gradient(90deg, #fffbeb 0%, #fefce8 60%, #f8fafc 100%);
    border-bottom: 1px solid #fde68a;
    flex-shrink: 0;
    min-width: 0;
  }
  .draw-drawer-spotlight {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px 2px 5px;
    border-radius: 999px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1.5px solid #f59e0b;
    color: #78350f;
    font-size: 0.7rem;
    font-weight: 800;
    white-space: nowrap;
    max-width: 60%;
    box-shadow: 0 1px 4px rgba(245, 158, 11, 0.2);
  }
  .draw-spot-pts {
    color: #b45309;
    font-weight: 900;
    font-size: 0.68rem;
    flex-shrink: 0;
  }
  .draw-spot-pts[hidden] { display: none !important; }
  .draw-drawer-spotlight[hidden] { display: none; }
  .draw-drawer-spotlight img {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid #f59e0b;
    background: #ffffff;
    flex-shrink: 0;
  }
  .draw-spot-role {
    font-size: 0.62rem;
    font-weight: 900;
    padding: 0 4px;
    border-radius: 4px;
    background: #f59e0b;
    color: #ffffff;
    flex-shrink: 0;
  }
  .draw-drawer-spotlight strong {
    overflow: hidden;
    text-overflow: ellipsis;
    color: #0f172a;
  }
  .draw-players-bar {
    display: flex;
    align-items: center;
    gap: 5px;
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }
  .draw-players-bar::-webkit-scrollbar { display: none; }
  .draw-players-bar:empty { display: none; }
  .draw-side-col .draw-drawer-card {
    display: none !important;
  }
  .draw-mini-player {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px 2px 3px;
    border-radius: 999px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    box-shadow: 0 1px 0 #cbd5e1;
    font-size: 0.7rem;
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
  }
  .draw-mini-player.is-drawer {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
  }
  .draw-mini-player.is-guessed {
    background: #dcfce7;
    border-color: #22c55e;
    color: #166534;
  }
  .draw-mini-player.is-offline {
    opacity: 0.66;
    background: #f8fafc;
    border-style: dashed;
    border-color: #cbd5e1;
    color: #64748b;
  }
  .draw-mini-player.is-offline img {
    filter: grayscale(0.75);
  }
  .draw-mini-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    flex-shrink: 0;
  }
  .draw-mini-dot.is-offline {
    background: #94a3b8;
  }
  .draw-mini-player img {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
    background: #f1f5f9;
  }
  .draw-mini-player em {
    font-style: normal;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 0 4px;
    border-radius: 4px;
    background: rgba(15, 23, 42, 0.08);
    color: inherit;
  }
  .draw-mini-player em[hidden] { display: none; }
  .draw-mini-player.is-drawer em { background: #f59e0b; color: #ffffff; }
  .draw-mini-player.is-guessed em { background: #22c55e; color: #ffffff; }
  .draw-mini-player b {
    color: #d97706;
    font-weight: 900;
  }
  .draw-side-col .draw-players {
    display: none;
  }

  /* 3. 主画室纵向分栏：更大画板（~308px高！）+ 宽敞评论区（~240–320px） */
  .draw-workspace {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 4px;
  }
  .draw-canvas-col {
    flex: 0 0 auto;
    gap: 5px;
  }
  .draw-easel {
    flex: 0 0 auto;
    width: 100%;
    aspect-ratio: 6 / 5;
    height: auto;
    max-height: 50dvh;
    min-height: 245px;
    border-width: 2.5px;
    border-radius: 14px;
  }
  .draw-studio.is-drawer-view .draw-easel {
    aspect-ratio: 6 / 5;
    max-height: 47dvh;
    min-height: 235px;
  }
  /* 软键盘弹起时使用像素级确定高度（杜绝 Safari 百分比高度白缝 Bug！），画布 + 工具栏 + 评论 + 输入框严丝合缝 */
  .draw-studio.is-kbd-open .draw-stage-strip,
  .draw-studio.is-kbd-open .draw-players-bar {
    display: none;
  }
  .draw-studio.is-kbd-open .draw-workspace {
    gap: 4px;
    padding: 4px 5px;
  }
  .draw-studio.is-kbd-open .draw-canvas-col {
    flex: 0 0 auto;
    gap: 4px;
  }
  .draw-studio.is-kbd-open .draw-easel,
  .draw-studio.is-kbd-open.is-drawer-view .draw-easel {
    aspect-ratio: auto;
    height: var(--dw-kbd-easel-h, 150px);
    min-height: 92px;
    max-height: 220px;
  }
  .draw-studio.is-kbd-open .draw-side-col {
    flex: 1 1 0;
    min-height: 96px;
    padding: 5px 6px;
    gap: 4px;
  }

  /* 4. 手机画手单行零横滑快控栏 + 悬浮色盘/画具弹窗 */
  .draw-bottom-dock {
    padding: 5px 6px;
    border-radius: 12px;
  }
  .draw-mob-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3px;
  }
  .draw-mob-bar .draw-tool-btn {
    padding: 4px 6px;
    font-size: 0.69rem;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
  }
  .draw-mob-bar .draw-tool-btn.is-icon-only {
    padding: 4px 5px;
    min-width: 28px;
  }
  .draw-mob-bar [data-draw-pop-trigger="color"] span,
  .draw-mob-bar [data-draw-manual-hint-quick] .dw-ico {
    display: none;
  }
  .draw-mob-bar [data-draw-pop-trigger="color"] {
    padding: 4px 7px;
  }
  .draw-mob-bar .draw-mob-pop-btn[aria-expanded="true"] {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border-color: #1d4ed8;
    color: #ffffff;
  }
  .draw-tray {
    display: none !important;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 35;
    padding: 10px;
    border-radius: 16px;
    background: #ffffff;
    border: 2px solid #fbbf24;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.22);
  }
  .draw-tray.is-open {
    display: flex !important;
    flex-direction: column;
    gap: 9px;
  }
  .draw-tray-color .draw-palette {
    justify-content: center;
    gap: 8px;
  }
  .draw-tray-color .draw-swatch {
    width: 26px;
    height: 26px;
  }
  .draw-tray-color .draw-size-group {
    justify-content: center;
    gap: 10px;
    padding-top: 6px;
    border-top: 1px solid #e2e8f0;
  }
  .draw-tray-tools .draw-ops-group {
    display: none;
  }
  .draw-tray-tools .draw-tool-group {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    width: 100%;
  }
  .draw-tray-tools .draw-tool-btn {
    padding: 7px 4px;
    font-size: 0.74rem;
    text-align: center;
  }

  /* 5. 下方评论区宽敞清晰 */
  .draw-side-col {
    flex: 1 1 auto;
    min-height: 112px;
    padding: 6px 7px;
    gap: 5px;
    border-radius: 13px;
  }
  .draw-chat-feed {
    min-height: 60px;
    font-size: 0.8rem;
    gap: 4px;
  }
  .draw-msg {
    padding: 4px 8px;
  }

  /* 6. 全画室级弹窗移动端精炼排布，一屏直显零嵌套滚动 */
  .draw-overlay {
    padding: 10px;
    align-items: start;
  }
  .draw-modal-card {
    padding: 13px 13px;
    border-radius: 18px;
    margin: auto 0;
  }
  .draw-modal-card h2 { font-size: 1.08rem; }
  .draw-modal-sub { font-size: 0.74rem; margin-bottom: 8px; }
  .draw-code-hero { padding: 6px 9px; margin-bottom: 8px; }
  .draw-code-hero strong { font-size: 1.15rem; }
  .draw-wait-settings { grid-template-columns: 1fr 1fr; gap: 5px; margin-bottom: 6px; }
  .draw-wait-settings > :last-child { grid-column: 1 / -1; }
  .draw-mode-toggles.is-wait { margin-bottom: 6px; gap: 6px; }
  .draw-lobby-players { margin-bottom: 9px; gap: 5px; }
  .draw-word-choices { grid-template-columns: 1fr; }
  .draw-awards-grid { grid-template-columns: 1fr 1fr; }
  .draw-opt-chip { padding: 4px 10px; font-size: 0.74rem; }
  .draw-danmaku-item { font-size: 0.72rem; padding: 2px 8px; }
  .draw-splash-card { padding: 12px 20px; }
  .draw-splash-main { font-size: 1.4rem; }
  .draw-splash-sub { font-size: 0.94rem; }
}
@media (prefers-reduced-motion: reduce) {
  .draw-top-bar.is-live,
  .draw-easel.is-live-drawing,
  .draw-easel.is-sprint,
  .draw-drawer-card.is-active .draw-drawer-card-av img,
  .draw-live-dot {
    animation: none !important;
  }
}
