/* /mod: the moderator view. Builds on dashboard.css (db-board, pd-row, pd-list). */
.md-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 18px; margin-top: 18px; }
.md-grid .db-board { margin: 0; }
.md-pick { display: grid; gap: 4px; }
.md-pick select { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; }
.md-wide { flex: 1 1 200px; }
.md-wide textarea { width: 100%; box-sizing: border-box; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; resize: vertical; }
.md-wide input { width: 100%; box-sizing: border-box; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; }
.md-table-wrap { overflow-x: auto; }
.md-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.md-table th { text-align: left; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 6px 8px; }
.md-table td { padding: 4px 8px; border-top: 1px solid var(--line); }
.md-table tr.is-next td { background: color-mix(in srgb, var(--gold, #f2c14e) 10%, transparent); }
.md-sec-msg:empty { display: none; }
.md-grid > [hidden] { display: none !important; }
#md-app button:disabled, #md-app input:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
.md-sec-msg { margin: 0 0 8px; font-weight: 600; }
.md-sec-msg.is-error { color: var(--red, #ff7b72); }
.md-blocked { padding: 10px 14px; border: 1px solid var(--gold); border-radius: 10px; background: color-mix(in srgb, var(--gold) 10%, transparent); }
.md-blocked[hidden] { display: none; }
.md-copy { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.md-copy li { display: grid; grid-template-columns: 6.5em minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 8px; background: color-mix(in srgb, var(--text) 4%, transparent); }
.md-copy code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md-copy .md-copy-label { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }
.md-copy button.is-copied { color: var(--lime, #b8f25c); }
#md-team-list small, #md-race-list small { color: var(--muted); margin-left: 6px; }
/* Phones: the controls used most are big enough to hit while watching the stream. */
@media (max-width: 640px) {
  .md-grid { gap: 12px; }
  .md-grid .pd-row button, .md-copy button { min-height: 44px; }
  .md-copy li { grid-template-columns: minmax(0, 1fr) auto; }
  .md-copy .md-copy-label { grid-column: 1 / -1; }
}
.md-table input { width: 7.5em; box-sizing: border-box; padding: 7px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; text-align: right; }

/* The next bonus, with one big field for its win (quickest from a phone). */
.md-next { margin: 4px 0 12px; padding: 12px 14px; border: 1px solid var(--gold); border-radius: 12px; background: color-mix(in srgb, var(--gold) 8%, transparent); }
.md-next[hidden] { display: none; }
.md-next-label { margin: 0; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.md-next-slot { margin: 2px 0 8px; font-size: 1.15rem; }
.md-next-slot span { color: var(--muted); font-size: 0.9rem; margin-left: 6px; }
.md-next .tps-input input { font-size: 1.1rem; }

/* "Add refrace to your home screen" (web/src/pwa.ts), phones only. */
.md-install { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 12px 0 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--text) 4%, transparent); }
.md-install[hidden] { display: none; }
.md-install p { margin: 0; flex: 1 1 220px; }

/* Bottom dock: the sections this page uses, one tap away. Phones and the installed app only. */
.md-dock { display: none; }
.md-grid > section { scroll-margin-top: 76px; }
@media (max-width: 640px) {
  .md-dock:not([hidden]) {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; gap: 4px;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 94%, transparent);
    border-top: 1px solid var(--line); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  }
  .md-dock a { flex: 1 1 0; min-width: 0; min-height: 44px; display: grid; place-items: center; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 700; font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .md-dock a.is-on, .md-dock a:active { color: var(--text); background: color-mix(in srgb, var(--text) 8%, transparent); }
  body:has(.md-dock:not([hidden])) { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .md-next .pd-row button { min-width: 7em; }
  .md-intro { display: none; }
}
