/**
 * timer.css — Estilos independientes del temporizador de competición.
 * No depende de base.css ni de ningún otro CSS del proyecto.
 * Incluye 5 skins: classic · modern · arena · tuarco · high-contrast
 */

/* ── Reset mínimo ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }

/* ── Variables base ───────────────────────────────────────────── */
:root {
    --font-ui: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --transition-slow: background 0.5s ease, color 0.3s ease;
    --transition-fast: 0.2s ease;
}

/* ══════════════════════════════════════════════════════════════
   DISPLAY — Pantalla fullscreen (SmartTV)
   ══════════════════════════════════════════════════════════════ */

body.timer-display-body {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    font-family: var(--font-ui);
    transition: var(--transition-slow);
    user-select: none;
    -webkit-user-select: none;
}

.timer-display-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 2rem;
}

/* Etiqueta de fase */
.d-phase-label {
    font-size: clamp(1.2rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    opacity: 0.8;
    margin-bottom: clamp(0.5rem, 2vh, 1.5rem);
    transition: opacity 0.3s;
}

/* Reloj — elemento principal */
.d-clock {
    font-size: clamp(12rem, 52vw, 48rem);
    font-weight: 900;
    line-height: 0.9;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
    transition: color 0.4s ease;
}

/* Urgencia últimos segundos */
.d-clock[data-urgent="true"] {
    animation: urgency-blink 0.6s ease-in-out infinite alternate;
}

@keyframes urgency-blink {
    from { opacity: 1; }
    to   { opacity: 0.5; }
}

/* Etiqueta de ronda */
.d-round-label {
    font-size: clamp(0.85rem, 2.5vw, 1.5rem);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.55;
    margin-top: clamp(0.75rem, 2vh, 1.5rem);
}

/* Marquee — fijo en la parte inferior */
.d-marquee-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: clamp(2.5rem, 6vh, 4rem);
    display: none;          /* oculto si no hay texto */
    align-items: center;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.25);
}

.d-marquee-bar.visible {
    display: flex;
}

.d-marquee-text {
    white-space: nowrap;
    font-size: clamp(1rem, 3vw, 1.75rem);
    font-weight: 700;
    padding-left: 100vw;
    animation: marquee-run 18s linear infinite;
}

@keyframes marquee-run {
    from { transform: translateX(0); }
    to   { transform: translateX(-100%); }
}

/* Aviso offline */
.d-offline {
    position: absolute;
    top: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(220, 38, 38, 0.92);
    color: #fff;
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    display: none;
    align-items: center;
    gap: 0.5rem;
    z-index: 100;
    text-align: center;
    max-width: 90vw;
    text-transform: uppercase;
}

.d-offline.visible {
    display: flex;
}

/* ══════════════════════════════════════════════════════════════
   SKINS — Display
   Cada skin define el fondo+texto base y los overrides por fase.
   ══════════════════════════════════════════════════════════════ */

/* ── classic ─────────────────────────────────────────────────── */
body[data-skin="classic"].timer-display-body                    { background: #12122b; color: #fff; }
body[data-skin="classic"][data-phase="preshoot"].timer-display-body  { background: #3d1a00; }
body[data-skin="classic"][data-phase="shooting"].timer-display-body  { background: #022c14; }
body[data-skin="classic"][data-phase="end"].timer-display-body       { background: #0a1f44; }

body[data-skin="classic"] .d-clock                              { color: #e2e8f0; }
body[data-skin="classic"][data-phase="preshoot"] .d-clock       { color: #fbbf24; }
body[data-skin="classic"][data-phase="shooting"] .d-clock       { color: #4ade80; }
body[data-skin="classic"][data-phase="end"] .d-clock            { color: #60a5fa; }
body[data-skin="classic"] .d-clock[data-urgent="true"]          { color: #ef4444; }

/* ── modern ──────────────────────────────────────────────────── */
body[data-skin="modern"].timer-display-body                     { background: linear-gradient(160deg, #0f172a 0%, #1e293b 100%); color: #f1f5f9; }
body[data-skin="modern"][data-phase="preshoot"].timer-display-body   { background: linear-gradient(160deg, #44180f 0%, #7c2d12 100%); }
body[data-skin="modern"][data-phase="shooting"].timer-display-body   { background: linear-gradient(160deg, #052e16 0%, #14532d 100%); }
body[data-skin="modern"][data-phase="end"].timer-display-body        { background: linear-gradient(160deg, #1e1b4b 0%, #312e81 100%); }

body[data-skin="modern"] .d-clock                               { color: #e2e8f0; }
body[data-skin="modern"][data-phase="preshoot"] .d-clock        { color: #fdba74; }
body[data-skin="modern"][data-phase="shooting"] .d-clock        { color: #86efac; }
body[data-skin="modern"][data-phase="end"] .d-clock             { color: #a5b4fc; }
body[data-skin="modern"] .d-clock[data-urgent="true"]           { color: #f87171; }

/* ── arena (tema naranja oscuro de arena.css) ────────────────── */
body[data-skin="arena"].timer-display-body                      { background: #111827; color: #f9fafb; }
body[data-skin="arena"][data-phase="standby"] .d-phase-label    { color: #ea580c; }
body[data-skin="arena"][data-phase="preshoot"].timer-display-body    { background: #431407; }
body[data-skin="arena"][data-phase="shooting"].timer-display-body    { background: #052e16; }
body[data-skin="arena"][data-phase="end"].timer-display-body         { background: #172554; }

body[data-skin="arena"] .d-clock                                { color: #f9fafb; }
body[data-skin="arena"][data-phase="preshoot"] .d-clock         { color: #fb923c; }
body[data-skin="arena"][data-phase="shooting"] .d-clock         { color: #4ade80; }
body[data-skin="arena"][data-phase="end"] .d-clock              { color: #60a5fa; }
body[data-skin="arena"] .d-clock[data-urgent="true"]            { color: #ef4444; }

/* ── tuarco (gradiente morado de base.css) ───────────────────── */
body[data-skin="tuarco"].timer-display-body                     { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; }
body[data-skin="tuarco"][data-phase="preshoot"].timer-display-body   { background: linear-gradient(135deg, #d97706 0%, #92400e 100%); }
body[data-skin="tuarco"][data-phase="shooting"].timer-display-body   { background: linear-gradient(135deg, #059669 0%, #065f46 100%); }
body[data-skin="tuarco"][data-phase="end"].timer-display-body        { background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%); }

body[data-skin="tuarco"] .d-clock                               { color: rgba(255,255,255,0.95); }
body[data-skin="tuarco"][data-phase="preshoot"] .d-clock        { color: #fef3c7; }
body[data-skin="tuarco"][data-phase="shooting"] .d-clock        { color: #d1fae5; }
body[data-skin="tuarco"][data-phase="end"] .d-clock             { color: #dbeafe; }
body[data-skin="tuarco"] .d-clock[data-urgent="true"]           { color: #fca5a5; }

/* ── high-contrast ───────────────────────────────────────────── */
body[data-skin="high-contrast"].timer-display-body              { background: #000; color: #fff; }
body[data-skin="high-contrast"][data-phase="preshoot"].timer-display-body  { background: #fff; color: #000; }
body[data-skin="high-contrast"][data-phase="preshoot"] .d-clock { color: #000; }
body[data-skin="high-contrast"][data-phase="preshoot"] .d-phase-label { color: #000; }
body[data-skin="high-contrast"][data-phase="preshoot"] .d-round-label { color: #333; }
body[data-skin="high-contrast"][data-phase="preshoot"] .d-marquee-bar { background: rgba(0,0,0,0.1); }
body[data-skin="high-contrast"][data-phase="preshoot"] .d-marquee-text { color: #000; }
body[data-skin="high-contrast"][data-phase="shooting"].timer-display-body  { background: #00aa00; color: #000; }
body[data-skin="high-contrast"][data-phase="shooting"] .d-clock { color: #000; }
body[data-skin="high-contrast"][data-phase="shooting"] .d-phase-label { color: #000; }
body[data-skin="high-contrast"][data-phase="end"].timer-display-body       { background: #0000dd; color: #fff; }

body[data-skin="high-contrast"] .d-clock                       { color: #fff; }
body[data-skin="high-contrast"] .d-clock[data-urgent="true"]   { color: #ff0000; }
body[data-skin="high-contrast"][data-phase="shooting"] .d-clock[data-urgent="true"] { color: #ff0000; }

/* ══════════════════════════════════════════════════════════════
   JOIN — Página de entrada del código (SmartTV)
   ══════════════════════════════════════════════════════════════ */

body.timer-join-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f172a;
    font-family: var(--font-ui);
    padding: 1rem;
}

.join-card {
    background: #1e293b;
    border-radius: 1.5rem;
    padding: 3rem 2rem;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.join-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    display: block;
}

.join-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #f1f5f9;
    margin-bottom: 0.375rem;
}

.join-subtitle {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 2rem;
}

.join-input {
    width: 100%;
    background: #0f172a;
    border: 2px solid #334155;
    border-radius: 0.75rem;
    color: #f1f5f9;
    font-size: 2.5rem;
    font-weight: 900;
    text-align: center;
    letter-spacing: 0.35em;
    padding: 0.75rem 0.5rem;
    text-transform: uppercase;
    margin-bottom: 1rem;
    transition: border-color var(--transition-fast);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.join-input:focus {
    border-color: #f97316;
}

.join-btn {
    width: 100%;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
    border: none;
    border-radius: 0.75rem;
    font-size: 1.125rem;
    font-weight: 800;
    padding: 1rem;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.join-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(234, 88, 12, 0.4);
}

.join-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    text-align: left;
}

.join-alt-link {
    display: block;
    margin-top: 1.5rem;
    color: #475569;
    font-size: 0.8rem;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.join-alt-link:hover {
    color: #94a3b8;
}

/* ══════════════════════════════════════════════════════════════
   CONTROL — Panel del juez (smartphone)
   ══════════════════════════════════════════════════════════════ */

body.timer-control-body {
    min-height: 100vh;
    background: #0f172a;
    color: #f1f5f9;
    font-family: var(--font-ui);
    padding: 0 0 5rem;
}

.ctrl-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Cabecera con código */
.ctrl-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 0 1.25rem;
    border-bottom: 1px solid #1e293b;
    margin-bottom: 1.25rem;
    position: sticky;
    top: 0;
    background: #0f172a;
    z-index: 10;
}

.ctrl-code {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: 0.4em;
    color: #f97316;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.ctrl-code-hint {
    font-size: 0.7rem;
    color: #475569;
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

/* Selector de idioma */
.ctrl-lang-form {
    position: absolute;
    top: 1rem;
    right: 1rem;
}
.ctrl-lang-select {
    background: #1e293b;
    color: #94a3b8;
    border: 1px solid #334155;
    border-radius: 6px;
    padding: 0.2rem 0.4rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    outline: none;
}
.ctrl-lang-select:focus {
    border-color: #475569;
    color: #e2e8f0;
}

/* Barra de progreso de fases */
.ctrl-phase-bar {
    display: flex;
    gap: 0.3rem;
    width: 100%;
    margin-top: 0.75rem;
}

.ctrl-phase-dot {
    flex: 1;
    height: 5px;
    border-radius: 9999px;
    background: #1e293b;
    transition: background 0.3s;
}

.ctrl-phase-dot.active { background: #f97316; }
.ctrl-phase-dot.done   { background: #475569; }

/* Fase actual */
.ctrl-phase-display {
    text-align: center;
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 1.25rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ctrl-phase-display strong {
    color: #f97316;
    font-weight: 700;
}

/* Estado de conexión */
.ctrl-conn-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    color: #475569;
    margin-bottom: 1rem;
}

.ctrl-conn-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ade80;
    transition: background 0.3s;
}

.ctrl-conn-dot.offline { background: #ef4444; }

/* Grid de botones de fase */
.ctrl-btn-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.625rem;
    margin-bottom: 1.25rem;
}

.ctrl-btn {
    border: none;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.875rem 0.375rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    line-height: 1.2;
    text-align: center;
}

.ctrl-btn-icon { font-size: 1.4rem; line-height: 1; }

.ctrl-btn-start {
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #fff;
}
.ctrl-btn-start:hover:not(:disabled) {
    filter: brightness(1.12);
    transform: translateY(-1px);
}
.ctrl-btn-start:disabled {
    background: #1e293b;
    color: #334155;
    cursor: not-allowed;
}

.ctrl-btn-shoot {
    background: linear-gradient(135deg, #d97706, #92400e);
    color: #fff;
}
.ctrl-btn-shoot:hover:not(:disabled) { filter: brightness(1.1); transform: translateY(-1px); }
.ctrl-btn-shoot:disabled {
    background: #1e293b;
    color: #334155;
    cursor: not-allowed;
}

.ctrl-btn-end {
    background: linear-gradient(135deg, #dc2626, #991b1b);
    color: #fff;
}
.ctrl-btn-end:hover:not(:disabled) { filter: brightness(1.1); transform: translateY(-1px); }
.ctrl-btn-end:disabled {
    background: #1e293b;
    color: #334155;
    cursor: not-allowed;
}

/* Error flash */
.ctrl-error {
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.4);
    color: #fca5a5;
    border-radius: 0.5rem;
    padding: 0.625rem 0.875rem;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    display: none;
}

/* Secciones de configuración */
.ctrl-section {
    background: #1e293b;
    border-radius: 0.875rem;
    padding: 1rem;
    margin-bottom: 0.875rem;
}

.ctrl-section-title {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #475569;
    font-weight: 700;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

/* Inputs */
.ctrl-label {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-bottom: 0.2rem;
    display: block;
}

.ctrl-input,
.ctrl-select {
    width: 100%;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 0.5rem;
    color: #f1f5f9;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    margin-bottom: 0.625rem;
    outline: none;
    transition: border-color var(--transition-fast);
    -webkit-appearance: none;
    appearance: none;
}

.ctrl-input:focus,
.ctrl-select:focus {
    border-color: #f97316;
}

.ctrl-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.ctrl-input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.625rem;
}

/* Marquee */
.ctrl-marquee-row {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

.ctrl-marquee-row .ctrl-input {
    flex: 1;
    margin-bottom: 0;
}

.ctrl-btn-sm {
    border: none;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: background var(--transition-fast);
    white-space: nowrap;
    flex-shrink: 0;
}

.ctrl-btn-send  { background: #0ea5e9; color: #fff; }
.ctrl-btn-send:hover { background: #0284c7; }
.ctrl-btn-clear { background: #334155; color: #94a3b8; }
.ctrl-btn-clear:hover { background: #475569; }

/* ── Tabs de modo (Normal / Alterno) ────────────────────────── */
.ctrl-tabs {
    display: flex;
    border-radius: 0.625rem;
    overflow: hidden;
    background: #1e293b;
    margin-bottom: 1.25rem;
}

.ctrl-tab {
    flex: 1;
    border: none;
    background: transparent;
    color: #64748b;
    font-weight: 700;
    font-size: 0.78rem;
    padding: 0.625rem 0.5rem;
    cursor: pointer;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: all var(--transition-fast);
}

.ctrl-tab.active {
    background: #f97316;
    color: #fff;
}

/* ── Alt: cards en el panel de control ──────────────────────── */
.alt-ctrl-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.625rem;
    margin-bottom: 0.75rem;
}

.alt-ctrl-card {
    background: #0f172a;
    border: 2px solid #334155;
    border-radius: 0.75rem;
    padding: 0.75rem;
    text-align: center;
    transition: all var(--transition-fast);
}

.alt-ctrl-card[data-active="true"] {
    border-color: #4ade80;
    background: rgba(74, 222, 128, 0.07);
}

.alt-ctrl-name {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #64748b;
    margin-bottom: 0.3rem;
}

.alt-ctrl-card[data-active="true"] .alt-ctrl-name { color: #4ade80; }

.alt-ctrl-clock {
    font-size: 2.25rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    color: #cbd5e1;
    line-height: 1;
}

.alt-ctrl-card[data-active="true"] .alt-ctrl-clock { color: #4ade80; }

/* ══════════════════════════════════════════════════════════════
   DISPLAY ALTERNO — Dos timers lado a lado (SmartTV)
   ══════════════════════════════════════════════════════════════ */

.timer-display-alt-wrap {
    width: 100%;
    height: 100%;
    display: none;          /* activado por JS cuando mode=alternate */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    gap: 2vh;
    position: absolute;
    top: 0; left: 0;
}

.alt-round-label-d {
    font-size: clamp(0.85rem, 2.5vw, 1.5rem);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.55;
}

.alt-cards-row {
    display: flex;
    gap: clamp(1rem, 5vw, 6rem);
    align-items: center;
    justify-content: center;
    width: 100%;
    flex: 1;
}

.alt-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    max-width: 45vw;
    transition: opacity 0.4s ease;
}

.alt-card[data-active="false"] { opacity: 0.2; }
.alt-card[data-active="true"]  { opacity: 1; }

.alt-archer-name {
    font-size: clamp(1rem, 3.5vw, 2.5rem);
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.3em;
    opacity: 0.75;
}

.alt-clock {
    font-size: clamp(5rem, 22vw, 20rem);
    font-weight: 900;
    line-height: 0.9;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
    transition: color 0.4s ease;
}

.alt-clock[data-urgent="true"] {
    animation: urgency-blink 0.6s ease-in-out infinite alternate;
}

.alt-divider {
    width: 2px;
    height: clamp(8rem, 30vh, 20rem);
    background: currentColor;
    opacity: 0.15;
    flex-shrink: 0;
}

/* ── Alt clock: colores por skin × fase ─────────────────────── */
body[data-skin="classic"] .alt-clock                              { color: #e2e8f0; }
body[data-skin="classic"][data-phase="shooting"] .alt-clock       { color: #4ade80; }
body[data-skin="classic"][data-phase="end"] .alt-clock            { color: #60a5fa; }
body[data-skin="classic"] .alt-clock[data-urgent="true"]          { color: #ef4444; }

body[data-skin="modern"] .alt-clock                               { color: #e2e8f0; }
body[data-skin="modern"][data-phase="shooting"] .alt-clock        { color: #86efac; }
body[data-skin="modern"][data-phase="end"] .alt-clock             { color: #a5b4fc; }
body[data-skin="modern"] .alt-clock[data-urgent="true"]           { color: #f87171; }

body[data-skin="arena"] .alt-clock                                { color: #f9fafb; }
body[data-skin="arena"][data-phase="shooting"] .alt-clock         { color: #4ade80; }
body[data-skin="arena"][data-phase="end"] .alt-clock              { color: #60a5fa; }
body[data-skin="arena"] .alt-clock[data-urgent="true"]            { color: #ef4444; }

body[data-skin="tuarco"] .alt-clock                               { color: rgba(255,255,255,0.95); }
body[data-skin="tuarco"][data-phase="shooting"] .alt-clock        { color: #d1fae5; }
body[data-skin="tuarco"][data-phase="end"] .alt-clock             { color: #dbeafe; }
body[data-skin="tuarco"] .alt-clock[data-urgent="true"]           { color: #fca5a5; }

body[data-skin="high-contrast"] .alt-clock                        { color: #fff; }
body[data-skin="high-contrast"][data-phase="shooting"] .alt-clock { color: #000; }
body[data-skin="high-contrast"][data-phase="end"] .alt-clock      { color: #fff; }
body[data-skin="high-contrast"] .alt-clock[data-urgent="true"]    { color: #ff0000; }

/* ══════════════════════════════════════════════════════════════
   MODO AB/CD — Display
   ══════════════════════════════════════════════════════════════ */

.timer-display-abcd-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 2rem;
}

/* Etiqueta del grupo activo (AB o CD) — secundaria */
.d-abcd-group {
    font-size: clamp(4rem, 16vw, 14rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    opacity: 0.75;
    transition: color 0.4s ease;
    margin-bottom: clamp(0.25rem, 1vh, 0.75rem);
}

/* Reloj principal en modo ABCD — elemento grande */
.d-abcd-clock {
    font-size: clamp(10rem, 44vw, 40rem);
    font-weight: 900;
    line-height: 0.9;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
    transition: color 0.4s ease;
}

.d-abcd-clock[data-urgent="true"] {
    animation: urgency-blink 0.6s ease-in-out infinite alternate;
    opacity: 1;
}

/* ── ABCD: colores por skin × fase ──────────────────────────── */
body[data-skin="classic"] .d-abcd-group                              { color: #e2e8f0; }
body[data-skin="classic"][data-phase="preshoot"] .d-abcd-group       { color: #fbbf24; }
body[data-skin="classic"][data-phase="shooting"] .d-abcd-group       { color: #4ade80; }
body[data-skin="classic"][data-phase="end"] .d-abcd-group            { color: #60a5fa; }
body[data-skin="classic"] .d-abcd-clock                              { color: #e2e8f0; }
body[data-skin="classic"][data-phase="preshoot"] .d-abcd-clock       { color: #fbbf24; }
body[data-skin="classic"][data-phase="shooting"] .d-abcd-clock       { color: #4ade80; }
body[data-skin="classic"] .d-abcd-clock[data-urgent="true"]          { color: #ef4444; }

body[data-skin="modern"] .d-abcd-group                               { color: #e2e8f0; }
body[data-skin="modern"][data-phase="preshoot"] .d-abcd-group        { color: #fdba74; }
body[data-skin="modern"][data-phase="shooting"] .d-abcd-group        { color: #86efac; }
body[data-skin="modern"][data-phase="end"] .d-abcd-group             { color: #a5b4fc; }
body[data-skin="modern"] .d-abcd-clock                               { color: #e2e8f0; }
body[data-skin="modern"][data-phase="preshoot"] .d-abcd-clock        { color: #fdba74; }
body[data-skin="modern"][data-phase="shooting"] .d-abcd-clock        { color: #86efac; }
body[data-skin="modern"] .d-abcd-clock[data-urgent="true"]           { color: #f87171; }

body[data-skin="arena"] .d-abcd-group                                { color: #f9fafb; }
body[data-skin="arena"][data-phase="preshoot"] .d-abcd-group         { color: #fb923c; }
body[data-skin="arena"][data-phase="shooting"] .d-abcd-group         { color: #4ade80; }
body[data-skin="arena"][data-phase="end"] .d-abcd-group              { color: #60a5fa; }
body[data-skin="arena"] .d-abcd-clock                                { color: #f9fafb; }
body[data-skin="arena"][data-phase="preshoot"] .d-abcd-clock         { color: #fb923c; }
body[data-skin="arena"][data-phase="shooting"] .d-abcd-clock         { color: #4ade80; }
body[data-skin="arena"] .d-abcd-clock[data-urgent="true"]            { color: #ef4444; }

body[data-skin="tuarco"] .d-abcd-group                               { color: rgba(255,255,255,0.95); }
body[data-skin="tuarco"][data-phase="preshoot"] .d-abcd-group        { color: #fef3c7; }
body[data-skin="tuarco"][data-phase="shooting"] .d-abcd-group        { color: #d1fae5; }
body[data-skin="tuarco"][data-phase="end"] .d-abcd-group             { color: #dbeafe; }
body[data-skin="tuarco"] .d-abcd-clock                               { color: rgba(255,255,255,0.95); }
body[data-skin="tuarco"][data-phase="preshoot"] .d-abcd-clock        { color: #fef3c7; }
body[data-skin="tuarco"][data-phase="shooting"] .d-abcd-clock        { color: #d1fae5; }
body[data-skin="tuarco"] .d-abcd-clock[data-urgent="true"]           { color: #fca5a5; }

body[data-skin="high-contrast"] .d-abcd-group                        { color: #fff; }
body[data-skin="high-contrast"][data-phase="preshoot"] .d-abcd-group { color: #000; }
body[data-skin="high-contrast"][data-phase="shooting"] .d-abcd-group { color: #000; }
body[data-skin="high-contrast"] .d-abcd-clock                        { color: #fff; }
body[data-skin="high-contrast"][data-phase="shooting"] .d-abcd-clock { color: #000; }
body[data-skin="high-contrast"] .d-abcd-clock[data-urgent="true"]    { color: #ff0000; }
