:root {
  --bone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill-rule='evenodd' d='M16 1a15 15 0 1 0 0 30 15 15 0 0 0 0-30zm0 5a10 10 0 1 1 0 20 10 10 0 0 1 0-20z'/%3E%3Ccircle cx='16' cy='16' r='7'/%3E%3C/svg%3E");
  --ink: #07131d; --cream: #f7e6c2; --gold: #ffc62e; --pink: #ff5c7a; --panel: rgba(255,255,255,.94);
  --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: #bfe6ff; color: var(--ink); font-family: 'Fredoka','Jua',system-ui,sans-serif; user-select: none; -webkit-user-select: none; touch-action: none; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
button { font: inherit; color: inherit; border: 0; cursor: pointer; background: none; padding: 0; }
[hidden] { display: none !important; }
i { display: inline-block; flex: none; font-style: normal; }
#nogl { display: none; } body.nogl #nogl { display: grid; position: fixed; inset: 0; place-items: center; font-size: 24px; }
body.loading::after { content: ''; position: fixed; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px; border: 6px solid #fff; border-top-color: #ff9a2a; border-radius: 50%; animation: spin .8s linear infinite; z-index: 99; }
@keyframes spin { to { transform: rotate(360deg); } }
.coin-ic { width: 26px; height: 16px; background: linear-gradient(180deg,#fff1b0,#ffc62e 55%,#d98b00); -webkit-mask: var(--bone) center/contain no-repeat; mask: var(--bone) center/contain no-repeat; }
.coin-ic.s { width: 18px; height: 11px; margin-right: 3px; }
.i-pause { width: 16px; height: 18px; border-left: 5px solid currentColor; border-right: 5px solid currentColor; }
.i-home { width: 22px; height: 20px; background: currentColor; clip-path: polygon(50% 0,100% 45%,86% 45%,86% 100%,14% 100%,14% 45%,0 45%); }
.i-clock { width: 18px; height: 18px; border-radius: 50%; border: 3px solid #fff; position: relative; box-sizing: border-box; }
.i-clock::after { content: ''; position: absolute; left: 50%; top: 2px; width: 2px; height: 6px; margin-left: -1px; background: #fff; }
.ic-btn { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: rgba(255,255,255,.92); box-shadow: 0 4px 0 rgba(7,19,29,.15); }
.ic-btn:active { transform: translateY(2px); }

/* HUD */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
#hud > * { position: absolute; }
#btnPause { left: 12px; top: calc(12px + var(--safe-t)); pointer-events: auto; }
#topc { left: 50%; top: calc(8px + var(--safe-t)); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 5px; }
.pill { display: flex; align-items: center; gap: 6px; padding: 4px 12px 4px 8px; border-radius: 999px; background: rgba(7,19,29,.58); color: #fff; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; transition: transform .12s; }
.pill.big { font-size: 28px; padding: 3px 18px 3px 12px; -webkit-text-stroke: 1px rgba(7,19,29,.6); }
.pill.gold { background: linear-gradient(180deg,#ffd45a,#ff9a1a); color: #5a2a00; }
.row2 { display: flex; gap: 6px; }
#starsRow { display: flex; gap: 4px; }
#starsRow i { width: 26px; height: 26px; background: rgba(255,255,255,.4); clip-path: polygon(50% 0,62% 36%,100% 38%,70% 60%,80% 100%,50% 76%,20% 100%,30% 60%,0 38%,38% 36%); }
#starsRow i.on { background: linear-gradient(180deg,#fff1b0,#ffc62e 60%,#ff9a1a); filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); }
#svcBar { width: 150px; height: 7px; border-radius: 9px; background: rgba(7,19,29,.45); overflow: hidden; }
#svcBar span { display: block; height: 100%; background: linear-gradient(90deg,#8fe05a,#ffd45a); width: 0; }
#stageP { right: 12px; top: calc(14px + var(--safe-t)); }

/* 손님 말풍선 */
#bubbles { position: fixed; inset: 0; pointer-events: none; z-index: 3; }
.bub { position: absolute; left: 0; top: 0; width: 44px; padding: 3px; border-radius: 14px; background: #fff; box-shadow: 0 3px 0 rgba(7,19,29,.2); display: flex; flex-direction: column; align-items: center; gap: 2px; --pat: 1; will-change: transform; }
.bub::after { content: ''; position: absolute; left: 50%; bottom: -6px; margin-left: -6px; border: 6px solid transparent; border-top-color: #fff; border-bottom: 0; }
.bub img { width: 34px; height: 34px; object-fit: contain; }
.bub .tn { position: absolute; left: -6px; top: -8px; min-width: 18px; height: 18px; border-radius: 9px; background: #1f8cf0; color: #fff; font-size: 12px; display: grid; place-items: center; font-weight: 700; }
.bub .bar, .chip .bar { display: block; width: 100%; height: 5px; border-radius: 4px; background: rgba(7,19,29,.18); overflow: hidden; }
.bub .bar s, .chip .bar s { display: block; height: 100%; width: calc(var(--pat) * 100%); background: hsl(calc(var(--pat) * 110), 85%, 50%); text-decoration: none; }
.bub.urgent, .chip.urgent { animation: urgent .45s infinite alternate; }
.bub.crit { background: #fff1b0; } .bub.crit::after { border-top-color: #fff1b0; }
@keyframes urgent { to { transform: translate(var(--tx,0),var(--ty,0)) scale(1.08); } }
.bub.urgent { animation: none; box-shadow: 0 0 0 3px #ff4d4d, 0 3px 0 rgba(7,19,29,.2); }

/* 하단 레일 */
#rails { position: fixed; left: 0; right: 0; bottom: 0; padding: 8px 8px calc(10px + var(--safe-b)); z-index: 6; display: flex; flex-direction: column; gap: 6px; pointer-events: none; background: linear-gradient(0deg, rgba(7,19,29,.55), rgba(7,19,29,0)); min-height: 90px; }
.rrow { display: flex; gap: 8px; flex-wrap: nowrap; overflow-x: auto; justify-content: safe center; min-height: 0; pointer-events: auto; scrollbar-width: none; }
.rrow::-webkit-scrollbar { display: none; }
.rrow:empty { display: none; }
#rNew { min-height: 74px; }
.chip { position: relative; flex: none; width: 62px; height: 70px; border-radius: 18px; background: #fff; box-shadow: 0 4px 0 rgba(7,19,29,.22); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 4px 5px; --pat: 1; --a: 250deg; --b: 290deg; --n: 0deg; }
.chip:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(7,19,29,.22); }
.chip img { width: 44px; height: 44px; object-fit: contain; pointer-events: none; }
.chip .tn { position: absolute; left: -5px; top: -7px; min-width: 20px; height: 20px; border-radius: 10px; background: #1f8cf0; color: #fff; font-size: 13px; display: grid; place-items: center; font-weight: 700; }
.chip .kind { position: absolute; right: -4px; top: -6px; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; display: grid; place-items: center; box-shadow: 0 2px 0 rgba(0,0,0,.2); font-style: normal; }
.chip .crit { position: absolute; left: 50%; bottom: -9px; margin-left: -9px; width: 18px; height: 18px; background: #ffc62e; border-radius: 50%; color: #7a4a00; font-size: 12px; display: grid; place-items: center; }
.chip .ring, .chip .needle { display: none; }
.chip.new { animation: none; }
.chip.cook, .chip.ready { width: 64px; height: 64px; border-radius: 50%; padding: 0; justify-content: center; }
.chip.cook img, .chip.ready img { width: 38px; height: 38px; }
.chip.cook .bar, .chip.ready .bar { display: none; }
.chip.cook .ring { display: block; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(#e9eef3 0 var(--a), #5cff7a var(--a) var(--b), #ff8a6e var(--b) 360deg); -webkit-mask: radial-gradient(circle, transparent 23px, #000 24px); mask: radial-gradient(circle, transparent 23px, #000 24px); }
.chip.cook .needle { display: block; position: absolute; inset: 0; transform: rotate(var(--n)); }
.chip.cook .needle::after { content: ''; position: absolute; left: 50%; top: -3px; width: 11px; height: 11px; margin-left: -5.5px; border-radius: 50%; background: #07131d; box-shadow: 0 0 0 2px #fff; }
.chip.cook.inzone { box-shadow: 0 0 0 4px #5cff7a, 0 0 18px #5cff7a; animation: zone .35s infinite alternate; }
@keyframes zone { to { transform: scale(1.1); } }
.chip.cook.late { box-shadow: 0 0 0 3px #ff5a4a; }
.chip.ready { background: #fff7d6; box-shadow: 0 0 0 4px #ffc62e, 0 4px 0 rgba(7,19,29,.22); animation: zone .5s infinite alternate; }
.chip.ready::after { content: ''; position: absolute; left: 6px; right: 6px; bottom: -9px; height: 5px; border-radius: 4px; background: hsl(calc(var(--pat) * 110), 85%, 50%); width: calc(var(--pat) * (100% - 12px)); }

/* 시트(재료 손질·플레이팅) */
#sheet { position: fixed; left: 8px; right: 8px; z-index: 7; bottom: calc(var(--rails-h, 190px) + 6px); padding: 10px 12px 14px; border-radius: 26px; background: var(--panel); box-shadow: 0 8px 28px rgba(7,19,29,.35); animation: sheetin .22s ease-out; }
@keyframes sheetin { from { transform: translateY(40px); opacity: 0; } }
.sh-h { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 20px; }
.sh-h img { width: 42px; height: 42px; object-fit: contain; }
.sh-h b { flex: 1; }
.sh-h .tb { min-width: 24px; height: 24px; border-radius: 12px; background: #1f8cf0; color: #fff; font-size: 14px; display: grid; place-items: center; }
.sh-x { width: 34px; height: 34px; border-radius: 12px; background: #e9eef3; font-size: 16px; }
.ing { display: flex; justify-content: center; gap: 14px; margin: 10px 0 6px; }
.ib { position: relative; width: 82px; height: 82px; border-radius: 24px; background: linear-gradient(180deg,#fff,#fff0d0); box-shadow: 0 6px 0 rgba(122,74,0,.25), inset 0 0 0 3px #ffd89a; display: grid; place-items: center; }
.ib:active { transform: translateY(4px); }
.ib .ie { font-size: 44px; line-height: 1; }
.ib .np { position: absolute; left: -6px; top: -8px; width: 30px; height: 30px; border-radius: 50%; background: #ff7a1a; color: #fff; font-weight: 700; font-size: 18px; display: grid; place-items: center; box-shadow: 0 2px 0 #c4520a; }
.ib.done { opacity: .35; transform: scale(.88); pointer-events: none; }
.ib.shake, .dc.shake { animation: shk .35s; }
@keyframes shk { 20% { transform: translateX(-8px); } 50% { transform: translateX(8px); } 80% { transform: translateX(-4px); } }
.sh-bar { height: 8px; border-radius: 6px; background: #e0e6ec; overflow: hidden; } .sh-bar s { display: block; height: 100%; background: linear-gradient(90deg,#8fe05a,#ffd45a); transition: width .15s; text-decoration: none; }
.plate { position: relative; height: 188px; margin: 6px auto 2px; width: 100%; max-width: 330px; border-radius: 22px; background: radial-gradient(circle at 50% 50%, #fff 0 46%, #dfe6ee 47% 50%, #f4f7fa 51% 100%); }
.plate::before { content: ''; position: absolute; left: 50%; top: 50%; width: 176px; height: 176px; margin: -88px; border-radius: 50%; background: radial-gradient(circle, #fff 0 58%, #e5ebf2 60% 64%, #fff 66%); box-shadow: 0 6px 14px rgba(7,19,29,.18); }
.pl-d { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; } .pl-d img { width: 112px; height: 112px; object-fit: contain; opacity: .9; }
.tgt { position: absolute; width: 0; height: 0; touch-action: none; }
.tgt .ct { position: absolute; left: -30px; top: -30px; width: 60px; height: 60px; border-radius: 50%; border: 5px solid #ff7a1a; background: rgba(255,177,59,.28); }
.tgt .rg { position: absolute; left: 0; top: 0; width: 60px; height: 60px; border-radius: 50%; border: 5px solid #1f8cf0; transform: translate(-50%,-50%) scale(2.6); pointer-events: none; }
.tgt::after { content: ''; position: absolute; left: -48px; top: -48px; width: 96px; height: 96px; }
.pdots { display: flex; justify-content: center; gap: 10px; margin-top: 6px; } .pdots i { width: 16px; height: 16px; border-radius: 50%; background: #d4dbe3; }
.pdots i.p { background: #5cff7a; } .pdots i.g { background: #b8e05a; } .pdots i.o { background: #ffb13b; } .pdots i.m { background: #ff6b5e; }

/* 팝업 */
#pops { position: fixed; inset: 0; pointer-events: none; z-index: 8; overflow: hidden; }
.pop { position: absolute; transform: translate(-50%,-50%); font-weight: 700; font-size: 22px; color: #fff; -webkit-text-stroke: 1.5px #07131d; paint-order: stroke fill; text-shadow: 0 3px 0 rgba(7,19,29,.35); animation: popup 1.05s ease-out forwards; white-space: nowrap; }
.pop.coin { color: #ffd45a; } .pop.good { color: #7dff8a; } .pop.bad { color: #ff8a7a; }
.pop.comic { font-size: 26px; color: #ffe58a; transform: translate(-50%,-50%) rotate(-8deg); }
@keyframes popup { 0% { opacity: 0; margin-top: 10px; scale: .6; } 15% { opacity: 1; scale: 1.15; } 100% { opacity: 0; margin-top: -48px; scale: 1; } }
#banner { position: fixed; left: 50%; top: 28%; transform: translate(-50%,-50%) scale(.5); font-size: 54px; font-weight: 700; color: #fff; -webkit-text-stroke: 3px #07131d; paint-order: stroke fill; text-shadow: 0 6px 0 rgba(7,19,29,.35); opacity: 0; pointer-events: none; z-index: 9; white-space: nowrap; }
#banner.show { animation: ban 1.7s ease-out forwards; }
@keyframes ban { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.4); } 18% { opacity: 1; transform: translate(-50%,-50%) scale(1.1); } 30% { transform: translate(-50%,-50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%,-70%) scale(1); } }
#toast { position: fixed; left: 50%; bottom: 40%; transform: translateX(-50%); background: rgba(7,19,29,.8); color: #fff; padding: 8px 16px; border-radius: 999px; font-weight: 700; opacity: 0; pointer-events: none; z-index: 30; }
#toast.show { animation: tst 1.6s forwards; } @keyframes tst { 10%,80% { opacity: 1; } 100% { opacity: 0; } }

/* 허브 */
.hubw { position: fixed; left: 0; right: 0; bottom: 0; top: 44%; z-index: 6; pointer-events: none; }
.hub-p { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,250,240,.96), #fff6e4); border-radius: 30px 30px 0 0; box-shadow: 0 -8px 26px rgba(7,19,29,.25); pointer-events: auto; display: flex; flex-direction: column; padding: 10px 10px calc(88px + var(--safe-b)); }
.tabs { display: flex; gap: 8px; justify-content: center; }
.tab { flex: 1; max-width: 118px; height: 54px; border-radius: 18px; background: #eef1f5; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #5a6672; box-shadow: 0 4px 0 rgba(7,19,29,.12); }
.tab span { font-size: 22px; line-height: 1; } .tab.on { background: linear-gradient(180deg,#ffb13b,#ff7a1a); color: #fff; box-shadow: 0 4px 0 #c4520a; }
.hub-b { flex: 1; overflow-y: auto; margin-top: 8px; padding: 2px 2px 8px; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
.gcard { background: #fff; border-radius: 24px; padding: 10px 12px 12px; box-shadow: 0 4px 0 rgba(7,19,29,.1); text-align: center; }
.gname { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 22px; font-weight: 700; } .gn { background: #1f8cf0; color: #fff; border-radius: 12px; padding: 0 9px; font-size: 15px; line-height: 24px; }
.tier { width: 22px; height: 22px; border-radius: 7px; background: #ffb13b; } .tier.t1 { background: #2fa8a0; } .tier.t2 { background: #b7503a; } .tier.t3 { background: #4f7bd8; } .tier.t4 { background: #d9a52e; } .tier.t5 { background: linear-gradient(135deg,#ffc62e,#ff7ab0); }
.stats { display: flex; justify-content: center; gap: 12px; margin: 6px 0; } .stat { display: flex; align-items: center; gap: 3px; font-size: 18px; font-weight: 700; } .stat span { font-size: 18px; }
.arrow { color: #ffb13b; font-size: 18px; line-height: 14px; }
.nxt { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 20px; font-weight: 700; color: #355; }
.unl { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 8px 0; }
.uc { display: inline-flex; align-items: center; gap: 2px; min-width: 42px; height: 42px; padding: 0 8px; border-radius: 14px; background: #fff3d6; font-size: 22px; font-weight: 700; justify-content: center; box-shadow: inset 0 0 0 2px #ffd89a; } .uc b { font-size: 15px; } .uc.d { padding: 0; width: 46px; height: 46px; background: #fff; } .uc.d img { width: 40px; height: 40px; object-fit: contain; } .uc.d i { display: none; }
.gbtn { width: 100%; height: 58px; border-radius: 999px; background: linear-gradient(180deg,#ffb13b,#ff7a1a); box-shadow: 0 6px 0 #c4520a; color: #fff; font-size: 26px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 12px; }
.gbtn:active { transform: translateY(4px); box-shadow: 0 2px 0 #c4520a; } .gbtn:disabled { filter: grayscale(.85); opacity: .6; } .gbtn.gold { background: linear-gradient(180deg,#ffe36a,#ffa51a); box-shadow: 0 6px 0 #b9680a; color: #5a2a00; } .gbtn .stars { font-size: 28px; }
.gbtn .cost { display: flex; align-items: center; gap: 4px; background: rgba(7,19,29,.28); color: #fff; border-radius: 999px; padding: 0 12px; height: 34px; font-size: 20px; }
.trialc { display: flex; justify-content: center; gap: 8px; margin: 6px 0; } .ct { width: 38px; height: 38px; border-radius: 12px; background: #e6e9ee; display: grid; place-items: center; font-size: 22px; filter: grayscale(1); opacity: .5; } .ct.y { filter: none; opacity: 1; background: #d9fbd0; }
.clear { font-size: 24px; font-weight: 700; color: #e08a00; margin: 10px 0; }
.mhead { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; } .slots { font-size: 18px; font-weight: 700; background: #fff; border-radius: 999px; padding: 4px 12px; }
.cats { display: flex; gap: 4px; overflow-x: auto; flex: 1; scrollbar-width: none; } .cat { flex: none; width: 36px; height: 36px; border-radius: 12px; background: #eef1f5; font-size: 18px; } .cat.on { background: #ffb13b; box-shadow: 0 3px 0 #c4520a; }
.dgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.dc { position: relative; background: #fff; border-radius: 16px; padding: 5px 2px 5px; display: flex; flex-direction: column; align-items: center; gap: 1px; box-shadow: 0 3px 0 rgba(7,19,29,.12); min-height: 100px; }
.dc img { width: 52px; height: 52px; object-fit: contain; pointer-events: none; } .dc .dn { font-size: 11px; font-weight: 700; line-height: 1.1; text-align: center; height: 24px; display: flex; align-items: center; color: #3a4654; }
.dc .dp { display: flex; align-items: center; font-size: 13px; font-weight: 700; color: #a56a00; } .dc.in { box-shadow: 0 0 0 3px #5cc25a, 0 3px 0 rgba(7,19,29,.12); background: #f0ffe9; }
.dc .ck { position: absolute; right: -4px; top: -6px; width: 22px; height: 22px; border-radius: 50%; background: #3fb34a; color: #fff; font-size: 13px; display: grid; place-items: center; font-style: normal; text-decoration: none; }
.dc.lock img, .dc.nost img { filter: grayscale(1) brightness(.55); opacity: .7; } .dc .lk { font-size: 14px; font-weight: 700; color: #6a7684; font-style: normal; margin-top: 3px; }
.pips { display: flex; gap: 2px; } .pips i { width: 7px; height: 7px; border-radius: 50%; background: #d9dee5; } .pips i.on { background: #ffb13b; }
.ups { display: flex; flex-direction: column; gap: 8px; } .up { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 20px; padding: 8px 10px; box-shadow: 0 3px 0 rgba(7,19,29,.12); }
.up .ui { font-size: 34px; } .ul { flex: 1; display: flex; flex-direction: column; gap: 3px; font-size: 16px; font-weight: 700; } .pp { display: flex; gap: 4px; } .pp i { width: 12px; height: 12px; border-radius: 4px; background: #d9dee5; } .pp i.on { background: #ffb13b; } .pp i.off { background: #eceff3; opacity: .5; }
.ubtn { min-width: 92px; height: 46px; border-radius: 16px; background: linear-gradient(180deg,#4fd2ff,#1f8cf0); box-shadow: 0 4px 0 #1568b0; color: #fff; font-size: 17px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 10px; } .ubtn:disabled { filter: grayscale(.8); opacity: .55; } .ubtn:active { transform: translateY(3px); }
#hub .open-btn { position: absolute; left: 50%; bottom: calc(14px + var(--safe-b)); transform: translateX(-50%); }
#hub .hub-home { position: absolute; left: 12px; bottom: calc(24px + var(--safe-b)); }
.unlock { position: fixed; left: 50%; top: 26%; transform: translate(-50%,-50%); z-index: 20; background: rgba(255,255,255,.96); border-radius: 26px; padding: 12px 16px 14px; box-shadow: 0 10px 34px rgba(7,19,29,.4); max-width: 94vw; text-align: center; animation: sheetin .3s ease-out; }
.ul-t { font-size: 22px; font-weight: 700; color: #e08a00; margin-bottom: 6px; letter-spacing: 1px; } .ul-r { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 320px; }
.unlock .uc.d { width: 56px; height: 56px; } .unlock .uc.d img { width: 48px; height: 48px; }

.autob { flex: none; width: 40px; height: 36px; border-radius: 12px; background: #eef1f5; font-size: 20px; box-shadow: 0 3px 0 rgba(7,19,29,.12); } .autob.on { background: linear-gradient(180deg,#ffe36a,#ffa51a); box-shadow: 0 3px 0 #b9680a; }

.bub .al { position: absolute; right: -9px; top: -9px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px #ff4d4d; font-size: 13px; display: grid; place-items: center; font-style: normal; } .bub .al.g { box-shadow: 0 0 0 2px #1f8cf0; }
.bub.resv { background: #d9ecff; box-shadow: 0 0 0 3px #1f8cf0, 0 3px 0 rgba(7,19,29,.2); } .bub.resv::after { border-top-color: #d9ecff; } .bub.dl { background: #fff0c8; }
.ib.al { background: #ffe0e0; box-shadow: 0 6px 0 rgba(180,40,40,.3), inset 0 0 0 3px #ff4d4d; } .ib.al .np { background: #ff4d4d; box-shadow: 0 2px 0 #a01818; }
.brs { display: flex; gap: 6px; justify-content: center; margin-bottom: 8px; } .br { width: 52px; height: 42px; border-radius: 14px; background: #eef1f5; font-size: 22px; box-shadow: 0 3px 0 rgba(7,19,29,.12); } .br.on { background: linear-gradient(180deg,#ffb13b,#ff7a1a); box-shadow: 0 3px 0 #c4520a; }
.up.dim { opacity: .55; } .up .ui { width: 40px; text-align: center; } .ul b { font-size: 15px; }

.chip.hint { animation: hintp .6s infinite alternate; box-shadow: 0 0 0 4px #ffb13b, 0 4px 0 rgba(7,19,29,.22); } @keyframes hintp { to { transform: translateY(-6px) scale(1.08); } }

.achg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .ac { position: relative; background: #fff; border-radius: 18px; padding: 8px 8px 6px; display: grid; grid-template-columns: 38px 1fr; gap: 2px 6px; align-items: center; box-shadow: 0 3px 0 rgba(7,19,29,.12); } .ac.done { background: #fff6d6; box-shadow: 0 0 0 3px #ffc62e, 0 3px 0 rgba(7,19,29,.12); }
.ac .ai { font-size: 30px; grid-row: span 2; text-align: center; } .ab { height: 9px; border-radius: 6px; background: #e3e8ee; overflow: hidden; } .ab s { display: block; height: 100%; background: linear-gradient(90deg,#8fe05a,#ffd45a); text-decoration: none; } .ac b { font-size: 13px; color: #4a5663; }
.as { grid-column: 1 / -1; display: flex; gap: 4px; justify-content: center; } .as i { width: 14px; height: 14px; background: #d9dee5; clip-path: polygon(50% 0,62% 36%,100% 38%,70% 60%,80% 100%,50% 76%,20% 100%,30% 60%,0 38%,38% 36%); } .as i.on { background: #ffb13b; }
.rival { display: flex; align-items: center; justify-content: center; gap: 8px; background: #fff; border-radius: 18px; padding: 6px 10px; margin-bottom: 8px; font-weight: 700; font-size: 16px; box-shadow: 0 3px 0 rgba(7,19,29,.1); } .rival em { font-style: normal; background: #eef1f5; border-radius: 999px; padding: 2px 10px; } .rival em.win { background: #d9fbd0; color: #1d7a2a; } .rival span { font-size: 20px; }

.roster { display: flex; gap: 6px; justify-content: center; margin-bottom: 8px; flex-wrap: wrap; } .rc { position: relative; width: 40px; height: 40px; border-radius: 12px; background: #fff; display: grid; place-items: center; font-size: 22px; box-shadow: 0 3px 0 rgba(7,19,29,.12); } .rc i { position: absolute; right: -4px; bottom: -4px; min-width: 18px; height: 18px; border-radius: 9px; background: #ff7a1a; color: #fff; font-size: 12px; display: grid; place-items: center; font-weight: 700; }

.plate .sauce { position: absolute; width: 22px; height: 22px; margin: -11px; border-radius: 50%; animation: dot .3s ease-out; box-shadow: 0 2px 4px rgba(0,0,0,.25); pointer-events: none; } @keyframes dot { from { transform: scale(0); } to { transform: scale(1); } }

.themes { display: flex; gap: 6px; justify-content: center; margin-bottom: 8px; } .sw { width: 36px; height: 36px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px #d4dbe3, 0 3px 0 rgba(7,19,29,.15); font-size: 12px; font-weight: 700; color: #fff; display: grid; place-items: center; } .sw.on { box-shadow: 0 0 0 3px #ff7a1a, 0 3px 0 rgba(7,19,29,.15); } .sw.lock { filter: grayscale(.9); opacity: .55; }
.bub .al.h { color: #e0245e; font-size: 11px; font-weight: 700; box-shadow: 0 0 0 2px #ff7aa8; width: auto; padding: 0 5px; border-radius: 10px; }
.slots.cdx { background: #fff3d6; font-size: 15px; }

#hub .fold { position: absolute; right: 12px; top: -16px; width: 54px; height: 30px; border-radius: 14px; background: #fff; box-shadow: 0 3px 0 rgba(7,19,29,.18); font-size: 14px; color: #5a6672; z-index: 2; }
.hub-p.min .tabs, .hub-p.min .hub-b { display: none; } .hub-p.min { padding-bottom: calc(10px + var(--safe-b)); } .hub-p.min .open-btn { position: static !important; transform: none !important; margin: 0 auto; } .hub-p.min .hub-home { bottom: calc(14px + var(--safe-b)); }
@media (min-aspect-ratio: 1/1) { #hub { left: 50%; right: auto; width: 480px; margin-left: -240px; } #rails { left: 0; right: 0; margin: 0 auto; width: 480px; } #sheet { left: 0; right: 0; margin: 0 auto; width: 464px; } #topc { } }

#rails { padding-bottom: calc(18px + var(--safe-b)); max-height: 46vh; overflow-y: auto; scrollbar-width: none; } #rails::-webkit-scrollbar { display: none; }

#tutdim { position: fixed; inset: 0; z-index: 4; background: rgba(7,19,29,.22); pointer-events: none; }
#tring { position: fixed; z-index: 9; border: 4px solid #ffd45a; border-radius: 22px; box-shadow: 0 0 0 3px rgba(255,255,255,.7), 0 0 22px #ffd45a; pointer-events: none; animation: tring .7s infinite alternate; } #tring.wait { border-color: #8fe05a; box-shadow: 0 0 0 3px rgba(255,255,255,.5), 0 0 14px #8fe05a; animation: none; opacity: .7; } #tring.again { border-width: 6px; }
@keyframes tring { to { transform: scale(1.06); } }
#finger { position: fixed; z-index: 10; font-size: 44px; line-height: 1; pointer-events: none; filter: drop-shadow(0 4px 3px rgba(0,0,0,.4)); animation: ftap .6s infinite alternate; } #finger.again { animation-duration: .3s; font-size: 52px; }
@keyframes ftap { to { margin-top: -14px; } }
#tutskip { position: fixed; left: 12px; top: calc(70px + var(--safe-t)); z-index: 11; height: 30px; padding: 0 12px; border-radius: 999px; background: rgba(255,255,255,.85); font-size: 13px; font-weight: 700; color: #4a5663; box-shadow: 0 3px 0 rgba(7,19,29,.18); }
#tipc { position: fixed; left: 50%; top: 20%; transform: translateX(-50%); z-index: 12; display: flex; gap: 8px; align-items: center; background: #fff; border-radius: 22px; padding: 10px 20px; font-size: 40px; box-shadow: 0 8px 26px rgba(7,19,29,.35); pointer-events: none; } #tipc b { font-size: 30px; color: #e0245e; } #tipc.show { animation: tipin 2.6s ease-out forwards; } @keyframes tipin { 0% { opacity: 0; transform: translate(-50%, 20px) scale(.7); } 12% { opacity: 1; transform: translate(-50%, 0) scale(1.08); } 20% { transform: translate(-50%, 0) scale(1); } 85% { opacity: 1; } 100% { opacity: 0; } }

.rrow { padding: 13px 8px 15px; } #rails { gap: 0; padding-top: 4px; }
/* 확장·심사·환생 버튼은 스크롤 영역 맨 아래에 항상 보이게(작은 화면에서 접힌 채 못 눌리던 문제) */
#btnGrow, #btnTrial, #btnPres { position: sticky; bottom: 4px; z-index: 2; }
