body[data-ui=matchday] :is(#sheet .panel-head,.panel-heading select){display:none!important}
body[data-ui=matchday] :is(#sheet,#hud){width:min(440px,calc(100vw - 32px));left:max(16px,env(safe-area-inset-left));right:auto;bottom:max(16px,env(safe-area-inset-bottom));max-height:calc(100dvh - 96px);border-radius:6px;background:#fffdf7;color:var(--ink);overflow:auto;box-shadow:0 12px 36px rgb(0 20 60 / .25);transition:transform 280ms var(--ease),opacity 220ms var(--ease-out,var(--ease))}
body[data-ui=matchday] :is(#sheet,#hud):not([hidden]){animation:sheet-fade-in 320ms cubic-bezier(.22,1,.36,1)}
/* The plan panel leaves downward (style.css:540), so the HUD that replaces it
   arrives from the same bottom edge rather than scaling up from its centre. */
body[data-ui=matchday] #hud:not([hidden]){animation:hud-rise-in 280ms cubic-bezier(.32,.72,0,1)}
body[data-ui=matchday] :is(.panel-body,#hud-controls){padding:0 20px 20px;border:0}
body[data-ui=matchday] .choice-group{padding-top:14px}
body[data-ui=matchday] .choice-group + .choice-group{margin-top:14px;border-top:1px solid var(--line)}
body[data-ui=matchday] .choice-heading{margin:0 0 8px;font-size:11px;line-height:1.2;font-weight:750;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
body[data-ui=matchday] .choice-location{padding-top:0}
body[data-ui=matchday] .choice-seat{padding-bottom:2px}
body[data-ui=matchday] .selection-summary{margin:10px 0 0;padding:9px 10px;background:var(--tint);color:var(--muted);font-size:11px;font-weight:650;line-height:1.35;font-variant-numeric:tabular-nums}
body[data-ui=matchday] .matchday-identity{display:flex;align-items:center;gap:10px;background:var(--blue);color:white}
body[data-ui=matchday] .matchday-identity img{object-fit:contain;flex-shrink:0}
body[data-ui=matchday] .matchday-brand{display:flex;flex-direction:column;gap:2px;min-width:0}
body[data-ui=matchday] .matchday-identity strong{font:800 34px/1 Barlow,sans-serif;letter-spacing:.015em}
body[data-ui=matchday] .matchday-brand span,body[data-ui=matchday] .matchday-identity>span{max-width:118px;font-size:9px;line-height:1.35;letter-spacing:.12em;font-weight:700}
body[data-ui=matchday] .official-match-link{margin-left:auto;display:inline-flex;align-items:center;justify-content:flex-end;gap:4px;max-width:150px;min-height:44px;padding:0;font-size:10px;font-weight:700;line-height:1.25;letter-spacing:.04em;text-transform:uppercase;color:#e1ecff;text-decoration:none;text-align:right}
body[data-ui=matchday] .official-match-link[hidden]{display:none!important}
body[data-ui=matchday] .official-match-link:focus-visible{outline:2px solid white;outline-offset:2px}
body[data-ui=matchday] #sheet .matchday-identity{margin:0 -20px 14px;padding:14px 20px}
body[data-ui=matchday] #hud .matchday-identity{gap:7px;margin-bottom:10px;padding-right:54px}
body[data-ui=matchday] #hud .matchday-identity img{width:18px;height:23px}
body[data-ui=matchday] #hud .matchday-identity strong{font-size:20px}
body[data-ui=matchday] #hud .matchday-identity>span,body[data-ui=matchday] #hud .matchday-brand span{display:none}
body[data-ui=matchday] #hud .panel-head{position:relative;min-height:70px;background:var(--blue);color:white;border:0;margin-bottom:10px;padding:14px 14px 12px;touch-action:none}
body[data-ui=matchday] #hud .panel-head::before{content:"";position:absolute;top:6px;left:50%;width:32px;height:4px;margin-left:-16px;border-radius:999px;background:rgb(255 255 255 / .35);pointer-events:none}
body[data-ui=matchday] #hud{display:flex;flex-direction:column;overflow:visible}
body[data-ui=matchday] #hud .hud-scroll{min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;clip-path:inset(0 round 5px)}
/* The chant button floats above the HUD's top-right corner, clear of the
   crest, the location title and the collapse toggle. It sits outside the
   scroll area so the HUD's overflow does not clip it. */
body[data-ui=matchday] #chant-play{position:absolute;right:max(14px,env(safe-area-inset-right));bottom:calc(100% + 10px);z-index:6;width:52px;height:52px;min-width:52px;min-height:52px;padding:0;display:grid;place-items:center;border:0;border-radius:999px;background:#fff;color:var(--blue);box-shadow:0 6px 18px rgb(0 16 52/.4);transition:background-color 150ms ease,color 150ms ease,transform 150ms var(--ease-out,var(--ease))}
body[data-ui=matchday] #chant-play[hidden]{display:none!important}
body[data-ui=matchday] #chant-play svg{width:24px;height:24px}
body[data-ui=matchday] #chant-play:active{transform:scale(.96)}
body[data-ui=matchday] #chant-play.is-playing{background:var(--ink);color:#fff}
body[data-ui=matchday] #chant-play.is-playing svg{animation:chant-pulse 900ms ease-in-out infinite}
@keyframes chant-pulse{0%,100%{opacity:1}50%{opacity:.45}}
@media(hover:hover) and (pointer:fine){body[data-ui=matchday] #chant-play:hover{background:#e2ebfa;color:var(--ink)}}
@media(prefers-reduced-motion:reduce){body[data-ui=matchday] #chant-play.is-playing svg{animation:none}}
@media(max-width:599px){body[data-ui=matchday] #hud .hud-scroll{clip-path:inset(0 round 10px)}}
body[data-ui=matchday][data-controls=compact] #hud .panel-head{margin-bottom:0}
body[data-ui=matchday][data-controls=compact] #hud{background:var(--blue)}
body[data-ui=matchday] #hud .pov-place{padding:0;display:grid;grid-template-columns:44px minmax(0,1fr);column-gap:10px;align-items:center}
body[data-ui=matchday] #hud .panel-heading{grid-column:2;grid-row:1;padding:0;min-height:0;margin:0;pointer-events:none}
body[data-ui=matchday] #hud .panel-heading h2{font:800 26px/1 Barlow,sans-serif;text-transform:uppercase;color:white;max-width:none;white-space:normal;text-align:left;text-wrap:wrap}
body[data-ui=matchday] #hud-summary{grid-column:2;font-size:12px;line-height:1.4;color:#e1ecff;margin:6px 0 0;font-variant-numeric:tabular-nums}
body[data-ui=matchday] #field-return{position:static;grid-column:1;grid-row:1;display:grid;place-items:center;width:44px;height:44px;padding:0;margin:0;background:rgb(255 255 255 / .15);color:white;border-radius:3px}
body[data-ui=matchday] #field-return svg{transition:transform 160ms var(--ease-out)}
body[data-ui=matchday] #hud-toggle{display:flex;position:absolute;right:max(14px,env(safe-area-inset-right));top:14px;min-width:44px;min-height:44px;padding:0;align-items:center;justify-content:center;background:rgb(255 255 255 / .15);color:white;border-radius:3px}
body[data-ui=matchday] .side-picks{--side-count:4;position:relative;isolation:isolate;display:grid;grid-template-columns:repeat(var(--side-count),minmax(0,1fr));gap:3px;padding:0;background:transparent;border-radius:0;border-bottom:1px solid var(--line);margin:0}
body[data-ui=matchday] .side-picks:not(.areas)::before{content:"";position:absolute;top:0;bottom:0;left:0;width:calc((100% - 3px * (var(--side-count) - 1)) / var(--side-count));border-radius:2px;background:var(--blue);transform:translateX(calc(var(--active-side,0) * (100% + 3px)));transition:transform 240ms cubic-bezier(.32,.72,0,1);z-index:0;pointer-events:none}
body[data-ui=matchday] .side-picks button{position:relative;z-index:1;min-height:56px;min-width:0;padding:6px 2px;border:0;border-radius:2px;grid-column:auto!important;background:transparent;color:var(--ink);display:flex;flex-direction:column;align-items:center;justify-content:center;transition:color 150ms ease,transform 120ms var(--ease-out,var(--ease)),background-color 150ms ease}
body[data-ui=matchday] .side-picks button b{font:800 18px/1 Barlow,sans-serif;text-transform:uppercase;letter-spacing:.035em;white-space:nowrap}
body[data-ui=matchday] .side-picks:not(.areas) button[aria-checked=true]{background:transparent;color:white;box-shadow:none}
body[data-ui=matchday] .side-picks.areas button[aria-checked=true]{background:var(--blue);border-color:var(--blue);color:white;box-shadow:none}
body[data-ui=matchday] .areas{grid-template-columns:repeat(3,minmax(0,1fr));margin-top:8px;gap:5px;border:0}
body[data-ui=matchday] .areas:not([hidden]) button{animation:vip-btn-in 200ms var(--ease-out) backwards}
body[data-ui=matchday] .areas:not([hidden]) button:nth-child(2){animation-delay:35ms}
body[data-ui=matchday] .areas:not([hidden]) button:nth-child(3){animation-delay:70ms}
body[data-ui=matchday] .areas button{display:flex;flex-direction:column;gap:2px;min-height:48px;border:1px solid var(--line);box-shadow:none}
body[data-ui=matchday] .areas button span{font-size:10px;letter-spacing:.06em;line-height:1.2}
body[data-ui=matchday] .areas button strong{font-size:12px;font-weight:650;line-height:1.3;white-space:normal;text-wrap:balance}
body[data-ui=matchday] :is(.areas,.tier-field,#hud-controls,.quick-options)[hidden]{display:none!important}
body[data-ui=matchday] .tier-field{display:flex;justify-content:space-between;align-items:center;gap:8px;margin:8px 0 0;font-size:12px;font-weight:650}
body[data-ui=matchday] .tier-field>span{flex:1;min-width:0}
body[data-ui=matchday] .tier-segment{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px;width:min(180px,56%);padding:2px;background:var(--tint);border-radius:2px}
body[data-ui=matchday] .tier-segment button{min-width:0;min-height:44px;padding:0 8px;border:0;border-radius:1px;background:transparent;color:var(--ink);font-size:12px;font-weight:700}
body[data-ui=matchday] .tier-segment button[aria-checked=true]{background:var(--blue);color:white}
body[data-ui=matchday] .tier-field:has(select:disabled) .tier-segment{opacity:.45;pointer-events:none}
body[data-ui=matchday] .viewpoint-presets{display:flex;flex-direction:column;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid var(--line)}
body[data-ui=matchday] .viewpoint-presets>span{font-size:10px;font-weight:750;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
body[data-ui=matchday] .viewpoint-presets>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
body[data-ui=matchday] .viewpoint-presets button{min-width:0;min-height:44px;padding:8px 6px;border:1px solid var(--line);border-radius:3px;background:transparent;color:var(--ink);font-size:11px;font-weight:700;line-height:1.25;text-wrap:balance;transition:background-color 150ms ease,color 150ms ease,border-color 150ms ease}
@media(hover:hover) and (pointer:fine){
  body[data-ui=matchday] .viewpoint-presets button:not([aria-pressed=true]):hover{background:rgb(6 69 181 / .08)}
}
body[data-ui=matchday] .viewpoint-presets button[aria-pressed=true]{background:rgb(6 69 181 / .1);border-color:var(--blue);color:var(--blue)}
body[data-ui=matchday] .seat-spot-head{display:flex;align-items:center;justify-content:flex-start;gap:8px;margin:16px 0 2px;padding-top:12px;border-top:1px solid var(--line)}
body[data-ui=matchday] .seat-spot-head span{font-size:11px;font-weight:750;letter-spacing:.07em;text-transform:uppercase;color:var(--muted)}
body[data-ui=matchday] .steps{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;margin-top:6px;border-top:0;padding-top:0}
body[data-ui=matchday] .stepper{min-width:0;grid-template-columns:44px minmax(0,1fr) 44px;border:0;border-radius:0;background:transparent;box-shadow:none;padding:0}
body[data-ui=matchday] .stepper+.stepper{border-left:1px solid var(--line)}
body[data-ui=matchday] .stepper button{min-width:44px;min-height:44px;padding:4px;font-size:20px}
body[data-ui=matchday] .stepper>span{min-width:0;gap:0;overflow:hidden}
body[data-ui=matchday] .stepper small{font-size:11px;line-height:1.2;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-weight:750}
body[data-ui=matchday] .stepper b{display:inline-block;font:800 32px/1 Barlow,sans-serif;font-variant-numeric:tabular-nums}
body[data-ui=matchday] .stepper b[data-tick=up]{animation:tick-up 170ms var(--ease-out,var(--ease))}
body[data-ui=matchday] .stepper b[data-tick=down]{animation:tick-down 170ms var(--ease-out,var(--ease))}
body[data-ui=matchday] #enter{display:flex;justify-content:space-between;margin-top:10px;min-height:44px;padding:12px 14px;font-size:14px;border-radius:2px;box-shadow:none}
body[data-ui=matchday] #enter [data-icon]{transition:transform 180ms var(--ease-out)}
body[data-ui=matchday] .topbar{flex-wrap:nowrap;gap:6px;justify-content:flex-end;transition:opacity 180ms var(--ease-out,var(--ease))}
/* Rails overlap once a dropdown is open (236px panel from a 44px toggle), so
   they need a stacking order. Without one the rail that comes later in the DOM
   sits on top and its dropdown covers the next toggle's hit area, which made
   the Koreo button feel unclickable. The expanded rail rises above its
   siblings. */
body[data-ui=matchday] .quick-rail{position:relative;z-index:1;display:flex;align-items:center;flex:0 0 auto}
body[data-ui=matchday] .quick-rail[data-expanded]{z-index:5}
body[data-ui=matchday] .quick-rail h2{display:none}
body[data-ui=matchday] .rail-toggle{display:inline-flex;align-items:center;justify-content:center;gap:6px;width:auto;min-width:44px;min-height:44px;padding:0 10px;border:0;border-radius:2px;background:var(--blue);color:white;box-shadow:0 0 0 1px rgb(8 45 105 / .12),0 2px 6px rgb(0 20 60 / .16);transition:background-color 150ms ease,color 150ms ease,transform 150ms var(--ease-out,var(--ease))}
body[data-ui=matchday] .rail-toggle svg{width:18px;height:18px;transition:transform 200ms var(--ease-out)}
body[data-ui=matchday] .rail-label{font-size:10px;font-weight:750;letter-spacing:.08em;text-transform:uppercase;line-height:1}
body[data-ui=matchday] .quick-rail[data-expanded] .rail-toggle{background:var(--ink);color:white}
body[data-ui=matchday] .quick-options{position:absolute;top:calc(100% + 6px);right:0;display:flex;flex-direction:column;align-items:stretch;gap:8px;width:236px;padding:12px;background:#fffdf7;border:0;border-radius:3px;box-shadow:0 0 0 1px rgb(8 45 105 / .12),0 4px 12px rgb(0 20 60 / .1),0 18px 40px rgb(0 20 60 / .18);transform-origin:top right;z-index:4}
body[data-ui=matchday] #quick-time .quick-options{width:188px}
body[data-ui=matchday] .quick-options:not([hidden]){animation:rail-drop-in 180ms var(--ease-out,var(--ease))}
body[data-ui=matchday] .quick-title{display:block;width:100%;font-family:Barlow,Impact,sans-serif;font-weight:800;font-size:15px;line-height:1;text-transform:uppercase;letter-spacing:.05em;color:var(--blue);text-align:left;padding-bottom:8px;border-bottom:1px solid var(--line)}
body[data-ui=matchday] .quick-label{display:block;width:100%;font-size:10px;font-weight:700;line-height:1.2;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);text-align:left;margin:2px 0 -4px}
body[data-ui=matchday] .quick-options .segment{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(44px,1fr);width:100%;gap:2px;margin:0;padding:2px;background:var(--tint);border-radius:2px}
body[data-ui=matchday] .quick-options .segment button{width:100%;min-width:0;min-height:44px;display:flex;flex-direction:row;align-items:center;justify-content:center;gap:6px;padding:0 8px;font-size:11px;font-weight:700;line-height:1.1;letter-spacing:.02em;white-space:nowrap;border:0;border-radius:1px;background:transparent;color:var(--ink);transition:background-color 150ms ease,color 150ms ease,transform 150ms var(--ease-out,var(--ease))}
body[data-ui=matchday] .quick-options .segment button svg{width:17px;height:17px;flex-shrink:0}
body[data-ui=matchday] .quick-options .segment button span[data-icon]{display:inline-flex}
body[data-ui=matchday] .quick-options .segment button span:not([data-icon]){display:none}
body[data-ui=matchday] .quick-options .segment[data-text] button span:not([data-icon]){display:inline;font-size:11px;font-weight:700;letter-spacing:.02em;text-transform:none;color:inherit}
body[data-ui=matchday] .quick-options .segment button[aria-checked=true],body[data-ui=matchday] .quick-options .segment button[aria-pressed=true]{background:var(--blue);color:white}
body[data-ui=matchday] .quick-options .segment button:focus-visible{outline-offset:1px}
body[data-ui=matchday] .koreo-mine{width:100%;min-height:44px;display:flex;align-items:center;justify-content:space-between;padding:0 12px;font-size:12px;font-weight:700;border:0;border-radius:2px;background:var(--tint);color:var(--ink)}
body[data-ui=matchday] .koreo-mine[aria-pressed=true]{background:var(--blue);color:white}
body[data-ui=matchday] .koreo-create{width:100%;min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 12px 0 12px;font-size:12px;font-weight:700;border:0;border-radius:2px;background:var(--blue);color:white}
body[data-ui=matchday] .share-actions{display:flex;flex-direction:column;gap:4px;width:100%;padding-top:4px;border-top:1px solid var(--line)}
body[data-ui=matchday] .share-action{width:100%;min-height:44px;display:flex;align-items:center;justify-content:flex-start;gap:8px;padding:0 10px;font-size:12px;font-weight:650;border:0;border-radius:2px;background:var(--tint);color:var(--ink);text-align:left}
body[data-ui=matchday] #share-image{background:var(--blue);color:white;font-weight:700}
body[data-ui=matchday] .share-action svg{width:16px;height:16px;flex-shrink:0}
@media(hover:hover) and (pointer:fine){
  body[data-ui=matchday] .rail-toggle:hover{background:#053b9c}
  body[data-ui=matchday] .quick-rail[data-expanded] .rail-toggle:hover{background:#062353}
  body[data-ui=matchday] .quick-options .segment button:not([aria-checked=true],[aria-pressed=true]):hover{background:rgb(6 69 181 / .08)}
  body[data-ui=matchday] .tier-segment button:not([aria-checked=true]):hover{background:rgb(6 69 181 / .08)}
  body[data-ui=matchday] .koreo-mine:not([aria-pressed=true]):hover,body[data-ui=matchday] #share-copy:hover{background:#e2ebfa}
  body[data-ui=matchday] .koreo-create:hover,body[data-ui=matchday] #share-image:hover{background:#053b9c;color:white}
  body[data-ui=matchday] #field-return:hover svg{transform:translateX(-2px)}
  body[data-ui=matchday] #enter:hover [data-icon]{transform:scale(1.12)}
  body[data-ui=matchday] .official-match-link:hover{color:white}
}
@media(prefers-reduced-motion: reduce){
  body[data-ui=matchday] .side-picks:not(.areas)::before{transition:none}
  body[data-ui=matchday] .rail-toggle,body[data-ui=matchday] .rail-toggle svg,body[data-ui=matchday] .viewpoint-presets button,body[data-ui=matchday] #field-return svg,body[data-ui=matchday] #enter [data-icon]{transition:none}
  body[data-ui=matchday] .areas:not([hidden]) button{animation:none}
  body[data-ui=matchday] .quick-options:not([hidden]),body[data-ui=matchday] :is(#sheet,#hud):not([hidden]),.koreo-editor:not([hidden]){animation:none}
  body[data-ui=matchday] .stepper b[data-tick]{animation:none}
  body[data-ui=matchday] .quick-options .segment button:active,body[data-ui=matchday] .rail-toggle:active{transform:none}
}
body[data-ui=matchday] button{touch-action:manipulation}
body[data-ui=matchday] :is(button,select):focus-visible{outline:2px solid var(--blue);outline-offset:2px}
body[data-ui=matchday] #hud .panel-head :focus-visible{outline-color:white}
@keyframes sheet-fade-in{
  from{opacity:.02;transform:scale(.975);transform-origin:bottom center}
  to{opacity:1;transform:scale(1);transform-origin:bottom center}
}
@keyframes hud-rise-in{
  from{opacity:.02;transform:translateY(14px)}
  to{opacity:1;transform:translateY(0)}
}
@keyframes vip-btn-in{
  from{opacity:.02;transform:translateY(5px)}
  to{opacity:1;transform:translateY(0)}
}
@keyframes tick-up{
  from{opacity:.3;transform:translateY(7px) scale(.92)}
  to{opacity:1;transform:translateY(0) scale(1)}
}
@keyframes tick-down{
  from{opacity:.3;transform:translateY(-7px) scale(.92)}
  to{opacity:1;transform:translateY(0) scale(1)}
}
@media(max-width:599px){
  body[data-ui=matchday] :is(#sheet,#hud){left:0;right:0;bottom:0;width:100%;border-radius:10px 10px 0 0;padding-bottom:env(safe-area-inset-bottom);max-height:calc(100dvh - 80px)}
  body[data-ui=matchday] #hud .hud-scroll{clip-path:inset(0 round 10px)}
  body[data-ui=matchday] :is(#sheet-body,#hud-controls){padding-left:max(18px,env(safe-area-inset-left));padding-right:max(18px,env(safe-area-inset-right))}
  body[data-ui=matchday] #sheet .matchday-identity{margin-left:calc(-1 * max(18px,env(safe-area-inset-left)));margin-right:calc(-1 * max(18px,env(safe-area-inset-right)));padding-left:max(18px,env(safe-area-inset-left));padding-right:max(18px,env(safe-area-inset-right))}
  body[data-ui=matchday] #hud .panel-head{padding-left:max(14px,env(safe-area-inset-left));padding-right:max(14px,env(safe-area-inset-right))}
  body[data-ui=matchday] .side-picks button{min-height:52px}
  body[data-ui=matchday] .side-picks button b{font-size:clamp(15px,4.2vw,18px)}
  body[data-ui=matchday] .viewpoint-presets>div{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
  body[data-ui=matchday] .viewpoint-presets button{padding:8px 6px;font-size:12px}
  body[data-ui=matchday] .side-picks button b{font-size:14px;letter-spacing:.02em}
  body[data-ui=matchday] .seat-spot-head{margin-top:14px;padding-top:10px}
  body[data-ui=matchday] .stepper{grid-template-columns:40px minmax(0,1fr) 40px}
  body[data-ui=matchday] .stepper button{min-width:40px}
  body[data-ui=matchday] .stepper b{font-size:30px}
}
@keyframes rail-drop-in{
  from{opacity:.02;transform:translateY(-6px)}
  to{opacity:1;transform:translateY(0)}
}
body[data-editing="1"] :is(#sheet,#hud,.topbar){opacity:0}
.koreo-editor{position:fixed;left:0;right:0;bottom:0;z-index:20;display:flex;flex-direction:column;max-height:68dvh;background:#fffdf7;color:var(--ink);border-top:2px solid var(--blue);box-shadow:0 -12px 36px rgb(0 16 52 / .32);padding-bottom:env(safe-area-inset-bottom);pointer-events:auto;overflow:hidden}
.koreo-editor:not([hidden]){animation:sheet-fade-in 240ms cubic-bezier(.32,.72,0,1)}
.koreo-editor-head{display:flex;align-items:center;gap:10px;padding:8px max(14px,env(safe-area-inset-left)) 8px max(14px,env(safe-area-inset-left));background:var(--blue);color:white}
.koreo-editor-title{display:flex;align-items:baseline;gap:8px;min-width:0}
.koreo-editor-title h2{font:800 20px/1 Barlow,Impact,sans-serif;text-transform:uppercase;letter-spacing:.03em;margin:0}
.koreo-editor-title span{font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:rgb(255 255 255 / .78);white-space:nowrap}
.koreo-editor-meta{margin-left:auto;font-size:11px;font-weight:700;font-variant-numeric:tabular-nums;color:rgb(255 255 255 / .9);white-space:nowrap}
.koreo-editor-head .icon-button{width:44px;min-width:44px;min-height:44px;padding:0;border-radius:2px;font-size:18px;line-height:1;color:white;background:rgb(255 255 255 / .14)}
.koreo-editor-tools{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;padding:8px max(14px,env(safe-area-inset-right)) 8px max(14px,env(safe-area-inset-left));background:white;border-bottom:1px solid var(--line)}
.koreo-palette{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:2px;padding:2px;background:var(--tint);border-radius:2px}
.koreo-palette button{min-width:0;min-height:44px;padding:0 6px;border:0;border-radius:1px;background:transparent;color:var(--ink);display:flex;align-items:center;justify-content:center;gap:6px;font-size:11px;font-weight:700}
.koreo-palette button span:not(.swatch){display:none}
@media(max-width:599px){
  /* The swatch is the mobile label; keep the five-color row compact. */
  .koreo-palette button span:not(.swatch){display:none}
}
.koreo-palette .swatch{display:block;width:20px;height:20px;border-radius:2px;border:1px solid rgb(8 45 105 / .22);flex-shrink:0}
.koreo-palette .swatch-erase{background:linear-gradient(135deg,transparent 44%,#d63638 45%,#d63638 55%,transparent 56%),white}
.koreo-palette button[aria-checked=true]{background:var(--blue);color:white}
.koreo-palette button[aria-checked=true] .swatch{border-color:white}
.koreo-brushes{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:2px;padding:2px;background:var(--tint);border-radius:2px}
.koreo-brushes button{min-width:44px;min-height:44px;padding:0 6px;border:0;border-radius:1px;background:transparent;color:var(--ink);font-size:11px;font-weight:700;font-variant-numeric:tabular-nums}
.koreo-brushes button[aria-checked=true]{background:var(--blue);color:white}
.koreo-canvas-area{padding:8px max(14px,env(safe-area-inset-right)) 10px max(14px,env(safe-area-inset-left));background:#0b214d;display:flex;flex-direction:column;gap:4px;min-height:0;overflow:auto}
.koreo-canvas-axis{display:flex;justify-content:space-between;font-size:9px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:rgb(255 255 255 / .66);font-variant-numeric:tabular-nums}
.koreo-canvas-wrap{border:1px solid rgb(255 255 255 / .18);background:#071636;overflow:auto}
#koreo-canvas{display:block;width:100%;height:auto;image-rendering:pixelated;cursor:crosshair}
.koreo-editor-foot{display:grid;grid-template-columns:auto 1fr 1.3fr;gap:8px;padding:10px max(14px,env(safe-area-inset-right)) 10px max(14px,env(safe-area-inset-left));background:#fffdf7;border-top:1px solid var(--line)}
.koreo-editor-foot button{min-height:44px;padding:0 14px;border:0;border-radius:2px;font-size:12px;font-weight:700}
.koreo-btn-ghost{background:var(--tint);color:var(--ink)}
.koreo-btn-primary{background:var(--blue);color:white;display:flex;align-items:center;justify-content:space-between;gap:8px}
@media(min-width:600px){
  .koreo-editor{left:max(24px,env(safe-area-inset-left));right:auto;bottom:max(24px,env(safe-area-inset-bottom));width:min(540px,calc(100vw - 48px));max-height:calc(100dvh - 110px);border:0;border-radius:3px;box-shadow:0 0 0 1px rgb(8 45 105 / .14),0 16px 44px rgb(0 20 60 / .28);padding-bottom:0}
  .koreo-palette button span:not(.swatch){display:inline}
}
body[data-ui=matchday] :is(.rail-toggle,.quick-options .segment button,.koreo-mine,.koreo-create,.share-action,.koreo-palette button,.koreo-brushes button,.koreo-editor-foot button):active{transform:scale(.96)}

/* --- share sheet ---------------------------------------------------------- */
.share-sheet{position:fixed;left:0;right:0;bottom:0;z-index:30;isolation:isolate;display:flex;flex-direction:column;max-height:82dvh;background:#fffdf7;color:var(--ink);border-top:2px solid var(--blue);border-radius:10px 10px 0 0;box-shadow:0 -12px 36px rgb(0 16 52 / .32);padding-bottom:env(safe-area-inset-bottom);overflow:hidden;pointer-events:auto}
/* A bottom sheet rises from the bottom edge; scaling up from the centre read
   as a generic pop. `share-sheet-in` was already defined for this and unused. */
.share-sheet:not([hidden]){animation:share-sheet-in 240ms cubic-bezier(.32,.72,0,1)}
.share-sheet-head{display:flex;align-items:center;gap:10px;padding:12px max(18px,env(safe-area-inset-left)) 10px max(18px,env(safe-area-inset-right));background:var(--blue);color:white}
.share-sheet-head h2{margin:0;font:800 20px/1 Barlow,Impact,sans-serif;text-transform:uppercase;letter-spacing:.03em}
.share-sheet-head .icon-button{margin-left:auto;width:44px;min-width:44px;min-height:44px;padding:0;border-radius:2px;font-size:18px;line-height:1;color:white;background:rgb(255 255 255 / .14)}
.share-sheet-body{display:flex;flex-direction:column;gap:10px;padding:14px max(18px,env(safe-area-inset-right)) 4px max(18px,env(safe-area-inset-left));overflow:auto;min-height:0}
.share-preview{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;align-items:stretch}
.share-preview-card{display:flex;flex-direction:column;align-items:center;gap:6px;min-width:0;min-height:44px;padding:10px 8px;border:1px solid var(--line);border-radius:4px;background:transparent;color:var(--ink);text-align:center}
.share-preview-card strong{font-size:12px;font-weight:750;letter-spacing:.02em}
.share-preview-card small{font-size:10px;font-weight:650;color:var(--muted);line-height:1.3}
.share-preview-card[aria-checked=true]{border-color:var(--blue);background:rgb(6 69 181 / .06)}
.share-preview-card[aria-checked=true] strong{color:var(--blue)}
/* One shared height for both frames keeps the pair aligned; each canvas is
   letterboxed inside its own aspect box rather than cropped. */
.share-preview-frame{position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:150px;background:#0b214d;border:1px solid rgb(8 45 105 / .18);border-radius:3px;overflow:hidden}
.share-preview-frame canvas{display:block;width:100%;height:100%;object-fit:contain}
.share-hint{margin:0;font-size:11px;font-weight:650;line-height:1.4;color:var(--muted);text-align:center}
.share-sheet-foot{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:12px max(18px,env(safe-area-inset-right)) 12px max(18px,env(safe-area-inset-left));background:#fffdf7;border-top:1px solid var(--line)}
.share-sheet-foot .share-action{width:100%;min-height:46px;display:flex;align-items:center;justify-content:center;gap:8px;padding:0 10px;border:0;border-radius:3px;background:transparent;color:var(--ink);font-size:12px;font-weight:700;white-space:nowrap;text-align:center}
/* Row 1: copy + bagikan. Row 2: the quiet save fallback, full width. */
body[data-ui=matchday] .share-sheet-foot .share-secondary{grid-area:1 / 1;background:var(--tint);color:var(--ink)}
body[data-ui=matchday] .share-sheet-foot .share-primary{grid-area:1 / 2;background:var(--blue);color:white}
body[data-ui=matchday] .share-sheet-foot .share-primary[hidden]{display:none}
body[data-ui=matchday] .share-sheet-foot .share-quiet{grid-area:2 / 1 / 3 / -1;min-height:42px;background:transparent;color:var(--muted);font-weight:650}
/* Only when Bagikan is absent does save take the primary slot. */
body[data-ui=matchday] .share-sheet-foot .share-primary[hidden] + .share-quiet{grid-area:1 / 1 / 2 / -1;min-height:46px;background:var(--blue);color:white;font-weight:700}
@keyframes share-sheet-in{
  from{opacity:.02;transform:translateY(12px)}
  to{opacity:1;transform:translateY(0)}
}
@media(min-width:600px){
  .share-sheet{left:max(24px,env(safe-area-inset-left));right:auto;bottom:max(24px,env(safe-area-inset-bottom));width:min(520px,calc(100vw - 48px));border:0;border-radius:4px;max-height:calc(100dvh - 110px);box-shadow:0 0 0 1px rgb(8 45 105 / .14),0 16px 44px rgb(0 20 60 / .28);padding-bottom:0}
  .share-preview-frame{height:190px}
  /* Wide enough for one row: copy, save, then bagikan as the trailing primary. */
  .share-sheet-foot{grid-template-columns:auto auto 1fr}
  body[data-ui=matchday] .share-sheet-foot .share-quiet{grid-area:1 / 2;min-height:46px;background:var(--tint);color:var(--ink);font-weight:700}
  body[data-ui=matchday] .share-sheet-foot .share-primary{grid-area:1 / 3}
  body[data-ui=matchday] .share-sheet-foot .share-primary[hidden] + .share-quiet{grid-area:1 / 2 / 2 / 4;background:var(--blue);color:white}
}
/* The plan panel and HUD sit at a lower z-index but still show through the gap
   above the sheet; fade them out while it is open. */
body[data-sharing="1"] :is(#sheet,#hud){opacity:0;pointer-events:none}
body[data-sharing="1"] :is(#sheet,#hud){transition:opacity 180ms var(--ease-out)}
@media(max-width:599px){
  body[data-ui=matchday] .rail-toggle[aria-controls="quick-share-options"]{padding:0;width:44px}
  body[data-ui=matchday] #quick-share .rail-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
  body[data-ui=matchday] #quick-time .quick-options{width:min(188px,calc(100vw - 16px))}
}
@media(prefers-reduced-motion: reduce){
  .share-sheet:not([hidden]){animation:none}
}
@media(hover:hover) and (pointer:fine){
  .share-preview-card:not([aria-checked=true]):hover{background:#f2f6fd}
  .share-secondary:hover{background:#e2ebfa}
  .share-primary:hover{background:#053b9c}
  .share-quiet:hover{background:var(--tint);color:var(--ink)}
}
