/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ../../node_modules/.pnpm/next@15.5.15_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!../../node_modules/.pnpm/next@15.5.15_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./app/globals.css ***!
  \*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
:root {
  --bg: #f5f6f1;
  --surface: #ffffff;
  --surface-muted: #eef1ed;
  --ink: #18211f;
  --muted: #66726f;
  --line: #d9ded8;
  --line-strong: #b8c2bd;
  --primary: #17796f;
  --primary-strong: #0e524c;
  --accent: #c94c4c;
  --violet: #6658b8;
  --gold: #d89b2b;
  --good: #20875f;
  --warn: #b56b12;
  --danger: #b93e42;
  --shadow: 0 12px 32px rgba(26, 38, 35, 0.08);
  --radius: 8px;
  color-scheme: light;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
}

body {
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
  color: var(--ink);
  padding: 0 12px;
}

input:focus {
  border-color: var(--primary);
  outline: 2px solid rgba(23, 121, 111, 0.18);
  outline-offset: 1px;
}

.app-page {
  width: min(1680px, 100%);
  margin: 0 auto;
  padding: 18px;
}

.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  grid-gap: 14px;
  gap: 14px;
  min-height: 48px;
  margin-bottom: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--ink);
  font-weight: 800;
  font-size: 22px;
}

.topnav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  color: var(--muted);
  font-size: 14px;
}

.surface,
.board-stage,
.entry-panel,
.mobile-play-surface,
.active-card-surface {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.surface,
.entry-panel,
.mobile-play-surface,
.active-card-surface {
  padding: 16px;
}

.compact-surface {
  padding: 14px;
}

.surface-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.surface-title-row h1,
.surface-title-row h2,
.entry-panel h1,
.waiting-surface h1 {
  margin: 0;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.08;
  letter-spacing: 0;
}

.surface-title-row h2,
.compact-surface h2,
.board-heading h2 {
  font-size: 18px;
}

.kicker {
  display: inline-flex;
  margin-bottom: 6px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.muted,
.fine-print {
  color: var(--muted);
}

.fine-print {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.4;
}

.primary-button,
.ghost-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: var(--radius);
  padding: 0 14px;
  border: 1px solid transparent;
  font-weight: 750;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.primary-button {
  background: var(--primary);
  color: #fff;
}

.primary-button:hover:not(:disabled) {
  background: var(--primary-strong);
  transform: translateY(-1px);
}

.ghost-button {
  background: #fff;
  border-color: var(--line-strong);
  color: var(--ink);
}

.ghost-button:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary-strong);
}

.text-button {
  min-height: 34px;
  padding: 0 8px;
  background: transparent;
  color: var(--muted);
}

.compact-button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
}

.danger-text {
  color: var(--danger);
}

.danger-button {
  border-color: rgba(185, 62, 66, 0.35);
  color: var(--danger);
}

.danger-button:hover:not(:disabled) {
  border-color: var(--danger);
  color: var(--danger);
}

.wide {
  width: 100%;
}

.field {
  display: grid;
  grid-gap: 6px;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.toggle-row {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  grid-gap: 10px;
  gap: 10px;
  min-height: 36px;
  margin: 6px 0;
  color: var(--ink);
  font-size: 14px;
}

.toggle-row input {
  min-height: auto;
  width: 18px;
  height: 18px;
}

.segmented {
  display: inline-grid;
  grid-auto-flow: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.segmented.full {
  width: 100%;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 12px;
}

.segmented button {
  min-height: 34px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
  font-weight: 800;
}

.segmented button:last-child {
  border-right: 0;
}

.segmented button.is-active {
  background: var(--primary);
  color: #fff;
}

.state-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-muted);
  color: var(--ink);
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.state-pill.good {
  border-color: rgba(32, 135, 95, 0.25);
  background: rgba(32, 135, 95, 0.1);
  color: var(--good);
}

.state-pill.warn {
  border-color: rgba(181, 107, 18, 0.25);
  background: rgba(216, 155, 43, 0.14);
  color: var(--warn);
}

.entry-page {
  min-height: 100vh;
}

.entry-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.08fr) minmax(280px, 0.92fr);
  grid-gap: 16px;
  gap: 16px;
  min-height: calc(100vh - 96px);
}

.entry-panel {
  display: grid;
  align-content: space-between;
  grid-gap: 18px;
  gap: 18px;
  min-height: 420px;
}

.host-entry {
  background:
    linear-gradient(135deg, rgba(23, 121, 111, 0.12), rgba(102, 88, 184, 0.08)),
    var(--surface);
}

.player-entry {
  background:
    linear-gradient(135deg, rgba(216, 155, 43, 0.12), rgba(201, 76, 76, 0.08)),
    var(--surface);
}

.entry-actions,
.action-row,
.action-stack {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.entry-form {
  display: grid;
  grid-gap: 12px;
  gap: 12px;
}

.action-stack {
  display: grid;
  margin-top: 14px;
}

.active-rooms {
  display: grid;
  grid-gap: 10px;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.active-rooms-heading,
.active-room-row,
.active-room-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.active-rooms-heading {
  justify-content: space-between;
}

.active-rooms-heading span {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-muted);
  color: var(--muted);
  font-weight: 900;
}

.active-room-list {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
}

.active-room-row {
  justify-content: space-between;
  min-width: 0;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.active-room-row strong {
  letter-spacing: 0.08em;
}

.active-room-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.host-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr) 300px;
  grid-gap: 14px;
  gap: 14px;
  align-items: start;
}

.host-layout.is-game {
  grid-template-columns: minmax(0, 1fr) 300px;
}

.control-surface,
.host-side {
  position: -webkit-sticky;
  position: sticky;
  top: 14px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 10px;
  gap: 10px;
}

.status-box {
  display: grid;
  grid-gap: 4px;
  gap: 4px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.status-box strong {
  color: var(--ink);
}

.error-text {
  color: var(--danger);
}

.host-main,
.host-side,
.player-main,
.player-side {
  display: grid;
  grid-gap: 14px;
  gap: 14px;
}

.host-overview,
.mobile-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-gap: 10px;
  gap: 10px;
}

.host-overview article,
.mobile-stats article,
.private-card-grid article,
.chip-economy div {
  display: grid;
  grid-gap: 5px;
  gap: 5px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 12px;
}

.host-overview span,
.mobile-stats span,
.private-card-grid span,
.chip-economy span,
.round-banner span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.host-overview strong,
.mobile-stats strong,
.private-card-grid strong,
.chip-economy strong,
.round-banner strong {
  overflow-wrap: anywhere;
}

.round-banner {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  grid-gap: 10px;
  gap: 10px;
}

.round-banner div {
  display: grid;
  grid-gap: 5px;
  gap: 5px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px;
}

.round-banner strong {
  font-size: clamp(20px, 3vw, 32px);
}

.phase-strip {
  display: grid;
  grid-template-columns: repeat(9, minmax(76px, 1fr));
  grid-gap: 6px;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
}

.phase-step {
  display: grid;
  align-content: center;
  grid-gap: 4px;
  gap: 4px;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 8px;
}

.phase-step span {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface-muted);
  color: var(--muted);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 900;
}

.phase-step strong {
  font-size: 11px;
  line-height: 1.15;
}

.phase-step.is-active {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px rgba(23, 121, 111, 0.2);
}

.phase-step.is-active span {
  background: var(--primary);
  color: #fff;
}

.phase-step.is-complete span {
  background: rgba(32, 135, 95, 0.16);
  color: var(--good);
}

.board-stage {
  padding: 14px;
  overflow: hidden;
}

.board-heading {
  align-items: center;
}

.board-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.board-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.legend-dot.center,
.tone-center span {
  background: var(--accent);
}

.legend-dot.near,
.tone-near span {
  background: var(--violet);
}

.legend-dot.edge,
.tone-edge span {
  background: var(--gold);
}

.legend-dot.miss,
.tone-miss span {
  background: #313b3a;
}

.axis {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.top-axis {
  display: grid;
  grid-template-columns: repeat(30, minmax(0, 1fr));
  grid-gap: 2px;
  gap: 2px;
  margin-left: 24px;
  margin-bottom: 4px;
  overflow: hidden;
}

.top-axis span {
  text-align: center;
}

.host-board-wrap {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  grid-gap: 4px;
  gap: 4px;
  padding-bottom: 4px;
}

.left-axis {
  display: grid;
  grid-template-rows: repeat(15, 1fr);
  grid-gap: 2px;
  gap: 2px;
}

.left-axis span {
  display: grid;
  place-items: center;
}

.host-board {
  display: grid;
  grid-template-columns: repeat(30, minmax(0, 1fr));
  grid-gap: 2px;
  gap: 2px;
  min-width: 0;
  width: 100%;
}

.host-cell {
  position: relative;
  min-width: 0;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(24, 33, 31, 0.16);
  border-radius: 3px;
}

.host-cell.in-zone {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: -3px;
}

.host-cell.is-target {
  box-shadow:
    inset 0 0 0 3px #fff,
    0 0 0 2px var(--accent);
}

.host-cell span {
  position: absolute;
  inset: auto 2px 2px auto;
  display: grid;
  place-items: center;
  min-width: 16px;
  height: 16px;
  border-radius: 50%;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

.join-surface {
  display: grid;
  grid-gap: 12px;
  gap: 12px;
}

.room-code-display {
  display: grid;
  place-items: center;
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.qr-image {
  width: 180px;
  height: 180px;
  justify-self: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.join-link {
  overflow-wrap: anywhere;
  color: var(--primary-strong);
  font-size: 13px;
  font-weight: 800;
}

.score-list,
.result-grid {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
}

.score-row,
.result-row {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  grid-gap: 10px;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
}

.result-row {
  grid-template-columns: 1fr auto auto auto;
}

.score-row div {
  display: grid;
  grid-gap: 2px;
  gap: 2px;
}

.score-row .rank {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface-muted);
  color: var(--muted);
  font-weight: 900;
}

.player-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 640px) minmax(240px, 320px);
  justify-content: center;
  grid-gap: 14px;
  gap: 14px;
  align-items: start;
}

.player-layout.is-game {
  grid-template-columns: minmax(0, 640px) minmax(240px, 320px);
}

.player-login-surface,
.player-side {
  position: -webkit-sticky;
  position: sticky;
  top: 14px;
}

.private-color-card {
  display: grid;
  align-content: space-between;
  min-height: 260px;
  border-radius: var(--radius);
  color: #fff;
  padding: 18px;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.private-color-card span {
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.private-color-card strong {
  font-size: clamp(30px, 10vw, 54px);
  overflow-wrap: anywhere;
}

.private-card-grid,
.chip-economy {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 10px;
  gap: 10px;
  margin-top: 12px;
}

.chip-economy {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mobile-play-surface {
  display: grid;
  grid-gap: 14px;
  gap: 14px;
}

.selection-preview {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  grid-gap: 12px;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(238, 241, 237, 0.96));
  padding: 12px;
}

.selection-preview div:last-child {
  display: grid;
  grid-gap: 4px;
  gap: 4px;
}

.selection-preview span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.selection-preview strong {
  font-size: 18px;
  letter-spacing: 0.04em;
}

.selection-swatch {
  width: 72px;
  height: 72px;
  border: 1px solid rgba(24, 33, 31, 0.18);
  border-radius: calc(var(--radius) + 2px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.coordinate-controls {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
}

.coordinate-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.coordinate-button {
  flex: 0 0 48px;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-weight: 900;
}

.coordinate-button.is-selected {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.mini-grid-scroll {
  overflow-x: auto;
  padding-bottom: 4px;
}

.mini-coordinate-grid {
  display: grid;
  grid-template-columns: repeat(30, 20px);
  grid-gap: 4px;
  gap: 4px;
  width: max-content;
  touch-action: manipulation;
}

.mini-cell {
  position: relative;
  aspect-ratio: 1;
  width: 20px;
  min-height: 20px;
  border: 1px solid rgba(24, 33, 31, 0.14);
  border-radius: 5px;
  padding: 0;
  transition:
    transform 120ms ease,
    box-shadow 120ms ease,
    border-color 120ms ease;
}

.mini-cell.is-selected {
  border-color: #fff;
  box-shadow:
    0 0 0 2px var(--primary),
    0 6px 14px rgba(23, 121, 111, 0.22);
  transform: translateY(-1px);
}

.mini-cell.is-placed {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.92);
}

.mini-cell-dot {
  position: absolute;
  inset: auto 4px 4px auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(24, 33, 31, 0.92);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.78);
}

.selected-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 38px;
  align-items: center;
}

.placement-token {
  min-height: 34px;
  border: 1px solid rgba(23, 121, 111, 0.3);
  border-radius: var(--radius);
  background: rgba(23, 121, 111, 0.09);
  color: var(--primary-strong);
  padding: 0 10px;
  font-weight: 900;
}

.reward-guide {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
}

.reward-row {
  display: grid;
  grid-template-columns: 48px repeat(3, minmax(0, 1fr));
  align-items: center;
  grid-gap: 8px;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(238, 241, 237, 0.95));
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.reward-row strong {
  display: grid;
  place-items: center;
  min-height: 28px;
  border-radius: 999px;
  background: rgba(23, 121, 111, 0.1);
  color: var(--primary-strong);
}

.waiting-surface p {
  margin: 0;
  color: var(--muted);
}

.empty-state {
  min-height: 280px;
  display: grid;
  align-content: center;
  justify-items: start;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 1280px) {
  .host-layout {
    grid-template-columns: 300px minmax(0, 1fr);
  }

  .host-side {
    grid-column: 1 / -1;
    position: static;
    grid-template-columns: minmax(260px, 320px) minmax(260px, 1fr);
  }

  .player-layout {
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  }

  .player-side {
    grid-column: 1 / -1;
    position: static;
  }
}

@media (max-width: 860px) {
  .app-page {
    padding: 12px;
  }

  .topbar {
    grid-template-columns: 1fr auto;
  }

  .topnav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    order: 3;
  }

  .entry-grid,
  .host-layout,
  .host-layout.is-game,
  .player-layout,
  .player-layout.is-game,
  .host-side {
    grid-template-columns: 1fr;
  }

  .entry-grid {
    min-height: 0;
  }

  .entry-panel {
    min-height: 300px;
  }

  .control-surface,
  .player-login-surface {
    position: static;
  }

  .host-overview,
  .mobile-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .round-banner,
  .private-card-grid,
  .chip-economy,
  .result-row {
    grid-template-columns: 1fr;
  }

  .private-color-card {
    min-height: 220px;
  }

  .selection-preview,
  .reward-row {
    grid-template-columns: 1fr;
  }

  .selection-swatch {
    width: 100%;
    height: 80px;
  }

  .coordinate-button {
    flex-basis: 52px;
    min-height: 52px;
  }

  .mini-coordinate-grid {
    grid-template-columns: repeat(30, 24px);
    gap: 5px;
  }

  .mini-cell {
    width: 24px;
    min-height: 24px;
  }

  .mini-cell-dot {
    inset: auto 5px 5px auto;
    width: 8px;
    height: 8px;
  }

  .score-row {
    grid-template-columns: 30px 1fr 48px;
  }
}

