@import url('https://fonts.googleapis.com/css2?family=Special+Elite&display=swap');

/* ── Tokens ───────────────────────────────────────────────
   GRRufz — matches the K5GRR vintage-telegraph theme
   (warm near-black backgrounds, amber/gold accents, Special Elite). */
:root {
    --bg:        #0d0c08;   /* warm near-black */
    --surface:   #161510;   /* raised panels / inputs */
    --border:    #3a3525;   /* aged brass border */
    --accent:    #e8a22e;   /* amber - primary accent */
    --accent-hi: #ffc44a;   /* brighter gold - highlights */
    --accent2:   #4a8c3f;   /* green - correct copy */
    --err:       #c0392b;   /* red - errors */
    --text:      #c9a84c;   /* gold text */
    --muted:     #7a6530;   /* dim brass */
    --font:      'Special Elite', 'Courier New', monospace;
    --font-num:  'Special Elite', 'Courier New', monospace;
    --radius:    6px;
    --radius-lg: 10px;
}

/* ── Reset ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ── Layout ───────────────────────────────────────────── */
.trainer-wrap {
    max-width: 560px;
    margin: 0 auto;
    padding: 24px 16px 48px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Setup panel ──────────────────────────────────────── */
.site-title {
    font-family: var(--font-num);
    font-size: 2.4rem;
    letter-spacing: .08em;
    color: var(--accent);
    text-align: center;
    margin-top: 32px;
}

.site-sub {
    text-align: center;
    color: var(--muted);
    font-size: .9rem;
    margin-bottom: 32px;
}

.setup-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.field-group { display: flex; flex-direction: column; gap: 8px; }

.field-group label {
    font-size: .8rem;
    font-weight: 500;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em;
}

.field-group label strong { color: var(--text); font-weight: 700; }

/* Mode buttons */
.mode-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.mode-btn {
    padding: 8px 4px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: transparent;
    color: var(--muted);
    font-family: var(--font);
    font-size: .85rem;
    cursor: pointer;
    transition: all .15s;
}

.mode-btn:hover { border-color: var(--accent); color: var(--text); }
.mode-btn.active {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 15%, transparent);
    color: var(--accent);
    font-weight: 500;
}

.custom-input {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font);
    font-size: .9rem;
    padding: 10px 12px;
    resize: vertical;
}

.custom-input:focus { outline: none; border-color: var(--accent); }

/* Sliders */
.slider {
    width: 100%;
    accent-color: var(--accent);
    cursor: pointer;
}

.tone-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ── Buttons ──────────────────────────────────────────── */
.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--accent);
    color: var(--bg);
    border: none;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: .04em;
    transition: opacity .15s;
}

.btn-primary:hover { opacity: .88; }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; }

.btn-secondary {
    padding: 10px 18px;
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: .9rem;
    cursor: pointer;
    transition: all .15s;
}

.btn-secondary:hover { border-color: var(--accent); color: var(--text); }
.btn-secondary:disabled { opacity: .35; cursor: not-allowed; }

.error-msg {
    color: var(--err);
    font-size: .85rem;
    text-align: center;
}

/* ── Trainer panel ────────────────────────────────────── */
.trainer-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-top: 16px;
}

/* Progress bar */
.progress-bar-track {
    height: 3px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width .3s ease;
}

/* Stats row */
.stats-row {
    display: flex;
    gap: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.stat {
    flex: 1;
    text-align: center;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-right: 1px solid var(--border);
    font-family: var(--font-num);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
}

.stat:last-child { border-right: none; }

.stat-label {
    font-family: var(--font);
    font-size: .65rem;
    font-weight: 500;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em;
}

/* Feedback */
.feedback {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: .95rem;
    font-weight: 500;
}

.feedback-ok  { background: color-mix(in srgb, var(--accent2) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent2) 30%, transparent); }
.feedback-err { background: color-mix(in srgb, var(--err) 12%, transparent);    border: 1px solid color-mix(in srgb, var(--err) 30%, transparent); }

.fb-expected { color: var(--accent2); }
.fb-arrow    { color: var(--muted); }
.fb-actual   { color: var(--err); }
.fb-wpm      { margin-left: auto; color: var(--muted); font-size: .85rem; }

/* Sending indicator */
.sending-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    color: var(--muted);
    font-size: .9rem;
}

.dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: blink 1s infinite;
}
.dot:nth-child(2) { animation-delay: .2s; }
.dot:nth-child(3) { animation-delay: .4s; }

@keyframes blink {
    0%, 80%, 100% { opacity: .2; }
    40%            { opacity: 1; }
}

/* Main callsign input */
.input-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.call-input {
    width: 100%;
    padding: 18px 20px;
    font-family: var(--font);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--accent);
    text-align: center;
    outline: none;
    transition: border-color .15s;
    caret-color: var(--accent);
}

.call-input:focus { border-color: var(--accent); }
.call-input:disabled { opacity: .55; cursor: default; }

.input-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* Link to the How-it-works page on the setup screen */
.doc-link {
    text-align: center;
    margin-top: 14px;
}
.doc-link a {
    color: var(--muted);
    font-size: .85rem;
    text-decoration: none;
    border-bottom: 1px dashed var(--border);
    padding-bottom: 1px;
}
.doc-link a:hover { color: var(--accent); border-color: var(--accent); }
.doc-link-sep { color: var(--border); margin: 0 8px; }

/* Progress page table */
.prog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.prog-table { display: flex; flex-direction: column; font-size: .85rem; }
.prog-row {
    display: grid;
    grid-template-columns: 1.4fr 1.2fr .8fr .6fr .7fr;
    gap: 8px;
    padding: 7px 4px;
    border-bottom: 1px solid var(--border);
}
.prog-row:last-child { border-bottom: none; }
.prog-row .num { text-align: right; font-family: var(--font-num); }
.prog-th {
    color: var(--muted);
    text-transform: uppercase;
    font-size: .7rem;
    letter-spacing: .06em;
}

/* Character recognition table */
.char-grid { display: flex; flex-direction: column; font-size: .9rem; }
.char-row {
    display: grid;
    grid-template-columns: 1fr .9fr .7fr .9fr;
    gap: 8px;
    align-items: center;
    padding: 7px 4px;
    border-bottom: 1px solid var(--border);
}
.char-row:last-child { border-bottom: none; }
.char-row .num { text-align: right; font-family: var(--font-num); }
.char-th {
    color: var(--muted);
    text-transform: uppercase;
    font-size: .7rem;
    letter-spacing: .06em;
}
.char-ch {
    font-family: var(--font-num);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--accent);
    letter-spacing: .05em;
}
.trend-up   { color: var(--accent2); }
.trend-down { color: var(--err); }
.trend-flat { color: var(--muted); }

/* ── How-it-works page ────────────────────────────────── */
.doc { display: flex; flex-direction: column; gap: 20px; padding-bottom: 24px; }
.doc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 8px;
}
.doc-title {
    font-family: var(--font-num);
    font-size: 1.6rem;
    color: var(--accent);
    letter-spacing: .04em;
}
.doc-intro { color: var(--text); line-height: 1.5; }
.doc-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
}
.doc-section h2 {
    font-family: var(--font-num);
    font-size: 1.1rem;
    color: var(--accent-hi);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 10px;
}
.doc-section p { line-height: 1.55; margin: 8px 0; }
.doc-section ul { margin: 8px 0 8px 20px; line-height: 1.6; }
.doc-section li { margin: 4px 0; }
.doc-section strong { color: var(--text); }
.doc-section em { color: var(--accent-hi); font-style: normal; }
.doc-inline {
    font-family: var(--font-num);
    color: var(--accent);
    white-space: nowrap;
}
.doc-note {
    font-size: .85rem;
    color: var(--muted);
    border-left: 2px solid var(--border);
    padding-left: 10px;
    margin-top: 10px !important;
}
.doc-footer { display: flex; justify-content: center; padding-top: 4px; }

/* Little keycap hint on buttons (e.g. "Space") */
.key-hint {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    font-size: .7rem;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 4px;
    vertical-align: middle;
}

/* End-session button (top-right of stats row) */
.end-btn {
    margin-left: auto;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    font-family: var(--font);
    font-size: .8rem;
    padding: 4px 10px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: color .15s, border-color .15s;
}
.end-btn:hover { color: var(--err); border-color: color-mix(in srgb, var(--err) 50%, transparent); }

/* ── Reveal (right/wrong result before advancing) ─────── */
.reveal {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 28px 20px 22px;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border);
    text-align: center;
}
.reveal-ok  {
    border-color: color-mix(in srgb, var(--accent2) 55%, transparent);
    background: color-mix(in srgb, var(--accent2) 10%, transparent);
    animation: reveal-pulse .5s ease-out;
}
.reveal-err {
    border-color: color-mix(in srgb, var(--err) 55%, transparent);
    background: color-mix(in srgb, var(--err) 10%, transparent);
    animation: reveal-shake .4s ease-in-out;
}

.reveal-mark {
    font-size: 3rem;
    line-height: 1;
    font-weight: 700;
}
.reveal-ok  .reveal-mark { color: var(--accent2); }
.reveal-err .reveal-mark { color: var(--err); }

.reveal-verdict {
    font-family: var(--font-num);
    text-transform: uppercase;
    letter-spacing: .1em;
    font-size: .85rem;
    color: var(--muted);
}
.reveal-word {
    font-family: var(--font-num);
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: .1em;
    color: var(--accent);
    margin: 2px 0;
}
.reveal-typed { font-size: .9rem; color: var(--muted); }
.reveal-typed span { color: var(--err); font-weight: 700; }
.reveal-wpm { font-size: .8rem; color: var(--muted); }
.reveal-next { margin-top: 14px; }
.reveal-hint {
    font-size: .75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .08em;
}

@keyframes reveal-pulse {
    0%   { transform: scale(.96); opacity: .4; }
    60%  { transform: scale(1.02); }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes reveal-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
}

.reveal-wpm { display: flex; gap: 12px; align-items: baseline; }
.reveal-pts { color: var(--accent2); font-weight: 700; }

/* Best score on setup */
.site-best {
    text-align: center;
    color: var(--muted);
    font-size: .9rem;
    margin-top: -4px;
}
.site-best strong { color: var(--accent); }

/* Setup option toggles */
.toggle-row { display: flex; gap: 8px; }
.toggle-btn {
    flex: 1;
    padding: 10px 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--muted);
    font-family: var(--font);
    font-size: .85rem;
    cursor: pointer;
    transition: border-color .15s, color .15s;
}
.toggle-btn:hover { color: var(--text); }
.toggle-btn.active { border-color: var(--accent); color: var(--accent); }

/* New-best badge + trouble spots on results */
.new-best-badge {
    color: var(--accent-hi);
    font-weight: 700;
    font-family: var(--font-num);
    letter-spacing: .06em;
    text-transform: uppercase;
    animation: reveal-pulse .5s ease-out;
}

.trouble-spots {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}
.trouble-label {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--muted);
}
.trouble-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.trouble-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: color-mix(in srgb, var(--err) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--err) 30%, transparent);
    border-radius: 999px;
}
.tc-char { font-weight: 700; color: var(--err); font-family: var(--font-num); }
.tc-count { font-size: .75rem; color: var(--muted); }

/* ── Sign-in bar (signed-in status row) ───────────────── */
.signin-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: center;
    margin-top: 4px;
}
.signin-who { color: var(--muted); font-size: .85rem; }
.signin-who strong { color: var(--accent); }

/* ── Sign-in form (signed-out): a real stacked form, not a nav row ── */
.signin-form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin: 8px auto 4px;
    width: 100%;
    max-width: 340px;
}
.playing-as {
    text-align: center;
    color: var(--text);
    font-size: .9rem;
}
.playing-as strong { color: var(--accent); letter-spacing: .06em; }
.signin-label {
    text-align: center;
    color: var(--muted);
    font-size: .8rem;
    line-height: 1.35;
}
.signin-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--accent);
    font-family: var(--font);
    font-size: 1.35rem;
    letter-spacing: .1em;
    text-align: center;
    text-transform: uppercase;
}
.signin-input:focus { outline: none; border-color: var(--accent); }
.signin-go { width: 100%; }
.signin-lb { align-self: center; }
.signin-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    justify-content: center;
}
.secured-badge {
    color: var(--accent2);
    font-size: .75rem;
    margin-left: 4px;
}
.link-btn {
    background: none;
    border: none;
    color: var(--accent);
    font-family: var(--font);
    font-size: .85rem;
    cursor: pointer;
    padding: 6px 4px;
}
.link-btn:hover { text-decoration: underline; }
.link-btn:disabled { color: var(--muted); cursor: default; text-decoration: none; }
.link-btn {
    background: none;
    border: none;
    color: var(--accent);
    font-family: var(--font);
    font-size: .85rem;
    cursor: pointer;
    padding: 6px 4px;
}
.link-btn:hover { text-decoration: underline; }
.link-btn:disabled { color: var(--muted); cursor: default; text-decoration: none; }
.signin-error { text-align: center; color: var(--err); font-size: .8rem; margin-top: 4px; }

/* ── Leaderboard ──────────────────────────────────────── */
.leaderboard-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 12px;
}
.lb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.lb-header h2 {
    font-family: var(--font-num);
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text);
}
.lb-controls {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    flex-wrap: wrap;
}
.lb-tabs { display: flex; gap: 4px; }
.lb-tab {
    padding: 6px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--muted);
    font-family: var(--font);
    font-size: .85rem;
    cursor: pointer;
}
.lb-tab.active { border-color: var(--accent); color: var(--accent); }
.lb-mode {
    padding: 6px 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font);
    font-size: .85rem;
}
.lb-empty { text-align: center; color: var(--muted); padding: 24px 0; }
.lb-list { display: flex; flex-direction: column; }
.lb-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 8px;
    border-bottom: 1px solid var(--border);
}
.lb-row:last-child { border-bottom: none; }
.lb-me {
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    border-radius: var(--radius);
}
.lb-rank {
    min-width: 28px;
    text-align: center;
    color: var(--muted);
    font-family: var(--font-num);
    font-weight: 700;
}
.lb-handle { font-weight: 700; color: var(--text); }
.lb-wpm { margin-left: auto; color: var(--muted); font-size: .85rem; }
.lb-score {
    min-width: 70px;
    text-align: right;
    font-family: var(--font-num);
    font-weight: 700;
    color: var(--accent);
}

/* ── Live tally + sending line ────────────────────────── */
.tally {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 8px 4px;
    font-size: .9rem;
}
.tally-ok  { color: var(--accent2); font-weight: 700; }
.tally-err { color: var(--err); font-weight: 700; }
.tally-letters {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
    flex-wrap: wrap;
}
.tally-letters-label {
    color: var(--muted);
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.tally-letter {
    display: inline-flex;
    min-width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    font-family: var(--font-num);
    font-weight: 700;
    font-size: .8rem;
    color: var(--err);
    background: color-mix(in srgb, var(--err) 12%, transparent);
    border-radius: 4px;
}

/* Dedicated line for the send indicator so the layout never jumps */
.sending-line {
    min-height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Results panel ────────────────────────────────────── */
.results-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding-top: 24px;
}

.results-panel h2 {
    font-family: var(--font-num);
    font-size: 1.2rem;
    color: var(--muted);
    letter-spacing: .06em;
    text-transform: uppercase;
}

.final-score {
    font-family: var(--font-num);
    font-size: 5rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}

.final-score-label {
    font-size: .8rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-top: -8px;
}

.results-grid {
    display: flex;
    gap: 16px;
    width: 100%;
}

.result-stat {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
}

.rs-value {
    font-family: var(--font-num);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
}

.rs-label {
    font-size: .7rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-top: 4px;
}

.attempt-list {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    max-height: 320px;
    overflow-y: auto;
}

.attempt-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-bottom: 1px solid var(--border);
    font-size: .88rem;
}

.attempt-row:last-child { border-bottom: none; }
/* Correct rows read green overall; wrong rows stay neutral so only the bad
   letters (rendered as .d-err spans) are red — not the whole word. */
.att-ok  { color: var(--accent2); }
.att-err { color: var(--text); }

.att-call   { font-weight: 700; min-width: 80px; letter-spacing: .04em; }
.d-ok  { color: inherit; }
.d-err { color: var(--err); font-weight: 700; }
.att-actual { color: var(--muted); }
.att-acc    { margin-left: auto; }
.att-wpm    { min-width: 60px; text-align: right; color: var(--muted); font-size: .8rem; }

/* Running in-session attempt log */
.live-attempts {
    margin-top: 6px;
    max-height: 220px;
    overflow-y: auto;
    border-top: 1px solid var(--border);
}

/* Incomplete / not-saved banner on the results screen */
.unsaved-banner {
    color: var(--accent-hi);
    background: color-mix(in srgb, var(--accent-hi) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent-hi) 35%, transparent);
    padding: 6px 14px;
    border-radius: var(--radius);
    font-size: .85rem;
}

.result-actions {
    display: flex;
    gap: 12px;
    width: 100%;
}

.result-actions .btn-primary { flex: 1; }

/* ── Mobile ───────────────────────────────────────────── */
@media (max-width: 420px) {
    .tone-grid { grid-template-columns: 1fr; }
    .mode-grid { grid-template-columns: repeat(2, 1fr); }
    .results-grid { flex-direction: column; }
    .call-input { font-size: 1.3rem; padding: 14px; }
    .final-score { font-size: 4rem; }
}

/* ── Reduced motion ───────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .dot { animation: none; opacity: 1; }
    * { transition: none !important; }
}

/* ── Boot screen (shown by index.html until Blazor loads) ─ */
.boot-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 100vh;
    color: var(--muted);
}

.boot-title {
    font-family: var(--font-num);
    font-size: 2.4rem;
    letter-spacing: .08em;
    color: var(--accent);
}

.boot-sub { font-size: .85rem; }

/* ── Blazor error UI ──────────────────────────────────── */
#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 12px 20px;
    background: var(--err);
    color: #fff;
    font-size: .9rem;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, .4);
}

#blazor-error-ui .reload,
#blazor-error-ui .dismiss {
    color: #fff;
    text-decoration: underline;
    cursor: pointer;
    margin-left: 10px;
}

#blazor-error-ui .dismiss { float: right; text-decoration: none; }

/* ── File upload (Other / custom list) ────────────────── */
.file-drop {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.file-drop .file-btn {
    padding: 8px 14px;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--muted);
    font-size: .85rem;
    cursor: pointer;
    transition: all .15s;
}

.file-drop .file-btn:hover { border-color: var(--accent); color: var(--text); }

.file-name {
    font-size: .8rem;
    color: var(--accent2);
}

.field-hint {
    font-size: .72rem;
    color: var(--muted);
    margin-top: -2px;
}
