.benchmark-container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.benchmark-card.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

.benchmark-card.disabled .btn-start-test {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
}

.card-lock-indicator {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px var(--accent-glow);
}

.benchmark-view {
  display: block; /* Content area is always visible, internally toggled */
  width: 100%;
}

.benchmark-sub-page {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.benchmark-sub-page.show {
    display: block;
}

/* ─── Profile & Radar ─── */
.profile-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    padding: 20px 0;
    position: relative;
}

.profile-controls {
    width: 100%;
    position: relative;
    z-index: 1001; /* Ensure dropdowns are above the radar chart/canvas */
}

.profile-controls {
    width: 100%;
    position: relative;
    z-index: 1001;
    overflow: visible !important;
}

.comparison-selectors {
    display: flex;
    gap: 24px;
    background: rgba(255, 255, 255, 0.03);
    padding: 16px 24px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: visible !important;
}

.custom-select {
    position: relative;
    width: 100%;
    pointer-events: auto !important;
}

.custom-select .select-trigger {
    pointer-events: auto !important;
    position: relative;
    z-index: 10;
}

.custom-select .select-options {
    display: block !important;
    position: absolute !important;
    top: calc(100% + 10px) !important;
    left: 0 !important;
    right: 0 !important;
    background: #151525 !important;
    border: 1px solid rgba(255, 205, 48, 0.4) !important;
    border-radius: 16px !important;
    max-height: 250px !important;
    overflow-y: auto !important;
    z-index: 99999 !important; /* Absolute top */
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-10px) !important;
    transition: all 0.3s cubic-bezier(0.2, 0, 0.2, 1) !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8) !important;
    pointer-events: auto !important;
}

.custom-select.active .select-options {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

.custom-select .option {
    pointer-events: auto !important;
    position: relative;
    z-index: 99999;
}

.custom-select .arrow {
    width: 8px;
    height: 8px;
    border-right: 2px solid rgba(255,255,255,0.4);
    border-bottom: 2px solid rgba(255,255,255,0.4);
    transform: rotate(45deg);
    transition: all 0.3s;
    margin-right: 4px;
    margin-top: -4px;
}

.custom-select.active .arrow {
    transform: rotate(-135deg);
    border-color: var(--accent);
}

.benchmark-select {
    display: none; /* Hide old select if still present */
}

.radar-chart-wrap {
    position: relative;
    width: 640px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ─── Placeholder States (Match Analytics) ─── */
.placeholder-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px;
    transition: all 0.3s ease;
}

.graph-placeholder-msg {
    color: var(--text-dim);
    font-size: 13px;
    text-align: center;
    line-height: 1.8;
    font-weight: 500;
}

.logbook-controls {
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.02);
    padding: 20px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.logbook-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-group-inner {
    display: flex;
    align-items: center;
    gap: 16px;
}

.benchmark-container .search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.benchmark-container .search-input-wrapper svg {
    position: absolute;
    left: 14px;
    color: var(--text-dim);
}

.benchmark-container .search-input-wrapper input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px 16px 10px 46px; /* Added breathing room between icon and placeholder */
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    width: 250px;
    transition: all 0.3s;
}

.benchmark-container .search-input-wrapper input:focus {
    border-color: var(--accent);
    background: rgba(255, 205, 48, 0.05);
    outline: none;
    box-shadow: 0 0 15px var(--accent-glow);
}

.range-filters {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.log-filter-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s;
}

.log-filter-btn.active {
    background: var(--accent);
    color: var(--bg-deep);
}


.calendar-popover {
    position: absolute;
    top: 45px;
    right: 0;
    background: #1a1a2e;
    border: 1px solid var(--accent);
    border-radius: 20px;
    padding: 20px;
    z-index: 2000;
    box-shadow: 0 30px 70px rgba(0,0,0,0.9);
    width: 260px;
    backdrop-filter: blur(25px);
    animation: calendarFade 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes calendarFade {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1024px) {
    .calendar-popover {
        position: fixed !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: calc(100vw - 32px) !important;
        max-width: 300px !important;
        z-index: 99999 !important;
        box-shadow: 0 40px 100px rgba(0,0,0,0.95), 0 0 0 200vmax rgba(10, 10, 20, 0.6) !important;
        animation: calendarFadeFixed 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }
}

@keyframes calendarFadeFixed {
    from { opacity: 0; transform: translate(-50%, calc(-50% - 20px)); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

.calendar-header {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--accent);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.calendar-grid {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 4px !important;
    width: 100% !important;
    margin-top: 10px !important;
}

.cal-day-label { 
    font-size: 10px; 
    color: rgba(255,255,255,0.3); 
    text-align: center; 
    font-weight: 900;
    margin-bottom: 10px;
}

.cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #fff;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.cal-day:hover { background: rgba(255,205,48,0.2); color: var(--accent); }
.cal-day.today { background: rgba(255,205,48,0.1); color: var(--accent); font-weight: 900; border: 1px solid rgba(255,205,48,0.3); }
.cal-day.disabled { opacity: 0; cursor: default; pointer-events: none; }

.benchmark-arena-overlay {
    position: fixed;
    top: 0; left: 80px;
    right: 0; bottom: 0;
    background: var(--bg-deep);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    animation: fadeIn 0.3s ease;
}

.arena-top {
    position: absolute;
    top: 40px;
    left: 60px;
    right: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#arena-test-name {
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--accent);
    text-transform: uppercase;
    white-space: pre-line;
}

.btn-exit-modal {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.btn-exit-modal:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

/* ─── Digit Input Styling (Service 1:1) ─── */
.digit-input-container {
    display: flex;
    gap: 15px;
    margin-top: 40px;
}

.digit-field {
    width: 60px;
    height: 80px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 900;
    color: #fff;
    transition: all 0.3s;
}

.digit-field.active {
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
    background: rgba(255, 205, 48, 0.05);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Dashboard View ─── */
.benchmark-header {
  margin-bottom: 40px;
}

.benchmark-title {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.benchmark-subtitle {
  color: var(--text-dim);
  font-size: 16px;
  max-width: 600px;
  line-height: 1.5;
}

.benchmark-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.benchmark-card {
  background: var(--bg-panel);
  border-radius: 24px;
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.benchmark-card:hover:not(.disabled) {
  border-color: var(--accent);
  transform: translateY(-4px);
  background: rgba(255, 205, 48, 0.02);
}

.benchmark-card.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

.card-icon {
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  white-space: pre-line;
}

.card-desc {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.test-tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.5px;
}

.test-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-start-test {
  margin-top: auto;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  padding: 12px;
  border-radius: 12px;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1px;
  transition: all 0.3s;
  cursor: pointer; /* Added hand cursor */
}

.benchmark-card:hover:not(.disabled) .btn-start-test {
  background: var(--accent);
  color: var(--bg-deep);
}

/* ─── Arena View ─── */
#benchmark-arena {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.arena-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 60px;
}

.btn-exit {
  background: none;
  border: none;
  color: var(--text-dim);
  font-weight: 700;
  cursor: pointer;
  transition: color 0.3s;
}

.btn-exit:hover { color: #fff; }

.arena-progress {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

#arena-test-name {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--accent);
}

.p-bar {
  width: 200px;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  overflow: hidden;
}

#arena-p-fill {
  width: 0%;
  height: 100%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
  transition: width 0.4s;
}

.arena-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

/* Stimulus Styles */
.stim-text {
  font-size: 120px;
  font-weight: 900;
  color: var(--accent);
  text-shadow: 0 0 40px var(--accent-glow);
}

.stim-instruction {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 40px;
  text-align: center;
}

/* Corsi Grid - Styled 1:1 with Training Grid */
.corsi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 12px;
  width: 320px;
  height: 320px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 205, 48, 0.15);
  border-radius: 20px;
  padding: 15px;
}

.corsi-block {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.corsi-block.active {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 30px 5px rgba(255, 205, 48, 0.4);
  transform: scale(1.02);
}

/* Stroop Cards */
.stroop-card {
  font-size: 64px;
  font-weight: 900;
  letter-spacing: -2px;
  text-transform: uppercase;
}

.arena-footer {
  padding: 40px 0;
  display: flex;
  justify-content: center;
  gap: 20px;
}

/* Input for Digit Span */
.digit-input-wrap {
  display: flex;
  gap: 12px;
}

.digit-box {
  width: 60px;
  height: 80px;
  background: var(--bg-panel);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 900;
  color: var(--accent);
}

/* Results Plate */
.results-plate {
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  background: var(--bg-panel);
  padding: 32px 40px;
  border-radius: 32px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  transform-origin: center center;
}

/* Smart scaling for small screens to avoid scrolls */
@media (max-height: 820px) {
  .results-plate {
    transform: scale(0.9);
    padding: 32px;
  }
}

@media (max-height: 720px) {
  .results-plate {
    transform: scale(0.8);
  }
}

.res-icon {
  width: 48px;
  height: 48px;
  background: var(--accent);
  color: var(--bg-deep);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 900;
  margin: 0 auto 16px;
  box-shadow: 0 0 20px var(--accent-glow);
}

.recommendation-box {
  background: rgba(255, 255, 255, 0.03);
  padding: 20px;
  border-radius: 20px;
  margin: 20px 0;
  border: 1px dashed rgba(255, 205, 48, 0.3);
}

.rec-label {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--text-dim);
  display: block;
  margin-bottom: 12px;
}

.rec-value {
  font-size: 36px;
  font-weight: 900;
  color: var(--accent);
  margin-bottom: 16px;
}

.btn-apply {
  background: var(--accent);
  color: var(--bg-deep);
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: transform 0.2s;
}

.btn-apply:hover { transform: scale(1.05); }

/* History Panel */
.benchmark-history-panel {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 24px;
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.stats-grid-small {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 12px;
  margin: 20px 0;
}

.stat-item-mini {
  flex: 1 1 calc(50% - 12px);
  min-width: 120px;
  max-width: 180px;
  background: rgba(255, 255, 255, 0.03);
  padding: 12px 16px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.mini-label {
  font-size: 11px;
  font-weight: 900;
  color: var(--text-dim);
  letter-spacing: 1.5px;
  margin-bottom: 2px;
}

.mini-val {
  font-size: 18px;
  font-weight: 900;
  color: #fff;
}

.radar-legend {
    display: flex;
    gap: 16px;
    margin-top: 10px;
}

.radar-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    font-weight: 800;
    color: var(--text-dim);
    letter-spacing: 0.5px;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.tutorial-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 32px;
    width: 100%;
    max-width: 640px;
    text-align: center;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    animation: fadeIn 0.4s ease;
}

/* ─── Responsive: 1024px (Tablets) ─── */
@media (max-width: 1024px) {
    .benchmark-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .benchmark-card {
        padding: 24px;
    }

    .radar-chart-wrap {
        width: 100%;
        height: auto;
        min-height: 350px;
    }

    #radarCanvas {
        max-width: 100%;
        height: auto !important;
    }

    .benchmark-arena-overlay {
        left: 0; /* Cover sidebar on mobile */
    }

    .arena-top {
        left: 30px;
        right: 30px;
    }
}

/* ─── Responsive: 768px (Small Tablets / Large Phones) ─── */
@media (max-width: 768px) {
    .benchmark-grid {
        grid-template-columns: 1fr;
    }

    .logbook-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .benchmark-container .search-input-wrapper input {
        width: 100%;
    }

    .range-filters {
        justify-content: space-between;
    }

    .log-filter-btn {
        flex: 1;
        padding: 8px 4px;
        font-size: 10px;
    }

    .comparison-selectors {
        flex-direction: column !important;
        align-items: center !important;
        gap: 16px !important;
    }

    .comparison-selectors .select-group {
        width: 100% !important;
        max-width: 400px;
        flex: none !important;
    }

    .radar-chart-wrap {
        min-height: 300px;
    }

    .results-plate {
        padding: 24px;
        max-width: 90%;
    }

    .stats-grid-small {
        grid-template-columns: 1fr;
    }

    .digit-field {
        width: 50px;
        height: 70px;
        font-size: 26px;
    }
}

/* ─── Responsive: 480px (Standard Mobile) ─── */
@media (max-width: 480px) {
    .benchmark-container {
        padding: 0 10px;
    }

    .card-title {
        font-size: 18px;
    }

    .card-desc {
        font-size: 13px;
    }

    .radar-chart-wrap {
        min-height: 260px;
    }

    .radar-legend {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .results-plate {
        padding: 20px;
    }

    .res-title {
        font-size: 18px;
    }

    .rec-value {
        font-size: 28px;
    }

    .digit-field {
        width: 40px;
        height: 60px;
        font-size: 20px;
        border-radius: 12px;
    }

    .digit-input-container {
        gap: 8px;
    }
}

/* ─── Responsive: 450px (Small Phones) ─── */
@media (max-width: 450px) {
    .benchmark-card {
        padding: 20px;
    }

    .card-icon {
        width: 48px;
        height: 48px;
    }

    .logbook-controls {
        padding: 14px;
    }

    .benchmark-arena-overlay {
        padding: 20px;
    }

    .arena-top {
        top: 20px;
        left: 20px;
        right: 20px;
    }

    #arena-test-name {
        font-size: 8px;
    }

    .btn-exit-modal {
        width: 36px;
        height: 36px;
    }

    .stim-text {
        font-size: 80px;
    }

    .stim-instruction {
        font-size: 18px;
    }

    /* Radar sizing for tiny screens */
    .radar-chart-wrap {
        min-height: 220px;
    }

    /* Results box adjustments */
    .recommendation-box {
        padding: 15px;
    }

    .stats-grid-small {
        gap: 8px;
    }

    .stat-item-mini {
        padding: 8px 10px;
    }

    .mini-val {
        font-size: 16px;
    }
}

/* ─── Responsive: 380px (Extreme Mobile) ─── */
@media (max-width: 380px) {
    .card-title {
        font-size: 16px;
    }

    .card-desc {
        font-size: 12px;
    }

    .btn-start-test {
        font-size: 10px;
        padding: 10px;
    }

    .results-plate {
        padding: 16px;
    }

    .res-subtitle {
        font-size: 12px;
    }

    .rec-value {
        font-size: 24px;
    }

    .btn-apply, .btn-primary-large {
        font-size: 10px;
        padding: 10px 16px;
    }

    .digit-field {
        width: 34px;
        height: 50px;
        font-size: 18px;
    }
}



.tutorial-icon-big {
    font-size: 48px;
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
    filter: drop-shadow(0 0 10px var(--accent-glow));
}

.tutorial-title {
    font-size: 28px;
    font-weight: 900;
    color: var(--accent);
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.tutorial-text {
    font-size: 16px;
    color: var(--text-dim);
    line-height: 1.6;
    margin-bottom: 32px;
}

.tutorial-hint {
    margin-top: 20px;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.2);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hide { display: none !important; }
/* ─── Mobile Adaptation (< 1024px) ─── */
@media (max-width: 1024px) {
    .benchmark-arena-overlay {
        left: 70px !important; /* Match mobile sidebar width */
        padding: 20px !important;
    }

    .arena-top {
        left: 20px !important;
        right: 20px !important;
        top: 20px !important;
        margin-bottom: 30px !important;
    }

    #arena-test-name {
        font-size: 11px !important;
        letter-spacing: 1px !important;
    }

    .btn-exit-modal {
        width: 36px !important;
        height: 36px !important;
        font-size: 16px !important;
    }

    /* Scaling stimulus */
    .stim-text {
        font-size: 72px !important;
    }

    .stim-instruction {
        font-size: 18px !important;
        margin-bottom: 20px !important;
    }

    /* Corsi Grid Scaling - 1:1 with Training Grid Adaptive Logic */
    .corsi-grid {
        width: 320px !important;
        height: 320px !important;
        max-width: none !important;
        padding: 15px !important;
        gap: 12px !important;
    }

    .corsi-block {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1/1 !important;
    }

    /* Digit Span Scaling */
    .digit-input-container {
        gap: 8px !important;
        margin-top: 20px !important;
    }

    .digit-field {
        width: 40px !important;
        height: 56px !important;
        font-size: 22px !important;
        border-radius: 12px !important;
    }

    /* Results Scaling - ADAPTED FOR FULL BENCHMARK */
    .results-plate {
        width: 95% !important;
        max-width: 420px !important;
        padding: 24px 16px !important;
        border-radius: 24px !important;
    }

    .res-icon {
        width: 40px !important;
        height: 40px !important;
        font-size: 20px !important;
        margin-bottom: 12px !important;
    }

    .res-title {
        font-size: 18px !important;
    }

    .res-subtitle {
        font-size: 12px !important;
    }

    .recommendation-box {
        padding: 15px !important;
        margin: 15px 0 !important;
        border-radius: 16px !important;
    }

    .rec-label {
        font-size: 9px !important;
        margin-bottom: 8px !important;
    }

    .rec-value {
        font-size: 28px !important;
        margin-bottom: 12px !important;
    }

    .stats-grid-small {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        margin: 15px 0 !important;
    }

    .stat-item-mini {
        padding: 10px !important;
        border-radius: 12px !important;
    }

    .mini-label {
        font-size: 8px !important;
        letter-spacing: 1px !important;
    }

    .mini-val {
        font-size: 14px !important;
    }

    .arena-footer {
        padding: 20px 0 !important;
    }
    
    .btn-primary-large {
        padding: 14px !important;
        font-size: 13px !important;
    }
}

/* ─── Tablets & Mobile (< 768px) ─── */
@media (max-width: 768px) {
    .corsi-grid {
        width: 290px !important;
        height: 290px !important;
    }
}

/* ─── Small Mobile Adaptation (< 480px) ─── */
@media (max-width: 480px) {
    .benchmark-arena-overlay {
        left: 60px !important; /* Match smallest sidebar width */
    }

    .corsi-grid {
        width: 260px !important;
        height: 260px !important;
        padding: 10px !important;
        gap: 8px !important;
    }

    .digit-field {
        width: 32px !important;
        height: 44px !important;
        font-size: 18px !important;
    }
    
    .stim-text {
        font-size: 60px !important;
    }
    
    .results-plate {
        padding: 20px 12px !important;
    }
}

/* ─── Ultra-Narrow Screens (< 410px) ─── */
@media (max-width: 410px) {
    .corsi-grid {
        width: calc(100vw - 80px) !important;
        height: calc(100vw - 80px) !important;
        padding: 8px !important;
        gap: 6px !important;
    }
}

/* ─── Logbook Date Filter Centering (≤ 769px) ─── */
@media (max-width: 769px) {
    #benchmark-logbook .filter-group-inner {
        flex-wrap: wrap !important;
        justify-content: center !important;
    }
    #benchmark-logbook .date-input-wrapper {
        margin: 0 auto !important;
    }
}
