.allstar-announcement-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  color: #fff;
  background:
    radial-gradient(circle at 50% -12%, rgba(255, 218, 119, .31), transparent 34%),
    radial-gradient(circle at 8% 48%, rgba(51, 137, 255, .20), transparent 32%),
    radial-gradient(circle at 92% 48%, rgba(255, 51, 85, .20), transparent 32%),
    linear-gradient(145deg, #020612 0%, #071329 52%, #02040b 100%);
  isolation: isolate;
}

.allstar-announcement-overlay[hidden] { display: none !important; pointer-events: none; }

.allstar-announcement-overlay::before,
.allstar-announcement-overlay::after {
  content: "★  ·  ★  ·  ★  ·  ★";
  position: absolute;
  z-index: -1;
  color: rgba(255, 229, 151, .09);
  font: 900 clamp(46px, 7vw, 110px)/1 sans-serif;
  letter-spacing: .18em;
  white-space: nowrap;
  transform: rotate(-13deg);
}

.allstar-announcement-overlay::before { top: 8%; left: -5%; }
.allstar-announcement-overlay::after { right: -7%; bottom: 10%; transform: rotate(12deg); }

.allstar-announcement-frame {
  width: min(1480px, 100%);
  height: min(920px, 100%);
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(255, 225, 145, .52);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(7, 16, 37, .97), rgba(2, 7, 18, .98));
  box-shadow: 0 32px 90px rgba(0, 0, 0, .72), inset 0 1px rgba(255, 255, 255, .08);
}

.allstar-announcement-head {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: clamp(14px, 2vh, 24px) clamp(18px, 3vw, 42px) 12px;
  border-bottom: 1px solid rgba(255, 225, 145, .2);
  background: linear-gradient(90deg, rgba(17, 70, 140, .25), transparent 38%, transparent 62%, rgba(151, 22, 48, .22));
}

.allstar-announcement-brand span {
  display: block;
  color: #ffe2a0;
  font: 900 clamp(23px, 3.1vw, 48px)/.95 Georgia, "Times New Roman", serif;
  letter-spacing: .075em;
  text-shadow: 0 0 24px rgba(255, 210, 93, .3);
}

.allstar-announcement-brand strong {
  display: block;
  margin-top: 7px;
  color: #fff;
  font: 800 clamp(13px, 1.25vw, 19px)/1.2 "Yu Gothic", Meiryo, sans-serif;
  letter-spacing: .28em;
}

.allstar-announcement-league-key {
  display: flex;
  gap: 10px;
  color: #cdd7e9;
  font: 800 11px/1 sans-serif;
  letter-spacing: .08em;
}

.allstar-announcement-league-key span { padding: 7px 10px; border-radius: 999px; }
.allstar-announcement-league-key .central { background: rgba(35, 118, 255, .25); color: #9dccff; }
.allstar-announcement-league-key .pacific { background: rgba(238, 50, 79, .25); color: #ffb0bd; }

.allstar-announcement-content {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: clamp(18px, 2.5vw, 38px);
  scrollbar-color: rgba(255, 221, 135, .55) rgba(255, 255, 255, .05);
}

.allstar-announcement-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 12px max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 225, 145, .18);
  background: rgba(1, 5, 14, .92);
}

.allstar-announcement-actions button {
  min-width: 110px;
  padding: 10px 17px;
  border: 1px solid rgba(255, 226, 157, .48);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(180deg, #263652, #121b2d);
  font: 800 13px/1 "Yu Gothic", Meiryo, sans-serif;
  letter-spacing: .08em;
  cursor: pointer;
}

.allstar-announcement-actions button:hover,
.allstar-announcement-actions button:focus-visible { border-color: #ffdf8c; outline: none; box-shadow: 0 0 0 3px rgba(255, 217, 121, .16); }
.allstar-announcement-actions [data-allstar-action="next"] { color: #10111a; background: linear-gradient(180deg, #ffeab1, #d9a938); }

.allstar-stadium-settings {
  margin-top: 24px;
  display: grid;
  grid-template-columns: minmax(200px, 1.2fr) repeat(2, minmax(180px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  padding: 18px;
  border: 1px solid rgba(255, 225, 145, .35);
  border-radius: 14px;
  background: rgba(5, 13, 31, .86);
}
.allstar-stadium-settings h3 { margin: 3px 0; color: #ffe2a0; }
.allstar-stadium-settings p { margin: 0; color: #aebbd1; font-size: 12px; }
.allstar-stadium-settings > div > span { color: #70a9ff; font-size: 10px; font-weight: 900; letter-spacing: .15em; }
.allstar-stadium-settings label { display: grid; gap: 6px; color: #dce6f6; font-size: 12px; font-weight: 800; }
.allstar-stadium-settings select,
.allstar-stadium-settings button { min-height: 40px; border: 1px solid rgba(255, 226, 157, .4); border-radius: 8px; color: #fff; background: #111d34; padding: 7px 10px; }
.allstar-stadium-settings button { cursor: pointer; font-weight: 900; background: linear-gradient(180deg, #66501f, #35270e); }
.allstar-stadium-settings output { grid-column: 1 / -1; min-height: 1.2em; color: #ffe2a0; font-size: 12px; }

.allstar-opening-stage,
.allstar-unavailable {
  min-height: 100%;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  animation: allstar-opening-in .72s cubic-bezier(.2, .75, .2, 1) both;
}

.allstar-opening-ball {
  width: clamp(86px, 12vw, 150px);
  aspect-ratio: 1;
  margin-bottom: 22px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, #fff 0 17%, #e7e3d8 54%, #aaa79f 100%);
  box-shadow: 0 0 55px rgba(255, 225, 142, .42);
  position: relative;
}

.allstar-opening-ball::before,
.allstar-opening-ball::after {
  content: "";
  position: absolute;
  inset: 10% 42%;
  border-left: 3px dashed #b12535;
  border-radius: 50%;
  transform: rotate(22deg);
}
.allstar-opening-ball::after { transform: rotate(202deg); }

.allstar-opening-year {
  color: #ffe2a0;
  font: 900 clamp(28px, 5.4vw, 76px)/1 Georgia, "Times New Roman", serif;
  letter-spacing: .07em;
  text-shadow: 0 0 30px rgba(255, 211, 89, .3);
}
.allstar-opening-stage h2 { margin: 12px 0 6px; font: 900 clamp(27px, 4vw, 58px)/1.15 "Yu Gothic", Meiryo, sans-serif; letter-spacing: .22em; }
.allstar-opening-stage p { color: #c7d2e7; font-weight: 700; letter-spacing: .12em; }

.allstar-section-title { margin-bottom: clamp(18px, 3vh, 32px); text-align: center; }
.allstar-section-title span { color: #e6bd5d; font: 900 clamp(13px, 1.5vw, 19px)/1 Georgia, serif; letter-spacing: .24em; }
.allstar-section-title h2 { margin: 8px 0 0; font: 900 clamp(26px, 3.8vw, 52px)/1.1 "Yu Gothic", Meiryo, sans-serif; letter-spacing: .12em; }

.allstar-league-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.2vw, 30px); align-items: start; }
.allstar-league-panel { min-width: 0; padding: clamp(14px, 1.7vw, 24px); border: 1px solid rgba(255, 255, 255, .11); border-radius: 18px; background: rgba(255, 255, 255, .035); }
.allstar-league-panel.central { box-shadow: inset 0 3px #348cff; }
.allstar-league-panel.pacific { box-shadow: inset 0 3px #ef4563; }
.allstar-league-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.allstar-league-heading span { color: #eef3ff; font: 900 clamp(13px, 1.25vw, 18px)/1 sans-serif; letter-spacing: .09em; }
.allstar-league-heading strong { color: #aebbd1; font: 800 12px/1 sans-serif; }

.allstar-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.allstar-player-card {
  position: relative;
  min-width: 0;
  padding: 13px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .025));
  opacity: 0;
  transform: translateY(10px) scale(.97);
  animation: allstar-card-reveal .24s ease-out calc(var(--reveal-index, 0) * 45ms) forwards;
}
.allstar-card-kicker { color: #e9c570; font: 900 9px/1.1 sans-serif; letter-spacing: .1em; }
.allstar-card-role { margin: 7px 0; color: #aebbd2; font: 800 11px/1 sans-serif; }
.allstar-card-player { display: flex; align-items: center; gap: 9px; min-width: 0; }
.allstar-card-player > span:last-child { min-width: 0; }
.allstar-card-player strong { display: block; overflow-wrap: anywhere; color: #fff; font: 900 clamp(14px, 1.45vw, 20px)/1.25 "Yu Gothic", Meiryo, sans-serif; }
.allstar-card-player small { display: block; margin-top: 3px; overflow-wrap: anywhere; color: #b6c1d5; font: 700 10px/1.25 sans-serif; }
.allstar-team-mark { width: 33px; height: 33px; flex: 0 0 33px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.allstar-team-mark img { width: 100%; height: 100%; object-fit: contain; }
.allstar-team-mark.fallback { color: #ffe3a0; font-weight: 900; }
.allstar-card-score { margin-top: 9px; color: #ffe5a8; font: 900 18px/1 sans-serif; }
.allstar-card-score span { margin-left: 3px; font-size: 10px; }
.allstar-popular-badge,
.allstar-manager-badge { display: inline-block; margin-top: 8px; padding: 4px 7px; border-radius: 999px; font: 900 9px/1 sans-serif; }
.allstar-popular-badge { color: #261700; background: linear-gradient(180deg, #fff0a9, #e1ad2b); }
.allstar-manager-badge { color: #e6f1ff; background: rgba(96, 145, 224, .28); }
.allstar-recommendation-score { display: block; margin-top: 5px; color: #7d8ba4; font: 700 9px/1 sans-serif; }

.allstar-final-count { margin-bottom: 12px; color: #ffe09a; font: 900 27px/1 Georgia, serif; }
.allstar-final-count span { color: #9facbf; font: 800 10px/1 sans-serif; letter-spacing: .1em; }
.allstar-final-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.allstar-final-groups section { min-width: 0; padding: 10px; border-radius: 11px; background: rgba(255, 255, 255, .045); }
.allstar-final-groups h3 { margin: 0 0 7px; color: #e8c66e; font: 900 12px/1.2 sans-serif; }
.allstar-final-groups h3 span { color: #7f8da4; }
.allstar-final-groups ul { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.allstar-final-groups li { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 3px 7px; min-width: 0; }
.allstar-final-groups li strong { min-width: 0; overflow-wrap: anywhere; font: 800 12px/1.2 "Yu Gothic", Meiryo, sans-serif; }
.allstar-final-groups li small { grid-column: 2; overflow-wrap: anywhere; color: #8795ab; font: 700 9px/1.2 sans-serif; }
.allstar-source-badge { grid-row: 1 / span 2; min-width: 48px; padding: 3px 5px; border-radius: 999px; text-align: center; font: 900 8px/1 sans-serif; }
.allstar-source-badge.fanVote { color: #231600; background: #e9bd50; }
.allstar-source-badge.manager { color: #e8f2ff; background: #385e98; }
.allstar-data-warning { margin: 0 auto 16px; max-width: 760px; padding: 12px; border: 1px solid rgba(255, 193, 92, .55); border-radius: 10px; color: #ffe2ac; background: rgba(117, 64, 5, .22); text-align: center; font-weight: 800; }
.allstar-data-warning small { display: block; margin-top: 5px; color: #d7c3a2; }
.allstar-unavailable h2 { max-width: 760px; font: 900 clamp(21px, 3vw, 38px)/1.35 "Yu Gothic", Meiryo, sans-serif; }
.allstar-unavailable small { color: #aab7ca; }

@keyframes allstar-opening-in {
  from { opacity: 0; transform: scale(.91); filter: blur(5px); }
  to { opacity: 1; transform: scale(1); filter: blur(0); }
}
@keyframes allstar-card-reveal {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 900px) {
  .allstar-announcement-frame { height: 100%; border-radius: 14px; }
  .allstar-announcement-league-key { display: none; }
  .allstar-league-columns { grid-template-columns: 1fr; }
  .allstar-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .allstar-stadium-settings { grid-template-columns: 1fr 1fr; }
  .allstar-stadium-settings > div { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  .allstar-announcement-overlay { padding: 0; }
  .allstar-announcement-frame { border-width: 0; border-radius: 0; }
  .allstar-announcement-head { padding-inline: 14px; }
  .allstar-announcement-brand strong { letter-spacing: .14em; }
  .allstar-announcement-content { padding: 14px; }
  .allstar-card-grid,
  .allstar-final-groups { grid-template-columns: 1fr; }
  .allstar-announcement-actions { justify-content: stretch; overflow-x: auto; }
  .allstar-announcement-actions button { min-width: 88px; flex: 1 0 auto; padding-inline: 12px; }
  .allstar-stadium-settings { grid-template-columns: 1fr; }
  .allstar-stadium-settings > div { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .allstar-opening-stage,
  .allstar-player-card { animation-duration: .01ms; animation-delay: 0ms; }
}
