/* Selectores locales: no alteran otros gráficos ni el juego. */
#tt-stat-bars.tt-percentile-chart,#distribution-bars.tt-percentile-chart{display:block;height:auto;padding:0;min-height:0;border:0;font-family:Montserrat,Arial,sans-serif;color:#eaf3ed;}
.tt-stat-canvas-wrap:has(>.tt-percentile-chart){height:auto}
.tt-percentile-chart .ttp-summary{display:grid;grid-template-columns:1fr 1fr;gap:12px;align-items:end;margin:2px 0 16px}
.tt-percentile-chart .ttp-kicker{display:block;color:#a9bdc2;font-size:.62rem;letter-spacing:.08em;font-weight:800;line-height:1.4}
.tt-percentile-chart .ttp-percentile{color:#d0fc66;font-size:clamp(2.3rem,7vw,4.2rem);line-height:1.05;font-weight:900;letter-spacing:-.055em;font-variant-numeric:tabular-nums}
.tt-percentile-chart .ttp-score-block{text-align:right}.tt-percentile-chart .ttp-score{display:block;font-size:clamp(.9rem,3.5vw,1.5rem);font-weight:800;font-variant-numeric:tabular-nums;margin-top:5px}
.tt-percentile-chart svg{display:block;width:100%;max-height:300px;overflow:visible}.tt-percentile-chart .ttp-grid{stroke:#50666d;stroke-dasharray:2 4;opacity:.6}.tt-percentile-chart .ttp-area{fill:#49c5d4;fill-opacity:.19}.tt-percentile-chart .ttp-line{stroke:#49c5d4;fill:none;stroke-width:2.2;stroke-linejoin:round}.tt-percentile-chart .ttp-axis{stroke:#61767b}.tt-percentile-chart .ttp-marker{stroke:#d0fc66;stroke-width:1.8}.tt-percentile-chart .ttp-dot{fill:#d0fc66;stroke:#112128;stroke-width:1}.tt-percentile-chart .ttp-you{fill:#d0fc66;font-size:10px;font-weight:800}.tt-percentile-chart .ttp-tick{fill:#a9bdc2;font-size:8.5px;font-weight:600}
.tt-percentile-chart .ttp-comparison{font-size:clamp(.95rem,2.5vw,1.25rem);font-weight:800;color:#d0fc66;line-height:1.4;margin:12px 0 5px}.tt-percentile-chart .ttp-meta{color:#a9bdc2;font-size:.73rem;line-height:1.4;margin:0}
.tt-statistics-ready .tt-stat-legend i{border-radius:50%}
@media(max-width:380px){.tt-percentile-chart .ttp-summary{gap:7px}.tt-percentile-chart .ttp-kicker{font-size:.56rem}}

/* Home: the existing copy keeps the full width until an official result exists. */
.tt-home-layout{display:grid;grid-template-columns:minmax(0,1fr);align-items:center;gap:24px;width:100%}
.tt-home-layout:has(.tt-home-performance:not([hidden])){grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:clamp(24px,3vw,48px)}
.tt-home-copy,.tt-home-performance{min-width:0}.tt-home-performance[hidden]{display:none!important}.tt-home-performance{border-left:1px solid #365155;padding-left:clamp(20px,2.5vw,36px);text-align:left}.tt-home-performance .ttp-kicker{font-size:.7rem}.tt-home-performance .ttp-summary{margin-bottom:8px}.tt-home-performance .ttp-percentile{font-size:clamp(2rem,4vw,3.7rem)}.tt-home-performance .ttp-score{font-size:1.05rem}.tt-home-performance svg{max-height:220px}.tt-home-performance .ttp-comparison{margin-top:6px}
@media(max-width:800px){.tt-home-layout:has(.tt-home-performance:not([hidden])){grid-template-columns:minmax(0,1fr);gap:24px}.tt-home-performance{border-left:0;border-top:1px solid #365155;padding:22px 0 0}}

/* Home v3: scoped to the landing view; game and results retain their layout. */
.play-section .section-topline .tt-home-catalog{max-width:100%;white-space:normal;align-self:flex-end;line-height:1.5}
.play-section #intro-view{padding:clamp(24px,4vw,46px)}
#intro-view .tt-home-layout{align-items:start;gap:clamp(20px,3vw,36px)}
#intro-view .tt-home-layout:has(.tt-home-performance:not([hidden])){grid-template-columns:minmax(0,2fr) minmax(0,3fr)}
#intro-view .tt-home-copy{display:flex;flex-direction:column;align-items:flex-start;gap:14px}
#intro-view .tt-home-copy > *{margin:0}
#intro-view .game-instructions{font-size:clamp(1rem,2vw,1.25rem);line-height:1.65}
#intro-view .intro-actions:has(>button:not([hidden])){display:flex}
#intro-view .intro-actions:not(:has(>button:not([hidden]))){display:none}
#intro-view .tt-home-performance{padding-left:clamp(20px,3vw,36px)}
#intro-view .tt-home-performance svg{max-height:none}
#intro-view .tt-home-performance .ttp-percentile{font-size:clamp(2.5rem,5vw,4.2rem)}
@media(max-width:800px){
 .play-section .section-topline{flex-wrap:wrap;gap:10px}
 .play-section .section-topline .tt-home-catalog{width:100%;text-align:center}
 .play-section .play-card:has(#intro-view:not([hidden])){border:0;background:none;box-shadow:none;overflow:visible}
 .play-section .play-card:has(#intro-view:not([hidden]))::before,.play-section .play-card:has(#intro-view:not([hidden]))::after{display:none}
 .play-section #intro-view{padding:0}
 #intro-view .tt-home-layout:has(.tt-home-performance:not([hidden])){grid-template-columns:minmax(0,1fr);gap:14px}
 #intro-view .tt-home-copy,#intro-view .tt-home-performance{width:100%;padding:18px;border:1px solid #365155;border-radius:10px;background:#14252b}
 #intro-view .intro-actions,#intro-view .intro-actions>button,#intro-view #review-last-btn{width:100%}
 #intro-view .tt-home-performance .ttp-percentile{font-size:clamp(2.5rem,10vw,3.7rem)}
}

/* Components: shared axis, subordinate visual weight; no changes outside this chart. */
.tt-percentile-chart .ttp-component{fill:none;stroke-width:1.45;stroke-linejoin:round;stroke-linecap:round;opacity:.82}
.tt-percentile-chart .ttp-component-points{stroke:#b4a1e3;stroke-dasharray:5 3}
.tt-percentile-chart .ttp-component-time{stroke:#e4b76c;stroke-dasharray:1 3}
.tt-percentile-chart .ttp-components-legend{display:flex;flex-wrap:wrap;gap:5px 13px;align-items:center;justify-content:center;margin:5px 0 6px;color:#a9bdc2;font-size:.67rem;font-weight:600;line-height:1.4}
.tt-percentile-chart .ttp-legend-item{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
.tt-percentile-chart .ttp-legend-swatch{display:inline-block;width:16px;min-width:16px;border-top:2px solid #49c5d4}
.tt-percentile-chart .ttp-legend-points{border-top-color:#b4a1e3;border-top-style:dashed}
.tt-percentile-chart .ttp-legend-time{border-top-color:#e4b76c;border-top-style:dotted}
.tt-percentile-chart .ttp-transition-note{margin:3px 0 0;font-size:.64rem}
@media(max-width:380px){.tt-percentile-chart .ttp-components-legend{gap:4px 9px;font-size:.62rem}}

/* Compact combined performance: separate units, one responsive SVG. */
.tt-percentile-chart .ttp-unified-chart{max-height:none}
.tt-home-performance .ttp-unified-chart{max-height:none}
.tt-percentile-chart .ttp-speed-summary{margin:6px 0 2px}
.tt-percentile-chart .ttp-speed-head{display:flex;align-items:baseline;justify-content:space-between;gap:6px 12px;flex-wrap:wrap}
.tt-percentile-chart .ttp-speed-rank{color:#e4b76c;font-size:.82rem;font-weight:800}
.ttp-history-detail{display:block;margin-top:7px;width:100%;min-width:0}
.ttp-history-detail>summary{cursor:pointer;color:#a9bdc2;font-size:.75rem}
.ttp-history-body{margin:10px 0 4px;font-size:.78rem;min-width:0}
.ttp-history-body.tt-percentile-chart{max-width:620px}
.ttp-history-body .ttp-unified-chart{max-height:none}

.tt-my-history:has(.ttp-history-detail[open]){max-height:620px}

.tt-percentile-chart .ttp-speed-overlay{fill:none;stroke:#e4b76c;stroke-width:1.8;stroke-dasharray:2 3;stroke-linejoin:round}.tt-percentile-chart .ttp-speed-tick{fill:#e4b76c;font-size:8.5px;font-weight:600}.tt-percentile-chart .ttp-speed-marker{stroke:#e4b76c;stroke-width:1.5}.tt-percentile-chart .ttp-speed-dot{fill:#e4b76c;stroke:#112128;stroke-width:1}.tt-percentile-chart .ttp-speed-you{fill:#e4b76c;font-size:8px;font-weight:800}

.tt-percentile-chart .ttp-average-line{stroke:#eef3f2;stroke-width:1.2;stroke-dasharray:4 3;opacity:.85}.tt-percentile-chart .ttp-average-label{fill:#eef3f2;font-size:8px;font-weight:700}.tt-percentile-chart .ttp-speed-summary{border-top:1px solid #40595c;padding-top:10px;margin-top:12px}.tt-percentile-chart .ttp-speed-title{font-size:.85rem;margin:0 0 5px}.tt-percentile-chart .ttp-speed-overlay{stroke-dasharray:none}

.tt-percentile-chart .ttp-time-axis{stroke:#e4b76c;stroke-width:1.2}.tt-percentile-chart .ttp-time-guide{stroke:#e4b76c;stroke-width:1;opacity:.55}.tt-percentile-chart .ttp-time-mean{stroke-dasharray:3 4}.tt-percentile-chart .ttp-time-average-dot{fill:#132329;stroke:#e4b76c;stroke-width:1.5}.tt-percentile-chart .ttp-legend-speed{background:#e4b76c}.tt-percentile-chart .ttp-speed-summary{margin-top:6px;padding-top:6px}

.tt-percentile-chart .ttp-speed-inline{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:4px 10px;color:#e4b76c;font-size:.73rem;line-height:1.4;margin:0 3.3% 8px}.tt-percentile-chart .ttp-speed-inline .ttp-speed-rank{font-weight:400;font-size:inherit}.tt-percentile-chart .ttp-speed-refs{display:flex;flex-wrap:wrap;gap:4px 10px;margin-left:auto;font-weight:500}.tt-percentile-chart .ttp-speed-refs span{white-space:nowrap}.tt-percentile-chart .ttp-legend-speed{border-top-color:#e4b76c;background:none}.tt-percentile-chart .ttp-components-legend{justify-content:flex-end;margin-bottom:0}

.tt-percentile-chart .ttp-time-symbol{fill:#e4b76c;font-family:Arial,'Segoe UI Symbol',sans-serif;font-size:12px;font-weight:400}.tt-percentile-chart .ttp-time-ref{display:inline-flex;align-items:center;gap:3px}.tt-percentile-chart svg.ttp-time-ref-icon{width:1em;height:1em;flex:none;overflow:visible}

/* Home result: compact promo with illustration alongside title, not description. */
#tt-home-performance .ttp-comparison{text-align:center}
#intro-view #tt-store-promo-home:not([hidden]){box-sizing:border-box;width:100%;display:grid;grid-template-columns:minmax(0,1fr) 29%;column-gap:10px;row-gap:7px;padding:clamp(14px,1.65vw,20px);margin-top:24px;text-align:left;min-height:0;align-items:center}
#intro-view #tt-store-promo-home .tt-store-promo-copy{display:contents}
#intro-view #tt-store-promo-home .tt-store-promo-copy>strong{grid-area:1/1;display:block;max-width:none;font-size:clamp(1.2rem,1.95vw,1.7rem);line-height:1.12;margin:0}
#intro-view #tt-store-promo-home>img{grid-area:1/2;position:static;transform:none;width:100%;height:auto;max-height:65px;object-fit:contain;align-self:center;margin:0}
#intro-view #tt-store-promo-home .tt-store-promo-copy>span:not(.tt-store-promo-action){grid-column:1/-1;display:block;max-width:none;font-size:clamp(.85rem,1.2vw,1rem);line-height:1.35;margin:8px 0 0}
#intro-view #tt-store-promo-home .tt-store-promo-action{grid-column:1/-1;display:block;margin:2px 0 0}
@media(min-width:801px){
 #intro-view .tt-home-layout:has(.tt-home-performance:not([hidden])){grid-template-columns:minmax(0,5fr) minmax(0,7fr);align-items:stretch}
 #intro-view .tt-home-layout:has(.tt-home-performance:not([hidden])) .tt-home-copy{align-self:stretch}
 #intro-view .tt-home-layout:has(.tt-home-performance:not([hidden])) #tt-store-promo-home:not([hidden]){margin-top:auto;margin-bottom:6px}
 #intro-view .tt-home-layout:has(.tt-home-performance:not([hidden])) .tt-home-copy:has(#tt-store-promo-home:not([hidden])){row-gap:18px}
}

/* Los percentiles diarios no son porcentajes de puntos. Explicar la muestra,
   especialmente cuando todavía jugaron menos de 20 personas. */
.tt-percentile-chart .ttp-sample-size{display:block;margin-top:5px;color:#b7cbcf;font-size:clamp(.65rem,1.15vw,.76rem);font-weight:650;line-height:1.4}
.tt-percentile-chart .ttp-sample-warning{font-size:.72rem;line-height:1.5;color:#b4c4cb;margin:5px 0 0;max-width:62ch}
.tt-home-performance .ttp-sample-size{font-size:.68rem}
.tt-home-performance .ttp-sample-warning{font-size:.69rem}
