/* PlaPla UI. Tone: bright cartoon, thick dark outlines, candy buttons, white highlights (lookdev/ref/target.png). */
:root {
  --ink: #3b2a5c; --ink2: #6b5a8c; --cream: #fff5d6; --paper: #fffaf0;
  --yellow: #ffd23f; --orange: #ff9f43; --pink: #ff7eb6; --blue: #4cc9f0; --green: #7bd65a; --purple: #b388ff; --red: #ff6b6b;
  --line: 3px solid var(--ink);
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #0d3a5c; overflow: hidden; overscroll-behavior: none; }
body { font-family: 'Mitr', 'Noto Sans Thai', 'Leelawadee UI', system-ui, sans-serif; color: var(--ink); font-size: 16px; line-height: 1.35; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { display: block; width: 100%; height: 100%; }
[hidden] { display: none !important; }

#frame { position: relative; height: 100dvh; width: min(100vw, 62dvh); margin: 0 auto; overflow: hidden; background: linear-gradient(#7fe3f5, #35c0e6 45%, #1a8fd0); }
#tank { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
#veil { position: absolute; inset: 0; pointer-events: none; transition: background .35s; }
#veil.soft { background: radial-gradient(ellipse at 50% 30%, rgba(255,255,255,.28), rgba(20,90,150,.10) 60%, rgba(10,50,100,.38)); }
#veil.dim { background: radial-gradient(ellipse at 50% 45%, rgba(40,150,220,.10), rgba(20,80,160,.34)); pointer-events: auto; }
#ui { position: absolute; inset: 0; pointer-events: none; }
#ui > * { pointer-events: auto; }

/* ---------- candy buttons ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: var(--line); border-radius: 20px;
  padding: 11px 20px; font-weight: 600; font-size: 18px; background: var(--yellow); box-shadow: 0 5px 0 var(--ink), 0 9px 14px rgba(30,20,70,.25);
  transition: transform .08s, box-shadow .08s; text-shadow: 0 1px 0 rgba(255,255,255,.55); user-select: none; }
.btn::before { content: ''; position: absolute; left: 14px; right: 14px; top: 4px; height: 7px; border-radius: 7px; background: rgba(255,255,255,.62); pointer-events: none; }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.btn[disabled] { filter: grayscale(.7) brightness(1.05); opacity: .7; pointer-events: none; }
.btn.big { font-size: 26px; padding: 15px 34px; border-radius: 28px; border-width: 4px; box-shadow: 0 7px 0 var(--ink), 0 14px 22px rgba(30,20,70,.3); }
.btn.pink { background: var(--pink); } .btn.blue { background: var(--blue); } .btn.green { background: var(--green); }
.btn.purple { background: var(--purple); } .btn.white { background: #fff; } .btn.orange { background: var(--orange); }
.btn.small { font-size: 15px; padding: 7px 13px; border-radius: 14px; box-shadow: 0 3px 0 var(--ink); }
.btn.wide { width: 100%; }

.pill { display: inline-flex; align-items: center; gap: 6px; background: var(--cream); border: 2.5px solid var(--ink); border-radius: 99px; padding: 2px 11px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.pill.warn { background: #ffe08a; } .pill.ok { background: #c9f5b5; } .pill.soon { background: var(--pink); color: #fff; text-shadow: 0 1px 0 var(--ink); }
.pill i { width: 16px; height: 16px; display: block; }

/* ---------- entry ---------- */
.entry { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; padding: calc(7dvh + var(--safe-t)) 18px calc(6dvh + var(--safe-b)); }
.logo { width: min(94%, 470px); filter: drop-shadow(0 8px 0 rgba(30,60,120,.25)); animation: bob 3.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-9px) rotate(-1.2deg); } }
.entry .grow { flex: 1; }
.entry .btn.big { min-width: 240px; font-size: 32px; animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.05); } }
.entry .foot { margin-top: 16px; font-size: 12.5px; color: #fff; text-shadow: 0 1px 2px rgba(0,40,90,.8); text-align: center; }

/* ---------- card (login) ---------- */
.center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 18px; gap: 16px; }
.card { width: 100%; max-width: 420px; background: var(--paper); border: 4px solid var(--ink); border-radius: 30px; padding: 22px 20px 20px; box-shadow: 0 8px 0 var(--ink), 0 18px 34px rgba(20,30,90,.35); position: relative; }
.card::before { content: ''; position: absolute; inset: 5px; border-radius: 23px; border: 3px dashed rgba(255,159,67,.35); pointer-events: none; }
.card h2 { margin: 0 0 4px; font-size: 26px; font-weight: 600; text-align: center; }
.card p { margin: 6px 0; }
.sub { color: var(--ink2); font-size: 14px; text-align: center; }
.notice { background: #ffe9a8; border: var(--line); border-radius: 16px; padding: 12px 14px; font-size: 15px; margin: 14px 0 6px; }
.notice b { display: block; font-size: 17px; font-weight: 600; }
.gwrap { display: flex; justify-content: center; min-height: 48px; margin: 16px 0 6px; }
.fakeg { display: flex; align-items: center; gap: 10px; justify-content: center; width: 100%; border: 2px solid #c9c2d6; background: #f1eef6; color: #8d84a3; border-radius: 99px; padding: 10px; font-weight: 500; }
.fakeg span.g { width: 22px; height: 22px; border-radius: 50%; background: conic-gradient(#ea4335 0 25%, #fbbc05 0 50%, #34a853 0 75%, #4285f4 0); opacity: .45; }
.devbox { margin-top: 14px; border-top: 2px dashed #d9cfe8; padding-top: 12px; font-size: 13px; }
.devbox .row { display: flex; gap: 8px; margin-top: 6px; }

/* ---------- forms ---------- */
label.f { display: block; font-weight: 500; margin: 12px 0 5px; font-size: 15px; }
input.t, select.t { width: 100%; border: var(--line); border-radius: 15px; background: #fff; padding: 11px 14px; font-size: 18px; outline: none; box-shadow: inset 0 3px 0 rgba(59,42,92,.08); min-width: 0; }
input.t:focus, select.t:focus { border-color: #ff5fa2; box-shadow: 0 0 0 4px rgba(255,126,182,.3); }
.hint { font-size: 13px; color: var(--ink2); margin: 5px 2px 0; }
.err { color: #d62b55; font-weight: 500; font-size: 14.5px; min-height: 20px; margin: 8px 2px 0; }

/* ---------- pages (full sheets over the tank) ---------- */
.page { position: absolute; inset: 0; display: flex; flex-direction: column; background:
  url(/tank/assets/fish/goldfish_baby.png) right 16px bottom 30px / 132px auto no-repeat,
  radial-gradient(circle at 30px 100%, #8fdcf7 29px, transparent 30px) 0 100% / 60px 34px repeat-x,
  radial-gradient(circle at 12px 12px, rgba(255,255,255,.6) 3px, transparent 4px) 0 0 / 34px 34px, linear-gradient(#aee9ff, #d4f4ff 35%, #c5efff); }
.bar { flex: none; display: flex; align-items: center; gap: 10px; padding: calc(10px + var(--safe-t)) 12px 12px; background: var(--blue); border-bottom: 4px solid var(--ink); position: relative; }
.bar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -13px; height: 9px; background: radial-gradient(circle at 9px 0, var(--ink) 9px, transparent 9.500px) 0 0 / 18px 9px; opacity: .13; }
.bar h1 { flex: 1; margin: 0; font-size: 23px; font-weight: 600; color: #fff; -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; text-shadow: 0 3px 0 var(--ink); letter-spacing: .5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 2px 3px; }
.bar .ib { flex: none; width: 46px; height: 46px; border-radius: 15px; border: var(--line); background: #fff; padding: 8px; box-shadow: 0 4px 0 var(--ink); }
.bar .ib:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.bar .ico { width: 44px; height: 44px; flex: none; }
.body { flex: 1; overflow-y: auto; padding: 18px 14px calc(26px + var(--safe-b)); -webkit-overflow-scrolling: touch; }
.panel { background: var(--paper); border: var(--line); border-radius: 22px; padding: 14px 15px; margin-bottom: 14px; box-shadow: 0 5px 0 rgba(59,42,92,.9); }
.panel h3 { margin: 0 0 8px; font-size: 18px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.panel h3 i { width: 26px; height: 26px; display: block; flex: none; }
.row { display: flex; align-items: center; gap: 10px; }
.row .sp { flex: 1; min-width: 0; }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 2px dashed #eadfca; font-size: 15.5px; }
.kv:last-child { border-bottom: 0; } .kv span:first-child { color: var(--ink2); flex: none; } .kv span:last-child { text-align: right; font-weight: 500; }

/* ---------- home HUD ---------- */
.hud-top { position: absolute; left: 8px; right: 8px; top: calc(8px + var(--safe-t)); display: flex; align-items: flex-start; gap: 8px; pointer-events: none !important; }
.hud-top > * { pointer-events: auto; }
.me { display: flex; align-items: center; gap: 8px; background: rgba(255,250,240,.95); border: var(--line); border-radius: 99px 22px 22px 99px; padding: 4px 13px 4px 4px; box-shadow: 0 4px 0 var(--ink); max-width: 56%; text-align: left; }
.ava { width: 46px; height: 46px; border-radius: 50%; border: var(--line); background: var(--pink) center/cover; flex: none; overflow: hidden; }
.me b { display: block; font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me small { display: block; font-size: 12px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me > div { min-width: 0; }
.chips { margin-left: auto; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.chip { display: flex; align-items: center; gap: 6px; background: rgba(59,42,92,.88); color: #fff; border: 2.5px solid var(--ink); border-radius: 99px; padding: 2px 12px 2px 3px; font-weight: 600; font-size: 16px; min-width: 76px; box-shadow: 0 3px 0 rgba(30,20,60,.5); }
.chip i { width: 30px; height: 30px; display: block; background: #fff; border-radius: 50%; padding: 3px; border: 2px solid var(--ink); }
.chip span { flex: 1; text-align: right; }
button.chip { cursor: pointer; position: relative; } .chip.gold { background: rgba(120,70,10,.9); }
.chip em { position: absolute; right: 2px; top: 100%; margin-top: -4px; background: var(--yellow); color: var(--ink); border: 2px solid var(--ink); border-radius: 99px; font-style: normal; font-size: 11px; padding: 0 7px; white-space: nowrap; animation: pulse 1.6s ease-in-out infinite; z-index: 1; }
.chips .chip:first-child { margin-bottom: 10px; }
.xp { position: relative; height: 24px; border: var(--line); border-radius: 99px; background: #fff; overflow: hidden; margin: 4px 0 6px; }
.xp div { height: 100%; background: linear-gradient(#a8ef8a, #5fcf4a); border-right: 2.5px solid var(--ink); min-width: 0; }
.xp span { position: absolute; inset: 0; text-align: center; font-size: 12.5px; font-weight: 600; line-height: 18px; }
.flist { display: flex; flex-direction: column; gap: 9px; }
.flist button { display: flex; align-items: center; gap: 10px; border: var(--line); border-radius: 18px; background: #e8fbff; padding: 6px 12px 6px 6px; text-align: left; box-shadow: 0 3px 0 var(--ink); }
.flist button:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.flist button.sel { background: #ffe680; box-shadow: 0 3px 0 var(--ink), 0 0 0 4px rgba(255,126,182,.55); }
.flist button[disabled] { opacity: .5; filter: grayscale(.6); }
.chipline { display: flex; align-items: center; gap: 6px; font-weight: 600; } .chipline i { width: 28px; height: 28px; display: block; }
.rules { margin: 0; padding-left: 20px; font-size: 14.5px; } .rules li { margin: 3px 0; }
.gline { border: 2.5px solid var(--ink); border-radius: 12px; background: #fff; padding: 5px 10px; font-size: 13.5px; margin-bottom: 5px; }
.flist img { width: 64px; height: 52px; object-fit: contain; flex: none; } .flist b { font-weight: 600; } .flist small { display: block; color: var(--ink2); font-size: 12.5px; }
.food { border: var(--line); border-radius: 16px; background: #fff; padding: 9px 11px; margin-bottom: 9px; } .food b { font-weight: 600; } .food small { color: var(--ink2); font-size: 13px; }
.lay6 { display: flex; gap: 3px; margin-top: 7px; }
.lay6 span { flex: 1; text-align: center; font-size: 11px; font-weight: 500; padding: 2px 0; border-radius: 8px; border: 2px solid #d9cfe8; color: #b3a8c9; background: #f6f3fb; }
.lay6 span.on { border-color: var(--ink); color: var(--ink); background: var(--green); }
.side { position: absolute; top: calc(92px + var(--safe-t)); display: flex; flex-direction: column; gap: 10px; }
.side.l { left: 8px; } .side.r { right: 8px; top: calc(176px + var(--safe-t)); }
.sq { position: relative; width: 62px; border: var(--line); border-radius: 17px; background: var(--paper); padding: 6px 4px 3px; box-shadow: 0 4px 0 var(--ink); font-size: 11.5px; font-weight: 600; text-align: center; line-height: 1.15; }
.sq i { display: block; width: 36px; height: 36px; margin: 0 auto 1px; }
.sq:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.sq .dot { position: absolute; right: -7px; top: -8px; }
.tag-soon { background: var(--pink); color: #fff; border: 2px solid var(--ink); border-radius: 99px; font-size: 9.500px; padding: 0 5px; font-weight: 600; letter-spacing: .2px; }
.lay { width: 46px; height: 46px; border-radius: 50%; border: var(--line); background: rgba(255,255,255,.72); font-weight: 600; font-size: 18px; box-shadow: 0 3px 0 var(--ink); }
.lay.on { background: var(--yellow); }
.lay-cap { font-size: 11px; color: #fff; text-align: center; font-weight: 600; text-shadow: 0 1px 2px rgba(0,40,90,.9); margin-bottom: -4px; }
.shelf .caprow { display: flex; align-items: flex-end; gap: 8px; }
.demo-note { flex: 1; min-width: 0; margin: 0 6px 5px 0; text-align: right; color: #fff; font-size: 11px; line-height: 1.2; text-shadow: 0 1px 3px rgba(0,30,80,.95), 0 0 6px rgba(0,30,80,.6); pointer-events: none; }
.shelf { position: absolute; left: 0; right: 0; bottom: calc(104px + var(--safe-b)); padding: 0 8px; }
.shelf .cap { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 -3px 10px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 500; padding: 3px 13px 5px; border-radius: 13px 13px 0 0; }
.strip { display: flex; gap: 9px; overflow-x: auto; padding: 9px 9px 11px; background: rgba(255,250,240,.93); border: var(--line); border-radius: 22px; box-shadow: 0 4px 0 var(--ink); scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.mini { flex: none; width: 86px; height: 116px; border: var(--line); border-radius: 16px; background: #e8fbff; position: relative; padding: 4px 4px 0; text-align: center; font-size: 11.5px; font-weight: 600; box-shadow: 0 3px 0 var(--ink); overflow: hidden; }
.mini:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.mini .art { height: 58px; display: flex; align-items: center; justify-content: center; }
.mini .art img { max-width: 100%; max-height: 100%; }
.mini .art i { width: 52px; height: 58px; display: block; }
.mini.egg .art i { animation: wob 2.4s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes wob { 0%, 60%, 100% { transform: rotate(0); } 68% { transform: rotate(-9deg); } 76% { transform: rotate(8deg); } 84% { transform: rotate(-5deg); } 92% { transform: rotate(3deg); } }
.mini .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini .rb { position: absolute; left: 0; right: 0; bottom: 0; font-size: 10.5px; padding: 1px 0 2px; color: #fff; border-top: 2.5px solid var(--ink); text-shadow: 0 1px 0 rgba(0,0,0,.35); letter-spacing: .2px; }
.mini .sx { position: absolute; right: 4px; top: 3px; font-size: 13px; line-height: 1; }
.mini.add { background: repeating-linear-gradient(45deg, #fff5d6, #fff5d6 8px, #ffeab8 8px, #ffeab8 16px); display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 4px; }
.mini.add i { width: 40px; height: 40px; display: block; margin: 0 auto; }
.r-common { background: #8fa3b8; } .r-uncommon { background: #49b85f; } .r-rare { background: #3d8bf2; } .r-epic { background: #a45cf0; } .r-legendary { background: linear-gradient(90deg, #ff9f1c, #ffd23f, #ff9f1c); } .r-mythic { background: linear-gradient(90deg, #ff5fa2, #b388ff, #4cc9f0); } .r-egg { background: var(--ink2); }

.nav { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 5px; padding: 12px 7px calc(9px + var(--safe-b)); background: linear-gradient(#c79bff, #a877f0); border-top: 4px solid var(--ink); border-radius: 26px 26px 0 0; }
.nav::before { content: ''; position: absolute; left: 14px; right: 14px; top: 4px; height: 5px; border-radius: 9px; background: rgba(255,255,255,.45); }
.nb { flex: 1; min-width: 0; border: var(--line); border-radius: 20px; padding: 5px 2px 4px; background: var(--yellow); font-weight: 600; font-size: 13.5px; position: relative; box-shadow: 0 5px 0 var(--ink); margin-top: -26px; white-space: nowrap; text-shadow: 0 1px 0 rgba(255,255,255,.6); }
.nb::before { content: ''; position: absolute; left: 10%; right: 10%; top: 3px; height: 30%; border-radius: 14px 14px 30px 30px; background: linear-gradient(rgba(255,255,255,.8), rgba(255,255,255,.1)); pointer-events: none; }
.nb i { display: block; width: 44px; height: 44px; margin: 0 auto -1px; position: relative; filter: drop-shadow(0 2px 0 rgba(59,42,92,.25)); }
.nb:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.nb:nth-child(2) { background: var(--pink); } .nb:nth-child(3) { background: var(--purple); background: #c9a6ff; } .nb:nth-child(4) { background: var(--green); } .nb:nth-child(5) { background: var(--blue); }
.nb .tag-soon { position: absolute; right: -3px; top: -9px; z-index: 1; }

/* ---------- menu grid ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 12px; padding-top: 6px; }
.tile { position: relative; border: var(--line); border-radius: 22px; background: #fff; padding: 16px 4px 10px; text-align: center; font-weight: 600; font-size: 16px; line-height: 1.2; box-shadow: 0 6px 0 var(--ink); min-height: 150px; }
.tile::before { content: ''; position: absolute; left: 8%; right: 8%; top: 4px; height: 26%; border-radius: 16px 16px 30px 30px; background: linear-gradient(rgba(255,255,255,.85), rgba(255,255,255,0)); pointer-events: none; }
.tile i { display: block; width: 76px; height: 76px; margin: 0 auto 5px; background: rgba(255,255,255,.6); border-radius: 50%; padding: 9px; position: relative; filter: drop-shadow(0 3px 0 rgba(59,42,92,.2)); }
.tile:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.tile .tag-soon { position: absolute; right: -5px; top: -8px; font-size: 10.5px; padding: 1px 7px; transform: rotate(6deg); }
.c0 { background: #ffdc4d; } .c1 { background: #ff9ccb; } .c2 { background: #7fdcff; } .c3 { background: #a4e884; } .c4 { background: #c9a8ff; } .c5 { background: #ffb877; }

/* ---------- coming soon ---------- */
.soon { text-align: center; padding-top: 8px; }
.soon .bigico { width: 150px; height: 150px; margin: 6px auto 0; background: #fff; border: 4px solid var(--ink); border-radius: 44px; padding: 20px; box-shadow: 0 8px 0 var(--ink); animation: bob 3.4s ease-in-out infinite; position: relative; }
.ribbon { display: inline-block; margin: -16px 0 16px; position: relative; background: var(--pink); color: #fff; font-family: 'Baloo 2', 'Mitr', sans-serif; font-weight: 800; font-size: 27px; padding: 1px 26px 0; border: 4px solid var(--ink); border-radius: 14px; transform: rotate(-3deg); text-shadow: 0 2px 0 var(--ink); box-shadow: 0 5px 0 var(--ink); }
.soon ul { text-align: left; margin: 0; padding: 0; list-style: none; }
.soon li { position: relative; padding: 6px 0 6px 30px; font-size: 15.5px; border-bottom: 2px dashed #eadfca; }
.soon li:last-child { border: 0; }
.soon li::before { content: ''; position: absolute; left: 4px; top: 12px; width: 13px; height: 13px; border-radius: 50%; background: var(--blue); border: 2.5px solid var(--ink); }

/* ---------- area picker ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 8px; align-items: center; }
.crumbs button { border: 2.5px solid var(--ink); background: var(--yellow); border-radius: 99px; padding: 2px 12px; font-weight: 500; font-size: 14px; }
.crumbs button.cur { background: #fff; }
.search { position: relative; }
.search i { position: absolute; left: 12px; top: 50%; width: 24px; height: 24px; margin-top: -12px; pointer-events: none; }
.search input { padding-left: 44px; }
.list { border: var(--line); border-radius: 16px; background: #fff; overflow-y: auto; max-height: 38dvh; }
.list button { display: block; width: 100%; text-align: left; border: 0; border-bottom: 2px solid #f0e8d8; background: none; padding: 11px 14px; font-size: 16.5px; }
.list button:last-child { border-bottom: 0; }
.list button:active { background: #fff0b8; }
.list button small { display: block; color: var(--ink2); font-size: 12.5px; }
.list .empty { padding: 16px; text-align: center; color: var(--ink2); font-size: 14.5px; }
.area { display: flex; flex-direction: column; gap: 0; border: var(--line); border-radius: 16px; overflow: hidden; background: #fff; }
.area div { display: flex; gap: 10px; padding: 7px 13px; border-bottom: 2px solid #f0e8d8; font-size: 15.5px; align-items: center; }
.area div:last-child { border-bottom: 0; } .area div span { color: var(--ink2); width: 62px; flex: none; font-size: 13.5px; } .area div b { font-weight: 500; }
.area div:nth-child(1) { background: #f1fbff; } .area div:nth-child(2) { background: #e6f7ff; } .area div:nth-child(3) { background: #fff8dc; } .area div:nth-child(4) { background: #ffefc2; } .area div:nth-child(5) { background: #ffe3ee; } .area div:nth-child(6) { background: #ffd0e4; }
.steps { display: flex; gap: 6px; justify-content: center; margin: 2px 0 12px; }
.steps span { width: 34px; height: 9px; border-radius: 9px; border: 2.5px solid var(--ink); background: #fff; } .steps span.on { background: var(--pink); }

/* ---------- modal + toast ---------- */
#modal { position: absolute; inset: 0; background: rgba(30, 25, 70, .58); display: flex; align-items: center; justify-content: center; padding: 18px; z-index: 20; }
#modal .card { max-height: 92%; overflow-y: auto; animation: pop .28s cubic-bezier(.2, 1.5, .4, 1); }
@keyframes pop { from { transform: scale(.7); opacity: 0; } }
.hero { height: 190px; display: flex; align-items: center; justify-content: center; position: relative; margin: 2px 0 6px; border-radius: 20px; background: radial-gradient(circle, #fff 0, #c9f2ff 55%, #8fdcf7 100%); border: var(--line); overflow: hidden; }
.hero::before { content: ''; position: absolute; width: 520px; height: 520px; background: repeating-conic-gradient(rgba(255,255,255,.55) 0 12deg, transparent 12deg 24deg); animation: spin 22s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero img { position: relative; max-height: 165px; max-width: 86%; filter: drop-shadow(0 6px 0 rgba(30,60,120,.18)); animation: bob 3s ease-in-out infinite; }
.hero i { position: relative; width: 130px; height: 150px; display: block; }
.hero i.shake { animation: wob 1s ease-in-out infinite; transform-origin: 50% 90%; }
.badge { display: inline-block; color: #fff; border: 2.5px solid var(--ink); border-radius: 99px; padding: 1px 14px; font-weight: 600; font-size: 15px; text-shadow: 0 1px 0 rgba(0,0,0,.35); }
.cta { display: flex; gap: 10px; margin-top: 16px; } .cta .btn { flex: 1; }
#toast { position: absolute; left: 50%; top: calc(74px + var(--safe-t)); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 9px 18px; border-radius: 16px; font-weight: 500; z-index: 30; max-width: 88%; text-align: center; border: 3px solid #fff; box-shadow: 0 6px 16px rgba(0,0,0,.3); }

/* ---------- admin ---------- */
.keys { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.keycard { border: 2.5px dashed var(--ink); border-radius: 14px; background: #fff; padding: 9px 6px 7px; text-align: center; font-size: 12px; break-inside: avoid; }
.keycard.used { opacity: .35; }
.keycard .qr { width: 78%; margin: 0 auto 4px; } .keycard .qr svg { width: 100%; height: auto; }
.keycard b { display: block; font-family: ui-monospace, Consolas, monospace; font-size: 14.5px; letter-spacing: .5px; }
.keycard .t { font-family: 'Baloo 2', 'Mitr', sans-serif; font-weight: 800; font-size: 17px; }
table.tb { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.tb td, table.tb th { padding: 6px 4px; border-bottom: 2px dashed #eadfca; text-align: left; }
table.tb th { font-weight: 500; color: var(--ink2); font-size: 13px; }
table.tb td:last-child, table.tb th:last-child { text-align: right; }

@media print {
  html, body { height: auto; overflow: visible; background: #fff; }
  #frame { width: auto; height: auto; overflow: visible; background: #fff; }
  #tank, #veil, .bar, .noprint, #toast { display: none !important; }
  .page { position: static; background: #fff; display: block; } .body { overflow: visible; padding: 0; }
  .panel { border: 0; box-shadow: none; padding: 0; }
  .keys { grid-template-columns: repeat(3, 1fr); gap: 6mm; } .keycard.used { display: none; }
}
