/* Pitchline Hard extends the existing Pitchline palette and the shared
   segmented-control API. Classic remains visually and mechanically unchanged. */
.page-pitch #pitch-intro{position:relative}
.tg-pitch-mode-switch{
 display:flex;justify-content:center;position:absolute;z-index:5;
 top:12px;left:50%;transform:translateX(-50%);
 width:max-content;max-width:95%;min-height:0;margin:0;
}
/* Both difficulties occupy the original fixed splash footprint; the mode
   selector overlays the artwork rather than moving the site-wide buttons. */
.page-pitch[data-pitch-mode="hard"] .tg-pitch-preview-marker{display:none}
.page-pitch[data-pitch-mode="hard"] .tg-pitch-preview::after{
 /* Splash only: extend the outlined 2D surface nearly edge-to-edge within
    the original waveform region (~630 x 530 on the reference viewport).
    The live interactive pad and Classic mode remain unchanged. */
 content:"";position:absolute;inset:0 6.5%;border-radius:9px;
 border:1px solid color-mix(in srgb,var(--tg-pitch-marker) 30%,transparent);
 background:
 linear-gradient(90deg,transparent 49.8%,color-mix(in srgb,var(--tg-pitch-marker) 15%,transparent) 50%,transparent 50.2%),
 linear-gradient(transparent 49.8%,color-mix(in srgb,var(--tg-pitch-marker) 15%,transparent) 50%,transparent 50.2%);
}
.page-pitch[data-pitch-mode="hard"] .tg-pitch-preview::before{
 content:"";position:absolute;z-index:2;left:57%;top:42%;
 width:12px;height:12px;border-radius:50%;background:var(--tg-pitch-marker);
 border:3px solid var(--surface);box-shadow:0 0 0 1px var(--tg-pitch-marker);
}
.tg-pitch-mode-switch .tg-segment,.tg-pitch-variant-tabs.tg-segment{
 display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px;
 background:var(--surface-soft);border:1px solid var(--line);border-radius:12px;
 overflow:hidden;box-sizing:border-box;
}
.tg-pitch-mode-switch .tg-segment>button,.tg-pitch-variant-tabs.tg-segment>button{
 appearance:none;position:relative;z-index:1;min-width:76px;padding:9px 17px;
 border:0;border-radius:9px;background:transparent;color:var(--muted);
 font:inherit;font-size:13px;font-weight:750;cursor:pointer;
}
.tg-pitch-mode-switch .tg-segment>button[aria-selected="true"],
.tg-pitch-variant-tabs.tg-segment>button[aria-selected="true"]{
 color:var(--canvas)!important;
}
/* While an intro is hidden, its indicator cannot be measured; keep the
   selected option clearly filled until the shared switch API can refresh. */
.tg-pitch-mode-switch .tg-segment:not(.tg-segment-ready)>button[aria-selected="true"],
.tg-pitch-variant-tabs.tg-segment:not(.tg-segment-ready)>button[aria-selected="true"]{
 background:var(--text)!important;
}
.tg-pitch-mode-switch .tg-segment>button:focus-visible,
.tg-pitch-variant-tabs.tg-segment>button:focus-visible{outline:2px solid var(--tg-pitch-marker);outline-offset:1px}
.tg-pitch-mode-switch .tg-segment,.tg-pitch-variant-tabs.tg-segment{position:relative;isolation:isolate}
.tg-pitch-mode-switch .tg-segment::before,.tg-pitch-variant-tabs.tg-segment::before{
 content:"";position:absolute;top:4px;bottom:4px;left:0;
 /* Shared segmented controls already translate by --tg-segment-x.
    Using that value as left ALSO caused the indicator to travel twice. */
 transform:translateX(var(--tg-segment-x,0px));
 width:var(--tg-segment-width,0px);border-radius:9px;background:var(--text);
 box-shadow:none;transition:transform .19s ease,width .19s ease,opacity .15s;
}
.tg-pitch-variant-tabs.tg-segment{align-self:flex-start;margin:9px 0 3px}
.tg-pitch-side .tg-board-modes{margin-top:6px}
.tg-pitch-stage.is-hard{
 width:min(100%,400px);max-width:400px;aspect-ratio:1/1;height:auto;min-height:0;
}
.tg-pitch-stage.is-hard .tg-pitch-pad{
 position:absolute;inset:0;z-index:2;outline-offset:-4px;
 cursor:crosshair;touch-action:none;user-select:none;-webkit-user-select:none;
}
.tg-pitch-stage.is-hard .tg-pitch-pad:focus-visible{outline:2px solid var(--tg-pitch-marker)}
.tg-pitch-pad-grid{
 position:absolute;inset:14px;border:1px solid color-mix(in srgb,var(--tg-pitch-marker) 19%,transparent);
 background:
 linear-gradient(90deg,transparent calc(50% - .5px),color-mix(in srgb,var(--tg-pitch-marker) 15%,transparent) 50%,transparent calc(50% + .5px)),
 linear-gradient(transparent calc(50% - .5px),color-mix(in srgb,var(--tg-pitch-marker) 15%,transparent) 50%,transparent calc(50% + .5px));
 border-radius:10px;pointer-events:none;opacity:.85;
}
.tg-pitch-pad-marker{
 position:absolute;z-index:2;width:28px;height:28px;border-radius:50%;
 background:color-mix(in srgb,var(--tg-pitch-marker) 12%,transparent);
 border:1px solid color-mix(in srgb,var(--tg-pitch-marker) 58%,transparent);
 transform:translate(-50%,-50%);pointer-events:none;display:grid;place-items:center;
}
.tg-pitch-pad-marker i{display:block;width:9px;height:9px;border-radius:50%;background:var(--tg-pitch-marker);box-shadow:0 0 0 2px var(--surface)}
.tg-pitch-pad-label{
 position:absolute;z-index:1;font-size:9px;font-weight:750;letter-spacing:1.1px;
 color:var(--tg-pitch-muted);pointer-events:none;
}
.tg-pitch-pad-top{top:48px;left:50%;transform:translateX(-50%)}
.tg-pitch-pad-bottom{bottom:21px;left:50%;transform:translateX(-50%)}
.tg-pitch-pad-left{left:22px;top:50%;transform:translateY(-50%)}
.tg-pitch-pad-right{right:22px;top:50%;transform:translateY(-50%)}
.tg-pitch-pad-value{
 position:absolute;z-index:3;bottom:30px;left:24px;color:var(--tg-pitch-ink);
 font-size:clamp(24px,4.5vw,39px);line-height:1;letter-spacing:-1.7px;
 font-weight:680;font-variant-numeric:tabular-nums;pointer-events:none;
}
.tg-pitch-pad-value small{font-size:13px;font-weight:500;letter-spacing:0;color:var(--tg-pitch-muted)}
.tg-pitch-pad[hidden],.tg-pitch-hard-target[hidden],.tg-pitch-hard-choice[hidden]{display:none!important}
.tg-pitch-hard-target strong,.tg-pitch-hard-choice strong{
 color:var(--tg-pitch-ink);font-size:13px;font-weight:650;
}
.tg-pitch-hard-target strong{color:var(--tg-pitch-muted)}
.tg-pitch-stage.is-hard .tg-pitch-feedback-values{gap:4px}
@media(max-width:700px){
 .tg-pitch-pad-top{top:43px}
 .tg-pitch-pad-value{left:17px;bottom:22px}
 .tg-pitch-mode-switch{top:9px}
}
/* Match the actual free game row, not the outer window width. Earlier shared
   #pitch-play width:720px!important was overriding Hard's square geometry. */
body.float-ui .app-shell:not(.admin-mode) #pitch-play #pitch-stage.is-hard{
 width:min(100%,560px,var(--float-tall-height,560px))!important;
 min-width:0!important;max-width:560px!important;
 height:auto!important;min-height:0!important;max-height:none!important;
 aspect-ratio:1/1;flex:0 1 auto;
}
/* The generous artwork remains the original size on taller displays. */
@media (min-width:701px) and (min-height:1200px){
 body.float-ui .app-shell:not(.admin-mode) #pitch-play #pitch-stage.is-hard{
  width:min(100%,720px)!important;max-width:720px!important;
 }
}
@media(prefers-reduced-motion:reduce){
 .tg-pitch-mode-switch .tg-segment::before,.tg-pitch-variant-tabs.tg-segment::before{transition:none}
}
