:root {
  --bg: #0b1033;
  --ink: #f4f1ff;
  --dim: #b9b3dd;
  --gold: #ffd76a;
  --gold2: #ff9f43;
  --accent: #8f7bff;
  --panel: rgba(22, 18, 58, .72);
  --line: rgba(255, 255, 255, .14);
  --font: "Fredoka", ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink); font-family: var(--font); user-select: none; -webkit-user-select: none; touch-action: manipulation; }
canvas#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
[hidden] { display: none !important; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
a { color: var(--gold); }

/* ---------- Logo ---------- */
.logo { margin: 0; font-weight: 700; font-size: clamp(40px, 12vw, 64px); letter-spacing: .06em; line-height: 1;
  background: linear-gradient(180deg, #fffaf0 0%, #ffe08a 45%, #ff9f43 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(255, 200, 100, .45)) drop-shadow(0 3px 0 rgba(90, 40, 120, .6)); position: relative; display: inline-flex; align-items: center; gap: .12em; }
.logo-star { width: .62em; height: .62em; display: inline-block; background: linear-gradient(180deg, #fff, #ffd76a);
  clip-path: polygon(50% 0, 61% 36%, 100% 38%, 69% 60%, 80% 100%, 50% 76%, 20% 100%, 31% 60%, 0 38%, 39% 36%); animation: twinkle 2.6s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.15) rotate(12deg); } }
.tagline { margin: 6px 0 0; color: var(--dim); font-size: 16px; letter-spacing: .02em; }

/* ---------- Loading + studio mark (B2) ---------- */
.pp-loading { position: fixed; inset: 0; z-index: 50; --scene-bg: #0b1033; background: radial-gradient(120% 80% at 50% 30%, #2a1650 0%, #0b1033 70%); display: grid; place-items: center; transition: opacity .45s ease; }
.pp-loading.out { opacity: 0; pointer-events: none; }
.load-center { display: grid; gap: 22px; justify-items: center; margin-bottom: 18vh; }
.load-bar { width: 180px; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.load-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ffd76a, #ff9f43); border-radius: 6px; transition: width .3s ease; }
.pp-fade { position: absolute; inset: auto 0 0 0; height: 30%; background: linear-gradient(to bottom, transparent, rgba(11, 16, 51, .69)); }
.pp-studio { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(3.5vh + var(--safe-b)); width: clamp(140px, 34vmin, 280px); height: auto; opacity: .92; animation: pp-in .25s ease-out both; }
@keyframes pp-in { from { opacity: 0; } }

/* ---------- Screens ---------- */
.screen { position: fixed; inset: 0; z-index: 10; display: flex; flex-direction: column; animation: fadeUp .35s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } }
.topbar { display: flex; justify-content: space-between; padding: calc(14px + var(--safe-t)) 16px 0; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px 7px 10px; border-radius: 999px; background: rgba(10, 8, 30, .55); border: 1px solid var(--line); font-weight: 600; font-size: 15px; backdrop-filter: blur(8px); }
.chip svg { width: 18px; height: 18px; color: #ff9f6b; fill: rgba(255, 140, 90, .35); }
.glow-dot { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff 0 20%, #ffd76a 45%, #ff9f43 100%); box-shadow: 0 0 10px #ffc95a; display: inline-block; }
.home-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 16px 96px; gap: 6px; }
.lumi { width: 116px; height: 116px; animation: bob 3.2s ease-in-out infinite; margin-bottom: -6px; }
.lumi svg { width: 100%; height: 100%; stroke: none; }
.lumi .wing { transform-origin: 60px 56px; animation: flap .5s ease-in-out infinite alternate; }
.lumi .wing.r { animation-delay: .05s; }
@keyframes flap { to { transform: scaleY(.55); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.world-card { margin-top: 22px; width: min(340px, 100%); padding: 14px 16px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(10px); text-align: left; }
.wc-top { display: flex; justify-content: space-between; font-weight: 600; font-size: 16px; }
.wc-top span:last-child { color: var(--gold); }
.wc-bar { height: 8px; border-radius: 8px; background: rgba(255, 255, 255, .1); margin: 10px 0 8px; overflow: hidden; }
.wc-bar i { display: block; height: 100%; width: 0; border-radius: 8px; background: linear-gradient(90deg, #8f7bff, #ffd76a); box-shadow: 0 0 12px rgba(255, 215, 106, .6); transition: width .8s cubic-bezier(.2, .9, .2, 1); }
.wc-goal { color: var(--dim); font-size: 13.5px; }

.btn { border-radius: 18px; padding: 14px 26px; font-weight: 700; font-size: 18px; transition: transform .12s ease, filter .2s; }
.btn:active { transform: scale(.95); }
.btn.primary { color: #3a1a0a; background: linear-gradient(180deg, #fff1b8 0%, #ffd76a 40%, #ff9f43 100%); box-shadow: 0 6px 0 #b55a1c, 0 10px 30px rgba(255, 170, 70, .45), inset 0 2px 0 rgba(255, 255, 255, .8); }
.btn.primary:active { transform: translateY(4px) scale(.98); box-shadow: 0 2px 0 #b55a1c, 0 6px 18px rgba(255, 170, 70, .4), inset 0 2px 0 rgba(255, 255, 255, .8); }
.btn.ghost { background: rgba(255, 255, 255, .08); border: 1px solid var(--line); }
.btn.wide { width: 100%; }
.play { margin-top: 18px; width: min(340px, 100%); display: flex; flex-direction: column; align-items: center; padding: 16px 20px 14px; font-size: 26px; letter-spacing: .04em; animation: breathe 2.4s ease-in-out infinite; }
.play small { font-size: 14px; font-weight: 600; opacity: .75; letter-spacing: 0; }
@keyframes breathe { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.08); } }
.home-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: min(340px, 100%); margin-top: 16px; }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px 10px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--ink); backdrop-filter: blur(10px); transition: transform .12s; }
.tile:active { transform: scale(.94); }
.tile svg { width: 26px; height: 26px; color: var(--gold); }
.tile em { position: absolute; top: -7px; right: -4px; font-style: normal; font-size: 11px; padding: 2px 7px; border-radius: 99px; background: #ff5e8a; color: #fff; box-shadow: 0 0 10px rgba(255, 94, 138, .7); }
.tile em.done { background: #2a9d6a; box-shadow: none; }
/* B4: main menu mark, 104 px, bottom-centre, 0.55, linked to Support */
.pp-menu-mark { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(16px + var(--safe-b)); opacity: .55; line-height: 0; }
.pp-menu-mark img { width: 104px; height: auto; }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; z-index: 5; pointer-events: none; }
#hud > * { pointer-events: auto; }
.hud-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: calc(10px + var(--safe-t)) 14px 0; }
.hud-title { text-align: center; line-height: 1.1; text-shadow: 0 2px 10px rgba(0, 0, 0, .5); }
.hud-title small { display: block; color: var(--dim); font-size: 13px; font-weight: 500; }
.hud-title b { font-size: 22px; font-weight: 700; }
.icon-btn { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; background: rgba(10, 8, 30, .5); border: 1px solid var(--line); backdrop-filter: blur(8px); transition: transform .12s; }
.icon-btn:active { transform: scale(.9); }
.icon-btn.ghost { background: rgba(255, 255, 255, .08); }
.toolbar { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(12px + var(--safe-b)); display: flex; gap: 12px; padding: 8px; border-radius: 24px; background: rgba(10, 8, 30, .55); border: 1px solid var(--line); backdrop-filter: blur(12px); }
.tool { position: relative; width: 66px; height: 62px; border-radius: 17px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 12px; font-weight: 600; color: var(--ink); background: rgba(255, 255, 255, .06); transition: transform .12s, background .2s, opacity .2s; }
.tool svg { color: var(--gold); width: 24px; height: 24px; }
.tool:active { transform: scale(.9); }
.tool:disabled { opacity: .38; }
.tool.pulse { animation: toolPulse .9s ease-in-out 3; }
@keyframes toolPulse { 50% { background: rgba(255, 215, 106, .35); transform: scale(1.08); } }
.badge { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; font-style: normal; font-size: 12px; line-height: 20px; background: linear-gradient(180deg, #ffd76a, #ff9f43); color: #3a1a0a; font-weight: 700; }
.coach { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(96px + var(--safe-b)); max-width: min(92vw, 420px); padding: 10px 16px; border-radius: 14px; background: rgba(20, 14, 50, .82); border: 1px solid rgba(255, 215, 106, .35); color: #fff6dc; font-size: 15.5px; text-align: center; animation: fadeUp .3s ease both; pointer-events: none !important; }

/* ---------- Win ---------- */
.overlay { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px; background: radial-gradient(80% 60% at 50% 45%, rgba(40, 20, 80, .55), rgba(5, 4, 20, .78)); animation: fadeIn .3s ease both; }
@keyframes fadeIn { from { opacity: 0; } }
.card { width: min(360px, 100%); border-radius: 26px; padding: 24px 22px 20px; text-align: center; background: linear-gradient(180deg, rgba(48, 34, 110, .95), rgba(22, 16, 60, .95)); border: 1px solid rgba(255, 215, 106, .3); box-shadow: 0 30px 80px rgba(0, 0, 0, .5), 0 0 60px rgba(143, 123, 255, .25); animation: pop .45s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes pop { from { transform: scale(.7); opacity: 0; } }
.win-kicker { color: var(--dim); font-size: 14px; }
.win-card h2 { margin: 4px 0 8px; font-size: 34px; background: linear-gradient(180deg, #fff, #ffd76a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stars3 { display: flex; justify-content: center; gap: 10px; margin: 6px 0 10px; }
.stars3 i { width: 54px; height: 54px; background: rgba(255, 255, 255, .14); clip-path: polygon(50% 0, 61% 36%, 100% 38%, 69% 60%, 80% 100%, 50% 76%, 20% 100%, 31% 60%, 0 38%, 39% 36%); }
.stars3 i:nth-child(2) { width: 66px; height: 66px; margin-top: -10px; }
.stars3 i.on { background: linear-gradient(180deg, #fffbe0, #ffd76a 50%, #ff9f43); animation: starIn .5s cubic-bezier(.2, 1.6, .4, 1) both; filter: drop-shadow(0 0 12px #ffcc55); }
@keyframes starIn { from { transform: scale(0) rotate(-60deg); } }
.win-stats { color: var(--dim); font-size: 15px; }
.win-reward { display: inline-flex; align-items: center; gap: 8px; margin: 12px 0 4px; padding: 8px 16px; border-radius: 99px; background: rgba(255, 215, 106, .12); font-weight: 700; font-size: 18px; color: var(--gold); }
.win-extra { min-height: 20px; color: #bff7e0; font-size: 14px; margin: 4px 0 8px; }
.win-actions { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 8px; }
.win-actions .btn { flex: 1; max-width: 170px; }

/* ---------- Sheets ---------- */
.sheet { background: linear-gradient(180deg, rgba(14, 10, 40, .9), rgba(8, 6, 26, .96)); backdrop-filter: blur(6px); z-index: 15; }
.sheet-head { display: flex; align-items: center; gap: 12px; padding: calc(12px + var(--safe-t)) 16px 10px; }
.sheet-head h2 { flex: 1; margin: 0; text-align: center; font-size: 22px; }
.sheet-head .spacer { width: 46px; }
.sheet-body { flex: 1; overflow-y: auto; padding: 6px 16px calc(24px + var(--safe-b)); -webkit-overflow-scrolling: touch; }
.world-row { width: 100%; display: flex; gap: 14px; align-items: center; padding: 12px; margin-bottom: 12px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); text-align: left; }
.world-row canvas { width: 96px; height: 72px; border-radius: 14px; flex: none; }
.world-row .wr-info { flex: 1; min-width: 0; }
.world-row b { display: block; font-size: 18px; }
.world-row small { color: var(--dim); font-size: 13px; display: block; margin-top: 2px; }
.world-row .wr-new { display: inline-block; margin-top: 6px; font-size: 12px; padding: 2px 8px; border-radius: 8px; background: rgba(143, 123, 255, .25); color: #d9d2ff; }
.world-row.locked { opacity: .45; }
.level-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; max-width: 420px; margin: 0 auto; }
.lvl { aspect-ratio: 1; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; }
.lvl .mini { display: flex; gap: 2px; margin-top: 4px; }
.lvl .mini i { width: 12px; height: 12px; background: rgba(255, 255, 255, .18); clip-path: polygon(50% 0, 61% 36%, 100% 38%, 69% 60%, 80% 100%, 50% 76%, 20% 100%, 31% 60%, 0 38%, 39% 36%); }
.lvl .mini i.on { background: #ffd76a; }
.lvl.cur { border-color: #ffd76a; box-shadow: 0 0 18px rgba(255, 215, 106, .35); }
.lvl:disabled { opacity: .3; }
.skin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; max-width: 520px; margin: 0 auto; }
.skin { border-radius: 20px; padding: 12px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.skin canvas { width: 110px; height: 130px; }
.skin b { font-size: 16px; }
.skin .btn { padding: 8px 12px; font-size: 14px; width: 100%; border-radius: 12px; }
.skin .btn.primary { box-shadow: 0 3px 0 #b55a1c; }
.skin.equipped { border-color: #ffd76a; box-shadow: 0 0 20px rgba(255, 215, 106, .25); }
.skin small { color: var(--dim); font-size: 12px; text-align: center; min-height: 15px; }
.set-list { max-width: 460px; margin: 0 auto 16px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); overflow: hidden; }
.set { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 16px; border-bottom: 1px solid var(--line); font-size: 16px; cursor: pointer; }
.set:last-child { border-bottom: 0; }
.set small { display: block; color: var(--dim); font-size: 12.5px; margin-top: 2px; }
.set input { display: none; }
.set i { flex: none; width: 50px; height: 30px; border-radius: 15px; background: rgba(255, 255, 255, .15); position: relative; transition: background .2s; }
.set i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s cubic-bezier(.3, 1.4, .5, 1); }
.set input:checked + i { background: linear-gradient(90deg, #ffb347, #ffd76a); }
.set input:checked + i::after { transform: translateX(20px); }
#resetBtn { max-width: 460px; display: block; margin: 0 auto; font-size: 15px; }
.about { max-width: 460px; margin: 26px auto 0; text-align: center; color: var(--dim); font-size: 13px; }
.about .pp-about { width: 120px; height: auto; opacity: .92; }
.about p { margin: 8px 0; }
.about .links a { color: var(--dim); }

.toast { position: fixed; left: 50%; bottom: calc(100px + var(--safe-b)); transform: translate(-50%, 20px); z-index: 40; max-width: min(92vw, 420px); padding: 11px 18px; border-radius: 14px; background: rgba(20, 14, 50, .92); border: 1px solid var(--line); color: #fff; font-size: 15px; text-align: center; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-height: 760px) { .lumi { width: 132px; height: 132px; } }
@media (max-height: 640px) { .lumi { display: none; } .world-card { margin-top: 12px; } }

/* ---------- Art pass: generated masters (assets-src/art), built by tools/build-art.py ---------- */
.logo-wrap { margin: 0; line-height: 0; }
.logo-img { width: min(84vw, 400px); height: auto; filter: drop-shadow(0 6px 24px rgba(255, 190, 90, .35)); animation: logoIn .7s cubic-bezier(.2, 1.3, .4, 1) both; }
.load-logo { width: min(80vw, 460px); }
@keyframes logoIn { from { transform: scale(.85); opacity: 0; } }
.pp-loading { background: linear-gradient(180deg, rgba(11, 16, 51, .35), rgba(11, 16, 51, .85)), url(../art/keyart.webp) 62% center / cover, #0b1033; }
img.lumi { width: 128px; height: auto; margin-bottom: -14px; filter: drop-shadow(0 0 26px rgba(255, 210, 120, .55)); }
img.glow-dot { width: 20px; height: 20px; background: none; box-shadow: none; border-radius: 0; object-fit: contain; }
.win-reward img.glow-dot { width: 24px; height: 24px; }
.stars3 { align-items: flex-end; }
.stars3 img { width: 58px; height: 58px; object-fit: contain; filter: grayscale(1) brightness(.45); opacity: .5; transition: filter .3s; }
.stars3 img:nth-child(2) { width: 76px; height: 76px; }
.stars3 img.on { filter: none; opacity: 1; animation: starIn .55s cubic-bezier(.2, 1.6, .4, 1) both; }
.card { position: relative; border: 1px solid transparent; background:
  linear-gradient(180deg, rgba(48, 34, 110, .96), rgba(20, 14, 56, .97)) padding-box,
  linear-gradient(160deg, #ffe9a8, #b77bff 45%, #ffb347) border-box; }
.win-card { padding-top: 58px; margin-top: 60px; }
.win-lumi { position: absolute; left: calc(50% - 62px); top: -74px; width: 124px; filter: drop-shadow(0 0 24px rgba(255, 210, 120, .6)); animation: bob 3s ease-in-out infinite; }
.tool-img { width: 30px; height: 30px; object-fit: contain; margin: -3px 0 -1px; }
.world-card, .tile, .set-list, .skin, .world-row, .lvl { border: 1px solid transparent; background:
  linear-gradient(180deg, rgba(30, 22, 72, .78), rgba(16, 12, 44, .82)) padding-box,
  linear-gradient(160deg, rgba(255, 225, 150, .55), rgba(160, 110, 255, .25) 50%, rgba(255, 180, 90, .35)) border-box; }
.tile em { z-index: 1; }


/* ---------- Brand pass 2: one visual language (gold icon set, display type, coin badges, gem buttons) ---------- */
:root { --display: "Lilita One", "Fredoka", ui-rounded, system-ui, sans-serif; }
.ic { width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(20, 0, 40, .45)); pointer-events: none; }
.chip-ic { width: 20px; height: 20px; object-fit: contain; }
.gold-text, .hud-title b, .win-card h2, .play > span, .chip b, .wc-top span:last-child, .lvl, .skin b, .sheet-head h2, .world-row b {
  font-family: var(--display); font-weight: 400; letter-spacing: .02em;
}
.hud-title b, .sheet-head h2, .world-row b {
  background: linear-gradient(180deg, #fffaf0 0%, #ffe08a 50%, #ffae4a 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 #4a1f6e) drop-shadow(0 0 10px rgba(255, 190, 90, .35));
}
.hud-title b { font-size: 26px; }
.hud-title small { font-family: var(--display); font-weight: 400; letter-spacing: .06em; text-transform: uppercase; font-size: 12px; color: #d9cffd; }
.win-card h2 { font-size: 40px; filter: drop-shadow(0 3px 0 #4a1f6e); }
.win-kicker, .win-stats { font-family: var(--display); letter-spacing: .04em; }
.chip b { font-size: 17px; color: #fff3cf; text-shadow: 0 1px 0 #4a1f6e; }
.chip { border: 1px solid transparent; background: linear-gradient(180deg, rgba(30, 20, 70, .78), rgba(14, 10, 40, .82)) padding-box, linear-gradient(160deg, #ffe9a8, #9b6bff 60%, #ffb347) border-box; }

/* coin badges: gold disc, violet numerals */
.badge { top: -8px; right: -8px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; line-height: 22px;
  font-family: var(--display); font-weight: 400; font-size: 14px; color: #3a1556;
  background: radial-gradient(circle at 35% 30%, #fffbe6 0 18%, #ffd76a 45%, #d98d2b 100%);
  border: 1.5px solid #6b2fa0; box-shadow: 0 2px 0 #4a1f6e, 0 0 10px rgba(255, 200, 90, .55); }
.tile em { font-family: var(--display); font-weight: 400; font-size: 12px; letter-spacing: .03em; border: 1.5px solid #fff2c9; }

/* gem buttons: dark violet glass, gold rim, lit from the upper left */
.toolbar { gap: 10px; padding: 10px 12px; border-radius: 28px; border: 1px solid transparent;
  background: linear-gradient(180deg, rgba(34, 22, 78, .82), rgba(12, 8, 34, .9)) padding-box, linear-gradient(160deg, #ffe9a8, #8f5cff 55%, #ffb347) border-box;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .12); }
.tool { width: 70px; height: 66px; gap: 1px; border-radius: 20px; font-family: var(--display); font-weight: 400; font-size: 12.5px; letter-spacing: .04em; color: #fff1c9; text-shadow: 0 1px 0 #2a0f45;
  border: 1px solid transparent; background: radial-gradient(120% 90% at 30% 20%, rgba(150, 110, 255, .45), rgba(40, 22, 90, .9) 60%) padding-box, linear-gradient(160deg, #ffe39a, #a25cff 50%, #e09a3a) border-box; }
.tool:active { transform: scale(.92); }
.tool .ic { width: 32px; height: 32px; }
.icon-btn { border: 1px solid transparent; background: radial-gradient(120% 90% at 30% 20%, rgba(150, 110, 255, .45), rgba(30, 18, 70, .9) 60%) padding-box, linear-gradient(160deg, #ffe39a, #a25cff 50%, #e09a3a) border-box; }
.icon-btn .ic { width: 28px; height: 28px; }
.tile { font-family: var(--display); font-weight: 400; font-size: 13px; letter-spacing: .04em; color: #fff1c9; }
.tile .ic { width: 36px; height: 36px; }
.play > span { font-size: 30px; letter-spacing: .06em; }
.play small { font-family: var(--display); font-weight: 400; letter-spacing: .05em; }
.btn.primary { font-family: var(--display); font-weight: 400; letter-spacing: .05em; }
.lvl { font-size: 24px; color: #fff1c9; text-shadow: 0 2px 0 #3a1556; }
.coach { font-family: var(--display); font-weight: 400; letter-spacing: .03em; font-size: 16px;
  border: 1px solid transparent; background: linear-gradient(180deg, rgba(40, 26, 92, .92), rgba(18, 12, 48, .94)) padding-box, linear-gradient(160deg, #ffe9a8, #9b6bff 60%, #ffb347) border-box; }
.toast { font-family: var(--display); font-weight: 400; letter-spacing: .03em; }

/* ---------- Shop ---------- */
.home-row { grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); }
.shop-card { max-width: 460px; margin: 0 auto 14px; padding: 18px; border-radius: 22px; text-align: center; display: grid; gap: 8px; justify-items: center; border: 1px solid transparent;
  background: linear-gradient(180deg, rgba(40, 26, 92, .92), rgba(18, 12, 48, .94)) padding-box, linear-gradient(160deg, #ffe9a8, #9b6bff 60%, #ffb347) border-box; }
.shop-card h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 24px; letter-spacing: .03em; background: linear-gradient(180deg, #fffaf0, #ffd76a 55%, #ffae4a); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 0 #4a1f6e); }
.shop-card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; color: #efe9ff; }
.shop-card li::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 8px; background: #ffd76a; clip-path: polygon(50% 0, 61% 36%, 100% 38%, 69% 60%, 80% 100%, 50% 76%, 20% 100%, 31% 60%, 0 38%, 39% 36%); }
.shop-art { width: 90px; height: auto; filter: drop-shadow(0 0 18px rgba(255, 210, 120, .5)); }
.shop-state { color: #bff7e0; margin: 0; min-height: 1em; }
.shop-card .note { color: var(--dim); margin: 0; font-size: 13px; }
.shop-promise { max-width: 460px; margin: 6px auto 0; text-align: center; color: var(--dim); font-size: 13px; }

/* ---------- Powell Play ID (powellplay-ui.md section 2) ---------- */
.pp-off .pp-section h3, .portal .pp-section { display: none; }
.pp-section { max-width: 460px; margin: 0 auto 16px; padding: 16px; border-radius: 20px; display: grid; gap: 10px; border: 1px solid transparent;
  background: linear-gradient(180deg, rgba(30, 22, 72, .78), rgba(16, 12, 44, .82)) padding-box, linear-gradient(160deg, rgba(255, 225, 150, .55), rgba(160, 110, 255, .25) 50%, rgba(255, 180, 90, .35)) border-box; }
.pp-section h3 { margin: 0; font-family: var(--display); font-weight: 400; letter-spacing: .1em; font-size: 13px; color: #d9cffd; }
.pp-dim { color: var(--dim); margin: 0; font-size: 14px; }
.pp-dim.small { font-size: 12.5px; }
.pp-signin { background: none; padding: 0; justify-self: start; }
.pp-signin img { height: 44px; width: auto; display: block; }
.pp-link { color: var(--gold); font-size: 14px; text-align: left; padding: 2px 0; text-decoration: underline; text-underline-offset: 3px; }
.pp-row { display: flex; align-items: center; gap: 12px; }
.pp-row b { display: block; font-size: 17px; }
.pp-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 2px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 15px; text-align: left; width: 100%; }
.pp-item small { display: block; color: var(--dim); font-size: 12.5px; margin-top: 2px; }
.pp-danger { color: #ff9aa8; }
.pp-avatar { width: 44px; height: 44px; border-radius: 22%; object-fit: cover; display: inline-grid; place-items: center; }
.pp-mono { background: linear-gradient(160deg, #8f7bff, #ff7ad9); color: #fff; font-family: var(--display); font-size: 20px; }
.pp-av-wrap { position: relative; display: inline-block; }
.pp-av-wrap .pp-avatar { width: 100%; height: 100%; }
.pp-frame { position: absolute; left: 50%; top: 50%; width: 114%; height: 114%; transform: translate(-50%, -50%); pointer-events: none; }
.pp-overlay { z-index: 30; }
.pp-sheet { position: relative; text-align: left; display: grid; gap: 12px; max-height: 88vh; overflow-y: auto; }
.pp-sheet h2 { margin: 0 34px 0 0; font-family: var(--display); font-weight: 400; font-size: 24px; color: #fff3cf; }
.pp-x { position: absolute; right: 12px; top: 12px; width: 38px; height: 38px; }
.pp-x .ic { width: 22px; height: 22px; }
#ppSheetBody { display: grid; gap: 12px; }
#ppSheetBody input { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0, 0, 0, .3); color: var(--ink); font: 600 16px var(--font); }
.pp-option { display: grid; gap: 2px; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .05); }
.pp-option.sel { border-color: var(--gold); background: rgba(255, 215, 106, .12); }
.pp-option span { color: var(--dim); font-size: 13px; }
.pp-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pp-card { display: grid; gap: 4px; justify-items: start; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); font-size: 13px; min-width: 0; }
.pp-card small { color: var(--dim); }
.pp-card b { font-size: 15px; overflow-wrap: anywhere; }
.pp-lines { margin: 0; padding-left: 18px; display: grid; gap: 8px; color: #efe9ff; }
.pp-code { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.pp-code code { font: 600 14px ui-monospace, Consolas, monospace; color: var(--gold); background: rgba(0, 0, 0, .3); padding: 6px 10px; border-radius: 8px; overflow-wrap: anywhere; }
.btn.danger { background: linear-gradient(180deg, #ff8a9a, #d8455c); color: #fff; }
.pp-prompt { display: grid; gap: 4px; justify-items: center; margin: 4px 0 10px; padding: 12px; border-radius: 16px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); }
.pp-prompt span { color: var(--dim); font-size: 13px; }
