.assistant-voice-row,
.match-toolbar,
.match-actions,
.timer-group,
.match-player-grid,
.match-history,
.quest-board,
.match-summary,
.match-card-list {
  display: grid;
  gap: 1rem;
}

.assistant-voice-row {
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  align-items: end;
  margin-bottom: 1rem;
}

.match-layout {
  display: grid;
  gap: 1rem;
  align-items: start;
}

.match-primary-card,
.match-detail-grid > .card {
  min-width: 0;
}

.match-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 1rem;
  align-items: start;
}

.match-toolbar {
  grid-template-columns: repeat(auto-fit, minmax(180px, max-content));
  align-items: center;
  margin-bottom: 1rem;
}

.match-summary,
.match-card-list {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.match-summary-card,
.quest-card,
.match-section,
.match-history-item,
.timer-card {
  border-radius: 18px;
  background: rgba(255, 248, 230, 0.06);
  border: 1px solid rgba(255, 248, 230, 0.08);
  padding: 1rem;
}

.match-summary-card h3,
.quest-card h3,
.match-section h3,
.match-history-item h3,
.timer-card h3 {
  margin: 0.25rem 0 0;
  font-size: 1.1rem;
  color: #fff3d5;
}
.match-board-stage {
  grid-column: 1 / -1;
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(255, 248, 230, 0.14);
  aspect-ratio: 3 / 2;
  min-height: clamp(320px, 44vw, 540px);
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  box-shadow: inset 0 0 0 1px rgba(255, 248, 230, 0.06), 0 24px 48px rgba(0, 0, 0, 0.28);
}

.match-board-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 248, 230, 0.04), rgba(7, 11, 18, 0.18) 34%, rgba(7, 11, 18, 0.62));
  pointer-events: none;
}

.match-board-stage-inner {
  position: relative;
  z-index: 1;
  min-height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1rem;
  padding: clamp(1rem, 2vw, 1.5rem);
}

.match-board-overline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-self: start;
}

.match-board-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-self: start;
}

.match-board-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 248, 230, 0.12);
  background: rgba(7, 11, 18, 0.38);
  color: #fff8e8;
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.match-quest-tab {
  border-radius: 16px;
  border: 1px solid rgba(255, 248, 230, 0.12);
  background: rgba(7, 11, 18, 0.38);
  color: #fff8e8;
  padding: 0.7rem 0.9rem;
  display: grid;
  gap: 0.2rem;
  min-width: 6.5rem;
  cursor: pointer;
  text-align: left;
  backdrop-filter: blur(8px);
}

.match-quest-tab span {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(248, 242, 230, 0.74);
}

.match-quest-tab strong {
  font-size: 1rem;
  line-height: 1.2;
  color: #fff8e8;
}

.match-quest-tab small {
  font-size: 0.78rem;
  line-height: 1.3;
  color: rgba(248, 242, 230, 0.82);
}

.match-quest-meta {
  opacity: 0.76;
}

.match-quest-tab.is-selected {
  border-color: rgba(205, 168, 93, 0.34);
  background: rgba(205, 168, 93, 0.18);
  box-shadow: inset 0 0 0 1px rgba(205, 168, 93, 0.16);
}

.match-quest-tab.is-current {
  border-color: rgba(96, 165, 250, 0.34);
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.16);
}

.match-quest-tab.is-selected.is-current {
  background: linear-gradient(135deg, rgba(205, 168, 93, 0.18), rgba(96, 165, 250, 0.14));
}

.match-board-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(220px, 0.85fr);
  gap: 1rem;
  align-items: center;
}

.match-board-status-card,
.match-board-score,
.match-board-stat {
  border: 1px solid rgba(255, 248, 230, 0.12);
  background: rgba(7, 11, 18, 0.38);
  backdrop-filter: blur(8px);
}

.match-board-status-card {
  max-width: 34rem;
  border-radius: 22px;
  padding: 1.1rem 1.2rem;
}

.match-board-status-card h2 {
  margin: 0.25rem 0 0;
  font-size: clamp(1.85rem, 4vw, 2.9rem);
  line-height: 1.02;
  color: #fff3d5;
}

.match-board-scoreboard {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 0.75rem;
}

.match-board-score {
  border-radius: 20px;
  padding: 0.95rem 1rem;
  display: grid;
  gap: 0.3rem;
  text-align: center;
}

.match-board-score span {
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(248, 242, 230, 0.78);
}

.match-board-score strong {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
}

.match-board-score.is-good strong {
  color: #d7f8e2;
}

.match-board-score.is-evil strong {
  color: #ffd4d4;
}

.match-board-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.match-board-stat {
  border-radius: 18px;
  padding: 0.85rem 0.95rem;
  display: grid;
  gap: 0.28rem;
  align-content: start;
}

.match-board-stat span {
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(248, 242, 230, 0.74);
}

.match-board-stat strong {
  font-size: clamp(1rem, 1.45vw, 1.25rem);
  line-height: 1.2;
  color: #fff8e8;
}

.match-board-stat small {
  font-size: 0.82rem;
  line-height: 1.35;
  color: rgba(248, 242, 230, 0.76);
}

.match-board-stat.is-wide {
  grid-column: span 2;
}

.match-board-stage.is-endgame {
  border-color: rgba(248, 113, 113, 0.24);
}

.match-board-stage.is-resolve,
.match-board-stage.is-confirm {
  border-color: rgba(205, 168, 93, 0.24);
}

.match-board-stage.is-team,
.match-board-stage.is-vote {
  border-color: rgba(96, 165, 250, 0.24);
}

.quest-board {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.quest-card {
  display: grid;
  gap: 0.45rem;
}

.quest-card[data-match-view-quest] {
  cursor: pointer;
}

.quest-card.is-viewed {
  border-color: rgba(205, 168, 93, 0.32);
  box-shadow: inset 0 0 0 1px rgba(205, 168, 93, 0.14);
}

.quest-card.is-current {
  border-color: rgba(96, 165, 250, 0.3);
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.18);
}

.quest-card.is-success {
  border-color: rgba(47, 133, 90, 0.28);
  background: rgba(47, 133, 90, 0.12);
}

.quest-card.is-fail {
  border-color: rgba(248, 113, 113, 0.28);
  background: rgba(248, 113, 113, 0.1);
}

.quest-attempt-list,
.match-vote-grid {
  display: grid;
  gap: 0.75rem;
}

.vote-pill {
  border-radius: 14px;
  border: 1px solid rgba(255, 248, 230, 0.08);
  background: rgba(255, 248, 230, 0.05);
  padding: 0.75rem 0.85rem;
  display: grid;
  gap: 0.2rem;
}

.vote-pill strong {
  font-size: 0.95rem;
  color: #fff8e8;
}

.vote-pill small {
  font-size: 0.78rem;
  color: rgba(248, 242, 230, 0.76);
}

.vote-pill.approve {
  border-color: rgba(47, 133, 90, 0.28);
  background: rgba(47, 133, 90, 0.14);
}

.vote-pill.reject {
  border-color: rgba(248, 113, 113, 0.28);
  background: rgba(248, 113, 113, 0.12);
}

.vote-pill.pending {
  border-color: rgba(205, 168, 93, 0.24);
  background: rgba(205, 168, 93, 0.12);
}

.match-history-item.is-live {
  border-color: rgba(96, 165, 250, 0.26);
  background: rgba(96, 165, 250, 0.1);
}

.match-current-round {
  display: grid;
  gap: 1rem;
}

.match-section {
  display: grid;
  gap: 0.75rem;
}

.match-player-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.match-player-button,
.match-chip,
.vote-chip,
.timer-pill {
  border-radius: 16px;
  border: 1px solid rgba(255, 248, 230, 0.08);
  background: rgba(255, 248, 230, 0.05);
  color: #fff8e8;
}

.match-player-button {
  padding: 0.85rem 0.95rem;
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 0.2rem;
}

.match-player-button strong {
  font-size: 1rem;
}

.match-player-button .helper-text,
.match-chip .helper-text {
  margin: 0;
}

.match-player-button.is-leader {
  border-color: rgba(205, 168, 93, 0.32);
  background: rgba(205, 168, 93, 0.15);
}

.match-player-button.is-team {
  border-color: rgba(96, 165, 250, 0.28);
  background: rgba(96, 165, 250, 0.14);
}

.match-player-button.vote-approve {
  border-color: rgba(47, 133, 90, 0.28);
  background: rgba(47, 133, 90, 0.14);
}

.match-player-button.vote-reject {
  border-color: rgba(248, 113, 113, 0.28);
  background: rgba(248, 113, 113, 0.12);
}

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

.match-actions {
  grid-template-columns: repeat(auto-fit, minmax(180px, max-content));
  align-items: center;
}

.match-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.quest-detail-snapshot,
.match-vote-summary {
  display: grid;
  gap: 0.75rem;
}

.match-vote-line {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(5.5rem, max-content) minmax(0, 1fr);
  gap: 0.7rem;
  align-items: start;
}

.match-vote-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(255, 248, 230, 0.08);
  background: rgba(255, 248, 230, 0.05);
  color: #fff8e8;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.match-vote-label.approve {
  color: var(--success);
  border-color: rgba(47, 133, 90, 0.26);
}

.match-vote-label.reject {
  color: var(--danger);
  border-color: rgba(248, 113, 113, 0.28);
}

.match-vote-label.pending {
  color: var(--warning);
  border-color: rgba(205, 168, 93, 0.28);
}

.match-chip,
.vote-chip,
.timer-pill {
  padding: 0.5rem 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.vote-chip.approve {
  color: var(--success);
  border-color: rgba(47, 133, 90, 0.26);
}

.vote-chip.reject {
  color: var(--danger);
  border-color: rgba(248, 113, 113, 0.28);
}

.timer-group {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.timer-card {
  display: grid;
  gap: 0.35rem;
}

.timer-pill {
  justify-content: center;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.match-history {
  margin-top: 1rem;
}

.match-history-item {
  display: grid;
  gap: 0.6rem;
}

.match-history-item.is-approved {
  border-color: rgba(47, 133, 90, 0.24);
}

.match-history-item.is-rejected {
  border-color: rgba(248, 113, 113, 0.24);
}

.match-history-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.match-history-player-list {
  color: rgba(248, 242, 230, 0.84);
}

.match-note {
  color: rgba(248, 242, 230, 0.78);
}

@media (max-width: 960px) {
  .assistant-voice-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .match-toolbar,
  .match-actions,
  .match-detail-grid {
    grid-template-columns: 1fr;
  }

  .match-board-hero {
    grid-template-columns: 1fr;
  }

  .match-board-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .match-board-stat.is-wide {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .match-board-stage {
    aspect-ratio: auto;
    min-height: 32rem;
  }

  .match-board-stage-inner {
    padding: 1rem;
  }

  .match-board-scoreboard,
  .match-board-stats {
    grid-template-columns: 1fr;
  }

  .match-board-stat.is-wide {
    grid-column: auto;
  }

  .match-board-status-card h2 {
    font-size: clamp(1.6rem, 8vw, 2.2rem);
  }
}

.history-layout,
.history-list,
.history-role-grid,
.history-endgame-grid,
.history-detail {
  display: grid;
  gap: 1rem;
}

.history-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1rem;
}

.history-import-label {
  cursor: pointer;
}

.history-import-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.history-list {
  margin-top: 1rem;
}

.history-list-button {
  width: 100%;
  text-align: left;
  border-radius: 18px;
  border: 1px solid rgba(255, 248, 230, 0.08);
  background: rgba(255, 248, 230, 0.05);
  color: #fff8e8;
  padding: 1rem;
  display: grid;
  gap: 0.55rem;
  cursor: pointer;
}

.history-list-button.is-selected {
  border-color: rgba(96, 165, 250, 0.32);
  background: rgba(96, 165, 250, 0.14);
}

.history-list-lineup {
  color: rgba(248, 242, 230, 0.84);
  margin: 0;
}

.history-role-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.history-role-item {
  border-radius: 18px;
  border: 1px solid rgba(255, 248, 230, 0.08);
  background: rgba(255, 248, 230, 0.05);
  padding: 1rem;
}

.history-role-item.is-good {
  border-color: rgba(47, 133, 90, 0.28);
  background: rgba(47, 133, 90, 0.12);
}

.history-role-item.is-evil {
  border-color: rgba(248, 113, 113, 0.28);
  background: rgba(248, 113, 113, 0.12);
}

.history-endgame-grid {
  margin-top: 1rem;
}

.history-endgame-row {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  align-items: end;
  border-radius: 18px;
  border: 1px solid rgba(255, 248, 230, 0.08);
  background: rgba(255, 248, 230, 0.05);
  padding: 1rem;
}

.history-detail-grid {
  margin-bottom: 1rem;
}

@media (max-width: 960px) {
  .history-endgame-row {
    grid-template-columns: 1fr;
  }

  .history-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}

.match-phase-banner,
.match-phase-rail {
  grid-column: 1 / -1;
}

.match-phase-banner {
  border-radius: 20px;
  border: 1px solid rgba(205, 168, 93, 0.24);
  background: linear-gradient(135deg, rgba(205, 168, 93, 0.16), rgba(96, 165, 250, 0.1));
  padding: 1rem 1.1rem;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(220px, 1fr);
  gap: 1rem;
}

.match-phase-banner h3 {
  margin: 0.2rem 0 0;
  color: #fff3d5;
}

.match-phase-next {
  border-radius: 16px;
  border: 1px solid rgba(255, 248, 230, 0.08);
  background: rgba(18, 22, 32, 0.32);
  padding: 0.85rem 0.95rem;
}

.match-phase-next p:last-child {
  margin: 0.35rem 0 0;
  color: #fff8e8;
}

.match-phase-rail {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  margin-top: -0.25rem;
}

.match-phase-step {
  border-radius: 16px;
  border: 1px solid rgba(255, 248, 230, 0.08);
  background: rgba(255, 248, 230, 0.04);
  padding: 0.75rem 0.85rem;
  display: grid;
  gap: 0.2rem;
}

.match-phase-step strong {
  color: #fff8e8;
}

.match-phase-step.is-current {
  border-color: rgba(96, 165, 250, 0.3);
  background: rgba(96, 165, 250, 0.16);
}

.match-phase-step.is-complete {
  border-color: rgba(47, 133, 90, 0.26);
  background: rgba(47, 133, 90, 0.12);
}

.match-phase-step.is-pending {
  opacity: 0.78;
}

@media (max-width: 960px) {
  .match-phase-banner {
    grid-template-columns: 1fr;
  }
}

.match-timer-banner,
.rejection-track {
  grid-column: 1 / -1;
}

.match-timer-banner {
  border-radius: 20px;
  border: 1px solid rgba(96, 165, 250, 0.26);
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.18), rgba(20, 25, 40, 0.3));
  padding: 1rem 1.1rem;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 1fr);
  gap: 1rem;
}

.match-timer-banner h2 {
  margin: 0.15rem 0 0;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: 0.08em;
  color: #fff8e8;
}

.match-timer-banner.is-running {
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.18);
}

.match-timer-meta {
  display: grid;
  gap: 0.75rem;
  align-content: center;
}

.match-timer-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.25rem;
}

.match-timer-controls .secondary-button {
  min-width: 8.75rem;
}

.rejection-track {
  border-radius: 18px;
  border: 1px solid rgba(255, 248, 230, 0.08);
  background: rgba(255, 248, 230, 0.05);
  padding: 1rem;
  display: grid;
  gap: 0.9rem;
}

.rejection-track-pills,
.quest-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.rejection-pill {
  border-radius: 999px;
  border: 1px solid rgba(255, 248, 230, 0.08);
  background: rgba(255, 248, 230, 0.04);
  color: #fff8e8;
  min-width: 3rem;
  justify-content: center;
  padding: 0.55rem 0.9rem;
  display: inline-flex;
  align-items: center;
  font-weight: 700;
}

button.rejection-pill {
  cursor: pointer;
}

.rejection-pill.is-filled {
  border-color: rgba(205, 168, 93, 0.28);
  background: rgba(205, 168, 93, 0.14);
}

.rejection-pill.is-active {
  border-color: rgba(248, 113, 113, 0.32);
  background: rgba(248, 113, 113, 0.14);
}

.rejection-pill.is-limit {
  opacity: 0.78;
}

.quest-card-actions {
  margin-top: 0.35rem;
}

@media (max-width: 960px) {
  .match-timer-banner {
    grid-template-columns: 1fr;
  }
}







