:root {
  --bg: #edf1f5;
  --surface: #f8fafc;
  --surface-strong: #ffffff;
  --ink: #15191f;
  --muted: #67717f;
  --line: #d7dee8;
  --line-strong: #c2ccd8;
  --accent: #b42318;
  --accent-dark: #851b16;
  --gold: #c47a12;
  --green: #14735f;
  --blue: #245d97;
  --nav: #171b22;
  --nav-soft: #242a34;
  --shadow: 0 18px 45px rgba(26, 33, 43, 0.12);
  --shadow-soft: 0 8px 22px rgba(26, 33, 43, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(180, 35, 24, 0.09), transparent 28%),
    linear-gradient(250deg, rgba(20, 115, 95, 0.08), transparent 30%),
    linear-gradient(0deg, #e8edf3, #f7f9fb 42%, #eef2f6);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    background 0.12s ease,
    border-color 0.12s ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.seat-button:hover:not(:disabled) {
  transform: translate(-50%, -50%);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.app-shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  color: #f5f7fb;
  background:
    linear-gradient(180deg, rgba(180, 35, 24, 0.18), transparent 34%),
    var(--nav);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 8px 0 30px rgba(16, 20, 26, 0.13);
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0;
}

.sidebar .eyebrow {
  color: #f1a39c;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 2.05rem;
  line-height: 1.05;
}

h2 {
  margin-bottom: 0;
  font-size: 1.85rem;
  line-height: 1.15;
}

h3 {
  margin-bottom: 0;
  font-size: 1rem;
}

main {
  padding: 28px;
  min-width: 0;
}

.steps {
  display: grid;
  gap: 10px;
}

.step {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  border-radius: 8px;
  padding: 12px;
  color: #c6ced8;
  background: transparent;
  text-align: left;
  font-weight: 800;
}

.step span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--nav-soft);
  color: #f5f7fb;
  font-size: 0.9rem;
}

.step.is-active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}

.step.is-active span {
  background: var(--accent);
  color: white;
}

.status-panel,
.panel,
.callout {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.status-panel {
  margin-top: auto;
  padding: 16px;
  display: grid;
  gap: 14px;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

.status-panel div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.status-panel strong {
  color: white;
  font-size: 1.15rem;
}

.muted,
.hint {
  color: var(--muted);
}

.sidebar .muted {
  color: #aab4c0;
}

.view {
  display: none;
}

.view.is-visible {
  display: block;
}

.view-header,
.panel-header,
.assign-toolbar,
.footer-actions,
.action-row,
.phase-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.panel-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.view-header {
  margin-bottom: 22px;
  padding: 2px 2px 0;
}

.setup-grid {
  display: grid;
  grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.panel {
  padding: 18px;
}

.field {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

.toggle-field {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  color: var(--ink);
  font-weight: 850;
}

.toggle-field input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  accent-color: var(--accent);
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--ink);
  padding: 10px 12px;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(36, 93, 151, 0.13);
}

.hint {
  margin-top: 12px;
  font-size: 0.92rem;
  line-height: 1.4;
}

.resume-box {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.role-list {
  display: grid;
  gap: 10px;
}

.role-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  align-items: center;
  gap: 14px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.role-row:hover,
.player-card:hover,
.roster-item:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft);
}

.role-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.primary-button,
.ghost-button,
.danger-button,
.target-button {
  min-height: 42px;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 850;
}

.primary-button {
  background: var(--accent);
  color: white;
  box-shadow: 0 9px 18px rgba(180, 35, 24, 0.18);
}

.primary-button:hover:not(:disabled) {
  background: var(--accent-dark);
}

.ghost-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
}

.danger-button {
  background: var(--accent-dark);
  color: white;
}

.footer-actions {
  margin-top: 18px;
  justify-content: flex-end;
}

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

.seat-map {
  position: relative;
  display: block;
  min-height: 360px;
  aspect-ratio: 1.9;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(ellipse at center, rgba(255, 255, 255, 0.96) 0 34%, transparent 35%),
    linear-gradient(135deg, rgba(36, 93, 151, 0.08), rgba(20, 115, 95, 0.07)),
    #eef3f8;
  overflow: hidden;
}

.seat-map::before {
  content: "Bàn chơi";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 70%;
  height: 36%;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(21, 25, 31, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(229, 235, 243, 0.92)),
    #f8fafc;
  color: #4a5564;
  font-weight: 900;
  box-shadow:
    inset 0 2px 8px rgba(255, 255, 255, 0.88),
    0 20px 55px rgba(26, 33, 43, 0.16);
}

.seat-card,
.seat-button {
  position: absolute;
  left: var(--seat-left);
  top: var(--seat-top);
  transform: translate(-50%, -50%);
  z-index: 2;
}

.player-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  padding: 13px;
}

.player-card p {
  margin: 8px 0 0;
}

.seat-card {
  width: 72px;
  min-height: 58px;
  text-align: center;
  box-shadow: 0 10px 22px rgba(26, 33, 43, 0.1);
  padding: 8px;
}

.seat-card .seat {
  margin: 0 auto;
}

.seat-card strong,
.seat-card p {
  display: none;
}

.seat {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--nav);
  color: white;
  font-weight: 950;
  margin-bottom: 10px;
  box-shadow: inset 0 -2px 0 rgba(255, 255, 255, 0.08);
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 18px;
  align-items: start;
}

.callout {
  min-height: 460px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background:
    linear-gradient(180deg, rgba(36, 93, 151, 0.08), transparent 42%),
    #ffffff;
}

.phase-line {
  margin-bottom: 28px;
}

#phaseBadge,
#stepCounter,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 6px 11px;
  background: #e8edf4;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 850;
}

#phaseBadge {
  background: var(--nav);
  color: white;
}

#scriptTitle {
  font-size: 3.25rem;
  line-height: 1.02;
  max-width: 940px;
  margin-bottom: 16px;
  overflow-wrap: break-word;
}

#scriptText {
  max-width: 780px;
  color: #35404d;
  font-size: 1.13rem;
  line-height: 1.62;
}

.target-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 10px;
  margin: auto 0 20px;
}

.target-strip.seat-map {
  display: block;
  min-height: 320px;
  width: 100%;
  margin: auto 0 20px;
}

.target-button {
  min-height: 60px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  color: var(--ink);
}

.seat-button {
  width: 54px;
  min-height: 46px;
  padding: 8px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, #ffffff, #f1f5f9);
  box-shadow: 0 8px 18px rgba(26, 33, 43, 0.12);
  font-size: 1.02rem;
}

.target-strip.is-revealing-roles .seat-button {
  width: 82px;
  min-height: 62px;
  padding: 7px 6px;
}

.seat-main,
.seat-role,
.seat-team {
  display: block;
  max-width: 100%;
}

.seat-main {
  font-weight: 950;
  line-height: 1;
}

.seat-role {
  margin-top: 5px;
  font-size: 0.69rem;
  font-weight: 850;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.seat-team {
  margin-top: 2px;
  color: #667380;
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1;
  overflow-wrap: anywhere;
}

.target-button.is-selected .seat-team {
  color: rgba(255, 255, 255, 0.78);
}

.target-button:hover:not(:disabled) {
  border-color: var(--blue);
  box-shadow: 0 8px 18px rgba(36, 93, 151, 0.14);
}

.seat-button:hover:not(:disabled),
.seat-button:focus-visible {
  transform: translate(-50%, -50%);
}

.target-button.is-selected {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
  box-shadow: 0 10px 24px rgba(36, 93, 151, 0.24);
}

.target-button.is-dead {
  opacity: 0.38;
  text-decoration: line-through;
}

.target-button.is-assigned {
  border-color: var(--green);
}

.target-button.is-blocked {
  background: #eef1f4;
  color: var(--muted);
  text-decoration: line-through;
}

.action-row {
  justify-content: flex-end;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.roster-panel {
  max-height: 72vh;
  overflow: auto;
}

.roster-panel::-webkit-scrollbar {
  width: 10px;
}

.roster-panel::-webkit-scrollbar-thumb {
  background: #b8c2cf;
  border-radius: 999px;
  border: 3px solid #fff;
}

.roster {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.roster-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  padding: 10px;
}

.roster-item .seat {
  margin: 0;
}

.roster-item.is-dead {
  background: #eef1f4;
  color: var(--muted);
}

.roster-item.is-hidden-role strong {
  color: var(--muted);
}

.role-tag {
  color: var(--muted);
  font-size: 0.86rem;
  margin-top: 2px;
}

.state-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(20, 115, 95, 0.12);
}

.is-dead .state-dot {
  background: var(--accent-dark);
  box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.1);
}

.log-panel {
  margin-top: 18px;
}

#logList {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding-left: 22px;
  color: #33404d;
}

#logList li {
  padding: 6px 0;
  border-bottom: 1px solid rgba(215, 222, 232, 0.7);
}

.notice-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: start center;
  padding: 20px;
  background: rgba(9, 13, 18, 0.64);
  backdrop-filter: blur(4px);
  overflow: auto;
}

.notice-dialog {
  width: min(560px, 100%);
  max-height: calc(100dvh - 40px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  padding: 24px;
}

.notice-dialog h2 {
  margin-bottom: 12px;
  font-size: 2rem;
}

.notice-signal {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  margin: 4px auto 14px;
  border-radius: 999px;
  font-size: 3.8rem;
  line-height: 1;
  box-shadow: var(--shadow-soft);
}

.notice-signal.is-like {
  background: rgba(20, 115, 95, 0.12);
  border: 1px solid rgba(20, 115, 95, 0.28);
}

.notice-signal.is-dislike {
  background: rgba(180, 35, 24, 0.1);
  border: 1px solid rgba(180, 35, 24, 0.24);
}

.notice-dialog p:not(.eyebrow) {
  color: #2f343a;
  font-size: 1.08rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.read-script {
  margin: 16px 0;
  border: 1px solid rgba(180, 35, 24, 0.22);
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  background: #fff7f5;
  padding: 14px;
}

.read-script strong {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-dark);
}

.read-script p {
  margin-bottom: 0;
  color: var(--ink);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.notice-dialog .primary-button {
  width: 100%;
  margin-top: 10px;
}

.share-dialog {
  width: min(520px, 100%);
}

.share-qr-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin: 18px 0;
  border: 1px solid rgba(215, 222, 232, 0.95);
  border-radius: 8px;
  background: #f7fafc;
  padding: 18px;
}

.share-qr {
  width: min(300px, 74vw);
  aspect-ratio: 1;
  border: 10px solid #fff;
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.share-url {
  width: 100%;
  border-radius: 8px;
  background: #ffffff;
  padding: 10px 12px;
  color: #26323f;
  font-size: 0.86rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  text-align: center;
}

.share-dialog-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: 10px;
}

.share-dialog-actions .ghost-button,
.share-dialog-actions .primary-button {
  width: 100%;
  margin-top: 0;
}

.spectator {
  min-height: 100vh;
  display: grid;
  place-items: start center;
  padding: 18px;
}

.spectator-card {
  width: min(720px, 100%);
}

.spectator-card h1 {
  margin-bottom: 10px;
}

.spectator-result {
  margin: 14px 0 0;
  color: var(--green);
  font-weight: 900;
}

.end-summary {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.end-summary-head {
  padding: 18px;
  border-left: 6px solid var(--green);
  background: rgba(20, 115, 95, 0.1);
}

.end-summary-head p {
  margin-bottom: 6px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.end-summary-head h2 {
  font-size: 1.35rem;
}

.end-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.end-stats article {
  padding: 13px 10px;
  border-right: 1px solid var(--line);
  text-align: center;
}

.end-stats article:last-child {
  border-right: 0;
}

.end-stats strong {
  display: block;
  color: var(--ink);
  font-size: 1.25rem;
}

.end-stats span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.end-timeline {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.end-timeline section {
  border-left: 3px solid var(--line-strong);
  padding-left: 12px;
}

.end-timeline h3 {
  margin-bottom: 8px;
  color: var(--ink);
}

.end-timeline ol {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: #33404d;
}

.spectator-table-wrap {
  margin-top: 18px;
}

.spectator-table {
  position: relative;
  min-height: 300px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(ellipse at center, rgba(255, 255, 255, 0.96) 0 34%, transparent 35%),
    linear-gradient(135deg, rgba(36, 93, 151, 0.08), rgba(20, 115, 95, 0.07)),
    #eef3f8;
  overflow: hidden;
}

.spectator-table::before {
  content: "Bàn chơi";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 68%;
  height: 32%;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(21, 25, 31, 0.12);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(229, 235, 243, 0.94));
  color: #4a5564;
  font-weight: 900;
}

.spectator-seat {
  position: absolute;
  left: var(--seat-left);
  top: var(--seat-top);
  z-index: 2;
  width: 76px;
  min-height: 48px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  padding: 6px;
  text-align: center;
}

.spectator-seat strong {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--nav);
  color: #fff;
  font-size: 0.88rem;
}

.spectator-seat span,
.spectator-seat small {
  display: block;
  width: 100%;
  margin-top: 3px;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.spectator-seat small {
  color: var(--muted);
  font-weight: 700;
}

.spectator-seat.is-dead {
  opacity: 0.5;
  background: #eef1f4;
  text-decoration: line-through;
}

.spectator-log {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding-left: 22px;
}

.spectator-log li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  line-height: 1.45;
}

.spectator-log span {
  display: inline-block;
  min-width: 52px;
  color: var(--muted);
  font-weight: 800;
}

.spectator-details {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.spectator-details h2 {
  font-size: 1.05rem;
  margin-bottom: 10px;
}

.spectator-details ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 22px;
  color: #33404d;
}

@media (max-width: 980px) {
  .app-shell,
  .setup-grid,
  .game-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .seat-map {
    min-height: 330px;
  }

  .seat-card {
    width: 66px;
  }
}

@media (max-width: 640px) {
  body {
    background: #eef2f6;
  }

  main,
  .sidebar {
    padding: 14px;
    width: 100%;
    min-width: 0;
  }

  .app-shell {
    min-height: 100vh;
  }

  .sidebar {
    gap: 14px;
  }

  .sidebar h1 {
    font-size: 1.35rem;
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .step {
    min-height: 64px;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 8px;
    font-size: 0.78rem;
    text-align: center;
  }

  .step span {
    width: 26px;
    height: 26px;
  }

  .status-panel {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 10px;
  }

  .status-panel div {
    display: grid;
    gap: 2px;
    justify-items: center;
    text-align: center;
  }

  .status-panel .muted {
    font-size: 0.72rem;
  }

  .status-panel strong {
    font-size: 1rem;
  }

  .view-header,
  .assign-toolbar,
  .panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  .panel-actions {
    justify-content: stretch;
  }

  .panel-actions .ghost-button {
    flex: 1 1 120px;
  }

  .view-header {
    margin-bottom: 14px;
  }

  h2 {
    font-size: 1.35rem;
  }

  .panel,
  .callout {
    padding: 12px;
    width: 100%;
    min-width: 0;
  }

  .role-row {
    grid-template-columns: 1fr;
  }

  .target-strip:not(.seat-map) {
    grid-template-columns: repeat(3, 1fr);
  }

  .seat-map,
  .target-strip.seat-map {
    width: 100%;
    min-height: 280px;
    aspect-ratio: auto;
    margin-top: 12px;
  }

  .seat-map::before {
    width: 68%;
    height: 32%;
    font-size: 0.86rem;
  }

  .seat-card {
    width: 42px;
    min-height: 38px;
    padding: 6px;
  }

  .seat-button {
    width: 38px;
    min-height: 34px;
    padding: 4px;
    font-size: 0.84rem;
  }

  .target-strip.is-revealing-roles .seat-button {
    width: clamp(46px, 11vw, 62px);
    min-height: 46px;
    padding: 4px;
  }

  .seat-role {
    margin-top: 4px;
    font-size: 0.58rem;
    line-height: 1.04;
  }

  .seat-team {
    display: none;
  }

  .seat-card .seat,
  .seat-button {
    box-shadow: 0 6px 12px rgba(26, 33, 43, 0.12);
  }

  #scriptTitle {
    font-size: 1.45rem;
    line-height: 1.14;
    margin-bottom: 10px;
    max-width: 100%;
  }

  #scriptText {
    font-size: 1rem;
    line-height: 1.48;
  }

  .phase-line {
    margin-bottom: 16px;
  }

  .callout {
    min-height: 0;
  }

  .game-layout {
    gap: 12px;
  }

  .roster-panel {
    max-height: 360px;
  }

  .roster-item {
    grid-template-columns: 38px minmax(0, 1fr) auto;
  }

  .roster-item .seat,
  .seat {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }

  .action-row {
    position: sticky;
    bottom: 0;
    z-index: 4;
    margin: 0 -12px -12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--line);
  }

  .action-row .primary-button,
  .action-row .ghost-button {
    flex: 1 1 140px;
  }

  .notice-dialog {
    padding: 18px;
    max-height: calc(100dvh - 24px);
  }

  .notice-dialog h2 {
    font-size: 1.55rem;
  }

  .share-dialog-actions {
    grid-template-columns: 1fr;
  }

  .spectator-table {
    min-height: 260px;
  }

  .end-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .end-stats article {
    border-bottom: 1px solid var(--line);
  }

  .spectator-seat {
    width: 46px;
    min-height: 38px;
    padding: 4px;
  }

  .spectator-seat strong {
    width: 26px;
    height: 26px;
  }

  .spectator-seat span,
  .spectator-seat small {
    font-size: 0.62rem;
  }
}
