/* Workspace modules. Game scenes, hidden states and animation geometry stay
   owned by their individual templates. Only the surrounding controls and
   management surfaces are unified here. */

.main-content :is(
  .casino-head h1, .blackjack-head h1, .settings-head h1,
  .azp-wallet-head h1, .issuance-head h1, .pm-page h1
) {
  font-size: clamp(25px, 2.5vw, 32px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.025em;
}

.main-content :is(
  .casino-head, .blackjack-head, .settings-head, .azp-wallet-head, .issuance-head
) {
  margin-bottom: 24px;
}

.main-content :is(
  .casino-head p, .blackjack-subtitle, .settings-head p,
  .azp-wallet-head p, .issuance-head p
) {
  max-width: 780px;
  font-size: 14px;
  line-height: 1.6;
}

.main-content :is(.blackjack-eyebrow, .pm-eyebrow) {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .04em;
}

/* Solid, quiet surfaces instead of floating translucent cards. */
.main-content :is(
  .casino-card:not(.flight-card), .blackjack-card:not(.blackjack-table),
  .casino-settings-page .settings-card, .azp-card, .issuance-card,
  .issuance-panel, .settings-shell .settings-toolbar,
  .settings-shell .settings-section, .quest-panel, .quest-stat,
  .forms-panel, .forms-table-wrap, .checkoff-panel,
  .watch-panel, .property-panel, .scheduler-panel, .helper-panel,
  .bug-report-card, .script-card, .mirage-panel, .mirage-metric,
  .pm-page .pm-card, .pm-page .pm-account
) {
  border-color: var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: none;
  backdrop-filter: none;
}

.main-content :is(
  .casino-section h2, .info-card h2, .settings-card h2,
  .azp-section h2, .issuance-panel h2, .issuance-section h2,
  .settings-section-head h2, .pm-page h2, .quest-history-head h2,
  .forms-panel h2, .checkoff-panel h2, .watch-panel h2,
  .property-panel h2, .scheduler-panel h2, .helper-panel h2
) {
  font-size: 17px;
  line-height: 1.4;
  font-weight: 600;
}

/* Casino chrome: keep the flight scene and felt table distinctive. */
.casino-page .casino-game-picker,
.blackjack-page .casino-game-picker,
.blackjack-page .connection-pill {
  border-radius: 8px;
  font-weight: 500;
  font-size: 13px;
}

.blackjack-page .blackjack-panel::before { content: none; }
.blackjack-head .connection-dot,
.blackjack-head .connection-pill.retrying .connection-dot,
.blackjack-head .connection-pill.offline .connection-dot { box-shadow: none; }

.casino-page .balance-line,
.blackjack-panel .balance-line {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-muted);
  padding: 14px;
}

.casino-page .balance-line strong,
.blackjack-panel .balance-line strong {
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -.025em;
  font-variant-numeric: tabular-nums;
}

/* The number is nested in a span; it must not inherit the small caption size. */
.casino-page .balance-line strong span,
.blackjack-panel .balance-line strong span {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.blackjack-panel .balance-chip {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-weight: 600;
  font-style: normal;
}

.blackjack-panel .panel-caption {
  font-weight: 500;
  letter-spacing: .025em;
}

.casino-page .bet-form label,
.blackjack-page .blackjack-form label,
.casino-settings-page .field label {
  font-size: 13px;
  font-weight: 500;
}

.casino-page .bet-form input,
.blackjack-page .blackjack-form input,
.casino-settings-page .field input:not([type="checkbox"]) {
  border-radius: 8px;
  background: var(--surface);
  box-shadow: none;
  font-size: 14px;
}

.blackjack-page .blackjack-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.casino-page .bet-form button,
.casino-page .cashout-btn,
.blackjack-page :is(.quick-btn, .blackjack-action, .seat-button),
.casino-settings-page .save-button {
  border-radius: 8px;
  font-weight: 600;
  box-shadow: none;
}

.casino-page .place-btn,
.blackjack-page .seat-button,
.casino-settings-page .save-button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-contrast);
}

.casino-page .cashout-btn,
.blackjack-page .blackjack-action.primary {
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border));
  background: var(--accent-soft);
  color: var(--accent);
}

.casino-page .quick-btn,
.blackjack-page .quick-btn,
.blackjack-page .blackjack-action {
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text);
}

.blackjack-page .blackjack-action.danger {
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text);
}

.casino-page .casino-message,
.blackjack-page .blackjack-message { font-weight: 500; }
.blackjack-page .blackjack-message { color: var(--success); }
.blackjack-page .blackjack-message.error { color: var(--danger); }

.casino-page .bet-row,
.blackjack-page .history-row {
  border-radius: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  padding: 11px 0;
  font-size: 13px;
}

.casino-page :is(.bet-row strong, .bet-result),
.blackjack-page .history-row strong { font-weight: 600; }
.blackjack-page .history-row strong.win { color: var(--success); }
.casino-page .fair-box { border-style: solid; border-radius: 8px; }
.casino-page .fair-box summary { font-weight: 500; }
.casino-page .bet-panel .round-label {
  font-size: 11px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  color: var(--text-muted);
}

/* Wallet and issuance: amounts are the hierarchy, not multicoloured cards. */
.azp-wallet .azp-total { margin: 12px 0 24px; }
.azp-wallet .azp-total strong {
  font-size: clamp(34px, 5vw, 48px);
  font-weight: 600;
  letter-spacing: -.035em;
}
.azp-wallet .azp-total span { color: var(--text-muted); font-weight: 500; }
.azp-wallet .azp-stat,
.casino-settings-page .summary-cell {
  border-top: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  padding: 13px 0 0;
}
.azp-wallet .azp-stats { gap: 24px; }
.azp-wallet :is(.azp-stat strong, .azp-amount),
.issuance :is(.amount, .issuance-card strong) { font-weight: 600; }
.azp-wallet .azp-action-form label,
.issuance .adjust-form label { font-weight: 500; }
.azp-wallet .azp-action-form button,
.issuance button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-contrast);
  border-radius: 8px;
  font-weight: 600;
}
.azp-wallet .azp-action-form input,
.issuance input { border-radius: 8px; }
.azp-wallet :is(.azp-table-wrap, .azp-active-item),
.issuance .issuance-table-wrap { border-radius: 8px; }
.azp-wallet .azp-message,
.issuance .issuance-message { font-weight: 500; }
.azp-wallet .azp-status,
.issuance .status {
  border-radius: 4px;
  padding: 4px 7px;
  font-weight: 500;
}
.azp-wallet .azp-cancel { font-weight: 500; }
.issuance .issuance-warning { border-radius: 8px; font-size: 13px; line-height: 1.6; }
.issuance .issuance-panel { min-width: 0; }
.issuance .issuance-actions button {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

/* Settings remain dense and legible. No styling affects control visibility. */
.casino-settings-page .settings-card { min-width: 0; }
.casino-settings-page .toggle-line {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-muted);
}
.casino-settings-page .toggle-line input { accent-color: var(--accent); }
.casino-settings-page .settings-note.full { grid-column: 1 / -1; }
.casino-settings-page .settings-message { font-weight: 500; }
.casino-settings-page .summary-cell span {
  font-size: 12px;
  font-weight: 400;
  text-transform: none;
}
.casino-settings-page .summary-cell strong { font-size: 24px; font-weight: 600; }
.casino-settings-page .round-pill { border-radius: 5px; font-weight: 500; }
.settings-shell :is(.settings-row-title, .settings-toggle, .settings-mode label) { font-weight: 500; }
.settings-shell :is(.settings-select, .settings-text-input) {
  border-radius: 8px;
  background: var(--surface);
  font-weight: 400;
  box-shadow: none;
}
.settings-shell .settings-chip {
  border-radius: 4px;
  background: var(--surface-muted);
  color: var(--text-muted);
  font-weight: 500;
}
.settings-shell .settings-mode {
  border-radius: 8px;
  background: var(--surface-muted);
  box-shadow: none;
}
.settings-shell .settings-mode label { border-radius: 5px; }
.settings-shell .settings-mode label:has(input:checked) {
  background: var(--surface);
  color: var(--accent);
  border-color: var(--border);
  box-shadow: none;
}
.settings-shell .settings-mode label:has(input:checked)::before {
  box-shadow: inset 0 0 0 2px var(--surface);
}
.settings-shell .settings-toggle input:checked + .settings-toggle-track {
  background: var(--accent);
  border-color: var(--accent);
}

/* Data-heavy workspaces: restrained summaries and strong row separators. */
.main-content :is(
  .azp-table, .issuance-table, .rounds-table, .forms-table,
  .quest-table, .mirage-table, .pm-table
) th {
  font-size: 12px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-muted);
  background: var(--surface-muted);
}
.main-content :is(.quest-stat-label, .mirage-metric-label) {
  font-size: 12px;
  font-weight: 400;
  text-transform: none;
}
.main-content :is(.quest-stat-value, .mirage-metric-value) { font-weight: 600; }
.main-content :is(
  .quest-admin-name, .quest-type-label, .quest-reward,
  .mirage-rank, .mirage-rating-value, .mirage-podium-item em,
  .mirage-podium-item strong, .form-command
) { font-weight: 600; }
.main-content :is(
  .quest-live-state, .quest-status, .mirage-bot-status,
  .mirage-sync-status, .mirage-detail-state, .forms-stats .stat-pill
) { font-weight: 500; border-radius: 5px; }
.quest-page .quest-live-state::before,
.quest-page .quest-live-state.offline::before,
.mirage-page .mirage-bot-status::before,
.mirage-page .mirage-bot-status.online::before { box-shadow: none; }
.quest-page .quest-status-filter button { border-radius: 6px; font-weight: 500; }
.quest-page .quest-progress-fill { background: var(--accent); }
.quest-page .quest-field > span { font-weight: 500; }
.main-content .quest-dialog { border-radius: 12px; }
.main-content .quest-dialog-head h2 { font-size: 20px; font-weight: 600; }
.mirage-page :is(.mirage-season-control, .mirage-season-control select, .mirage-tab) { font-weight: 500; }
.mirage-page .mirage-tab.is-active { background: var(--accent); color: var(--accent-contrast); box-shadow: none; }
.mirage-page .mirage-podium-item span { font-weight: 500; text-transform: none; }
.main-content .form-modal { border-radius: 12px; }
.main-content :is(.form-row label, .checkoff-field span, .checkoff-muted) { font-weight: 500; }

.property-page :is(.property-field span, .property-choice label, .property-pill),
.checkoff-page :is(.checkoff-note, .checkoff-alert) { font-weight: 500; }
.property-page :is(.property-choice, .property-stack-item, .property-stack-empty, .property-evidence-card) {
  background: var(--surface-muted);
  box-shadow: none;
}
.property-page .property-choice label:has(input:checked) {
  background: var(--accent);
  box-shadow: none;
}
.property-page .property-pill {
  border-radius: 5px;
  background: var(--surface-muted);
}
.property-page .property-actions .primary-btn,
.property-page .property-mini-btn {
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: none;
  font-weight: 600;
}
.property-page .property-actions .secondary-btn {
  background: var(--surface-muted);
  border-color: var(--border);
  font-weight: 500;
}
.scheduler-page .scheduler-hint-strip { background: var(--surface-muted); }
.scheduler-page .scheduler-hint-icon {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: none;
}
.scheduler-page .scheduler-hint-strip span { font-weight: 400; }

/* Developer account/support management, scoped away from the public form. */
.main-content .pm-page :is(h3, label, .pm-btn, .pm-account strong) { font-weight: 500; }
.main-content .pm-page :is(input, select, textarea, .pm-btn, .pm-link-row) { border-radius: 8px; }
.main-content .pm-page .pm-btn.primary {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-contrast);
}
.main-content .pm-page .pm-btn.danger { color: var(--danger); border-color: var(--border); }
.main-content .pm-page .pm-badge {
  border-radius: 4px;
  background: var(--surface-muted);
  color: var(--text-muted);
  font-weight: 500;
}
.main-content .pm-page .pm-badge.green {
  background: var(--accent-soft);
  color: var(--accent);
}
.main-content .pm-page a:not(.pm-btn):not(.pm-account) { color: var(--accent); }
.main-content .pm-page .pm-account:hover { border-color: var(--accent); }
.main-content .pm-page :is(input, select, textarea):focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 600px) {
  .main-content :is(.azp-card, .issuance-panel, .casino-settings-page .settings-card) { padding: 16px; }
  .issuance .issuance-actions { flex-wrap: wrap; }
  .issuance .issuance-actions input { min-width: 0; width: 100%; }
  .casino-settings-page .settings-head a { align-self: flex-start; }
}

/* The public release flow shares the chosen season, not a hard-coded navy canvas. */
.release-shell { --release-accent: var(--accent); --release-blue: var(--season-gold); --release-line: var(--border); }
.release-shell--player { background: var(--bg); }
.release-shell :is(.release-brand, .release-back-link) { color: var(--text); font-weight: 600; }
.release-shell .release-brand-mark { background: var(--accent); color: var(--accent-contrast); box-shadow: none; }
.release-shell :is(.release-hero, .release-panel) { background: var(--surface); box-shadow: none; border-radius: 10px; }
.release-shell .release-hero-icon { background: var(--accent-soft); color: var(--accent); box-shadow: none; }
.release-shell h1 { font-size: clamp(26px, 3vw, 34px); font-weight: 600; }
.release-shell h2 { font-size: 19px; font-weight: 600; }
.release-shell :is(.release-eyebrow, .release-step) { font-size: 11px; font-weight: 500; letter-spacing: .04em; }
.release-shell :is(.release-field input, .release-field select, .release-confirm, .release-bot-status, .release-status-chip, .release-request-meta, .release-request-foot, .release-history summary, .release-field > span:first-child, .release-account-fixed > span:first-child) { font-weight: 500; }
.release-shell :is(.release-bot-status, .release-status-chip) { border-radius: 5px; }
.release-shell .release-bot-status i { box-shadow: none; }
.release-shell :is(.release-bot-status.is-online, .release-status-chip.is-success) { color: var(--success); }
.release-shell :is(.release-bot-status.is-offline, .release-status-chip.is-error) { color: var(--danger); }
.release-shell :is(.release-status-chip.is-pending, .release-status-chip.is-running) { color: var(--accent); }
.release-shell .release-primary-button::after { content: none; }
.release-shell .release-primary-button { background: var(--accent); color: var(--accent-contrast); box-shadow: none; font-weight: 600; }
.release-shell .release-confirm input:checked + .release-check { box-shadow: none; }
.release-shell .release-confirm input:checked + .release-check::after { border-color: var(--accent-contrast); }
.release-shell .release-confirm input:focus-visible + .release-check { outline: 2px solid var(--accent); outline-offset: 3px; }
.release-shell .release-progress-track i { background: var(--accent); }
.release-shell .release-help a { color: var(--accent); font-weight: 500; }
.release-shell :is(.release-alert, .release-cancel-button) { color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); font-weight: 500; }
.release-shell .release-alert.is-success { color: var(--success); background: color-mix(in srgb, var(--success) 8%, var(--surface)); }
.release-shell [hidden] { display: none !important; }
