:root {
  --bg: #ebecee;
  --surface: #f7f7f8;
  --card: #ffffff;
  --line: #d9dce1;
  --text: #24262b;
  --muted: #8f939d;
  --pill: #e4e6ea;
  --pill-blue: #8cb8eb;
  --pill-red: #efc0c0;
  --accent: #5f6775;
  --shadow: 0 20px 50px rgba(40, 45, 55, 0.08);
  --overlay-backdrop: rgba(24, 29, 37, 0.5);
  --app-page-padding: clamp(12px, 3vw, 20px);
  --app-chrome-offset: 0px;
  --app-device-safe-area-top: 0px;
  --app-device-safe-area-right: 0px;
  --app-device-safe-area-bottom: 0px;
  --app-device-safe-area-left: 0px;
  --app-bottom-gesture-buffer: 0px;
  --app-safe-area-top: max(var(--app-device-safe-area-top), env(safe-area-inset-top, 0px));
  --app-safe-area-right: max(var(--app-device-safe-area-right), env(safe-area-inset-right, 0px));
  --app-safe-area-bottom: max(var(--app-device-safe-area-bottom), env(safe-area-inset-bottom, 0px));
  --app-safe-area-left: max(var(--app-device-safe-area-left), env(safe-area-inset-left, 0px));
  --ui-screen-text-scale: 1;
  --ui-button-text-scale: 1;
  --ui-player-card-text-scale: 1;
  --ui-hint-text-scale: 1;
  --ui-modal-text-scale: 1;
  --ui-mechanic-icon-scale: 1;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.9), transparent 24%),
    linear-gradient(180deg, #eef0f3 0%, #e4e7ec 100%);
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

input,
textarea,
select,
[contenteditable="true"],
[contenteditable="plaintext-only"] {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

.hidden {
  display: none !important;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
input,
textarea,
select {
  border-radius: 5px;
}

button {
  border: 0;
  cursor: pointer;
  color: var(--text);
  background: var(--pill);
  padding: 0.82rem 1rem;
  font-size: calc(1em * var(--ui-button-text-scale));
  transition: transform 140ms ease, opacity 140ms ease, background 140ms ease;
}

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

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fafafb;
  color: var(--text);
  padding: 0.78rem 1rem;
}

textarea {
  resize: vertical;
}

label {
  display: grid;
  gap: 0.4rem;
}

.password-input-with-toggle {
  position: relative;
  width: 100%;
}

.password-input-with-toggle input {
  padding-right: 3.2rem;
}

.player-modal-password-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
}

.player-modal-password-row > input,
.player-modal-password-row > .password-input-with-toggle {
  flex: 1 1 auto;
  min-width: 0;
}

.player-modal-password-row > button {
  flex: 0 0 auto;
}

.password-visibility-toggle {
  position: absolute;
  top: 50%;
  right: 0.45rem;
  transform: translateY(-50%);
  min-width: 2.2rem;
  min-height: 2.2rem;
  padding: 0.2rem;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  opacity: 0.9;
}

.password-visibility-toggle:hover {
  transform: translateY(-50%);
  background: rgba(95, 103, 117, 0.08);
}

.password-visibility-toggle[aria-pressed="true"] {
  color: var(--text);
  background: rgba(95, 103, 117, 0.12);
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
}

.password-generate-inline-button {
  flex: 0 0 auto;
  min-height: 2rem;
  padding: 0.32rem 0.8rem;
  font-size: 0.82rem;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.55rem;
  width: 100%;
}

.checkbox-row input {
  flex: 0 0 auto;
  margin-top: 0.18rem;
}

.checkbox-row input[type="checkbox"] {
  width: auto;
  min-width: 0;
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  align-self: flex-start;
}

.checkbox-row span {
  flex: 1 1 auto;
  min-width: 0;
}

.nested-checkbox-group {
  gap: 0.7rem;
  margin-left: 1.5rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid #d3d8e0;
  border-radius: 10px;
  background: #e9edf3;
}

.checkbox-row-action {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}

.checkbox-row-action > .checkbox-row {
  flex: 1 1 auto;
}

.checkbox-row-action > .role-mechanic-info-button {
  flex: 0 0 auto;
}

.game-type-threshold-row {
  align-items: center;
  margin-top: -0.25rem;
  padding-left: 1.55rem;
}

.game-type-threshold-row > input[type="number"] {
  flex: 0 0 90px;
  width: 90px;
  min-width: 90px;
}

.game-type-threshold-row.muted {
  opacity: 0.6;
}

@media (max-width: 640px) {
  .game-type-threshold-row {
    align-items: stretch;
    flex-wrap: wrap;
    padding-left: 0;
  }

  .game-type-threshold-row > input[type="number"] {
    flex-basis: 100%;
    width: 100%;
    min-width: 0;
  }

  .game-board-sanction-group.is-emphasized {
    border-width: 1.5px;
  }
}

.round-day-min-nominations-field {
  max-width: 260px;
}

.layout {
  display: block;
  min-height: 100vh;
  min-height: 100dvh;
}

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

.label,
.screen-label {
  margin-bottom: 0.45rem;
  font-size: calc(0.76rem * var(--ui-screen-text-scale));
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.screen-label {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.screen-label-text {
  flex: 1 1 auto;
  min-width: 0;
}

.screen-label-runtime-indicator {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  min-height: 1.5rem;
  padding: 0.12rem 0.65rem;
  border-radius: 999px;
  background: rgba(95, 103, 117, 0.12);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: none;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.screen-label-runtime-indicator-text {
  display: inline-flex;
  align-items: center;
}

.screen-label-runtime-indicator-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.95rem;
  height: 0.95rem;
  color: rgba(95, 103, 117, 0.55);
  transform-origin: center;
  transition: color 180ms ease, opacity 180ms ease;
}

.screen-label-runtime-indicator-icon::before {
  content: "⟳";
  display: block;
  font-size: 0.86rem;
  line-height: 1;
}

.screen-label-runtime-indicator.is-active {
  background: rgba(135, 169, 215, 0.16);
  color: #6d87a6;
}

.screen-label-runtime-indicator.is-active .screen-label-runtime-indicator-icon {
  color: #8bb0dc;
  animation: screen-label-runtime-sync-spin 0.95s linear infinite;
}

.screen-label-runtime-indicator-icon {
  color: transparent;
  transition: opacity 180ms ease, transform 180ms ease;
}

.screen-label-runtime-indicator-icon::before {
  content: "";
  display: block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: rgba(95, 103, 117, 0.55);
}

.screen-label-runtime-indicator.is-active .screen-label-runtime-indicator-icon::before {
  background: #8bb0dc;
}

@keyframes screen-label-runtime-sync-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.muted {
  color: var(--muted);
  font-size: calc(1em * var(--ui-hint-text-scale));
}

.stage-screen-switcher .soft.active {
  background: #cfd7e6;
}

.desk-card {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(160, 166, 177, 0.18);
  box-shadow: var(--shadow);
}

.workspace {
  height: 100vh;
  height: 100dvh;
  padding: max(var(--app-chrome-offset), var(--app-safe-area-top)) 0 0;
  position: relative;
  overflow: hidden;
}

.stage-screen-switcher {
  display: flex;
  gap: 0.7rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.view {
  display: none;
  gap: 1.2rem;
  height: 100%;
  overflow: hidden;
}

.view.active {
  display: grid;
}

[data-view="dashboard"] > .desk-grid,
[data-view="dashboard"] > .desk-card {
  display: none;
}

.view[data-view="players"],
.view[data-view="game-stages"],
.view[data-view="global-settings"],
.view[data-view="user-profile"],
.view[data-view="club-management"],
.view[data-view="club-management-players"],
.view[data-view="club-admin"],
.view[data-view="club-game-announcements"],
.view[data-view="club-chat"],
.view[data-view="player-game-announcements"],
.view[data-view="game-archive"],
.view[data-view="base-mechanics-settings"],
.view[data-view="achievements-points-settings"],
.view[data-view="player-performance-math-settings"] {
  align-content: start;
  grid-auto-rows: max-content;
  overflow: auto;
  padding: var(--app-page-padding);
}

.view[data-view="game-stages"],
.view[data-view="base-mechanics-settings"],
.view[data-view="achievements-points-settings"],
.view[data-view="player-performance-math-settings"],
.view[data-view="club-management-players"],
.view[data-view="game-archive"] {
  position: relative;
}

.view[data-view="game-archive"] {
  padding: 0;
  overflow: hidden;
  align-content: stretch;
  grid-auto-rows: minmax(0, 1fr);
  min-height: 0;
}

.view[data-view="game-archive"] > .mobile-screen,
.view[data-view="game-statistics"] > .mobile-screen {
  height: 100%;
  min-height: 0;
}

.detail-view-close-bar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  justify-content: flex-end;
  margin: calc(-1 * var(--app-page-padding)) calc(-1 * var(--app-page-padding)) 0;
  padding: 0;
  pointer-events: none;
}

.detail-view-close-button {
  pointer-events: auto;
  min-width: 108px;
  padding: 0.76rem 1rem;
  border-radius: 0 0 0 16px;
  background: rgba(228, 230, 234, 0.96);
  box-shadow: 0 12px 24px rgba(40, 45, 55, 0.12);
}

.game-type-subview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.game-type-subview-actions > .soft {
  flex: 1 1 220px;
}

.view[data-view="base-mechanics-settings"] > * {
  min-width: 0;
}

.view[data-view="base-mechanics-settings"] .desk-card,
.view[data-view="achievements-points-settings"] .desk-card,
.view[data-view="player-performance-math-settings"] .desk-card {
  min-width: 0;
}

.achievements-points-layout {
  align-items: start;
}

.achievements-points-list-card,
.achievements-points-editor-card {
  min-width: 0;
}

.achievements-points-editor-card {
  display: grid;
  align-content: start;
  gap: 1rem;
}

.player-performance-math-model-card {
  margin-top: 0.9rem;
}

.constructor-preset-actions {
  justify-content: flex-start;
  margin: 0.75rem 0 0.5rem;
}

.player-performance-math-model-grid {
  margin-top: 0.85rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.7rem;
  align-items: end;
}

.player-performance-math-model-grid-compact {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.player-performance-math-extra-block {
  margin-top: 0.9rem;
}

.achievement-editor-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.9rem;
  margin: -1.4rem -1.4rem 0;
  padding: 0.95rem 1.4rem 0;
  min-width: 0;
}

.achievement-editor-toolbar > * {
  min-width: 0;
}

.achievement-editor-current {
  min-width: 0;
  padding-top: 0.35rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.35;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.achievement-editor-toolbar .soft {
  flex: 0 0 auto;
  max-width: 100%;
}

.start-screen-auth-mode-switch {
  margin-bottom: 1rem;
}

.inline-compact-button {
  align-self: flex-start;
}

.player-profile-stats-grid {
  align-items: start;
}

.player-profile-summary-grid .mini-card {
  display: grid;
  gap: 0.28rem;
  min-height: 72px;
}

#start-screen-player-dashboard-summary {
  gap: 0.85rem;
}

.player-dashboard-auth-summary {
  display: grid;
  gap: 0.35rem;
}

.player-dashboard-auth-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
}

.player-dashboard-summary-card {
  display: grid;
  gap: 0.7rem;
}

.player-dashboard-summary-list {
  display: grid;
  gap: 0.6rem;
}

.player-dashboard-summary-item {
  display: grid;
  gap: 0.18rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid #e3e8f1;
  border-radius: 16px;
  background: #fff;
}

.player-dashboard-rating-grid {
  display: grid;
  gap: 0.45rem;
}

.player-profile-password-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.player-profile-password-row > .password-input-with-toggle {
  flex: 1 1 240px;
  min-width: 0;
}

.player-profile-password-row > button {
  flex: 0 0 auto;
}

.player-profile-bottom-row {
  align-items: stretch;
}

.player-profile-bottom-row > button {
  flex: 1 1 0;
  min-width: 0;
}

.player-portal-edit-block {
  gap: 0.55rem;
}

.player-performance-field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
}

.achievements-rule-list {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.75rem;
}

.achievement-rule-list-filters {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 0.75rem;
}

.player-statistics-rebuild-banner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.player-statistics-rebuild-banner-copy {
  display: grid;
  gap: 0.45rem;
}

.player-statistics-rebuild-banner.dirty {
  border-left: 4px solid #d67b2f;
  padding-left: 0.9rem;
}

.player-statistics-rebuild-banner.running {
  border-left: 4px solid #2f5fa9;
  padding-left: 0.9rem;
}

.player-statistics-rebuild-banner.clean {
  border-left: 4px solid #5b7d56;
  padding-left: 0.9rem;
}

.player-statistics-rebuild-banner-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

.player-statistics-rebuild-progress {
  position: relative;
  width: min(420px, 100%);
  height: 0.6rem;
  border-radius: 999px;
  background: rgba(47, 95, 169, 0.14);
  overflow: hidden;
}

.player-statistics-rebuild-progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4e7cc6 0%, #2f5fa9 100%);
  transition: width 180ms ease;
}

.achievement-rule-active-list,
.achievement-rule-archive-block {
  display: grid;
  gap: 0.55rem;
}

.achievement-rule-list-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.45rem;
  align-items: stretch;
}

.achievement-rule-list-row.archived {
  grid-template-columns: minmax(0, 1fr) auto;
}

.achievement-rule-list-row.with-side-actions {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.achievement-rule-list-row.sorting {
  opacity: 0.78;
}

.achievement-rule-sort-handle {
  min-width: 2.6rem;
  padding-inline: 0.6rem;
}

.achievement-rule-list-item {
  display: grid;
  gap: 0.25rem;
  width: 100%;
  text-align: left;
}

.achievement-rule-list-item.active {
  background: #cfd7e6;
}

.achievement-rule-list-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.achievement-rule-list-item-title {
  font-weight: 600;
}

.achievement-rule-list-item-meta {
  color: var(--muted);
  font-size: 0.82rem;
}

.achievement-rule-side-actions {
  display: grid;
  align-content: start;
  gap: 0.35rem;
}

.achievement-rule-side-actions .compact-action-button {
  min-width: 2.45rem;
  min-height: 2.15rem;
  padding-inline: 0.45rem;
}

.achievement-rule-primary-meta {
  margin-right: 0.35rem;
}

#achievement-rule-pagination.hidden {
  display: none;
}

.player-performance-rule-list-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.player-performance-rule-side-actions {
  display: grid;
  align-content: start;
  gap: 0.35rem;
}

.player-performance-rule-side-actions .compact-action-button {
  min-width: 2.45rem;
  min-height: 2.15rem;
  padding-inline: 0.45rem;
}

.player-performance-rule-influence-label {
  margin-right: 0.35rem;
}

.achievement-rule-editor {
  display: grid;
  gap: 1rem;
}

.achievement-rule-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  gap: 0.8rem;
}

@media (max-width: 900px) {
  .achievement-rule-list-filters {
    grid-template-columns: minmax(0, 1fr);
  }

  .player-statistics-rebuild-banner {
    flex-direction: column;
  }

  .player-statistics-rebuild-banner-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

.achievement-rule-mode-grid,
.achievement-rule-condition-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.achievement-rule-condition-card {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f5f6f8;
}

.achievement-rule-condition-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.achievement-rule-condition-head h3 {
  margin: 0;
}

.achievement-rule-condition-inline-pair {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.8rem;
  align-items: start;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
}

.achievement-rule-condition-round-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.achievement-rule-condition-inline-pair label,
.achievement-rule-condition-inline-pair .achievement-rule-static-field {
  align-self: start;
}

.achievement-rule-condition-inline-pair select[multiple]:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.achievement-rule-inline-note {
  color: var(--muted);
  font-size: 0.85rem;
}

.achievement-rule-static-field {
  display: grid;
  gap: 0.35rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
}

@media (max-width: 900px) {
  .achievements-points-layout {
    grid-template-columns: 1fr;
  }

  .player-performance-math-model-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .player-performance-math-model-grid-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .player-performance-math-model-grid,
  .player-performance-math-model-grid-compact,
  .achievement-rule-grid,
  .achievement-rule-mode-grid,
  .achievement-rule-condition-grid {
    grid-template-columns: 1fr;
  }

  .achievement-rule-condition-inline-pair,
  .achievement-rule-condition-round-row {
    grid-template-columns: 1fr;
  }

  .achievement-editor-toolbar {
    grid-template-columns: 1fr;
    margin: 0;
    padding: 0;
  }

  .achievement-editor-current {
    white-space: normal;
    padding-top: 0;
  }

  .app-appearance-settings-row {
    grid-template-columns: 1fr;
  }

  .app-appearance-settings-stepper {
    justify-self: stretch;
  }
}

.base-mechanics-intro-copy {
  display: grid;
  gap: 0.55rem;
  max-width: 58rem;
}

.base-mechanics-intro-copy p {
  margin: 0;
}

.desk-card {
  border-radius: 30px;
  padding: 1.4rem;
  font-size: calc(1rem * var(--ui-screen-text-scale));
}

.desk-grid {
  display: grid;
  gap: 1.2rem;
}

.desk-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-hero,
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.provider-row,
.bottom-row {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.provider.active {
  background: #d7e2f1;
}

.form-card,
.stack {
  display: grid;
  gap: 0.9rem;
}

.mobile-screen {
  width: 100%;
  max-width: none;
  min-height: 0;
  height: 100%;
  background: #f4f4f5;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-size: calc(1rem * var(--ui-screen-text-scale));
}

.game-mobile-screen {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto auto;
  gap: 0;
}

.mobile-screen::before {
  display: none;
}

.mobile-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
  margin-top: 0;
  padding:
    0.7rem
    max(var(--app-page-padding), var(--app-safe-area-right))
    0.5rem
    max(var(--app-page-padding), var(--app-safe-area-left));
  background: rgba(244, 244, 245, 0.96);
  border-bottom: 1px solid rgba(160, 166, 177, 0.18);
}

.mobile-header.compact {
  margin-bottom: 0;
}

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

.game-topbar > div:first-child {
  min-width: 0;
  flex: 1 1 auto;
}

.game-topbar .screen-label {
  margin-bottom: 0.12rem;
}

.game-topbar .head-actions {
  margin-left: auto;
  align-self: flex-start;
}

.game-stage-copy {
  display: grid;
  gap: 0.2rem;
  align-content: start;
  min-height: 0;
  padding:
    0.45rem
    max(var(--app-page-padding), var(--app-safe-area-right))
    0.42rem
    max(var(--app-page-padding), var(--app-safe-area-left));
  background: rgba(244, 244, 245, 0.96);
  border-bottom: 1px solid rgba(160, 166, 177, 0.18);
}

.game-stage-copy h2 {
  margin: 0;
  font-size: 1.5rem;
}

.game-stage-copy .muted {
  margin: 0;
}

.game-host-hints {
  display: grid;
  gap: 0.35rem;
  align-content: start;
}

.game-host-hints-title {
  margin: 0;
  font-size: calc(0.72rem * var(--ui-hint-text-scale));
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.game-host-hints-list {
  display: grid;
  gap: 0.35rem;
  align-content: start;
}

.game-host-hint-card {
  padding: 0.48rem 0.6rem;
  border: 1px solid #d9e1ef;
  border-radius: 5px;
  background: #f6f9ff;
  color: #344054;
  font-size: calc(0.86rem * var(--ui-hint-text-scale));
  line-height: 1.3;
}

.game-host-hint-card.warning {
  border-color: #e3c07a;
  background: #fff5e1;
  color: #7a5510;
}

.game-stage-log-space {
  min-height: 0;
}

.game-log-summary-strip {
  display: none !important;
}

.game-log-summary-head {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.game-log-summary-list {
  display: grid;
  gap: 0.35rem;
  align-content: start;
}

.mobile-header h2 {
  font-size: calc(0.9rem * var(--ui-screen-text-scale));
  margin-bottom: 0;
  line-height: 1.25;
}

.icon-button {
  width: 38px;
  height: 38px;
  border-radius: 5px;
  padding: 0;
  background: #dedfe3;
}

.session-pill,
.game-info,
.create-player-sheet,
.quick-add {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 22px;
  border: 1px solid rgba(160, 166, 177, 0.18);
}

.session-pill,
.game-info {
  padding: 0.85rem 0.95rem;
  margin-top: 0.9rem;
}

.mobile-stage {
  min-height: 360px;
  padding: 0.95rem var(--app-page-padding) 0.85rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.mobile-stage.short {
  min-height: 0;
}

.start-screen-stage {
  display: grid;
  align-content: start;
  gap: 0.9rem;
}

.start-screen-operator-panel,
.start-screen-primary-card,
.start-screen-news-card,
.start-screen-setup-card {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(160, 166, 177, 0.18);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: var(--shadow);
}

.start-screen-operator-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  background: #f9fafb;
}

.start-screen-operator-main {
  display: grid;
  gap: 0.16rem;
  min-width: 0;
}

.start-screen-operator-main p,
.start-screen-primary-copy p {
  margin: 0;
}

.start-screen-operator-main strong,
.start-screen-primary-copy h3 {
  min-width: 0;
  overflow-wrap: anywhere;
}

.start-screen-status-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
  min-width: 0;
}

.start-screen-status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.85rem;
  max-width: 100%;
  padding: 0.28rem 0.58rem;
  border: 1px solid #d7dce5;
  border-radius: 999px;
  background: #eef1f5;
  color: #4d5562;
  font-size: calc(0.78rem * var(--ui-hint-text-scale));
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.start-screen-status-chip.is-online {
  border-color: #b8d3bf;
  background: #edf8ef;
  color: #375d3f;
}

.start-screen-status-chip.is-offline,
.start-screen-status-chip.is-warning {
  border-color: #e4c783;
  background: #fff7df;
  color: #725214;
}

.start-screen-status-chip.is-active {
  border-color: #a9c2e8;
  background: #eef5ff;
  color: #315988;
}

.start-screen-status-chip.is-danger {
  border-color: #e1a7a7;
  background: #fff0f0;
  color: #8a3737;
}

.start-screen-primary-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 240px);
  align-items: center;
  gap: 0.85rem;
  border-left: 4px solid #3f6f9f;
  background: #ffffff;
}

.start-screen-primary-copy {
  display: grid;
  gap: 0.22rem;
  min-width: 0;
}

.start-screen-primary-eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: calc(0.68rem * var(--ui-screen-text-scale));
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.start-screen-primary-copy h3 {
  margin: 0;
  font-size: calc(1.08rem * var(--ui-screen-text-scale));
  line-height: 1.25;
}

.primary-action {
  min-height: 3rem;
  background: #2f5f8f;
  color: #fff;
  font-weight: 700;
}

.primary-action:hover {
  background: #27547e;
}

.start-screen-news-card h3 {
  margin-bottom: 0.55rem;
}

.start-screen-news-body,
.start-screen-news-preview {
  line-height: 1.5;
  white-space: normal;
}

.start-screen-news-body a,
.start-screen-news-preview a {
  color: #2f5bd6;
  text-decoration: underline;
  word-break: break-word;
}

.start-screen-setup-card {
  display: grid;
  gap: 0.9rem;
}

.start-screen-auth-user {
  gap: 0.85rem;
}

.start-screen-action-section {
  display: grid;
  gap: 0.55rem;
  padding: 0.78rem;
  border: 1px solid rgba(160, 166, 177, 0.22);
  border-radius: 8px;
  background: #f7f8fa;
}

.start-screen-action-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  color: #373b44;
}

.start-screen-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.55rem;
  width: 100%;
}

.start-screen-action-button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
  min-height: 3rem;
  text-align: left;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}

.start-screen-action-button.is-warning {
  background: #fff1d2;
}

.start-screen-action-icon {
  display: inline-grid;
  place-items: center;
  width: 1.35rem;
  min-width: 1.35rem;
  font-size: 1rem;
  line-height: 1;
}

.start-screen-action-label {
  min-width: 0;
  overflow-wrap: anywhere;
}

.start-screen-offline-entry {
  display: grid;
  gap: 0.65rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(160, 166, 177, 0.22);
  border-radius: 14px;
  background: rgba(228, 233, 241, 0.58);
}

.start-screen-offline-entry-text {
  margin: 0;
  line-height: 1.45;
  white-space: normal;
  font-size: calc(1em * var(--ui-hint-text-scale));
}

.start-screen-offline-entry button {
  justify-self: stretch;
}

@media (max-width: 640px) {
  .start-screen-operator-panel,
  .start-screen-primary-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .start-screen-status-list {
    justify-content: flex-start;
  }

  .start-screen-action-grid {
    grid-template-columns: 1fr;
  }
}

.game-stage-body {
  padding-top: 0.3rem;
  padding-bottom: 0.35rem;
  display: grid;
  align-content: start;
  gap: 0.8rem;
  min-width: 0;
}

.empty-state {
  color: var(--muted);
  padding: 1rem 0.25rem;
}

.selected-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  align-items: start;
}

.selected-column {
  display: grid;
  gap: 0.65rem;
  align-content: start;
  align-items: start;
  height: max-content;
}

.selected-chip,
.picker-item,
.feature-item {
  background: var(--pill);
  border-radius: 18px;
}

.selected-chip {
  display: grid;
  grid-template-columns: 28px 1fr 18px;
  align-items: center;
  gap: 0.45rem;
  padding: 0.52rem 0.7rem;
  font-size: calc(1em * var(--ui-player-card-text-scale));
  transition: transform 140ms ease, opacity 140ms ease, background 140ms ease;
}

.selected-chip[data-sortable-id] {
  touch-action: none;
  user-select: none;
  cursor: grab;
}

.selected-chip-index {
  width: 22px;
  height: 22px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: calc(0.76rem * var(--ui-player-card-text-scale));
  color: var(--muted);
  background: rgba(255, 255, 255, 0.55);
}

.selected-chip-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.32rem;
}

.selected-chip-inline-meta,
.selected-chip-meta {
  font-size: calc(0.84rem * var(--ui-player-card-text-scale));
  color: var(--muted);
}

.selected-chip-remove {
  background: transparent;
  padding: 0;
  font-size: 1rem;
  touch-action: manipulation;
  cursor: pointer;
}

.selected-chip.dragging {
  opacity: 0.22;
  cursor: grabbing;
}

.selected-chip.drag-over {
  outline: 2px solid #85aee8;
  background: #dbe7f7;
  transform: scale(1.02);
}

.drag-preview {
  box-shadow: 0 18px 36px rgba(45, 55, 72, 0.24);
  opacity: 0.96;
  pointer-events: none;
  transition: none !important;
  animation: none !important;
  will-change: transform;
  transform-origin: top left;
}

.drag-preview:hover,
.drag-preview:active,
.drag-preview * {
  transition: none !important;
  animation: none !important;
}

.drag-placeholder {
  border-radius: 8px;
  border: 2px dashed rgba(95, 103, 117, 0.35);
  background: rgba(207, 215, 230, 0.28);
  min-height: 40px;
  transition: none;
}

body.sort-active {
  user-select: none;
  cursor: grabbing;
}

.sortable-chosen {
  cursor: grabbing;
  transition: none !important;
  animation: none !important;
}

.sortable-ghost {
  opacity: 0.22;
  transition: none !important;
  animation: none !important;
}

.sortable-drag,
.sortable-fallback {
  box-shadow: 0 18px 36px rgba(45, 55, 72, 0.24);
  cursor: grabbing;
  pointer-events: none;
  transition: none !important;
  animation: none !important;
  will-change: transform;
}

[data-drag-handle] {
  touch-action: none;
  user-select: none;
  cursor: grab;
}

[data-mechanic-sort-id],
[data-base-mechanic-item-id],
[data-role-condition-item-id] {
  touch-action: none;
  user-select: none;
}

.bottom-actions {
  margin-top: 0;
  display: grid;
  gap: 0.75rem;
  padding:
    0.42rem
    max(var(--app-page-padding), var(--app-safe-area-right))
    calc(var(--app-safe-area-bottom) + var(--app-bottom-gesture-buffer) + 0.35rem)
    max(var(--app-page-padding), var(--app-safe-area-left));
  border-top: 1px solid rgba(160, 166, 177, 0.18);
  background: rgba(244, 244, 245, 0.97);
}

.game-bottom-actions {
  gap: 0.4rem;
  padding-top: 0.32rem;
}

.bottom-actions .bottom-row {
  flex-wrap: nowrap;
  align-items: stretch;
}

.view[data-view="player-seating"] .bottom-actions .bottom-row {
  flex-wrap: wrap;
}

.game-bottom-actions button {
  padding: 0.62rem 0.9rem;
}

.game-bottom-actions .compact-action-button,
.game-bottom-actions .icon-only {
  min-height: 30px;
}

.game-bottom-actions .full,
.game-bottom-actions .soft,
.game-bottom-actions .primary,
.game-bottom-actions .danger {
  min-height: 40px;
}

.bottom-actions .full {
  flex: 1 1 auto;
  width: auto;
}

.bottom-actions .compact-action-button,
.bottom-actions .icon-only {
  flex: 0 0 auto;
}

.confirm-modal-text {
  white-space: pre-line;
  font-size: calc(1em * var(--ui-hint-text-scale));
}

.soft {
  background: var(--pill);
}

.soft-danger {
  background: var(--pill-red);
}

.full {
  width: 100%;
}

.icon-only {
  min-width: 48px;
  width: 48px;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 1.05rem;
}

.picker-list {
  display: grid;
  gap: 0.55rem;
}

.picker-sort-row {
  margin-bottom: 0.8rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
}

.picker-sort-row select {
  width: 100%;
  min-height: 44px;
  border-radius: 16px;
  border: 1px solid rgba(173, 178, 188, 0.4);
  background: rgba(255, 255, 255, 0.92);
  padding: 0 0.9rem;
  font: inherit;
  color: #2b313c;
}

.archive-button {
  min-height: 44px;
  padding-inline: 1rem;
  white-space: nowrap;
}

.compact-action-button {
  min-height: 32px;
  min-width: 32px;
  padding: 0;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  line-height: 1;
}

.group-list,
.role-grid {
  display: grid;
  gap: 0.55rem;
}

.group-list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.roles-head {
  margin-top: 1rem;
}

.extra-mechanics-head {
  margin: 1rem 0 0.35rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(160, 166, 177, 0.45);
}

.extra-mechanics-description {
  margin: -0.15rem 0 0.7rem;
  font-size: 0.78rem;
  line-height: 1.35;
}

.head-actions {
  display: flex;
  gap: 0.45rem;
}

.header-menu {
  position: relative;
}

.header-menu-toggle {
  min-height: 32px;
  padding: 0.42rem 0.75rem;
  font-size: 0.82rem;
  white-space: nowrap;
}

.header-menu-panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  min-width: 168px;
  padding: 0.35rem;
  border: 1px solid rgba(160, 166, 177, 0.24);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 30px rgba(25, 29, 36, 0.12);
  display: none;
  z-index: 8;
}

.header-menu.open .header-menu-panel {
  display: grid;
  gap: 0.3rem;
}

.header-menu-action {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  padding: 0.55rem 0.7rem;
  min-height: 34px;
}

.group-list-head .icon-button.small {
  min-width: 44px;
  padding-inline: 0.75rem;
}

.group-item,
.role-item {
  background: var(--pill);
  border-radius: 5px;
}

.group-item {
  display: grid;
  grid-template-columns: 1fr 28px;
  align-items: center;
  gap: 0.6rem;
  padding: 0.3rem 0.45rem 0.3rem 0.3rem;
}

.group-item.selected {
  background: #c9daf4;
  outline: 1px solid #85aee8;
}

.group-button {
  text-align: left;
  background: transparent;
  padding: 0.75rem 0.95rem;
}

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

.role-item {
  display: grid;
  grid-template-columns: 26px 1fr 22px;
  gap: 0.45rem;
  align-items: center;
  padding: 0.55rem 0.55rem;
  background: var(--pill);
  transition: background 120ms ease, box-shadow 120ms ease, outline-color 120ms ease;
}

.role-item.dragging {
  opacity: 0.22;
  cursor: grabbing;
}

.role-item.sortable-chosen {
  cursor: grabbing;
}

.role-item.sortable-ghost {
  opacity: 0.22;
}

.role-item.sortable-drag,
.role-item.sortable-fallback {
  box-shadow: 0 18px 36px rgba(45, 55, 72, 0.24);
  cursor: grabbing;
}

.role-index {
  width: 22px;
  height: 22px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.6);
}

.role-item.active-role {
  color: #1f314e;
}

.role-item.selected {
  outline: 2px solid rgba(31, 67, 120, 0.6);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.role-item.selected-neutral {
  background: #d7e2f1;
}

.role-name {
  min-width: 0;
}

.role-default-note {
  margin-top: 0.12rem;
  font-size: 0.72rem;
  line-height: 1.2;
  color: var(--muted);
}

.role-item.default-role-item {
  opacity: 0.86;
  cursor: default;
  box-shadow: none;
}

.role-item.default-role-item .picker-action {
  opacity: 1;
}

.extra-mechanic-role-item {
  grid-template-columns: 1fr 22px;
  gap: 0.4rem;
  padding: 0.48rem 0.5rem;
}

.extra-mechanic-role-item .group-button {
  padding: 0;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 0.45rem;
  align-items: center;
  min-width: 0;
}

.extra-mechanic-role-item .role-name {
  display: flex;
  align-items: center;
  min-width: 0;
}

.extra-mechanic-role-item .role-name > div {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.extra-mechanic-role-item .picker-action {
  justify-self: end;
  width: 22px;
  min-width: 22px;
}

.role-search {
  margin: 0.4rem 0 0.7rem;
}

.role-search .quick-row {
  grid-template-columns: minmax(0, 1fr);
  position: relative;
}

.role-search input {
  padding-right: 2.6rem;
}

.role-search-clear-button {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  font-size: 0.95rem;
  height: 2rem;
  justify-content: center;
  line-height: 1;
  padding: 0;
  position: absolute;
  right: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
}

.role-search-clear-button:hover,
.role-search-clear-button:focus-visible {
  color: var(--text);
}

.role-search-clear-button.hidden {
  display: none;
}

.role-side-field {
  display: grid;
  gap: 0.7rem;
}

.role-intro-night-limit-field {
  display: grid;
  gap: 0.7rem;
}

.role-intro-night-limit-field label {
  display: block;
}

.role-intro-night-limit-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
}

.role-side-color-block {
  display: grid;
  gap: 0.55rem;
}

.role-side-color-picker {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
}

.role-side-color-tools {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: 0.55rem;
  align-items: center;
}

.role-side-color-tools input[type="color"] {
  width: 48px;
  min-width: 48px;
  height: 36px;
  padding: 0.2rem;
}

.role-side-swatch {
  width: 100%;
  min-height: 34px;
  padding: 0;
  border: 2px solid transparent;
}

.role-side-swatch.selected {
  border-color: #2d3644;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.role-side-swatch:hover {
  transform: none;
  opacity: 0.92;
}

.role-side-actions {
  display: flex;
  gap: 0.45rem;
  justify-content: flex-end;
}

.role-side-actions > * {
  flex: 0 0 auto;
}

.role-mechanics-field,
.mechanic-editor-list {
  display: grid;
  gap: 0.7rem;
}

.role-mechanic-config-list {
  display: grid;
  gap: 0.75rem;
}

.role-mechanic-mode-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}

.role-mechanic-mode-text {
  margin: 0;
  flex: 1 1 auto;
}

.role-mechanic-info-button {
  flex: 0 0 auto;
}

.role-mechanic-description-text {
  margin: 0;
  white-space: pre-line;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.base-mechanic-template-actions {
  display: grid;
  gap: 0.6rem;
  justify-items: stretch;
  align-self: start;
}

.role-mechanic-condition-system {
  display: grid;
  gap: 0.8rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f9fb;
  margin-bottom: 0.75rem;
}

.role-mechanic-condition-groups {
  display: grid;
  gap: 0.75rem;
}

.role-condition-group-card {
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.role-condition-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.role-condition-group-head-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
}

.role-condition-group-fields {
  display: grid;
  gap: 0.55rem;
}

.role-condition-group-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.55rem;
}

.role-condition-subject-list {
  display: grid;
  gap: 0.45rem;
}

.role-condition-subject-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.4rem;
  align-items: center;
  min-width: 0;
}

.role-condition-subject-action {
  min-height: 44px;
}

.role-condition-inline-select {
  display: grid;
  gap: 0.55rem;
}

.role-condition-inline-select span {
  font-size: 0.9rem;
  color: var(--muted);
}

.role-condition-group-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.role-condition-group-picker select {
  flex: 1 1 16rem;
  min-width: 0;
}

.role-condition-mechanics-dropzone {
  min-height: 3rem;
  padding: 0.55rem;
  border: 1px dashed #c9cfda;
  border-radius: 8px;
  background: #fbfcfe;
  display: grid;
  gap: 0.45rem;
  align-items: flex-start;
}

.role-condition-mechanic-chip {
  min-height: 2.5rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 0.75rem;
  color: var(--text);
  cursor: grab;
}

.role-condition-mechanic-chip-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex: 0 0 auto;
}

.role-condition-mechanic-chip .drag-handle {
  color: var(--muted);
  font-size: 0.95rem;
  letter-spacing: -0.1rem;
}

.role-condition-order-hint {
  margin: 0;
}

.role-mechanic-card {
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f5f6f8;
}

.role-mechanic-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  scroll-margin-top: 1rem;
}

.role-mechanic-card-head-main {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.role-mechanic-card-title-wrap {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.role-mechanic-card-title {
  color: var(--muted);
  font-size: 0.86rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.role-mechanic-card-body {
  display: grid;
  gap: 0.75rem;
}

.role-mechanic-icon-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.role-mechanic-icon-display {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fafafb;
  font-size: 1.05rem;
  line-height: 1;
}

.role-mechanic-icon-display.empty {
  color: var(--muted);
}

.role-mechanic-icon-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(2.3rem, 1fr));
  gap: 0.45rem;
}

.role-mechanic-icon-option {
  min-height: 2.35rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: #fafafb;
  font-size: 1.05rem;
  line-height: 1;
}

.role-mechanic-icon-option.used-by-other-role:not(.selected) {
  background: #d8dde6;
  border-color: #b7c0cf;
  color: #394353;
  opacity: 0.88;
}

.role-mechanic-icon-option.selected {
  border-color: #5d8fd6;
  box-shadow: 0 0 0 2px rgba(93, 143, 214, 0.14);
  background: #edf4ff;
  opacity: 1;
}

.role-mechanic-extra {
  display: grid;
  gap: 0.55rem;
}

.spoof-check-rule-block {
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fafafb;
}

.spoof-check-rule-list {
  display: grid;
  gap: 0.65rem;
}

.spoof-check-rule-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: end;
}

.spoof-check-rule-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding-bottom: 0.05rem;
}

@media (max-width: 860px) {
  .spoof-check-rule-row {
    grid-template-columns: 1fr;
  }

  .spoof-check-rule-actions {
    justify-content: flex-end;
  }
}

.role-mechanic-icon-warning {
  margin: -0.08rem 0 0;
  color: #9a5d13;
  font-size: 0.82rem;
  line-height: 1.3;
}

.global-style-icon-input {
  max-width: 7rem;
  text-align: center;
  font-size: 1.05rem;
  line-height: 1.2;
}

.role-mechanic-extra select[multiple] {
  min-height: 112px;
}

.section-inline-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
}

.mechanic-selected-summary {
  color: var(--muted);
  font-size: 0.95rem;
}

.mechanic-toggle-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.mechanic-toggle-item {
  background: var(--pill);
  text-align: left;
  min-width: 0;
}

.mechanic-toggle-item.selected {
  background: #d7e2f1;
  outline: 1px solid #85aee8;
}

.mechanic-player-states,
.mechanic-player-states-list {
  display: grid;
  gap: 0.55rem;
}

.picker-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
  align-items: center;
  padding: 0.72rem 0.9rem;
  font-size: calc(1em * var(--ui-player-card-text-scale));
}

.picker-side {
  display: grid;
  justify-items: center;
  gap: 0.18rem;
}

.picker-id {
  font-size: calc(0.66rem * var(--ui-player-card-text-scale));
  line-height: 1;
  color: var(--muted);
  white-space: nowrap;
}

.picker-item-main {
  background: transparent;
  padding: 0;
  text-align: left;
}

.picker-item.selected {
  background: var(--pill-blue);
}

.picker-meta {
  color: var(--muted);
  font-size: calc(0.9rem * var(--ui-player-card-text-scale));
}

.picker-action {
  background: transparent;
  padding: 0;
  text-align: center;
}

.small {
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0;
}

.toggle-row {
  margin: 0.4rem 0 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.toggle {
  width: 52px;
  height: 30px;
  border-radius: 999px;
  padding: 3px;
  background: #585d66;
  display: flex;
  align-items: center;
}

.toggle[aria-pressed="false"] {
  background: #c2c6ce;
}

.toggle-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: white;
  transition: transform 140ms ease;
}

.toggle[aria-pressed="true"] .toggle-thumb {
  transform: translateX(22px);
}

.view[data-view="player-picker"] .mobile-screen {
  position: relative;
}

.view[data-view="player-picker"] .mobile-screen.quick-player-form-open::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--overlay-backdrop);
  z-index: 1;
}

.quick-add {
  position: relative;
  z-index: 2;
  padding: 0.8rem var(--app-page-padding) 0.75rem;
  border-radius: 0;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  background: rgba(244, 244, 245, 0.97);
}

.quick-add.form-open {
  padding-top: 0;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.quick-add.form-open > .quick-row:first-child {
  display: none;
}

.quick-add.form-open > .picker-search-option-row {
  display: none;
}

.quick-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
}

.guest-toggle-button[aria-pressed="true"],
.archive-toggle-button[aria-pressed="true"],
#convert-guest-player-button[aria-pressed="true"] {
  background: #b7d4ff;
  color: #1e355c;
}

.quick-row > * {
  min-width: 0;
}

.picker-search-option-row {
  margin-top: 0.65rem;
  justify-content: flex-start;
}

.quick-row > button {
  align-self: end;
}

.field-help-text {
  margin-top: -0.35rem;
}

.inline-icon-action-button {
  min-width: 3rem;
  align-self: end;
}

.create-player-sheet {
  position: relative;
  z-index: 1;
  margin-top: 0.8rem;
  padding: 0.9rem;
  display: grid;
  gap: 0.7rem;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(160, 166, 177, 0.26);
  box-shadow: 0 20px 44px rgba(32, 37, 46, 0.18);
}

.quick-add.form-open .create-player-sheet {
  width: min(980px, calc(100vw - (var(--app-page-padding) * 2)));
  margin: 0 auto;
  border-radius: 28px;
}

.quick-add.form-open .create-player-sheet.is-scrollable {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-gutter: stable;
}

.quick-add.form-open .create-player-sheet.is-scrollable::-webkit-scrollbar {
  width: 10px;
}

.quick-add.form-open .create-player-sheet.is-scrollable::-webkit-scrollbar-thumb {
  background: rgba(122, 129, 141, 0.55);
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.9);
}

.quick-add.form-open .create-player-sheet.is-scrollable::-webkit-scrollbar-track {
  background: rgba(239, 241, 245, 0.75);
  border-radius: 999px;
}

.create-player-sheet.hidden {
  display: none;
}

.create-player-sheet .bottom-row {
  flex-wrap: nowrap;
}

.create-player-sheet .bottom-row > button {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
}

.sheet-title {
  margin-bottom: 0;
}

.feature-list {
  display: grid;
  gap: 0.7rem;
}

.feature-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
}

.feature-flag {
  color: var(--muted);
}

.stat-card,
.mini-card {
  background: #f5f6f8;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 0.9rem;
}

.profile-summary-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  margin-bottom: 1rem;
  background: #f5f6f8;
  border: 1px solid var(--line);
  border-radius: 20px;
}

.profile-summary-card .head-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.global-settings-inline-head {
  align-items: center;
}

.global-settings-inline-head label {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0;
  min-width: 0;
}

.auth-method-chip {
  gap: 0.2rem;
}

.club-admin-tab-panel {
  display: grid;
  gap: 1.2rem;
}

.club-admin-create-grid {
  align-items: start;
}

.club-admin-list-card {
  display: grid;
  gap: 1rem;
}

.club-admin-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(220px, 0.8fr);
  gap: 1rem;
  margin-top: 1rem;
}

.club-admin-club-mode-row {
  display: grid;
  gap: 0.7rem;
}

.club-admin-club-mode-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.club-admin-club-mode-toggle {
  padding: 0.5rem 0.75rem;
}

.club-admin-club-mode-toggle.active {
  background: #cfd7e6;
}

.club-admin-card {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fbfcfd;
}

.club-admin-card-head,
.club-admin-title-row,
.club-admin-meta-row,
.club-admin-stats,
.club-admin-head-actions,
.club-admin-move-controls,
.club-admin-user-actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.club-admin-card-head {
  justify-content: space-between;
  align-items: start;
}

.club-admin-head-actions {
  justify-content: flex-end;
  align-items: center;
}

.club-admin-meta-row {
  color: var(--muted);
  font-size: 0.92rem;
}

.club-subscription-panel,
.club-subscription-summary-block {
  display: grid;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  border: 1px solid #e3e8f1;
  border-radius: 18px;
  background: #f8fafc;
}

.club-subscription-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
}

.club-subscription-summary-grid .mini-card {
  display: grid;
  gap: 0.28rem;
  min-height: 72px;
}

.club-subscription-summary-notes {
  margin: 0;
}

.club-subscription-history-table td:last-child,
.club-subscription-history-table th:last-child {
  min-width: 120px;
}

.club-subscription-history-table .club-subscription-actions-cell {
  width: 1%;
  white-space: nowrap;
  text-align: center;
}

.club-admin-stat-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  background: #ebf0f7;
  color: #41536f;
  font-size: 0.88rem;
}

.base-template-pill {
  background: #dff4e4;
  color: #2f6b3d;
}

.club-admin-users-table td:last-child {
  min-width: 220px;
}

.club-admin-user-modal-card {
  width: min(85vw, 1200px);
  min-width: min(720px, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}

#club-admin-user-modal-backdrop {
  place-items: unset;
  align-items: start;
  justify-items: center;
  padding-top: max(1rem, env(safe-area-inset-top));
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

.club-admin-subscription-modal-card {
  width: min(680px, calc(100vw - 2rem));
}

.club-admin-subscription-form {
  display: grid;
  gap: 0.9rem;
}

.club-admin-subscription-active-check {
  align-self: end;
  min-height: 2.8rem;
}

.club-admin-user-modal-form {
  display: grid;
  gap: 0.9rem;
}

.club-admin-user-modal-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  align-items: start;
}

.club-admin-user-club-block {
  display: grid;
  gap: 0.6rem;
}

.club-admin-user-club-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: center;
}

.club-admin-user-club-picker {
  display: grid;
  gap: 0.6rem;
  padding: 0.85rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #eef2f8;
}

.club-admin-user-club-option-list {
  display: grid;
  gap: 0.5rem;
}

.club-admin-user-club-option {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
}

.club-admin-user-password-block {
  display: grid;
  gap: 0.7rem;
}

.club-admin-user-password-block .soft {
  justify-self: start;
}

.club-admin-delete-club-modal-card {
  width: min(520px, 100%);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
}

.club-admin-delete-club-modal-body {
  display: grid;
  gap: 0.9rem;
}

.club-admin-delete-club-summary {
  display: grid;
  gap: 0.55rem;
  padding: 0.9rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #eef2f8;
}

.club-admin-delete-club-warning {
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid #e8c7c7;
  background: #f8e8e8;
  color: #7e3c3c;
}

.club-public-page-settings {
  display: grid;
  gap: 0.65rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #f5f8fc;
}

.club-admin-public-page-settings {
  margin-top: 0.1rem;
}

.club-public-page-toggle-row {
  align-items: flex-start;
}

.club-public-page-toggle-row span {
  min-width: 0;
}

.club-public-page-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: center;
}

.club-public-page-link-row input {
  min-width: 0;
}

.club-public-page-pin-row,
.club-public-page-actions-row {
  display: grid;
  gap: 0.7rem;
  align-items: center;
}

.club-public-page-pin-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.club-public-page-actions-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.club-public-page-pin-row input {
  min-width: 0;
}

.public-club-pin-modal-card {
  width: min(420px, 100%);
}

.public-club-pin-modal-status {
  min-height: 1.2rem;
  margin: -0.15rem 0 0;
}

.public-club-pin-modal-status.error {
  color: #a64b2a;
}

.public-club-portal-block {
  display: grid;
  gap: 0.32rem;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #f5f8fc;
}

.public-club-portal-headline {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.public-club-portal-headline .label {
  margin: 0;
}

.public-club-portal-headline h3 {
  margin: 0;
  font-size: 1.06rem;
}

.public-club-portal-tabs {
  justify-content: flex-start;
}

.public-club-announcements-block {
  display: grid;
  gap: 0.65rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.public-club-announcements-block.hidden {
  display: none;
}

.public-club-announcements-head,
.public-club-announcement-head {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.public-club-announcements-list {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

.public-club-announcement-card {
  display: grid;
  gap: 0.48rem;
  padding: 0.72rem 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.74);
}

.public-club-announcement-card .game-announcement-status-badge {
  flex: 0 0 auto;
}

.public-club-announcement-grid {
  gap: 0.22rem 0.85rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.public-club-announcement-games,
.public-club-announcements-note,
.public-club-announcements-empty {
  margin: 0;
}

@media (max-width: 860px) {
  .club-admin-user-modal-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .club-public-page-link-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .club-public-page-pin-row,
  .club-public-page-actions-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .public-club-announcements-head,
  .public-club-announcement-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .public-club-announcement-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.club-management-grid {
  align-items: start;
}

.club-management-layout {
  display: grid;
  gap: 1rem;
}

.club-management-bulk-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 0.85rem;
}

.club-management-duo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}

.club-management-info-host-grid > * {
  min-width: 0;
}

.club-management-stats-card,
.club-management-users-card {
  grid-column: 1 / -1;
}

.club-management-players-card {
  grid-column: 1 / -1;
}

.club-management-player-row td:first-child strong {
  display: inline-block;
}

.club-management-player-actions-cell {
  width: 1%;
  white-space: nowrap;
  text-align: center;
}

.club-management-player-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.club-management-player-page-size {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.club-management-player-page-size select {
  min-width: 84px;
}

.club-management-player-pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.club-management-player-pagination-controls .compact-action-button.active {
  background: #dbe7fb;
  border-color: #92b4eb;
  color: #224474;
}

.club-management-player-pagination-gap {
  padding-inline: 0.2rem;
}

.club-management-players-tabs {
  flex-wrap: wrap;
}

.club-management-players-table td:last-child,
.club-management-players-table th:last-child {
  min-width: 72px;
}

.table-sort-button {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  padding: 0;
  cursor: pointer;
}

.table-sort-button:hover,
.table-sort-button:focus-visible {
  color: var(--accent);
  outline: none;
}

.club-management-section-card {
  gap: 0.9rem;
}

.club-management-section-head {
  align-items: flex-start;
  gap: 0.8rem;
}

.club-management-section-head > div {
  min-width: 0;
}

.club-management-section-head h3 {
  margin: 0;
}

.club-management-section-body {
  display: grid;
  gap: 0.9rem;
  min-width: 0;
}

.club-management-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.club-management-user-row.editing input,
.club-management-user-row.editing select {
  min-width: 140px;
}

.club-management-stats .mini-card {
  flex: 1 1 180px;
  min-width: 180px;
}

.club-management-chart-block {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.club-management-chart-head h4 {
  margin: 0;
}

.club-management-chart-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  align-items: end;
  margin: 0.2rem 0 1rem;
}

.club-management-chart-filters label {
  min-width: 0;
}

.club-management-chart-filters select,
.club-management-chart-filters button {
  width: 100%;
}

.club-management-chart-range-nav {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: center;
}

.club-management-chart-range-nav .compact-action-button {
  width: 2.5rem;
  min-width: 2.5rem;
  padding-inline: 0;
}

.club-management-chart-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 0 0 1rem;
}

.club-management-chart-summary .mini-card {
  flex: 1 1 220px;
  min-width: 220px;
}

.club-management-chart-canvas-wrap {
  position: relative;
  min-height: 320px;
  height: min(50vh, 520px);
  padding: 0.4rem 0.2rem 0;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fcfdff;
}

.club-management-chart-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.club-management-chart-canvas-wrap > .muted {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  text-align: center;
  background: rgba(252, 253, 255, 0.86);
  border-radius: inherit;
}

.club-management-chart-tooltip {
  position: fixed;
  z-index: 60;
  max-width: min(240px, calc(100vw - 24px));
  padding: 0.55rem 0.7rem;
  border-radius: 14px;
  background: rgba(27, 35, 46, 0.94);
  color: #f4f7fb;
  box-shadow: 0 14px 30px rgba(17, 24, 39, 0.22);
  font-size: 0.8rem;
  line-height: 1.35;
  pointer-events: none;
  white-space: normal;
}

.club-management-chart-tooltip > div + div {
  margin-top: 0.12rem;
}

@media (max-width: 860px) {
  .club-management-duo-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .club-management-chart-filters {
    grid-template-columns: minmax(0, 1fr);
  }
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.compact-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.5rem;
}

.inline-check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.inline-form-row {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.inline-form-field {
  flex: 1 1 320px;
}

.inline-check input {
  width: auto;
}

.disabled-inline-check {
  opacity: 0.5;
}

.disabled-inline-check input {
  cursor: not-allowed;
}

.disabled-form-block {
  opacity: 0.5;
}

.disabled-form-block select,
.disabled-form-block input {
  cursor: not-allowed;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  border-radius: 16px;
  background: rgba(34, 38, 45, 0.94);
  color: white;
  padding: 0.9rem 1rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: 140ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--overlay-backdrop);
  display: grid;
  place-items: center;
  padding: 1rem;
  overflow-y: auto;
  z-index: 2000;
}

.modal-backdrop.hidden {
  display: none;
}

#app-confirm-modal-backdrop {
  z-index: 2100;
}

#role-preset-save-modal-backdrop {
  z-index: 2050;
}

.modal-card {
  width: min(420px, 100%);
  background: #f7f7f8;
  border-radius: 28px;
  padding: 1.1rem;
  font-size: calc(1rem * var(--ui-modal-text-scale));
  box-shadow: 0 26px 60px rgba(31, 37, 46, 0.22);
  overflow: hidden;
}

.role-preset-list-modal-card {
  width: min(860px, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  overflow: auto;
}

.settings-preset-list-modal-card {
  width: min(780px, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  overflow: auto;
}

.app-appearance-settings-modal-card {
  width: min(760px, 100%);
}

.app-appearance-settings-modal-body {
  gap: 0.8rem;
}

.app-appearance-settings-modal-actions {
  justify-content: flex-end;
  margin-top: 0.4rem;
}

.app-appearance-settings-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(60, 76, 98, 0.14);
  border-radius: 18px;
  background: #ffffff;
}

.app-appearance-settings-copy {
  display: grid;
  gap: 0.3rem;
}

.app-appearance-settings-copy p {
  margin: 0;
}

.app-appearance-settings-stepper {
  display: grid;
  grid-template-columns: 2.4rem minmax(4.8rem, auto) 2.4rem;
  align-items: center;
  gap: 0.45rem;
}

.app-appearance-settings-stepper .compact-action-button {
  min-width: 2.4rem;
  min-height: 2.4rem;
  padding: 0;
}

.app-appearance-settings-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.8rem;
  text-align: center;
}

.date-picker-trigger {
  justify-content: flex-start;
  text-align: left;
}

.date-picker-trigger.is-empty {
  color: var(--muted);
}

.round-day-footer-result-actions {
  display: flex;
  flex: 1 1 auto;
  gap: 0.7rem;
  align-items: stretch;
}

.round-day-footer-result-actions > button {
  flex: 1 1 0;
}

.sync-conflict-modal-card {
  width: min(760px, 100%);
  max-height: min(84vh, 860px);
  display: grid;
  gap: 0.9rem;
}

.sync-conflict-modal-body {
  min-height: 0;
  max-height: calc(min(84vh, 860px) - 6rem);
  overflow-y: auto;
  display: grid;
  gap: 0.9rem;
}

.sync-conflict-modal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.sync-conflict-list {
  display: grid;
  gap: 0.85rem;
}

.sync-conflict-card {
  background: #ffffff;
  border: 1px solid rgba(60, 76, 98, 0.14);
  border-radius: 20px;
  padding: 0.95rem 1rem;
  display: grid;
  gap: 0.7rem;
}

.sync-conflict-card.resolving {
  opacity: 0.72;
}

.sync-conflict-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.75rem;
}

.sync-conflict-title-row h4 {
  margin: 0;
}

.sync-conflict-type-badge {
  white-space: nowrap;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  background: rgba(225, 171, 52, 0.18);
  color: #8c6512;
  font-size: 0.78rem;
  font-weight: 700;
}

.sync-conflict-message {
  margin: 0;
  color: #46556a;
}

.sync-conflict-context {
  margin: 0.35rem 0 0;
  color: #5a6b80;
  font-size: 0.9rem;
}

.sync-conflict-recommendation {
  margin: 0.45rem 0 0;
  color: #214a8b;
  font-size: 0.88rem;
  line-height: 1.4;
  font-weight: 600;
}

.sync-conflict-meta {
  display: grid;
  gap: 0.25rem;
  color: #66768b;
  font-size: 0.86rem;
}

.sync-conflict-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.55rem;
}

.sync-conflict-action-card {
  display: grid;
  gap: 0.35rem;
}

.sync-conflict-action-card button {
  width: 100%;
}

.sync-conflict-recommended-action {
  box-shadow: 0 0 0 2px rgba(57, 111, 214, 0.18);
}

.sync-conflict-recommended-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.45rem;
  border-radius: 999px;
  padding: 0.08rem 0.4rem;
  background: rgba(57, 111, 214, 0.12);
  color: #214a8b;
  font-size: 0.72rem;
  font-weight: 700;
  vertical-align: middle;
}

.sync-conflict-action-hint {
  margin: 0;
  color: #6b7b8f;
  font-size: 0.82rem;
  line-height: 1.35;
}

.sync-conflict-empty {
  padding: 1rem 0.1rem 0.35rem;
  color: #66768b;
}

.round-night-transfer-choice-list .round-night-transfer-choice-option.active {
  background: rgba(57, 111, 214, 0.12);
  border-color: rgba(57, 111, 214, 0.4);
  color: #214a8b;
}

.rule-archive-browser-modal-card {
  width: min(760px, 100%);
  max-height: min(84vh, 820px);
  display: grid;
  gap: 0.9rem;
}

.rule-archive-browser-modal-card .archive-list {
  min-height: 0;
  max-height: calc(min(84vh, 820px) - 7rem);
  overflow-y: auto;
}

.role-archive-modal-card {
  width: min(1120px, calc(100vw - 2rem));
  height: calc(100dvh - 2rem);
  max-height: calc(100dvh - 2rem);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.role-archive-modal-card .archive-list {
  min-height: 0;
  overflow: auto;
  padding-right: 0.25rem;
  scrollbar-width: thin;
}

.role-archive-modal-card .archive-list::-webkit-scrollbar {
  width: 10px;
}

.role-archive-modal-card .archive-list::-webkit-scrollbar-thumb {
  background: rgba(122, 129, 141, 0.55);
  border-radius: 999px;
  border: 2px solid rgba(247, 247, 248, 0.95);
}

.role-archive-modal-card .archive-list::-webkit-scrollbar-track {
  background: rgba(229, 232, 238, 0.72);
  border-radius: 999px;
}

.game-log-modal-card {
  width: min(760px, 100%);
  max-height: min(84vh, 820px);
  display: grid;
  gap: 0.9rem;
}

.game-log-modal-card .game-log-panel {
  min-height: 0;
  max-height: calc(min(84vh, 820px) - 5.2rem);
}

#game-type-modal-backdrop {
  align-items: start;
  justify-items: center;
  overflow: hidden;
}

#game-type-modal-backdrop .modal-card {
  width: min(980px, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

#game-type-form {
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.3rem;
  scrollbar-width: thin;
}

#game-type-form::-webkit-scrollbar {
  width: 8px;
}

#game-type-form::-webkit-scrollbar-thumb {
  background: rgba(120, 128, 140, 0.45);
  border-radius: 999px;
}

#game-type-form::-webkit-scrollbar-track {
  background: transparent;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.info-pair {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  color: #3d4450;
  font-size: 0.95rem;
}

.info-label {
  color: #6e7580;
}

.info-value {
  font-weight: 600;
}

.header-meta-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.compact-info {
  white-space: nowrap;
}

.archive-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.archive-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
  align-items: center;
}

.archive-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.9rem 1rem;
  border-radius: 5px;
  background: rgba(231, 233, 237, 0.82);
}

.archive-item h4 {
  margin: 0;
  font-size: 1rem;
}

.archive-item p {
  margin: 0.2rem 0 0;
  color: #6a717d;
  font-size: 0.88rem;
}

.mechanic-sort-item {
  grid-template-columns: 26px minmax(0, 1fr);
}

.mechanic-sort-item .picker-item-main {
  min-width: 0;
}

.role-preset-filter-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.role-preset-range-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 0.75rem;
}

.role-preset-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.35rem;
  color: #6a717d;
  font-size: 0.88rem;
}

.game-type-action-list {
  display: grid;
  gap: 0.75rem;
}

.game-type-action-button {
  justify-content: flex-start;
  text-align: left;
}

.base-club-import-item {
  align-items: center;
}

.base-mechanics-settings-list {
  display: grid;
  gap: 0.8rem;
  min-width: 0;
}

.base-mechanics-bulk-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.45rem;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
}

.base-mechanic-settings-card {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f5f6f8;
  min-width: 0;
}

.base-mechanic-settings-card.collapsed {
  gap: 0.45rem;
}

.base-mechanic-settings-card h3 {
  margin: 0;
  flex: 0 0 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

.base-mechanic-card-label-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.base-mechanic-card-label-row .label {
  margin: 0;
  overflow-wrap: anywhere;
}

.base-mechanic-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  color: #6a717d;
  font-size: 0.8rem;
  line-height: 1;
}

.base-mechanic-settings-card .bottom-row {
  align-items: center;
  gap: 0.35rem;
}

.compact-head {
  margin-bottom: 0;
}

.view[data-view="base-mechanics-settings"] .section-head {
  min-width: 0;
}

.view[data-view="base-mechanics-settings"] .stage-screen-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.view[data-view="base-mechanics-settings"] .stage-screen-switcher .soft {
  width: 100%;
  min-width: 0;
  white-space: normal;
  text-align: center;
}

.view[data-view="base-mechanics-settings"] .base-mechanics-bulk-actions .soft {
  min-width: 0;
}

.view[data-view="base-mechanics-settings"] .base-mechanic-settings-card .section-head {
  gap: 0.75rem;
}

.view[data-view="base-mechanics-settings"] .base-mechanic-settings-card .head-actions {
  flex-wrap: wrap;
}

.game-stage-list {
  display: grid;
  gap: 0.8rem;
  align-content: start;
  min-height: 12rem;
  padding: 0.2rem;
  border: 1px dashed #d6dbe4;
  border-radius: 5px;
  background: #fbfbfc;
}

.game-stage-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f5f6f8;
}

.game-stage-card-handle {
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: #eef1f5;
  border-right: 1px solid #d7dde6;
  min-height: 100%;
}

.game-stage-card-handle-index {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100%;
  padding: 0.9rem 0.35rem;
  color: #5a6576;
  font-weight: 700;
  font-size: 0.92rem;
}

.game-stage-card-main {
  display: grid;
  gap: 0.7rem;
  padding: 0.95rem;
  min-width: 0;
}

.game-stage-dropzone-hint {
  padding: 0.75rem 0.85rem;
  border: 1px dashed var(--line);
  border-radius: 5px;
  background: #f2f4f7;
  color: var(--muted);
  font-size: 0.9rem;
}

.game-stage-empty {
  padding: 0.85rem;
  margin: 0;
  color: var(--muted);
}

.required-stage {
  border-color: #9cb3d3;
}

.game-stage-card-head {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: flex-start;
}

.game-stage-card-head > div:first-child {
  min-width: 0;
  flex: 1 1 auto;
}

.game-stage-card-head strong {
  display: block;
  overflow-wrap: anywhere;
}

.game-stage-card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.45rem;
  flex-wrap: nowrap;
}

.game-stage-card-title-row strong {
  flex: 0 1 auto;
  min-width: 0;
  line-height: 1.2;
}

.game-stage-card-title-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 0.35rem;
  margin-top: 0;
  flex: 0 0 auto;
}

.game-stage-title-action-button {
  width: auto;
  min-width: 0;
  font-size: 0.78rem;
  line-height: 1;
}

.game-stage-card-title-actions .game-stage-title-action-button.compact-action-button {
  width: 1.95rem;
  min-width: 1.95rem;
  height: 1.95rem;
  padding: 0;
}

.game-stage-title-action-button-text {
  padding: 0.42rem 0.72rem;
  white-space: nowrap;
}

.game-stage-card-type {
  margin: 0.2rem 0 0;
  font-size: 0.88rem;
}

@media (max-width: 860px) {
  .game-stage-card-title-row {
    flex-wrap: wrap;
  }

  .game-stage-card-title-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

.game-stage-card-head-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.game-stage-badges {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.game-stage-card-body {
  display: grid;
  gap: 0.7rem;
}

.game-stage-actions {
  display: flex;
  gap: 0.45rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.game-stage-settings-form {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.2rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.game-stage-settings-subgroup {
  display: grid;
  gap: 0.5rem;
  padding-left: 0.95rem;
  margin-left: 0.2rem;
  border-left: 2px solid #dfe5ef;
}

.game-stage-description {
  margin: 0.35rem 0 0;
  color: #6f7680;
  font-size: 0.9rem;
}

.game-stage-warning {
  margin: 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid #d8b46d;
  border-radius: 5px;
  background: #fff2d8;
  color: #7a5510;
  font-size: 0.9rem;
}

.intro-night-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  align-items: start;
}

.intro-night-column {
  display: grid;
  gap: 0.42rem;
  align-content: start;
  align-items: start;
  height: max-content;
}

.intro-night-player {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem;
  align-items: start;
  width: 100%;
  min-height: 52px;
  padding: 0.62rem 0.72rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #eceef2;
  text-align: left;
  box-sizing: border-box;
  font-size: calc(1em * var(--ui-player-card-text-scale));
}

.intro-night-player.disabled,
.intro-night-player:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.game-log-strip {
  display: none;
  min-height: 0;
  overflow: hidden;
  padding: 0.6rem var(--app-page-padding) 0.7rem;
  grid-row: 4;
}

.game-log-panel {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  padding: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(247, 248, 250, 0.97);
  box-shadow: 0 18px 44px rgba(25, 29, 36, 0.14);
  display: grid;
  gap: 0.5rem;
  align-content: start;
  grid-auto-rows: max-content;
}

.game-mobile-screen > .mobile-header {
  grid-row: 1;
}

.game-mobile-screen > .game-log-summary-strip {
  grid-row: 2;
  padding: 0 max(var(--app-page-padding), var(--app-safe-area-right)) 0 max(var(--app-page-padding), var(--app-safe-area-left));
}

.game-mobile-screen > .game-stage-copy {
  grid-row: 3;
}

.game-mobile-screen > .mobile-stage {
  grid-row: 4;
}

.game-mobile-screen > .game-admin-strip {
  grid-row: 5;
}

.game-mobile-screen > .bottom-actions {
  grid-row: 6;
}

@media (hover: none) and (pointer: coarse) {
  :root {
    --app-bottom-gesture-buffer: 12px;
  }
}

.game-mobile-screen.log-expanded > .game-log-strip {
  display: grid;
}

.game-mobile-screen.log-expanded > .mobile-stage {
  display: none;
}

.game-log-filter-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  padding: 0.35rem 0.45rem;
  border: 1px solid #d9dee6;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.92);
  align-items: center;
}

.game-log-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-size: 0.72rem;
  color: #4c5563;
  white-space: nowrap;
}

.game-log-filter-chip input {
  margin: 0;
}

.game-log-section {
  display: grid;
  gap: 0.35rem;
  align-content: start;
}

.game-log-section-title {
  margin: 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.game-log-item {
  display: grid;
  gap: 0.12rem;
  padding: 0.42rem 0.55rem;
  border: 1px solid #e1e5eb;
  border-radius: 5px;
  background: #ffffff;
  align-content: start;
}

.game-log-item.compact {
  padding: 0.34rem 0.46rem;
  gap: 0.08rem;
}

.game-log-item-head {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.game-log-item-icon {
  width: 1.15rem;
  height: 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #eef2f8;
  flex: 0 0 auto;
  line-height: 1;
}

.game-log-item-title {
  font-weight: 600;
  color: #2d3340;
  font-size: 0.88rem;
}

.game-log-item-meta {
  color: var(--muted);
  font-size: 0.72rem;
}

.game-log-item-body {
  color: #4c5563;
  font-size: 0.8rem;
}

.game-log-item.compact .game-log-item-title {
  font-size: 0.8rem;
}

.game-log-item.compact .game-log-item-meta,
.game-log-item.compact .game-log-item-body {
  font-size: 0.72rem;
}

.results-summary-tabs {
  margin-top: 0.55rem;
}

.results-summary-calculation-status {
  margin: 0;
}

.results-summary-tab-panel {
  display: grid;
  gap: 0.8rem;
  align-content: start;
  min-height: 0;
  min-width: 0;
}

.results-summary-tab-panel.hidden {
  display: none !important;
}

.results-summary-scroll-shell {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 0.1rem;
  cursor: grab;
}

.results-summary-scroll-shell.is-scrollable {
  padding-bottom: 0.75rem;
}

.results-summary-scroll-shell.drag-ready,
.results-summary-scroll-shell.dragging {
  cursor: grabbing;
}

.results-summary-scroll-shell.dragging {
  user-select: none;
}

.results-summary-matrix {
  display: grid;
  grid-template-columns: 118px auto;
  width: auto;
  min-width: max(100%, var(--results-summary-matrix-min-width, 100%));
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.82);
}

.results-summary-data-pane {
  min-width: var(--results-summary-data-pane-min-width, 0px);
  overflow: visible;
}

.results-summary-player-pane {
  display: grid;
  grid-template-rows: auto 1fr;
  border-right: 1px solid var(--line);
  background: #f3f5f8;
}

.results-summary-player-pane-head {
  min-height: 76px;
  display: flex;
  align-items: center;
  padding: 0.45rem 0.5rem;
  font-weight: 700;
  color: #2d3340;
  border-bottom: 1px solid var(--line);
  background: #eef1f6;
}

.results-summary-player-pane-body {
  display: grid;
}

.results-summary-player-pane-body::after {
  content: "";
  display: block;
  height: var(--results-summary-scrollbar-height, 0px);
}

.results-summary-player-row {
  min-height: 58px;
  padding: 0.45rem 0.5rem;
  display: grid;
  align-content: center;
  border-bottom: 1px solid var(--line);
}

.results-summary-player-row.winner {
  box-shadow: inset 0 0 0 2px #78b075;
  background: #eef8ee;
}

.results-summary-table-wrap {
  width: 100%;
  min-width: 0;
  overflow: visible;
  position: relative;
}

.results-summary-table {
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.results-summary-data-table {
  width: 100%;
  min-width: var(--results-summary-data-pane-min-width, max-content);
}

.results-summary-table th,
.results-summary-table td {
  padding: 0.45rem 0.42rem;
  min-width: 72px;
  white-space: nowrap;
  text-align: center;
  vertical-align: middle;
}

.results-summary-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #eef1f6;
}

.results-summary-bonus-column {
  min-width: 118px;
}

.results-summary-math-column,
.results-summary-math-value {
  min-width: 96px;
  text-align: center;
  font-weight: 600;
}

.results-summary-points-column,
.results-summary-points-value {
  min-width: 88px;
  text-align: center;
  font-weight: 600;
}

.results-summary-player-title {
  font-weight: 600;
  color: #2d3340;
}

.results-summary-player-meta {
  color: var(--muted);
  font-size: 0.72rem;
  margin-top: 0.08rem;
}

.results-summary-data-table tbody tr {
  height: 58px;
}

.results-summary-icons {
  min-height: 1.15rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.2rem;
}

.results-summary-icon {
  width: 1.2rem;
  height: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #eef2f8;
  line-height: 1;
}

.results-summary-icon.vote {
  background: #eef4ff;
}

.results-summary-icon.death {
  background: #f8ecec;
}

.results-summary-icon.yellow-card {
  background: #fff6cf;
}

.results-summary-icon.foul {
  background: #fde3e3;
}

.results-summary-icon.like {
  background: #e2f7e8;
}

.results-summary-icon.dislike {
  background: #fde6e6;
}

.results-summary-empty {
  color: #b2b8c3;
}

.results-summary-bonus-input {
  width: 72px;
  min-width: 0;
  padding: 0.42rem 0.45rem;
  text-align: center;
  box-sizing: border-box;
}

.results-summary-bonus-value {
  display: inline-flex;
  min-width: 56px;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0.32rem 0.5rem;
  border-radius: 12px;
  background: #eef1f5;
  color: #2f3541;
}

.results-summary-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.55rem;
}

.results-summary-actions .soft {
  flex: 0 1 auto;
  width: auto;
  min-width: 120px;
}

.publish-results-stage {
  display: grid;
  gap: 0.85rem;
}

.publish-results-card {
  display: grid;
  gap: 0.7rem;
}

.publish-results-link-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.45rem;
  max-width: 100%;
}

.publish-results-link {
  flex: 0 1 auto;
  min-width: min(100%, 14rem);
  max-width: 100%;
  word-break: break-all;
  overflow-wrap: anywhere;
  font-size: 0.95rem;
}

.publish-results-copy-link-button {
  width: 2.35rem;
  min-width: 2.35rem;
  min-height: 2.35rem;
  padding: 0;
  flex: 0 0 auto;
  border: 1px solid #c6ced8;
  background: #f7f8fa;
  color: #263140;
  font-size: 1.05rem;
}

.game-admin-strip {
  padding: 0.3rem max(var(--app-page-padding), var(--app-safe-area-right)) 0 max(var(--app-page-padding), var(--app-safe-area-left));
  background: rgba(244, 244, 245, 0.97);
  border-top: 1px solid rgba(160, 166, 177, 0.18);
  overflow: hidden;
}

.game-admin-strip-inner {
  min-height: 2.2rem;
  padding: 0.32rem 0.4rem;
  border-radius: 16px;
  background: #f2f4f8;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  overflow: hidden;
}

.game-admin-strip-single-action {
  justify-content: stretch;
}

.game-admin-strip-single-action > button {
  width: 100%;
}

.game-admin-strip-inner.compact {
  gap: 0.38rem;
}

.game-admin-strip-toggle {
  min-width: 2.2rem;
  min-height: 2.2rem;
  padding: 0 0.58rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 1rem;
  color: #364052;
  background: #ffffff;
  border: 1px solid rgba(145, 152, 166, 0.28);
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.game-admin-strip-toggle:active {
  transform: scale(0.97);
}

.game-admin-strip-toggle.active {
  background: #dde1e8;
  color: #767d8d;
  border-color: rgba(180, 186, 198, 0.85);
}

.game-admin-strip-spacer {
  flex: 1 1 auto;
  min-width: 0;
}

.game-admin-strip-region {
  min-width: 0;
  display: flex;
  align-items: center;
}

.game-admin-strip-inner.compact .game-admin-strip-region {
  overflow: hidden;
  flex: 0 1 auto;
  transition: max-width 0.22s ease, opacity 0.18s ease, transform 0.22s ease, margin 0.22s ease;
  will-change: max-width, opacity, transform;
}

.game-admin-strip-inner.compact .game-admin-strip-region.collapsed {
  max-width: 0;
  opacity: 0;
  pointer-events: none;
}

.game-admin-strip-inner.compact .game-admin-strip-region-timer.expanded {
  max-width: 13.5rem;
  opacity: 1;
  transform: translateX(0);
}

.game-admin-strip-inner.compact .game-admin-strip-region-timer.collapsed {
  transform: translateX(-0.45rem);
}

.game-admin-strip-inner.compact .game-admin-strip-region-actions.expanded {
  max-width: 18.5rem;
  opacity: 1;
  transform: translateX(0);
}

.game-admin-strip-inner.compact .game-admin-strip-region-actions.collapsed {
  transform: translateX(0.45rem);
}

.game-admin-strip-copy {
  min-width: 0;
  flex: 0 1 auto;
  color: #8b95a8;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.game-admin-strip-copy.active {
  color: #5b6372;
}

.round-day-timer-settings {
  display: grid;
  gap: 0.65rem;
  margin: 0.25rem 0 0.45rem 1.6rem;
}

.game-admin-strip-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.42rem;
  flex-wrap: nowrap;
  margin-left: auto;
  overflow-x: auto;
  max-width: 100%;
}

.game-admin-strip-inner.compact .game-admin-strip-actions {
  margin-left: 0;
  justify-content: flex-start;
  scrollbar-width: none;
}

.game-admin-strip-inner.compact .game-admin-strip-actions::-webkit-scrollbar {
  display: none;
}

.round-day-inline-timer {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  flex: 0 0 auto;
}

.game-admin-strip-inner.compact .round-day-inline-timer {
  gap: 0.28rem;
}

.round-day-inline-timer-display {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.6rem;
  min-height: 2.2rem;
  padding: 0 0.72rem;
  border: 1px solid rgba(160, 166, 177, 0.28);
  border-radius: 12px;
  background: #ffffff;
  color: #2d3644;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.game-admin-strip-inner.compact .round-day-inline-timer-display {
  min-width: 4.25rem;
  padding: 0 0.62rem;
}

.round-day-inline-timer-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.round-day-inline-timer-button {
  min-width: 2.1rem;
  min-height: 2.1rem;
  padding: 0 0.5rem;
  font-size: 0.92rem;
}

.game-admin-action-button-icon {
  min-width: 2.2rem;
  padding: 0 0.58rem;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.game-admin-action-button.active {
  background: #d8e6ff;
  color: #335d9d;
  border-color: #aec7f3;
  border-width: 2px;
  border-style: solid;
  box-shadow: inset 0 0 0 1px rgba(84, 124, 191, 0.08);
}

.game-admin-action-button .game-board-sanction {
  pointer-events: none;
}

.game-admin-action-button .game-board-sanction-yellow-card {
  width: 0.62rem;
  height: 0.94rem;
}

.game-admin-action-button .game-board-sanction-foul {
  width: 0.5rem;
  height: 0.88rem;
}

.game-admin-action-button.admin-text {
  min-width: 4.5rem;
  width: auto;
  font-size: 0.82rem;
}

.game-opinion-action-button-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: grayscale(1) saturate(0.08);
}

.round-day-player.admin-mode {
  padding-right: 0;
}

.game-board-admin-edit-button {
  position: absolute;
  top: 0.24rem;
  right: 0.24rem;
  width: 1.24rem;
  height: 1.24rem;
  border-radius: 999px;
  border: 1px solid #d6dce5;
  background: rgba(255, 255, 255, 0.96);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.74rem;
  z-index: 4;
}

.round-day-player.roles-hidden {
  background: #eceef2 !important;
}

.round-day-player.roles-hidden .intro-night-meta {
  visibility: hidden;
}

.host-kill-reason-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: center;
  padding: 0.42rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
}

.host-kill-reason-item.hidden-reason {
  opacity: 0.56;
}

.host-kill-reason-item-label {
  color: #2d3340;
}

.host-kill-reason-input {
  min-width: 0;
  width: 100%;
  padding: 0.42rem 0.5rem;
}

.game-admin-player-modal-card {
  width: min(520px, 100%);
  max-width: 520px;
  max-height: calc(100dvh - 2rem);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.game-admin-player-modal-body {
  display: grid;
  gap: 0.8rem;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.15rem;
}

#game-admin-player-modal-backdrop,
#game-admin-role-picker-modal-backdrop,
#game-admin-foul-editor-modal-backdrop {
  align-items: start;
  justify-items: center;
  padding-top: max(0.9rem, env(safe-area-inset-top) + 0.45rem);
  padding-bottom: max(0.9rem, env(safe-area-inset-bottom) + 0.45rem);
}

.game-admin-player-editor-card {
  display: grid;
  gap: 0.72rem;
  padding: 0.2rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
}

.game-admin-player-editor-row {
  display: grid;
  gap: 0.36rem;
}

.game-admin-player-editor-row-head {
  gap: 0.5rem;
}

.game-admin-player-editor-label {
  color: #4d5563;
  font-size: 0.98rem;
}

.game-admin-player-editor-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.15rem 0;
}

.game-admin-player-editor-headline strong {
  min-width: 0;
  font-size: 1rem;
  color: #2d3340;
  overflow-wrap: anywhere;
}

.game-admin-player-editor-actions {
  display: flex;
  gap: 0.4rem;
  flex: 0 0 auto;
}

.game-admin-player-editor-actions .soft-danger,
.game-admin-player-editor-actions .soft {
  min-height: 30px;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
}

.game-admin-player-editor-value,
.game-admin-player-editor-state {
  width: 100%;
  min-height: 38px;
  padding: 0.58rem 0.85rem;
  border: 1px solid rgba(210, 216, 226, 0.9);
  border-radius: 999px;
  background: #eef1f5;
  color: #2f3541;
}

.game-admin-player-editor-value {
  text-align: left;
}

.game-admin-player-editor-value-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.game-admin-player-editor-value:hover {
  transform: none;
  background: #e5ebf4;
}

.game-admin-player-editor-state {
  display: grid;
  gap: 0.35rem;
  border-radius: 18px;
}

.game-admin-player-state-list {
  display: grid;
  gap: 0.35rem;
}

.game-admin-player-state-item,
.game-admin-player-state-empty {
  color: #4c5563;
  font-size: 0.84rem;
  line-height: 1.24;
}

.game-admin-player-state-item-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.game-admin-player-state-edit-button {
  flex: 0 0 auto;
  width: 2.2rem;
  min-width: 2.2rem;
  height: 2.2rem;
  padding: 0;
  border-radius: 12px;
  font-size: 1rem;
}

.game-admin-player-state-empty {
  text-align: center;
  color: #778091;
}

.game-admin-player-kill-panel {
  display: grid;
  gap: 0.55rem;
  padding: 0.85rem;
  border: 1px solid #f0c5c5;
  border-radius: 18px;
  background: #fff7f7;
}

.game-admin-player-kill-copy {
  color: #7b3e49;
  font-size: 0.88rem;
  font-weight: 600;
}

.game-admin-player-kill-reasons {
  display: grid;
  gap: 0.45rem;
}

.game-admin-player-kill-reason {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  padding: 0.58rem 0.8rem;
  border-radius: 999px;
}

.game-admin-player-kill-reason.active {
  background: #efc0c0;
}

.game-admin-role-picker-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.game-admin-role-picker-grid .role-item {
  min-height: 42px;
}

.game-admin-effects-list {
  display: grid;
  gap: 0.35rem;
}

.game-admin-effect-item {
  padding: 0.42rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: #4c5563;
  font-size: 0.8rem;
}

.game-admin-effect-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.game-admin-effect-item-text {
  min-width: 0;
  flex: 1 1 auto;
}

.game-admin-effect-edit-button {
  flex: 0 0 auto;
}

.game-admin-foul-item {
  display: grid;
  gap: 0.45rem;
  padding: 0.55rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.game-admin-foul-item-meta {
  color: #70798a;
  font-size: 0.78rem;
}

.results-summary-log-panel {
  position: static;
  min-height: 0;
  height: auto;
}

.results-summary-player-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
}

.results-summary-player-nav {
  display: flex;
  gap: 0.4rem;
}

.results-summary-player-identity {
  margin: 0;
  font-weight: 600;
  color: #2f3541;
}

.results-summary-player-log {
  display: grid;
  gap: 0.45rem;
  align-content: start;
}

.results-summary-player-result {
  border-color: #d8e1ef;
  background: #f6f9ff;
}

.view[data-view="game-statistics"] {
  padding: 0;
  overflow: hidden;
  align-content: stretch;
  grid-auto-rows: minmax(0, 1fr);
  min-height: 0;
}

.game-statistics-screen {
  background: #f4f4f5;
}

.game-statistics-header-main {
  min-width: 0;
}

.game-statistics-header-main .muted {
  margin: 0.18rem 0 0;
  overflow-wrap: anywhere;
}

.game-statistics-stage {
  display: grid;
  align-content: start;
  gap: 0.85rem;
  min-height: 0;
}

.game-statistics-summary-panel,
.game-statistics-filter-panel,
.game-statistics-list-panel,
.game-statistics-session-nav {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid rgba(160, 166, 177, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.game-statistics-summary-panel {
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto;
  align-items: center;
}

.game-statistics-summary-panel .label,
.game-statistics-list-panel .label {
  margin: 0 0 0.12rem;
}

.game-statistics-summary-panel strong {
  font-size: calc(1.04rem * var(--ui-screen-text-scale));
}

#game-statistics-active-filters {
  margin: 0;
  overflow-wrap: anywhere;
}

.game-statistics-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: stretch;
}

.game-statistics-toolbar .app-inline-dropdown,
.game-statistics-toolbar button,
.game-statistics-achievements-toolbar .app-inline-dropdown {
  min-width: 0;
}

.game-statistics-range-nav {
  display: inline-flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.game-statistics-range-nav .compact-action-button {
  min-width: 48px;
  min-height: 48px;
  height: 48px;
}

.game-statistics-inline-dropdown {
  width: 100%;
}

.app-inline-dropdown {
  position: relative;
}

.app-inline-dropdown-trigger {
  width: 100%;
  justify-content: space-between;
  text-align: left;
}

.app-inline-dropdown-trigger::after {
  content: "▾";
  margin-left: 0.65rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.app-inline-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  z-index: 45;
  display: grid;
  gap: 0.35rem;
  width: max-content;
  min-width: min(22rem, 100%);
  max-width: min(26rem, calc(100vw - 2rem));
  max-height: min(22rem, calc(100dvh - 8rem));
  overflow-y: auto;
  padding: 0.45rem;
  border: 1px solid #d6ddea;
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: 0 1rem 2.5rem rgba(35, 51, 84, 0.16);
}

.app-inline-dropdown-option {
  justify-content: flex-start;
  text-align: left;
  white-space: normal;
}

.game-statistics-toolbar button {
  min-width: 0;
}

.game-statistics-achievements-toolbar .app-inline-dropdown-trigger,
.game-statistics-toolbar .soft {
  min-height: 48px;
  display: flex;
  align-items: center;
}

.game-statistics-achievements-toolbar {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-left: 0;
  flex: 0 1 min(24rem, 100%);
}

.results-summary-achievements-toolbar {
  margin-top: 0.55rem;
}

#game-statistics-achievement-kind-dropdown {
  width: min(24rem, 100%);
}

#game-statistics-achievement-kind-dropdown .app-inline-dropdown-menu,
#game-results-summary-achievement-kind-dropdown .app-inline-dropdown-menu {
  left: 0;
  right: auto;
  width: min(24rem, calc(100vw - 2rem));
  max-width: calc(100vw - 2rem);
}

#game-results-summary-achievement-kind-dropdown {
  width: min(24rem, 100%);
}

.app-inline-dropdown-trigger::after {
  content: "\25BE";
}

@media (max-width: 860px) {
  .game-statistics-toolbar {
    grid-template-columns: 1fr;
  }

  .game-statistics-range-nav {
    width: 100%;
  }

  .game-statistics-range-nav > button {
    flex: 1 1 auto;
  }

  .game-statistics-achievements-toolbar {
    width: 100%;
    flex-direction: row;
    align-items: stretch;
  }

  #game-statistics-achievement-kind-dropdown {
    width: 100%;
  }

  #game-results-summary-achievement-kind-dropdown {
    width: 100%;
  }
}

.game-statistics-loading {
  margin-bottom: 0.65rem;
}

.game-statistics-table-wrap {
  margin-top: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.game-statistics-state-row td {
  border-bottom: none;
  padding: 1rem;
}

.game-statistics-state-card {
  display: grid;
  gap: 0.35rem;
  justify-items: center;
  padding: 1.2rem;
  border: 1px dashed #ccd3de;
  border-radius: 8px;
  background: #f7f9fc;
  text-align: center;
}

.game-statistics-state-card p {
  margin: 0;
}

.game-statistics-state-row.is-error .game-statistics-state-card,
.game-statistics-state-card.is-error {
  border-color: #e0aaa9;
  background: #fff3f3;
}

.game-statistics-state-row.is-locked .game-statistics-state-card,
.game-statistics-state-row.is-loading .game-statistics-state-card,
.game-statistics-state-card.is-loading,
.game-statistics-state-card.is-locked {
  border-color: #c9d7ea;
  background: #f5f8fd;
}

.inline-loading-with-progress {
  display: grid;
  gap: 0.5rem;
  width: min(28rem, 100%);
}

.inline-loading-with-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.inline-loading-with-progress-text {
  margin: 0;
}

.inline-loading-with-progress-percent {
  margin: 0;
  min-width: 3.5rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.inline-loading-progress-track {
  position: relative;
  width: 100%;
  height: 0.42rem;
  border-radius: 999px;
  overflow: hidden;
  background: #e6ecf5;
  box-shadow: inset 0 0 0 1px rgba(88, 106, 138, 0.08);
}

.inline-loading-progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f5fa9 0%, #5c84d6 100%);
  transition: width 180ms ease;
}

.game-statistics-overview,
.game-statistics-session-view,
.game-statistics-achievements {
  display: grid;
  gap: 0.75rem;
}

.game-statistics-achievement-list {
  display: grid;
  gap: 0.8rem;
}

.game-statistics-achievement-card {
  display: grid;
  gap: 0.6rem;
}

.game-statistics-achievement-card h3,
.game-statistics-achievement-card .muted,
.game-statistics-achievement-description {
  margin: 0;
}

.game-statistics-achievement-points {
  min-width: 4rem;
  text-align: right;
  font-weight: 700;
  color: #2d3340;
}

.game-statistics-achievement-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.game-statistics-achievement-table th:first-child,
.game-statistics-achievement-table td:first-child {
  text-align: left;
  min-width: 140px;
}

.game-statistics-overview-table th,
.game-statistics-overview-table td {
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.game-statistics-overview-table th {
  background: #f3f5f8;
  color: #687180;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.game-statistics-sort-button {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  font-weight: 700;
  text-align: inherit;
  cursor: pointer;
}

.game-statistics-sort-button.active {
  color: #244f93;
}

.game-statistics-sort-button:hover,
.game-statistics-sort-button:focus-visible {
  color: #244f93;
}

.game-statistics-overview-table {
  width: 100%;
  table-layout: fixed;
}

.game-statistics-overview-table th:first-child,
.game-statistics-overview-table td:first-child {
  text-align: left;
  width: 4.5rem;
  min-width: 4.5rem;
}

.game-statistics-overview-table th:nth-child(2),
.game-statistics-overview-table td:nth-child(2) {
  min-width: 120px;
}

.game-statistics-overview-table th:nth-child(3),
.game-statistics-overview-table td:nth-child(3),
.game-statistics-overview-table th:nth-child(4),
.game-statistics-overview-table td:nth-child(4),
.game-statistics-overview-table th:nth-child(5),
.game-statistics-overview-table td:nth-child(5),
.game-statistics-overview-table th:nth-child(6),
.game-statistics-overview-table td:nth-child(6) {
  width: 4.75rem;
  text-align: right;
}

.game-statistics-player-cell {
  font-weight: 600;
  color: #2d3340;
}

.game-statistics-player-button,
.game-statistics-points-button,
.game-statistics-math-button {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  color: #2f5fa9;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.game-statistics-player-button:hover,
.game-statistics-player-button:focus-visible,
.game-statistics-points-button:hover,
.game-statistics-points-button:focus-visible,
.game-statistics-math-button:hover,
.game-statistics-math-button:focus-visible {
  color: #1e447d;
}

.game-statistics-session-head {
  display: grid;
  gap: 0.5rem;
}

.game-statistics-session-nav {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.game-statistics-session-arrow-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.game-statistics-session-head .muted {
  margin: 0;
}

.game-statistics-session-meta {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(160, 166, 177, 0.18);
  border-radius: 8px;
  background: #f7f9fc;
}

.game-statistics-session-meta .label {
  margin: 0 0 0.12rem;
}

.game-statistics-session-meta strong {
  display: block;
  color: #2d3340;
}

.game-statistics-session-meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.85rem;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 0.92rem;
}

.app-date-picker-modal-card {
  width: min(560px, calc(100vw - 1.5rem));
  max-height: calc(100dvh - 1.5rem);
  overflow: auto;
  display: grid;
  gap: 0.85rem;
}

.app-date-picker-month-nav {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
}

.app-date-picker-month-nav strong {
  text-align: center;
  text-transform: capitalize;
}

.app-date-picker-weekdays,
.app-date-picker-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.4rem;
}

.app-date-picker-weekdays {
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.app-date-picker-day-placeholder {
  min-height: 2.8rem;
}

.app-date-picker-day-button {
  min-height: 2.8rem;
  padding: 0.4rem;
}

.app-date-picker-day-button.active {
  background: #dbe7fb;
  border-color: #92b4eb;
  color: #224474;
}

.app-date-picker-day-button.today {
  box-shadow: inset 0 0 0 1px rgba(78, 109, 160, 0.28);
}

.app-date-picker-time-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.game-statistics-range-picker-card {
  width: min(520px, calc(100vw - 1.5rem));
  max-height: calc(100dvh - 1.5rem);
  overflow: auto;
}

@media (max-width: 640px) {
  .app-date-picker-time-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-period-fields,
  .app-period-quarter-fields,
  .app-period-range-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-period-mode-tabs .soft {
    flex: 1 1 calc(50% - 0.45rem);
  }
}

.game-statistics-picker-modes {
  margin-top: 0;
}

.app-period-picker {
  display: grid;
  gap: 0.75rem;
}

.app-period-mode-tabs {
  margin-top: 0;
  gap: 0.45rem;
}

.app-period-mode-tabs .soft {
  min-height: 2.45rem;
  padding-inline: 0.8rem;
}

.app-period-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: end;
}

.app-period-fields label,
.app-period-quarter-fields label,
.app-period-range-fields label {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.app-period-quarter-fields,
.app-period-range-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: end;
}

.game-archive-period-picker {
  margin-bottom: 0.2rem;
}

.game-statistics-picker-fields {
  display: grid;
  gap: 0.75rem;
}

.game-statistics-range-fields {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 640px) {
  .app-period-fields,
  .app-period-quarter-fields,
  .app-period-range-fields,
  .game-statistics-range-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-period-mode-tabs .soft {
    flex: 1 1 calc(50% - 0.45rem);
  }
}

.game-statistics-picker-games {
  display: grid;
  gap: 0.5rem;
}

.game-statistics-picker-games .muted {
  margin: 0;
}

.game-statistics-points-modal-card {
  width: min(760px, calc(100vw - 1.5rem));
  max-height: calc(100dvh - 1.5rem);
  overflow: auto;
}

.player-statistics-modal-card {
  width: min(1440px, calc(100vw - 1rem));
  max-height: calc(100dvh - 1rem);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.85rem;
  overflow: hidden;
  background: #f4f4f5;
}

.role-mechanic-description-modal-card {
  width: min(960px, calc(100vw - 1rem));
  max-height: calc(100dvh - 1rem);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0.85rem;
  overflow: hidden;
}

.base-mechanic-description-modal-card {
  width: min(1120px, calc(100vw - 1rem));
  max-height: calc(100dvh - 1rem);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0.85rem;
  overflow: hidden;
}

.role-mechanic-description-modal-body,
.base-mechanic-description-modal-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.2rem 0.35rem 0.2rem 0;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.player-statistics-modal-head {
  margin-bottom: 0;
}

.player-statistics-modal-body {
  display: grid;
  gap: 0.9rem;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 0.2rem;
  scrollbar-width: thin;
}

.player-statistics-modal-shell {
  display: grid;
  gap: 0.85rem;
  min-width: 0;
}

.player-statistics-overview-panel,
.player-statistics-panel {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid rgba(160, 166, 177, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.player-statistics-overview-panel {
  grid-template-columns: minmax(220px, auto) minmax(0, 1fr);
  align-items: stretch;
}

.player-statistics-player-title {
  display: grid;
  align-content: center;
  gap: 0.2rem;
  min-width: 0;
}

.player-statistics-player-title .label,
.player-statistics-panel .label {
  margin: 0 0 0.05rem;
}

.player-statistics-player-title strong {
  color: #2d3340;
  font-size: calc(1.24rem * var(--ui-screen-text-scale));
  overflow-wrap: anywhere;
}

.player-statistics-player-title .muted {
  margin: 0;
}

.player-statistics-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.player-statistics-kpi-card {
  display: grid;
  gap: 0.22rem;
  align-content: center;
  min-height: 4.2rem;
  padding: 0.72rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9fc;
}

.player-statistics-kpi-card strong {
  color: #2d3340;
  font-size: calc(1.08rem * var(--ui-screen-text-scale));
}

.player-statistics-refresh-line {
  grid-column: 1 / -1;
  padding-top: 0.1rem;
}

.player-statistics-top-cards {
  margin-top: 0;
}

.player-statistics-top-cards .mini-card {
  min-width: 180px;
}

.player-statistics-summary-grid,
.player-statistics-duo-grid,
.player-statistics-summary-stack {
  display: grid;
  gap: 0.9rem;
}

.player-statistics-summary-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
}

.player-statistics-duo-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.player-statistics-summary-stack {
  grid-template-columns: minmax(0, 1fr);
}

.player-statistics-summary-card,
.player-statistics-chart-card,
.player-statistics-history-card {
  display: grid;
  gap: 0.85rem;
}

.player-statistics-summary-table-wrap {
  margin-top: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.player-statistics-summary-table {
  width: 100%;
  table-layout: fixed;
}

.player-statistics-summary-table th,
.player-statistics-summary-table td {
  padding: 0.68rem 0.75rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.player-statistics-summary-table th {
  background: #f3f5f8;
  color: #687180;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.player-statistics-summary-table th:nth-child(n+2),
.player-statistics-summary-table td:nth-child(n+2) {
  width: 5rem;
  text-align: right;
}

.player-statistics-state-card {
  display: grid;
  gap: 0.35rem;
  justify-items: center;
  padding: 1.1rem;
  border: 1px dashed #ccd3de;
  border-radius: 8px;
  background: #f7f9fc;
  text-align: center;
}

.player-statistics-state-card p {
  margin: 0;
}

.player-statistics-state-card.is-error {
  border-color: #e0aaa9;
  background: #fff3f3;
}

.player-statistics-state-card.is-loading {
  border-color: #c9d7ea;
  background: #f5f8fd;
}

.player-statistics-side-list {
  display: grid;
  gap: 0.7rem;
}

.player-statistics-side-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(60, 76, 98, 0.14);
  border-radius: 8px;
  background: rgba(253, 254, 255, 0.96);
}

.player-statistics-side-swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--side-color, #d9dde3);
  box-shadow: 0 0 0 1px rgba(44, 58, 77, 0.12);
}

.player-statistics-chart-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.player-statistics-chart-filter-panel {
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid rgba(160, 166, 177, 0.18);
  border-radius: 8px;
  background: #f7f9fc;
}

.player-statistics-chart-filters label,
.player-statistics-quarter-fields {
  display: grid;
  gap: 0.35rem;
}

.player-statistics-quarter-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
}

.player-statistics-chart-toggle-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem 1rem;
}

.player-statistics-selection-panel {
  display: grid;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(60, 76, 98, 0.12);
  border-radius: 8px;
  background: rgba(252, 253, 255, 0.95);
}

.player-statistics-selection-group {
  display: grid;
  gap: 0.55rem;
}

.player-statistics-selection-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.player-statistics-chart-wrap {
  min-height: 0;
  height: auto;
  padding: 0.75rem 0.75rem 0.35rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.player-statistics-chart-shell {
  display: grid;
  gap: 0.8rem;
}

.player-statistics-chart-svg {
  display: block;
  width: 100%;
  height: auto;
}

.player-statistics-chart-axis-line {
  stroke: rgba(89, 102, 126, 0.5);
  stroke-width: 1.4;
}

.player-statistics-chart-axis-line.subtle {
  stroke: rgba(89, 102, 126, 0.28);
}

.player-statistics-chart-grid-line {
  stroke: rgba(120, 131, 149, 0.16);
  stroke-width: 1;
}

.player-statistics-chart-zero-line {
  stroke: rgba(225, 97, 97, 0.5);
  stroke-width: 1.4;
  stroke-dasharray: 6 6;
}

.player-statistics-chart-axis-tick {
  stroke: rgba(89, 102, 126, 0.4);
  stroke-width: 1;
}

.player-statistics-chart-axis-label {
  fill: #6f7885;
  font-size: 13px;
  font-weight: 500;
}

.player-statistics-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
}

.player-statistics-chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #3d4450;
  font-size: 0.92rem;
}

.player-statistics-chart-legend-line {
  display: inline-block;
  width: 28px;
  height: 0;
  border-top: 3px solid var(--legend-color, #2f5fa9);
  border-radius: 999px;
}

.player-statistics-chart-legend-line.dash {
  border-top-style: dashed;
}

.player-statistics-chart-legend-line.dot {
  border-top-style: dotted;
}

.player-statistics-chart-empty {
  display: grid;
  place-items: center;
  min-height: 240px;
  text-align: center;
}

.player-statistics-history-pagination {
  margin-top: 0.1rem;
}

.public-archive-results-modal-card {
  width: min(1280px, calc(100vw - 1.5rem));
  max-height: calc(100dvh - 1.5rem);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.85rem;
  overflow: hidden;
}

.public-archive-results-body {
  display: grid;
  gap: 0.85rem;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 0.2rem;
  scrollbar-width: thin;
}

.round-vote-editor-modal-card {
  width: 100%;
  height: 100dvh;
  max-height: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 0;
  padding: 1rem 1.2rem;
  box-shadow: none;
  background: #f5f6f8;
}

#round-vote-editor-modal-backdrop {
  place-items: stretch;
  padding: 0;
  overflow: hidden;
  background: rgba(238, 241, 246, 0.96);
}

.round-vote-editor-modal-head {
  display: block;
  margin-bottom: 0;
}

.round-vote-editor-head-copy {
  min-width: 0;
  display: grid;
  gap: 0.55rem;
}

.round-vote-editor-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.round-vote-editor-head-copy h3 {
  margin: 0;
  min-width: 0;
}

.round-vote-editor-round-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.round-vote-editor-round-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-right: auto;
}

.round-vote-editor-round-toolbar select {
  min-width: 11rem;
  width: auto;
}

.round-vote-editor-body {
  min-height: auto;
  display: grid;
  align-content: start;
  gap: 0.75rem;
  overflow: visible;
  padding-right: 0;
  scrollbar-width: auto;
}

.round-vote-editor-stage-copy {
  gap: 0.7rem;
  padding-bottom: 0.7rem;
}

.round-vote-editor-stage-toolbar {
  width: 100%;
  margin-top: 0.1rem;
}

.round-vote-editor-stage-mode-copy {
  margin-top: -0.05rem;
}

#round-vote-editor-stage-scroll-region {
  scroll-padding-top: 0;
}

.round-vote-editor-stage-scroll {
  padding-top: 0.75rem;
  padding-bottom: 0.85rem;
  align-content: start;
}

.round-vote-editor-stage-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
}

.round-vote-editor-invert-check {
  flex: 0 0 auto;
  white-space: nowrap;
}

.round-vote-editor-mode-buttons {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.round-vote-editor-mode-buttons .soft.active {
  border-color: #7ea7e4;
  background: #e8f0fc;
  color: #254a82;
  box-shadow: inset 0 0 0 1px rgba(67, 109, 177, 0.16);
}

.round-vote-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  align-items: start;
}

.round-vote-editor-grid-heading {
  min-width: 0;
  display: flex;
  align-items: flex-end;
  margin-bottom: -0.15rem;
  color: #3d4450;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
}

.round-vote-editor-column {
  min-width: 0;
  display: grid;
  gap: 0.55rem;
  align-content: start;
}

.round-vote-editor-target-column {
  position: relative;
  z-index: 0;
}

.round-vote-editor-target-column::before {
  content: "";
  position: absolute;
  inset: -0.3rem -0.35rem;
  border-radius: 20px;
  background: #edf3fb;
  border: 1px solid #dce6f4;
  z-index: -1;
  pointer-events: none;
}

.round-vote-editor-player-list {
  display: grid;
  gap: 0.55rem;
  align-content: start;
}

.round-vote-editor-player-card {
  width: 100%;
  text-align: left;
}

.round-vote-editor-player-card .game-board-card-body {
  min-height: 4.2rem;
}

.round-vote-editor-player-card.selected-role {
  border-color: #7ea7e4;
  background: #e8f0fc;
  box-shadow: inset 0 0 0 1px rgba(67, 109, 177, 0.16);
}

.round-vote-editor-player-card.selected {
  border-color: #96c7a8;
  background: #ebf7f0;
  box-shadow: inset 0 0 0 1px rgba(60, 129, 84, 0.14);
}

.round-vote-editor-player-card.dead-at-vote {
  border-color: #d38b49;
  box-shadow: inset 0 0 0 1px rgba(184, 102, 38, 0.2);
}

.round-vote-editor-player-card.muted {
  opacity: 0.58;
}

.round-vote-editor-relation {
  display: block;
  color: #2e6b43;
  font-weight: 600;
  white-space: pre-line;
  line-height: 1.35;
}

.round-vote-editor-relation-votes {
  color: #5e6a7e;
  font-weight: 500;
}

.round-vote-editor-relation-result {
  color: #8b3131;
}

.round-vote-editor-relation-dead-at-vote {
  color: #a64f18;
  font-weight: 700;
}

.round-vote-editor-footer {
  gap: 0.55rem;
  margin-top: auto;
}

.round-vote-editor-footer .bottom-row {
  align-items: stretch;
  justify-content: space-between;
  gap: 0.7rem;
  flex-wrap: nowrap;
}

.round-vote-editor-footer .bottom-row > * {
  min-width: 0;
}

.round-vote-editor-warning-button {
  flex: 0 0 auto;
  width: 2.6rem;
  min-width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-color: #efcf8d;
  background: #fff5da;
  color: #8a5b0d;
}

.round-vote-editor-warning-icon {
  color: #d7a021;
  font-size: 1.05rem;
  line-height: 1;
}

.round-vote-editor-admin-button {
  min-width: 11rem;
  padding-inline: 0.8rem;
  font-size: 0.78rem;
  white-space: nowrap;
}

.game-statistics-points-modal-head {
  justify-content: flex-end;
  margin-bottom: 0.35rem;
}

.game-statistics-points-player-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem 1.4rem;
}

.game-statistics-points-total-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-size: 1rem;
  color: #2d3340;
}

.game-statistics-points-summary {
  display: grid;
  gap: 0.45rem;
}

.game-statistics-points-table-wrap {
  max-width: 100%;
}

.game-statistics-points-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.inline-info-button {
  flex: 0 0 auto;
}

.game-statistics-points-table th,
.game-statistics-points-table td {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.game-statistics-points-table th:first-child,
.game-statistics-points-table td:first-child {
  text-align: left;
  min-width: 220px;
}

.game-statistics-points-table th:nth-child(2),
.game-statistics-points-table td:nth-child(2),
.game-statistics-points-table th:nth-child(3),
.game-statistics-points-table td:nth-child(3) {
  width: 7rem;
}

@media (max-width: 640px) {
  .game-statistics-overview-table th,
  .game-statistics-overview-table td {
    min-width: 0;
    padding: 0.55rem 0.28rem;
    font-size: 0.92rem;
  }

  .game-statistics-overview-table th:first-child,
  .game-statistics-overview-table td:first-child {
    width: 3rem;
    min-width: 3rem;
  }

  .game-statistics-overview-table th:nth-child(2),
  .game-statistics-overview-table td:nth-child(2) {
    min-width: 0;
    width: 6.2rem;
  }

  .game-statistics-overview-table th:nth-child(3),
  .game-statistics-overview-table td:nth-child(3),
  .game-statistics-overview-table th:nth-child(4),
  .game-statistics-overview-table td:nth-child(4),
  .game-statistics-overview-table th:nth-child(5),
  .game-statistics-overview-table td:nth-child(5),
  .game-statistics-overview-table th:nth-child(6),
  .game-statistics-overview-table td:nth-child(6) {
    width: 3.9rem;
  }

  .game-statistics-points-modal-card {
    width: min(100vw - 1rem, 760px);
    padding: 0.85rem;
    border-radius: 22px;
  }

  .player-statistics-modal-card {
    width: min(100vw - 0.75rem, 1440px);
    padding: 0.85rem;
    border-radius: 22px;
  }

  .role-mechanic-description-modal-card,
  .base-mechanic-description-modal-card {
    width: min(100vw - 0.75rem, 1120px);
    max-height: calc(100dvh - 0.75rem);
    padding: 0.85rem;
    border-radius: 22px;
  }

  .public-archive-results-modal-card {
    width: min(100vw - 1rem, 1280px);
    padding: 0.85rem;
    border-radius: 22px;
  }

  .round-vote-editor-modal-card {
    padding: 0.85rem;
  }

  .game-statistics-points-player-line {
    gap: 0.35rem 0.8rem;
  }

  .game-statistics-points-total-line {
    font-size: 0.95rem;
  }

  .game-statistics-points-table th,
  .game-statistics-points-table td {
    padding: 0.55rem 0.4rem;
    font-size: 0.9rem;
  }

  .game-statistics-points-table th:first-child,
  .game-statistics-points-table td:first-child {
    min-width: 0;
    width: auto;
  }

  .game-statistics-points-table th:nth-child(2),
  .game-statistics-points-table td:nth-child(2),
  .game-statistics-points-table th:nth-child(3),
  .game-statistics-points-table td:nth-child(3) {
    width: 5.5rem;
  }

  .round-vote-editor-round-toolbar {
    width: 100%;
  }

  .round-vote-editor-round-toolbar select {
    min-width: 0;
    flex: 1 1 11rem;
  }

  .round-vote-editor-admin-button {
    min-width: 0;
    font-size: 0.74rem;
  }
}

.game-log-button.active {
  background: #cfd7e6;
}

.game-board-markers {
  position: static;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.2rem;
  min-width: 0;
  max-width: 100%;
  pointer-events: none;
}

.game-board-sanctions {
  position: absolute;
  right: 0.46rem;
  top: -0.22rem;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 0.1rem;
  max-width: calc(100% - 3rem);
  pointer-events: none;
  z-index: 3;
}

.round-day-player.admin-mode .game-board-sanctions {
  right: 2.02rem;
  max-width: calc(100% - 4.5rem);
}

.game-board-sanction {
  display: inline-block;
  flex: 0 0 auto;
  opacity: 0.85;
}

.game-board-sanction-group {
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
  border-radius: 0.28rem;
  padding: 0.02rem 0.08rem;
}

.game-board-sanction-group.is-emphasized {
  border: 2px solid #e02020;
}

.game-board-sanction-group.is-foul {
  padding-top: 0.01rem;
  padding-bottom: 0.01rem;
}

.game-board-sanction-yellow-card {
  width: 0.44rem;
  height: 0.66rem;
  border-radius: 0.12rem;
  background: linear-gradient(180deg, #ffe680 0%, #f4c73f 100%);
  box-shadow: 0 1px 2px rgba(57, 49, 16, 0.18);
  transform: rotate(7deg);
}

.game-board-sanction-foul {
  width: 0.34rem;
  height: 0.62rem;
  border-radius: 0.08rem;
  background: linear-gradient(180deg, #ff7c7c 0%, #db3636 100%);
  box-shadow: 0 1px 2px rgba(89, 20, 20, 0.18);
  transform: skewX(-15deg);
}

#game-type-likes-dislikes-settings {
  margin-top: -0.15rem;
  padding-left: 1.55rem;
}

.game-board-marker {
  min-height: 16px;
  padding: 0 0.32rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #d9e5f7;
  color: #40506a;
  font-size: calc(0.61rem * var(--ui-player-card-text-scale));
  font-weight: 700;
  line-height: 1;
}

.game-board-marker-dead {
  background: #ebc2cb;
  color: #7b2e43;
}

.game-board-marker-warning {
  background: #f2dcb0;
  color: #735215;
}

.game-board-marker-info {
  background: #d9e5f7;
  color: #40506a;
}

.game-board-stage-icons {
  position: static;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.16rem;
  min-width: 0;
  max-width: 100%;
  pointer-events: none;
}

.game-board-stage-icon {
  width: calc(1.02rem * var(--ui-mechanic-icon-scale));
  height: calc(1.02rem * var(--ui-mechanic-icon-scale));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(196, 204, 216, 0.95);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 1px 4px rgba(34, 38, 45, 0.12);
  font-size: calc(0.74rem * var(--ui-mechanic-icon-scale));
  line-height: 1;
}

.intro-night-player.selected {
  background: #9ec6f4;
  border-color: #7eaee5;
}

.round-day-player {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: stretch;
  row-gap: 0.05rem;
  width: 100%;
  min-height: 52px;
  padding: 0;
}

.round-day-player.selected-role {
  border-color: #5d8fd6;
  box-shadow: 0 0 0 2px rgba(93, 143, 214, 0.18);
}

.round-day-player.stage-emphasized {
  border-width: 3px;
  border-style: solid;
  border-color: #b55a67;
  box-shadow: 0 0 0 2px rgba(181, 90, 103, 0.18);
}

.round-night-target-selected {
  border-color: #4f84d4 !important;
  box-shadow: 0 0 0 2px rgba(79, 132, 212, 0.24) !important;
  background: #edf4ff !important;
}

.round-night-target-card[data-selected="true"] {
  border-color: #4f84d4 !important;
  box-shadow: 0 0 0 2px rgba(79, 132, 212, 0.24) !important;
  background: #edf4ff !important;
}

.round-night-target-card[aria-pressed="true"] {
  border-color: #4f84d4 !important;
  box-shadow: 0 0 0 2px rgba(79, 132, 212, 0.24) !important;
  background: #edf4ff !important;
}

.round-day-player.round-day-starter {
  border-color: #6f8db8;
  box-shadow: 0 0 0 2px rgba(111, 141, 184, 0.14);
}

.round-day-player:disabled {
  opacity: 0.55;
}

.round-day-player.muted {
  opacity: 0.42;
  filter: grayscale(0.65);
  background: #e2e5ea;
}

.round-day-player.game-board-winner {
  box-shadow: inset 0 0 0 2px #78b075;
}

.round-day-player.dead {
  opacity: 0.34;
  filter: grayscale(0.9);
  background: #dfe2e7;
  border-color: #d0d5dc;
}

.round-day-player.end-game-player-card.dead {
  opacity: 0.72;
  filter: grayscale(0.45);
}

.round-day-player.end-game-player-card.dead.selected-role {
  opacity: 1;
  filter: none;
  background: #edf4ff;
  border-color: #5d8fd6;
}

.round-day-player.end-game-player-card.selected-role {
  overflow: hidden;
  background: #e8ebef;
  border-color: #9aa3af;
  box-shadow:
    inset 0 0 0 999px rgba(36, 43, 54, 0.1),
    0 0 0 2px rgba(118, 126, 138, 0.2);
}

.round-day-player.end-game-player-card.selected-role::after {
  content: "Выбран Лучшим Игроком";
  position: absolute;
  left: 0.34rem;
  right: 0.34rem;
  bottom: 0.28rem;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 1.25rem;
  padding: 0.18rem 0.36rem;
  border: 1px solid rgba(113, 121, 133, 0.34);
  border-radius: 4px;
  background: rgba(247, 248, 250, 0.92);
  color: #263140;
  font-size: calc(0.62rem * var(--ui-player-card-text-scale));
  font-weight: 700;
  line-height: 1.05;
  text-align: center;
  pointer-events: none;
}

.round-day-player.end-game-player-card.selected-role .game-board-player-name {
  color: #202a38;
}

.round-day-player.end-game-player-card.selected-role .intro-night-meta {
  color: #566170;
}

.round-day-player.dead.stage-emphasized {
  opacity: 0.9;
  filter: grayscale(0.35);
  border-color: #b55a67;
  box-shadow: 0 0 0 2px rgba(181, 90, 103, 0.22);
}

.intro-night-seat {
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.75);
  color: #7b828c;
  font-size: calc(0.78rem * var(--ui-player-card-text-scale));
}

.intro-night-meta {
  margin-top: 0.18rem;
  color: #8b919a;
  font-size: calc(0.82rem * var(--ui-player-card-text-scale));
}

.game-board-card-body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 0.16rem;
  min-width: 0;
  padding: 0 0.12rem 0 0;
}

.round-day-player.admin-mode[data-seat-sortable="true"] .game-board-card-body {
  touch-action: none;
  user-select: none;
  cursor: grab;
  min-height: 2.1rem;
}

.round-day-player.admin-mode[data-seat-sortable="true"]:active .game-board-card-body {
  cursor: grabbing;
}

.round-day-player.admin-mode .game-board-card-body {
  padding-right: 1.82rem;
}

.game-board-card-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  column-gap: 0.25rem;
  min-width: 0;
  padding: 0 0.18rem 0.14rem 0.24rem;
}

.round-day-player.admin-mode .game-board-card-footer {
  padding-right: 1.82rem;
}

.round-day-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 0.24rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: calc(0.62rem * var(--ui-player-card-text-scale));
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.round-day-badge-counter {
  position: absolute;
  right: -0.12rem;
  top: -0.12rem;
  min-width: 11px;
  height: 11px;
  padding: 0 0.12rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #ffffff;
  color: #445066;
  font-size: calc(0.52rem * var(--ui-player-card-text-scale));
  font-weight: 700;
  line-height: 1;
}

.round-day-badge.nomination-order {
  position: relative;
  background: #4f86d9;
}

.round-day-badge.vote-total {
  background: #c2436a;
}

.round-day-badge.spoken-order {
  background: #4f7d68;
}

.round-day-player-content {
  min-width: 0;
  display: grid;
  gap: 0.04rem;
  align-content: start;
  padding: 0.08rem 0.08rem 0 0.02rem;
}

.game-board-player-name {
  display: block;
  min-width: 0;
  padding-right: 0.15rem;
  color: #2f3541;
  font-size: calc(0.84rem * var(--ui-player-card-text-scale));
  line-height: 1.02;
  overflow-wrap: anywhere;
}

.round-day-player.admin-mode .game-board-player-name {
  padding-right: 1.9rem;
}

.round-day-player.has-sanctions .game-board-player-name {
  padding-right: 1.75rem;
}

.round-day-player.has-many-sanctions .game-board-player-name {
  padding-right: 2.55rem;
}

.round-day-player.admin-mode.has-sanctions .game-board-player-name {
  padding-right: 3.1rem;
}

.round-day-player.admin-mode.has-many-sanctions .game-board-player-name {
  padding-right: 3.85rem;
}

.round-day-player .intro-night-seat {
  width: 1.54rem;
  min-width: 1.54rem;
  height: 1.54rem;
  border-radius: 0.34rem;
  align-self: start;
  background: rgba(255, 255, 255, 0.82);
  color: #68707b;
  font-size: calc(0.7rem * var(--ui-player-card-text-scale));
  font-weight: 700;
}

.round-day-player .intro-night-meta {
  margin-top: 0;
  padding-right: 0.15rem;
  font-size: 0.79rem;
  line-height: 0.98;
  overflow-wrap: anywhere;
}

.round-night-target-card {
  min-height: 60px;
  height: auto;
  align-items: stretch;
}

#round-night-step-description {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.round-day-badges-column {
  display: grid;
  grid-template-rows: auto auto;
  gap: 0.08rem;
  justify-items: end;
  align-self: start;
  padding-top: 0.02rem;
  margin-right: -0.08rem;
}

.round-day-badge-slot {
  min-width: 18px;
  min-height: 18px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.round-day-panel {
  display: grid;
  gap: 0.8rem;
}

.round-day-counter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
}

.round-day-vote-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin-bottom: -0.2rem;
}

.round-day-vote-summary-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-height: 1.95rem;
  padding: 0.32rem 0.58rem;
  border: 1px solid #dbe1ea;
  border-radius: 999px;
  background: #f8fafc;
  color: #555e6e;
  font-size: 0.9rem;
  line-height: 1.2;
  white-space: nowrap;
}

.round-day-vote-summary-item strong {
  color: var(--text);
  font-weight: 700;
}

.round-day-vote-summary-item.warning {
  border-color: #efc0c0;
  background: #fff1f1;
  color: #9a4040;
}

.round-day-vote-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
}

.round-day-vote-option {
  min-width: 56px;
}

.role-name-accent {
  color: #b55a67;
}

.discussion-stage {
  display: grid;
  gap: 1rem;
  align-content: center;
  min-height: 360px;
  min-width: 0;
}

[data-view="past-stage-report"] .discussion-stage {
  align-content: start;
}

[data-view="past-stage-report"] .game-stage-copy {
  gap: 0.5rem;
}

.past-stage-report-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.past-stage-report-summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.34rem 0.62rem;
  border: 1px solid #dbe1ea;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #4b5564;
  font-size: 0.82rem;
  line-height: 1.2;
}

.past-stage-report-body {
  display: grid;
  gap: 0.9rem;
  align-content: start;
  min-width: 0;
}

.past-stage-report-section {
  display: grid;
  gap: 0.7rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f7f8fa;
  min-width: 0;
}

.past-stage-report-section-head {
  display: flex;
  justify-content: space-between;
  gap: 0.65rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.past-stage-report-section-head h3 {
  margin: 0;
}

.past-stage-report-section-meta {
  color: var(--muted);
  font-size: 0.82rem;
}

.past-stage-report-list {
  display: grid;
  gap: 0.55rem;
  align-content: start;
}

.past-stage-report-list-item {
  display: grid;
  gap: 0.24rem;
  padding: 0.62rem 0.72rem;
  border: 1px solid #d9e0ea;
  border-radius: 5px;
  background: #ffffff;
  min-width: 0;
}

.past-stage-report-list-item-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: space-between;
  flex-wrap: wrap;
}

.past-stage-report-list-item-title {
  font-weight: 600;
  color: #2e3642;
}

.past-stage-report-list-item-body,
.past-stage-report-list-item-meta {
  color: #616a78;
  font-size: 0.88rem;
  line-height: 1.35;
}

.past-stage-report-player-groups {
  display: grid;
  gap: 0.65rem;
  align-content: start;
}

.past-stage-report-player-card {
  display: grid;
  gap: 0.58rem;
  padding: 0.72rem 0.8rem;
  border: 1px solid #d9e0ea;
  border-radius: 5px;
  background: #ffffff;
  min-width: 0;
}

.past-stage-report-player-card-head {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.past-stage-report-player-card-title {
  margin: 0;
  font-weight: 700;
  color: #2e3642;
}

.past-stage-report-player-card-meta {
  color: var(--muted);
  font-size: 0.82rem;
}

.past-stage-report-player-card-items {
  display: grid;
  gap: 0.45rem;
}

.past-stage-report-inline-text {
  color: #4f5968;
  font-size: 0.88rem;
  line-height: 1.35;
}

.past-stage-report-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.18rem 0.52rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.15;
  border: 1px solid transparent;
}

.past-stage-report-status-badge.success {
  color: #1d6645;
  background: #e7f7ee;
  border-color: #b8e2c9;
}

.past-stage-report-status-badge.blocked {
  color: #9b6700;
  background: #fff2d8;
  border-color: #ecc678;
}

.past-stage-report-status-badge.cancelled {
  color: #8d3040;
  background: #fde8ed;
  border-color: #f0b2bd;
}

.past-stage-report-status-badge.failure {
  color: #8d3040;
  background: #fff0e8;
  border-color: #f0b8a2;
}

.past-stage-report-status-badge.neutral {
  color: #5c6573;
  background: #eef2f7;
  border-color: #d7deea;
}

@media (max-width: 760px) {
  .past-stage-report-section {
    padding: 0.72rem;
  }

  .past-stage-report-list-item,
  .past-stage-report-player-card {
    padding: 0.6rem 0.65rem;
  }
}

[data-view="game-results-summary"] .discussion-stage,
[data-view="game-statistics"] .discussion-stage {
  align-content: start;
}

#game-results-summary-table-wrap,
#game-statistics-session-table-wrap,
.game-stage-body > .results-summary-tab-panel,
.game-statistics-session-view,
.game-statistics-session-head,
.game-statistics-overview,
.game-statistics-session-view > *,
.results-summary-tab-panel > * {
  min-width: 0;
}

#game-results-summary-table-wrap,
#game-statistics-session-table-wrap {
  width: 100%;
  overflow: visible;
}

[data-view="general-discussion"] .discussion-stage {
  align-content: end;
  padding-bottom: 0.75rem;
}

[data-view="general-discussion"] .discussion-stage.discussion-stage-speaker-mode {
  align-content: start;
  grid-template-rows: minmax(0, 1fr);
  padding-bottom: 0;
}

[data-view="general-discussion"] #discussion-player-grid-wrap,
[data-view="general-discussion"] #discussion-player-grid,
[data-view="general-discussion"] #discussion-player-grid .intro-night-grid {
  min-width: 0;
}

[data-view="general-discussion"] #discussion-player-grid .game-board-card-footer,
[data-view="general-discussion"] #discussion-player-grid .round-day-badges-column,
[data-view="general-discussion"] #discussion-player-grid .game-board-admin-edit-button,
[data-view="general-discussion"] #discussion-player-grid .game-board-sanctions {
  display: none;
}

[data-view="general-discussion"] #discussion-player-grid .round-day-player {
  min-height: 44px;
  padding: 0.34rem 0.5rem;
  border-radius: 5px;
  gap: 0.4rem;
}

[data-view="general-discussion"] #discussion-player-grid .discussion-player-card.selected {
  background: #e8f1ff;
  border-color: #6d98db;
  box-shadow: 0 0 0 2px rgba(93, 143, 214, 0.18);
}

[data-view="general-discussion"] #discussion-player-grid .discussion-player-card.round-day-starter:not(.selected) {
  border-color: #6f8db8;
  box-shadow: 0 0 0 2px rgba(111, 141, 184, 0.14);
  background: #ffffff;
}

[data-view="general-discussion"] #discussion-player-grid .discussion-player-card.round-day-starter.selected {
  border-color: #5d8fd6;
  box-shadow: 0 0 0 2px rgba(93, 143, 214, 0.24);
  background: #e8f1ff;
}

[data-view="general-discussion"] #discussion-player-grid .discussion-player-card .game-board-card-body {
  column-gap: 0.28rem;
  padding-right: 0;
}

[data-view="general-discussion"] #discussion-player-grid .discussion-player-card .intro-night-seat {
  width: 1.34rem;
  min-width: 1.34rem;
  height: 1.34rem;
  border-radius: 0.28rem;
  font-size: 0.62rem;
}

[data-view="general-discussion"] #discussion-player-grid .discussion-player-card .round-day-player-content {
  gap: 0.02rem;
  padding-top: 0;
}

[data-view="general-discussion"] #discussion-player-grid .discussion-player-card .game-board-player-name {
  font-size: 0.8rem;
  line-height: 1;
}

[data-view="general-discussion"] #discussion-player-grid .round-day-player .intro-night-meta {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1;
}

[data-view="general-discussion"] .discussion-stage.discussion-stage-speaker-mode .discussion-timer,
[data-view="general-discussion"] .discussion-stage.discussion-stage-speaker-mode .discussion-controls {
  display: none;
}

#discussion-inline-timer-strip {
  padding: 0.3rem var(--app-page-padding) 0;
}

.discussion-inline-timer-panel {
  min-width: 0;
  justify-content: flex-end;
}

.discussion-inline-timer-row {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.45rem;
  flex: 1 1 auto;
}

.discussion-inline-timer {
  justify-self: start;
  flex: 0 0 auto;
}

.discussion-inline-timer-status {
  min-width: min(100%, 14rem);
  max-width: min(100%, 26rem);
  flex: 0 1 26rem;
  white-space: normal;
  text-align: right;
}

.discussion-inline-timer-actions {
  flex: 0 0 auto;
}

[data-view="farewell-speech"] .discussion-stage {
  align-content: end;
  padding-bottom: 0.75rem;
}

.discussion-timer {
  display: grid;
  place-items: center;
  width: min(100%, 520px);
  min-height: 132px;
  justify-self: center;
  padding: 1.4rem 1rem;
  border-radius: 5px;
  background: #eceef2;
  border: 1px solid var(--line);
  font-size: clamp(2.6rem, 10vw, 4.6rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #2d3644;
}

.discussion-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  width: min(100%, 520px);
  justify-self: center;
}

.discussion-controls > button {
  min-height: 46px;
  padding: 0.72rem 0.78rem;
}

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

.modal-actions > * {
  min-width: 0;
}

.player-modal-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  grid-auto-flow: row dense;
}

.player-modal-action {
  min-width: 0;
}

.player-modal-action-save {
  grid-column: 1;
  grid-row: 1;
}

.player-modal-action-cancel {
  grid-column: 1;
  grid-row: 2;
}

.player-modal-action-archive {
  grid-column: 2;
  grid-row: 1;
}

.player-modal-action-delete-profile {
  grid-column: 2;
  grid-row: 2;
}

.player-modal-action-convert {
  grid-column: 1 / -1;
  grid-row: 3;
}

.player-subscriptions-section-head {
  align-items: flex-start;
}

.player-subscriptions-section-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.player-subscriptions-section-actions .inline-check {
  min-height: 2.4rem;
}

.player-modal-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(300px, 1fr));
  gap: 1rem;
  align-items: start;
}

.player-modal-field-stack {
  min-width: 0;
}

.player-modal-field-stack-full {
  grid-column: 1 / -1;
}

.player-modal-field-stack textarea {
  min-height: 7.6rem;
}

#player-modal-card {
  width: min(920px, calc(100vw - 2rem));
  overflow: hidden;
}

.player-subscription-modal-card {
  width: min(780px, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
}

#player-subscription-modal-backdrop {
  z-index: 2050;
}

@media (max-width: 1180px) {
  .player-modal-field-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .player-modal-actions {
    display: flex;
    flex-wrap: wrap;
  }

  .player-modal-action-archive {
    order: 1;
  }

  .player-modal-action-delete-profile {
    order: 2;
  }

  .player-modal-action-save {
    order: 3;
  }

  .player-modal-action-cancel {
    order: 4;
  }

  .player-modal-action-convert {
    order: 5;
    width: 100%;
  }
}

#player-modal-card.is-scrollable {
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-gutter: stable;
}

#player-modal-card.is-scrollable::-webkit-scrollbar {
  width: 10px;
}

#player-modal-card.is-scrollable::-webkit-scrollbar-thumb {
  background: rgba(122, 129, 141, 0.55);
  border-radius: 999px;
  border: 2px solid rgba(247, 247, 248, 0.92);
}

#player-modal-card.is-scrollable::-webkit-scrollbar-track {
  background: rgba(239, 241, 245, 0.75);
  border-radius: 999px;
}

#archive-player-from-modal-button {
  min-width: 0;
}

.archive-tag {
  display: inline-flex;
  align-items: center;
  margin-left: 0.45rem;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: #d7e7ff;
  color: #24456f;
  font-size: 0.76rem;
  font-weight: 600;
}

.game-archive-screen {
  background: #f4f4f5;
}

.game-archive-header-main {
  min-width: 0;
}

.game-archive-header-main .muted {
  margin: 0.18rem 0 0;
  overflow-wrap: anywhere;
}

.game-archive-header .detail-view-close-button {
  min-width: 0;
  border-radius: 5px;
  box-shadow: none;
}

.game-archive-stage {
  display: grid;
  align-content: start;
  gap: 0.85rem;
  min-height: 0;
}

.game-archive-summary-panel,
.game-archive-filter-panel,
.game-archive-list-panel {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid rgba(160, 166, 177, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.game-archive-summary-panel {
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto;
  align-items: center;
}

.game-archive-summary-panel .label,
.game-archive-list-panel .label {
  margin: 0 0 0.12rem;
}

.game-archive-summary-panel strong {
  font-size: calc(1.04rem * var(--ui-screen-text-scale));
}

#game-archive-active-filters {
  margin: 0;
  overflow-wrap: anywhere;
}

.game-archive-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: end;
}

.game-archive-search-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: stretch;
}

.game-archive-search-control .compact-action-button {
  min-width: 44px;
}

.game-archive-table-wrap {
  margin-top: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.game-archive-table {
  width: 100%;
  border-collapse: collapse;
}

.game-archive-table th,
.game-archive-table td {
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.game-archive-table th {
  background: #f3f5f8;
  color: #687180;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.game-archive-row-date {
  color: #2f3541;
}

.game-archive-table th:last-child,
.game-archive-table td:last-child {
  width: 1%;
}

.game-archive-actions-cell {
  text-align: right;
}

.archive-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.archive-row-actions .compact-action-button {
  min-height: 2.35rem;
  padding-inline: 0.75rem;
}

.game-archive-state-row td {
  border-bottom: none;
  padding: 1rem;
}

.game-archive-state-card {
  display: grid;
  gap: 0.35rem;
  justify-items: center;
  padding: 1.2rem;
  border: 1px dashed #ccd3de;
  border-radius: 8px;
  background: #f7f9fc;
  text-align: center;
}

.game-archive-state-card p {
  margin: 0;
}

.game-archive-state-row.is-error .game-archive-state-card {
  border-color: #e0aaa9;
  background: #fff3f3;
}

.game-archive-state-row.is-locked .game-archive-state-card,
.game-archive-state-row.is-loading .game-archive-state-card {
  border-color: #c9d7ea;
  background: #f5f8fd;
}

.game-archive-pagination {
  margin-top: 0.2rem;
}

.archive-screen-actions {
  margin-top: 1rem;
}

#start-screen-history-row {
  width: 100%;
}

.game-archive-table td::before {
  display: none;
}

.end-game-panel {
  display: grid;
  gap: 0.75rem;
}

.end-game-subtitle {
  margin: 0;
  font-size: 1rem;
}

.end-game-save-progress {
  margin-top: 0.7rem;
  padding: 0.75rem;
  border: 1px solid #d8e4f3;
  border-radius: 0.5rem;
  background: #f7fafe;
}

.end-game-save-progress .inline-loading-with-progress {
  width: 100%;
}

.end-game-side-buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.end-game-side-button.selected {
  background: #8bb8f2;
  color: #1f3554;
  border-color: #5d95df;
}

@media (max-width: 1100px) {
  .layout {
    display: block;
  }

  .workspace {
    padding-top: max(var(--app-chrome-offset), var(--app-safe-area-top));
    padding-right: 0;
    padding-bottom: 0;
    padding-left: 0;
  }

  .desk-grid.two,
  .check-grid,
  .selected-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .game-archive-filter-grid {
    grid-template-columns: 1fr;
  }

  .game-archive-summary-panel {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .game-statistics-summary-panel,
  .game-statistics-session-meta,
  .game-statistics-session-nav {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .game-statistics-session-meta-grid {
    justify-content: flex-start;
  }

  .club-admin-toolbar {
    grid-template-columns: 1fr;
  }

  .club-management-user-row.editing input,
  .club-management-user-row.editing select {
    min-width: 100%;
  }

  .game-archive-table thead {
    display: none;
  }

  .game-statistics-overview-table thead {
    display: none;
  }

  .game-archive-table,
  .game-archive-table tbody,
  .game-archive-table tr,
  .game-archive-table td {
    display: block;
    width: 100%;
  }

  .game-statistics-overview-table,
  .game-statistics-overview-table tbody,
  .game-statistics-overview-table tr,
  .game-statistics-overview-table td {
    display: block;
    width: 100%;
  }

  .game-archive-table tbody {
    display: grid;
    gap: 0.75rem;
  }

  .game-statistics-overview-table tbody {
    display: grid;
    gap: 0.75rem;
  }

  .game-archive-table tr {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 0;
    overflow: hidden;
  }

  .game-statistics-overview-table tr {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 0;
    overflow: hidden;
  }

  .game-archive-table td {
    position: relative;
    border-bottom: 1px solid rgba(145, 153, 168, 0.22);
    padding: 0.7rem 0.9rem 0.7rem 8.4rem;
    min-height: 44px;
  }

  .game-statistics-overview-table td {
    position: relative;
    border-bottom: 1px solid rgba(145, 153, 168, 0.22);
    padding: 0.7rem 0.9rem 0.7rem 8.4rem;
    min-height: 44px;
    text-align: left !important;
  }

  .game-archive-table td:last-child {
    border-bottom: none;
    width: 100%;
    white-space: normal;
  }

  .game-statistics-overview-table td:last-child {
    border-bottom: none;
    width: 100%;
    white-space: normal;
  }

  .game-archive-table td::before {
    display: block;
    content: attr(data-label);
    position: absolute;
    left: 0.9rem;
    top: 0.7rem;
    width: 6.7rem;
    color: #7b8492;
    font-size: 0.76rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
  }

  .game-statistics-overview-table td::before {
    display: block;
    content: attr(data-label);
    position: absolute;
    left: 0.9rem;
    top: 0.7rem;
    width: 6.7rem;
    color: #7b8492;
    font-size: 0.76rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
  }

  .game-archive-state-row td {
    padding: 0.75rem;
  }

  .game-statistics-state-row td {
    padding: 0.75rem;
  }

  .game-archive-state-row td::before {
    display: none;
  }

  .game-statistics-state-row td::before {
    display: none;
  }

  .game-archive-actions-cell {
    padding-left: 0.9rem;
    background: #f7f8fa;
  }

  .game-archive-actions-cell::before {
    display: none;
  }

  .archive-row-actions {
    width: 100%;
    justify-content: stretch;
  }

  .archive-row-actions > button {
    flex: 1 1 0;
  }

  .mobile-screen {
    max-width: none;
    min-height: 0;
  }

  .profile-summary-card {
    align-items: stretch;
    flex-direction: column;
  }

.profile-summary-card .head-actions {
  width: 100%;
  justify-content: flex-start;
}
}

@media (max-width: 1100px) {
  .game-archive-table-wrap,
  .game-statistics-table-wrap {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
  }

  .game-archive-table,
  .game-statistics-overview-table {
    min-width: 760px;
  }

  .game-archive-table thead,
  .game-statistics-overview-table thead {
    display: table-header-group;
  }

  .game-archive-table,
  .game-statistics-overview-table {
    display: table;
    width: 100%;
  }

  .game-archive-table tbody,
  .game-statistics-overview-table tbody {
    display: table-row-group;
  }

  .game-archive-table tr,
  .game-statistics-overview-table tr {
    display: table-row;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
    overflow: visible;
  }

  .game-archive-table td,
  .game-statistics-overview-table td {
    display: table-cell;
    width: auto;
    position: static;
    min-height: 0;
    padding: 0.7rem 0.8rem;
    border-bottom: 1px solid var(--line);
    text-align: left !important;
    white-space: normal;
  }

  .game-statistics-overview-table td:nth-child(n+3) {
    text-align: right !important;
  }

  .game-archive-table td::before,
  .game-statistics-overview-table td::before,
  .game-archive-actions-cell::before {
    display: none;
  }

  .game-archive-table td:last-child,
  .game-statistics-overview-table td:last-child {
    width: 1%;
    white-space: nowrap;
  }

  .game-archive-actions-cell {
    padding-left: 0.8rem;
    background: transparent;
  }

  .archive-row-actions {
    width: auto;
    justify-content: flex-end;
  }

  .archive-row-actions > button {
    flex: 0 0 auto;
  }
}

.game-announcement-form-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.game-announcement-card {
  gap: 0.8rem;
  display: flex;
  flex-direction: column;
}

.game-announcement-card.active {
  border-color: rgba(72, 131, 232, 0.45);
  box-shadow: 0 0 0 1px rgba(72, 131, 232, 0.22);
}

.game-announcement-card.archived {
  opacity: 0.92;
}

.game-announcement-card-head {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  justify-content: space-between;
}

.game-announcement-meta-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  font-size: 0.95rem;
}

.game-announcement-prices {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.game-announcement-price {
  display: flex;
  gap: 0.55rem;
  align-items: baseline;
  justify-content: space-between;
  padding: 0.65rem 0.8rem;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.04);
}

.game-announcement-price.muted {
  opacity: 0.52;
}

.game-announcement-status-badge,
.game-announcement-status-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: var(--muted);
  font-size: 0.88rem;
  white-space: nowrap;
}

.game-announcement-session-game-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 180px) auto;
  gap: 0.75rem;
  align-items: end;
}

.player-announcement-session-summary-list {
  gap: 0.55rem;
}

.player-announcement-session-summary-card {
  display: grid;
  gap: 0.2rem;
}

.player-announcement-game-option {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.75rem 0.85rem;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.82);
}

.player-announcement-game-option.active {
  border-color: rgba(72, 131, 232, 0.42);
  background: rgba(72, 131, 232, 0.08);
}

.player-announcement-game-option.disabled {
  opacity: 0.56;
}

.player-announcement-game-option input {
  width: auto;
  margin-top: 0.1rem;
}

.player-subscription-editor-card {
  gap: 0.85rem;
}

.player-modal-subscription-empty-state {
  padding: 0.85rem 0.25rem 0.15rem;
}

@media (max-width: 860px) {
  .player-subscriptions-section-head,
  .player-subscriptions-section-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .player-subscriptions-section-actions .inline-check {
    justify-content: flex-start;
  }
}

@media (max-width: 1320px) {
  .desk-grid.two.game-announcements-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.player-game-announcement-modal-card {
  width: min(880px, 100%);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
}

.player-game-announcement-modal-card::-webkit-scrollbar {
  width: 8px;
}

.player-game-announcement-modal-card::-webkit-scrollbar-thumb {
  background: rgba(132, 141, 158, 0.55);
  border-radius: 999px;
}

.player-game-announcement-modal-card::-webkit-scrollbar-track {
  background: rgba(228, 232, 238, 0.55);
  border-radius: 999px;
}

.booking-import-modal-card {
  width: min(880px, 100%);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
}

.booking-import-modal-body {
  max-height: min(62dvh, 680px);
  overflow-y: auto;
  padding-right: 0.25rem;
}

.booking-import-modal-body::-webkit-scrollbar {
  width: 8px;
}

.booking-import-modal-body::-webkit-scrollbar-thumb {
  background: rgba(132, 141, 158, 0.55);
  border-radius: 999px;
}

.booking-import-session-group {
  display: grid;
  gap: 0.7rem;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #f7f9fc;
}

.booking-import-session-head {
  display: grid;
  gap: 0.3rem;
}

.booking-import-session-options {
  display: grid;
  gap: 0.65rem;
}

.booking-import-option {
  display: grid;
  gap: 0.7rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(177, 186, 198, 0.7);
  background: #fff;
}

.booking-import-option-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: start;
}

.booking-import-option-head > * {
  min-width: 0;
}

.booking-import-option-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  color: var(--muted);
  font-size: calc(0.96rem * var(--ui-hint-text-scale));
}

.booking-import-option-player-preview {
  color: var(--muted);
  font-size: calc(0.95rem * var(--ui-hint-text-scale));
}

.player-modal-prices {
  margin-top: 0.15rem;
}

@media (max-width: 980px) {
  .game-announcement-form-grid,
  .game-announcement-meta-grid,
  .game-announcement-prices {
    grid-template-columns: minmax(0, 1fr);
  }

  .role-preset-filter-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .role-preset-range-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .game-announcement-session-game-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .booking-import-option-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .view[data-view="base-mechanics-settings"] {
    gap: 0.85rem;
  }

  .view[data-view="base-mechanics-settings"] .desk-card {
    border-radius: 20px;
    padding: 1rem;
  }

  .view[data-view="base-mechanics-settings"] .section-head {
    flex-direction: column;
  }

  .view[data-view="base-mechanics-settings"] .section-head > * {
    width: 100%;
    min-width: 0;
  }

  .view[data-view="base-mechanics-settings"] .stage-screen-switcher {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 0.8rem;
  }

  .view[data-view="base-mechanics-settings"] .base-mechanics-bulk-actions {
    justify-content: stretch;
  }

  .view[data-view="base-mechanics-settings"] .base-mechanics-bulk-actions .soft {
    flex: 1 1 100%;
    width: 100%;
  }

  .view[data-view="base-mechanics-settings"] .base-mechanic-settings-card {
    padding: 0.85rem;
  }

  .view[data-view="base-mechanics-settings"] .base-mechanic-settings-card .section-head.compact-head {
    flex-direction: column;
  }

  .view[data-view="base-mechanics-settings"] .base-mechanic-settings-card .section-head.compact-head > * {
    width: 100%;
    min-width: 0;
  }

  .view[data-view="base-mechanics-settings"] .base-mechanic-settings-card .head-actions {
    justify-content: flex-start;
  }

  .view[data-view="base-mechanics-settings"] .base-mechanic-settings-card .bottom-row {
    width: 100%;
  }

  .view[data-view="base-mechanics-settings"] .base-mechanic-settings-card .bottom-row button:not(.compact-action-button) {
    flex: 1 1 100%;
    width: 100%;
  }
}

@media (max-width: 1180px) {
  .player-statistics-overview-panel,
  .player-statistics-summary-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .player-statistics-duo-grid,
  .player-statistics-chart-filters {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .player-statistics-modal-card {
    width: calc(100vw - 0.5rem);
    max-height: calc(100dvh - 0.5rem);
  }

  .player-statistics-modal-head,
  .player-statistics-overview-panel,
  .player-statistics-panel {
    padding: 0.85rem;
  }

  .player-statistics-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .player-statistics-chart-toggle-row {
    align-items: stretch;
    flex-direction: column;
  }

  .player-statistics-quarter-fields {
    grid-template-columns: 1fr;
  }

  .player-statistics-selection-panel .check-grid {
    grid-template-columns: 1fr;
  }

  .player-statistics-summary-table thead {
    display: none;
  }

  .player-statistics-summary-table,
  .player-statistics-summary-table tbody,
  .player-statistics-summary-table tr,
  .player-statistics-summary-table td {
    display: block;
    width: 100%;
  }

  .player-statistics-summary-table tbody {
    display: grid;
    gap: 0.75rem;
  }

  .player-statistics-summary-table tr {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
  }

  .player-statistics-summary-table td {
    position: relative;
    border-bottom: 1px solid rgba(145, 153, 168, 0.22);
    padding: 0.7rem 0.9rem 0.7rem 8.4rem;
    min-height: 44px;
    text-align: left !important;
  }

  .player-statistics-summary-table td:last-child {
    border-bottom: none;
  }

  .player-statistics-summary-table td::before {
    display: block;
    content: attr(data-label);
    position: absolute;
    left: 0.9rem;
    top: 0.7rem;
    width: 6.7rem;
    color: #7b8492;
    font-size: 0.76rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
  }

  .player-statistics-summary-table td[colspan] {
    padding: 0.75rem;
  }

  .player-statistics-summary-table td[colspan]::before {
    display: none;
  }
}

@media (max-width: 540px) {
  .player-statistics-kpi-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.view[data-view="club-chat"] {
  --club-chat-surface-border: rgba(44, 62, 80, 0.12);
  --club-chat-shadow: 0 18px 34px rgba(23, 28, 37, 0.08);
  align-content: stretch;
  grid-auto-rows: minmax(0, 1fr);
  justify-content: center;
  overflow: hidden;
  padding-bottom: var(--app-page-padding);
}

.club-chat-shell {
  width: min(100%, 1080px);
  height: 100%;
  min-width: 0;
  margin-inline: auto;
  display: grid;
  min-height: 0;
}

.club-chat-page-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(1rem, 1.5vw, 1.35rem);
  border: 1px solid rgba(165, 176, 194, 0.26);
  background:
    radial-gradient(circle at top right, rgba(171, 204, 239, 0.18), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 252, 0.98));
  box-shadow: var(--club-chat-shadow);
  overflow: hidden;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
}

.club-chat-section-head {
  align-items: center;
}

.club-chat-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  min-width: 0;
}

.club-chat-title-row h2 {
  margin-bottom: 0;
}

.club-chat-title-row .role-mechanic-info-button {
  margin-left: 0.1rem;
}

.club-chat-connection-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 1.9rem;
  padding: 0.12rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(157, 170, 188, 0.18);
  background: rgba(245, 248, 252, 0.96);
  color: #67788b;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
}

.club-chat-connection-badge-icon {
  display: inline-flex;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 999px;
  background: rgba(121, 135, 151, 0.34);
  flex: 0 0 auto;
}

.club-chat-connection-badge.is-online {
  border-color: rgba(109, 172, 116, 0.2);
  background: rgba(239, 249, 240, 0.96);
  color: #4d7d53;
}

.club-chat-connection-badge.is-online .club-chat-connection-badge-icon {
  background: #6fb271;
}

.club-chat-connection-badge.is-offline {
  border-color: rgba(184, 113, 113, 0.16);
  background: rgba(253, 242, 242, 0.96);
  color: #9a5b5b;
}

.club-chat-connection-badge.is-offline .club-chat-connection-badge-icon {
  background: #d98e8e;
}

.club-chat-connection-badge.is-connecting {
  border-color: rgba(104, 151, 202, 0.2);
  background: rgba(237, 245, 253, 0.96);
  color: #4f7399;
}

.club-chat-connection-badge.is-connecting .club-chat-connection-badge-icon {
  width: 0.88rem;
  height: 0.88rem;
  border: 2px solid rgba(108, 149, 199, 0.2);
  border-top-color: rgba(108, 149, 199, 0.95);
  border-right-color: rgba(108, 149, 199, 0.58);
  background: transparent;
  animation: club-chat-connection-spin 0.8s linear infinite;
}

@keyframes club-chat-connection-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.club-chat-pinned-list {
  display: grid;
  gap: 14px;
  padding: 1rem 1rem 0.95rem;
  border-radius: 24px;
  border: 1px solid rgba(123, 162, 205, 0.24);
  background:
    linear-gradient(135deg, rgba(232, 243, 255, 0.92), rgba(255, 249, 239, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.club-chat-pinned-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.club-chat-pinned-toolbar-copy {
  display: grid;
  gap: 0;
  min-width: 0;
}

.club-chat-pinned-eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 1.6rem;
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  background: rgba(40, 111, 181, 0.12);
  color: #58789a;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.club-chat-pinned-toolbar-copy strong {
  display: none;
}

.club-chat-pinned-frame {
  min-width: 0;
  touch-action: pan-y;
  user-select: none;
}

.club-chat-pinned-frame.animate-next .club-chat-message-card {
  animation: club-chat-pinned-slide-next 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

.club-chat-pinned-frame.animate-previous .club-chat-message-card {
  animation: club-chat-pinned-slide-previous 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes club-chat-pinned-slide-next {
  from {
    opacity: 0;
    transform: translateX(28px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes club-chat-pinned-slide-previous {
  from {
    opacity: 0;
    transform: translateX(-28px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.club-chat-pinned-frame .club-chat-message-card {
  margin: 0;
  border-color: rgba(114, 156, 205, 0.2);
  box-shadow: 0 14px 28px rgba(52, 74, 102, 0.08);
}

.club-chat-pinned-frame .club-chat-message-card.pinned-preview {
  min-height: 100%;
}

.club-chat-message-card.pinned-preview.is-clickable {
  cursor: pointer;
}

.club-chat-message-card.pinned-preview.is-clickable:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 30px rgba(32, 57, 86, 0.11);
}

.club-chat-history-status {
  display: flex;
  align-items: center;
  min-height: 1.45rem;
  padding-inline: 0.25rem;
  line-height: 1.35;
}

.club-chat-pinned-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.85rem;
  flex: 0 0 auto;
}

.club-chat-pinned-controls .compact-action-button {
  min-width: 2.5rem;
  min-height: 2.5rem;
  border-radius: 14px;
}

.club-chat-pinned-controls .club-chat-pinned-toolbar-meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0.4rem;
  min-width: 0;
  flex: 0 0 auto;
}

.club-chat-message-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0.2rem 0.25rem 0.2rem 0;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.club-chat-day-separator,
.club-chat-unread-marker {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0.15rem 0;
  color: #758495;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}

.club-chat-day-separator::before,
.club-chat-day-separator::after,
.club-chat-unread-marker::before,
.club-chat-unread-marker::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(142, 156, 174, 0), rgba(142, 156, 174, 0.32), rgba(142, 156, 174, 0));
}

.club-chat-day-separator span,
.club-chat-unread-marker span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.65rem;
  padding: 0.12rem 0.75rem;
  border-radius: 999px;
  background: rgba(240, 244, 248, 0.92);
  border: 1px solid rgba(162, 174, 190, 0.2);
}

.club-chat-unread-marker {
  color: #4d759e;
  font-weight: 700;
}

.club-chat-unread-marker span {
  background: rgba(227, 239, 252, 0.96);
  border-color: rgba(113, 156, 206, 0.24);
}

.club-chat-message-card {
  border: 1px solid var(--club-chat-surface-border);
  border-radius: 22px;
  padding: 0.74rem 0.82rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 252, 255, 0.98));
  position: relative;
  box-shadow: 0 12px 24px rgba(23, 28, 37, 0.05);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.club-chat-message-card.type-admin_notice {
  border-color: rgba(200, 138, 10, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 251, 242, 0.98), rgba(255, 247, 229, 0.98));
}

.club-chat-message-card.type-game_announcement {
  border-color: rgba(54, 114, 186, 0.18);
  background:
    linear-gradient(180deg, rgba(245, 250, 255, 0.98), rgba(235, 245, 255, 0.98));
}

.club-chat-message-card.priority {
  border-width: 1px;
  box-shadow: 0 14px 28px rgba(54, 74, 104, 0.08);
}

.club-chat-message-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(23, 28, 37, 0.08);
}

.club-chat-message-card.compact {
  padding: 0.68rem 0.76rem;
  border-radius: 18px;
  box-shadow: none;
}

.club-chat-message-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 0.42rem;
}

.club-chat-message-author-block {
  display: grid;
  gap: 0.22rem;
  min-width: 0;
}

.club-chat-message-author-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.32rem 0.45rem;
  min-width: 0;
}

.club-chat-message-author-name {
  display: inline-flex;
  color: #1f2f3f;
  font-size: calc(0.98rem * var(--ui-screen-text-scale));
  line-height: 1.25;
}

.club-chat-message-author-id {
  color: #8391a0;
  font-size: 0.76rem;
  line-height: 1.2;
}

.club-chat-message-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.32rem;
}

.club-chat-message-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: rgba(92, 108, 128, 0.1);
  color: #607083;
  font-size: 0.74rem;
  line-height: 1.2;
}

.club-chat-message-chip-type {
  background: rgba(55, 118, 191, 0.12);
  color: #41698f;
  font-weight: 700;
}

.club-chat-message-chip-role {
  background: rgba(93, 110, 129, 0.08);
  color: #6c7b8d;
  font-weight: 600;
}

.club-chat-message-chip-subtle {
  background: rgba(143, 151, 162, 0.08);
  color: #7d8793;
}

.club-chat-message-timestamp {
  color: #7a8694;
  font-size: 0.75rem;
  line-height: 1.2;
  margin-left: auto;
}

.club-chat-message-menu-area {
  position: relative;
  flex: 0 0 auto;
}

.club-chat-message-menu-trigger {
  min-width: 2.35rem;
  min-height: 2.35rem;
  padding-inline: 0.45rem;
  border-radius: 14px;
  font-size: 1.1rem;
  line-height: 1;
}

.club-chat-message-menu-trigger.active {
  background: rgba(160, 171, 192, 0.18);
}

.club-chat-message-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 6;
  min-width: 220px;
  max-width: min(260px, calc(100vw - 24px));
  padding: 8px;
  border: 1px solid rgba(44, 62, 80, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 32px rgba(23, 28, 37, 0.16);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.club-chat-message-menu.place-above {
  top: auto;
  bottom: calc(100% + 6px);
}

.club-chat-message-menu .app-inline-dropdown-option {
  justify-content: flex-start;
  width: 100%;
}

.club-chat-message-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #243444;
  line-height: 1.45;
}

.club-chat-game-announcement-body {
  display: grid;
  gap: 0.38rem;
}

.club-chat-game-announcement-grid {
  display: grid;
  gap: 0.16rem;
}

.club-chat-game-announcement-description {
  margin: 0;
  line-height: 1.4;
}

.club-chat-game-announcement-actions {
  display: flex;
  justify-content: flex-start;
}

.club-chat-message-body-clamped {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  white-space: normal;
  text-overflow: ellipsis;
}

.club-chat-pinned-card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-top: 0.7rem;
}

.club-chat-pinned-card-more {
  display: inline-flex;
  align-items: center;
  min-height: 1.7rem;
  padding: 0.12rem 0.72rem;
  border-radius: 999px;
  background: rgba(63, 111, 172, 0.1);
  color: #4a6f98;
  font-size: 0.79rem;
  font-weight: 700;
}

.club-chat-readonly-banner {
  margin-bottom: 0;
  border-radius: 18px;
}

.club-chat-info-modal-card {
  width: min(860px, calc(100vw - 1rem));
}

.club-chat-info-modal-body {
  gap: 0.9rem;
}

.club-chat-pinned-info-modal-body {
  white-space: pre-wrap;
}

.club-chat-composer-card {
  flex: 0 0 auto;
  margin-top: auto;
  position: sticky;
  bottom: 0;
  padding: 0.72rem;
  border: 1px solid rgba(165, 176, 194, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.985), rgba(247, 250, 253, 0.985));
  box-shadow: 0 14px 28px rgba(23, 28, 37, 0.05);
  overflow: hidden;
  z-index: 3;
}

.club-chat-composer-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(104, 151, 202, 0), rgba(104, 151, 202, 0.45), rgba(104, 151, 202, 0));
  pointer-events: none;
}

.club-chat-composer-form {
  gap: 0.55rem;
  position: relative;
  z-index: 1;
}

.club-chat-textarea-label {
  display: grid;
  gap: 0;
  position: relative;
  padding: 0.62rem 0.7rem;
  border: 1px solid rgba(166, 177, 193, 0.18);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(252, 253, 255, 0.96), rgba(246, 249, 252, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.club-chat-textarea-label span {
  color: #5b6c7f;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.club-chat-textarea-label.compact {
  padding-top: 0.42rem;
  padding-bottom: 0.42rem;
}

.club-chat-textarea-label textarea {
  min-height: 4.15rem;
  max-height: 8.5rem;
  resize: vertical;
  border-radius: 15px;
  padding: 0.62rem 0.82rem 1.5rem;
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(156, 171, 191, 0.24);
  box-shadow: inset 0 1px 2px rgba(130, 144, 163, 0.06);
}

.club-chat-textarea-label textarea.is-over-limit {
  border-color: rgba(194, 103, 103, 0.36);
  background: rgba(255, 248, 248, 0.95);
}

.club-chat-message-counter {
  position: absolute;
  right: 1rem;
  bottom: 0.68rem;
  font-size: 0.72rem;
  line-height: 1;
  color: #7f8c99;
  background: rgba(247, 250, 253, 0.92);
  padding: 0.12rem 0.34rem;
  border-radius: 999px;
  pointer-events: none;
}

.club-chat-message-counter.is-over-limit {
  color: #b45d5d;
  font-weight: 700;
}

.club-chat-form-actions {
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.55rem;
}

.club-chat-form-actions > #send-club-chat-message-button {
  flex: 1 1 auto;
  width: auto;
  min-height: 2.75rem;
  border-radius: 16px;
  border: 1px solid rgba(74, 127, 184, 0.2);
  background: linear-gradient(135deg, rgba(69, 126, 189, 0.96), rgba(92, 150, 211, 0.96));
  color: #fff;
  font-weight: 700;
  box-shadow: 0 14px 24px rgba(74, 127, 184, 0.18);
  font-size: 0.94rem;
}

.club-chat-form-actions > #send-club-chat-message-button:disabled {
  box-shadow: none;
}

.club-chat-form-actions > #refresh-club-chat-button {
  flex: 0 0 auto;
  min-width: 2.7rem;
  min-height: 2.75rem;
  border-radius: 16px;
  border-color: rgba(161, 173, 189, 0.18);
  background: rgba(255, 255, 255, 0.96);
}

@media (max-width: 720px) {
  .club-chat-shell {
    width: 100%;
  }

  .club-chat-page-card {
    padding: 0.95rem;
  }

  .club-chat-message-head {
    align-items: stretch;
  }

  .club-chat-pinned-toolbar {
    align-items: flex-start;
  }

  .club-chat-pinned-controls {
    gap: 0.6rem;
  }

  .club-chat-pinned-controls .club-chat-pinned-toolbar-meta {
    gap: 0.4rem;
  }

  .club-chat-page-card,
  .club-chat-composer-card {
    padding: 0.95rem;
  }

  .club-chat-textarea-label {
    padding: 0.55rem 0.6rem;
  }

  .club-chat-textarea-label.compact {
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
  }

  .club-chat-textarea-label span {
    font-size: 0.68rem;
  }

  .club-chat-textarea-label textarea {
    min-height: 3.55rem;
    max-height: 6.8rem;
    padding: 0.62rem 0.72rem;
  }

  .club-chat-message-meta-row {
    gap: 0.4rem;
  }

  .club-chat-title-row {
    align-items: center;
    gap: 0.45rem;
  }

  .club-chat-message-menu {
    min-width: min(240px, calc(100vw - 72px));
  }
}

.club-chat-message-modal-card {
  max-width: min(560px, calc(100vw - 32px));
}

.club-chat-message-modal-body {
  gap: 16px;
}

.club-chat-message-modal-body textarea {
  min-height: 168px;
  resize: vertical;
}
