html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0; padding: 0;
}

/* ══════════════════════════════════════════════════════════════════════════
   Lida Music — Home
   ══════════════════════════════════════════════════════════════════════════ */

.lm-home {
    min-height: 100svh;
    background: #0d0d0d;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    gap: 3rem;
}

.lm-hero {
    text-align: center;
}

.lm-hero-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    object-position: 65% top;
    border: 2px solid #C4A458;
    margin-bottom: 0.8rem;
    display: block;
}

.lm-clef {
    font-size: 5rem;
    color: #C4A458;
    line-height: 1;
    margin-bottom: 0.5rem;
    display: block;
}

.lm-title {
    font-family: 'Tahoma', 'Segoe UI', system-ui, sans-serif;
    font-size: clamp(2rem, 8vw, 3.2rem);
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.6rem;
    letter-spacing: 0.02em;
}

.lm-subtitle {
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #555;
    margin: 0;
}

.lm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    width: 100%;
    max-width: 480px;
}

.lm-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem 1rem;
    border-radius: 16px;
    text-decoration: none;
    transition: transform 0.18s, background 0.18s;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.lm-card-active {
    background: #1a1a1a;
    border: 1.5px solid #C4A458;
    cursor: pointer;
}

.lm-card-active:hover {
    background: #222;
    transform: translateY(-2px);
}

.lm-card-active:active {
    transform: translateY(0);
}

.lm-card-soon {
    background: #141414;
    border: 1.5px solid #222;
    cursor: default;
    opacity: 0.5;
}

.lm-card-icon {
    font-size: 2.2rem;
    line-height: 1;
}

.lm-card-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.04em;
}

.lm-card-desc {
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #C4A458;
}

.lm-card-badge {
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #444;
}

/* ══════════════════════════════════════════════════════════════════════════
   Metronome  —  /metronome
   ══════════════════════════════════════════════════════════════════════════ */

.mt-page {
    min-height: 100svh;
    background: #0d0d0d;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 1.5rem 2.5rem;
    gap: 1.4rem;
}

.mt-header {
    width: 100%;
    max-width: 420px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 0 0;
}

.mt-back {
    font-size: 0.85rem;
    color: #555;
    text-decoration: none;
    border: 1px solid #222;
    border-radius: 8px;
    padding: 0.3rem 0.75rem;
    transition: color 0.2s, border-color 0.2s;
}
.mt-back:hover { color: #fff; border-color: #555; }

.mt-header-title {
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #444;
}

/* Beat dot */
.mt-beat-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #222;
    margin-top: 0.4rem;
}

@keyframes mt-flash-anim {
    0%   { background: #fff; transform: scale(1.5); }
    100% { background: #222; transform: scale(1); }
}

@keyframes mt-flash-accent {
    0%   { background: #C4A458; transform: scale(1.8); }
    100% { background: #222; transform: scale(1); }
}

.mt-beat-dot.mt-flash         { animation: mt-flash-anim    0.18s ease-out forwards; }
.mt-beat-dot.mt-flash.mt-accent { animation: mt-flash-accent 0.18s ease-out forwards; }

/* Pendulum */
.mt-pendulum-pivot {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    height: 170px;
}

.mt-pendulum {
    transform-origin: top center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

@keyframes mt-swing {
    0%   { transform: rotate(-22deg); }
    50%  { transform: rotate(22deg); }
    100% { transform: rotate(-22deg); }
}

.mt-pendulum.mt-swinging {
    animation: mt-swing ease-in-out infinite;
}

.mt-rod {
    width: 3px;
    height: 135px;
    background: linear-gradient(to bottom, #333, #555);
    border-radius: 2px;
}

.mt-bob {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #e8c97a, #C4A458, #8a6f30);
    margin-top: -3px;
    box-shadow: 0 2px 8px rgba(196,164,88,0.35);
}

/* BPM display */
.mt-bpm-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    line-height: 1;
}

.mt-bpm-num {
    font-family: 'Tahoma', system-ui, sans-serif;
    font-size: 4.5rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    min-width: 3ch;
    text-align: center;
}

.mt-bpm-unit {
    font-size: 0.65rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: #444;
}

.mt-tempo-name {
    font-size: 0.85rem;
    color: #C4A458;
    letter-spacing: 0.12em;
    margin-top: 0.3rem;
}

/* +/- controls */
.mt-adj-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 420px;
}

.mt-adj {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    color: #888;
    border-radius: 8px;
    padding: 0.5rem 0.6rem;
    font-size: 0.75rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.mt-adj:active { background: #333; color: #fff; }

.mt-slider {
    flex: 1;
    accent-color: #C4A458;
    cursor: pointer;
}

/* Preset buttons */
.mt-presets {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 420px;
}

.mt-preset {
    padding: 0.45rem 0.8rem;
    background: #141414;
    border: 1px solid #222;
    color: #555;
    border-radius: 20px;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.mt-preset:hover  { border-color: #444; color: #888; }
.mt-preset.active { background: #1e1a10; border-color: #C4A458; color: #C4A458; }

/* Start/Stop */
.mt-btn-start {
    width: 100%;
    max-width: 420px;
    padding: 1.1rem;
    background: #fff;
    color: #111;
    border: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
    -webkit-tap-highlight-color: transparent;
}
.mt-btn-start:active  { background: #ddd; }
.mt-btn-start.mt-running {
    background: transparent;
    color: #fff;
    border: 1.5px solid #444;
}
.mt-btn-start.mt-running:active { background: #1a1a1a; }

/* Tap tempo */
.mt-btn-tap {
    width: 100%;
    max-width: 420px;
    padding: 1rem;
    background: transparent;
    color: #444;
    border: 1px solid #1e1e1e;
    border-radius: 12px;
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
    -webkit-tap-highlight-color: transparent;
}
.mt-btn-tap:active { background: #1a1a1a; color: #C4A458; border-color: #C4A458; }

/* ══════════════════════════════════════════════════════════════════════════
   Hang Drum  —  /hangdrum
   ══════════════════════════════════════════════════════════════════════════ */

.hd-page {
    min-height: 100svh;
    background: #0d0d0d;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 1.5rem 2.5rem;
    gap: 0.8rem;
}

.hd-header {
    width: 100%;
    max-width: 420px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 0 0;
}

.hd-back {
    font-size: 0.85rem;
    color: #555;
    text-decoration: none;
    border: 1px solid #222;
    border-radius: 8px;
    padding: 0.3rem 0.75rem;
    transition: color 0.2s, border-color 0.2s;
}
.hd-back:hover { color: #fff; border-color: #555; }

.hd-header-title {
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #444;
}

.hd-label-btn {
    background: transparent;
    border: 1px solid #222;
    border-radius: 6px;
    font-size: 0.65rem;
    color: #555;
    padding: 0.2rem 0.55rem;
    cursor: pointer;
    transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.hd-label-btn.active { background: #1a1a1a; color: #C4A458; border-color: #C4A458; }

.hd-tuning {
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #333;
    margin: 0;
}

.hd-wrap {
    width: 100%;
    max-width: 360px;
    padding: 0.5rem 0;
}

.hd-svg {
    width: 100%;
    height: auto;
    display: block;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.hd-field-group { -webkit-tap-highlight-color: transparent; }

.hd-note-label {
    font-family: 'Tahoma', system-ui, sans-serif;
    font-size: 11px;
    font-weight: 700;
    fill: #ccc;
    pointer-events: none;
}

.hd-note-sub {
    font-family: 'Tahoma', system-ui, sans-serif;
    font-size: 8px;
    fill: #888;
    pointer-events: none;
}

.hd-actions {
    width: 100%;
    max-width: 360px;
    margin-top: 0.5rem;
}

.hd-btn-scale {
    width: 100%;
    padding: 1rem;
    background: transparent;
    border: 1px solid #222;
    border-radius: 12px;
    color: #555;
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.hd-btn-scale:not(:disabled):hover  { border-color: #C4A458; color: #C4A458; }
.hd-btn-scale:not(:disabled):active { background: #1a1a1a; }
.hd-btn-scale:disabled { opacity: 0.4; cursor: default; }

/* ══════════════════════════════════════════════════════════════════════════
   Daf  —  /daf
   ══════════════════════════════════════════════════════════════════════════ */

.daf-page {
    min-height: 100svh;
    background: #0d0d0d;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 1.5rem 2.5rem;
    gap: 0.9rem;
}

.daf-header {
    width: 100%;
    max-width: 420px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 0 0;
}

.daf-back {
    font-size: 0.85rem;
    color: #555;
    text-decoration: none;
    border: 1px solid #222;
    border-radius: 8px;
    padding: 0.3rem 0.75rem;
    transition: color 0.2s, border-color 0.2s;
}
.daf-back:hover { color: #fff; border-color: #555; }

.daf-header-title {
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #444;
}

.daf-subtitle {
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #333;
    margin: 0;
}

.daf-wrap {
    width: 100%;
    max-width: 320px;
}

.daf-svg {
    width: 100%;
    height: auto;
    display: block;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.daf-beat-row {
    display: flex;
    gap: 0.55rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 320px;
}

.daf-beat {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    transition: background 0.18s, transform 0.18s, box-shadow 0.18s;
}

.daf-beat-dom { background: #3a2010; }
.daf-beat-tak { background: #1a1e1a; }

.daf-beat.daf-beat-active.daf-beat-dom {
    background: #C4A458;
    transform: scale(1.5);
    box-shadow: 0 0 8px rgba(196,164,88,0.5);
}

.daf-beat.daf-beat-active.daf-beat-tak {
    background: #cccccc;
    transform: scale(1.3);
    box-shadow: 0 0 5px rgba(200,200,200,0.4);
}

.daf-patterns {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 420px;
}

.daf-pat-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 0.5rem 0.9rem;
    background: #141414;
    border: 1px solid #222;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.daf-pat-btn:hover { border-color: #444; }
.daf-pat-btn.active { background: #1e1a10; border-color: #C4A458; }

.daf-pat-en {
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    color: #666;
}
.daf-pat-btn.active .daf-pat-en { color: #C4A458; }

.daf-pat-fa {
    font-family: 'Tahoma', system-ui, sans-serif;
    font-size: 0.82rem;
    color: #888;
    direction: rtl;
}
.daf-pat-btn.active .daf-pat-fa { color: #fff; }

.daf-bpm-wrap {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.daf-bpm-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.daf-bpm-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 4.5rem;
    text-align: center;
}

.daf-bpm-num {
    font-family: 'Tahoma', system-ui, sans-serif;
    font-size: 2.8rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.daf-bpm-unit {
    font-size: 0.6rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #444;
}

.daf-adj {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    color: #888;
    border-radius: 8px;
    padding: 0.5rem 0.65rem;
    font-size: 0.75rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.daf-adj:active { background: #333; color: #fff; }

.daf-slider {
    width: 100%;
    max-width: 420px;
    accent-color: #C4A458;
    cursor: pointer;
}

.daf-btn-start {
    width: 100%;
    max-width: 420px;
    padding: 1.1rem;
    background: #fff;
    color: #111;
    border: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
    -webkit-tap-highlight-color: transparent;
}
.daf-btn-start:active { background: #ddd; }
.daf-btn-start.daf-running {
    background: transparent;
    color: #fff;
    border: 1.5px solid #444;
}
.daf-btn-start.daf-running:active { background: #1a1a1a; }

/* ══════════════════════════════════════════════════════════════════════════
   Lida Piano  —  /piano
   ══════════════════════════════════════════════════════════════════════════ */

:root {
    --ink: #1A1A18;
    --green: #3A7D44;
    --red:   #B03A2E;
    --gold:  #C4A458;
    --font-sans: system-ui, -apple-system, sans-serif;
    --font-serif: Georgia, serif;
}

.lp-lock { min-height: 100svh; display: flex; align-items: center; justify-content: center; padding: 2rem 1.5rem; background: #111; }
.lp-lock-card { text-align: center; width: 100%; max-width: 320px; }
.lp-lock-logo { font-size: 3.5rem; color: #fff; margin-bottom: 0.5rem; line-height: 1; }
.lp-lock-title { font-family: 'Tahoma', 'Segoe UI', system-ui, sans-serif; font-size: 2.2rem; font-weight: 700; color: #fff; margin-bottom: 0.4rem; line-height: 1.3; }
.lp-lock-sub { font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; color: #888; margin-bottom: 2rem; }
.lp-pin-dots { display: flex; justify-content: center; gap: 1.1rem; margin-bottom: 0.6rem; }
.lp-pin-dot { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid #555; transition: background 0.15s, border-color 0.15s; }
.lp-pin-dot.filled { background: #fff; border-color: #fff; }
.lp-pin-error { font-size: 0.72rem; letter-spacing: 0.1em; color: #ff6b6b; min-height: 1.4em; margin-bottom: 0.3rem; }
.lp-pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-top: 1.5rem; }
.lp-pin-key { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.15); color: #fff; font-family: var(--font-sans); font-size: 1.4rem; font-weight: 300; height: 64px; border-radius: 12px; cursor: pointer; transition: background 0.15s; -webkit-tap-highlight-color: transparent; }
.lp-pin-key:active { background: rgba(255,255,255,0.22); }
.lp-pin-del { font-size: 1.1rem; color: #888; }

.lp-setup { min-height: 100svh; display: flex; align-items: center; justify-content: center; padding: 2rem 1.5rem; background: #fff; }
.lp-setup-card { width: 100%; max-width: 360px; text-align: center; }
.lp-eyebrow { font-family: 'Tahoma', 'Segoe UI', system-ui, sans-serif; font-size: 0.9rem; letter-spacing: 0.05em; color: #111; margin-bottom: 0.5rem; }
.lp-setup-title { font-family: 'Tahoma', 'Segoe UI', system-ui, sans-serif; font-size: 2.4rem; font-weight: 700; color: #111; margin-bottom: 0.6rem; line-height: 1.3; }
.lp-setup-tagline { font-family: 'Tahoma', 'Segoe UI', system-ui, sans-serif; font-size: 1rem; font-weight: 400; color: var(--gold); line-height: 1.9; margin-bottom: 2.5rem; }
.lp-option-group { margin-bottom: 1.8rem; }
.lp-option-label { font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: #666; margin-bottom: 0.7rem; }
.lp-toggle-row { display: flex; gap: 0.6rem; justify-content: center; }
.lp-toggle { flex: 1; max-width: 140px; padding: 0.85rem 1rem; border: 1.5px solid #ccc; background: transparent; color: #555; font-family: var(--font-sans); font-size: 0.9rem; border-radius: 8px; cursor: pointer; transition: all 0.18s; -webkit-tap-highlight-color: transparent; }
.lp-toggle.active { background: #111; border-color: #111; color: #fff; }
.lp-toggle-row-3 .lp-toggle { max-width: none; font-size: 0.82rem; padding: 0.85rem 0.4rem; }
.lp-difficulty-hint { font-size: 0.7rem; color: #999; margin-top: 0.5rem; letter-spacing: 0.04em; }

.lp-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem; margin-bottom: 1.8rem; }
.lp-stat-card { background: #fff; border: 1px solid #e0e0e0; border-radius: 12px; padding: 1rem 0.8rem 0.8rem; display: flex; flex-direction: column; align-items: center; gap: 0.25rem; }
.lp-stat-card.lp-stat-streak { border-color: var(--gold); background: rgba(196,164,88,0.07); }
.lp-stat-num { font-family: 'Tahoma', system-ui, sans-serif; font-size: 2rem; font-weight: 700; color: #111; line-height: 1; }
.lp-stat-label { font-family: 'Tahoma', system-ui, sans-serif; font-size: 0.72rem; color: #666; letter-spacing: 0.02em; }
.lp-stat-streak .lp-stat-num { color: var(--gold); }
.lp-stat-streak .lp-stat-label { color: var(--gold); }

.lp-btn-start { display: block; width: 100%; padding: 1.1rem; background: #111; color: #fff; border: none; font-family: var(--font-sans); font-size: 0.82rem; letter-spacing: 0.18em; text-transform: uppercase; border-radius: 8px; cursor: pointer; margin-top: 2rem; transition: background 0.2s; -webkit-tap-highlight-color: transparent; }
.lp-btn-start:active { background: #333; }
.lp-btn-reset { display: block; width: 100%; margin-top: 0.75rem; padding: 0.6rem; background: transparent; border: none; font-family: 'Tahoma', system-ui, sans-serif; font-size: 0.75rem; color: #aaa; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.lp-btn-reset:active { color: #e00; }
.lp-reset-confirm { margin-top: 0.75rem; background: #fff5f5; border: 1px solid #fcc; border-radius: 10px; padding: 0.9rem 1rem; text-align: center; }
.lp-reset-confirm p { font-family: 'Tahoma', system-ui, sans-serif; font-size: 0.88rem; color: #c00; margin-bottom: 0.75rem; }
.lp-reset-confirm-btns { display: flex; gap: 0.6rem; justify-content: center; }
.lp-reset-yes { padding: 0.55rem 1.4rem; background: #c00; color: #fff; border: none; border-radius: 8px; font-family: 'Tahoma', system-ui, sans-serif; font-size: 0.82rem; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.lp-reset-no { padding: 0.55rem 1.4rem; background: transparent; border: 1px solid #ccc; color: #555; border-radius: 8px; font-family: 'Tahoma', system-ui, sans-serif; font-size: 0.82rem; cursor: pointer; -webkit-tap-highlight-color: transparent; }

.lp-game { min-height: 100svh; display: flex; flex-direction: column; background: #fff; }
.lp-hud { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.5rem; border-bottom: 1px solid #e0e0e0; }
.lp-hud-back { background: none; border: 1px solid #ccc; border-radius: 8px; color: #555; font-family: Tahoma, 'Segoe UI', sans-serif; font-size: 0.85rem; padding: 0.3rem 0.75rem; cursor: pointer; transition: border-color 0.2s, color 0.2s; }
.lp-hud-back:hover { border-color: #111; color: #111; }
.lp-score { display: flex; gap: 1.2rem; font-size: 1.05rem; font-weight: 300; }
.lp-score-correct { color: var(--green); }
.lp-score-wrong { color: var(--red); }
.lp-timer { font-family: var(--font-serif); font-size: 2rem; font-weight: 500; color: #111; min-width: 2.2ch; text-align: right; transition: color 0.3s; }
.lp-timer.urgent { color: var(--red); }

.lp-note-bar { height: 5px; background: #e0e0e0; margin: 0 1.5rem; border-radius: 3px; overflow: hidden; }
.lp-note-bar-fill { height: 100%; background: #111; border-radius: 3px; transition: width 0.08s linear; }
.lp-note-bar-fill.urgent { background: var(--red); }

.lp-staff-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.lp-staff { width: 100%; max-width: 480px; height: auto; }
.lp-staff-tappable { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.lp-staff-tappable:active { opacity: 0.7; }

.lp-keyboard-wrap { padding: 0.5rem 1rem 2rem; border-top: 1px solid #e0e0e0; }
.lp-label-toggle { display: block; margin: 0 0 0.4rem auto; background: transparent; border: 1px solid #ccc; border-radius: 6px; font-size: 0.65rem; color: #888; padding: 0.18rem 0.5rem; cursor: pointer; font-family: 'Tahoma', system-ui, sans-serif; -webkit-tap-highlight-color: transparent; transition: all 0.15s; }
.lp-label-toggle.active { background: #111; color: #fff; border-color: #111; }
.lp-key-label-black { font-size: 0.42rem; color: #fff; font-family: 'Tahoma', system-ui, sans-serif; white-space: nowrap; pointer-events: none; line-height: 1; }
.lp-keyboard { position: relative; display: flex; height: 130px; width: 100%; }
.lp-key-white { flex: 1; background: #fff; border: 1.5px solid #bbb; border-left: none; border-radius: 0 0 8px 8px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 7px; cursor: pointer; font-family: 'Tahoma', system-ui, sans-serif; font-size: 0.6rem; color: #555; -webkit-tap-highlight-color: transparent; user-select: none; transition: background 0.08s; position: relative; }
.lp-key-white:first-child { border-left: 1.5px solid #bbb; }
.lp-key-white:active { background: #ddd; }
.lp-key-black { position: absolute; top: 0; width: 9%; height: 60%; background: #111; border: none; border-radius: 0 0 5px 5px; cursor: pointer; z-index: 2; -webkit-tap-highlight-color: transparent; user-select: none; transition: background 0.08s; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 4px; }
.lp-key-black:active { background: #555; }
.lp-key-black:disabled { background: #111; opacity: 1; cursor: default; }
.lp-key-cs { left: 10.3%; }
.lp-key-ds { left: 24.6%; }
.lp-key-fs { left: 53.1%; }
.lp-key-gs { left: 67.4%; }
.lp-key-as { left: 81.7%; }

.lp-results { min-height: 100svh; display: flex; align-items: flex-start; justify-content: center; padding: 3rem 1.5rem 2rem; overflow-y: auto; background: #fff; }
.lp-results-card { width: 100%; max-width: 400px; text-align: center; }
.lp-results-score { display: flex; flex-direction: column; align-items: center; margin: 1.2rem 0 0.5rem; }
.lp-results-num { font-family: var(--font-serif); font-size: 5rem; font-weight: 500; color: #111; line-height: 1; }
.lp-results-label { font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: #666; margin-top: 0.3rem; }
.lp-results-detail { font-size: 0.88rem; color: #666; margin-bottom: 1rem; }
.lp-tier { font-family: 'Tahoma', 'Segoe UI', system-ui, sans-serif; font-size: 1.4rem; font-weight: 700; color: #111; margin-bottom: 0.3rem; }
.lp-next-level { font-family: 'Tahoma', 'Segoe UI', system-ui, sans-serif; font-size: 0.8rem; color: #888; margin-bottom: 1.2rem; }
.lp-results-trend { font-family: 'Tahoma', system-ui, sans-serif; font-size: 1rem; color: #111; margin-bottom: 1.5rem; padding: 0.8rem 1rem; background: #f4f4f4; border-radius: 10px; line-height: 1.6; }
.lp-btn-review { display: block; width: 100%; padding: 0.9rem; background: transparent; border: 1.5px solid #ccc; color: #111; font-family: var(--font-sans); font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; border-radius: 8px; cursor: pointer; margin-bottom: 1rem; transition: background 0.18s; -webkit-tap-highlight-color: transparent; }
.lp-btn-review:active { background: #f0f0f0; }

.lp-review-list { text-align: left; margin-bottom: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
.lp-review-item { display: flex; align-items: center; gap: 1rem; background: #fff; border: 1px solid #e0e0e0; border-radius: 10px; padding: 0.7rem 0.9rem; }
.lp-review-staff { width: 100px; flex-shrink: 0; height: auto; }
.lp-review-text { display: flex; flex-direction: column; gap: 0.2rem; }
.lp-review-correct { font-family: var(--font-serif); font-size: 1.5rem; color: #111; font-weight: 500; }
.lp-review-given { font-size: 0.8rem; color: var(--red); }

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}