:root {
  --ink: #3a224a;
  --ink2: #6b5480;
  --cream: #fffaf0;
  --gold1: #ffe066; --gold2: #ffb41f; --gold3: #d9800b;
  --pink: #ff5e8a; --sunset1: #ffa63d; --sunset2: #ff5e7e;
  --chip: rgba(44, 26, 74, 0.78);
  --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%; overflow: hidden; background: #4cb8e6; font-family: Fredoka, 'Baloo 2', Nunito, system-ui, sans-serif; color: var(--ink); user-select: none; -webkit-user-select: none; touch-action: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
#world { position: fixed; inset: 0; display: block; touch-action: none; }
body.placing #world { cursor: crosshair; }
[hidden] { display: none !important; }

/* carregamento */
#loading { position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; justify-items: center; gap: 10px; background: linear-gradient(#ffb36b, #ff7e9b 55%, #8b5cf6); color: #fff; transition: opacity .6s ease; overflow: hidden; }
#loading:before { content: ''; position: absolute; inset: -20%; background: repeating-conic-gradient(from 0deg, rgba(255,243,193,.28) 0 8deg, transparent 8deg 20deg); mask-image: radial-gradient(circle, #000 0 18%, transparent 62%); animation: spin 28s linear infinite; }
#loading b { position: relative; font-size: 46px; text-shadow: 0 4px 0 #b13f7a; animation: rise .7s cubic-bezier(.16,1,.3,1); }
#loading.gone { opacity: 0; pointer-events: none; }
.sunload { position: relative; width: min(280px, 72vw); height: auto; background: none; box-shadow: none; animation: none; filter: drop-shadow(0 10px 16px rgba(90, 30, 60, .28)); }
#topbar { animation: rise .55s cubic-bezier(.16,1,.3,1); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) { #loading:before, #loading b, #topbar { animation: none; } }

/* topo */
#topbar { position: fixed; top: calc(10px + var(--safe-t)); left: 10px; right: 10px; display: flex; align-items: center; gap: 8px; pointer-events: none; z-index: 5; }
#topbar > * { pointer-events: auto; }
.avatar { --p: 0; width: 58px; height: 58px; border-radius: 50%; flex: none; position: relative;
  background: conic-gradient(#ffd34d calc(var(--p) * 1%), rgba(255,255,255,.35) 0); padding: 5px; box-shadow: 0 4px 0 rgba(44,26,74,.35); }
.avatar::before { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3a6, #ffc93c 50%, #f08a12); }
.avatar span { position: relative; display: grid; place-items: center; height: 100%; font-weight: 700; font-size: 22px; color: #7a3e00; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip { display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px 0 6px; border-radius: 20px; background: var(--chip); color: #fff; box-shadow: inset 0 -3px 0 rgba(0,0,0,.25); backdrop-filter: blur(4px); }
.chip img { width: 30px; height: 30px; object-fit: contain; filter: drop-shadow(0 1px 1px #0004); }
.chip b { font-size: 18px; font-weight: 700; }
.chip small { font-size: 12px; opacity: .8; font-weight: 500; }
.chip.ticket { padding-left: 10px; }
.chip.wallet { padding-left: 8px; }
.chip.wallet img { width: 26px; height: 26px; border-radius: 50%; }
.chip.wallet.on small { color: #ffe08a; opacity: 1; }
.chip.pulse { animation: pulse .45s; }
.city-top { position: fixed; top: calc(12px + var(--safe-t)); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 5px; z-index: 4; pointer-events: none; }
.city-title { display: flex; align-items: center; gap: 4px; padding: 3px; border-radius: 16px; background: rgba(255,255,255,.82); box-shadow: 0 3px 0 rgba(44,26,74,.18); font-weight: 700; font-size: 15px; color: var(--ink); white-space: nowrap; pointer-events: auto; }
.city-title b { padding: 0 8px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.city-title button { width: 28px; height: 28px; border-radius: 12px; background: #f1ebf7; color: var(--ink2); font-size: 18px; font-weight: 700; line-height: 1; }
.city-title button:active { background: #e3d8f0; transform: translateY(1px); }
.live-chip { display: inline-flex; align-items: center; gap: 2px; padding: 4px 6px; border-radius: 99px; background: linear-gradient(rgba(44,26,74,.82), rgba(30,15,50,.86)); border: 1.5px solid rgba(255,255,255,.22); box-shadow: 0 4px 12px rgba(20,10,40,.28); color: #fff; font-size: 12px; pointer-events: auto; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: transform .12s, box-shadow .12s; }
.live-chip:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(20,10,40,.34); }
.live-chip:active { transform: translateY(1px); }
.lv-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px 3px 7px; border-radius: 99px; background: linear-gradient(#ff6b6b, #e8384f); font-size: 10.5px; font-weight: 800; letter-spacing: .8px; box-shadow: inset 0 -2px 0 rgba(0,0,0,.15); }
.lv-badge i { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: live 1.6s infinite; }
.lv-stat { display: inline-flex; align-items: baseline; gap: 3px; padding: 2px 8px; }
.lv-stat + .lv-stat { border-left: 1.5px solid rgba(255,255,255,.18); }
.lv-stat em { font-style: normal; font-size: 12px; align-self: center; }
.lv-stat b { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; display: inline-block; }
.lv-stat b.bump { animation: bump .5s; }
.lv-stat small { font-size: 11px; opacity: .78; font-weight: 600; }
.lv-stat.on i { width: 7px; height: 7px; border-radius: 50%; background: #5ee37d; box-shadow: 0 0 6px #5ee37d; align-self: center; }
.lv-go { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: rgba(255,255,255,.16); font-size: 15px; font-weight: 700; line-height: 1; }
@keyframes live { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes bump { 40% { transform: scale(1.3); color: #ffe27a; } }
@media (pointer: coarse) { .city-title button { display: none; } }
@media (max-width: 760px) { .city-top { top: auto; bottom: calc(128px + var(--safe-b)); } .city-title { display: none; } }
body.visiting .city-top .live-chip { display: none; }
@media (prefers-reduced-motion: reduce) { .live-chip i { animation: none; } }

.quest { position: fixed; top: calc(76px + var(--safe-t)); left: 10px; z-index: 5; display: flex; align-items: center; gap: 8px; max-width: min(360px, calc(100vw - 120px)); padding: 8px 12px; border-radius: 16px; background: rgba(255,250,240,.94); box-shadow: 0 4px 0 rgba(44,26,74,.25); text-align: left; font-size: 14px; font-weight: 500; }
.quest b { flex: none; padding: 2px 8px; border-radius: 10px; background: #ffe9a8; color: #8a4a00; font-size: 13px; }
.quest.ready { background: linear-gradient(#fff3b0, #ffd34d); animation: bob 1.2s ease-in-out infinite; }
.quest.ready b { background: #fff; }

.side.right { position: fixed; right: 10px; top: calc(62px + var(--safe-t)); display: flex; flex-direction: column; align-items: flex-end; gap: 10px; z-index: 5; }
.sun-btn { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 8px 14px 8px 10px; border-radius: 18px; background: linear-gradient(#ffffff, #ffeec2); box-shadow: 0 4px 0 #d9a440; text-align: left; }
.sun-btn .sun-ico { grid-row: span 2; font-size: 28px; }
.sun-btn b { font-size: 15px; }
.sun-btn small { font-size: 12px; color: var(--ink2); }
.sun-btn.on { background: linear-gradient(#ffe066, #ffb41f); box-shadow: 0 4px 0 var(--gold3), 0 0 24px rgba(255,200,60,.8); }
.sun-btn.on .sun-ico { animation: spin 4s linear infinite; }
.sun-btn.on small { color: #7a3e00; font-weight: 600; }
.round-btn { position: relative; width: 48px; height: 48px; border-radius: 50%; background: #fff; box-shadow: 0 4px 0 rgba(44,26,74,.3); font-size: 24px; display: grid; place-items: center; }
.round-btn.small { width: 40px; height: 40px; font-size: 22px; font-weight: 700; color: var(--ink2); }
.dot { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #ff4f5e; color: #fff; font-style: normal; font-size: 12px; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }

/* barra de baixo */
#bottombar { position: fixed; left: 0; right: 0; bottom: calc(12px + var(--safe-b)); display: flex; align-items: flex-end; justify-content: space-between; padding: 0 12px; pointer-events: none; z-index: 5; }
#bottombar > * { pointer-events: auto; }
.tile-btn { position: relative; width: 74px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.tile-btn img, .tile-btn .grid4 { width: 62px; height: 62px; border-radius: 18px; padding: 4px; box-shadow: 0 5px 0 rgba(44,26,74,.3), inset 0 -4px 0 rgba(0,0,0,.12); }
.tile-btn.pink img { background: linear-gradient(#ffd0e4, #ff8fbf); }
.tile-btn.green img { background: linear-gradient(#d8ffc8, #8fe07a); }
.tile-btn.blue .grid4 { background: linear-gradient(#e2ecff, #a9c4ff); display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 12px; }
.grid4 i { border-radius: 6px; background: #ff7e9b; }
.grid4 i:nth-child(2) { background: #ffc93c; } .grid4 i:nth-child(3) { background: #4fcf6a; } .grid4 i:nth-child(4) { background: #3fa2ff; }
.tile-btn b { font-size: 13px; color: #fff; text-shadow: 0 2px 0 rgba(44,26,74,.7), 0 0 6px rgba(44,26,74,.5); }
.tile-btn .dot { top: -6px; right: 0; }
#crateBtn { margin-right: 4px; }
#buildBtn { margin-right: auto; }
.collect { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 104px; display: flex; flex-direction: column; align-items: center; }
.collect img { width: 96px; height: 96px; border-radius: 50%; padding: 3px; object-fit: contain; background: radial-gradient(circle at 40% 30%, #fff5b8, #ffcf33 55%, #f39c12); border: 5px solid #fff; box-shadow: 0 6px 0 var(--gold3), 0 8px 18px rgba(0,0,0,.25); transition: transform .12s; }
.collect.ready img { animation: glow 1.4s ease-in-out infinite; }
.collect:active img, .tile-btn:active img, .tile-btn:active .grid4 { transform: translateY(3px) scale(.97); }
.collect b { margin-top: 4px; font-size: 14px; color: #fff; text-shadow: 0 2px 0 rgba(44,26,74,.7); }

.place-bar { position: fixed; left: 50%; bottom: calc(140px + var(--safe-b)); transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 18px; border-radius: 20px; background: var(--cream); box-shadow: 0 6px 0 rgba(44,26,74,.25); font-weight: 600; width: max-content; max-width: calc(100vw - 20px); }

#toasts { position: fixed; top: calc(120px + var(--safe-t)); left: 50%; transform: translateX(-50%); z-index: 50; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; width: min(92vw, 460px); }
.toast { padding: 10px 18px; border-radius: 16px; background: rgba(44,26,74,.92); color: #fff; font-weight: 500; text-align: center; animation: drop .25s; transition: opacity .4s, transform .4s; }
.toast.warn { background: #ff5e6e; }
.toast.out { opacity: 0; transform: translateY(-8px); }

/* botões */
.btn { padding: 12px 20px; border-radius: 16px; font-weight: 700; font-size: 16px; background: #fff; box-shadow: 0 4px 0 rgba(44,26,74,.25); transition: transform .08s, filter .2s; }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 rgba(44,26,74,.25); }
.btn.gold { background: linear-gradient(var(--gold1), var(--gold2)); box-shadow: 0 4px 0 var(--gold3); color: #5a2a00; }
.btn.ghost { background: #f1ebf7; box-shadow: 0 4px 0 #cbbfd9; }
.btn.red { background: linear-gradient(#ff8a8a, #ff4f5e); color: #fff; box-shadow: 0 4px 0 #b9303c; }
.btn:disabled { filter: grayscale(.8) opacity(.6); cursor: not-allowed; }
.link { color: var(--ink2); text-decoration: underline; font-size: 14px; margin-top: 10px; }
.link.danger { color: #d33; }

/* modais */
.modal-wrap { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; background: rgba(30,15,50,.45); backdrop-filter: blur(3px); animation: fade .2s; }
.modal-wrap.closing { animation: fade .18s reverse forwards; }
.modal { width: min(480px, 100%); max-height: min(88vh, 760px); display: flex; flex-direction: column; border-radius: 28px; background: var(--cream); border: 4px solid #fff; box-shadow: 0 10px 0 rgba(44,26,74,.25), 0 20px 50px rgba(0,0,0,.3); overflow: hidden; animation: pop .42s cubic-bezier(.16,1.2,.3,1); }
.modal header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 14px 20px; background: linear-gradient(100deg, var(--sunset1), var(--sunset2)); color: #fff; }
.modal header h2 { margin: 0; font-size: 22px; text-shadow: 0 2px 0 rgba(150,30,70,.5); }
.modal .x { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.3); color: #fff; font-weight: 700; }
.modal .body { padding: 16px 20px; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; }
.modal .body p { margin: 8px 0; line-height: 1.4; }
.modal .body h3 { margin: 16px 0 8px; font-size: 17px; }
.modal footer { display: flex; gap: 10px; padding: 12px 20px 18px; }
.modal footer .btn { flex: 1; }
.muted { color: var(--ink2); font-size: 14px; }
.big { font-size: 22px; font-weight: 700; text-align: center; }
.center { text-align: center; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 10px; background: var(--c); color: #fff; font-size: 12px; font-weight: 700; text-shadow: 0 1px 0 rgba(0,0,0,.25); }

.b-head { display: flex; gap: 14px; align-items: center; }
.b-head img { width: 120px; height: 120px; flex: none; border-radius: 20px; background: linear-gradient(#e8f8ff, #c7ecff); }
.b-head .row { display: flex; gap: 8px; align-items: center; }
.lv { font-weight: 600; font-size: 14px; color: var(--ink2); }
.stats { display: grid; gap: 6px; margin-top: 12px; }
.stats div { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 12px; background: #fff; }
.stats span { color: var(--ink2); }
.bar { height: 12px; margin-top: 8px; border-radius: 6px; background: #eadff5; overflow: hidden; }
.bar.small { height: 8px; margin-top: 4px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffd34d, #ffae1a); border-radius: 6px; }

.sheet .modal, .modal.sheet { width: min(560px, 100%); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 18px; background: #fff; box-shadow: 0 4px 0 rgba(44,26,74,.15); border: 3px solid var(--c, #fff); text-align: center; }
.card img { width: 84px; height: 84px; }
.card b { font-size: 14px; line-height: 1.1; }
.card small { font-size: 12px; color: var(--ink2); }
.card .count { position: absolute; top: 6px; right: 8px; font-style: normal; font-weight: 700; color: var(--ink2); }
.card:active { transform: scale(.97); }
.empty { text-align: center; }
.empty img { width: 110px; }
.sheet-actions { display: flex; gap: 10px; margin-top: 14px; }
.sheet-actions .btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; }
.road-ico { display: inline-block; width: 28px; height: 16px; background: #f2dfb5; border: 2px solid #d9bd86; transform: skewX(-30deg); border-radius: 3px; }

/* tiros */
.demo { padding: 10px 14px; margin-bottom: 12px; border-radius: 14px; background: #e9e0ff; color: #4b2f8a; font-size: 14px; font-weight: 500; }
.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pack { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 6px 12px; border-radius: 20px; background: linear-gradient(#ffffff, #f4ecff); box-shadow: 0 5px 0 #c8b6e8; border: 3px solid #e3d6fb; }
.pack.p5 { background: linear-gradient(#ffffff, #e6f3ff); box-shadow: 0 5px 0 #9fc8ef; border-color: #cfe6ff; }
.pack.p10 { background: linear-gradient(#fff9e0, #ffe39a); box-shadow: 0 5px 0 #e0a83a; border-color: #ffd36b; }
.pack:active { transform: translateY(3px); }
.pack b { font-size: 17px; }
.pack .price { font-size: 13px; font-weight: 600; color: var(--ink2); text-align: center; }
.pack .price small { display: block; font-size: 11px; font-weight: 500; opacity: .75; }
.ptag { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 2px 8px; border-radius: 8px; background: var(--pink); color: #fff; font-size: 11px; font-style: normal; font-weight: 700; }
.pack-boxes { position: relative; height: 66px; width: 90px; }
.pack-boxes img { position: absolute; width: 60px; bottom: 0; left: 50%; transform: translateX(-50%); }
.pack-boxes.n2 img:nth-child(1), .pack-boxes.n3 img:nth-child(1) { transform: translateX(-90%) rotate(-10deg) scale(.85); }
.pack-boxes.n3 img:nth-child(2) { transform: translateX(-10%) rotate(10deg) scale(.85); }
.pack-boxes.n3 img:nth-child(3) { z-index: 1; }
.f2p { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; margin-top: 14px; padding: 12px; border-radius: 18px; background: #fff; }
.f2p small { display: block; color: var(--ink2); font-size: 12px; }
.f2p #buyTicket { grid-column: span 2; padding: 9px; font-size: 14px; }
.odds-list { display: grid; gap: 6px; }
.odd { display: grid; grid-template-columns: 84px 50px 1fr; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 14px; background: #fff; border-left: 6px solid var(--c); }
.odd b { color: var(--c); filter: brightness(.85); }
.odd span { font-weight: 600; font-size: 14px; }
.odd-ico { display: flex; gap: 4px; justify-content: flex-end; }
.odd-ico img { width: 40px; height: 40px; }
.pack { min-width: 0; }
.pack-boxes { width: 100%; max-width: 90px; }
@media (max-width: 440px) {
  .packs { gap: 7px; }
  .pack { padding: 16px 4px 10px; }
  .pack b { font-size: 15px; }
  .ptag { white-space: normal; width: max-content; max-width: 104%; text-align: center; line-height: 1.1; font-size: 10px; top: -12px; }
  .odd { grid-template-columns: 1fr auto; row-gap: 4px; }
  .odd span { justify-self: end; }
  .odd-ico { grid-column: 1 / -1; justify-content: flex-start; flex-wrap: wrap; }
  .odd-ico img { width: 36px; height: 36px; }
  .acards { grid-template-columns: repeat(3, 1fr); }
}

.reveal .body { overflow: visible; }
.reveal-stage { position: relative; display: grid; place-items: center; height: 230px; }
.reveal-stage img { width: 190px; position: relative; z-index: 1; }
.reveal-stage .shake { animation: shake .5s ease-in-out infinite; filter: drop-shadow(0 0 20px var(--c, #ffd34d)); }
.reveal-stage.done img { animation: popin .5s cubic-bezier(.2,1.6,.4,1); }
.rays { position: absolute; width: 260px; height: 260px; border-radius: 50%; background: repeating-conic-gradient(from 0deg, var(--c) 0 10deg, transparent 10deg 20deg); opacity: .5; animation: spin 8s linear infinite; mask: radial-gradient(circle, #000 30%, transparent 70%); -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%); }
.reveal-name { text-align: center; }
.reveal-name h3 { margin: 6px 0 2px; font-size: 24px; }
.reveal-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
@media (max-width: 520px) { .reveal-grid { grid-template-columns: repeat(3, 1fr); } }
.rcard { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; border-radius: 14px; background: #fff; border: 3px solid var(--c); text-align: center; opacity: 0; animation: flip .45s forwards; }
.rcard img { width: 64px; height: 64px; }
.rcard b { font-size: 11px; line-height: 1.1; min-height: 24px; }
.rcard .tag { font-size: 10px; padding: 1px 6px; }
.rcard.r3, .rcard.r4, .rcard.r5 { box-shadow: 0 0 16px var(--c); background: linear-gradient(#fff, color-mix(in srgb, var(--c) 18%, #fff)); }
.multi .modal, .modal.multi { width: min(600px, 100%); }

.missions .mission { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 10px 12px; margin-bottom: 8px; border-radius: 14px; background: #fff; }
.mission > div { flex: 1; }
.mission small { color: var(--ink2); font-size: 12px; }
.mission.ok { background: #fff6cf; }
.mission .btn { padding: 8px 12px; font-size: 14px; white-space: nowrap; }

.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day { display: flex; flex-direction: column; align-items: center; padding: 6px 2px; border-radius: 12px; background: #fff; font-size: 11px; }
.day img { width: 32px; height: 32px; }
.day .tk { font-size: 24px; line-height: 32px; }
.day.got { background: #d8f6d0; opacity: .7; }
.day.now { background: linear-gradient(#fff3b0, #ffd34d); transform: scale(1.08); box-shadow: 0 3px 0 var(--gold3); }
.day.seven { background: #ffe1ee; }

.menu-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.menu-grid .mi { flex: 0 0 calc((100% - 20px) / 3); }
.mi { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 4px; border-radius: 18px; background: #fff; box-shadow: 0 4px 0 rgba(44,26,74,.12); }
.mi span { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; font-size: 26px; background: var(--c); box-shadow: inset 0 -4px 0 rgba(0,0,0,.15); }
.mi b { font-size: 13px; }

/* Album */
.album-sum { text-align: center; font-weight: 600; margin: 0 0 4px; }
.album .muted { text-align: center; margin-top: 0; }
.aset { margin: 12px 0; padding: 10px; border-radius: 16px; background: #fff; border: 2px solid color-mix(in srgb, var(--c) 35%, transparent); }
.aset.done { background: color-mix(in srgb, var(--c) 12%, #fff); border-color: var(--c); }
.modal .aset header { display: flex; align-items: baseline; justify-content: flex-start; gap: 8px; margin-bottom: 8px; padding: 0 2px; background: none; color: var(--ink, #3a2a4a); }
.aset header b { color: var(--c); font-size: 16px; filter: brightness(.8); }
.aset header span { font-weight: 700; }
.aset header em { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: color-mix(in srgb, var(--c) 18%, #fff); }
.acards { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
.acard { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 6px 4px; border-radius: 12px; background: color-mix(in srgb, var(--c) 8%, #fff); }
.acard img { width: 64px; height: 64px; }
.acard b { font-size: 12px; line-height: 1.15; }
.acard small { font-size: 11px; opacity: .7; }
.acard.locked img { filter: brightness(0) opacity(.25); }
.acard.locked b { opacity: .5; }
.city-name { margin-top: 14px; }
.city-name label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink2); }
.city-name input { font: inherit; font-size: 16px; padding: 10px 12px; border-radius: 12px; border: 2px solid #e3d6fb; color: var(--ink); user-select: text; }

.wallet-on { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: #e6fff0; }
.wallet-on .dot { position: static; width: 10px; height: 10px; min-width: 0; padding: 0; border: 0; background: #14c57a; }
.ca { padding: 10px; border-radius: 12px; background: #fff; margin: 10px 0; }
.ca code { display: block; font-size: 12px; word-break: break-all; }
.tiers { display: grid; gap: 6px; }
.tier { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 8px 12px; border-radius: 12px; background: #fff; }
.tier em { grid-column: span 2; font-style: normal; font-size: 13px; color: #1f9a5a; font-weight: 600; }
.tier.me { outline: 3px solid #f0b90b; }

.levelup .lvl-big { width: 120px; height: 120px; margin: 4px auto; border-radius: 50%; display: grid; place-items: center; font-size: 60px; font-weight: 700; color: #7a3e00; background: radial-gradient(circle at 35% 30%, #fff3a6, #ffc93c 50%, #f08a12); box-shadow: 0 0 40px #ffd34d; animation: popin .6s cubic-bezier(.2,1.6,.4,1); }
.levelup .body, .welcome .body, .expand .body, .help .body { text-align: center; }
.welcome-coin { width: 110px; animation: bob 1.5s ease-in-out infinite; }
.help-ico { width: 150px; height: 150px; }
.help .dots { display: flex; justify-content: center; gap: 6px; }
.help .dots i { width: 8px; height: 8px; border-radius: 4px; background: #e3d6fb; }
.help .dots i.on { width: 22px; background: var(--sunset1); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { transform: scale(1.12); } }
@keyframes bob { 50% { transform: translateY(-4px); } }
@keyframes glow { 50% { box-shadow: 0 6px 0 var(--gold3), 0 0 34px #ffe066, 0 0 10px #fff; transform: scale(1.04); } }
@keyframes drop { from { opacity: 0; transform: translateY(-10px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
@keyframes popin { from { transform: scale(.2) rotate(-12deg); opacity: 0; } }
@keyframes shake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-7deg) scale(1.04); } 75% { transform: rotate(7deg) scale(1.04); } }
@keyframes flip { from { opacity: 0; transform: rotateY(90deg) scale(.8); } to { opacity: 1; transform: none; } }

@media (max-width: 520px) {
  .chip { height: 34px; } .chip b { font-size: 16px; } .chip img { width: 26px; height: 26px; }
  .chip small { display: none; }
  .chip.wallet small { display: inline; }
  .avatar { width: 50px; height: 50px; }
  .quest { top: calc(110px + var(--safe-t)); font-size: 13px; max-width: calc(100vw - 152px); }
  .side.right { top: calc(110px + var(--safe-t)); }
  .sun-btn { padding: 6px 10px 6px 8px; } .sun-btn b { font-size: 13px; }
  .tile-btn { width: 64px; } .tile-btn img, .tile-btn .grid4 { width: 54px; height: 54px; }
  .collect img { width: 86px; height: 86px; }
  .packs { gap: 6px; } .pack b { font-size: 15px; }
  .odd-ico img { width: 32px; height: 32px; }
}

/* ---------------------------------------------------------------- pull reveal */
.pull-fx { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; overflow: hidden; overflow: clip; touch-action: manipulation; user-select: none; animation: fade .25s; }
.pull-fx.out { opacity: 0; transition: opacity .25s; }
.pull-fx canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
.pfx-bg { position: fixed; inset: 0; background: radial-gradient(circle at 50% 45%, #4a2d8a 0%, #1c1038 70%); }
.pull-fx.opened .pfx-bg { background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--best) 60%, #2a1850) 0%, #150a2a 75%); }
.pfx-bg::after { content: ''; position: absolute; left: 50%; top: 45%; width: 180vmax; height: 180vmax; background: repeating-conic-gradient(rgba(255,255,255,.07) 0 7deg, transparent 7deg 18deg); opacity: 0; transition: opacity .8s; animation: raysSpin 40s linear infinite; }
.pull-fx.opened .pfx-bg::after { opacity: 1; }
@keyframes raysSpin { from { transform: translate(-50%, -50%) rotate(0); } to { transform: translate(-50%, -50%) rotate(360deg); } }
.pfx-beam { position: absolute; left: 50%; top: -20%; height: 66%; width: 150px; transform: translateX(-50%) scaleX(0); background: linear-gradient(to top, var(--best), color-mix(in srgb, var(--best) 30%, transparent) 60%, transparent); filter: blur(10px); opacity: 0; z-index: 1; pointer-events: none; }
.pull-fx.opened .pfx-beam { animation: beam 1.4s ease-out forwards; }
@keyframes beam { 0% { opacity: 0; transform: translateX(-50%) scaleX(0); } 18% { opacity: 1; transform: translateX(-50%) scaleX(1.6); } 100% { opacity: .3; transform: translateX(-50%) scaleX(.7); } }
.pfx-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 4; }
.pfx-flash.go { animation: pfxFlash .7s ease-out; }
@keyframes pfxFlash { 0% { opacity: 0; } 8% { opacity: .95; } 100% { opacity: 0; } }
.pull-fx.quake .pfx-stage { animation: quake .55s; }
@keyframes quake { 10%, 50%, 90% { transform: translate(-7px, 4px); } 30%, 70% { transform: translate(7px, -5px); } }
.pfx-skip, .pfx-close { position: absolute; z-index: 5; top: calc(14px + env(safe-area-inset-top)); right: 14px; padding: 8px 16px; border-radius: 99px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); color: #fff; font-weight: 700; font-size: 15px; backdrop-filter: blur(6px); }
.pfx-close { width: 42px; height: 42px; padding: 0; font-size: 18px; }
.pfx-skip[hidden], .pfx-close[hidden] { display: none; }
.pfx-stage { position: relative; z-index: 2; width: min(600px, 94vw); display: flex; flex-direction: column; align-items: center; gap: 14px; }

.pfx-crate { position: relative; width: 250px; height: 250px; --c: #ffffff; --k: 1; animation: crateDrop .55s cubic-bezier(.3,1.4,.5,1) both; }
@keyframes crateDrop { from { transform: translateY(-85vh) scale(.6) rotate(-12deg); } 72% { transform: translateY(0) scale(1.1, .88); } to { transform: none; } }
.pfx-crate img { position: relative; z-index: 1; width: 100%; filter: drop-shadow(0 14px 18px rgba(0,0,0,.45)); }
.pfx-crate.idle img { animation: crateIdle 1.4s ease-in-out infinite; }
@keyframes crateIdle { 50% { transform: translateY(-10px) rotate(2deg); } }
.pfx-aura { position: absolute; inset: -35%; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--c) 90%, transparent) 0%, color-mix(in srgb, var(--c) 35%, transparent) 35%, transparent 64%); opacity: .45; transition: background .2s, transform .2s, opacity .2s; animation: auraPulse 1.3s ease-in-out infinite; }
@keyframes auraPulse { 50% { transform: scale(1.08); opacity: .7; } }
.pfx-crate.charge img { animation: crateShake calc(.34s / var(--k)) linear infinite; }
.pfx-crate.charge .pfx-aura { animation: none; opacity: 1; transform: scale(calc(.85 + var(--k) * .2)); }
@keyframes crateShake { 0%, 100% { transform: rotate(0) scale(1); } 25% { transform: rotate(-7deg) scale(1.06); } 75% { transform: rotate(7deg) scale(1.06); } }
.pfx-crate.pop { animation: cratePop .42s ease-in forwards; }
@keyframes cratePop { 0% { transform: scale(1); } 35% { transform: scale(1.28); } 100% { transform: scale(2); opacity: 0; } }
.pfx-hint { margin: 0; color: #fff; font-size: 21px; font-weight: 700; text-shadow: 0 2px 0 rgba(0,0,0,.35); animation: pulse 1.2s ease-in-out infinite; }
.pfx-tip { margin: 0; color: rgba(255,255,255,.85); font-weight: 600; }

.pfx-slam { font-size: clamp(46px, 15vw, 104px); font-weight: 800; letter-spacing: .02em; color: #fff; -webkit-text-stroke: 3px var(--c); text-shadow: 0 0 34px var(--c), 0 6px 0 rgba(0,0,0,.35); animation: slam .65s cubic-bezier(.2,1.8,.4,1); white-space: nowrap; }
.pfx-slam.r5 { background: linear-gradient(90deg, #ff4f9a, #ffd34d, #14f195, #3fa2ff, #a45cff, #ff4f9a); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 0 20px #ff4f9a); animation: slam .65s cubic-bezier(.2,1.8,.4,1), rainbow 1.5s linear infinite; }
@keyframes slam { from { transform: scale(3.2) rotate(-10deg); opacity: 0; } }
@keyframes rainbow { to { background-position: 200% 0; } }

.pcard { width: 100%; perspective: 900px; opacity: 0; transform: translateY(45vh) scale(.35) rotate(-24deg); transition: transform .6s cubic-bezier(.2,1.3,.4,1) var(--d, 0ms), opacity .3s var(--d, 0ms); cursor: pointer; }
.pcard.in { opacity: 1; transform: none; }
.pcard-in { position: relative; width: 100%; aspect-ratio: 3 / 4; transform-style: preserve-3d; transition: transform .55s cubic-bezier(.3,1.35,.5,1); }
.pcard:not(.flipped):hover .pcard-in { transform: translateY(-5px) rotate(-1deg); }
.pcard.focus:not(.flipped) .pcard-in { animation: cardTease .45s ease-in-out infinite; }
@keyframes cardTease { 25% { transform: rotate(-4deg) scale(1.06); } 75% { transform: rotate(4deg) scale(1.06); } }
.pcard.flipped .pcard-in { transform: rotateY(180deg); }
.pcard.flipped { cursor: default; }
.pcard-face { position: absolute; inset: 0; border-radius: 16px; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; }
.pcard-back { background: linear-gradient(150deg, #7a4ae0, #3a1f86); border: 3px solid rgba(255,255,255,.55); box-shadow: 0 6px 0 rgba(0,0,0,.3); }
.pcard-back::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(45deg, rgba(255,255,255,.07) 0 8px, transparent 8px 16px); }
.pcard-sun { position: relative; font-size: clamp(26px, 7vw, 44px); color: #ffd34d; filter: drop-shadow(0 0 10px #ffd34d); }
.pcard.r2 .pcard-back, .pcard.r3 .pcard-back { border-color: var(--c); box-shadow: 0 0 18px var(--c), 0 6px 0 rgba(0,0,0,.3); }
.pcard.r4 .pcard-back, .pcard.r5 .pcard-back { border-color: var(--c); animation: backGlow .9s ease-in-out infinite; }
@keyframes backGlow { 0%, 100% { box-shadow: 0 0 16px var(--c), 0 6px 0 rgba(0,0,0,.3); } 50% { box-shadow: 0 0 40px var(--c), 0 0 12px #fff, 0 6px 0 rgba(0,0,0,.3); } }
.pcard-front { transform: rotateY(180deg); gap: 2px; padding: 8px 6px; text-align: center; background: linear-gradient(170deg, #fff 35%, color-mix(in srgb, var(--c) 38%, #fff)); border: 4px solid var(--c); box-shadow: 0 0 26px color-mix(in srgb, var(--c) 70%, transparent), 0 6px 0 rgba(0,0,0,.3); }
.pcard-rays { position: absolute; left: 50%; top: 40%; width: 240%; aspect-ratio: 1; background: repeating-conic-gradient(color-mix(in srgb, var(--c) 28%, transparent) 0 9deg, transparent 9deg 22deg); animation: raysSpin 14s linear infinite; }
.pcard-front img { position: relative; width: 78%; }
.pcard-front b { position: relative; font-size: 12px; line-height: 1.1; color: #3a224a; }
.pcard-r { position: relative; padding: 1px 8px; border-radius: 99px; background: var(--c); color: #fff; font-size: 10px; font-weight: 700; }
.pcard-new { display: none; position: absolute; top: 9px; left: -26px; padding: 2px 28px; transform: rotate(-35deg); background: #ff3b6b; color: #fff; font-style: normal; font-size: 10px; font-weight: 800; box-shadow: 0 2px 0 rgba(0,0,0,.2); }
.pcard.is-new .pcard-new { display: block; }
.pcard.r5 .pcard-front { animation: mythic 2.4s linear infinite; }
@keyframes mythic { 0% { box-shadow: 0 0 30px #ff4f9a; } 25% { box-shadow: 0 0 30px #ffd34d; } 50% { box-shadow: 0 0 30px #14f195; } 75% { box-shadow: 0 0 30px #3fa2ff; } 100% { box-shadow: 0 0 30px #ff4f9a; } }

.pfx-single .pcard { width: min(290px, 74vw); }
.pcard.big .pcard-front { padding: 14px 12px; gap: 4px; }
.pcard.big .pcard-front b { font-size: 24px; }
.pcard.big .pcard-r { font-size: 13px; padding: 2px 12px; }
.pcard.big .pcard-front small { position: relative; font-weight: 700; color: #5a3a70; }
.pcard.big .pcard-front p { position: relative; margin: 0; font-size: 13px; color: #6b5480; }
.pcard.big .pcard-new { font-size: 13px; top: 16px; left: -30px; }
.pfx-grid { width: 100%; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.pfx-actions { display: flex; gap: 10px; justify-content: center; opacity: 0; transform: translateY(10px); transition: opacity .3s, transform .3s; }
.pfx-actions.show { opacity: 1; transform: none; }
@media (max-width: 520px) {
  .pfx-grid { gap: 6px; }
  .pfx-grid .pcard-front { padding: 5px 3px; border-width: 3px; }
  .pfx-grid .pcard-front b { font-size: 9px; }
  .pfx-grid .pcard-r { font-size: 8px; padding: 0 5px; }
  .pfx-grid .pcard-new { font-size: 8px; top: 5px; left: -28px; }
  .pfx-crate { width: 210px; height: 210px; }
}
@media (prefers-reduced-motion: reduce) { .pull-fx.quake .pfx-stage, .pfx-bg::after { animation: none; } }

/* ---------------------------------------------------------------- HUD: pass, shop, play, boost */
.tile-btn.teal .play-ico { width: 62px; height: 62px; border-radius: 18px; display: grid; place-items: center; font-size: 34px; background: linear-gradient(#d4fff6, #6fdcc9); box-shadow: 0 5px 0 rgba(44,26,74,.3), inset 0 -4px 0 rgba(0,0,0,.12); }
.tile-btn:active .play-ico { transform: translateY(3px) scale(.97); }
#playBtn { margin-right: 4px; }
.pass-btn { --p: 0; position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.pass-btn .ring { width: 52px; height: 52px; border-radius: 50%; padding: 4px; background: conic-gradient(#ffb020 calc(var(--p) * 1%), rgba(255,255,255,.55) 0); box-shadow: 0 4px 0 rgba(44,26,74,.3); display: grid; }
.pass-btn .ring b { display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6c8, #ffd34d 55%, #f0a020); font-size: 19px; color: #7a3e00; }
.pass-btn small { font-size: 11px; font-weight: 700; color: #fff; text-shadow: 0 1px 0 rgba(44,26,74,.8), 0 0 4px rgba(44,26,74,.6); }
.pass-btn.pulse .ring, .round-btn.pulse { animation: pulse .45s; }
.chip.boost { padding-left: 10px; background: linear-gradient(#ffcf33, #ff9b1f); color: #5a2a00; box-shadow: inset 0 -3px 0 rgba(0,0,0,.18), 0 0 14px rgba(255,190,40,.7); }
.chip.boost small { opacity: 1; font-weight: 700; }
@media (max-width: 440px) {
  #bottombar { padding: 0 8px; }
  .tile-btn { width: 60px; }
  .tile-btn img, .tile-btn .grid4, .tile-btn.teal .play-ico { width: 54px; height: 54px; border-radius: 16px; }
  .tile-btn.teal .play-ico { font-size: 28px; }
  .tile-btn.blue .grid4 { padding: 10px; gap: 4px; }
  .tile-btn b { font-size: 12px; }
  .collect { width: 90px; }
  .collect img { width: 82px; height: 82px; border-width: 4px; }
  .collect b { font-size: 13px; }
  .chip { height: 34px; padding-right: 10px; }
  .chip b { font-size: 16px; }
  .chip img { width: 26px; height: 26px; }
}

/* ---------------------------------------------------------------- Season Pass */
.modal.pass { width: min(520px, 100%); }
.modal.pass header, .modal.shop header { background: linear-gradient(100deg, #ffb020, #ff6f91); }
.pass-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pass-head b { display: block; font-size: 20px; }
.pass-head small { color: var(--ink2); font-size: 13px; }
.pass-tier { display: flex; align-items: baseline; padding: 4px 14px; border-radius: 16px; background: linear-gradient(#fff3b0, #ffd34d); box-shadow: 0 3px 0 #e0a83a; }
.pass-tier span { font-size: 28px; font-weight: 700; color: #7a3e00; }
.pass-tier small { color: #9a5a10; }
.pass-bar { height: 14px; }
.pass-bar i { background: linear-gradient(90deg, #ffb020, #ff6f91); }
.prem-on { margin: 10px 0; padding: 10px; border-radius: 14px; text-align: center; font-weight: 700; color: #7a3e00; background: linear-gradient(90deg, #fff3b0, #ffd34d); }
.prem-buy { display: flex; align-items: center; gap: 10px; width: 100%; margin: 10px 0; padding: 12px; border-radius: 18px; text-align: left; color: #fff; background: linear-gradient(110deg, #7b3fe4, #d94ab0); box-shadow: 0 5px 0 #4e228f, 0 0 20px rgba(200,90,255,.35); }
.prem-buy > span { font-size: 34px; }
.prem-buy div { flex: 1; }
.prem-buy b { font-size: 17px; }
.prem-buy small { display: block; font-size: 12px; opacity: .92; }
.prem-buy em { font-style: normal; font-weight: 700; font-size: 13px; text-align: right; padding: 6px 10px; border-radius: 12px; background: rgba(255,255,255,.22); }
.prem-buy em small { display: block; font-weight: 500; }
.prem-buy:active { transform: translateY(3px); }
.ptrack-h, .prow { display: grid; grid-template-columns: 36px 1fr 1fr; gap: 8px; align-items: center; }
.ptrack-h { margin: 8px 0 4px; font-size: 13px; color: var(--ink2); text-align: center; }
.ptrack-h .ph { color: #a45cff; }
.ptrack { display: grid; gap: 6px; }
.prow .pnum { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #eadff5; font-weight: 700; color: var(--ink2); }
.prow.on .pnum { background: linear-gradient(#ffe066, #ffb41f); color: #6a3400; }
.prow.next .pnum { outline: 3px solid #ffb020; outline-offset: 2px; }
.pcell { position: relative; display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 6px 10px; border-radius: 14px; background: #fff; border: 2px solid #efe6f7; text-align: left; font-size: 13px; }
.pcell .pico { flex: none; width: 34px; height: 34px; display: grid; place-items: center; font-size: 24px; }
.pcell .pico img { width: 34px; height: 34px; }
.pcell b { font-weight: 600; line-height: 1.15; }
.pcell i { position: absolute; top: -6px; right: -4px; font-style: normal; font-size: 13px; background: #fff; border-radius: 10px; padding: 0 4px; }
.pcell.prem { background: linear-gradient(#fbf6ff, #f1e6ff); border-color: #e3d0ff; }
.pcell.big { border-color: #ffd36b; background: linear-gradient(#fffbe8, #ffefb0); }
.pcell.big .pico, .pcell.big .pico img { width: 42px; height: 42px; font-size: 30px; }
.pcell.got { opacity: .55; }
.pcell.lock { filter: saturate(.6); }
.pcell.can { border-color: #ffb020; box-shadow: 0 0 0 3px rgba(255,176,32,.25), 0 0 16px rgba(255,176,32,.45); animation: bob 1.4s ease-in-out infinite; cursor: pointer; }
.pcell:disabled { cursor: default; color: inherit; }

/* ---------------------------------------------------------------- Play hub */
.modal.play header { background: linear-gradient(100deg, #29c5b0, #3fa2ff); }
.games { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.game { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 8px; border-radius: 20px; color: #fff; box-shadow: 0 5px 0 rgba(44,26,74,.25); text-align: center; }
.game.fish { background: linear-gradient(#5fd0ee, #2a84c9); }
.game.wheel { background: linear-gradient(#ffb36b, #ff6f91); }
.game.wheel.ready { box-shadow: 0 5px 0 rgba(44,26,74,.25), 0 0 18px rgba(255,140,120,.7); }
.game .gico { font-size: 40px; }
.game b { font-size: 17px; text-shadow: 0 2px 0 rgba(0,0,0,.2); }
.game small { font-size: 12px; opacity: .95; }
.game:active { transform: translateY(3px); }
.dq { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 8px; border-radius: 14px; background: #fff; }
.dq > div { flex: 1; }
.dq small { color: var(--ink2); font-size: 12px; }
.dq.ok { background: #fff6cf; }
.dq.claimed { opacity: .6; background: #fff; }
.dq .btn { padding: 8px 12px; font-size: 14px; white-space: nowrap; }
.shards { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 14px; background: #f1e9ff; color: #4b2f8a; }
.shards span { font-weight: 700; }
.shards small { font-size: 12px; opacity: .85; }

/* ---------------------------------------------------------------- Fishing and wheel */
.modal.fishing header { background: linear-gradient(100deg, #29b6e6, #2a6fc9); }
.fish-top { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.fish-top .chip { padding: 5px 11px; border-radius: 99px; background: #e8f6ff; color: #1d5fa8; font-weight: 700; font-size: 13px; box-shadow: inset 0 -2px 0 rgba(29,95,168,.12); }
.fish-stage { position: relative; border-radius: 20px; overflow: hidden; box-shadow: 0 5px 0 rgba(29,95,168,.25), inset 0 0 0 3px rgba(255,255,255,.7); }
#fishCv { display: block; width: 100%; aspect-ratio: 440 / 300; height: auto; touch-action: manipulation; cursor: pointer; }
.fish-msg { min-height: 44px; margin: 10px 0 6px; }
.fish-dex { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.fdex { display: flex; flex-direction: column; align-items: center; padding: 4px 2px 3px; border-radius: 12px; background: #f1f8ff; border: 2px solid #d6ebff; }
.fdex img { width: 44px; height: 30px; object-fit: contain; }
.fdex small { font-weight: 700; font-size: 12px; color: #1d5fa8; }
.fdex.none img { filter: brightness(0) opacity(.18); }
.fdex.none small { color: #9bb1c8; }
.modal.wheel-m header { background: linear-gradient(100deg, #ffa63d, #ff5e9e); }
.modal.wheel-m .body { overflow-x: hidden; }
.wheel-wrap { position: relative; isolation: isolate; width: min(330px, 100%); margin: 4px auto 22px; }
.wheel-rays { position: absolute; inset: -14%; border-radius: 50%; background: repeating-conic-gradient(rgba(255,206,90,.32) 0 10deg, transparent 10deg 20deg); -webkit-mask: radial-gradient(circle, #000 35%, transparent 70%); mask: radial-gradient(circle, #000 35%, transparent 70%); animation: rays 24s linear infinite; pointer-events: none; }
@keyframes rays { to { transform: rotate(360deg); } }
#wheelCv { position: relative; display: block; width: 100%; aspect-ratio: 1; height: auto; cursor: pointer; }
.wheel-pin { position: absolute; top: -10px; left: 50%; width: 38px; height: 50px; margin-left: -19px; transform-origin: 50% 30%; filter: drop-shadow(0 3px 0 rgba(44,26,74,.3)); z-index: 2; }
.wheel-pin.flick { animation: flick .14s ease-out; }
@keyframes flick { 40% { transform: rotate(-22deg); } 100% { transform: rotate(0); } }
.wheel-stand { position: absolute; left: 50%; bottom: -18px; width: 46%; height: 26px; margin-left: -23%; border-radius: 10px 10px 16px 16px; background: linear-gradient(#ffcf5a, #e09a22); box-shadow: 0 4px 0 rgba(44,26,74,.22); z-index: -1; }
.wheel-msg { min-height: 48px; }
.prize { display: inline-flex; align-items: center; gap: 12px; padding: 8px 16px 8px 10px; border-radius: 18px; background: linear-gradient(#fffbe8, #ffeeb0); border: 3px solid #ffd34d; text-align: left; animation: prize-pop .45s cubic-bezier(.2,1.6,.4,1); }
.prize > span { font-size: 30px; }
.prize b { display: block; font-size: 17px; }
.prize small { color: var(--ink2); }
.prize.big { background: linear-gradient(#fff0fa, #ffd6ee); border-color: #ff6fb1; box-shadow: 0 0 18px rgba(255,111,177,.5); }
@keyframes prize-pop { from { transform: scale(.4); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .wheel-rays { animation: none; } .wheel-pin.flick, .prize { animation: none; } }

/* ---------------------------------------------------------------- Shop */
.sitems { display: grid; gap: 10px; }
.sitem { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border-radius: 18px; background: #fff; box-shadow: 0 4px 0 rgba(44,26,74,.12); text-align: left; }
.sitem .sico { flex: none; width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 30px; background: linear-gradient(#fff3b0, #ffd34d); }
.sitem.pass .sico { background: linear-gradient(#e7d2ff, #b07ae8); }
.sitem.energy .sico { background: linear-gradient(#d4fff6, #6fdcc9); }
.sitem.skip .sico { background: linear-gradient(#dbe9ff, #8fb6ff); }
.sitem > div { flex: 1; min-width: 0; }
.sitem b { font-size: 16px; }
.sitem small { display: block; font-size: 12px; color: var(--ink2); line-height: 1.3; }
.sitem .btn { padding: 8px 10px; font-size: 13px; text-align: center; min-width: 96px; }
.sitem .btn small { color: #7a4a10; font-size: 11px; }
.packs-link { margin-top: 10px; background: linear-gradient(#fff, #f4ecff); }
.packs-link .sico { background: linear-gradient(#ffd0e4, #ff8fbf); }
.packs-link em { font-style: normal; font-size: 26px; color: var(--ink2); }
.buy-ico { font-size: 110px; }
.gold-t { background: linear-gradient(#fffbe8, #ffefb0); }
.modal.pass .body { position: relative; }

/* ---------------- materials, Harbor Market, orders, visits */
.round-btn.market-btn { background: linear-gradient(#e6f8ff, #bfe8ff); }
.good { --t: #9aa5b1; display: inline-flex; align-items: center; gap: 3px; padding: 3px 8px 3px 4px; border-radius: 12px; background: #fff; border: 2px solid var(--t); font-size: 13px; font-weight: 700; white-space: nowrap; }
.good i { font-style: normal; font-size: 18px; line-height: 1; }
.good.miss { border-color: #ff6b6b; background: #fff0f0; color: #c0392b; }
.good.ok { border-color: #5bb36a; background: #f1fbef; }
.need { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.up-need { margin-top: 12px; padding: 10px 12px; border-radius: 14px; background: #fff; }
.up-need small { color: var(--ink2); font-size: 12px; font-weight: 600; }
.modal.trade header { background: linear-gradient(100deg, #2bb3d6, #3f7bff); }
.modal.trade .body { padding-top: 12px; }
.tabs { display: flex; gap: 6px; margin-bottom: 10px; overflow-x: auto; }
.tab { flex: 1; padding: 9px 8px; border-radius: 12px; background: #f1ebf7; font-weight: 700; font-size: 14px; white-space: nowrap; box-shadow: 0 3px 0 #cbbfd9; }
.tab.on { background: linear-gradient(#bfe8ff, #8fd3ff); box-shadow: 0 3px 0 #4b9fd1; }
.cap { display: flex; align-items: center; gap: 10px; font-weight: 700; margin-bottom: 8px; }
.cap .bar { flex: 1; }
.cap.small { justify-content: space-between; font-size: 14px; padding: 6px 10px; border-radius: 12px; background: #fff; }
.cap.small img { width: 18px; height: 18px; vertical-align: -3px; }
.cap.small .link { margin: 0; }
.center { text-align: center; }
.tier-h { --t: #9aa5b1; display: flex; align-items: center; gap: 8px; font-size: 15px !important; }
.tier-h:before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--t); }
.goods-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.good-card { --t: #9aa5b1; display: flex; flex-direction: column; align-items: center; padding: 8px 4px; border-radius: 14px; background: #fff; border: 2px solid var(--t); position: relative; }
.good-card i { font-style: normal; font-size: 26px; }
.good-card b { position: absolute; top: 4px; right: 7px; font-size: 13px; }
.good-card small { font-size: 11px; color: var(--ink2); text-align: center; line-height: 1.2; }
.good-card.empty { opacity: .45; border-style: dashed; }
.wh-up { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 12px; border-radius: 16px; background: #fff7e0; }
.wh-up > div { flex: 1; }
.wh-up small { display: block; color: var(--ink2); font-size: 12px; }
.filter { display: flex; gap: 5px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 6px; }
.fchip { flex: none; padding: 5px 9px; border-radius: 10px; background: #fff; font-size: 17px; box-shadow: 0 2px 0 #cbbfd9; font-weight: 700; }
.fchip:first-child { font-size: 13px; }
.fchip.on { background: #bfe8ff; box-shadow: 0 2px 0 #4b9fd1; }
.offers { display: flex; flex-direction: column; gap: 8px; }
.offer { --t: #9aa5b1; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; padding: 10px 12px; border-radius: 16px; background: #fff; border-left: 5px solid var(--t); }
.o-good { display: flex; align-items: center; gap: 10px; }
.o-good small { display: block; font-size: 12px; color: var(--ink2); }
.offer .btn { grid-row: 1 / 3; grid-column: 2; padding: 9px 12px; font-size: 14px; white-space: nowrap; }
.offer .seller { margin: 0; font-size: 12px; text-align: left; justify-self: start; }
.stalls { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stall { --t: #9aa5b1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px; border-radius: 16px; background: #fff; border: 2px solid var(--t); text-align: center; min-height: 128px; justify-content: center; }
.stall small { font-size: 12px; color: var(--ink2); }
.stall .btn.small { padding: 7px 10px; font-size: 13px; margin-top: 4px; }
.stall.sold { background: #fff7d6; border-color: #ffb41f; animation: pulse 1.6s infinite; }
.stall.expired { opacity: .75; border-style: dashed; }
.stall.empty { border: 2px dashed #cbbfd9; background: #faf6ff; color: var(--ink2); }
.stall.empty span { font-size: 30px; font-weight: 700; line-height: 1; }
.pick { display: flex; flex-wrap: wrap; gap: 6px; }
.pchip { padding: 2px; border-radius: 14px; }
.pchip.on .good { background: #bfe8ff; border-color: #3f7bff; }
.row-in { display: flex; justify-content: space-between; align-items: center; margin: 12px 0 6px; font-weight: 600; }
.step { display: inline-flex; align-items: center; gap: 12px; }
.step button { width: 36px; height: 36px; border-radius: 12px; background: #f1ebf7; font-size: 20px; font-weight: 700; box-shadow: 0 3px 0 #cbbfd9; }
.step b { min-width: 24px; text-align: center; font-size: 20px; }
#priceIn { width: 100%; accent-color: #ffb41f; }
.range-l { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--ink2); }
.range-l .link { margin: 0; font-size: 12px; }
.total { text-align: center; font-size: 18px; }
.order { display: flex; align-items: center; gap: 10px; padding: 12px; margin-bottom: 8px; border-radius: 16px; background: #fff; }
.order .ship { font-size: 30px; }
.order .o-body { flex: 1; }
.order small { display: block; margin-top: 6px; font-size: 12px; color: var(--ink2); }
.order small img { width: 15px; height: 15px; vertical-align: -2px; }
.order .btn { padding: 9px 14px; font-size: 14px; }
.order.done { opacity: .6; }
.visit-top { display: flex; gap: 8px; margin-bottom: 8px; }
.visit-search { flex: 1; display: flex; align-items: center; gap: 6px; padding: 0 12px; border-radius: 14px; background: #fff; border: 2px solid #efe6f7; }
.visit-search:focus-within { border-color: #8fc4ff; }
.visit-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 14.5px; padding: 9px 0; color: var(--ink); user-select: text; }
.visit-top .btn { padding: 0 12px; font-size: 18px; }
.visit-sorts { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 8px; scrollbar-width: none; }
.visit-sorts::-webkit-scrollbar { display: none; }
.visit-sorts button { flex: none; padding: 6px 11px; border-radius: 99px; background: #f3eefb; font-size: 13px; font-weight: 600; color: #4b3a5e; white-space: nowrap; }
.visit-sorts button.on { background: linear-gradient(#4fb8ff, #2f86e8); color: #fff; box-shadow: 0 2px 0 rgba(29,95,168,.35); }
.hoods { display: flex; flex-direction: column; gap: 8px; }
.hood { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 10px; border-radius: 18px; background: #fff; text-align: left; box-shadow: 0 3px 0 #e2d6ec; border: 2px solid transparent; transition: transform .1s, border-color .15s; }
.hood:hover { border-color: color-mix(in srgb, var(--rc) 45%, transparent); }
.hood:active { transform: translateY(2px); box-shadow: 0 1px 0 #e2d6ec; }
.hood-pic { position: relative; flex: none; width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center; font-size: 30px;
  background: radial-gradient(circle at 50% 70%, color-mix(in srgb, var(--rc) 35%, #fff), #fff 75%); border: 2px solid color-mix(in srgb, var(--rc) 55%, #fff); }
.hood-pic img { width: 54px; height: 54px; object-fit: contain; }
.hood-pic em { position: absolute; bottom: -7px; left: 50%; transform: translateX(-50%); padding: 1px 7px; border-radius: 99px; background: #3a224a; color: #fff; font-style: normal; font-size: 10.5px; font-weight: 700; white-space: nowrap; box-shadow: 0 0 0 2px #fff; }
.hood-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.hood-txt > b { font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hood-clan, .hood-friend { font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 8px; background: #f3eefb; color: #6a35ae; vertical-align: 2px; }
.hood-friend { background: #e3f8e9; color: #1f9a4c; }
.hood-stats { display: flex; flex-wrap: wrap; gap: 4px; }
.hood-stats span { font-size: 12px; font-weight: 600; padding: 1px 7px; border-radius: 8px; background: #f6f2fa; color: #4b3a5e; }
.hood-stats span.sale { background: #fff3d6; color: #9a5b00; }
.hood-txt small { font-size: 11.5px; color: var(--ink2); }
.hood-txt small.fresh { color: #1f9a4c; font-weight: 700; }
.hood-go { flex: none; padding: 8px 14px; border-radius: 12px; background: linear-gradient(#5cc2ff, #2f86e8); color: #fff; font-weight: 700; font-size: 14px; box-shadow: 0 3px 0 rgba(29,95,168,.35); }
.hood-empty { text-align: center; padding: 18px 10px; color: var(--ink2); }
.hood-empty span { font-size: 40px; }
@media (max-width: 420px) { .hood-go { padding: 8px 10px; } .hood-pic { width: 52px; height: 52px; } .hood-pic img { width: 46px; height: 46px; } }
.btn.blue { background: linear-gradient(#8fd3ff, #3fa2ff); color: #fff; box-shadow: 0 4px 0 #2a6fc0; }
.visit-bar { position: fixed; left: 50%; bottom: calc(16px + var(--safe-b)); transform: translateX(-50%); z-index: 8; display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 22px; background: rgba(255,250,240,.96); box-shadow: 0 6px 0 rgba(44,26,74,.25), 0 10px 30px rgba(0,0,0,.25); max-width: calc(100% - 20px); }
.visit-bar .v-info { display: flex; align-items: center; gap: 8px; padding: 0 6px; }
.visit-bar .v-info > span { font-size: 26px; }
.visit-bar .v-info b { display: block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.visit-bar small { font-size: 12px; color: var(--ink2); }
.visit-bar .btn { padding: 10px 12px; font-size: 14px; white-space: nowrap; }
body.visiting #topbar .chips, body.visiting .side, body.visiting #bottombar, body.visiting #quest { display: none !important; }
@media (max-width: 440px) {
  .goods-grid { grid-template-columns: repeat(3, 1fr); }
  .visit-bar { flex-wrap: wrap; justify-content: center; bottom: calc(10px + var(--safe-b)); }
  .visit-bar .v-info { width: 100%; justify-content: center; }
  .tab { font-size: 12px; padding: 8px 4px; }
}

/* ---------------- Market board and crates */
.crate-box { --t: #9aa5b1; position: relative; display: grid; place-items: center; width: 64px; height: 56px; margin: 0 auto; border-radius: 10px;
  background: repeating-linear-gradient(90deg, #d9a56b 0 14px, #c98f55 14px 16px), #d9a56b; border: 3px solid #8d5a36;
  box-shadow: inset 0 0 0 3px #e9bd85, inset 0 -6px 0 rgba(0,0,0,.12), 0 3px 0 rgba(44,26,74,.25); }
.crate-box:before { content: ''; position: absolute; inset: 6px; border: 2px solid rgba(141,90,54,.45); border-radius: 4px; }
.crate-box i { position: relative; font-style: normal; font-size: 28px; filter: drop-shadow(0 2px 0 rgba(255,255,255,.6)); }
.crate-box b { position: absolute; right: -8px; bottom: -8px; min-width: 26px; padding: 2px 6px; border-radius: 10px; background: var(--t); color: #fff; font-size: 12px; border: 2px solid #fff; }
.crates { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.crate-card { --t: #9aa5b1; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px 8px; border-radius: 16px; background: #fff; border-bottom: 4px solid var(--t); text-align: center; }
.crate-info b { display: block; font-size: 14px; }
.crate-info small { font-size: 12px; color: var(--ink2); }
.crate-card .btn.small, .stall .btn.small { padding: 7px 10px; font-size: 13px; }
.crate-card .seller { margin: 0; font-size: 11px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.board-foot small { color: var(--ink2); font-size: 12px; }
.btn.small { padding: 8px 12px; font-size: 13px; white-space: nowrap; }
.stalls { grid-template-columns: repeat(3, 1fr); }
.stall { position: relative; gap: 5px; }
.stall .x-mini { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; background: #f1ebf7; font-size: 12px; color: var(--ink2); }
.stall.empty .crate-box { background: #f6f0fb; border: 3px dashed #cbbfd9; box-shadow: none; }
.stall.empty .crate-box:before { display: none; }
.stall.empty .crate-box i { color: #a08cb8; font-weight: 700; }
.stall.locked { border: 2px dashed #e3c27a; background: #fffaf0; color: var(--ink2); }
.stall.locked .crate-box { filter: grayscale(.6) opacity(.7); }
.stall.sold { background: linear-gradient(#fff3c4, #ffe08a); border-color: #ffb41f; }
.ad-on { font-size: 11px; font-weight: 700; color: #2a6fc0; background: #e6f4ff; padding: 4px 8px; border-radius: 10px; }
.ad-toggle { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px; background: #e6f4ff; font-weight: 600; font-size: 14px; }
.ad-toggle small { color: var(--ink2); font-weight: 400; }
.ad-toggle input { width: 20px; height: 20px; accent-color: #3f7bff; }
@media (max-width: 440px) {
  .crates, .stalls { grid-template-columns: repeat(2, 1fr); }
  .board-foot { flex-direction: column; align-items: stretch; text-align: center; }
}

/* ---------------------------------------------------------------- HUD layout v2: one resource bar, a labeled rail, a docked bottom bar */
:root { --glass: rgba(44, 26, 74, .34); --glass-hi: rgba(255, 255, 255, .5); --hud-top: calc(78px + var(--safe-t)); }
#topbar { align-items: center; }
.chips { flex-wrap: nowrap; min-width: 0; }
.chip { border: 1.5px solid rgba(255,255,255,.14); }
.chip.luz { padding-right: 14px; }
.chip.luz small { color: #ffe27a; opacity: 1; font-weight: 600; }
.chip.wallet { margin-left: auto; flex: none; background: linear-gradient(100deg, rgba(60,28,110,.86), rgba(20,90,90,.82)); }
.chip.wallet:active, .chip.luz:active { transform: translateY(2px); }
.avatar::after { content: 'LV'; position: absolute; left: 50%; bottom: -7px; transform: translateX(-50%); padding: 0 6px; border-radius: 8px; background: #fff; color: #b5650b; font-size: 10px; font-weight: 700; line-height: 15px; box-shadow: 0 2px 0 rgba(44,26,74,.25); }

/* quest card under the level */
.quest { top: var(--hud-top); padding: 6px 8px 6px 6px; gap: 8px; border-radius: 18px; border: 2px solid #fff; background: rgba(255,250,240,.96); }
.quest .qi { width: 30px; height: 30px; flex: none; border-radius: 10px; display: grid; place-items: center; background: #ffe9a8; font-size: 17px; }
.quest #questText { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quest.ready .qi { background: #fff; }

/* right side: Sun Hour card, then a glass rail of labeled buttons */
.side.right { top: var(--hud-top); gap: 12px; }
.sun-btn { border: 2px solid #fff; }
.rail { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 10px 7px 8px; border-radius: 26px; background: var(--glass); border: 1.5px solid rgba(255,255,255,.22); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); box-shadow: 0 6px 18px rgba(30,15,50,.18); }
.rail-btn { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.rail-btn span { width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; font-size: 23px; background: linear-gradient(#ffffff, #eef4ff); box-shadow: 0 4px 0 rgba(44,26,74,.3), inset 0 -3px 0 rgba(0,0,0,.06); transition: transform .1s; }
.rail-btn.market-btn span { background: linear-gradient(#e6f7ff, #b4e3ff); }
.rail-btn.shop span { background: linear-gradient(#fff2fa, #ffd1ea); }
.rail-btn.daily span { background: linear-gradient(#fff9e3, #ffe39a); }
.rail-btn small, .rail .pass-btn small { font-size: 11px; font-weight: 700; color: #fff; text-shadow: 0 1px 0 rgba(44,26,74,.8); }
.rail-btn:active span, .pass-btn:active .ring { transform: translateY(3px); }
.rail .pass-btn .ring { width: 48px; height: 48px; }
.rail .dot, .pass-btn .dot { top: -6px; right: -8px; }

/* zoom: a small pill in the corner (touch screens pinch instead) */
.zoom { position: fixed; right: 12px; bottom: calc(124px + var(--safe-b)); z-index: 5; display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: rgba(255,255,255,.92); box-shadow: 0 4px 0 rgba(44,26,74,.25); }
.zoom button { width: 38px; height: 34px; font-size: 18px; font-weight: 700; color: var(--ink2); }
.zoom button + button { border-top: 1.5px solid #ece4f4; }
.zoom button:active { background: #f1ebf7; }
@media (pointer: coarse) { .zoom { display: none; } }
body.visiting .zoom { bottom: calc(100px + var(--safe-b)); }
body.visiting #walletChip { display: none; }

/* bottom: floating buttons over the map, Collect all in the middle */
#bottombar { left: 50%; right: auto; transform: translateX(-50%); width: min(620px, calc(100% - 16px)); bottom: calc(8px + var(--safe-b));
  align-items: flex-end; padding: 0 4px; }
#bottombar .tile-btn { width: 66px; gap: 3px; }
#bottombar .tile-btn img, #bottombar .tile-btn .grid4, #bottombar .tile-btn.teal .play-ico { width: 56px; height: 56px; border-radius: 17px; border: 2.5px solid #fff; box-shadow: 0 5px 0 rgba(44,26,74,.3), inset 0 -3px 0 rgba(0,0,0,.1); }
#bottombar .tile-btn.teal .play-ico { font-size: 27px; }
#bottombar .tile-btn.blue .grid4 { padding: 10px; gap: 4px; }
#bottombar .tile-btn b { font-size: 12.5px; color: #fff; text-shadow: 0 2px 0 rgba(44,26,74,.75), 0 0 6px rgba(44,26,74,.55); }
#bottombar .tile-btn .dot { top: -5px; right: 2px; }
#crateBtn, #playBtn { margin-right: 2px; }
.collect { bottom: 0; width: 110px; }
.collect img { width: 92px; height: 92px; border: 5px solid #fff; box-shadow: 0 5px 0 var(--gold3), 0 10px 20px rgba(0,0,0,.22); }
.collect b { margin-top: 4px; padding: 0; background: none; color: #fff; font-size: 13px; text-shadow: 0 2px 0 rgba(44,26,74,.75), 0 0 6px rgba(44,26,74,.55); }
.zoom { bottom: calc(112px + var(--safe-b)); }

@media (max-width: 520px) {
  :root { --hud-top: calc(70px + var(--safe-t)); }
  #topbar { gap: 6px; left: 8px; right: 8px; }
  .chips { gap: 6px; }
  .chip { padding: 0 9px 0 5px; }
  .chip.wallet { padding: 0 9px 0 6px; }
  .chip.wallet #tickerTxt { display: none; }
  .chip.wallet small { font-size: 12px; font-weight: 600; opacity: 1; }
  .quest { top: var(--hud-top); left: 8px; max-width: calc(100vw - 150px); font-size: 12.5px; }
  .side.right { top: var(--hud-top); right: 8px; gap: 10px; }
  .sun-btn { grid-template-columns: auto; padding: 6px 10px; justify-items: center; }
  .sun-btn .sun-ico { grid-row: auto; font-size: 22px; }
  .sun-btn small { display: none; } .sun-btn.on small { display: block; font-size: 11px; }
  .rail { gap: 8px; padding: 8px 6px 6px; border-radius: 22px; }
  .rail-btn span { width: 42px; height: 42px; font-size: 21px; border-radius: 14px; }
  .rail .pass-btn .ring { width: 44px; height: 44px; }
  #bottombar { padding: 0 2px; }
  #bottombar .tile-btn { width: 58px; }
  #bottombar .tile-btn img, #bottombar .tile-btn .grid4, #bottombar .tile-btn.teal .play-ico { width: 50px; height: 50px; border-radius: 15px; }
  #bottombar .tile-btn b { font-size: 11.5px; }
  .collect { width: 96px; }
  .collect img { width: 84px; height: 84px; border-width: 4px; }
}
@media (max-width: 520px) {
  .quest #questText { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.2; }
}

/* account suspended by the team */
#suspended{position:fixed;inset:0;z-index:9999;display:grid;place-items:center;background:rgba(40,20,55,.86);backdrop-filter:blur(6px);color:#fff;text-align:center;padding:24px}
#suspended>div{max-width:380px;background:#3a224a;border:3px solid #ff8f6b;border-radius:24px;padding:28px 24px}
#suspended b{font-size:26px;display:block;margin-bottom:8px}
#suspended p{margin:0 0 14px;opacity:.9}
#suspended small{opacity:.7}
.team-gifts{background:#fff7e3;border-radius:16px;padding:6px 14px;margin-top:10px}
.team-gifts p{margin:8px 0}

/* decoration shop */
.deco-intro { margin: 0 0 12px; font-size: 14px; }
.card.deco .price { display: inline-block; margin-top: 4px; padding: 2px 10px; border-radius: 999px; background: #fff3c4; color: #7a4a00; font-weight: 600; font-size: 13px; }
.card.deco .price.poor { background: #f3e6e6; color: #9b2c1d; }
.card.deco.locked { opacity: .55; cursor: not-allowed; }
.card.deco.locked img { filter: grayscale(.7); }

/* weekly event */
.rail-btn.event-btn span { background: linear-gradient(#ffffff, var(--ev, #ffb44d)); }
.rail-btn.event-btn.pulse span { animation: pulse .45s; }
.modal.event { width: min(520px, 100%); }
.modal.event header { background: linear-gradient(100deg, #ff9f43, #ff6f91 60%, #a77bff); }
.ev-head { display: flex; gap: 12px; align-items: center; background: linear-gradient(120deg, #fff, color-mix(in srgb, var(--ev) 22%, #fff)); border: 2px solid color-mix(in srgb, var(--ev) 45%, #fff); border-radius: 18px; padding: 10px 12px; }
.ev-head img { width: 84px; height: 84px; flex: none; }
.ev-head p { margin: 0 0 4px; font-weight: 600; }
.ev-head small { color: #6f5a85; font-size: 12.5px; }
.ev-pts { display: flex; align-items: baseline; justify-content: center; gap: 6px; margin: 12px 0 4px; }
.ev-pts b { font-size: 30px; }
.ev-pts small { color: #6f5a85; }
.ev-bar i { background: linear-gradient(90deg, #ffd34d, var(--ev)); }
.ev-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0 6px; }
.ev-step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 14px; background: #fff; border: 2px solid #efe6f7; font-size: 12.5px; text-align: center; }
.ev-step .pico { width: 34px; height: 34px; display: grid; place-items: center; font-size: 24px; }
.ev-step .pico img { width: 34px; height: 34px; }
.ev-step b { font-weight: 600; line-height: 1.15; }
.ev-step small { color: #6f5a85; font-size: 11.5px; }
.ev-step i { position: absolute; top: -6px; right: -4px; font-style: normal; font-size: 13px; background: #fff; border-radius: 10px; padding: 0 4px; }
.ev-step.big { border-color: #ffd36b; background: linear-gradient(#fffbe8, #ffefb0); }
.ev-step.big .pico, .ev-step.big .pico img { width: 44px; height: 44px; }
.ev-step.got { opacity: .55; }
.ev-step.can { border-color: #ffb020; box-shadow: 0 0 0 3px rgba(255,176,32,.25), 0 0 16px rgba(255,176,32,.45); animation: bob 1.4s ease-in-out infinite; cursor: pointer; }
.ev-step:disabled { cursor: default; color: inherit; }
.ev-h { margin: 14px 0 6px; font-size: 15px; }
.ev-tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ev-tasks li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 7px 10px; background: #fff; border: 1px solid #efe6f7; border-radius: 12px; font-size: 13.5px; }
.ev-tasks li small { color: #6f5a85; font-size: 12px; }
.ev-tasks li em { font-style: normal; font-weight: 700; font-size: 11px; color: #fff; background: #ff6f91; border-radius: 99px; padding: 1px 6px; }
.ev-tasks li.full { opacity: .6; }
.ev-tasks li.full b::after { content: ' ✓'; }
@media (max-width: 420px) { .ev-steps { grid-template-columns: repeat(2, 1fr); } }

/* community goal */
.ev-h small { font-weight: 500; color: #6f5a85; font-size: 12px; margin-left: 6px; }
.ev-bar.team { position: relative; height: 16px; }
.ev-bar.team s { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: rgba(58,34,74,.25); }
.ev-me { margin: 6px 0 0; font-size: 13px; color: #4b3a5e; text-align: center; }
.ev-steps.five { grid-template-columns: repeat(5, 1fr); }
.ev-top { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; }
.ev-top li { display: grid; grid-template-columns: 22px 1fr auto; gap: 6px; align-items: center; padding: 5px 8px; background: #fff; border: 1px solid #efe6f7; border-radius: 10px; font-size: 13px; }
.ev-top li span { font-weight: 700; color: #a77bff; }
.ev-top li b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-top li em { font-style: normal; color: #6f5a85; }
.ev-top li:nth-child(1) span { color: #e0a100; }
@media (max-width: 420px) { .ev-steps.five { grid-template-columns: repeat(3, 1fr); } .ev-top { grid-template-columns: 1fr; } }

/* friends and clans */
.rail-btn.social-btn span { background: linear-gradient(#f0fff4, #b8f0c8); }
.rail-btn.social-btn.pulse span { animation: pulse .45s; }
.modal.social { width: min(520px, 100%); }
.modal.social header { background: linear-gradient(100deg, #29c58a, #3fa2ff); }
.modal.social .tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.modal.social .tabs button { flex: 1; padding: 8px; border-radius: 12px; background: #fff; border: 2px solid #efe6f7; font-weight: 600; }
.modal.social .tabs button.on { background: #3a224a; border-color: #3a224a; color: #fff; }
.s-h { display: flex; align-items: center; gap: 8px; margin: 14px 0 6px; font-size: 15px; }
.s-h small { font-weight: 500; color: #6f5a85; font-size: 12px; }
.s-h .link { margin-left: auto; background: none; border: 0; color: #6a35ae; font-weight: 600; font-size: 13px; text-decoration: underline; }
.fcode { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 16px; background: linear-gradient(120deg, #fff, #e6fbef); border: 2px solid #b8f0c8; }
.fcode small { display: block; color: #6f5a85; font-size: 12px; }
.fcode b { font-size: 24px; letter-spacing: 3px; font-family: ui-monospace, Consolas, monospace; }
.fadd { display: flex; gap: 8px; margin-top: 10px; }
.fadd input, .clan-new input { flex: 1; min-width: 0; border: 2px solid #efe6f7; border-radius: 12px; padding: 9px 12px; font: inherit; text-transform: none; }
.fadd input#addCode { text-transform: uppercase; letter-spacing: 2px; }
.flist { display: grid; gap: 6px; }
.fr { display: grid; grid-template-columns: auto 1fr auto auto auto; gap: 8px; align-items: center; padding: 8px 10px; background: #fff; border: 1px solid #efe6f7; border-radius: 14px; }
.fr .av { width: 36px; height: 36px; display: grid; place-items: center; font-size: 20px; border-radius: 12px; background: #f3eefb; position: relative; }
.fr .av.on::after { content: ''; position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border-radius: 50%; background: #2fc463; border: 2px solid #fff; }
.fr > div { min-width: 0; }
.fr b { font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr small { color: #6f5a85; font-size: 12px; }
.fr small i.on { font-style: normal; color: #1f9a4c; font-weight: 600; }
.fr .btn.sm { padding: 6px 10px; font-size: 13px; }
.fr .btn.more { padding: 6px 8px; }
.btn.ghost.leave { color: #c2412f; }
.clan-tag { display: inline-block; padding: 0 6px; border-radius: 8px; background: #efe6ff; color: #5b2fa0; font-size: 11px; font-weight: 700; vertical-align: 1px; }
.gift-box, .clan-ev, .ev-join { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 16px; margin-bottom: 10px; text-align: left; background: linear-gradient(120deg, #fff6d6, #ffe08a); border: 2px solid #ffc94d; box-shadow: 0 0 14px rgba(255,180,40,.35); }
.gift-box span, .clan-ev span, .ev-join span { font-size: 30px; }
.gift-box div, .clan-ev div, .ev-join div { flex: 1; }
.gift-box b, .clan-ev b, .ev-join b { display: block; }
.gift-box small, .clan-ev small, .ev-join small { color: #6f5a85; font-size: 12px; }
.gift-box em { font-style: normal; font-weight: 700; background: #3a224a; color: #fff; border-radius: 12px; padding: 6px 12px; }
.clan-ev, .ev-join { background: linear-gradient(120deg, #fff, #efe6ff); border-color: #d8c2ff; box-shadow: none; }
.clan-ev em, .ev-join em { font-style: normal; font-size: 22px; color: #6a35ae; }
.ev-join { margin: 12px 0 0; }
.clan-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 18px; background: linear-gradient(120deg, #fff, #e8f4ff); border: 2px solid #c6e2ff; margin-bottom: 10px; }
.clan-head > span { font-size: 40px; }
.clan-head b { font-size: 19px; display: block; }
.clan-head small { color: #6f5a85; }
.clan-actions { display: flex; gap: 8px; margin-top: 12px; }
.clan-actions .btn { flex: 1; }
.clan-new { display: grid; gap: 8px; }
.clan-new .row2 { display: grid; grid-template-columns: 1fr 90px; gap: 8px; }
.clan-new #cTag { text-transform: uppercase; }
.emoji-pick { display: flex; flex-wrap: wrap; gap: 4px; }
.emoji-pick button { width: 36px; height: 36px; border-radius: 10px; background: #fff; border: 2px solid #efe6f7; font-size: 18px; }
.emoji-pick button.on { border-color: #6a35ae; background: #f3eefb; }
.ev-steps.four { grid-template-columns: repeat(4, 1fr); }
.ev-top li.me { border-color: #a77bff; background: #f6f0ff; }
.ev-top.clans { grid-template-columns: 1fr; }
@media (max-width: 420px) { .fr { gap: 6px; padding: 8px; } .fr > div { min-width: 0; } .fr .btn.sm { padding: 6px 8px; } }

/* clans v2 */
.crest { flex: none; width: 38px; height: 38px; display: grid; place-items: center; font-size: 20px; border-radius: 12px; background: #fff; border: 3px solid #d39b6a; box-shadow: inset 0 -2px 0 rgba(0,0,0,.06); }
.crest.big { width: 58px; height: 58px; font-size: 32px; border-radius: 18px; border-width: 4px; }
.crest.bronze { border-color: #d39b6a; background: linear-gradient(#fff8f0, #fbe6d2); }
.crest.silver { border-color: #a9b6c6; background: linear-gradient(#ffffff, #e8eef6); }
.crest.gold { border-color: #f0b52a; background: linear-gradient(#fffbe8, #ffe9a3); box-shadow: 0 0 10px rgba(255,190,40,.45); }
.crest.rainbow { border-color: transparent; background: linear-gradient(#fff, #fff) padding-box, conic-gradient(#ff6f91, #ffb44d, #ffe066, #6cdb8b, #4fb8ff, #a77bff, #ff6f91) border-box; box-shadow: 0 0 14px rgba(167,123,255,.45); }
.clan-tag.crest-gold { background: #fff1c2; color: #8a5a00; }
.clan-tag.crest-rainbow { background: linear-gradient(90deg, #ffe0ec, #e4f1ff); color: #5b2fa0; }
.clan-head .grow { flex: 1; min-width: 0; }
.clan-head .perk { color: #1f9a4c; font-weight: 700; }
.bar.clan-xp { height: 8px; margin: 6px 0 3px; }
.bar.clan-xp i { background: linear-gradient(90deg, #6cdb8b, #3fa2ff); }
.clan-pitch { padding: 10px 14px; border-radius: 16px; background: linear-gradient(120deg, #fff, #efe6ff); border: 2px solid #d8c2ff; margin-bottom: 6px; }
.clan-pitch b { display: block; font-size: 16px; }
.clan-pitch span { font-size: 13px; color: #4b3a5e; }
.fr.applied { margin: 8px 0; border-color: #ffd36b; background: #fffbea; }
.subtabs { display: flex; gap: 4px; margin: 8px 0 10px; overflow-x: auto; }
.subtabs button { flex: 1; white-space: nowrap; padding: 7px 8px; border-radius: 10px; background: #f3eefb; border: 0; font-weight: 600; font-size: 13px; color: #4b3a5e; }
.subtabs button.on { background: #6a35ae; color: #fff; }
.subtabs button i { font-style: normal; background: #ff5d5d; color: #fff; border-radius: 99px; padding: 0 6px; font-size: 11px; margin-left: 2px; }
.msg-pick { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.msg-pick button { padding: 5px 9px; border-radius: 99px; background: #fff; border: 2px solid #efe6f7; font-size: 12.5px; }
.msg-pick button:not(:disabled):active { transform: translateY(1px); }
.msg-pick button:disabled { opacity: .5; }
.feed { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.feed li { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; padding: 7px 10px; background: #fff; border: 1px solid #efe6f7; border-radius: 12px; font-size: 13.5px; }
.feed li small { color: #6f5a85; font-size: 11.5px; white-space: nowrap; }
.feed li.k-level { background: linear-gradient(90deg, #fffbe8, #fff); border-color: #ffd36b; }
.feed li.k-msg span { color: #3a224a; }
.req.mine { padding: 10px 12px; border-radius: 14px; background: #fff; border: 2px solid #b8f0c8; display: grid; gap: 6px; margin-bottom: 8px; }
.req.mine small { color: #6f5a85; margin-left: 6px; }
.ask-form { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; }
.ask-form select { min-width: 0; border: 2px solid #efe6f7; border-radius: 12px; padding: 9px 10px; font: inherit; background: #fff; }
.stepper { display: flex; align-items: center; gap: 4px; }
.stepper button { min-width: 34px; height: 34px; border-radius: 10px; border: 2px solid #efe6f7; background: #fff; font-weight: 700; }
.stepper b { min-width: 26px; text-align: center; font-size: 17px; }
.stepper.wide .btn { margin-left: 6px; }
.modes { display: grid; gap: 6px; }
.modes button { text-align: left; padding: 9px 12px; border-radius: 12px; background: #fff; border: 2px solid #efe6f7; font-weight: 600; }
.modes button.on { border-color: #6a35ae; background: #f3eefb; }
.fcode .btn + .btn { margin-left: 6px; }
.small { font-size: 12.5px; }
@media (max-width: 420px) { .ask-form { grid-template-columns: 1fr auto; } .ask-form .btn { grid-column: 1 / -1; } }

/* clans v2 polish */
.subtabs button { flex: 1 1 0; min-width: 0; padding: 7px 4px; font-size: 12.5px; }
.msg-box > summary { list-style: none; display: block; text-align: center; cursor: pointer; }
.msg-box > summary::-webkit-details-marker { display: none; }
.msg-box[open] > summary { margin-bottom: 8px; }

/* one-time unlock of the paid features */
.modal.unlock header { background: linear-gradient(100deg, #7b5cff, #ff6fb1); }
.unlock-box ul { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 8px; }
.unlock-box li { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: #fff; box-shadow: 0 3px 0 rgba(44,26,74,.1); }
.unlock-box li span { grid-row: 1 / 3; font-size: 26px; text-align: center; }
.unlock-box li small { color: var(--ink2); font-size: 12.5px; }
.unlock-price { text-align: center; padding: 10px; border-radius: 14px; background: linear-gradient(#fffbe8, #ffeeb0); border: 2px solid #ffd34d; margin: 8px 0 4px; }

/* side menu: hide it with the tab (or a swipe) and pull it back */
.rail-wrap { position: relative; transition: transform .28s cubic-bezier(.3,1.3,.5,1); }
.rail-wrap.hidden { transform: translateX(calc(100% + 14px)); }
.rail-toggle { position: absolute; left: -20px; top: 50%; width: 22px; height: 54px; margin-top: -27px; border-radius: 12px 0 0 12px; background: var(--glass); border: 1.5px solid rgba(255,255,255,.22); border-right: 0; color: #fff; font-size: 18px; font-weight: 700; display: grid; place-items: center; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); touch-action: none; }
.rail-toggle span { display: block; transition: transform .28s; text-shadow: 0 1px 0 rgba(44,26,74,.8); }
.rail-wrap.hidden .rail-toggle { left: -34px; width: 32px; }
.rail-wrap.hidden .rail-toggle span { transform: rotate(180deg); }
.rail-wrap.hidden:has(.rail .dot:not([hidden])) .rail-toggle::after { content: ''; position: absolute; top: 6px; left: 6px; width: 9px; height: 9px; border-radius: 50%; background: #ff4f5e; border: 2px solid #fff; }
/* first wallet connection: name your city */
.modal.name-city header { background: linear-gradient(100deg, #ffb44d, #ff6f91); }
.name-city .nc-box { text-align: center; }
.name-city .nc-ico { font-size: 46px; }
.name-city input { width: 100%; box-sizing: border-box; font: inherit; font-size: 20px; font-weight: 600; text-align: center; padding: 12px; margin-top: 10px; border-radius: 14px; border: 2px solid #e3d6fb; color: var(--ink); user-select: text; }
.name-city input:focus { outline: none; border-color: #ff8f6b; }

/* test network badge (devnet config only) */
.net-badge { position: fixed; left: 50%; bottom: calc(4px + var(--safe-b)); transform: translateX(-50%); z-index: 50; padding: 2px 10px; border-radius: 99px; background: #ff9f1a; color: #3a1a00; font-size: 11px; font-weight: 800; letter-spacing: .6px; pointer-events: none; box-shadow: 0 2px 0 rgba(0,0,0,.2); }

/* building sheet: merge 3 equal buildings into the next level */
.merges { margin-top: 14px; padding: 12px; border-radius: 16px; background: linear-gradient(135deg, #fff6e0, #f6ecff); border: 2px solid #f1dcff; }
.merges h3 { margin: 0 0 2px; font-size: 16px; }
.merges > p { margin: 0 0 8px; font-size: 12.5px; }
.merge-btn { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; margin-top: 6px; border-radius: 14px; background: #fff; border: 2px solid var(--c, #e3d6fb); box-shadow: 0 3px 0 rgba(44,26,74,.12); text-align: left; color: var(--ink); font: inherit; }
.merge-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(44,26,74,.12); }
.mg-pics { display: flex; }
.mg-pics img { width: 30px; height: 30px; object-fit: contain; }
.mg-pics img + img { margin-left: -14px; }
.mg-arrow { font-weight: 800; color: #b07ae8; }
.mg-out { width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 0 6px rgba(255,200,60,.9)); }
.mg-txt { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.mg-txt small { opacity: .75; font-size: 12px; }
.merge-btn .price { font-weight: 700; font-size: 13px; text-align: right; white-space: nowrap; display: flex; flex-direction: column; }
.merge-btn .price small { font-weight: 500; opacity: .7; font-size: 11px; }
@media (max-width: 520px) { .mg-pics img + img:nth-child(3) { display: none; } .merge-btn .price small { display: none; } }

/* wallet screen */
.modal.wallet header { background: linear-gradient(100deg, #8b5cf6, #14b8a6); }
.wl-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: #fff; border: 2px solid #ece3f7; }
.wl-card.on { border-color: #b9f0d3; background: linear-gradient(135deg, #f1fff7, #fff); }
.wl-ico { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, #f3e9ff, #e3fbf3); }
.wl-ico .sc-ui-icon { width: 32px; height: 32px; }
.wl-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wl-id small { font-size: 12.5px; color: var(--ink2); display: flex; align-items: center; gap: 5px; }
.wl-id b { font-size: 16px; }
.wl-dot { width: 8px; height: 8px; border-radius: 50%; background: #14c57a; box-shadow: 0 0 6px #14c57a; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; letter-spacing: -.2px; }
.wl-mini { padding: 6px 10px; border-radius: 10px; background: #f1ebf7; color: var(--ink2); font-size: 12.5px; font-weight: 600; }
.wl-mini:active { transform: translateY(1px); }
.wl-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.wl-tile { padding: 12px; border-radius: 16px; background: #fff; border: 2px solid #ece3f7; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wl-tile small { font-size: 12px; color: var(--ink2); font-weight: 600; }
.wl-tile b { font-size: 24px; line-height: 1.15; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
.wl-tile span { font-size: 12px; color: var(--ink2); }
.wl-tile.won { background: linear-gradient(135deg, #fff7dc, #fff); border-color: #ffe3a3; }
.wl-wd { margin-top: 10px; padding: 12px; border-radius: 16px; background: #fff; border: 2px solid #ece3f7; }
.wl-wd-top { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.wl-wd-top small { font-size: 12.5px; color: var(--ink2); }
.wl-wd-form { display: flex; gap: 8px; }
.wl-wd-form input { flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 9px 12px; border-radius: 12px; border: 2px solid #e3d6fb; color: var(--ink); user-select: text; }
.wl-wd-form input:focus { outline: none; border-color: #b07ae8; }
.wl-wd-form .btn { padding: 9px 14px; }
.wl-wd-form :disabled { opacity: .55; }
.wl-list { margin-top: 10px; display: grid; gap: 4px; }
.wl-row { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; padding: 6px 10px; border-radius: 10px; background: #faf6ff; font-size: 13.5px; }
.wl-row small { grid-column: span 2; font-size: 11.5px; color: var(--ink2); }
.wl-st { font-style: normal; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: #e4f3ff; color: #1c5a8a; }
.wl-st.paid { background: #dcf6e3; color: #1f6b38; }
.wl-st.rejected { background: #fde1dc; color: #9b2c1d; }
.wl-h { margin: 14px 0 0; }
.wl-note { margin: 2px 0 8px; font-size: 12.5px; }
.wl-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 6px; }
.wl-tier { padding: 8px 10px; border-radius: 12px; background: #fff; border: 2px solid #ece3f7; display: flex; flex-direction: column; gap: 1px; }
.wl-tier span { font-size: 12px; color: var(--ink2); }
.wl-tier em { font-style: normal; font-size: 13px; color: #1f9a5a; font-weight: 700; }
.wl-tier.me { border-color: #f0b90b; box-shadow: 0 0 0 2px #ffe7a8; }
.wl-ca { padding: 10px; border-radius: 12px; background: #fff; margin-top: 10px; }
.wl-ca code { display: block; font-size: 12px; word-break: break-all; user-select: text; }
@media (max-width: 420px) { .wl-tiles { grid-template-columns: 1fr; } .wl-card { flex-wrap: wrap; } }

/* menu groups */
.menu-h { margin: 12px 0 8px; font-size: 13px; letter-spacing: .6px; text-transform: uppercase; color: var(--ink2); }
.menu-h:first-child { margin-top: 0; }
.mi span .sc-ui-icon { width: 34px; height: 34px; }
/* settings */
.modal.settings header { background: linear-gradient(100deg, #7c8db5, #a58bd6); }
.set-sec { padding: 12px; border-radius: 16px; background: #fff; border: 2px solid #ece3f7; margin-bottom: 10px; }
.set-sec h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 16px; }
.set-sec h3 .sc-ui-icon { width: 24px; height: 24px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; }
.set-row + .set-row { border-top: 1.5px solid #f2ecf8; }
.set-row > div:first-child { display: flex; flex-direction: column; min-width: 0; }
.set-row small { font-size: 12px; color: var(--ink2); }
.set-row input[type=range] { width: 46%; max-width: 200px; accent-color: #b07ae8; }
.seg { flex: none; display: flex; padding: 3px; border-radius: 12px; background: #f1ebf7; }
.seg button { padding: 6px 12px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--ink2); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 2px 0 rgba(44,26,74,.12); }
.set-name { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink2); }
.set-name input { font: inherit; font-size: 16px; padding: 10px 12px; border-radius: 12px; border: 2px solid #e3d6fb; color: var(--ink); user-select: text; }
/* reduce animations */
body.calm *, body.calm *::before, body.calm *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }

/* maintenance screen */
.maint { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; background: linear-gradient(rgba(255,166,61,.92), rgba(255,94,126,.9) 55%, rgba(139,92,246,.92)); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.maint-card { max-width: 380px; text-align: center; padding: 26px 22px; border-radius: 26px; background: var(--cream); box-shadow: 0 10px 0 rgba(44,26,74,.18), 0 20px 50px rgba(44,26,74,.3); }
.maint-sun { width: 96px; height: 96px; margin: -70px auto 6px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff6b0, #ffc93c 60%, #f39c12); box-shadow: 0 0 40px #ffd34d; animation: spin 12s linear infinite; }
.maint-sun .sc-ui-icon { width: 70px; height: 70px; }
.maint h2 { margin: 4px 0 6px; font-size: 28px; }
.maint p { margin: 0 0 10px; font-size: 16px; font-weight: 600; }
.maint small { color: var(--ink2); font-size: 13px; line-height: 1.4; display: block; }
