:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #5b6472;
  --line: #d9dee7;
  --paper: #fbfbf8;
  --panel: #ffffff;
  --felt: #2f6f58;
  --felt-dark: #20513f;
  --accent: #d9a441;
  --danger: #c24132;
  --shadow: 0 18px 50px rgba(17, 24, 39, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 10%, rgba(217, 164, 65, 0.24), transparent 22rem),
    linear-gradient(135deg, #f8f5ec 0%, #e8f0eb 48%, #f6f2e8 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  width: min(1440px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 32px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(30px, 4.4vw, 62px);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  font-size: 16px;
}

.round-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 116px;
  padding: 12px 14px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
}

.round-chip span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.round-chip strong {
  font-size: 24px;
}

.theme-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.theme-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  border: 1px solid rgba(17, 24, 39, 0.14);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}

.theme-button.active {
  background: #111827;
  color: #fff;
}

.theme-mark {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid currentColor;
}

.theme-mark.pitching {
  background: #d9a441;
}

.theme-mark.dating {
  background: #e46d7a;
}

.theme-mark.startup {
  background: #4f8fc9;
}

.game-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 14px;
}

.control-panel,
.table-surface {
  border: 1px solid rgba(17, 24, 39, 0.14);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow);
}

.control-panel {
  padding: 16px;
  align-self: start;
}

.panel-block {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

select,
input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
}

.panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
}

.command,
.icon-button {
  min-height: 42px;
  border: 1px solid rgba(17, 24, 39, 0.16);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}

.command.primary {
  background: var(--accent);
  border-color: #b88222;
}

.command.quiet {
  color: var(--muted);
}

.inline-form {
  display: grid;
  grid-template-columns: 1fr 44px;
  gap: 8px;
}

.scoreboard {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.scoreboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.scoreboard-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.player-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #edf0f4;
}

.player-row strong {
  font-size: 14px;
}

.player-row span {
  min-width: 34px;
  text-align: right;
  font-weight: 800;
}

.mini-button {
  width: 34px;
  height: 30px;
  border: 1px solid var(--line);
  background: #f7f8fa;
  cursor: pointer;
  font-weight: 900;
}

.table-surface {
  min-height: 680px;
  padding: 18px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(145deg, var(--felt), var(--felt-dark));
  background-size: 28px 28px, 28px 28px, auto;
}

.prompt-zone {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 18px;
}

.black-card,
.white-card,
.submission-card {
  border-radius: 8px;
  box-shadow: 0 16px 28px rgba(17, 24, 39, 0.2);
}

.black-card {
  display: grid;
  min-height: 260px;
  padding: 18px;
  background: #111;
  color: #fff;
}

.black-card p {
  align-self: center;
  font-size: 25px;
  font-weight: 850;
  line-height: 1.15;
}

.card-kicker,
.card-id {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.76;
}

.card-id {
  align-self: end;
}

.round-notes,
.submissions,
.hand-zone {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.9);
}

.round-notes {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.round-notes p {
  color: #2f3b45;
  line-height: 1.5;
}

.sheet-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sheet-links a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.submissions {
  min-height: 132px;
  padding: 14px;
  margin-bottom: 18px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

#submissions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.submission-card {
  display: grid;
  gap: 8px;
  min-height: 126px;
  padding: 12px;
  background: #fff;
}

.submission-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.submission-actions button {
  min-height: 32px;
  border: 1px solid var(--line);
  background: #111827;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

.hand-zone {
  padding: 14px;
}

.hand {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.white-card {
  display: grid;
  gap: 12px;
  min-height: 190px;
  padding: 14px;
  border: 1px solid rgba(17, 24, 39, 0.18);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.white-card p {
  align-self: center;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.16;
}

.white-card:hover,
.command:hover,
.theme-button:hover,
.icon-button:hover,
.mini-button:hover {
  transform: translateY(-1px);
}

.empty-state {
  color: var(--muted);
  font-weight: 700;
}

@media (max-width: 920px) {
  .app-shell {
    width: min(100vw - 20px, 760px);
    padding-top: 14px;
  }

  .game-layout,
  .prompt-zone {
    grid-template-columns: 1fr;
  }

  .control-panel {
    order: 2;
  }

  .theme-strip {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .topbar {
    display: grid;
  }

  .panel-grid {
    grid-template-columns: 1fr;
  }

  .black-card p {
    font-size: 22px;
  }

  .hand {
    grid-template-columns: 1fr;
  }
}
