:root {
  --blue: #2243ff;
  --blue-d: #1228b8;
  --blue-l: #276aff;
  --pink: #ff26ff;
  --lime: #d1ff40;
  --orange: #ff6600;
  --num: "DIN Alternate", "Bahnschrift", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font: 15px/1.5 -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #fff; background: var(--blue);
  min-height: 100vh; display: flex; flex-direction: column;
  -webkit-text-size-adjust: 100%;
}
button { font-family: inherit; cursor: pointer; }
.bg-fixed { position: fixed; inset: 0; z-index: -1; background: var(--blue) no-repeat center bottom / 100% auto; }
.bg-fixed::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(34,67,255,0) 30%, rgba(34,67,255,.35) 100%); }
[hidden] { display: none !important; }
.muted { color: rgba(255,255,255,.7); font-size: 13px; }
.center { text-align: center; }

.m-head { text-align: center; padding: 14px 16px 6px; position: relative; }
.m-logo { position: absolute; left: 14px; top: 12px; width: 78px; }
.m-title { width: 82%; max-width: 380px; margin-top: 30px; }
.m-sub {
  display: inline-block; margin-top: 6px; padding: 4px 16px; font-weight: 800; font-size: 15px; letter-spacing: 1px;
  background: var(--pink); color: #fff; transform: skewX(-12deg); box-shadow: 4px 4px 0 var(--lime);
}

body.in .m-head { padding-top: 10px; }
body.in .m-logo { width: 64px; top: 10px; }
body.in .m-title { width: 54%; max-width: 240px; margin-top: 24px; }
body.in .m-sub { font-size: 13px; padding: 2px 12px; box-shadow: 3px 3px 0 var(--lime); }
#app { padding: 12px 14px 0; max-width: 520px; width: 100%; margin: 0 auto; }
.card {
  background: rgba(12, 28, 160, .72); border: 1.5px solid rgba(255,255,255,.22);
  border-radius: 18px; padding: 18px 16px; margin-bottom: 14px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px rgba(0, 10, 90, .35);
}
.login h2 { margin: 2px 0 4px; font-size: 22px; }
.tip { margin: 0 0 16px; color: rgba(255,255,255,.75); font-size: 13px; }
.login input {
  display: block; width: 100%; font: 700 26px/1 var(--num); letter-spacing: 6px; text-align: center;
  padding: 14px 10px; border-radius: 12px; border: 2px solid rgba(255,255,255,.4); background: rgba(255,255,255,.95); color: var(--blue-d);
  outline: none; margin-bottom: 14px;
}
.login input:focus { border-color: var(--lime); }
.login input::placeholder { font: 400 18px/1 var(--num); letter-spacing: 2px; color: #9aa3c7; }
.btn-main {
  display: block; width: 100%; border: 0; border-radius: 14px; padding: 15px; font-size: 18px; font-weight: 800; letter-spacing: 2px;
  background: var(--lime); color: #10207a; box-shadow: 0 5px 0 #8fb400; transition: .1s;
}
.btn-main:active { transform: translateY(3px); box-shadow: 0 2px 0 #8fb400; }
.btn-main:disabled { background: rgba(255,255,255,.25); color: rgba(255,255,255,.6); box-shadow: none; }
.btn-sub { flex: 1; border: 2px solid rgba(255,255,255,.4); background: transparent; color: #fff; border-radius: 14px; font-size: 16px; font-weight: 700; }

.me { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.14); border-radius: 40px; padding: 6px 8px 6px 6px; margin-bottom: 12px; }
.me-ava img, .me-ava .ph { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; display: flex; align-items: center; justify-content: center; background: var(--pink); font-weight: 800; }
.me-info { flex: 1; display: flex; align-items: center; gap: 8px; }
.me-info b { font-size: 16px; }
.me-info em { font-style: normal; font-size: 11px; padding: 1px 8px; border-radius: 10px; font-weight: 700; }
.t-pro { background: var(--pink); }
.t-pub { background: var(--lime); color: #10207a; }
.me-out { border: 0; background: rgba(255,255,255,.18); color: #fff; padding: 6px 14px; border-radius: 20px; font-size: 13px; }

.round-tag {
  display: inline-block; font-size: 13px; font-weight: 800; padding: 3px 12px; margin-bottom: 12px;
  background: var(--lime); color: #10207a; transform: skewX(-12deg);
}
.player-row { display: flex; gap: 14px; align-items: center; }
.poster { width: 96px; height: 144px; border-radius: 10px; object-fit: cover; flex: none; background: rgba(255,255,255,.1); display: flex; align-items: center; justify-content: center; font-size: 34px; font-weight: 800; }
.player .no { font: 800 24px/1 var(--num); color: var(--lime); font-style: italic; }
.player .name { font-size: 30px; font-weight: 900; margin-top: 6px; letter-spacing: 2px; }

.score-box { margin-top: 16px; }
.score-num {
  text-align: center; font: 800 76px/1 var(--num); letter-spacing: 2px; color: rgba(255,255,255,.35);
  padding: 10px 0 4px; font-style: italic;
}
.score-num.set { color: #fff; text-shadow: 4px 4px 0 var(--pink); }
.score-range { text-align: center; font-size: 12px; color: rgba(255,255,255,.65); margin-bottom: 12px; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 10px; border-radius: 6px; background: linear-gradient(90deg, var(--lime), var(--pink)); outline: none; margin: 6px 0 16px; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 4px solid var(--pink); box-shadow: 0 3px 8px rgba(0,0,0,.3); }
input[type=range]::-moz-range-thumb { width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 4px solid var(--pink); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.steps button { border: 0; border-radius: 12px; padding: 13px 0; font: 800 18px/1 var(--num); background: rgba(255,255,255,.95); color: var(--blue-d); }
.steps button:active { background: var(--lime); }
.chips { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-bottom: 18px; }
.chips button { border: 1.5px solid rgba(255,255,255,.35); background: transparent; color: #fff; border-radius: 10px; padding: 9px 0; font: 700 16px/1 var(--num); }
.chips button.on { background: var(--pink); border-color: var(--pink); }

.done { text-align: center; padding: 18px 0 4px; }
.done-ic { width: 64px; height: 64px; margin: 0 auto 6px; border-radius: 50%; background: var(--lime); position: relative; }
.done-ic::after { content: ""; position: absolute; left: 22px; top: 14px; width: 16px; height: 28px; border: solid #10207a; border-width: 0 6px 6px 0; transform: rotate(45deg); }
.done p { margin: 6px 0; font-size: 16px; }
.done-num { font: 800 64px/1.1 var(--num); font-style: italic; text-shadow: 4px 4px 0 var(--pink); }
.done-num small { font-size: 20px; margin-left: 4px; }
.done-to { font-size: 22px; font-weight: 800; color: var(--lime); margin: 6px 0; }

.quota { text-align: center; margin: 0 0 12px; font-size: 14px; }
.quota b { font: 800 22px var(--num); color: var(--lime); }
.vs-row { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; }
.vs { font: 900 italic 28px/1 var(--num); color: var(--lime); text-shadow: 3px 3px 0 var(--pink); flex: none; }
.vc { flex: 1; text-align: center; border: 3px solid rgba(255,255,255,.25); border-radius: 16px; padding: 10px 6px 12px; transition: .15s; position: relative; background: rgba(255,255,255,.06); }
.vc .poster { width: 100%; height: auto; aspect-ratio: 2 / 3; margin: 0 auto 8px; }
.vc .poster.ph { height: 160px; }
.vc-no { font: 800 italic 16px var(--num); color: var(--lime); }
.vc-name { font-size: 20px; font-weight: 900; }
.vc-check { display: none; margin-top: 6px; font-size: 13px; font-weight: 800; background: var(--lime); color: #10207a; border-radius: 10px; padding: 2px 0; }
.vc.on { border-color: var(--lime); background: rgba(209,255,64,.16); transform: scale(1.02); box-shadow: 0 0 0 4px rgba(209,255,64,.25); }
.vc.on .vc-check { display: block; }
.stepper { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 8px; }
.stepper button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: #fff; color: var(--blue-d); font-size: 22px; font-weight: 800; line-height: 1; }
.stepper b { font: 800 26px var(--num); min-width: 24px; }

.idle { text-align: center; padding: 32px 16px 24px; }
.idle h3 { font-size: 24px; margin: 14px 0 6px; }
.idle p { color: rgba(255,255,255,.8); margin: 0 0 18px; }
.stat { display: flex; justify-content: center; gap: 18px; font-size: 14px; }
.stat b { font: 800 20px var(--num); color: var(--lime); }
.eq { display: flex; justify-content: center; align-items: flex-end; gap: 6px; height: 48px; }
.eq i { width: 9px; height: 100%; border-radius: 4px; background: var(--lime); animation: eq 1s ease-in-out infinite; transform-origin: bottom; }
.eq i:nth-child(2) { background: var(--pink); animation-delay: .15s; }
.eq i:nth-child(3) { background: #fff; animation-delay: .3s; }
.eq i:nth-child(4) { background: var(--orange); animation-delay: .45s; }
.eq i:nth-child(5) { animation-delay: .6s; }
@keyframes eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }

.m-foot { margin-top: auto; text-align: center; padding: 18px 0 calc(14px + env(safe-area-inset-bottom)); }
.m-foot a { display: inline-block; color: rgba(255,255,255,.8); font-size: 12px; text-decoration: none; padding: 4px 14px; border-radius: 12px; background: rgba(10,24,150,.55); }

.sheet { position: fixed; inset: 0; background: rgba(4,10,60,.6); display: flex; align-items: flex-end; opacity: 0; pointer-events: none; transition: .2s; z-index: 50; }
.sheet.show { opacity: 1; pointer-events: auto; }
.sheet-box { width: 100%; background: #fff; color: #10207a; border-radius: 22px 22px 0 0; padding: 24px 18px calc(18px + env(safe-area-inset-bottom)); transform: translateY(100%); transition: .25s; }
.sheet.show .sheet-box { transform: none; }
.sheet-msg { text-align: center; font-size: 17px; margin-bottom: 20px; }
.sheet-msg small { display: block; color: #e5373a; margin-top: 6px; font-size: 13px; }
.sheet-num { font: 800 italic 48px/1.2 var(--num); color: var(--blue); margin-top: 4px; }
.sheet-btns { display: flex; gap: 10px; }
.sheet-btns .btn-sub { border-color: #cfd5ee; color: #4a5272; flex: 0 0 34%; }
.sheet-btns .btn-main { flex: 1; background: var(--blue); color: #fff; box-shadow: 0 5px 0 #0b1c8a; }

#toast { position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%) scale(.9); background: rgba(10,16,60,.92); color: #fff; padding: 12px 22px; border-radius: 12px; opacity: 0; pointer-events: none; transition: .2s; z-index: 60; max-width: 80%; text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
#toast.err { background: rgba(229,55,58,.95); }
