/* NEWCHAT_V1175_DRAW_GUESS_MULTIPLAYER_HF1_CSS_START */
:root {
  --nc-game-bg: color-mix(in srgb, var(--bg, #0f172a) 92%, #111827 8%);
  --nc-game-card: color-mix(in srgb, var(--panel, #172033) 92%, #ffffff 8%);
  --nc-game-border: color-mix(in srgb, var(--border, #334155) 78%, #ffffff 22%);
  --nc-game-text: var(--text, #f8fafc);
  --nc-game-muted: color-mix(in srgb, var(--nc-game-text) 65%, transparent);
  --nc-game-accent: var(--accent, #8b5cf6);
  --nc-game-danger: #dc2626;
  --nc-game-success: #16a34a;
}

body.nc-game-open { overflow: hidden !important; }

.nc-game-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147482600;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(2, 6, 23, .72);
  backdrop-filter: blur(8px);
}
.nc-game-backdrop[hidden], .nc-game-panel[hidden] { display: none !important; }

.nc-game-panel {
  width: min(1240px, 100%);
  height: min(900px, calc(100dvh - 36px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--nc-game-border);
  border-radius: 24px;
  background: var(--nc-game-bg);
  color: var(--nc-game-text);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .48);
}

.nc-game-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--nc-game-border);
  background: color-mix(in srgb, var(--nc-game-card) 88%, transparent);
}
.nc-game-heading { min-width: 0; }
.nc-game-heading h2 { margin: 2px 0 0; font-size: clamp(1.1rem, 2.2vw, 1.55rem); line-height: 1.15; }
.nc-game-eyebrow { display: block; color: var(--nc-game-muted); font-size: .76rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.nc-game-header-actions { display: flex; align-items: center; gap: 10px; }
.nc-game-connection { font-size: .78rem; color: #f59e0b; white-space: nowrap; }
.nc-game-connection.is-online { color: #22c55e; }
.nc-game-close {
  width: 42px;
  height: 42px;
  border: 1px solid var(--nc-game-border);
  border-radius: 50%;
  background: var(--nc-game-card);
  color: var(--nc-game-text);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}

.nc-game-body { flex: 1; min-height: 0; overflow: auto; padding: 18px; }
.nc-game-browser, .nc-game-room { min-height: 100%; }
.nc-game-browser-top { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; margin-bottom: 18px; }
.nc-game-intro h3, .nc-game-card h3, .nc-game-side-card h4 { margin: 0 0 8px; }
.nc-game-intro p { margin: 0; max-width: 760px; color: var(--nc-game-muted); line-height: 1.55; }
.nc-game-profile { min-width: 220px; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--nc-game-border); border-radius: 16px; background: var(--nc-game-card); }
.nc-game-profile span { color: var(--nc-game-muted); font-size: .84rem; }

.nc-game-browser-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(260px, .8fr); gap: 16px; align-items: start; }
.nc-game-rooms-section { grid-row: span 2; }
.nc-game-card, .nc-game-side-card {
  border: 1px solid var(--nc-game-border);
  border-radius: 18px;
  background: var(--nc-game-card);
  padding: 15px;
}
.nc-game-card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.nc-game-room-list { display: grid; gap: 10px; }
.nc-game-room-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px; border: 1px solid var(--nc-game-border); border-radius: 14px; background: color-mix(in srgb, var(--nc-game-card) 78%, #000 22%); }
.nc-game-room-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.nc-game-room-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nc-game-room-copy span, .nc-game-room-copy small, .nc-game-note { color: var(--nc-game-muted); }
.nc-game-empty { padding: 22px; border: 1px dashed var(--nc-game-border); border-radius: 14px; text-align: center; color: var(--nc-game-muted); }

.nc-game-input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--nc-game-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--nc-game-bg) 76%, #000 24%);
  color: var(--nc-game-text);
  padding: 10px 12px;
  font: inherit;
  outline: none;
}
.nc-game-input:focus { border-color: var(--nc-game-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--nc-game-accent) 25%, transparent); }
.nc-game-card > .nc-game-input { margin: 7px 0 10px; }

.nc-game-primary, .nc-game-secondary, .nc-game-danger, .nc-game-tool, .nc-game-word-option {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 8px 13px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.nc-game-primary { background: var(--nc-game-accent); color: #fff; }
.nc-game-secondary { border-color: var(--nc-game-border); background: transparent; color: var(--nc-game-text); }
.nc-game-danger { background: color-mix(in srgb, var(--nc-game-danger) 85%, #000 15%); color: #fff; }
.nc-game-primary:disabled, .nc-game-secondary:disabled, .nc-game-danger:disabled { opacity: .48; cursor: not-allowed; }

.nc-game-leaderboard { display: grid; gap: 6px; }
.nc-game-leader-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px 5px; border-bottom: 1px solid color-mix(in srgb, var(--nc-game-border) 55%, transparent); }
.nc-game-leader-row:last-child { border-bottom: 0; }
.nc-game-leader-row > span:last-child { color: var(--nc-game-muted); font-size: .82rem; }

.nc-game-roombar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.nc-game-room-meta h3 { margin: 0; }
.nc-game-status { display: inline-block; margin-top: 4px; color: var(--nc-game-muted); font-size: .86rem; }
.nc-game-room-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.nc-game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 14px; min-height: 0; }
.nc-game-canvas-column { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.nc-game-wordbar { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border: 1px solid var(--nc-game-border); border-radius: 14px; background: var(--nc-game-card); }
.nc-game-word { font-size: clamp(1rem, 2vw, 1.35rem); letter-spacing: .025em; }
.nc-game-timer { min-width: 68px; text-align: center; font-size: 1.2rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.nc-game-timer.is-urgent { color: #f87171; animation: ncGamePulse .8s infinite alternate; }
@keyframes ncGamePulse { to { transform: scale(1.08); } }

.nc-game-word-choices { display: flex; align-items: center; justify-content: center; gap: 9px; flex-wrap: wrap; padding: 12px; border: 1px solid var(--nc-game-border); border-radius: 14px; background: color-mix(in srgb, var(--nc-game-accent) 14%, var(--nc-game-card)); }
.nc-game-word-option { background: #fff; color: #111827; }

.nc-game-canvas-wrap { position: relative; width: 100%; aspect-ratio: 3 / 2; min-height: 280px; overflow: hidden; border: 2px solid color-mix(in srgb, var(--nc-game-border) 78%, #fff 22%); border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .04); }
.nc-game-canvas { width: 100%; height: 100%; display: block; background: #fff; touch-action: none; cursor: default; }
.nc-game-canvas.is-drawable { cursor: crosshair; }

.nc-game-tools { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; padding: 10px; border: 1px solid var(--nc-game-border); border-radius: 14px; background: var(--nc-game-card); }
.nc-game-color { width: 32px; height: 32px; border: 2px solid color-mix(in srgb, var(--nc-game-border) 70%, #fff 30%); border-radius: 50%; background: var(--game-color); cursor: pointer; }
.nc-game-color.is-active, .nc-game-tool.is-active { outline: 3px solid color-mix(in srgb, var(--nc-game-accent) 65%, transparent); outline-offset: 2px; }
.nc-game-tool { min-height: 34px; padding: 6px 9px; border-color: var(--nc-game-border); background: transparent; color: var(--nc-game-text); font-size: .82rem; }
.nc-game-tool-danger { border-color: color-mix(in srgb, var(--nc-game-danger) 70%, transparent); color: #fca5a5; }

.nc-game-side { min-height: 0; display: flex; flex-direction: column; gap: 12px; }
.nc-game-player-list { display: grid; gap: 7px; max-height: 310px; overflow: auto; }
.nc-game-player-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 8px; border: 1px solid color-mix(in srgb, var(--nc-game-border) 70%, transparent); border-radius: 12px; }
.nc-game-player-avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--nc-game-accent) 45%, var(--nc-game-card)); font-weight: 900; }
.nc-game-player-copy { min-width: 0; display: flex; flex-direction: column; }
.nc-game-player-copy > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nc-game-player-badges { display: flex; gap: 4px; flex-wrap: wrap; }
.nc-game-player-badges em { padding: 1px 5px; border-radius: 999px; background: color-mix(in srgb, var(--nc-game-accent) 20%, transparent); color: var(--nc-game-muted); font-size: .65rem; font-style: normal; }
.nc-game-player-badges em.nc-game-offline { background: rgba(148, 163, 184, .16); }
.nc-game-player-score { display: flex; flex-direction: column; align-items: flex-end; }
.nc-game-player-score small { color: var(--nc-game-muted); }

.nc-game-chat-card { flex: 1; min-height: 300px; display: flex; flex-direction: column; }
.nc-game-chat { flex: 1; min-height: 210px; max-height: 390px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid var(--nc-game-border); border-radius: 12px; background: color-mix(in srgb, var(--nc-game-bg) 74%, #000 26%); }
.nc-game-chat-row { padding: 7px 8px; border-radius: 9px; font-size: .88rem; overflow-wrap: anywhere; }
.nc-game-chat-row.is-guess { background: color-mix(in srgb, var(--nc-game-card) 72%, transparent); }
.nc-game-chat-row.is-correct { background: rgba(22, 163, 74, .2); color: #bbf7d0; }
.nc-game-chat-row.is-system { color: var(--nc-game-muted); text-align: center; font-style: italic; }
.nc-game-chat-row.is-result { background: rgba(139, 92, 246, .18); text-align: center; }
.nc-game-guess-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; margin-top: 8px; }
.nc-game-final-title { padding: 8px; text-align: center; font-weight: 900; font-size: 1.05rem; }
.nc-game-final-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 8px; padding: 8px; border-bottom: 1px solid var(--nc-game-border); }

.nc-game-launcher {
  border: 0;
  background: var(--nc-game-accent);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}
.nc-game-launcher.is-in-rail { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 5px; border-radius: 12px; }
.nc-game-launcher.is-in-rail .nc-game-launcher-label { font-size: .68rem; }
.nc-game-launcher.is-floating { position: fixed; right: 18px; bottom: max(92px, calc(env(safe-area-inset-bottom) + 78px)); z-index: 2147481500; min-width: 58px; min-height: 58px; display: grid; place-items: center; border-radius: 50%; box-shadow: 0 12px 32px rgba(0, 0, 0, .35); font-size: 1.45rem; }
.nc-game-launcher.is-floating .nc-game-launcher-label { display: none; }

.nc-game-toast { position: fixed; left: 50%; bottom: max(28px, env(safe-area-inset-bottom)); z-index: 2147483600; max-width: min(92vw, 520px); transform: translate(-50%, 24px); opacity: 0; padding: 11px 16px; border-radius: 12px; background: #111827; color: #fff; box-shadow: 0 14px 38px rgba(0, 0, 0, .42); transition: .2s ease; }
.nc-game-toast.is-visible { transform: translate(-50%, 0); opacity: 1; }
.nc-game-toast.is-error { background: #991b1b; }
.nc-game-toast.is-success { background: #166534; }

@media (max-width: 900px) {
  .nc-game-backdrop { padding: 0; }
  .nc-game-panel { width: 100%; height: 100dvh; border: 0; border-radius: 0; }
  .nc-game-body { padding: 12px; }
  .nc-game-browser-top { flex-direction: column; }
  .nc-game-profile { min-width: 0; width: 100%; }
  .nc-game-browser-grid { grid-template-columns: 1fr; }
  .nc-game-rooms-section { grid-row: auto; }
  .nc-game-layout { grid-template-columns: 1fr; }
  .nc-game-side { display: grid; grid-template-columns: 1fr; }
  .nc-game-player-list { max-height: 220px; }
  .nc-game-chat { max-height: 300px; }
}

@media (max-width: 600px) {
  .nc-game-header { min-height: 60px; padding: 10px 12px; }
  .nc-game-connection { display: none; }
  .nc-game-close { width: 38px; height: 38px; }
  .nc-game-body { padding: 9px; }
  .nc-game-roombar { align-items: flex-start; }
  .nc-game-room-actions { flex-direction: column; align-items: stretch; }
  .nc-game-room-actions button { min-height: 36px; padding: 6px 9px; }
  .nc-game-wordbar { min-height: 46px; padding: 8px 10px; }
  .nc-game-canvas-wrap { min-height: 230px; border-radius: 13px; }
  .nc-game-tools { gap: 5px; padding: 8px; }
  .nc-game-color { width: 28px; height: 28px; }
  .nc-game-tool { font-size: .74rem; padding: 5px 7px; }
  .nc-game-card, .nc-game-side-card { padding: 11px; border-radius: 14px; }
  .nc-game-room-card { align-items: stretch; flex-direction: column; }
  .nc-game-room-card .nc-game-primary { width: 100%; }
  .nc-game-guess-form { grid-template-columns: minmax(0, 1fr) 92px; }
  .nc-game-launcher.is-floating { right: 12px; bottom: max(84px, calc(env(safe-area-inset-bottom) + 70px)); width: 52px; min-width: 52px; min-height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  .nc-game-timer.is-urgent { animation: none; }
  .nc-game-toast { transition: none; }
}
/* NEWCHAT_V1175_DRAW_GUESS_MULTIPLAYER_HF1_CSS_END */
