:root {
  color-scheme: dark;
  --bg: #080b10;
  --surface: #10151d;
  --surface-2: #151c26;
  --surface-3: #1b2430;
  --ink: #f5f7f2;
  --text-secondary: #c4ccd6;
  --muted: #8d99a8;
  --line: #26313f;
  --line-strong: #364454;
  --accent: #72d39b;
  --accent-strong: #41b873;
  --danger: #ff7b72;
  --danger-bg: #331a1f;
  --danger-hover-bg: #421f26;
  --warn: #f1b65b;
  --villager: #8fd6ff;
  --poisoner: #ff7b72;
  --herbalist: #72d39b;
  --inspector: #b9a7ff;
  --shadow: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
select,
input {
  font: inherit;
}

button {
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink);
  padding: 7px 12px;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease, opacity 140ms ease;
}

button:hover:not(:disabled) {
  border-color: var(--accent);
}

body:not(.authenticated) > .app-header,
body:not(.authenticated) > .game-lock-banner,
body:not(.authenticated) > .app-shell {
  display: none;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(360px, 480px);
  align-items: center;
  justify-content: center;
  gap: 64px;
  padding: 40px;
  background: #090d13;
}

.auth-shell.hidden {
  display: none;
}

.auth-brand {
  display: grid;
  gap: 12px;
}

.auth-brand h1 {
  font-size: 34px;
}

.auth-brand > p:last-child {
  max-width: 390px;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.55;
}

.auth-card {
  width: 100%;
  min-height: 430px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  padding: 28px;
}

.auth-panel {
  display: grid;
  gap: 18px;
}

.auth-panel.hidden {
  display: none;
}

.auth-heading {
  display: grid;
  gap: 4px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.auth-heading span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-heading h2 {
  font-size: 24px;
}

.auth-panel > p {
  color: var(--text-secondary);
  line-height: 1.55;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form button[type="submit"] {
  margin-top: 4px;
}

.auth-secondary {
  width: 100%;
}

.text-button {
  min-height: auto;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 2px;
}

.contact-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  border: 1px solid var(--accent-strong);
  border-radius: 6px;
  color: var(--ink);
  padding: 10px 14px;
  font-size: 17px;
  font-weight: 800;
  text-decoration: none;
}

.contact-link::after {
  content: "Открыть";
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.auth-message,
.admin-notice {
  margin-bottom: 16px;
  border-left: 3px solid var(--warn);
  background: #17191c;
  color: var(--text-secondary);
  padding: 11px 13px;
  line-height: 1.4;
}

.auth-message[data-kind="error"],
.admin-notice[data-kind="error"] {
  border-color: var(--danger);
}

.auth-message[data-kind="success"],
.admin-notice[data-kind="success"] {
  border-color: var(--accent);
}

.admin-link-output {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 9px;
}

button:focus-visible,
select:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

button.primary {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  color: #07100b;
  font-weight: 700;
}

button.danger {
  border-color: #6b2b33;
  background: var(--danger-bg);
  color: var(--danger);
}

button.danger:hover:not(:disabled) {
  border-color: var(--danger);
  background: var(--danger-hover-bg);
}

button.danger:focus-visible {
  outline-color: var(--danger);
}

select,
input:not([type="checkbox"]):not([type="radio"]) {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #0a0e14;
  color: var(--ink);
  padding: 7px 10px;
}

select {
  color-scheme: dark;
}

select option,
select optgroup {
  background-color: #0c111a;
  color: var(--ink);
}

select option:disabled {
  color: var(--muted);
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

h1 {
  font-size: 19px;
  line-height: 1.1;
}

h2 {
  font-size: 22px;
}

h3 {
  font-size: 15px;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 58px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
  background: #090c11;
}

.brand-lockup {
  display: flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}

.eyebrow,
.stage-kicker {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0;
}

.header-actions,
.app-tabs,
.stage-actions,
.setup-controls,
.role-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
}

.app-tabs {
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.header-actions {
  flex-wrap: nowrap;
  gap: 6px;
}

.header-actions button {
  min-height: 34px;
  padding: 5px 9px;
  font-size: 12px;
}

.sync-status {
  min-width: 112px;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.sync-status[data-kind="success"] {
  color: var(--accent);
}

.sync-status[data-kind="warning"],
.sync-status[data-kind="pending"] {
  color: var(--warn);
}

.sync-status[data-kind="error"] {
  color: var(--danger);
}

.account-button {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-lock-banner {
  position: sticky;
  top: 58px;
  z-index: 18;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid #7c5c26;
  background: #211a10;
  padding: 10px 16px;
}

.game-lock-banner.hidden {
  display: none;
}

.game-lock-banner > div {
  display: grid;
  gap: 2px;
}

.game-lock-banner span {
  color: var(--text-secondary);
  font-size: 12px;
}

.app-view.read-only {
  opacity: 0.72;
}

.admin-panel {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  overflow: hidden;
  background: var(--bg);
  padding: 18px;
}

.admin-panel.hidden {
  display: none;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.admin-header > div {
  display: grid;
  gap: 3px;
}

.admin-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 12px 0;
}

.admin-tabs button {
  min-width: 120px;
  color: var(--muted);
  font-weight: 700;
}

.admin-tabs button.active {
  border-color: var(--accent);
  background: #111a19;
  color: var(--ink);
}

.admin-view {
  display: none;
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 16px;
}

.admin-view.active {
  display: block;
}

.admin-view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
}

.admin-view-header > div {
  display: grid;
  gap: 3px;
}

.admin-view-header h3 {
  margin: 0;
  font-size: 16px;
}

.admin-view-header p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.admin-view-header form,
.admin-view-header button {
  flex: none;
}

.admin-list {
  display: grid;
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 66px;
  background: #0d1219;
  padding: 12px 14px;
}

.admin-row > div:first-child {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.admin-row span {
  color: var(--muted);
  font-size: 12px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.admin-login {
  color: var(--accent) !important;
  font-weight: 600;
}

.admin-empty {
  border: 1px solid var(--line);
  background: #0d1219;
  color: var(--muted);
  padding: 22px;
}

.audit-row code {
  max-width: 46%;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-tab {
  min-width: 82px;
  min-height: 34px;
  padding-block: 5px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.app-tab.active {
  border-color: var(--accent);
  background: #111a19;
  color: var(--ink);
}

.app-shell {
  width: 100%;
  padding: 12px;
}

.app-view {
  display: none;
}

.app-view.active {
  display: block;
}

.app-layout {
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 12px;
  width: 100%;
}

.app-layout.app-view.active {
  display: grid;
}

.roles-panel {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px;
}

.panel,
.side-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.role-villager {
  --role: var(--villager);
  --role-bg: rgba(143, 214, 255, 0.1);
}

.role-poisoner {
  --role: var(--poisoner);
  --role-bg: rgba(255, 123, 114, 0.1);
}

.role-herbalist {
  --role: var(--herbalist);
  --role-bg: rgba(114, 211, 155, 0.1);
}

.role-inspector {
  --role: var(--inspector);
  --role-bg: rgba(185, 167, 255, 0.1);
}

.role-baker,
.role-guard,
.role-taster,
.role-elder,
.role-pantry,
.role-allergic,
.role-gossip,
.role-impostor,
.role-patron,
.role-sleepy-cook,
.role-lucky-eater,
.role-head-chef {
  --role: #8fd6ff;
  --role-bg: rgba(143, 214, 255, 0.1);
}

.role-saboteur,
.role-substitute,
.role-accomplice,
.role-poison-eater {
  --role: #ff7b72;
  --role-bg: rgba(255, 123, 114, 0.1);
}

.role-gourmand,
.role-critic {
  --role: #f1b65b;
  --role-bg: rgba(241, 182, 91, 0.11);
}

.role-embittered-cook {
  --role: #d9a65d;
  --role-bg: rgba(217, 166, 93, 0.11);
}

.role-mercenary-cook {
  --role: #c0a7ff;
  --role-bg: rgba(192, 167, 255, 0.11);
}

.role-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--role, var(--accent));
}

.role-guide-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  object-fit: contain;
}

.seat-secret-note {
  margin: 0;
  padding: 7px 9px;
  border-left: 3px solid var(--role);
  background: var(--role-bg);
  color: var(--muted);
  font-size: 12px;
}

.seat-secret-note strong {
  color: var(--ink);
}

.private-list,
.personal-winners ul {
  margin: 0;
  padding-left: 18px;
}

.private-list {
  display: grid;
  gap: 5px;
  color: var(--muted);
}

.personal-winners {
  border-left: 3px solid var(--role);
  padding: 10px 12px;
  background: var(--role-bg);
}

.personal-winners strong {
  display: block;
  margin-bottom: 6px;
}

.stage-panel {
  min-width: 0;
  padding: 14px;
}

.side-panel {
  position: sticky;
  top: 70px;
  display: grid;
  align-content: start;
  gap: 9px;
  max-height: calc(100vh - 82px);
  overflow: auto;
}

.side-card {
  padding: 12px;
}

.side-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.side-card-heading h2 {
  font-size: 16px;
}

.live-indicator {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.side-details {
  padding: 0;
}

.side-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  cursor: pointer;
  color: var(--muted);
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 800;
  list-style: none;
}

.side-details > summary::-webkit-details-marker {
  display: none;
}

.side-details[open] > summary {
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.side-details[open] .side-details-toggle {
  transform: rotate(45deg);
}

.side-summary-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.side-details-toggle {
  font-size: 13px;
  transition: transform 140ms ease;
}

.side-details > .summary-list,
.side-details > .round-log {
  margin: 0;
  padding: 12px;
}

.side-primary .hint-card,
.side-primary .save-game-card {
  border: 1px solid var(--line);
  border-left: 3px solid var(--role, var(--accent));
  border-radius: 6px;
  background: #0b1017;
}

.stage-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(80px, 1fr));
  gap: 5px;
  margin-bottom: 10px;
}

.stage-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 5px 8px;
  border-color: transparent;
  background: #141b25;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.stage-tab.active {
  border-color: var(--accent);
  background: #12211d;
  color: var(--ink);
}

.stage-tab.complete {
  color: var(--ink);
}

.stage-tab.complete .stage-step-index {
  border-color: var(--accent);
  color: var(--accent);
}

.stage-tab.disabled {
  opacity: 0.38;
}

.stage-step-index {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-size: 10px;
}

.stage-tab.active .stage-step-index {
  border-color: var(--accent);
  background: var(--accent);
  color: #07100b;
}

.phase-focus {
  display: grid;
  min-height: 54px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  background: #0b1017;
  padding: 9px 12px;
}

.phase-focus.pending {
  border-left-color: var(--warn);
}

.phase-focus.complete {
  border-left-color: var(--villager);
}

.phase-focus > div {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 3px 10px;
  align-items: baseline;
  min-width: 0;
}

.phase-focus-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.phase-focus strong {
  font-size: 15px;
  overflow-wrap: anywhere;
}

.phase-focus p {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
}

.stage-view {
  display: none;
}

.stage-view.active {
  display: grid;
  gap: 14px;
}

.stage-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 2px 2px 11px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 5px 11px;
  font-size: 12px;
  white-space: nowrap;
}

.hint,
.muted,
.empty-state {
  color: var(--muted);
}

.setup-controls {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.role-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 10px;
  align-items: start;
}

.setup-details {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 18, 27, 0.74);
}

.setup-details summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  padding: 10px 12px;
}

.setup-details[open] summary {
  border-bottom: 1px solid var(--line);
}

.role-count-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: 8px;
  padding: 10px;
}

.role-count-grid label {
  min-width: 0;
}

.role-summary {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d121b;
  color: var(--muted);
  padding: 10px;
  font-size: 13px;
}

.role-summary.warning {
  border-color: rgba(241, 182, 91, 0.56);
  color: var(--warn);
}

.role-reference {
  display: grid;
  gap: 14px;
}

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

.role-guide-section-head {
  display: grid;
  gap: 5px;
}

.role-guide-section-head p {
  color: var(--muted);
  font-size: 13px;
}

.role-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}

.role-guide-card {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 150px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--role, var(--accent));
  border-radius: 6px;
  background: #0d121a;
  padding: 12px;
}

.role-guide-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.role-guide-title strong {
  overflow-wrap: anywhere;
}

.role-guide-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.role-guide-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-self: end;
}

.role-guide-tags span {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(32, 42, 58, 0.66);
  color: var(--muted);
  padding: 4px 7px;
  font-size: 11px;
  line-height: 1.2;
}

.seat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 9px;
}

.seat-card {
  display: grid;
  align-content: start;
  gap: 7px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--role, var(--line));
  border-radius: 6px;
  background: #0d121a;
  padding: 9px;
}

.seat-card.occupied {
  border-color: var(--line);
  border-left-color: var(--role, var(--accent));
}

.seat-card.empty-seat {
  min-height: 76px;
  border-left-color: var(--line);
  background: rgba(13, 18, 27, 0.62);
  opacity: 0.72;
}

.seat-state {
  font-weight: 700;
}

.seat-card.empty-seat .seat-state {
  color: var(--muted);
}

.seat-name,
.role-select {
  min-height: 36px;
}

.role-select {
  border-color: var(--role, var(--line));
  background: #0a0e14;
  font-weight: 700;
}

.seat-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.seat-topline span {
  border-radius: 4px;
  background: var(--surface-3);
  color: var(--role, var(--accent));
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
}

.queue-box,
.callout,
.player-status-box {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0d121a;
  padding: 13px;
}

.queue-box {
  display: grid;
  gap: 13px;
  padding: 15px;
}

.queue-box-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.queue-box-heading > div {
  display: grid;
  gap: 2px;
}

.queue-box-heading span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.queue-box-heading p {
  color: var(--muted);
  font-size: 12px;
}

.queue-preview {
  min-width: 0;
}

.queue-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.queue-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 58px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--role, var(--accent));
  border-radius: 5px;
  background: #0a0f16;
  padding: 8px 10px 8px 8px;
}

.queue-position {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 4px;
  background: var(--surface-3);
  color: var(--role, var(--accent));
  font-size: 12px;
  font-weight: 800;
}

.queue-player {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.queue-player strong,
.queue-player small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.queue-player small {
  color: var(--text-secondary);
  font-size: 12px;
}

.callout {
  display: grid;
  gap: 6px;
  border-left: 3px solid var(--accent);
}

.callout p,
.summary-list p {
  color: var(--muted);
}

.morning-heading {
  padding-top: 4px;
}

.morning-heading h2 {
  font-size: 24px;
}

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

.shift-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  min-height: 154px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--role, var(--accent));
  border-radius: 6px;
  background: #0c1118;
  padding: 14px;
}

.shift-card span {
  color: var(--role, var(--accent));
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.shift-card > strong {
  font-size: 18px;
}

.shift-card small {
  color: var(--text-secondary);
  font-size: 13px;
}

.shift-card label {
  font-size: 13px;
}

.shift-card .dish-input {
  min-height: 44px;
  margin-top: 2px;
  font-size: 15px;
}

.morning-briefs:empty {
  display: none;
}

.morning-service {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0b1017;
  overflow: hidden;
}

.morning-service > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  border-bottom: 1px solid var(--line);
  background: #111821;
  padding: 10px 14px;
}

.morning-service > header > div {
  display: grid;
  gap: 2px;
}

.morning-service > header span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.morning-service > header h3 {
  font-size: 17px;
}

.morning-brief-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  background: #0b1017;
}

.morning-brief {
  display: grid;
  align-content: start;
  gap: 12px;
  border-left: 3px solid var(--role, var(--accent));
  background: #0d121a;
  padding: 14px;
}

.morning-brief-heading {
  display: flex;
  align-items: center;
  gap: 9px;
}

.morning-brief-heading > div {
  display: grid;
  gap: 2px;
}

.morning-brief-heading h3 {
  font-size: 16px;
}

.morning-brief-heading span:not(.role-dot),
.morning-brief > small {
  color: var(--muted);
  font-size: 12px;
}

.evil-roster {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-block: 1px solid var(--line);
  padding-block: 10px;
}

.evil-roster section {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding-inline: 10px;
}

.evil-roster section:first-child {
  padding-left: 0;
}

.evil-roster section + section {
  border-left: 1px solid var(--line);
}

.evil-roster span {
  color: var(--danger);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.evil-roster strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
}

.private-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

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

.gourmand-progress-item {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.gourmand-progress-head,
.gourmand-progress-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.gourmand-progress-head > div {
  display: grid;
  gap: 2px;
}

.gourmand-progress-head > div > strong {
  font-size: 15px;
}

.gourmand-progress-head > div > span {
  color: var(--muted);
  font-size: 12px;
}

.gourmand-progress-score {
  color: var(--warn);
  font-size: 25px;
  line-height: 1;
}

.gourmand-progress-score span {
  color: var(--muted);
  font-size: 14px;
}

.gourmand-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
}

.gourmand-progress-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--warn);
}

.gourmand-progress-item.completed .gourmand-progress-track > span {
  background: var(--accent);
}

.gourmand-progress-status {
  color: var(--muted);
  font-size: 12px;
}

.gourmand-progress-status .done {
  color: var(--accent);
  font-weight: 700;
}

@media (min-width: 1600px) {
  .app-shell {
    padding: 14px;
  }

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

  .stage-panel {
    padding: 18px;
  }

  .stage-view.active {
    gap: 16px;
  }

  .stage-tab {
    min-height: 40px;
    font-size: 13px;
  }

  .phase-focus {
    min-height: 52px;
    padding: 9px 12px;
  }

  .phase-focus strong {
    font-size: 15px;
  }

  .phase-focus p {
    font-size: 12px;
  }

  .morning-heading h2 {
    font-size: 28px;
  }

  .shift-card {
    min-height: 172px;
    padding: 16px;
  }

  .shift-card span {
    font-size: 12px;
  }

  .shift-card > strong {
    font-size: 20px;
  }

  .shift-card small,
  .shift-card label {
    font-size: 14px;
  }

  .shift-card .dish-input {
    min-height: 48px;
    font-size: 16px;
  }

  .morning-service > header {
    min-height: 64px;
    padding: 12px 16px;
  }

  .morning-service > header h3 {
    font-size: 19px;
  }

  .morning-brief {
    padding: 16px;
  }

  .morning-brief-heading h3 {
    font-size: 18px;
  }

  .evil-roster strong {
    font-size: 14px;
  }

  .morning-brief-heading span:not(.role-dot),
  .morning-brief > small,
  .gourmand-progress-status {
    font-size: 13px;
  }

  .gourmand-progress-head > div > strong {
    font-size: 17px;
  }

  .gourmand-progress-head > div > span {
    font-size: 13px;
  }

  .gourmand-progress-score {
    font-size: 29px;
  }
}

.night-stack {
  display: grid;
  gap: 10px;
}

.night-order-guide {
  min-width: 0;
}

.night-order-card {
  display: grid;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0c1118;
  padding: 12px;
}

.night-order-head {
  display: flex;
  gap: 12px;
  align-items: start;
  justify-content: space-between;
}

.night-order-head h3 {
  margin-bottom: 2px;
}

.night-order-head p {
  font-size: 12px;
}

.night-order-progress {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.night-order-list {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin: 0;
  padding: 0 0 3px;
  list-style: none;
  scrollbar-width: thin;
}

.night-order-list li {
  flex: 1 0 132px;
  min-width: 0;
}

.night-order-step {
  width: 100%;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  min-height: 50px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--role, var(--line));
  border-radius: 5px;
  background: #111821;
  padding: 6px 7px;
  text-align: left;
}

.night-order-step.inactive,
.night-order-step.optional {
  opacity: 0.58;
}

.night-order-step.pending {
  border-color: var(--line-strong);
}

.night-order-step.complete {
  border-color: var(--line);
}

.night-order-step.current {
  border-color: var(--warn);
  background: #171b20;
}

.night-order-index {
  display: grid;
  min-width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 800;
}

.night-order-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.night-order-copy strong,
.night-order-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.night-order-copy strong {
  font-size: 12px;
}

.night-order-copy small {
  color: var(--muted);
  font-size: 10px;
}

.ability-stack {
  display: grid;
  gap: 12px;
}

.night-block {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--role, var(--accent));
  border-radius: 6px;
  background: #0c1118;
  padding: 13px;
}

.ability-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--role, var(--accent));
  border-radius: 6px;
  background: #0c1118;
  padding: 13px;
}

.ability-card.inactive {
  opacity: 0.58;
}

.night-block.action-pending,
.ability-card.action-pending {
  border-color: var(--line-strong);
  border-left-color: var(--warn);
}

.night-block.action-complete,
.ability-card.action-complete {
  border-color: var(--line);
  border-left-color: var(--accent);
}

.night-action-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 4px 10px;
  align-items: center;
}

.night-action-heading p {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  color: var(--text-secondary);
  padding-top: 9px;
  font-size: 14px;
  line-height: 1.45;
}

.action-state {
  justify-self: end;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.action-state.pending {
  border-color: rgba(241, 182, 91, 0.58);
  color: var(--warn);
}

.action-state.complete {
  border-color: rgba(114, 211, 155, 0.4);
  color: var(--accent);
}

.ability-card h3 {
  margin: 0;
}

.ability-card > div:first-child {
  display: grid;
  gap: 6px;
}

.ability-card > div:first-child p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.45;
}

.save-game-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-left: 4px solid var(--role, var(--accent));
  border-radius: 6px;
  background: #0c1118;
  margin-bottom: 12px;
  padding: 12px;
}

.save-game-card p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.save-game-status {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
}

.save-game-status.success {
  color: var(--accent);
}

.save-game-status.error {
  color: var(--danger);
}

.ability-card .switch-control {
  justify-content: start;
  border-radius: 6px;
}

.allergic-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 10px;
  align-items: end;
}

.allergic-action-buttons {
  display: flex;
  gap: 7px;
}

.allergic-mark-note {
  color: var(--warn);
  font-size: 12px;
}

.allergic-mark-note.confirmed {
  color: var(--accent);
}

.night-block.inactive {
  opacity: 0.58;
}

.night-block.inactive h3,
.night-block.inactive p {
  color: var(--muted);
}

.night-block h3 {
  margin: 0;
}

.night-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.night-grid.single {
  grid-template-columns: minmax(0, 1fr);
}

.night-briefing {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(241, 182, 91, 0.42);
  border-left: 4px solid var(--warn);
  border-radius: 6px;
  background: #11130f;
  padding: 13px;
}

.night-briefing.complete {
  border-color: var(--line);
  border-left-color: var(--accent);
  background: #0c1118;
}

.night-briefing-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.night-briefing-heading > div {
  display: grid;
  gap: 2px;
}

.night-briefing-heading div > span {
  color: var(--warn);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.night-briefing-heading h3 {
  font-size: 16px;
}

.night-briefing > p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.45;
}

.night-legend-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.night-legend-list li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--role, var(--villager));
  border-radius: 4px;
  background: #0a0f16;
  padding: 6px 8px;
}

.night-legend-list li > span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 4px;
  background: var(--surface-3);
  color: var(--role, var(--muted));
  font-size: 10px;
  font-weight: 800;
}

.night-legend-list strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.night-briefing > button {
  justify-self: start;
}

.role-ready-reports {
  display: grid;
  gap: 8px;
  border-top: 1px solid rgba(241, 182, 91, 0.32);
  padding-top: 11px;
}

.role-ready-reports > strong {
  color: var(--warn);
}

.role-ready-reports button {
  justify-self: start;
}

.role-report-item {
  display: grid;
  gap: 5px;
  padding: 9px 0 11px;
  border-bottom: 1px solid var(--line);
}

.role-report-item:last-child {
  border-bottom: 0;
}

.role-report-item > strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
}

.role-report-round {
  color: var(--warn);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.role-report-gm-note {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px;
  border-left: 2px solid var(--accent);
  padding-left: 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.role-report-gm-note > span {
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.hidden {
  display: none;
}

.meal-list {
  display: grid;
  gap: 9px;
}

.meal-menu {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  background: #0b1017;
  padding: 11px 13px;
}

.meal-menu > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.meal-menu > strong {
  color: var(--ink);
  font-size: 15px;
}

.meal-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(190px, 260px);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--role, var(--accent));
  border-radius: 6px;
  background: #0c1118;
  padding: 10px;
}

.meal-row div {
  display: grid;
  gap: 3px;
}

.meal-row strong {
  color: var(--ink);
  font-size: 15px;
}

.meal-row span {
  color: var(--muted);
  font-size: 12px;
}

.switch-control {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0a0e14;
  color: var(--ink);
  padding: 6px 12px;
  font-size: 13px;
}

.switch-control input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.output-box {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-height: 150px;
}

.result-section {
  display: grid;
  align-content: start;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0c1118;
  padding: 14px;
}

.result-section.result-public {
  grid-column: 1 / -1;
  border-top: 3px solid var(--villager);
  background: #0d141b;
}

.result-section.result-private {
  border-top: 3px solid var(--inspector);
}

.result-section.result-internal {
  border-top: 3px solid var(--herbalist);
}

.result-section > header,
.result-goal > header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.result-section > header > div,
.result-goal > header > div {
  display: grid;
  gap: 2px;
}

.result-section h3,
.result-goal h3 {
  color: var(--ink);
  font-size: 16px;
}

.result-section header p,
.result-goal header p {
  color: var(--muted);
  font-size: 12px;
}

.result-section ul {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.result-section li {
  border-top: 1px solid var(--line);
  color: var(--text-secondary);
  padding: 10px 0;
  font-size: 14px;
  line-height: 1.45;
}

.result-section li:last-child {
  padding-bottom: 0;
}

.result-goal {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--warn);
  border-radius: 6px;
  background: #0c1118;
  padding: 14px;
}

.summary-list {
  display: grid;
  gap: 9px;
  margin-top: 10px;
}

.pending-report-list {
  display: grid;
  gap: 8px;
}

.banish-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(320px, 1.35fr);
  align-items: end;
  gap: 12px;
  border: 1px solid rgba(255, 123, 114, 0.38);
  border-left: 4px solid var(--role, var(--danger));
  border-radius: 6px;
  background: #0d121a;
  padding: 13px;
}

.banish-panel > div:first-child {
  display: grid;
  gap: 5px;
}

.banish-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: end;
  gap: 10px;
}

.player-status-box {
  display: grid;
  gap: 10px;
}

.player-status-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 8px;
}

.player-status-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--role, var(--accent));
  border-radius: 6px;
  background: #0c1118;
  padding: 10px;
}

.player-status-row.dead {
  opacity: 0.68;
}

.player-status-row.selected-banish {
  border-color: rgba(255, 123, 114, 0.62);
}

.player-status-row.selected-banish [data-banish-player],
.player-status-row.selected-extra [data-extra-elimination] {
  border-color: #6b2b33;
  background: var(--danger-bg);
  color: var(--danger);
}

.player-status-row.selected-extra {
  border-color: rgba(255, 184, 108, 0.62);
}

.player-status-row > div:first-child {
  display: grid;
  gap: 3px;
}

.player-status-actions {
  display: grid;
  grid-auto-flow: column;
  gap: 6px;
}

.player-status-actions button {
  min-width: 72px;
  padding-inline: 10px;
}

.player-status-row span {
  color: var(--muted);
  font-size: 12px;
}

.hint-grid {
  display: grid;
  gap: 9px;
}

.compact-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--line);
}

.compact-metric {
  display: grid;
  gap: 2px;
  min-width: 0;
  background: #0d121b;
  padding: 8px;
}

.compact-metric > span,
.compact-metric small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-metric strong {
  font-size: 17px;
}

.evil-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.next-action {
  display: grid;
  gap: 3px;
  margin-top: 10px;
  border-left: 3px solid var(--accent);
  background: #0b1017;
  padding: 9px 10px;
}

.next-action.pending {
  border-left-color: var(--warn);
}

.next-action.complete {
  border-left-color: var(--villager);
}

.next-action > span,
.next-action small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.next-action strong {
  font-size: 13px;
}

.legend-memo {
  display: grid;
  gap: 11px;
}

.legend-memo-heading {
  display: flex;
  align-items: center;
  gap: 9px;
}

.legend-memo-heading > div {
  display: grid;
  gap: 2px;
}

.legend-memo-heading p,
.legend-instruction {
  color: var(--muted);
  font-size: 11px;
}

.legend-role-list {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.legend-role-list li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 34px;
  border-left: 3px solid var(--role, var(--villager));
  border: 1px solid var(--line);
  border-left: 3px solid var(--role, var(--villager));
  border-radius: 4px;
  background: #0c1118;
  padding: 5px 8px;
}

.legend-role-list li > span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 4px;
  background: var(--surface-3);
  color: var(--role, var(--muted));
  font-size: 10px;
  font-weight: 800;
}

.legend-role-list strong {
  font-size: 12px;
}

.hint-card {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0c1118;
  padding: 10px;
}

.hint-card > .role-dot {
  margin-top: 5px;
}

.hint-card > div {
  display: grid;
  gap: 3px;
}

.hint-card-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.hint-card strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
}

.hint-card small {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
}

.round-log {
  display: grid;
  gap: 9px;
  max-height: 520px;
  overflow: auto;
  margin-top: 10px;
}

.log-entry {
  display: grid;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.log-entry:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.log-head {
  display: grid;
  gap: 4px;
}

.log-head span {
  color: var(--muted);
  font-size: 12px;
}

.log-entry summary {
  color: var(--accent);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.log-entry details[open] summary {
  margin-bottom: 8px;
}

@media (max-width: 1160px) {
  .app-layout {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-height: none;
    overflow: visible;
  }

  .side-primary {
    grid-column: 1 / -1;
  }
}

@media (max-width: 880px) {
  .auth-shell {
    grid-template-columns: minmax(0, 520px);
    gap: 28px;
    padding: 28px 18px;
  }

  .auth-brand h1 {
    font-size: 28px;
  }

  .app-header,
  .stage-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .app-tabs,
  .header-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .setup-controls,
  .role-controls,
  .allergic-action-row,
  .seat-grid,
  .shift-grid,
  .night-grid,
  .player-status-list,
  .side-panel {
    grid-template-columns: 1fr;
  }

  .stage-tabs {
    display: flex;
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .stage-heading .status-pill {
    align-self: flex-start;
  }

  .stage-tab {
    flex: 0 0 118px;
  }

  .phase-focus > div {
    grid-template-columns: 1fr;
  }

  .phase-focus p {
    grid-column: 1;
  }

  .output-box {
    grid-template-columns: 1fr;
  }

  .result-section.result-public,
  .result-goal {
    grid-column: 1;
  }

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

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

  .admin-user-row,
  .admin-row {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .auth-shell {
    align-items: start;
    padding: 20px 10px;
  }

  .auth-card {
    min-height: 0;
    padding: 18px;
  }

  .admin-panel {
    padding: 10px;
  }

  .admin-view-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .game-lock-banner {
    position: static;
    align-items: stretch;
    flex-direction: column;
  }

  .app-shell {
    padding: 7px;
  }

  .app-header {
    position: static;
    padding: 9px;
  }

  .brand-lockup {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .header-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sync-status {
    grid-column: 1 / -1;
    text-align: left;
  }

  .header-actions button {
    min-width: 0;
    padding-inline: 5px;
  }

  .stage-panel,
  .roles-panel {
    padding: 10px;
  }

  .queue-box-heading,
  .night-briefing-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .queue-list,
  .night-legend-list,
  .evil-roster {
    grid-template-columns: 1fr;
  }

  .evil-roster section {
    padding: 8px 0;
  }

  .evil-roster section + section {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .night-order-head {
    align-items: stretch;
    flex-direction: column;
  }

  .night-action-heading {
    grid-template-columns: 1fr;
  }

  .night-action-heading p {
    grid-column: 1;
  }

  .action-state {
    justify-self: start;
  }
}
