@font-face { font-family: "Cinzel Decorative"; src: url(fonts/CinzelDecorative-Bold.ttf); font-weight: 700; font-display: swap; }
@font-face { font-family: "Great Vibes"; src: url(fonts/GreatVibes-Regular.ttf); font-display: swap; }
@font-face { font-family: "Fredoka"; src: url(fonts/Fredoka.ttf); font-weight: 300 700; font-display: swap; }
:root {
  --pink: #ff3d9a; --baby: #ffb6d9; --lav: #c9a7ff; --vio: #8f5cff; --ink: #1a0b22; --ink2: #2a1238; --pearl: #fff6fb; --gold: #e7bf55;
  --glass: rgba(26, 11, 34, 0.72); --line: rgba(255, 182, 217, 0.35);
  --disp: "Cinzel Decorative", Georgia, serif; --body: "Fredoka", system-ui, sans-serif; --script: "Great Vibes", cursive;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--ink); color: var(--pearl); font-family: var(--body); }
#c { position: fixed; inset: 0; display: block; touch-action: none; }
#ui { position: fixed; inset: 0; pointer-events: none; z-index: 2; }
#ui > * { pointer-events: auto; }
button { font-family: inherit; cursor: pointer; }
.muted { color: #e9c9dd; opacity: 0.85; } .small { font-size: 0.85em; }
a { color: var(--baby); }
code, kbd { font-family: ui-monospace, Menlo, monospace; background: rgba(255, 255, 255, 0.1); border-radius: 6px; padding: 1px 6px; font-size: 0.85em; }
.stk { vertical-align: middle; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.25)); }
.coin { vertical-align: -3px; }

/* buttons */
.btn { border: 2px solid #2a1022; background: linear-gradient(180deg, #ff7ac0, #ff3d9a); color: #fff; font-weight: 700; font-size: 1rem; border-radius: 999px; padding: 0.6em 1.4em; box-shadow: 0 4px 0 #2a1022, 0 0 18px rgba(255, 61, 154, 0.45); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; justify-content: center; white-space: nowrap; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #2a1022; }
.btn.alt { background: linear-gradient(180deg, #d9c2ff, #8f5cff); }
.btn.ghost { background: rgba(255, 255, 255, 0.1); box-shadow: 0 3px 0 #2a1022; border-color: var(--line); }
.btn.small { font-size: 0.85rem; padding: 0.4em 1em; }
.btn[disabled] { opacity: 0.5; cursor: default; }
.link { background: none; border: 0; color: var(--baby); text-decoration: underline; font-size: inherit; padding: 0; }
.seg { display: inline-flex; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; color: var(--pearl); padding: 0.45em 1em; border-radius: 999px; font-weight: 600; }
.seg button.on { background: var(--pink); color: #fff; box-shadow: 0 0 12px rgba(255, 61, 154, 0.6); }
.seg.wide { display: flex; } .seg.wide button { flex: 1; }

/* power + boot */
.power { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; background: radial-gradient(circle at 50% 45%, #3a1648, #12061a); }
.powerbtn { background: none; border: 0; color: var(--baby); display: grid; justify-items: center; gap: 10px; font-size: 1.2rem; letter-spacing: 0.2em; text-transform: uppercase; animation: pulse 1.6s ease-in-out infinite; }
#boot { position: fixed; inset: 0; z-index: 8; display: grid; place-content: center; justify-items: center; cursor: pointer; transition: opacity 0.4s; }
#boot.out { opacity: 0; }
.bootlogo { width: min(72vw, 640px); transform: scale(0); }
.bootlogo img { width: 100%; display: block; filter: drop-shadow(0 6px 0 rgba(42, 16, 34, 0.25)); }
.bootlogo.pop { animation: squash 1s cubic-bezier(.2, .9, .3, 1.3) forwards; }
@keyframes squash { 0% { transform: scale(0.1, 0.1) translateY(80px); } 35% { transform: scale(1.25, 0.72) translateY(0); } 55% { transform: scale(0.88, 1.16) translateY(-18px); } 72% { transform: scale(1.06, 0.95); } 86% { transform: scale(0.98, 1.02); } 100% { transform: scale(1, 1); } }
.boottag { opacity: 0; transform: translateY(14px); transition: all 0.5s cubic-bezier(.2, .9, .3, 1.4); display: flex; align-items: center; gap: 10px; font-family: var(--script); font-size: clamp(2rem, 6vw, 3.4rem); color: var(--pink); margin-top: 6px; text-shadow: 0 2px 0 #fff; }
.boottag.show { opacity: 1; transform: none; }
.bootskip { position: fixed; bottom: 18px; right: 22px; color: #b07aa0; font-size: 0.8rem; letter-spacing: 0.15em; text-transform: uppercase; }
.glit { position: fixed; width: 7px; height: 7px; border-radius: 50%; pointer-events: none; animation: glit 0.9s ease-out forwards; box-shadow: 0 0 8px #fff; }
@keyframes glit { to { transform: translateY(40px) scale(0.2); opacity: 0; } }

/* title + menu */
.title { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 0 6vw; background: linear-gradient(90deg, rgba(26, 11, 34, 0.55), rgba(26, 11, 34, 0) 60%); }
.tl-wrap { position: relative; width: min(56vw, 640px); }
.tl-wrap .stk { position: absolute; left: 50%; top: -12%; transform: translateX(-50%); width: 60%; height: auto; opacity: 0.9; }
.biglogo { width: 100%; display: block; position: relative; filter: drop-shadow(0 8px 24px rgba(255, 61, 154, 0.45)); animation: float 4s ease-in-out infinite; }
.tagline { font-family: var(--script); font-size: clamp(1.8rem, 4vw, 2.8rem); color: #fff; text-shadow: 0 0 14px var(--pink); display: flex; gap: 10px; align-items: center; margin: 4px 0 26px 6px; }
.press { font-family: var(--disp); font-size: clamp(1.1rem, 2.6vw, 1.6rem); letter-spacing: 0.18em; color: #fff; background: rgba(255, 61, 154, 0.25); border: 2px solid var(--baby); border-radius: 999px; padding: 0.6em 1.6em; animation: pulse 1.3s ease-in-out infinite; text-shadow: 0 0 10px var(--pink); }
.ttfoot { position: absolute; bottom: 14px; left: 6vw; font-size: 0.8rem; opacity: 0.75; }
@keyframes pulse { 50% { opacity: 0.55; transform: scale(0.97); } }
@keyframes float { 50% { transform: translateY(-8px); } }
.topbar { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; gap: 10px; z-index: 3; background: linear-gradient(180deg, rgba(26, 11, 34, 0.75), rgba(26, 11, 34, 0)); }
.tlogo { height: 44px; cursor: pointer; filter: drop-shadow(0 2px 8px rgba(255, 61, 154, 0.5)); }
.acct { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--glass); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 0.9rem; color: var(--pearl); }
.chip.icon { padding: 4px 9px; }
.menu { position: absolute; inset: 0; display: flex; align-items: center; padding: 70px 5vw 20px; gap: 24px; background: linear-gradient(90deg, rgba(26, 11, 34, 0.8), rgba(26, 11, 34, 0.15) 55%, rgba(26, 11, 34, 0)); }
.menucol { display: flex; flex-direction: column; gap: 10px; width: min(420px, 90vw); }
.menulogo { width: 78%; margin: 0 0 6px 4px; filter: drop-shadow(0 4px 14px rgba(255, 61, 154, 0.45)); }
.mbtn { text-align: left; background: var(--glass); border: 1.5px solid var(--line); color: var(--pearl); border-radius: 18px; padding: 12px 18px; display: flex; flex-direction: column; gap: 2px; transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s; backdrop-filter: blur(6px); }
.mbtn b { font-family: var(--disp); font-size: 1.15rem; letter-spacing: 0.04em; }
.mbtn small { opacity: 0.8; }
.mbtn:hover, .mbtn:focus-visible { transform: translateX(6px); border-color: var(--pink); box-shadow: 0 0 18px rgba(255, 61, 154, 0.45); outline: none; }
.mbtn.hot { background: linear-gradient(135deg, rgba(255, 61, 154, 0.85), rgba(143, 92, 255, 0.75)); border-color: #fff; }
.mrow { display: flex; gap: 8px; } .mbtn.sm { flex: 1; align-items: center; padding: 10px; font-weight: 600; text-align: center; }
.tiercard { position: absolute; right: 4vw; bottom: 4vh; display: flex; gap: 12px; align-items: center; background: var(--glass); border: 1px solid var(--line); border-radius: 18px; padding: 12px 18px; max-width: min(380px, 90vw); }
.tiercard.guest { font-size: 0.9rem; }
.prog { height: 10px; background: rgba(255, 255, 255, 0.15); border-radius: 99px; overflow: hidden; margin: 6px 0 3px; min-width: 170px; }
.prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--lav), var(--pink)); border-radius: 99px; box-shadow: 0 0 10px var(--pink); }
.prog.big { height: 14px; }

/* select */
.select { position: absolute; inset: 0; padding: 66px 16px 12px; display: grid; grid-template-columns: minmax(0, 1fr) 320px; grid-template-rows: auto auto 1fr auto; gap: 10px 18px; background: linear-gradient(180deg, rgba(26, 11, 34, 0.25), rgba(26, 11, 34, 0.75)); }
.sh { font-family: var(--disp); font-size: clamp(1.3rem, 3vw, 2rem); margin: 0; grid-column: 1 / -1; text-shadow: 0 0 16px var(--pink); }
.sh span { display: block; font-family: var(--body); font-size: 0.9rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--baby); text-shadow: none; }
#p2mode { grid-column: 1 / -1; justify-self: start; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; align-content: start; overflow: auto; padding: 4px; grid-column: 1; }
.cell { position: relative; aspect-ratio: 0.82; border-radius: 14px; border: 2px solid rgba(255, 255, 255, 0.18); background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--c) 55%, #fff 10%), #2a1238 75%); padding: 0; overflow: hidden; transition: transform 0.1s, border-color 0.1s; }
.cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cell .nm { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 4px 4px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; background: linear-gradient(transparent, rgba(26, 11, 34, 0.95)); text-align: center; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell.cur, .cell:hover { border-color: var(--pink); transform: translateY(-2px); box-shadow: 0 0 16px var(--pink); }
.cell.head::before { content: "★"; position: absolute; top: 4px; left: 6px; color: var(--gold); font-size: 0.8rem; z-index: 1; text-shadow: 0 1px 2px #000; }
.cell.locked img { filter: grayscale(0.8) brightness(0.55); }
.cell .lk { position: absolute; top: 4px; right: 6px; }
.cell .tag { position: absolute; top: 5px; left: 5px; font-size: 0.6rem; background: var(--vio); border-radius: 6px; padding: 1px 5px; font-weight: 700; }
.info { grid-column: 2; grid-row: 3; align-self: end; background: var(--glass); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; font-size: 0.92rem; }
.ititle b { font-family: var(--disp); font-size: 1.3rem; display: block; }
.ititle span { color: var(--baby); font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; }
.info p { margin: 8px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; } .chips span { background: rgba(255, 255, 255, 0.1); border-radius: 99px; padding: 2px 9px; font-size: 0.78rem; }
.lockmsg { margin-top: 8px; color: #ffd76a; font-size: 0.85rem; }
.selfoot { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 10px; align-items: center; flex-wrap: wrap; }
.selfoot .seg { margin-right: auto; }

/* vs + ladder */
.vs { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; justify-items: center; background: radial-gradient(circle, #5a1f63, #12061a 70%); padding: 20px; }
.vs img { width: min(32vw, 300px); border-radius: 24px; border: 3px solid var(--baby); box-shadow: 0 0 30px var(--pink); background: #2a1238; }
.vs b { display: block; text-align: center; font-family: var(--disp); font-size: clamp(1.1rem, 3vw, 2rem); margin-top: 8px; }
.vsl { animation: slideL 0.5s cubic-bezier(.2, .9, .3, 1.2); } .vsr { animation: slideR 0.5s cubic-bezier(.2, .9, .3, 1.2); }
.vsx { font-family: var(--disp); font-size: clamp(2.5rem, 9vw, 6rem); color: #fff; text-shadow: 0 0 30px var(--pink), 0 4px 0 var(--vio); animation: squash 0.7s; }
.vsinfo { grid-column: 1 / -1; letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.9rem; }
.ladder { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.rung { display: flex; flex-direction: column; align-items: center; font-size: 0.65rem; opacity: 0.6; }
.rung img { width: 46px; height: 54px; border-width: 2px; border-radius: 10px; box-shadow: none; }
.rung.now { opacity: 1; } .rung.now img { border-color: var(--pink); box-shadow: 0 0 12px var(--pink); } .rung.done img { filter: grayscale(1); }
@keyframes slideL { from { transform: translateX(-60vw); } } @keyframes slideR { from { transform: translateX(60vw); } }

/* HUD */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 3; font-family: var(--body); }
.hp { position: absolute; top: 12px; width: calc(50% - 62px); display: flex; gap: 8px; align-items: flex-start; }
.hp.side0 { left: 12px; } .hp.side1 { right: 12px; flex-direction: row-reverse; }
.por { width: 54px; height: 54px; border-radius: 14px; border: 2px solid var(--baby); background: #2a1238 center/cover; flex: none; box-shadow: 0 0 12px rgba(255, 61, 154, 0.5); }
.barwrap { flex: 1; min-width: 0; }
.bar { position: relative; height: 22px; border: 2px solid #fff; border-radius: 6px 14px 6px 14px; background: rgba(26, 11, 34, 0.85); overflow: hidden; box-shadow: 0 0 14px rgba(255, 61, 154, 0.55), inset 0 0 6px #000; }
.side1 .bar { border-radius: 14px 6px 14px 6px; transform: scaleX(-1); }
.bar .fill, .bar .lag { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; }
.bar .lag { background: #fff1a8; transition: width 0.05s linear; }
.bar .fill { background: linear-gradient(180deg, #ffc6e4, #ff3d9a 55%, #c41e74); transition: width 0.08s; }
.bar .fill::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 18px, rgba(255, 255, 255, 0.25) 18px 20px); }
.nm { display: flex; justify-content: space-between; align-items: center; margin-top: 3px; font-weight: 700; letter-spacing: 0.12em; font-size: 0.85rem; text-shadow: 0 1px 3px #000; }
.side1 .nm { flex-direction: row-reverse; }
.wins { display: flex; gap: 4px; } .wins i { width: 13px; height: 13px; display: block; background: rgba(255, 255, 255, 0.2); clip-path: path("M6.5 12C2 8.5 0 6 0 3.8A3.3 3.3 0 0 1 6.5 2.3 3.3 3.3 0 0 1 13 3.8C13 6 11 8.5 6.5 12z"); }
.wins i.on { background: var(--pink); filter: drop-shadow(0 0 4px var(--pink)); }
.timer { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 76px; height: 62px; display: grid; place-content: center; font-family: var(--disp); font-size: 2rem; color: #fff; background: radial-gradient(circle, #5a1f63, #1a0b22); border: 2px solid var(--baby); border-radius: 0 0 22px 22px; text-shadow: 0 0 10px var(--pink); }
.meter { position: absolute; bottom: 14px; display: flex; align-items: center; gap: 8px; }
.meter.side0 { left: 14px; } .meter.side1 { right: 14px; }
.meter b { width: 32px; height: 32px; display: grid; place-content: center; border-radius: 50%; background: var(--vio); border: 2px solid #fff; font-family: var(--disp); box-shadow: 0 0 12px var(--vio); }
.segs { display: flex; gap: 4px; }
.segs i { width: clamp(46px, 9vw, 86px); height: 14px; border: 2px solid #fff; border-radius: 4px; background: rgba(26, 11, 34, 0.8); position: relative; overflow: hidden; transform: skewX(-18deg); }
.segs i::after { content: ""; position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, #7cc8ff, #c9a7ff, #ff3d9a); box-shadow: 0 0 10px #c9a7ff; }
.side1 .segs { flex-direction: row-reverse; } .side1 .segs i { transform: skewX(18deg); } .side1 .segs i::after { transform-origin: right; }
.combo { position: absolute; top: 120px; opacity: 0; font-family: var(--disp); text-shadow: 0 0 12px var(--pink), 0 3px 0 #2a1022; max-width: 42vw; }
.combo.side0 { left: 22px; } .combo.side1 { right: 22px; text-align: right; }
.combo b { font-size: clamp(1.3rem, 3.4vw, 2.2rem); color: #fff; display: block; }
.combo b.ctr { color: #fff1a8; }
.combo span { font-family: var(--body); font-weight: 700; font-size: 1.1rem; color: var(--baby); }
.combo em { display: block; font-style: normal; font-family: var(--script); font-size: clamp(1.3rem, 3vw, 2rem); color: #fff; text-shadow: 0 0 10px var(--vio); }
.combo.pop { animation: combo 1.3s ease-out forwards; }
@keyframes combo { 0% { opacity: 0; transform: scale(1.6); } 12% { opacity: 1; transform: scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: translateY(-14px); } }
.announce { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%) scale(0.4); opacity: 0; font-family: var(--disp); font-size: clamp(2.4rem, 9vw, 6.2rem); white-space: nowrap; color: #fff; text-shadow: 0 0 24px var(--pink), 0 6px 0 var(--vio), 0 10px 22px #000; text-align: center; letter-spacing: 0.04em; }
.announce small { display: block; font-size: 0.32em; letter-spacing: 0.3em; color: var(--baby); }
.announce.show { animation: ann 1.1s cubic-bezier(.2, .9, .3, 1.3) forwards; }
.announce.fight { color: #fff1a8; }
.announce.super, .announce.finale { font-size: clamp(1.8rem, 6vw, 4rem); }
@keyframes ann { 0% { opacity: 0; transform: translate(-50%, -50%) scale(2.2); } 18% { opacity: 1; transform: translate(-50%, -50%) scale(0.95); } 28% { transform: translate(-50%, -50%) scale(1.03); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1); } }
.prompt { position: absolute; bottom: 22%; left: 50%; transform: translateX(-50%); background: var(--glass); border: 2px solid var(--pink); border-radius: 999px; padding: 10px 22px; font-size: 1.1rem; opacity: 0; transition: opacity 0.2s; white-space: nowrap; }
.prompt.show { opacity: 1; animation: pulse 0.9s infinite; }
.flash { position: absolute; inset: 0; opacity: 0; background: radial-gradient(circle, rgba(255, 255, 255, 0.9), rgba(255, 61, 154, 0.5) 50%, rgba(143, 92, 255, 0) 80%); }
.flash.show { animation: flash 0.6s ease-out; } .flash.show.lvl3 { animation-duration: 1s; }
@keyframes flash { 0% { opacity: 0.95; } 100% { opacity: 0; } }
.banner { position: absolute; top: 30%; left: 0; right: 0; text-align: center; opacity: 0; transform: scale(0.5); }
.banner.show { animation: banner 0.8s cubic-bezier(.2, .9, .3, 1.4) forwards; }
.banner .big { font-family: var(--disp); font-size: clamp(2.6rem, 10vw, 7rem); color: #fff; text-shadow: 0 0 30px var(--pink), 0 6px 0 var(--vio), 0 12px 30px #000; line-height: 1; }
.banner .sub { font-family: var(--script); font-size: clamp(1.8rem, 5vw, 3.4rem); color: var(--baby); text-shadow: 0 0 12px #000; margin-top: 4px; }
@keyframes banner { to { opacity: 1; transform: scale(1); } }
.pausebtn { pointer-events: auto; position: absolute; top: 78px; left: 50%; transform: translateX(-50%); background: var(--glass); color: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; font-weight: 700; }

/* touch */
#touch { position: fixed; inset: auto 0 0 0; height: 46vh; z-index: 4; pointer-events: none; }
.stick { pointer-events: auto; position: absolute; left: 4vw; bottom: 9vh; width: 138px; height: 138px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 182, 217, 0.22), rgba(26, 11, 34, 0.45)); border: 2px solid rgba(255, 182, 217, 0.6); touch-action: none; }
.knob { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #ff7ac0); box-shadow: 0 0 14px var(--pink); }
.tbtns { pointer-events: auto; position: absolute; right: 3vw; bottom: 8vh; display: grid; grid-template-columns: repeat(3, 62px); gap: 9px; touch-action: none; }
.tbtns button { width: 62px; height: 62px; border-radius: 50%; border: 2px solid #fff; background: rgba(255, 61, 154, 0.55); color: #fff; font-weight: 700; font-size: 0.95rem; box-shadow: 0 0 12px rgba(255, 61, 154, 0.5); touch-action: none; user-select: none; -webkit-user-select: none; }
.tbtns .sp { background: rgba(143, 92, 255, 0.7); } .tbtns .sup { background: linear-gradient(135deg, #7cc8ff, #c9a7ff, #ff3d9a); font-size: 0.7rem; }
.tbtns .blk { grid-column: 1 / -1; width: auto; height: 44px; border-radius: 999px; background: rgba(26, 11, 34, 0.7); }
.tbtns button.on { transform: scale(0.92); background: #fff; color: var(--pink); }
@media (pointer: coarse) { body[data-screen="fight"] .meter { bottom: auto; top: 84px; } body[data-screen="fight"] .combo { top: 130px; } }

/* results */
.results { position: absolute; inset: 0; display: grid; place-content: center; background: radial-gradient(circle, rgba(26, 11, 34, 0.45), rgba(26, 11, 34, 0.85)); padding: 16px; }
.rcard { background: var(--glass); border: 2px solid var(--baby); border-radius: 26px; padding: 20px 24px; width: min(560px, 92vw); text-align: center; box-shadow: 0 0 40px rgba(255, 61, 154, 0.4); backdrop-filter: blur(8px); }
.rcard h1 { font-family: var(--disp); margin: 0 0 8px; font-size: clamp(1.6rem, 5vw, 2.6rem); text-shadow: 0 0 18px var(--pink); }
.rstats { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; font-size: 0.85rem; } .rstats span { background: rgba(255, 255, 255, 0.1); border-radius: 99px; padding: 3px 10px; }
.award { display: flex; gap: 22px; justify-content: center; font-size: 1.3rem; margin: 14px 0 8px; }
.tierline { display: flex; gap: 12px; align-items: center; justify-content: center; text-align: left; }
.tierup { margin-top: 10px; font-family: var(--disp); font-size: 1.3rem; color: #fff1a8; text-shadow: 0 0 14px var(--gold); animation: squash 0.8s; }
.rbtns { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }

/* studio */
.studio { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr) min(470px, 46vw); grid-template-rows: 1fr auto; padding: 66px 14px 12px; gap: 10px; }
.stage3d { position: relative; cursor: grab; touch-action: none; }
.stage3d .hint { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); font-size: 0.75rem; opacity: 0.7; letter-spacing: 0.15em; text-transform: uppercase; }
.panel { background: var(--glass); border: 1px solid var(--line); border-radius: 22px; display: flex; flex-direction: column; min-height: 0; overflow: hidden; backdrop-filter: blur(8px); }
.tabs { display: flex; gap: 4px; padding: 8px; overflow-x: auto; flex: none; border-bottom: 1px solid var(--line); }
.tabs button { border: 1px solid transparent; background: rgba(255, 255, 255, 0.07); color: var(--pearl); border-radius: 999px; padding: 6px 12px; font-weight: 600; white-space: nowrap; }
.tabs button.on { background: var(--pink); border-color: #fff; }
.pbody { overflow: auto; padding: 4px 12px 12px; flex: 1; min-height: 0; }
.pbody h4 { margin: 12px 0 6px; font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--baby); }
.pbody h4 small { opacity: 0.6; }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.it { display: flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, 0.07); border: 1.5px solid transparent; color: var(--pearl); border-radius: 12px; padding: 8px 9px; font-size: 0.82rem; text-align: left; min-height: 40px; }
.it span { flex: 1; line-height: 1.15; }
.it em { font-style: normal; font-size: 0.72rem; color: #ffd76a; display: flex; align-items: center; gap: 2px; }
.it.on { border-color: var(--pink); background: rgba(255, 61, 154, 0.25); box-shadow: 0 0 10px rgba(255, 61, 154, 0.4); }
.it.prem { background: rgba(231, 191, 85, 0.12); }
.dot { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid #fff; flex: none; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.sw { width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.4); background: var(--c); }
.sw.on { border-color: #fff; box-shadow: 0 0 0 3px var(--pink); }
.fld { display: block; font-size: 0.85rem; margin-top: 8px; } .fld input, .auth input { display: block; width: 100%; margin-top: 4px; padding: 9px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: rgba(0, 0, 0, 0.35); color: #fff; font: inherit; }
.pfoot { border-top: 1px solid var(--line); padding: 8px 12px; display: flex; flex-direction: column; gap: 8px; flex: none; }
.unl { font-size: 0.8rem; color: #ffd76a; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.slots { display: flex; gap: 4px; overflow-x: auto; }
.slot { flex: 1; min-width: 70px; font-size: 0.72rem; background: rgba(255, 255, 255, 0.07); border: 1px dashed var(--line); color: var(--pearl); border-radius: 10px; padding: 6px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot.on { border-style: solid; border-color: var(--pink); }
.pbtns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.studiofoot { grid-column: 1 / -1; display: flex; gap: 10px; justify-content: flex-end; }

/* pages */
.page { position: absolute; inset: 0; padding: 70px max(16px, 5vw) 20px; overflow: auto; background: rgba(26, 11, 34, 0.78); }
.page h3 { font-family: var(--disp); margin: 22px 0 8px; } .page h3 small { font-family: var(--body); font-size: 0.75rem; opacity: 0.7; }
.pagefoot { display: flex; justify-content: flex-end; align-items: center; gap: 14px; margin-top: 20px; }
.packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin: 12px 0; }
.pack { background: linear-gradient(160deg, rgba(255, 61, 154, 0.25), rgba(143, 92, 255, 0.25)); border: 1.5px solid var(--line); border-radius: 20px; padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.pack b { font-family: var(--disp); }
.legal { font-size: 0.8rem; opacity: 0.85; }
.orders { display: grid; gap: 6px; } .ord { display: flex; gap: 12px; align-items: center; background: rgba(255, 255, 255, 0.06); border-radius: 12px; padding: 8px 12px; font-size: 0.9rem; flex-wrap: wrap; }
.st { text-transform: uppercase; font-size: 0.75rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: rgba(255, 215, 106, 0.2); color: #ffd76a; } .st.paid { background: rgba(159, 240, 200, 0.2); color: #9ff0c8; } .st.expired { opacity: 0.6; }
.shopitems { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.sit { background: rgba(255, 255, 255, 0.07); border-radius: 16px; padding: 10px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.sit img { width: 100%; border-radius: 12px; background: #2a1238; }
.sit.own { opacity: 0.65; }
.boost { display: flex; gap: 18px; align-items: center; background: rgba(255, 255, 255, 0.06); border-radius: 20px; padding: 18px; max-width: 620px; }
.prof { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.prof h2 { font-family: var(--disp); margin: 0; }
.pstats { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; } .pstats span { background: rgba(255, 255, 255, 0.08); border-radius: 99px; padding: 3px 10px; font-size: 0.85rem; }
.tiers { display: flex; gap: 8px; flex-wrap: wrap; } .tr { display: flex; flex-direction: column; align-items: center; opacity: 0.45; font-size: 0.75rem; width: 80px; text-align: center; } .tr.got { opacity: 1; }
.lb { padding-left: 22px; } .lb li { display: flex; gap: 14px; padding: 4px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.08); } .lb li b { min-width: 120px; }
.moves .mcols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.moves ul { padding-left: 18px; margin: 4px 0; } .moves li { margin: 4px 0; }
.moves h4 { color: var(--baby); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.85rem; margin: 14px 0 4px; }
.moves h5 { margin: 8px 0 2px; opacity: 0.8; }

/* modal + toast */
#modal { position: fixed; inset: 0; z-index: 10; background: rgba(10, 3, 14, 0.6); display: grid; place-items: center; padding: 14px; backdrop-filter: blur(4px); }
#modal[hidden] { display: none; }
.sheet { position: relative; background: linear-gradient(170deg, #3a1648, #1a0b22); border: 2px solid var(--baby); border-radius: 24px; padding: 22px; width: min(560px, 94vw); max-height: 92vh; overflow: auto; box-shadow: 0 0 40px rgba(255, 61, 154, 0.4); }
.sheet.narrow { width: min(400px, 94vw); } .sheet.wide { width: min(920px, 96vw); }
.sheet h2 { font-family: var(--disp); margin: 4px 0 10px; }
.x { position: absolute; top: 8px; right: 12px; background: none; border: 0; color: #fff; font-size: 1.8rem; line-height: 1; }
.auth { text-align: center; } .auth form { text-align: left; display: grid; gap: 10px; margin-top: 10px; } .auth label { font-size: 0.85rem; }
.err { color: #ff9ab8; min-height: 1em; font-size: 0.85rem; }
.pausebtns { display: grid; gap: 10px; }
.arenas { display: grid; gap: 8px; } .arena { text-align: left; background: rgba(255, 255, 255, 0.07); border: 1.5px solid var(--line); color: #fff; border-radius: 14px; padding: 12px 14px; display: grid; } .arena:hover { border-color: var(--pink); } .arena b { font-family: var(--disp); }
.pay { text-align: center; } .pay .amt { font-size: 1.1rem; margin: 4px 0 10px; }
.qr { width: 220px; height: 220px; margin: 0 auto; background: #fff; border-radius: 16px; padding: 6px; } .qr svg { width: 100%; height: 100%; }
.paybtns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 12px 0; }
.status { display: flex; gap: 8px; align-items: center; justify-content: center; font-weight: 600; }
.spin { width: 16px; height: 16px; border: 3px solid var(--baby); border-top-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } }
.hint { font-size: 0.85rem; opacity: 0.85; }
#toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 30px); opacity: 0; z-index: 12; background: var(--glass); border: 1.5px solid var(--pink); border-radius: 999px; padding: 10px 18px; transition: all 0.25s; pointer-events: none; max-width: 92vw; text-align: center; backdrop-filter: blur(6px); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ending */
#ending { position: fixed; inset: 0; z-index: 6; pointer-events: none; overflow: hidden; }
#ending[hidden] { display: none; }
.endtitle { position: absolute; top: 6vh; left: 0; right: 0; text-align: center; transition: opacity 0.8s, transform 0.8s; padding: 0 12px; }
.endtitle img { width: min(46vw, 360px); filter: drop-shadow(0 4px 16px rgba(255, 61, 154, 0.5)); }
.endtitle h1 { font-family: var(--disp); font-size: clamp(1.2rem, 3.6vw, 2.4rem); margin: 4px 0; color: #fff; text-shadow: 0 0 16px var(--pink), 0 3px 0 var(--vio); }
.endtitle p { font-family: var(--script); font-size: clamp(1.4rem, 3vw, 2rem); margin: 0; text-shadow: 0 0 8px #000; }
#ending.roll .endtitle { opacity: 0; transform: translateY(-30px); }
.credits { position: absolute; right: 4vw; top: 0; bottom: 0; width: min(420px, 60vw); overflow: hidden; opacity: 0; transition: opacity 1s; mask-image: linear-gradient(transparent, #000 15%, #000 85%, transparent); -webkit-mask-image: linear-gradient(transparent, #000 15%, #000 85%, transparent); }
#ending.roll .credits { opacity: 1; }
.roll { text-align: center; transform: translateY(100vh); background: rgba(26, 11, 34, 0.55); border-radius: 24px; padding: 20px 16px; }
#ending.roll .roll { animation: credits 36s linear forwards; }
@keyframes credits { to { transform: translateY(-100%); } }
.roll h2 { font-family: var(--disp); font-size: 2rem; margin: 10px 0 0; text-shadow: 0 0 14px var(--pink); }
.roll h3 { font-family: var(--body); text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.8rem; color: var(--baby); margin: 26px 0 4px; }
.roll p { margin: 2px 0; } .roll .sub { font-family: var(--script); font-size: 1.6rem; }
.roll ul { list-style: none; padding: 0; margin: 0; } .roll li { margin: 6px 0; display: flex; flex-direction: column; } .roll li span { font-size: 0.8rem; opacity: 0.8; }
.cs { margin: 16px 0; display: flex; justify-content: center; gap: 12px; }
.stickers span { position: absolute; bottom: -80px; animation: rise linear infinite; }
@keyframes rise { to { transform: translateY(-120vh) rotate(360deg); } }
.endbtn { position: absolute; bottom: 4vh; left: 50%; transform: translateX(-50%); pointer-events: auto; }

/* responsive */
@media (max-width: 860px) {
  .select { grid-template-columns: 1fr; grid-template-rows: auto auto minmax(0, 1fr) auto auto; padding-top: 62px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); grid-row: 3; }
  .info { grid-column: 1; grid-row: 4; font-size: 0.82rem; padding: 10px 12px; } .info p { display: none; }
  .studio { grid-template-columns: 1fr; grid-template-rows: 38vh minmax(0, 1fr) auto; padding-top: 62px; }
  .menu { align-items: flex-end; background: linear-gradient(0deg, rgba(26, 11, 34, 0.9), rgba(26, 11, 34, 0.2) 70%); padding-bottom: 14px; }
  .menulogo { display: none; }
  .tiercard { position: static; } .menu { flex-direction: column; justify-content: flex-end; }
  .title { align-items: center; text-align: center; background: linear-gradient(0deg, rgba(26, 11, 34, 0.75), rgba(26, 11, 34, 0) 70%); justify-content: flex-end; padding-bottom: 12vh; }
  .tl-wrap { width: 86vw; } .tagline { justify-content: center; } .ttfoot { left: 0; right: 0; text-align: center; }
  .hp { width: calc(50% - 46px); } .por { width: 36px; height: 36px; border-radius: 10px; } .bar { height: 16px; } .nm { font-size: 0.68rem; letter-spacing: 0.05em; }
  .timer { width: 60px; height: 48px; font-size: 1.5rem; }
  .tlogo { height: 34px; } .chip { font-size: 0.78rem; padding: 3px 9px; } .chip.tier b { display: none; } .chip.user { display: none; }
  .credits { width: 88vw; right: 6vw; }
  .vs { grid-template-columns: 1fr; gap: 6px; } .vs img { width: 34vw; } .vsx { font-size: 2.4rem; }
}
@media (max-height: 500px) { .tbtns { grid-template-columns: repeat(3, 52px); } .tbtns button { width: 52px; height: 52px; } .stick { width: 120px; height: 120px; } .combo { top: 90px; } }
