:root{
  --mf-cobalt:#0b5da6;
  --mf-cobalt-2:#1a7ad4;
  --mf-frost:#eef8ff;
  --mf-frost-2:#d8ecfb;
  --mf-orange:#ff9a2e;
  --mf-orange-2:#ffc45c;
  --mf-ink:#0a2a4d;
  --mf-muted:#41688a;
  --mf-line:#a9cde6;
}

body[data-page=camp]>main>header>#renameTeam:not([hidden]){display:inline-flex}

#phaseSplash{border:0;padding:0;margin:0;inset:0;width:100%;height:100%;max-width:none;max-height:none;background:transparent;color:#fff;overflow:hidden;outline:0}
#phaseSplash[open]{display:grid;place-items:center}
#phaseSplash::backdrop{background:#03162ed9;animation:mf-phase-fade 180ms ease-out both}
#phaseSplash.leaving::backdrop{animation:mf-phase-fade 180ms ease-in reverse both}
.phase-band{position:relative;width:100%;padding:clamp(24px,5vh,58px) 16px;text-align:center;color:#fff;background:linear-gradient(118deg,#072c65 3%,#1161bf 45%,#0b2656 92%);border-block:2px solid #79cafa;box-shadow:0 16px 70px #020e32aa;overflow:hidden;animation:mf-phase-band 260ms cubic-bezier(.18,.8,.25,1) both}
.phase-band::before{content:"";position:absolute;inset:0;pointer-events:none;background:repeating-linear-gradient(116deg,transparent 0 14px,#a9e4ff20 15px 17px);mask-image:linear-gradient(90deg,#000,transparent 50%,#000)}
#phaseSplash[data-kind=training] .phase-band{background:linear-gradient(118deg,#073d4e,#127e91 48%,#0a394f);border-color:#78e0d8}
#phaseKicker,#phaseDetail,#phaseTitle{position:relative;color:#fff;margin:0}
#phaseKicker{font-size:clamp(10px,1.6vw,15px);font-weight:900;letter-spacing:.19em;color:#bce9ff}
#phaseTitle{display:block;margin:5px 0 8px;color:#fff5d6;text-shadow:2px 4px #042b5777;font:950 italic clamp(38px,8vw,92px)/1.13 system-ui,"Microsoft YaHei",sans-serif}
#phaseDetail{font-size:clamp(12px,2vw,19px);font-weight:800;overflow-wrap:anywhere}
#phaseSplash.leaving .phase-band{animation:mf-phase-band-out 180ms ease-in both}
@keyframes mf-phase-fade{from{opacity:0}to{opacity:1}}
@keyframes mf-phase-band{from{opacity:0;transform:translateX(-12%) skewX(-8deg)}to{opacity:1;transform:none}}
@keyframes mf-phase-band-out{to{opacity:0;transform:translateX(10%) skewX(-8deg)}}
@media(prefers-reduced-motion:reduce){#phaseSplash::backdrop,#phaseSplash.leaving::backdrop,#phaseSplash .phase-band,#phaseSplash.leaving .phase-band{animation:none!important}}

main > section[id]:not([hidden]){
  animation:mf-page-in 280ms cubic-bezier(.22,.68,.28,1) both;
}

@keyframes mf-page-in{
  from{
    opacity:0;
    transform:translate3d(0,7px,0);
  }
  to{
    opacity:1;
    transform:none;
  }
}

#matchBreak{
  position:absolute;
  inset:0;
  z-index:5;
  display:grid;
  place-items:center;
  padding:clamp(10px,2vw,24px);
  border-radius:inherit;
  overflow:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  background:
    radial-gradient(120% 105% at 50% 0%,#0b3a63d9 0,#061b2fe0 58%,#03101ff0 100%);
  -webkit-backdrop-filter:blur(3px) saturate(.92);
  backdrop-filter:blur(3px) saturate(.92);
  color:#eaf6ff;
  animation:mf-break-in 220ms ease-out both;
}

#matchBreak[hidden]{
  display:none!important;
}

#matchBreak[data-kind=full]{
  background:
    radial-gradient(120% 108% at 50% 0%,#0c3f6ae6 0,#051c33ee 55%,#020c18fa 100%);
  -webkit-backdrop-filter:blur(4px) saturate(.88);
  backdrop-filter:blur(4px) saturate(.88);
}

#matchBreak[data-kind=full]::before{
  content:'';
  position:absolute;
  inset:0;
  pointer-events:none;
  background:radial-gradient(58% 44% at 50% 8%,#ff9a2e2e,transparent 72%);
}

@keyframes mf-break-in{
  from{
    opacity:0;
  }
  to{
    opacity:1;
  }
}

#matchBreak .break-card{
  position:relative;
  z-index:1;
  width:min(92%,470px);
  margin:auto;
  padding:clamp(18px,2.4vw,26px) clamp(18px,3vw,32px) clamp(16px,2.2vw,24px);
  border:1px solid #ffffff3d;
  border-radius:18px;
  background:linear-gradient(162deg,#fcfefef7 0,#eaf6ffee 58%,#fff7ecf4 100%);
  color:var(--mf-ink);
  text-align:center;
  box-shadow:0 22px 60px #02101f66,inset 0 1px #fff;
  animation:mf-card-in 240ms cubic-bezier(.22,.68,.28,1) both;
}

#matchBreak .break-card::before{
  content:'';
  position:absolute;
  top:0;
  left:14%;
  right:14%;
  height:4px;
  border-radius:0 0 6px 6px;
  background:linear-gradient(90deg,var(--mf-cobalt),var(--mf-cobalt-2) 52%,var(--mf-orange));
}

#matchBreak[data-kind=full] .break-card{
  width:min(92%,580px);
}

#matchBreak[data-kind=half] .break-card{
  width:min(92%,460px);
}

#matchBreak .break-card:focus-visible{
  outline:3px solid var(--mf-orange-2);
  outline-offset:3px;
}

@keyframes mf-card-in{
  from{
    opacity:0;
    transform:translate3d(0,6px,0) scale(.988);
  }
  to{
    opacity:1;
    transform:none;
  }
}

#breakKicker{
  display:block;
  margin:0;
  font-size:clamp(9.5px,1.05vw,11px);
  font-weight:850;
  letter-spacing:.16em;
  line-height:1.3;
  color:var(--mf-cobalt);
}

#matchBreak[data-kind=full] #breakKicker{
  color:#b9630a;
}

#breakTitle{
  margin:4px 0 2px;
  font-size:clamp(19px,2.5vw,30px);
  font-weight:950;
  line-height:1.16;
  letter-spacing:.01em;
  color:var(--mf-ink);
  text-wrap:balance;
}

#matchBreak[data-kind=full] #breakTitle{
  font-size:clamp(21px,2.9vw,34px);
}

#breakScore{
  display:block;
  margin:clamp(4px,.8vw,8px) 0 0;
  font:italic 950 clamp(26px,4.2vw,46px)/1.05 system-ui,"Microsoft YaHei",sans-serif;
  font-variant-numeric:tabular-nums;
  letter-spacing:.01em;
  color:#0b3f70;
}

#matchBreak[data-kind=full] #breakScore{
  color:#0a2a4d;
}

@supports ((-webkit-background-clip:text) or (background-clip:text)){
  #matchBreak[data-kind=full] #breakScore{
    background:linear-gradient(100deg,var(--mf-cobalt) 8%,var(--mf-cobalt-2) 48%,var(--mf-orange) 92%);
    -webkit-background-clip:text;
    background-clip:text;
    -webkit-text-fill-color:transparent;
    color:var(--mf-cobalt);
  }
}

#breakNote{
  max-width:46ch;
  margin:clamp(6px,1vw,9px) auto 0;
  font-size:clamp(11px,1.2vw,13px);
  font-weight:600;
  line-height:1.5;
  color:var(--mf-muted);
}

#breakNote:empty{
  display:none;
}

#matchBreak .break-actions{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:8px 10px;
  margin-top:clamp(14px,2vw,20px);
}

#matchBreak #breakAdjust,
#matchBreak #breakContinue{
  min-height:42px;
  padding:9px 18px;
  border-radius:10px;
  font:inherit;
  font-size:clamp(12.5px,1.25vw,14px);
  font-weight:850;
  line-height:1.2;
  white-space:nowrap;
  cursor:pointer;
  transition:background .14s ease,border-color .14s ease,box-shadow .14s ease,color .14s ease;
}

#matchBreak #breakAdjust{
  border:1px solid var(--mf-line);
  background:#f5fbff;
  color:#0d3f6b;
  box-shadow:inset 0 1px #fff,0 2px 6px #0b40731f;
}

#matchBreak #breakAdjust:hover:not(:disabled){
  border-color:var(--mf-orange-2);
  background:#fffdf7;
  color:#082f52;
}

#matchBreak #breakContinue{
  border:1px solid #0b568f;
  background:linear-gradient(#1c86d6,#0b5da6);
  color:#fff;
  text-shadow:0 1px #0a4a7d;
  box-shadow:inset 0 0 0 2px #ffffff2e,0 5px 14px #0b40734d;
}

#matchBreak #breakContinue:hover:not(:disabled){
  border-color:#0b568f;
  background:linear-gradient(#2a97e6,#0c69b8);
  color:#fff;
}

#matchBreak[data-kind=full] #breakContinue{
  border-color:#d98413;
  background:linear-gradient(#ffc45c,#ff9a2e);
  color:#3a2202;
  text-shadow:0 1px #ffe6a8;
  box-shadow:inset 0 0 0 2px #fff3c9,0 5px 16px #d984134d;
}

#matchBreak[data-kind=full] #breakContinue:hover:not(:disabled){
  border-color:#c8790c;
  background:linear-gradient(#ffd47e,#ffa33c);
  color:#2c1901;
}

#matchBreak button:focus-visible{
  outline:3px solid var(--mf-orange-2);
  outline-offset:2px;
}

#matchBreak button:disabled{
  cursor:default;
  opacity:.55;
  box-shadow:none;
}

.stage > #longPassCue{
  position:absolute;
  top:clamp(8px,1.2vw,14px);
  right:clamp(8px,1.2vw,14px);
  z-index:2;
  max-width:min(52%,270px);
  margin:0;
  padding:5px 10px;
  border:1px solid #ffffff33;
  border-left:3px solid var(--mf-orange-2);
  border-radius:6px;
  background:linear-gradient(100deg,#062a4be0,#0b3f6bcc);
  color:#eaf6ff;
  font-size:clamp(9px,1.02vw,11.5px);
  font-weight:750;
  line-height:1.35;
  letter-spacing:.02em;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  pointer-events:none;
  box-shadow:0 4px 12px #02101f4d;
  animation:mf-cue-in 200ms ease-out both;
}

.stage > #longPassCue:empty{
  display:none;
}

.stage > #longPassCue::before{
  content:'';
  display:inline-block;
  width:5px;
  height:5px;
  margin-right:6px;
  border-radius:50%;
  background:var(--mf-orange-2);
  vertical-align:1px;
  box-shadow:0 0 6px #ffc45ccc;
}

@keyframes mf-cue-in{
  from{
    opacity:0;
    transform:translate3d(5px,-3px,0);
  }
  to{
    opacity:1;
    transform:none;
  }
}

#renameTeam{
  display:inline-flex;
  align-items:center;
  gap:4px;
  min-height:0;
  margin:0;
  padding:3px 10px;
  border:1px solid var(--mf-line);
  border-radius:999px;
  background:#f2faff;
  color:#0d4a7d;
  font:inherit;
  font-size:11px;
  font-weight:800;
  line-height:1.35;
  vertical-align:middle;
  white-space:nowrap;
  cursor:pointer;
  box-shadow:0 1px 4px #0b407326;
  transition:background .14s ease,border-color .14s ease,color .14s ease;
}

#renameTeam:hover:not(:disabled){
  border-color:var(--mf-orange-2);
  background:#fffdf7;
  color:#0a3a63;
}

#renameTeam:focus-visible{
  outline:2px solid #0b63b5;
  outline-offset:2px;
}

#renameTeam:disabled{
  cursor:default;
  opacity:.5;
}

#teamNameDialog{
  width:min(92vw,420px);
  padding:20px 22px;
  border:1px solid #b5d5e6;
  border-radius:16px;
  background:linear-gradient(165deg,#fffdf8,#f2faff);
  color:#12314e;
  box-shadow:0 18px 55px #2446604d;
}

#teamNameDialog[open]{
  animation:mf-dialog-in 200ms ease-out both;
}

#teamNameDialog::backdrop{
  background:#0d23346b;
  -webkit-backdrop-filter:blur(2px);
  backdrop-filter:blur(2px);
}

#teamNameDialog[open]::backdrop{
  animation:mf-backdrop-in 200ms ease-out both;
}

@keyframes mf-dialog-in{
  from{
    opacity:0;
    transform:translate3d(0,-5px,0) scale(.992);
  }
  to{
    opacity:1;
    transform:none;
  }
}

@keyframes mf-backdrop-in{
  from{
    opacity:0;
  }
  to{
    opacity:1;
  }
}

#teamNameDialog h2{
  margin:0 0 4px;
  font-size:clamp(17px,2vw,21px);
  color:#0d2f52;
}

#teamNameDialog label{
  display:block;
  margin:10px 0 6px;
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  color:#3f6683;
}

#teamNameInput{
  display:block;
  width:100%;
  padding:9px 11px;
  border:1px solid #b9d7eb;
  border-radius:9px;
  background:#fff;
  color:#0d2f52;
  font:inherit;
  font-size:15px;
  font-weight:700;
  transition:border-color .14s ease,box-shadow .14s ease;
}

#teamNameInput::placeholder{
  color:#8aa6bd;
  font-weight:600;
}

#teamNameInput:hover:not(:disabled){
  border-color:#8fbede;
}

#teamNameInput:focus{
  outline:none;
  border-color:var(--mf-cobalt-2);
  box-shadow:0 0 0 3px #1a7ad426;
}

#teamNameInput:focus-visible{
  outline:2px solid #0b63b5;
  outline-offset:1px;
}

#teamNameInput[aria-invalid=true]{
  border-color:#c0492f;
  box-shadow:0 0 0 3px #c0492f22;
}

#teamNameStatus{
  min-height:1.2em;
  margin:8px 0 0;
  font-size:11.5px;
  font-weight:650;
  line-height:1.4;
  color:var(--mf-muted);
}

#teamNameStatus[data-tone=error]{
  color:#a93a26;
}

#teamNameStatus[data-tone=ok]{
  color:#11794f;
}

#teamNameDialog .dialog-actions{
  flex-wrap:wrap;
  margin-top:14px;
}

#teamNameDialog .dialog-actions button{
  min-height:38px;
  padding:8px 14px;
  border:1px solid #b9d7eb;
  border-radius:9px;
  background:#eef6fc;
  color:#0d3358;
  font:inherit;
  font-size:12.5px;
  font-weight:850;
  cursor:pointer;
  transition:background .14s ease,border-color .14s ease;
}

#teamNameDialog .dialog-actions button:hover:not(:disabled){
  border-color:#8fbede;
  background:#fff;
}

#teamNameDialog .dialog-actions button.primary{
  border-color:#0b568f;
  background:linear-gradient(#1c86d6,#0b5da6);
  color:#fff;
}

#teamNameDialog .dialog-actions button.primary:hover:not(:disabled){
  border-color:#0b568f;
  background:linear-gradient(#2a97e6,#0c69b8);
  color:#fff;
}

#teamNameDialog .dialog-actions button:focus-visible{
  outline:3px solid #0b63b5;
  outline-offset:2px;
}

@media(max-width:640px){
  #matchBreak{
    padding:8px;
  }

  #matchBreak .break-card,
  #matchBreak[data-kind=half] .break-card,
  #matchBreak[data-kind=full] .break-card{
    width:100%;
    padding:16px 14px 14px;
  }

  #matchBreak .break-actions{
    flex-direction:column;
    gap:8px;
  }

  #matchBreak #breakAdjust,
  #matchBreak #breakContinue{
    width:100%;
    min-height:46px;
    white-space:normal;
  }

  #breakNote{
    max-width:none;
  }

  .stage > #longPassCue{
    top:6px;
    right:6px;
    max-width:58%;
    padding:4px 8px;
  }

  #teamNameDialog{
    padding:16px 16px 14px;
  }

  #teamNameDialog .dialog-actions{
    justify-content:stretch;
  }

  #teamNameDialog .dialog-actions button{
    flex:1 1 auto;
    min-height:42px;
  }
}

@media(prefers-reduced-motion:reduce){
  main > section[id]:not([hidden]),
  #matchBreak,
  #matchBreak .break-card,
  .stage > #longPassCue,
  #teamNameDialog[open],
  #teamNameDialog[open]::backdrop{
    animation:none;
  }

  #matchBreak #breakAdjust,
  #matchBreak #breakContinue,
  #renameTeam,
  #teamNameInput,
  #teamNameDialog .dialog-actions button{
    transition:none;
  }
}
