      :root {
        --bg: #0d0d0d;
        --surface: #161616;
        --card: #1e1e1e;
        --border: #2e2e2e;
        --accent: #c8a84b;
        --accent-dim: rgba(200, 168, 75, 0.12);
        --text: #f0ede8;
        --muted: #666;
        --danger: #c0392b;
        --success: #27ae60;
      }
      * {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
        -webkit-tap-highlight-color: transparent;
      }
      html,
      body {
        height: var(--app-h, 100dvh);
      }
      @supports not (height: 100dvh) {
        html, body { height: var(--app-h, 100%); }
      }
      body {
        font-family: "Inter", sans-serif;
        background: var(--bg);
        color: var(--text);
        max-width: 480px;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        overscroll-behavior-y: none;
      }
      html {
        overscroll-behavior-y: none;
        overscroll-behavior: none;
      }
      .nav {
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        display: flex;
        position: sticky;
        top: 0;
        z-index: 20;
        overflow-x: auto;
        scrollbar-width: none;
        padding: 0 2px;
      }
      .nav::-webkit-scrollbar {
        display: none;
      }
      .nav-btn {
        flex: 0 0 auto;
        min-width: 73px;
        padding: 0 4px;
        height: 73px;
        background: none;
        border: none;
        color: #fff;
        font-family: "Inter", sans-serif;
        font-size: 11px;
        font-weight: 600;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        transition: color 0.2s;
        white-space: nowrap;
      }
      .nav-btn .ni {
        width: 48px;
        height: 33px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 14px;
        transition: background 0.2s;
      }
      .nav-btn .ni svg {
        width: 24px;
        height: 24px;
        display: block;
      }
      .nav-btn.active {
        color: var(--accent);
      }
      .nav-btn.active .ni {
        background: rgba(200, 168, 75, 0.2);
      }
      .content {
        flex: 1;
        overflow-y: auto;
        padding-top: 5px;
        padding-bottom: 24px;
        overscroll-behavior-y: none;
        -webkit-overflow-scrolling: touch;
      }
      body.has-modal-open .content {
        pointer-events: none;
      }
      .view {
        display: none;
      }
      .view.active {
        display: block;
      }
      #view-contador.active,
      #view-tiro-rapido.active,
      #view-calendario.active,
      #view-estadisticas.active,
      #view-backup.active,
      #view-contacto.active,
      #view-tiradores.active,
      #view-mis-datos.active,
      #view-mi-qr.active,
      #view-companeros.active,
      #view-invitados.active {
        display: flex;
        flex-direction: column;
        height: 100%;
        overflow: hidden;
      }
      #view-backup.active > .section,
      #view-contacto.active > .section {
        flex: 1;
        overflow-y: auto;
      }
      .page-header {
        padding: 16px 16px 12px;
        border-bottom: 1px solid var(--border);
        display: flex;
        align-items: center;
        justify-content: space-between;
      }
      .page-title {
        font-family: "Oswald", sans-serif;
        font-size: 20px;
        letter-spacing: 1px;
        color: var(--accent);
      }
      .section {
        padding: 12px 16px;
      }
      .section-label {
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: var(--muted);
        margin-bottom: 8px;
      }
      .stats-row {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
        padding: 0 16px 0;
      }
      .stat-box {
        background: var(--card);
        border: 1px solid var(--border);
        border-radius: 10px;
        padding: 10px 6px;
        text-align: center;
        cursor: pointer;
        transition:
          border-color 0.15s,
          background 0.15s;
      }
      .stat-box:active {
        border-color: var(--accent);
        background: var(--accent-dim);
      }
      .stat-val {
        font-family: "Oswald", sans-serif;
        font-size: 22px;
        color: var(--accent);
        line-height: 1;
      }
      .stat-lbl {
        font-size: 11px;
        color: #aaa;
        margin-top: 2px;
        text-transform: uppercase;
        letter-spacing: 0.4px;
        font-weight: 600;
      }
      .mod-item {
        background: var(--card);
        border: 1px solid var(--border);
        border-radius: 12px;
        margin-bottom: 8px;
        position: relative;
        overflow: hidden;
        isolation: isolate;
        user-select: none;
        -webkit-user-select: none;
      }
      .mod-inner {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 12px 14px;
        cursor: pointer;
        transition: transform 0.25s ease;
        background: var(--card);
        position: relative;
        z-index: 1;
      }
      .mod-inner:active {
        background: #322e23;
      }
      .drag-handle {
        cursor: grab;
        color: var(--muted);
        font-size: 22px;
        padding: 4px 10px;
        touch-action: none;
        flex-shrink: 0;
        user-select: none;
        -webkit-user-select: none;
      }
      .mod-name {
        font-weight: 600;
        font-size: 15px;
      }
      .mod-sub {
        font-size: 12px;
        color: #8a8a8a;
        margin-top: 3px;
      }
      .mod-arrow {
        color: var(--accent);
        font-size: 20px;
        flex-shrink: 0;
      }
      .mod-actions {
        display: flex;
        gap: 6px;
        align-items: center;
      }
      .icon-btn {
        background: none;
        border: none;
        color: var(--muted);
        font-size: 17px;
        cursor: pointer;
        padding: 6px 8px;
        border-radius: 6px;
        transition: color 0.15s;
        line-height: 1;
      }
      .icon-btn.del:active {
        color: var(--danger);
      }
      .drag-handle {
        cursor: grab;
        color: var(--muted);
        font-size: 18px;
        padding: 4px 6px;
        touch-action: none;
        flex-shrink: 0;
      }
      .mod-item.dragging {
        opacity: 0.4;
        border: 2px dashed var(--accent);
      }
      .mod-item.drag-over {
        border-top: 2px solid var(--accent);
      }
      .log-entry {
        position: relative;
        background: var(--card);
        border: 1px solid var(--border);
        border-left: 4px solid var(--accent);
        border-radius: 10px;
        padding: 10px 12px;
        margin-bottom: 8px;
        display: flex;
        align-items: center;
        gap: 8px;
        cursor: pointer;
        transition: background 0.15s;
        overflow: hidden;
      }
      .log-entry.is-train {
        border-left: 4px solid #27ae60 !important;
      }
      .log-entry.is-train::after {
        content: "";
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: #27ae60;
      }
      .log-entry.is-comp {
        border-left: 4px solid #c0392b !important;
      }
      .log-entry.is-comp::after {
        content: "";
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: #c0392b;
      }
      .log-entry:active {
        background: #252525;
      }
      @keyframes fadeIn {
        from {
          opacity: 0;
          transform: translateY(5px);
        }
        to {
          opacity: 1;
          transform: translateY(0);
        }
      }
      .log-left {
        flex: 1;
        min-width: 0;
      }
      .log-mod {
        font-weight: 600;
        font-size: 13px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .log-date {
        font-size: 12px;
        color: #8a8a8a;
        margin-top: 2px;
      }
      .log-note {
        font-size: 11px;
        color: #8a8a8a;
        margin-top: 2px;
        font-style: italic;
      }
      .log-scores {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        flex-shrink: 0;
      }
      .log-total {
        font-family: "Oswald", sans-serif;
        font-size: 26px;
        color: var(--accent);
        line-height: 1;
      }
      .log-phases {
        font-size: 11px;
        color: #8a8a8a;
        margin-top: 2px;
        text-align: right;
      }
      .swipe-row {
        position: relative;
        overflow: hidden;
        border-radius: 10px;
        margin-bottom: 8px;
        isolation: isolate;
        animation: fadeIn 0.2s ease;
      }
      .swipe-row .log-entry {
        margin-bottom: 0;
        border-radius: 10px;
        position: relative;
        z-index: 1;
      }
      .swipe-bg {
        position: absolute;
        inset: 0;
        z-index: 0;
        background: #c0392b;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        padding-right: 22px;
        pointer-events: none;
      }
      .swipe-bg svg {
        width: 22px;
        height: 22px;
        stroke: #fff;
        fill: none;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
      }
      .filter-bar {
        padding: 10px 16px 0;
        display: flex;
        gap: 6px;
        overflow-x: auto;
        scrollbar-width: none;
      }
      .filter-bar::-webkit-scrollbar {
        display: none;
      }
      .chip {
        flex-shrink: 0;
        padding: 5px 12px;
        border-radius: 20px;
        border: 1.5px solid var(--border);
        background: var(--card);
        color: #aaa;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.15s;
        white-space: nowrap;
      }
      .chip.active {
        border-color: var(--accent);
        color: var(--accent);
        background: var(--accent-dim);
      }
      .chip.active-train {
        border-color: var(--success);
        color: var(--success);
        background: rgba(39, 174, 96, 0.12);
      }
      .chip.active-comp {
        border-color: var(--danger);
        color: var(--danger);
        background: rgba(192, 57, 43, 0.12);
      }
      .date-filter-row {
        padding: 8px 16px 0;
        display: flex;
        gap: 6px;
      }
      .date-input-wrap {
        flex: 1;
      }
      .date-input-wrap label {
        font-size: 10px;
        color: var(--muted);
        display: block;
        margin-bottom: 3px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
      }
      .date-input,
      .input,
      .textarea,
      .select {
        width: 100%;
        background: var(--card);
        border: 1.5px solid var(--border);
        border-radius: 10px;
        padding: 11px 14px;
        color: var(--text);
        font-family: "Inter", sans-serif;
        font-size: 14px;
        outline: none;
        transition: border-color 0.15s;
        appearance: none;
        -webkit-appearance: none;
      }
      .date-input:focus,
      .input:focus,
      .textarea:focus,
      .select:focus {
        border-color: var(--accent);
      }
      .select option {
        background: var(--card);
      }
      .clear-btn {
        align-self: flex-end;
        padding: 8px 12px;
        background: var(--card);
        border: 1.5px solid var(--border);
        border-radius: 8px;
        color: var(--muted);
        font-size: 12px;
        cursor: pointer;
        font-family: "Inter", sans-serif;
        white-space: nowrap;
      }
      .form-group {
        margin-bottom: 16px;
      }
      .form-label {
        display: block;
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: var(--muted);
        margin-bottom: 7px;
      }
      .score-input {
        font-family: "Oswald", sans-serif;
        font-size: 34px;
        text-align: center;
        color: var(--accent);
        letter-spacing: 2px;
      }
      .textarea {
        resize: none;
        height: 70px;
        font-size: 13px;
      }
      .two-scores {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
      }
      .toggle-group {
        display: flex;
        gap: 6px;
      }
      .toggle-btn {
        flex: 1;
        padding: 10px;
        background: var(--card);
        border: 1.5px solid var(--border);
        border-radius: 10px;
        color: var(--muted);
        font-family: "Inter", sans-serif;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.15s;
        text-align: center;
      }
      .toggle-btn.active {
        border-color: var(--accent);
        color: var(--accent);
        background: var(--accent-dim);
      }
      .btn-primary {
        width: 100%;
        background: var(--accent);
        color: #0d0d0d;
        border: none;
        border-radius: 12px;
        padding: 15px;
        font-family: "Oswald", sans-serif;
        font-size: 17px;
        letter-spacing: 1.5px;
        cursor: pointer;
        transition:
          opacity 0.15s,
          transform 0.1s;
      }
      .btn-primary:active {
        opacity: 0.88;
        transform: scale(0.98);
      }
      .btn-secondary {
        width: 100%;
        background: transparent;
        color: var(--muted);
        border: 1.5px solid var(--border);
        border-radius: 12px;
        padding: 13px;
        font-family: "Inter", sans-serif;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        margin-top: 8px;
        transition:
          border-color 0.15s,
          color 0.15s;
      }
      .btn-danger {
        width: 100%;
        background: var(--danger);
        color: #fff;
        border: none;
        border-radius: 12px;
        padding: 13px;
        font-family: "Inter", sans-serif;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        margin-top: 8px;
      }
      /* Fila de acciones al principio de un formulario (cancelar + aceptar en misma línea, mismo tamaño).
         El botón secundario se pinta negro con borde y texto blanco para mejor contraste.
         La anchura total iguala a la de los campos de texto del formulario. */
      .form-actions {
        display: flex;
        gap: 10px;
        margin: 2px 0 14px;
        width: 100%;
        box-sizing: border-box;
      }
      .form-actions .btn-primary,
      .form-actions .btn-secondary {
        flex: 1;
        width: auto;
        margin-top: 0;
        padding: 14px;
        font-family: "Oswald", sans-serif;
        font-size: 16px;
        font-weight: 600;
        letter-spacing: 1.3px;
      }
      .form-actions .btn-secondary {
        background: #000;
        color: #fff;
        border: 1.5px solid #fff;
      }
      .form-actions .btn-secondary:active {
        opacity: 0.85;
        transform: scale(0.98);
      }
      /* Explicación del formulario: mismo color y tamaño que .form-label (sin mayúsculas).
         Separadores finos arriba (tras botones) y abajo (antes de los campos). */
      .form-explain {
        font-size: 11px;
        color: var(--muted);
        line-height: 1.5;
        padding: 10px 0;
        border-top: 1px solid var(--border);
        border-bottom: 1px solid var(--border);
        margin: 0 0 14px;
      }
      .modal-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.78);
        z-index: 50;
        display: none;
        align-items: flex-end;
        overflow: hidden;
      }
      .modal-overlay.open {
        display: flex;
      }
      .modal {
        background: var(--surface);
        border-radius: 20px 20px 0 0;
        padding: 6px 16px 28px;
        width: 100%;
        max-height: 92dvh;
        overflow-y: auto;
        overscroll-behavior-y: none;
        -webkit-overflow-scrolling: touch;
        animation: slideUp 0.22s ease;
      }
      /* Modals with sticky action buttons */
      .modal:has(> .modal-footer) {
        padding-bottom: 0;
      }
      .modal-footer {
        position: sticky;
        bottom: 0;
        background: var(--surface);
        padding: 10px 0 28px;
        display: flex;
        flex-direction: column;
        gap: 6px;
        border-top: 1px solid var(--border);
      }
      .modal-footer .btn-secondary,
      .modal-footer .btn-danger {
        margin-top: 0;
      }
      @keyframes slideUp {
        from {
          transform: translateY(100%);
        }
        to {
          transform: translateY(0);
        }
      }
      .modal-handle {
        width: 36px;
        height: 4px;
        background: var(--border);
        border-radius: 2px;
        margin: 10px auto 18px;
      }
      .modal-title {
        font-family: "Oswald", sans-serif;
        font-size: 19px;
        letter-spacing: 1px;
        color: var(--accent);
        margin-bottom: 18px;
      }
      .confirm-msg {
        font-size: 14px;
        line-height: 1.6;
        color: var(--text);
        margin-bottom: 20px;
        padding: 12px;
        background: var(--card);
        border-radius: 10px;
        border: 1px solid var(--border);
      }
      .toast {
        position: fixed;
        bottom: 70px;
        left: 50%;
        transform: translateX(-50%) translateY(12px);
        background: var(--success);
        color: #fff;
        padding: 10px 20px;
        border-radius: 30px;
        font-size: 13px;
        font-weight: 600;
        opacity: 0;
        transition: all 0.3s;
        z-index: 200;
        white-space: nowrap;
        pointer-events: none;
      }
      .toast.show {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
      }
      .empty {
        text-align: center;
        padding: 50px 24px;
        color: var(--muted);
      }
      .empty-icon {
        font-size: 44px;
        margin-bottom: 10px;
      }
      .empty-txt {
        font-size: 13px;
        line-height: 1.7;
      }
      canvas#evoChart {
        display: block;
        width: 100%;
        max-width: 100%;
      }
      .evo-canvas-wrap {
        padding: 16px;
        position: relative;
      }
      .no-chart {
        text-align: center;
        padding: 40px 16px;
        color: var(--muted);
        font-size: 13px;
      }
      .evo-line-btns {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        padding: 0 16px 8px;
      }
      .evo-line-btn {
        padding: 5px 12px;
        border-radius: 20px;
        border: 2px solid;
        font-size: 13px;
        font-weight: 700;
        cursor: pointer;
        background: transparent;
        transition: all 0.15s;
        white-space: nowrap;
      }
      .cal-nav {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 16px;
      }
      .cal-nav-btn {
        background: var(--card);
        border: 1px solid var(--border);
        border-radius: 8px;
        color: var(--text);
        padding: 7px 14px;
        font-size: 14px;
        cursor: pointer;
        font-family: "Inter", sans-serif;
      }
      .cal-month-label {
        font-family: "Oswald", sans-serif;
        font-size: 20px;
        color: var(--accent);
        letter-spacing: 1px;
      }
      .cal-grid {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 3px;
        padding: 0 12px 12px;
      }
      .cal-dow {
        font-size: 10px;
        font-weight: 600;
        text-align: center;
        color: var(--muted);
        padding: 4px 0;
        text-transform: uppercase;
      }
      .cal-day {
        aspect-ratio: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        font-size: 13px;
        font-weight: 500;
        cursor: default;
      }
      .cal-day.has-entry {
        background: rgba(192, 57, 43, 0.25);
        color: #e87b6e;
        font-weight: 700;
        cursor: pointer;
        border: 1px solid rgba(192, 57, 43, 0.4);
      }
      .cal-day.has-entry:active {
        background: rgba(192, 57, 43, 0.45);
      }
      .cal-day.train-only {
        background: rgba(39, 174, 96, 0.2);
        color: #6dcc8e;
        font-weight: 700;
        cursor: pointer;
        border: 1px solid rgba(39, 174, 96, 0.4);
      }
      .cal-day.train-only:active {
        background: rgba(39, 174, 96, 0.4);
      }
      .cal-day.today {
        border: 1.5px solid var(--accent);
        color: var(--accent);
      }
      .cal-day.other-month {
        opacity: 0.25;
      }
      .cal-day.partial-only {
        background: rgba(224, 224, 224, 0.12);
        color: #e0e0e0;
        font-weight: 700;
        cursor: pointer;
        border: 1px solid rgba(224, 224, 224, 0.25);
      }
      .cal-day.partial-only:active {
        background: rgba(224, 224, 224, 0.3);
      }
      .log-entry.is-partial {
        border-left: 4px solid #e0e0e0 !important;
      }
      .log-entry.is-partial::after {
        content: "";
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: #e0e0e0;
      }
      .log-entry.is-partial-plato {
        border-left: 4px solid #c8a84b !important;
      }
      .log-entry.is-partial-plato::after {
        content: "";
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: #c8a84b;
      }
      .chip.active-partial {
        border-color: #e0e0e0;
        color: #e0e0e0;
        background: rgba(224, 224, 224, 0.1);
      }
      .chip.active-partial-plato {
        border-color: #c8a84b;
        color: #c8a84b;
        background: rgba(200, 168, 75, 0.1);
      }
      .chip:disabled {
        opacity: 0.35;
        cursor: not-allowed;
        pointer-events: none;
      }
      .info-box {
        background: var(--card);
        border: 1px solid var(--border);
        border-radius: 10px;
        padding: 14px;
        font-size: 13px;
        line-height: 1.6;
        color: var(--muted);
        margin-bottom: 16px;
      }
      .info-box strong {
        color: var(--text);
      }
      .star-row {
        display: flex;
        gap: 8px;
        justify-content: center;
        margin: 6px 0;
      }
      .star-contact {
        font-size: 28px;
        cursor: pointer;
        transition: transform 0.1s;
        color: var(--muted);
      }
      .star-contact.on {
        color: #f1c40f;
      }
      .star-contact:active {
        transform: scale(1.3);
      }
      .type-toggle {
        display: flex;
        gap: 8px;
        margin-bottom: 12px;
      }
      .type-opt {
        display: flex;
        align-items: center;
        gap: 8px;
        cursor: pointer;
        background: var(--card);
        border: 1.5px solid var(--border);
        border-radius: 8px;
        padding: 10px 14px;
        flex: 1;
        font-size: 13px;
        font-weight: 600;
        transition:
          border-color 0.15s,
          color 0.15s;
        user-select: none;
      }
      .type-opt input[type="radio"] {
        width: 16px;
        height: 16px;
        accent-color: var(--accent);
        cursor: pointer;
        flex-shrink: 0;
      }
      .type-opt:has(input:checked) {
        border-color: var(--accent);
        color: var(--accent);
      }
      .page-footer {
        border-top: 1px solid var(--border);
        padding: 8px 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        flex-shrink: 0;
        position: relative;
      }
      .footer-ver {
        position: absolute;
        right: 16px;
        font-size: 10px;
        color: var(--muted);
        letter-spacing: 0.5px;
      }
      .footer-priv {
        position: absolute;
        left: 16px;
        font-size: 10px;
        color: var(--muted);
        letter-spacing: 0.5px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
        font-family: "Inter", sans-serif;
        text-transform: uppercase;
      }
      .footer-priv:active {
        color: var(--accent);
      }
      .footer-txt {
        font-size: 10px;
        color: var(--muted);
        letter-spacing: 1.5px;
        text-transform: uppercase;
      }
      .footer-avatar {
        width: 22px;
        height: 22px;
        border-radius: 50%;
        object-fit: cover;
        border: 1.5px solid var(--border);
        flex-shrink: 0;
      }
      #privacyOverlay {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 200;
        background: var(--bg);
        flex-direction: column;
      }
      #privacyOverlay.open {
        display: flex;
      }
      #privacyOverlay iframe {
        flex: 1;
        border: none;
        width: 100%;
      }
      .privacy-bar {
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        padding: 12px 16px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-shrink: 0;
      }
      .privacy-bar-title {
        font-family: "Oswald", sans-serif;
        font-size: 16px;
        letter-spacing: 1px;
        color: var(--accent);
      }
      .privacy-bar-close {
        background: none;
        border: none;
        color: var(--muted);
        font-size: 22px;
        cursor: pointer;
        line-height: 1;
        padding: 0;
      }
      #view-registrar.active,
      #view-modalidades.active,
      #view-historial.active,
      #view-compras.active,
      #view-notas.active,
      #view-armas.active,
      #view-comp-vivo.active {
        display: flex;
        flex-direction: column;
        flex: 1;
        min-height: 0;
      }
      #view-registrar .reg-scroll,
      #view-modalidades .mod-scroll,
      #view-historial .hist-scroll,
      #view-compras .hist-scroll,
      #view-notas .mod-scroll,
      #view-armas .arma-scroll,
      #view-comp-vivo .cv-scroll {
        flex: 1;
        overflow-y: auto;
        min-height: 0;
        overscroll-behavior-y: none;
        -webkit-overflow-scrolling: touch;
      }
      .cv-panel { flex:1; overflow:hidden; display:flex; flex-direction:column; min-height:0; }
      .cv-panel-scroll { flex:1; overflow-y:auto; min-height:0; overscroll-behavior-y:none; -webkit-overflow-scrolling:touch; }
      .content:has(#view-registrar.active),
      .content:has(#view-modalidades.active),
      .content:has(#view-historial.active),
      .content:has(#view-compras.active),
      .content:has(#view-notas.active),
      .content:has(#view-armas.active),
      .content:has(#view-comp-vivo.active) {
        overflow-y: hidden;
        padding-bottom: 0;
        display: flex;
        flex-direction: column;
      }
      .cv-tarifas-tabla {
        width: 100%;
        border-collapse: collapse;
        font-size: 12px;
        color: #ccc;
        table-layout: fixed;
      }
      .cv-tarifas-tabla th,
      .cv-tarifas-tabla td {
        padding: 6px 2px;
        text-align: center;
        border-bottom: 1px solid var(--border);
      }
      .cv-tarifas-tabla thead th {
        font-family: 'Oswald', sans-serif;
        font-size: 11px;
        letter-spacing: .5px;
        color: var(--accent);
        font-weight: 600;
        text-transform: uppercase;
        padding-bottom: 6px;
      }
      .cv-tarifas-tabla tbody th {
        text-align: left;
        font-weight: 600;
        color: #f0ede8;
        font-size: 12px;
        padding-left: 4px;
        white-space: nowrap;
      }
      .cv-tarifas-tabla tbody tr:last-child th,
      .cv-tarifas-tabla tbody tr:last-child td {
        border-bottom: none;
      }
      .cv-tarifas-tabla td.ilim {
        font-style: italic;
        color: var(--accent);
      }
      .cv-gal-list { display: flex; flex-direction: column; gap: 6px; }
      .cv-gal-row {
        display: flex;
        gap: 6px;
        align-items: stretch;
      }
      .cv-gal-row .cv-gal-idx {
        width: 22px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-family: 'Oswald', sans-serif;
        font-size: 12px;
        color: var(--accent);
      }
      .cv-gal-row .cv-gal-nombre {
        flex: 1;
        min-width: 0;
        background: var(--card);
        border: 1px solid var(--border);
        border-radius: 8px;
        padding: 8px 10px;
        color: var(--text);
        font-size: 13px;
      }
      .cv-gal-row .cv-gal-puestos {
        width: 72px;
        flex-shrink: 0;
        background: var(--card);
        border: 1px solid var(--border);
        border-radius: 8px;
        padding: 8px 8px;
        color: var(--text);
        font-size: 13px;
        text-align: center;
      }
      .cv-gal-row .cv-gal-del {
        width: 34px;
        flex-shrink: 0;
        background: transparent;
        border: 1px solid var(--border);
        border-radius: 8px;
        color: #a55;
        font-size: 14px;
        cursor: pointer;
      }
      .cv-gal-row .cv-gal-del:disabled {
        opacity: 0.3;
        cursor: not-allowed;
      }
      .cv-gal-row input:focus {
        outline: none;
        border-color: var(--accent);
      }
