/* FUSANGCHA TEA SHOP — style V2: 2.5D cute, palette cam – đen – trắng/kem, mobile-first + desktop layout riêng */
:root {
  --brand: #F47B20; --brand-2: #FFB36B; --brand-deep: #D95C10;
  --dark: #171717; --bg: #FFF9F2; --cream: #F5EDE3; --card: #FFFFFF;
  --ink: #171717; --muted: #7A6E64; --line: rgba(23, 23, 23, .08);
  --good: #2FA36B; --bad: #E0483E; --gold: #FFC93C;
  --r-lg: 24px; --r-md: 18px; --r-sm: 14px;
  --sh: 0 4px 0 rgba(23, 23, 23, .12), 0 10px 24px rgba(23, 23, 23, .08);
  --sh-btn: 0 4px 0 var(--brand-deep);
  --f-head: 'Baloo 2', 'Nunito', system-ui, sans-serif, 'Noto Color Emoji';
  --f-body: 'Nunito', 'Inter', system-ui, sans-serif, 'Noto Color Emoji';
  --hud-h: 60px; --bnav-h: 66px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --cs: 62px; /* cỡ nhân vật */
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--f-body); font-weight: 700; color: var(--ink); background: var(--bg);
  overflow: hidden; touch-action: manipulation; -webkit-user-select: none; user-select: none; overscroll-behavior: none;
}
input, textarea { -webkit-user-select: text; user-select: text; font: inherit; }
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
h1, h2, h3 { font-family: var(--f-head); font-weight: 700; margin: 0 0 .4em; letter-spacing: .2px; }
small { font-weight: 700; }
.muted { color: var(--muted); }
.center { text-align: center; }
.small { font-size: 12px; }
[hidden] { display: none !important; }

/* ---------- loading ---------- */
#loading { position: fixed; inset: 0; z-index: 999; display: grid; place-content: center; text-align: center; background: var(--bg); transition: opacity .3s; }
.ld-cup { font-size: 64px; animation: bob 1s ease-in-out infinite; }
body.ready #loading { opacity: 0; pointer-events: none; }

/* ---------- BUTTONS / CHIPS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 18px;
  border: 0; border-radius: var(--r-sm); background: var(--cream); color: var(--ink); font-weight: 800; font-size: 15px;
  box-shadow: 0 4px 0 rgba(23, 23, 23, .14); transition: transform .08s, box-shadow .08s, filter .15s; white-space: nowrap;
}
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 rgba(23, 23, 23, .14); }
.btn.primary { background: var(--brand); color: #fff; box-shadow: var(--sh-btn); }
.btn.primary:active:not(:disabled) { box-shadow: 0 1px 0 var(--brand-deep); background: var(--brand-deep); }
.btn.ghost { background: #fff; box-shadow: 0 0 0 2px var(--line) inset, 0 3px 0 rgba(23, 23, 23, .08); }
.btn.danger { background: var(--bad); color: #fff; box-shadow: 0 4px 0 #A52A22; }
.btn.link { background: none; box-shadow: none; color: var(--muted); text-decoration: underline; min-height: 36px; }
.btn.big { min-height: 54px; font-size: 18px; border-radius: var(--r-md); font-family: var(--f-head); font-weight: 600; letter-spacing: .3px; }
.btn.wide { width: 100%; white-space: normal; text-align: center; }
.btn.sm { min-height: 36px; padding: 6px 12px; font-size: 13px; border-radius: 12px; }
.btn.xs { min-height: 30px; padding: 4px 10px; font-size: 12px; border-radius: 10px; }
.btn:disabled { opacity: .45; cursor: default; filter: grayscale(.3); }
.btn.nudge { animation: nudge .5s; }
.icon-btn { width: 44px; height: 44px; border: 0; border-radius: 14px; background: #fff; box-shadow: 0 3px 0 rgba(23, 23, 23, .12); font-size: 18px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row > .btn { flex: 1; }
.link { background: none; border: 0; color: var(--brand-deep); font-weight: 800; font-size: 12px; padding: 4px; }
.chip-s { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 99px; background: #fff; font-size: 12px; box-shadow: 0 0 0 1.5px var(--line) inset; }
.chip-s.hot { background: var(--dark); color: var(--brand-2); }
.chip-s.ev { background: var(--brand-2); }
.pb { display: block; height: 8px; border-radius: 99px; background: var(--cream); overflow: hidden; margin: 6px 0 2px; }
.pb > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .4s; }
.tag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 6px; background: var(--bad); color: #fff; font-size: 10px; font-style: normal; vertical-align: middle; }
.rb { display: inline-block; padding: 1px 7px; border-radius: 99px; color: #fff; font-size: 10px; font-style: normal; font-weight: 800; }

/* ---------- APP LAYOUT (mobile-first) ---------- */
.app { height: 100vh; height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: var(--hud-h) 1fr calc(var(--bnav-h) + var(--safe-b)); grid-template-areas: "hud" "stage" "bnav"; }
.sidebar, .rail { display: none; }
.hud { grid-area: hud; }
.stage { grid-area: stage; position: relative; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.bnav { grid-area: bnav; }
body.selling .app { grid-template-rows: var(--hud-h) 1fr 0; }
body.selling .bnav { display: none; }

/* ---------- HUD ---------- */
.hud { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; background: var(--dark); color: #fff; z-index: 20; }
.hud-profile { display: flex; align-items: center; gap: 8px; background: none; border: 0; padding: 0; min-width: 0; color: #fff; }
.lvring { --p: 0; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(var(--brand) calc(var(--p) * 1%), rgba(255, 255, 255, .15) 0); }
.lvring b { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--dark); font-family: var(--f-head); font-size: 16px; }
.hud-name { font-family: var(--f-head); font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 32vw; }
.hud-cur { display: flex; gap: 6px; align-items: center; }
.cur { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 10px; border: 0; border-radius: 99px; background: rgba(255, 255, 255, .1); color: #fff; font-size: 14px; }
.cur b { font-family: var(--f-head); font-weight: 600; font-variant-numeric: tabular-nums; }
.cur.streak { background: var(--brand); }
.cur.streak.cold { background: rgba(255, 255, 255, .1); filter: grayscale(.4); }
.cur.tk { display: none; }
.cur.bump, .lvring.bump { animation: bump .35s; }
@media (max-width: 380px) { .cur.gem { display: none; } .hud-name { max-width: 24vw; } }

/* ---------- BOTTOM NAV ---------- */
.bnav { display: flex; background: #fff; box-shadow: 0 -2px 0 var(--line); padding-bottom: var(--safe-b); z-index: 20; }
.bnav button { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; background: none; font-size: 11px; font-weight: 800; color: var(--muted); min-height: 44px; }
.bnav button span { font-size: 22px; line-height: 1; transition: transform .15s; }
.bnav button.on { color: var(--brand-deep); }
.bnav button.on span { transform: translateY(-2px) scale(1.12); }
.bnav button.on::before { content: ''; position: absolute; top: 0; width: 36px; height: 4px; border-radius: 0 0 4px 4px; background: var(--brand); }
.badge { position: absolute; top: 4px; right: calc(50% - 22px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 10px; font-style: normal; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff; }

/* ---------- SCENE 2.5D ---------- */
.scene { --px: 0; --py: 0; position: relative; flex: 1; min-height: 0; overflow: hidden; background: #BFE6F5; isolation: isolate; }
.layer { position: absolute; inset: 0; pointer-events: none; }
.l-sky { background: linear-gradient(180deg, #8FD3F4 0%, #CDEFFB 55%, #FFF3E2 100%); transition: background .6s; }
.w-rain .l-sky { background: linear-gradient(180deg, #7C8DA6 0%, #AEBBCB 60%, #DCE3EA 100%); }
.w-hot .l-sky { background: linear-gradient(180deg, #FF9E5E 0%, #FFD08A 55%, #FFF0D6 100%); }
.w-night .l-sky { background: linear-gradient(180deg, #1B1F3B 0%, #3B2F5C 60%, #6B4A6E 100%); }
.sun { position: absolute; top: 8%; right: 9%; font-size: clamp(34px, 6vw, 58px); filter: drop-shadow(0 0 18px rgba(255, 220, 120, .8)); animation: bob 6s ease-in-out infinite; }
.cloud { position: absolute; width: 120px; height: 36px; border-radius: 40px; background: rgba(255, 255, 255, .85); animation: drift 60s linear infinite; }
.cloud::before, .cloud::after { content: ''; position: absolute; background: inherit; border-radius: 50%; }
.cloud::before { width: 54px; height: 54px; top: -26px; left: 18px; }
.cloud::after { width: 40px; height: 40px; top: -18px; left: 60px; }
.c1 { top: 10%; left: -10%; } .c2 { top: 22%; left: 40%; animation-duration: 85s; transform: scale(.7); } .c3 { top: 6%; left: 75%; animation-duration: 70s; transform: scale(.85); }
.w-night .cloud { opacity: .15; }
.l-city { transform: translate(calc(var(--px) * -10px), calc(var(--py) * -4px)); transition: transform .3s ease-out; }
.city { position: absolute; left: -5%; right: -5%; bottom: 36%; background-repeat: repeat-x; background-position: bottom; }
.c-back { height: 34%; opacity: .35; background-size: auto 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 200'%3E%3Cpath fill='%23171717' d='M0 200V120h30V80h40v40h20V60h50v140zM140 200V100h40V40h30v60h30v100zM240 200V130h40V90h50v40h20V70h50v130z'/%3E%3C/svg%3E"); }
.c-front { height: 26%; opacity: .55; background-size: auto 100%; transform: translateX(calc(var(--px) * -8px));
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 120'%3E%3Cpath fill='%23D95C10' d='M0 120V60h40V30h30v30h30v60zM100 120V50h50v-20h20v20h30v70zM200 120V70h30V40h40v80z' opacity='.55'/%3E%3C/svg%3E"); }
.w-night .city { filter: brightness(.6); }
.l-street .walk { position: absolute; left: 0; right: 0; bottom: 0; height: 38%;
  background: linear-gradient(180deg, #E9DCCB 0, #F5EDE3 30%, #EFE3D3 100%); }
.l-street .walk::before { content: ''; position: absolute; inset: 0; opacity: .5;
  background: repeating-linear-gradient(90deg, transparent 0 58px, rgba(23, 23, 23, .06) 58px 60px), repeating-linear-gradient(180deg, transparent 0 28px, rgba(23, 23, 23, .05) 28px 30px); }
.l-street .road { position: absolute; left: 0; right: 0; bottom: 38%; height: 4%; background: #4A4A4A; }
.w-night .l-street .walk { filter: brightness(.75) saturate(.8); }

.l-front { display: flex; justify-content: center; align-items: flex-end; bottom: 22%; transform: translateX(calc(var(--px) * -4px)); transition: transform .3s; }
.l-front .front { width: min(86%, 680px); height: 78%; overflow: visible; filter: drop-shadow(0 8px 0 rgba(23, 23, 23, .08)); }
.signboard { pointer-events: auto; cursor: pointer; transform-box: fill-box; transform-origin: center; }
.signboard.wiggle { animation: wiggle .5s; }
.neon { animation: neon 2.2s ease-in-out infinite; }
.l-front, .l-front svg { pointer-events: none; } .l-front .signboard { pointer-events: auto; }

.l-decor .dc { position: absolute; font-size: clamp(22px, 4vw, 38px); filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .12)); }
.dc.plant { left: 12%; bottom: 22%; } .dc.plant.r { left: auto; right: 12%; }
.dc.lamp { left: 26%; bottom: 62%; animation: glow 3s ease-in-out infinite; }
.dc.poster { right: 24%; bottom: 46%; transform: rotate(-6deg); }
.dc.table { left: 4%; bottom: 8%; font-size: clamp(24px, 4.5vw, 40px); }
.dc.pumpkin { right: 5%; bottom: 10%; } .dc.bat { right: 30%; top: 14%; animation: bob 2s ease-in-out infinite; }

/* Barista + bảng menu vỉa hè */
.l-counter { bottom: 0; }
.barista { position: absolute; left: calc(50% + min(25vw, 230px)); bottom: 24%; transition: bottom .3s; }
.barista .chibi { --cs: 54px; animation: bob 2.4s ease-in-out infinite; }
.stand { position: absolute; left: calc(50% - min(31vw, 290px)); bottom: 24%; display: flex; flex-direction: column; align-items: center; transition: bottom .3s; }
.board { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 10px 8px; background: var(--dark); border-radius: 12px 12px 8px 8px; border: 3px solid #3a3a3a; box-shadow: 0 4px 0 rgba(0, 0, 0, .2); }
.board b { font-family: var(--f-head); color: var(--brand-2); font-size: 11px; letter-spacing: 2px; }
.board .cupdisp { font-size: 22px; }
.board .stk { position: absolute; right: -10px; top: -10px; font-size: 18px; }
.machs { display: flex; gap: 2px; margin-top: 3px; background: var(--cream); border: 2.5px solid var(--dark); border-radius: 10px; padding: 2px 6px; }
.machs .mach { font-size: 16px; }
.mach { position: relative; } .mach i { position: absolute; right: -6px; top: -6px; background: var(--brand); color: #fff; font-size: 9px; font-style: normal; border-radius: 6px; padding: 0 3px; }
.legs { width: 46px; height: 14px; border-left: 4px solid #5a4636; border-right: 4px solid #5a4636; }
body.selling .barista { bottom: 30%; }
body.selling .stand { display: none; }
@media (max-width: 899px) { .barista { left: auto; right: 4%; } .stand { left: 3%; } .barista .chibi { --cs: 44px; } }
body:not(.selling) .l-front { bottom: 30%; }
body:not(.selling) .barista, body:not(.selling) .stand { bottom: 31%; }
@media (max-width: 899px) { body:not(.selling) .l-front { bottom: 36%; height: auto; top: 18%; } body:not(.selling) .barista, body:not(.selling) .stand { bottom: 37%; } }

/* Chibi (nhân vật mập mạp) */
.chibi { position: relative; width: var(--cs); height: calc(var(--cs) * 1.25); }
.chibi .body { position: absolute; left: 14%; right: 14%; bottom: 0; height: 46%; border-radius: 45% 45% 22% 22%; background: var(--shirt, #9AD0A0); border: 3px solid var(--dark); }
.chibi .head { position: absolute; left: 0; right: 0; top: 0; height: 72%; border-radius: 50%; background: #FFE7CF; border: 3px solid var(--dark); display: grid; place-items: center; overflow: hidden; }
.chibi .face { font-size: calc(var(--cs) * .62); line-height: 1; transform: translateY(4%); }
.chibi.small { --cs: 42px; }

/* Người đi đường */
.l-walk { overflow: hidden; }
.walker { position: absolute; bottom: 4%; animation: walk-ltr 18s linear infinite; }
.walker.rtl { animation-name: walk-rtl; bottom: 9%; }
.walker .chibi { animation: step .5s ease-in-out infinite alternate; }
body.selling .l-walk { display: none; }

/* Khách tại quầy */
.l-npc { display: flex; justify-content: center; align-items: flex-end; gap: 4px; padding: 0 6px 4px; pointer-events: none; }
.slot { flex: 1; max-width: 190px; display: flex; justify-content: center; }
.cust { position: relative; display: flex; flex-direction: column; align-items: center; pointer-events: auto; cursor: pointer; transition: transform .2s; }
.cust.arrive { animation: arrive .45s cubic-bezier(.3, 1.4, .5, 1); }
.cust.leaving { animation: leave 1.7s ease-in forwards; pointer-events: none; }
.cust.ready .who { animation: ready-bounce .8s ease-in-out infinite; }
.cust.selected .who::after { content: ''; position: absolute; left: 50%; bottom: -6px; width: 70%; height: 10px; transform: translateX(-50%); border-radius: 50%; background: rgba(244, 123, 32, .45); }
.who { position: relative; padding: 6px; }
.pring { position: absolute; inset: -2px; width: calc(100% + 4px); height: calc(var(--cs) * 1.05); }
.mood { position: absolute; right: -6px; top: 0; font-size: 20px; background: #fff; border-radius: 50%; width: 28px; height: 28px; display: grid; place-items: center; box-shadow: 0 2px 0 rgba(0, 0, 0, .15); }
.mood.pop { animation: bump .35s; }
.nm { font-size: 11px; background: rgba(255, 255, 255, .9); padding: 1px 7px; border-radius: 99px; white-space: nowrap; margin-top: 2px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.nm .rb { font-size: 9px; padding: 0 5px; }
.bubble { position: relative; margin-bottom: 6px; padding: 7px 9px; min-width: 84px; max-width: 150px; background: #fff; border: 2.5px solid var(--dark); border-radius: 14px; font-size: 12px; line-height: 1.3; text-align: left; box-shadow: 0 3px 0 rgba(23, 23, 23, .15); }
.bubble::after { content: ''; position: absolute; left: 50%; bottom: -9px; width: 12px; height: 12px; background: #fff; border-right: 2.5px solid var(--dark); border-bottom: 2.5px solid var(--dark); transform: translateX(-50%) rotate(45deg); }
.bubble.sel { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(244, 123, 32, .3); }
.bubble.sel::after { border-color: var(--brand); }
.bubble.react { text-align: center; font-weight: 800; }
.bubble.react.good { background: #FFF4D6; } .bubble.react.bad { background: #FFE4E1; }
.bubble .stars { color: var(--gold); font-size: 14px; letter-spacing: 1px; -webkit-text-stroke: .5px #B8860B; }
.bubble .tag { position: absolute; top: -10px; right: -8px; margin: 0; padding: 0 4px; background: var(--dark); font-size: 12px; }
.od { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--dark); margin-right: 3px; vertical-align: -1px; }
.cust.r-legendary .chibi .head { box-shadow: 0 0 0 3px var(--brand), 0 0 18px var(--brand); }
.cust.r-epic .chibi .head { box-shadow: 0 0 0 3px #A855F7; }
.cust.r-rare .chibi .head { box-shadow: 0 0 0 3px #3B82F6; }

/* Thanh trạng thái ngày bán */
.salebar { position: absolute; left: 8px; right: 8px; top: 8px; display: none; grid-template-columns: 1fr auto; gap: 6px 8px; align-items: center; z-index: 5; }
body.selling .salebar { display: grid; }
.sb-l { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.sb-l > b { background: var(--dark); color: #fff; padding: 3px 10px; border-radius: 99px; font-family: var(--f-head); font-weight: 600; }
.sb-r { display: flex; gap: 6px; align-items: center; }
.sb-r .icon-btn { width: 40px; height: 40px; }
.combo { font-family: var(--f-head); color: #fff; background: var(--brand); padding: 2px 10px; border-radius: 99px; font-size: 14px; }
.combo:empty { display: none; }
.combo.bump { animation: bump .3s; }
.today { background: #fff; padding: 4px 10px; border-radius: 99px; font-size: 13px; font-variant-numeric: tabular-nums; box-shadow: 0 2px 0 rgba(0, 0, 0, .1); }
.timebar { grid-column: 1 / -1; position: relative; height: 10px; border-radius: 99px; background: rgba(255, 255, 255, .75); overflow: hidden; box-shadow: inset 0 0 0 2px rgba(23, 23, 23, .12); }
.timebar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, var(--brand-2), var(--brand)); border-radius: inherit; }
.timebar .rushmark { position: absolute; left: 40%; width: 22%; top: 0; bottom: 0; background: repeating-linear-gradient(45deg, rgba(23, 23, 23, .12) 0 4px, transparent 4px 8px); }
.feverbar { grid-column: 1 / -1; display: none; position: relative; height: 22px; border-radius: 99px; background: var(--dark); overflow: hidden; text-align: center; color: #fff; font-family: var(--f-head); font-size: 13px; line-height: 22px; }
.feverbar.on { display: block; animation: pulse-glow .6s ease-in-out infinite alternate; }
.feverbar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #FF4D2E, var(--brand), var(--gold)); }
.feverbar span { position: relative; }
body.fever .scene { box-shadow: inset 0 0 0 4px var(--brand), inset 0 0 60px rgba(255, 90, 30, .45); }
body.fever .l-sky { filter: saturate(1.4) hue-rotate(-10deg); }

/* Hub */
.hub { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px; display: flex; flex-direction: column; gap: 8px; z-index: 6; }
body.selling .hub { display: none; }
.hub-card { background: rgba(255, 255, 255, .96); border-radius: var(--r-lg); padding: 14px; box-shadow: var(--sh); max-width: 520px; width: 100%; margin: 0 auto; border: 3px solid var(--dark); }
.hub-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.hub-top h2 { font-size: 20px; margin: 2px 0 8px; }
.hub-top small { color: var(--muted); }
.hot-chip { background: var(--dark); color: #fff; border-radius: 14px; padding: 6px 10px; font-size: 11px; text-align: center; flex: none; }
.hot-chip b { color: var(--brand-2); font-size: 14px; }
.hub-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.hchip { border: 0; background: var(--cream); padding: 7px 12px; border-radius: 99px; font-size: 13px; font-weight: 800; min-height: 36px; }
.hchip.pulse { background: var(--brand-2); animation: pulse 1.4s ease-in-out infinite; }
.cta-open { animation: cta 2.4s ease-in-out infinite; }
.announce { max-width: 520px; margin: 0 auto; width: 100%; background: var(--dark); color: #fff; padding: 10px 14px; border-radius: var(--r-md); font-size: 13px; }
.announce b { color: var(--brand-2); }
canvas.fx { z-index: 4; }

/* ---------- QUẦY PHA CHẾ ---------- */
.play { display: none; background: var(--bg); border-top: 3px solid var(--dark); padding: 8px 10px calc(10px + var(--safe-b)); overflow-y: auto; -webkit-overflow-scrolling: touch; }
body.selling .play { display: block; flex: 0 0 auto; max-height: 60%; }
body.selling .scene { flex: 1 1 40%; min-height: 230px; }
.ticket { background: #fff; border-radius: var(--r-md); padding: 8px 10px; box-shadow: 0 0 0 2px var(--line) inset; margin-bottom: 8px; font-size: 13px; }
.tk-empty { color: var(--muted); text-align: center; padding: 6px; }
.tk-who { display: flex; align-items: center; gap: 8px; }
.tk-who > div { flex: 1; min-width: 0; line-height: 1.25; }
.tk-face { font-size: 28px; }
.tk-line { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.tk-i { padding: 3px 8px; border-radius: 10px; background: var(--cream); font-size: 12px; }
.tk-i.ok { background: #DDF5E7; box-shadow: inset 0 0 0 2px var(--good); }
.tk-i.no { background: #FFE9E6; }
.tk-i.price { margin-left: auto; background: var(--dark); color: #fff; }
.tk-mem { font-size: 12px; color: var(--muted); }
.prep { display: grid; grid-template-columns: 92px 1fr; gap: 10px; }
.cupcol { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cupview svg { width: 86px; height: auto; display: block; filter: drop-shadow(0 4px 0 rgba(23, 23, 23, .12)); }
.steps { list-style: none; margin: 0; padding: 0; font-size: 11px; color: var(--muted); line-height: 1.55; }
.steps li.done { color: var(--good); }
.controls { min-width: 0; }
.tools { margin-bottom: 4px; }
.btn.step { min-height: 42px; font-size: 14px; }
.lbl { font-size: 12px; color: var(--muted); margin: 6px 0 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; min-height: 40px; padding: 6px 11px; border: 0; border-radius: 12px; background: #fff; font-size: 13px; font-weight: 800;
  box-shadow: 0 0 0 2px var(--line) inset, 0 3px 0 rgba(23, 23, 23, .08); transition: transform .08s; }
.chip:active:not(:disabled) { transform: scale(.94); }
.chip small { color: var(--muted); font-size: 10px; }
.chip.on { background: var(--brand); color: #fff; box-shadow: 0 3px 0 var(--brand-deep); }
.chip.on small { color: #FFE5CF; }
.chip.out:not(.on) { opacity: .65; }
.chip:disabled { opacity: .4; }
.chip .dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--dark); }
.chips.seg { flex-wrap: nowrap; gap: 4px; }
.chips.seg .chip { flex: 1 1 0; justify-content: center; padding: 4px 2px; min-width: 0; font-size: 12px; text-align: center; line-height: 1.1; }
.two { display: grid; grid-template-columns: 1fr; gap: 0; }
#btn-shake { margin-top: 10px; position: sticky; bottom: 0; z-index: 2; }
@media (max-width: 899px) { .lbl { margin: 4px 0 3px; } .chip { min-height: 38px; padding: 4px 9px; } .ticket { padding: 6px 8px; margin-bottom: 6px; } .tk-line { margin-top: 4px; } .prep { grid-template-columns: 74px 1fr; gap: 8px; } .cupview svg { width: 70px; } .tools .btn { min-height: 40px; } }

/* Lắc ly overlay */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(23, 23, 23, .55); display: grid; place-items: center; padding: 16px; touch-action: none; }
.shake-card { width: min(460px, 100%); background: #fff; border-radius: var(--r-lg); padding: 18px; text-align: center; border: 3px solid var(--dark); box-shadow: var(--sh); }
.shake-cup { font-size: 54px; animation: shake .18s linear infinite; }
.shake-card h3 { font-size: 26px; color: var(--brand-deep); }
.shake-card p { font-size: 13px; color: var(--muted); }
.shakebar { position: relative; height: 54px; border-radius: 16px; overflow: hidden; border: 3px solid var(--dark); background: #EEE; }
#shake-zones .z { position: absolute; top: 0; bottom: 0; }
.z.under { left: 0; background: #E5E1DC; } .z.good { background: var(--brand-2); } .z.over { background: #F6B6AE; }
.z.perfect { background: var(--brand); display: grid; place-items: center; box-shadow: 0 0 0 2px var(--dark) inset; }
.z.perfect span { font-family: var(--f-head); color: #fff; font-size: 11px; letter-spacing: 1px; }
.needle { position: absolute; top: -4px; bottom: -4px; width: 6px; margin-left: -3px; background: var(--dark); border-radius: 3px; box-shadow: 0 0 0 2px #fff; }

/* ---------- SHEET (panel) ---------- */
.sheet-scrim { position: fixed; inset: 0; background: rgba(23, 23, 23, .4); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 40; }
.sheet-scrim.open { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; max-height: 88dvh; height: 88dvh; z-index: 41; background: var(--bg); border-radius: 26px 26px 0 0; border-top: 3px solid var(--dark);
  transform: translateY(105%); visibility: hidden; transition: transform .28s cubic-bezier(.2, .9, .3, 1), visibility 0s .28s; display: flex; flex-direction: column; box-shadow: 0 -10px 40px rgba(0, 0, 0, .2); }
.sheet.open { transform: translateY(0); visibility: visible; transition: transform .28s cubic-bezier(.2, .9, .3, 1); }
.sheet-head { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 16px 14px 8px; touch-action: none; }
.sheet-head h2 { font-size: 20px; margin: 0; }
.grip { position: absolute; top: 6px; left: 50%; width: 44px; height: 5px; margin-left: -22px; border-radius: 9px; background: rgba(23, 23, 23, .2); }
.sheet-body { flex: 1; overflow-y: auto; padding: 4px 14px calc(18px + var(--safe-b)); -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.sheet-foot { position: sticky; bottom: calc(-18px - var(--safe-b)); margin: 12px -14px calc(-18px - var(--safe-b)); padding: 10px 14px calc(12px + var(--safe-b)); background: #fff; border-top: 2px solid var(--line); display: flex; gap: 8px; align-items: center; }
.sheet-foot .total { flex: 1; font-size: 13px; line-height: 1.2; }
.sheet-foot .total small { color: var(--muted); }
.tabs { display: flex; gap: 4px; background: var(--cream); padding: 4px; border-radius: 16px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.tab { flex: 1; border: 0; background: none; padding: 8px 10px; border-radius: 12px; font-size: 13px; font-weight: 800; white-space: nowrap; min-height: 40px; color: var(--muted); }
.tab.on { background: #fff; color: var(--ink); box-shadow: 0 2px 0 rgba(23, 23, 23, .1); }
.cats { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.pill { border: 0; background: #fff; padding: 7px 12px; border-radius: 99px; font-size: 12px; font-weight: 800; box-shadow: 0 0 0 2px var(--line) inset; min-height: 36px; }
.pill.on { background: var(--dark); color: #fff; box-shadow: none; }
.note { font-size: 13px; color: var(--muted); margin: 0 0 10px; line-height: 1.4; }
.sec { font-size: 17px; margin: 18px 0 8px; display: flex; align-items: baseline; gap: 8px; }
.sec small { color: var(--muted); font-family: var(--f-body); font-size: 12px; }
.info-strip { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 10px 12px; background: var(--dark); color: #fff; border-radius: var(--r-sm); font-size: 12px; margin-bottom: 10px; }
.info-strip b { color: var(--brand-2); }
.rwd { display: block; font-size: 12px; color: var(--brand-deep); margin-top: 2px; }

/* Kho */
.stock-list { display: flex; flex-direction: column; gap: 8px; }
.srow { display: flex; align-items: center; gap: 10px; background: #fff; padding: 10px; border-radius: var(--r-sm); box-shadow: 0 0 0 2px var(--line) inset; }
.sw { width: 30px; height: 30px; border-radius: 50%; border: 2.5px solid var(--dark); flex: none; }
.sinfo { flex: 1; min-width: 0; line-height: 1.25; }
.sinfo b { font-size: 14px; } .sinfo small { display: block; color: var(--muted); font-size: 11px; }
.qty { display: flex; align-items: center; gap: 4px; }
.qty button { width: 40px; height: 40px; border: 0; border-radius: 12px; background: var(--cream); font-size: 20px; font-weight: 900; box-shadow: 0 3px 0 rgba(23, 23, 23, .12); }
.qty button:last-child { background: var(--brand); color: #fff; box-shadow: 0 3px 0 var(--brand-deep); }
.qty span { min-width: 34px; text-align: center; font-family: var(--f-head); color: var(--brand-deep); }

/* Nhiệm vụ */
.mcard { display: flex; align-items: center; gap: 10px; background: #fff; padding: 10px 12px; border-radius: var(--r-md); margin-bottom: 8px; box-shadow: 0 0 0 2px var(--line) inset; }
.mcard.ready { box-shadow: 0 0 0 2.5px var(--brand) inset; background: #FFF4EA; }
.mcard.claimed { opacity: .6; }
.mi { font-size: 24px; }
.mb { flex: 1; min-width: 0; } .mb small { color: var(--muted); font-size: 11px; }
.evcard { background: #fff; border-radius: var(--r-md); padding: 12px; box-shadow: var(--sh); margin-bottom: 12px; }
.evcard p { font-size: 13px; color: var(--muted); }
.evbanner { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: var(--r-sm); background: var(--dark); color: #fff; }
.evbanner span { font-size: 34px; } .evbanner small { display: block; color: var(--brand-2); }
.evbanner.theme-halloween { background: linear-gradient(135deg, #2B1A3D, #171717); }
.evbanner.theme-trungthu { background: linear-gradient(135deg, #8A1C1C, #171717); }
.evcard .btn { margin-top: 10px; }
.week { display: grid; grid-template-columns: repeat(7, minmax(84px, 1fr)); gap: 5px; overflow-x: auto; padding-bottom: 4px; }
.wday { display: flex; flex-direction: column; gap: 3px; align-items: center; text-align: center; padding: 8px 3px; border-radius: 12px; background: #fff; font-size: 10px; box-shadow: 0 0 0 2px var(--line) inset; min-height: 110px; }
.wday b { font-family: var(--f-head); font-size: 13px; }
.wday.today { box-shadow: 0 0 0 2.5px var(--brand) inset; background: #FFF4EA; }
.wday.done { background: #E8F7EE; }
.wday .pb { width: 100%; }
.final { margin-top: 10px; background: var(--cream); padding: 10px; border-radius: 14px; font-size: 12px; }
.stamp-head { display: flex; gap: 12px; align-items: center; background: #fff; padding: 12px; border-radius: var(--r-md); margin-bottom: 10px; box-shadow: var(--sh); }
.stamp-head small { color: var(--muted); }
.stamp-big { font-family: var(--f-head); font-size: 26px; color: var(--brand-deep); white-space: nowrap; }
.stamps { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.stamp { position: relative; border: 2.5px dashed rgba(23, 23, 23, .2); background: #fff; border-radius: 16px; padding: 18px 6px 8px; font-size: 11px; display: flex; flex-direction: column; gap: 4px; align-items: center; min-height: 96px; }
.stamp i { position: absolute; top: 4px; left: 8px; font-style: normal; color: var(--muted); }
.stamp em { font-style: normal; font-size: 10px; color: var(--muted); }
.stamp.open { border: 2.5px solid var(--brand); background: #FFF4EA; } .stamp.open em { color: var(--brand-deep); font-weight: 900; }
.stamp.got { border-style: solid; border-color: var(--good); background: #E8F7EE; opacity: .8; }
.premium-lock { margin-top: 12px; padding: 12px; background: var(--dark); color: #fff; border-radius: var(--r-sm); font-size: 12px; }

/* Quà */
.streak-hero { display: flex; gap: 12px; align-items: center; background: var(--dark); color: #fff; padding: 14px; border-radius: var(--r-md); }
.streak-hero small { color: #FFD9B8; }
.flame { font-size: 44px; animation: flame 1.2s ease-in-out infinite alternate; } .flame.cold { filter: grayscale(1); animation: none; }
.ci-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.ci-cell { position: relative; background: #fff; border-radius: 16px; padding: 8px 4px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: 0 0 0 2px var(--line) inset; font-size: 11px; }
.ci-cell span { font-size: 28px; } .ci-cell small { color: var(--muted); font-size: 10px; }
.ci-cell:last-child { grid-column: span 1; background: var(--dark); color: #fff; }
.ci-cell.today { box-shadow: 0 0 0 3px var(--brand) inset; animation: pulse 1.4s ease-in-out infinite; background: #FFF4EA; color: var(--ink); }
.ci-cell.got { opacity: .55; } .ci-cell em { position: absolute; bottom: -7px; left: 50%; transform: translateX(-50%); background: #fff; border-radius: 99px; padding: 0 6px; box-shadow: 0 0 0 1.5px var(--line); font-style: normal; color: var(--good); font-size: 11px; }
.ci-cell.next em { color: var(--brand-deep); }
.milestones { display: flex; gap: 6px; justify-content: center; margin: 8px 0; flex-wrap: wrap; }
.ms { padding: 4px 10px; border-radius: 99px; background: var(--cream); font-size: 12px; } .ms.done { background: var(--brand); color: #fff; }
.boxrow, .jar { display: flex; align-items: center; gap: 14px; background: #fff; padding: 12px; border-radius: var(--r-md); box-shadow: 0 0 0 2px var(--line) inset; }
.boxart { font-size: 46px; } .shake-soft { animation: wiggle 1.6s ease-in-out infinite; }
.jarart { position: relative; width: 60px; height: 70px; border-radius: 16px 16px 22px 22px; border: 3px solid var(--dark); overflow: hidden; flex: none; background: #FFFDF8; }
.jarart i { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(0deg, var(--brand-deep), var(--gold)); transition: height .5s; }
.jarart span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 26px; }
.jar small { color: var(--muted); }

/* Shop */
.grid-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.icard { background: #fff; border-radius: var(--r-md); padding: 12px 10px; text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center; box-shadow: 0 0 0 2px var(--line) inset; }
.icard.eq { box-shadow: 0 0 0 3px var(--brand) inset; }
.iart { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; font-size: 34px; background: var(--c, var(--cream)); border: 2.5px solid var(--dark); box-shadow: 0 4px 0 rgba(23, 23, 23, .12); }
.icard b { font-size: 13px; line-height: 1.2; } .setname { font-size: 10px; color: var(--muted); }
.icard s { text-decoration: none; background: var(--dark); color: #fff; font-size: 9px; padding: 1px 4px; border-radius: 5px; }
.lvpath { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.lvstep { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 14px; background: #fff; opacity: .55; box-shadow: 0 0 0 2px var(--line) inset; }
.lvstep span { font-size: 26px; } .lvstep small { color: var(--muted); font-size: 11px; }
.lvstep.done { opacity: .85; } .lvstep.cur { opacity: 1; box-shadow: 0 0 0 3px var(--brand) inset; background: #FFF4EA; }
.upcard { display: flex; align-items: center; gap: 12px; background: #fff; padding: 12px; border-radius: var(--r-md); margin-bottom: 10px; box-shadow: 0 0 0 2px var(--line) inset; }
.upcard > div:nth-child(2) { flex: 1; min-width: 0; } .upcard small { color: var(--muted); }
.upart { width: 54px; height: 54px; border-radius: 16px; background: var(--cream); display: grid; place-items: center; font-size: 30px; flex: none; border: 2.5px solid var(--dark); }
.dots { display: flex; gap: 5px; justify-content: center; margin: 6px 0; }
.upcard .dots { justify-content: flex-start; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--cream); box-shadow: inset 0 0 0 2px var(--line); } .dots i.on { background: var(--brand); box-shadow: none; }
.setitems { display: flex; gap: 4px; margin-top: 4px; font-size: 20px; } .setitems span { opacity: .25; filter: grayscale(1); } .setitems span.own { opacity: 1; filter: none; }

/* Bộ sưu tập */
.colgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.colcard { background: #fff; border-radius: var(--r-md); padding: 12px; display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; box-shadow: 0 0 0 2px var(--line) inset; }
.colcard .ci { font-size: 32px; } .colcard .pb { width: 100%; }
.npcgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.npccard { background: #fff; border-radius: var(--r-md); padding: 10px; display: flex; flex-direction: column; gap: 3px; align-items: center; text-align: center; box-shadow: 0 0 0 2.5px var(--rc) inset; font-size: 12px; }
.npccard .pb { width: 100%; } .npccard small { font-size: 10px; }
.npcart { height: 78px; display: grid; place-items: center; } .npcart .chibi { --cs: 56px; }
.npccard.locked { box-shadow: 0 0 0 2px var(--line) inset; } .npccard .q { font-size: 40px; color: var(--muted); font-family: var(--f-head); }
.recgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.reccard { background: #fff; border-radius: var(--r-md); padding: 12px; display: flex; flex-direction: column; gap: 4px; box-shadow: 0 0 0 2px var(--line) inset; }
.reccard > span { font-size: 30px; } .reccard small { color: var(--muted); font-size: 11px; } .reccard em { font-style: normal; font-size: 11px; color: var(--brand-deep); }
.reccard.locked { opacity: .6; } .reccard.secret { background: var(--dark); color: #fff; } .reccard.secret small { color: #BBB; }
.rvwall { columns: 2 260px; column-gap: 10px; }
.rvcard { break-inside: avoid; background: #fff; border-radius: var(--r-md); padding: 10px 12px; margin-bottom: 10px; box-shadow: 0 0 0 2px var(--line) inset; }
.rvcard p { margin: 6px 0; font-size: 13px; line-height: 1.35; }
.rvcard.s1 { background: #FFF1EF; } .rvcard.s5 { background: #FFFBEF; }
.rvcard.r-legendary { box-shadow: 0 0 0 3px var(--brand) inset; } .rvcard.r-epic { box-shadow: 0 0 0 3px #A855F7 inset; } .rvcard.r-rare { box-shadow: 0 0 0 3px #3B82F6 inset; }
.rvh { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.rf { font-size: 22px; }
.stars { color: var(--gold); letter-spacing: 1px; }
.achgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.achcard { display: flex; gap: 10px; background: #fff; padding: 12px; border-radius: var(--r-md); box-shadow: 0 0 0 2px var(--line) inset; opacity: .85; }
.achcard > span { font-size: 32px; } .achcard > div { flex: 1; } .achcard small { display: block; color: var(--muted); font-size: 11px; }
.achcard em { font-style: normal; color: var(--good); font-size: 12px; } .achcard.done { opacity: 1; box-shadow: 0 0 0 3px var(--gold) inset; background: #FFFBEF; }

/* BXH */
.rank { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rank li { display: flex; align-items: center; gap: 10px; background: #fff; padding: 10px 12px; border-radius: 14px; box-shadow: 0 0 0 2px var(--line) inset; }
.rank li.me { box-shadow: 0 0 0 3px var(--brand) inset; background: #FFF4EA; }
.rank em { margin-left: auto; font-style: normal; font-family: var(--f-head); }
.rk { width: 28px; text-align: center; font-family: var(--f-head); }

/* Cài đặt */
.setlist { display: flex; flex-direction: column; gap: 6px; }
.toggle { display: flex; align-items: center; justify-content: space-between; background: #fff; padding: 12px; border-radius: 14px; box-shadow: 0 0 0 2px var(--line) inset; min-height: 50px; }
.toggle input { display: none; }
.toggle i { position: relative; width: 50px; height: 30px; border-radius: 99px; background: #DDD; transition: background .2s; }
.toggle i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .2); transition: transform .2s; }
.toggle input:checked + i { background: var(--brand); } .toggle input:checked + i::after { transform: translateX(20px); }
#rename, #savecode, #ob-name { flex: 1; width: 100%; padding: 12px 14px; border-radius: 14px; border: 2.5px solid var(--line); background: #fff; font-weight: 800; outline: none; min-height: 46px; }
#rename:focus, #savecode:focus, #ob-name:focus { border-color: var(--brand); }
#savecode { margin-top: 8px; font-size: 11px; font-family: monospace; resize: vertical; }

/* Tôi */
.profile { display: flex; gap: 14px; align-items: center; background: #fff; padding: 14px; border-radius: var(--r-lg); box-shadow: var(--sh); }
.profile > div:last-child { flex: 1; min-width: 0; } .profile small { color: var(--muted); }
.pava .chibi { --cs: 72px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.stat { background: #fff; border-radius: 14px; padding: 10px 6px; text-align: center; box-shadow: 0 0 0 2px var(--line) inset; }
.stat b { display: block; font-family: var(--f-head); font-size: 18px; color: var(--brand-deep); } .stat small { font-size: 10px; color: var(--muted); }
.menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mg { border: 0; background: #fff; border-radius: 16px; padding: 12px 6px; font-size: 12px; font-weight: 800; display: flex; flex-direction: column; align-items: center; gap: 4px; box-shadow: 0 0 0 2px var(--line) inset, 0 3px 0 rgba(23, 23, 23, .06); min-height: 76px; }
.mg span { font-size: 26px; }
.share-prev { display: grid; place-items: center; background: var(--cream); border-radius: var(--r-md); padding: 10px; margin-bottom: 10px; }
.share-prev canvas { max-width: 100%; max-height: 46dvh; border-radius: 12px; box-shadow: var(--sh); }

/* ---------- MODAL ---------- */
#modal-layer { position: fixed; inset: 0; z-index: 70; pointer-events: none; }
.modal-wrap { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(23, 23, 23, .5); opacity: 0; transition: opacity .18s; pointer-events: auto; }
.modal-wrap.in { opacity: 1; }
.modal { width: min(440px, 100%); max-height: 90dvh; overflow-y: auto; background: var(--bg); border-radius: var(--r-lg); padding: 20px; border: 3px solid var(--dark); box-shadow: 0 10px 0 rgba(23, 23, 23, .2);
  transform: translateY(24px) scale(.96); transition: transform .22s cubic-bezier(.3, 1.4, .5, 1); text-align: center; }
.modal-wrap.in .modal { transform: none; }
.modal h3 { font-size: 22px; } .mtext { font-size: 15px; line-height: 1.45; margin: 4px 0 16px; }
.micon { font-size: 52px; line-height: 1.1; margin-bottom: 6px; }
.big-pop { display: inline-block; font-size: 72px; animation: pop-in .5s cubic-bezier(.3, 1.6, .5, 1); }
.big-reward { display: inline-block; margin-top: 8px; font-size: 20px; color: var(--brand-deep); }
.modal .row { margin-top: 8px; }
.modal.drama { text-align: left; }
.drama-head { text-align: center; background: var(--dark); color: #fff; border-radius: var(--r-md); padding: 12px; margin-bottom: 10px; }
.drama-head h3 { color: var(--brand-2); margin: 0; }
.shake-x { font-size: 40px; animation: shake .25s linear infinite; }
.review-card { display: flex; gap: 10px; background: #fff; padding: 10px; border-radius: 14px; box-shadow: 0 0 0 2px var(--line) inset; margin-bottom: 8px; }
.review-card p { margin: 4px 0 0; font-size: 13px; } .review-card.one { background: #FFF1EF; }
.choices { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.choice { display: flex; align-items: center; gap: 10px; text-align: left; border: 0; background: #fff; padding: 10px 12px; border-radius: 14px; box-shadow: 0 0 0 2px var(--line) inset, 0 3px 0 rgba(23, 23, 23, .08); min-height: 52px; transition: transform .08s; }
.choice:active:not(:disabled) { transform: scale(.98); background: #FFF4EA; }
.choice:disabled { opacity: .45; }
.choice .ci { font-size: 26px; } .choice b { display: block; font-size: 14px; } .choice small { color: var(--muted); font-size: 11px; }
.modal.summary { text-align: left; width: min(480px, 100%); }
.sum-title { text-align: center; font-size: 22px; }
.sum-hero { text-align: center; padding: 12px; border-radius: var(--r-md); margin-bottom: 10px; background: #FFF4D6; }
.sum-hero.flop { background: #FFE9E6; } .sum-hero h3 { margin: 4px 0; } .sum-hero p { margin: 0; font-size: 13px; color: var(--muted); }
.sum-emoji { font-size: 48px; }
.sum-line { display: flex; justify-content: space-between; gap: 10px; padding: 7px 2px; border-bottom: 1.5px dashed var(--line); font-size: 14px; }
.sum-line b { text-align: right; } .sum-line.big { font-size: 17px; border: 0; padding-top: 10px; }
.pos { color: var(--good); } .neg { color: var(--bad); }
.modal.onboard { text-align: center; }
.ob-logo { font-size: 70px; line-height: 1; } .ob-logo img { width: 96px; height: 96px; animation: bob 2s ease-in-out infinite; }
.brand-title { font-size: 34px; color: var(--brand); margin: 6px 0 0; text-shadow: 0 3px 0 var(--dark); -webkit-text-stroke: 1px var(--dark); }
.brand-title span { display: block; font-size: 15px; letter-spacing: 6px; color: var(--dark); text-shadow: none; -webkit-text-stroke: 0; }
.tagline { color: var(--muted); font-size: 14px; }
.modal.onboard input { margin-bottom: 10px; text-align: center; }
.modal.help .hicon { font-size: 60px; } .modal.help .hicon img { max-height: 90px; } .modal.help p { color: var(--muted); line-height: 1.45; }
.qbar { height: 8px; background: var(--cream); border-radius: 99px; overflow: hidden; margin-bottom: 10px; } .qbar i { display: block; width: 100%; height: 100%; background: var(--brand); }

/* ---------- FX ---------- */
#float-layer { position: fixed; inset: 0; pointer-events: none; z-index: 80; }
.float-text { position: absolute; transform: translate(-50%, 0); font-family: var(--f-head); font-weight: 700; font-size: 20px; color: var(--brand-deep); text-shadow: 0 2px 0 #fff, 0 0 6px #fff; white-space: nowrap; animation: float-up 1.3s ease-out forwards; }
.float-text.gold { color: var(--brand); font-size: 24px; } .float-text.reward { font-size: 15px; color: var(--dark); }
.fly { position: absolute; font-size: 22px; margin: -11px 0 0 -11px; will-change: transform; }
.receipt { position: absolute; width: 160px; background: #fff; border: 2.5px solid var(--dark); border-radius: 12px; padding: 6px 8px; font-size: 11px; box-shadow: 0 4px 0 rgba(23, 23, 23, .15); animation: receipt 2.3s ease forwards; }
.receipt div { display: flex; justify-content: space-between; } .receipt b { color: var(--good); }
.flash { position: fixed; inset: 0; pointer-events: none; z-index: 75; opacity: 0; background: radial-gradient(circle, rgba(255, 201, 60, .65), rgba(244, 123, 32, .2) 60%, transparent); }
.flash.go { animation: flash .45s ease-out; }
.banner { position: fixed; left: 50%; top: 34%; transform: translate(-50%, -50%) scale(.6); z-index: 85; pointer-events: none; opacity: 0; text-align: center; width: max-content; max-width: 92vw; }
.banner span { display: inline-block; font-family: var(--f-head); font-weight: 700; font-size: clamp(20px, 5vw, 34px); color: #fff; background: var(--dark); padding: 10px 20px; border-radius: 20px; box-shadow: 0 6px 0 var(--brand); transform: rotate(-2deg); }
.banner.gold span { background: var(--brand); box-shadow: 0 6px 0 var(--dark); }
.banner.fever span { background: linear-gradient(90deg, #FF4D2E, var(--brand), var(--gold)); box-shadow: 0 6px 0 var(--dark); }
.banner.show { animation: banner 1.6s cubic-bezier(.3, 1.4, .5, 1) forwards; }
.toast { position: fixed; left: 50%; bottom: calc(var(--bnav-h) + 16px + var(--safe-b)); transform: translate(-50%, 20px); z-index: 90; opacity: 0; pointer-events: none; transition: .2s;
  background: var(--dark); color: #fff; padding: 10px 16px; border-radius: 14px; font-size: 14px; max-width: 90vw; text-align: center; box-shadow: 0 4px 0 var(--brand); }
.toast.show { opacity: 1; transform: translate(-50%, 0); } .toast.bad { box-shadow: 0 4px 0 var(--bad); }
body.selling .toast { bottom: 50%; }

/* ---------- KEYFRAMES ---------- */
@keyframes bob { 50% { transform: translateY(-5px); } }
@keyframes step { from { transform: translateY(0) rotate(-3deg); } to { transform: translateY(-4px) rotate(3deg); } }
@keyframes drift { from { transform: translateX(-20vw); } to { transform: translateX(120vw); } }
@keyframes walk-ltr { from { left: -12%; } to { left: 108%; } }
@keyframes walk-rtl { from { left: 108%; transform: scaleX(-1); } to { left: -12%; transform: scaleX(-1); } }
@keyframes arrive { from { transform: translateX(60px) scale(.8); opacity: 0; } }
@keyframes leave { 0%, 60% { transform: none; opacity: 1; } 100% { transform: translateX(-80px) scale(.9); opacity: 0; } }
@keyframes ready-bounce { 50% { transform: translateY(-6px); } }
@keyframes bump { 40% { transform: scale(1.25); } }
@keyframes pulse { 50% { transform: scale(1.05); } }
@keyframes cta { 0%, 80%, 100% { transform: none; } 88% { transform: scale(1.03) rotate(-1deg); } 94% { transform: scale(1.03) rotate(1deg); } }
@keyframes wiggle { 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
@keyframes shake { 25% { transform: translateX(-3px) rotate(-6deg); } 75% { transform: translateX(3px) rotate(6deg); } }
@keyframes nudge { 30% { transform: translateX(-6px); } 60% { transform: translateX(6px); } }
@keyframes neon { 50% { opacity: .55; filter: drop-shadow(0 0 6px currentColor); } }
@keyframes glow { 50% { filter: drop-shadow(0 0 12px #FFD27A); } }
@keyframes flame { from { transform: scale(1) rotate(-3deg); } to { transform: scale(1.1) rotate(3deg); } }
@keyframes pulse-glow { from { box-shadow: 0 0 0 rgba(244, 123, 32, .6); } to { box-shadow: 0 0 16px rgba(244, 123, 32, .9); } }
@keyframes float-up { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.7); } 20% { opacity: 1; transform: translate(-50%, 0) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -60px); } }
@keyframes receipt { 0% { opacity: 0; transform: translateY(10px); } 12%, 82% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-14px); } }
@keyframes flash { 0% { opacity: 0; } 30% { opacity: 1; } 100% { opacity: 0; } }
@keyframes banner { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.5); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); } 25%, 80% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -70%) scale(.95); } }
@keyframes pop-in { from { transform: scale(0) rotate(-20deg); } }

/* ---------- DESKTOP ---------- */
@media (min-width: 900px) {
  :root { --hud-h: 68px; --cs: 78px; }
  .app { grid-template-columns: 210px minmax(0, 1fr); grid-template-rows: var(--hud-h) 1fr; grid-template-areas: "side hud" "side stage"; }
  body.selling .app { grid-template-rows: var(--hud-h) 1fr; }
  .bnav { display: none; }
  .sidebar { grid-area: side; display: flex; flex-direction: column; background: var(--dark); color: #fff; padding: 16px 12px; gap: 16px; z-index: 21; }
  .brand { display: flex; align-items: center; gap: 10px; font-family: var(--f-head); font-size: 20px; color: var(--brand); padding: 0 6px; }
  .brand img { width: 40px; height: 40px; }
  .brand small { display: block; color: #fff; font-size: 10px; letter-spacing: 4px; }
  .snav { display: flex; flex-direction: column; gap: 4px; }
  .snav button { position: relative; display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 0; border-radius: 14px; background: none; color: #DDD; font-size: 15px; font-weight: 800; text-align: left; min-height: 46px; transition: background .15s; }
  .snav button span { font-size: 20px; width: 26px; text-align: center; }
  .snav button:hover { background: rgba(255, 255, 255, .08); }
  .snav button.on { background: var(--brand); color: #fff; box-shadow: 0 4px 0 var(--brand-deep); }
  .snav .badge { position: static; margin-left: auto; box-shadow: none; }
  .hud { padding: 10px 18px; background: var(--bg); color: var(--ink); border-bottom: 2px solid var(--line); }
  .hud-profile { color: var(--ink); } .lvring b { background: var(--bg); } .lvring { background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--cream) 0); }
  .hud-name { font-size: 18px; max-width: 30vw; }
  .cur { background: #fff; color: var(--ink); box-shadow: 0 0 0 2px var(--line) inset, 0 3px 0 rgba(23, 23, 23, .06); height: 40px; padding: 0 14px; font-size: 15px; }
  .cur.tk { display: inline-flex; }
  .cur.streak { background: var(--brand); color: #fff; box-shadow: 0 3px 0 var(--brand-deep); }
  .cur.streak.cold { background: #fff; color: var(--ink); }
  .stage { margin: 14px; border-radius: var(--r-lg); border: 3px solid var(--dark); box-shadow: var(--sh); background: #fff; }
  body.selling .stage { display: grid; grid-template-columns: 1fr 400px; grid-template-rows: 1fr; }
  body.selling .scene { min-height: 0; }
  body.selling .play { max-height: none; border-top: 0; border-left: 3px solid var(--dark); padding: 12px 14px; }
  .prep { grid-template-columns: 1fr; }
  .cupcol { flex-direction: row; justify-content: center; gap: 16px; }
  .cupview svg { width: 92px; }
  .two { grid-template-columns: 1fr; }
  .hub { padding: 18px; }
  .bubble { font-size: 13px; max-width: 170px; }
  .sheet { left: auto; right: 14px; top: 82px; bottom: 14px; width: min(560px, calc(100vw - 260px)); height: auto; max-height: none; border-radius: var(--r-lg); border: 3px solid var(--dark); transform: translateX(calc(100% + 400px)); visibility: hidden; transition: transform .28s cubic-bezier(.2, .9, .3, 1), visibility 0s .28s; }
  .sheet.open { visibility: visible; transition: transform .28s cubic-bezier(.2, .9, .3, 1); }
  .sheet.open { transform: none; }
  .sheet-scrim { background: rgba(23, 23, 23, .2); }
  .grip { display: none; }
  .sheet-foot { bottom: -18px; margin-bottom: -18px; padding-bottom: 12px; }
  .toast { bottom: 28px; }
  .ci-grid { grid-template-columns: repeat(7, 1fr); }
  .ci-cell:last-child { grid-column: auto; }
}
@media (min-width: 1180px) {
  .app { grid-template-columns: 220px minmax(0, 1fr) 310px; grid-template-areas: "side hud hud" "side stage rail"; }
  .rail { grid-area: rail; display: flex; flex-direction: column; gap: 12px; padding: 14px 14px 14px 0; overflow-y: auto; }
  .rcard { background: #fff; border-radius: var(--r-md); padding: 12px; box-shadow: 0 0 0 2px var(--line) inset, 0 4px 0 rgba(23, 23, 23, .05); font-size: 13px; }
  .rcard.cta { background: var(--brand); color: #fff; cursor: pointer; box-shadow: 0 4px 0 var(--brand-deep); display: flex; flex-direction: column; animation: pulse 1.6s ease-in-out infinite; }
  .rhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
  .rhead b { font-family: var(--f-head); font-weight: 600; font-size: 15px; }
  .mrow { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; padding: 5px 0; font-size: 12px; }
  .mrow .pb { grid-column: 1 / -1; margin: 0; height: 6px; } .mrow small { color: var(--muted); }
  .mrow.claimed { opacity: .5; }
  .evp { height: 8px; background: var(--cream); border-radius: 99px; overflow: hidden; } .evp i { display: block; height: 100%; background: var(--brand); }
  .rv { display: flex; gap: 8px; padding: 5px 0; font-size: 12px; border-bottom: 1.5px dashed var(--line); } .rv b { color: var(--gold); } .rv.s1 b { color: var(--bad); }
  .nf { display: flex; gap: 6px; padding: 4px 0; font-size: 12px; }
  .sheet { right: 334px; }
  body.selling .app { grid-template-columns: 220px minmax(0, 1fr); grid-template-areas: "side hud" "side stage"; }
  body.selling .rail { display: none; }
  body.selling .sheet { right: 14px; }
}
@media (min-width: 1500px) { body.selling .stage { grid-template-columns: 1fr 460px; } .two { grid-template-columns: 1fr 1fr; gap: 10px; } }
@media (max-width: 899px) and (max-height: 700px) { body.selling .scene { min-height: 200px; } :root { --cs: 54px; } .bubble { font-size: 11px; padding: 5px 7px; } }

/* ---------- ACCESSIBILITY ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .walker { display: none; }
}
body.reduced *, body.reduced *::before, body.reduced *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
body.reduced .walker { display: none; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

/* ---------- Tài khoản VuiSpace ---------- */
.acc-card { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--dark); color: #fff; padding: 12px; border-radius: var(--r-md); margin-bottom: 12px; }
.acc-card > div:nth-child(2) { flex: 1; min-width: 160px; line-height: 1.3; }
.acc-card small { color: #E9DCCB; } .acc-card .muted { color: #BBB; }
.acc-card.off { background: #FFF4EA; color: var(--ink); box-shadow: 0 0 0 2.5px var(--brand) inset; } .acc-card.off small { color: var(--muted); }
.acc-ava { font-size: 28px; }
.acc-act { display: flex; gap: 6px; }
.authf { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.authf input { width: 100%; padding: 12px 14px; border-radius: 14px; border: 2.5px solid var(--line); background: #fff; font-weight: 800; outline: none; min-height: 46px; }
.authf input:focus { border-color: var(--brand); }
.err { color: var(--bad); font-size: 13px; min-height: 1em; margin: 0; }
.modal.auth .tabs { margin: 8px 0 0; }
.modal a { color: var(--brand-deep); }

/* ---------- Bảo trì ---------- */
#loading.maint { opacity: 1 !important; pointer-events: auto !important; background: var(--dark); padding: 16px; }
.maint-card { max-width: 460px; background: var(--bg); border: 3px solid var(--brand); border-radius: var(--r-lg); padding: 28px 22px; text-align: center; box-shadow: 0 10px 0 var(--brand-deep); }
.maint-card h1 { font-family: var(--f-head); color: var(--brand-deep); font-size: 26px; }
.maint-card p { color: var(--muted); line-height: 1.5; }
.maint-icon { font-size: 64px; animation: wiggle 1.6s ease-in-out infinite; }
.maint-until { color: var(--ink) !important; } .maint-sub { font-size: 12px; }

/* =====================================================================
   V3 — Scene 2.5D dùng asset (Trà Sữa)
   ===================================================================== */
.ic { width: 1.35em; height: 1.35em; object-fit: contain; vertical-align: -.3em; display: inline-block; }
.ic.sm { width: 1.15em; height: 1.15em; }
.cur .ic { width: 22px; height: 22px; }
.snav .ic, .bnav .ic { width: 26px; height: 26px; }
.bnav button span .ic { width: 28px; height: 28px; filter: drop-shadow(0 2px 0 rgba(0,0,0,.12)); }
.bnav button:not(.on) span .ic { filter: grayscale(.25) opacity(.85); }
.rwi { display: inline-flex; align-items: center; gap: 3px; margin-right: 6px; white-space: nowrap; }
.chip-img { width: 24px; height: 24px; object-fit: contain; margin: -4px 0; }
.sw-img { width: 40px; height: 40px; object-fit: contain; flex: none; }
.iart.has-img { background: radial-gradient(circle at 50% 40%, #fff, var(--cream)); }
.iart-img { width: 86%; height: 86%; object-fit: contain; }
.iart .straw { display: block; width: 10px; height: 46px; border-radius: 5px; background: var(--c, #fff); border: 2.5px solid var(--dark); transform: rotate(14deg); }
.lv-img { width: 40px; height: 34px; object-fit: contain; }
.up-img { width: 100%; height: 100%; object-fit: contain; }
.rec-img { width: 46px; height: 52px; object-fit: contain; }
.lvup-img { width: min(240px, 70%); margin: 4px auto 8px; display: block; filter: drop-shadow(0 8px 10px rgba(0,0,0,.18)); animation: pop-in .5s cubic-bezier(.3, 1.6, .5, 1); }
.spr-wrap { position: relative; display: inline-flex; align-items: flex-end; justify-content: center; }
.spr-wrap .spr { height: var(--ch, 120px); width: auto; display: block; filter: drop-shadow(0 6px 4px rgba(0,0,0,.18)); -webkit-user-drag: none; }
.spr-wrap.noimg::after { content: '🙂'; font-size: 40px; }
.npcart .spr-wrap { --ch: 74px; } .pava .spr-wrap { --ch: 96px; }
.npccard.locked .spr { filter: brightness(0) opacity(.18); }

.scene.v2 { --bs: 1; --ground: 30%; --ch: 128px; }
body.selling .scene.v2 { --ground: 25%; }
@media (max-width: 899px) { .scene.v2 { --bs: 1.25; --ch: 88px; --ground: 42%; } body.selling .scene.v2 { --bs: 1.2; --ground: 33%; } }
@media (max-width: 899px) and (max-height: 700px) { .scene.v2 { --ch: 76px; } }
/* bầu trời theo giờ */
.scene.v2.tod-morning .l-sky { background: linear-gradient(180deg, #9FD8F2 0%, #D8F1FB 55%, #FFF1DC 100%); }
.scene.v2.tod-noon .l-sky { background: linear-gradient(180deg, #6FC6F0 0%, #BFE8FA 60%, #FFF6E6 100%); }
.scene.v2.tod-afternoon .l-sky { background: linear-gradient(180deg, #8CC9EC 0%, #F7E1BE 70%, #FFE3C2 100%); }
.scene.v2.tod-sunset .l-sky { background: linear-gradient(180deg, #5E6BB0 0%, #F19A7A 55%, #FFD19A 100%); }
.scene.v2.tod-night .l-sky { background: linear-gradient(180deg, #141A3A 0%, #2D2A5A 60%, #5A3E66 100%); }
.scene.v2.w-rain .l-sky { background: linear-gradient(180deg, #74839B 0%, #A9B5C4 60%, #D8DEE6 100%); }
.tod-tint { position: absolute; inset: 0; pointer-events: none; }
.scene.v2.tod-sunset .tod-tint { background: linear-gradient(0deg, rgba(255,140,80,.12), transparent); }
.scene.v2.tod-night .l-front .bld { filter: brightness(.82) saturate(1.1) drop-shadow(0 0 22px rgba(255,200,120,.45)); }
.scene.v2.tod-night .l-street .walk { filter: brightness(.62); }
.sky-ic { position: absolute; top: 7%; right: 8%; width: clamp(44px, 7vw, 80px); animation: bob 6s ease-in-out infinite; filter: drop-shadow(0 0 18px rgba(255, 220, 120, .7)); }
/* lớp parallax (spec: bg .05, mid .10, shop .15, char .20, fg .25) */
.scene.v2 .l-city { transform: translate(calc(var(--px) * -14px), calc(var(--py) * -4px)); }
.scene.v2 .l-street { transform: translateX(calc(var(--px) * -24px)); transition: transform .3s ease-out; }
.scene.v2 .l-front, .scene.v2 .l-decor, .scene.v2 .l-counter { transform: translateX(calc(var(--px) * -36px)); transition: transform .3s ease-out; bottom: 0; }
.scene.v2 .l-npc, .scene.v2 .l-walk { transform: translateX(calc(var(--px) * -48px)); transition: transform .3s ease-out; }
.scene.v2 .city { bottom: calc(var(--ground) + 10%); }
.scene.v2 .l-street .walk { height: calc(var(--ground) + 2%); background: linear-gradient(180deg, #D9C7AE 0, #EADCC8 22%, #F3E8D8 100%); }
.scene.v2 .l-street .road { bottom: calc(var(--ground) + 2%); height: 9%; background: linear-gradient(180deg, #5A5A62, #45454C); border-top: 3px solid #8A8A92; }
.scene.v2 .road .lane { position: absolute; left: 0; right: 0; top: 46%; height: 3px; background: repeating-linear-gradient(90deg, #F3E9C8 0 26px, transparent 26px 52px); }
.wires { position: absolute; left: 0; right: 0; bottom: calc(var(--ground) + 26%); width: 100%; height: 14%; fill: none; stroke: #2A2A2A; stroke-width: .25; opacity: .55; }
.moto { position: absolute; bottom: calc(var(--ground) + 3%); height: 9%; animation: moto 14s linear infinite; z-index: 2; }
.moto.m2 { animation-duration: 19s; animation-delay: -9s; transform: scaleX(-1); animation-name: moto-r; }
@keyframes moto { from { left: -12%; } to { left: 110%; } }
@keyframes moto-r { from { left: 110%; } to { left: -12%; } }
body.selling .moto { display: none; }
.bld, .prop { position: absolute; bottom: var(--ground); height: auto; transform-origin: 50% 100%; filter: drop-shadow(0 10px 8px rgba(40, 20, 0, .18)); -webkit-user-drag: none; }
.prop { filter: drop-shadow(0 5px 4px rgba(40, 20, 0, .18)); }
.prop.eq { animation: sway 5s ease-in-out infinite; }
.bld.reveal, .prop.reveal { animation: reveal .7s cubic-bezier(.3, 1.5, .5, 1) both; }
@keyframes reveal { from { transform: scale(.4) translateY(20px); opacity: 0; } }
@keyframes sway { 50% { transform: rotate(1.2deg); } }
.shop-sign { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); pointer-events: auto; cursor: pointer;
  background: var(--dark); color: var(--brand-2); font-family: var(--f-head); padding: 3px 12px; border-radius: 99px; font-size: clamp(11px, 1.6vw, 15px); white-space: nowrap; box-shadow: 0 3px 0 var(--brand-deep); }
.shop-sign b { color: #fff; } .shop-sign small { display: block; text-align: center; font-family: var(--f-body); font-size: 10px; color: #EADCC8; margin-top: -2px; }
.shop-sign.wiggle { animation: wiggle .5s; }
body.selling .shop-sign { display: none; }
.player { position: absolute; bottom: calc(var(--ground) - 4%); z-index: 27; }
.player .spr-wrap { --ch: calc(var(--ch) * .95); animation: bob 2.6s ease-in-out infinite; }
.menu-stand { position: absolute; bottom: calc(var(--ground) - 5%); z-index: 27; transform: translateX(-50%); }
.menu-stand .mboard { height: calc(var(--ch) * .62); filter: drop-shadow(0 5px 4px rgba(0,0,0,.2)); }
.menu-stand .steam-src { position: absolute; left: 50%; top: 18%; width: 2px; height: 2px; }
.menu-stand .stk { position: absolute; right: -14px; top: -8px; width: 30px; }
body.selling .menu-stand, body.selling .player { display: none; }
.walker.v2 { bottom: 1%; } .walker.v2.rtl { bottom: 6%; }
.walker.v2 .spr { height: calc(var(--ch) * .82); filter: drop-shadow(0 5px 3px rgba(0,0,0,.18)); animation: step .45s ease-in-out infinite alternate; }
.walker.v2.rtl .spr { transform: scaleX(-1); }
/* khách sprite */
.cust.v2 .who { padding: 0; }
.cust.v2 .spr-wrap { --ch: var(--ch); }
.cust.v2.st-wait .spr { animation: breathe 2.2s ease-in-out infinite; transform-origin: 50% 100%; }
.cust.v2.impatient .spr { animation: fidget .5s ease-in-out infinite; }
.cust.v2.st-happy .spr { animation: hop .5s ease-out 2; }
.cust.v2.st-sad .spr { filter: saturate(.4) drop-shadow(0 6px 4px rgba(0,0,0,.18)); animation: shake .3s linear 3; }
.cust.v2.ghost .spr { opacity: .7; filter: hue-rotate(160deg) brightness(1.15) drop-shadow(0 0 12px #BFD9FF); }
.cust.v2 .mood { top: 0; right: -8px; }
.cust.v2.selected .who::after { bottom: -4px; }
.pbar { width: 74%; height: 7px; border-radius: 99px; background: rgba(23,23,23,.15); overflow: hidden; margin-top: 3px; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.7); }
.pbar i { display: block; height: 100%; border-radius: inherit; transition: width .2s linear; }
.ob { display: flex; gap: 6px; align-items: center; }
.ob-cup { width: 34px; height: 42px; object-fit: contain; flex: none; }
.ob-tops { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.ob-top { width: 18px; height: 18px; object-fit: contain; }
.ob small { display: block; color: var(--muted); font-size: 10px; line-height: 1.2; }
@media (max-width: 899px) { .ob-cup { width: 26px; height: 32px; } .ob-tops small { display: none; } }
@keyframes breathe { 50% { transform: scaleY(1.025) translateY(-1px); } }
@keyframes fidget { 25% { transform: rotate(-2deg); } 75% { transform: rotate(2deg); } }
@keyframes hop { 40% { transform: translateY(-14px); } }
/* camera */
.scene.v2 .layer:not(.fx) { transition: transform .9s cubic-bezier(.3, .8, .3, 1); }
.scene.v2.cam-upgrade .l-front, .scene.v2.cam-upgrade .l-decor, .scene.v2.cam-upgrade .l-counter { transform: scale(1.18) translateY(4%); transform-origin: 50% 70%; }
.scene.v2.cam-upgrade .l-city, .scene.v2.cam-upgrade .l-street { transform: scale(1.08); transform-origin: 50% 70%; }
.scene.v2.cam-celebrate .l-front { transform: scale(1.06); transform-origin: 50% 80%; }
@media (prefers-reduced-motion: reduce) { .moto { display: none; } }

.face-img { display: inline-block; width: 1.9em; height: 1.9em; border-radius: 50%; overflow: hidden; background: #FFF4EA; box-shadow: 0 0 0 2px #fff, 0 2px 4px rgba(0,0,0,.15); vertical-align: middle; flex: none; }
.face-img img { width: 100%; height: auto; transform: scale(1.7) translateY(18%); transform-origin: 50% 0; display: block; }
.tk-face .face-img { width: 40px; height: 40px; }
.rf .face-img { width: 32px; height: 32px; }
@media (min-width: 900px) { .scene.v2 { --bs: 1.3; } }

/* ===== v2.0: thoại khách, trend, Anh Tít, BXH online, shop profile ===== */
.say{position:absolute;left:50%;bottom:100%;transform:translate(-50%,-4px);background:#fff;color:#4a2f22;border:2px solid #f0d9c4;border-radius:12px;padding:4px 8px;font-size:12px;line-height:1.25;max-width:170px;width:max-content;box-shadow:0 3px 8px rgba(0,0,0,.12);z-index:5;pointer-events:none;animation:sayIn .25s ease-out}
.say:after{content:"";position:absolute;left:50%;top:100%;margin-left:-6px;border:6px solid transparent;border-top-color:#fff}
@keyframes sayIn{from{opacity:0;transform:translate(-50%,4px)}}
.trend-card{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:8px 0;padding:8px 10px;border-radius:12px;background:#fff7ec;border:1px dashed #f3c99a;font-size:13px}
.trend-card>b{width:100%;font-size:12px;letter-spacing:.5px;color:#c4621d}
.trend{display:inline-flex;align-items:center;gap:4px;padding:3px 8px;border-radius:99px;font-size:12px;background:#e9f9ee;color:#1f7a3d}
.trend.down{background:#fdecec;color:#b33}
.trend .ic{width:18px;height:18px}
.sit-who{display:flex;align-items:center;gap:8px;margin-bottom:6px}
.sit-who img{width:44px;height:44px;object-fit:contain}
.tit-hub{position:relative;display:flex;align-items:flex-end;gap:8px;width:100%;background:none;border:0;padding:24px 0 4px;margin:4px 0 8px;cursor:pointer;text-align:left}
.tit-hub img{width:64px;height:84px;object-fit:contain;flex:none}
.tit-hub .say{position:static;transform:none;max-width:none;flex:1;animation:none}
.tit-hub .say:after{display:none}
.tit-hub .dot{position:absolute;left:52px;top:20px;background:#e5484d;color:#fff;font-style:normal;font-size:11px;border-radius:99px;padding:0 6px}
.tit-head{display:flex;gap:12px;align-items:flex-start}
.tit-por{width:84px;height:110px;object-fit:contain;flex:none}
.tit-por.big{width:120px;height:160px;display:block;margin:0 auto}
.tit-say{background:#fff7ec;border-radius:10px;padding:6px 10px;margin:4px 0;font-style:italic}
.tquests{list-style:none;padding:0;margin:0;display:grid;gap:8px}
.tq{display:flex;gap:8px;align-items:center;justify-content:space-between;padding:8px 10px;border-radius:12px;background:#fff;border:1px solid #f0e2d4}
.tq>div:first-child{flex:1;min-width:0}
.tq.done{opacity:.6}
.tq-unl{display:block;color:#7a4fd0}
.tq-choice{display:flex;flex-direction:column;gap:4px;max-width:55%}
.tit-intro{text-align:center}
.rank li[data-shop]{cursor:pointer}
.rank .rn{flex:1;min-width:0;display:flex;flex-direction:column}
.rank .rn small{font-size:11px}
.ttl{display:inline-block;font-size:11px;padding:1px 7px;border-radius:99px;background:linear-gradient(90deg,#ffd36e,#ff9f68);color:#5a2a00;font-weight:700}
.lb-me{padding:8px 10px;border-radius:10px;background:#eef6ff;margin:8px 0;font-size:13px;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.lb-pg{justify-content:center;gap:10px;align-items:center}
.shop-prof .sp-cover{position:relative;border-radius:14px;overflow:hidden;background:#fbe9d7;min-height:120px;margin-bottom:10px}
.shop-prof .sp-cover img{width:100%;max-height:200px;object-fit:cover;display:block}
.shop-prof .sp-name{position:absolute;left:0;right:0;bottom:0;padding:8px 12px;background:linear-gradient(transparent,rgba(0,0,0,.6));color:#fff}
.shop-prof .sp-name h3{margin:0;color:#fff}
.titles .pill[disabled]{opacity:.45}
/* nhiều món (v2.0): vị trà/topping thành 2 hàng cuộn ngang, món còn hàng lên trước */
#c-base.many,#c-top.many{display:grid;grid-auto-flow:column;grid-template-rows:repeat(2,auto);grid-auto-columns:max-content;overflow-x:auto;overscroll-behavior-x:contain;padding-bottom:4px;scrollbar-width:thin}
.play{scroll-padding-bottom:72px}
@media (max-width:899px){
  .tit-hub{padding:6px 0 0;margin:2px 0 6px}.tit-hub img{width:40px;height:52px}.tit-hub .dot{left:30px;top:2px}
  .tit-hub .say{font-size:11px;padding:3px 8px}
  #hub .trend-card{flex-wrap:nowrap;overflow-x:auto;padding:6px 8px;margin:6px 0}#hub .trend-card>b{width:auto;flex:none}.trend{flex:none}
}
/* ===== Mobile: trang bán hàng — không để thoại/đơn của khách bị che ===== */
@media (max-width: 899px) {
  body.selling .salebar { top: 6px; left: 6px; right: 6px; gap: 4px 6px; }
  body.selling .sb-l { flex-wrap: nowrap; overflow: hidden; min-width: 0; font-size: 12px; }
  body.selling .sb-l .chip-s { flex: none; padding: 2px 7px; font-size: 11px; }
  body.selling .sb-l .chip-s.hot ~ .chip-s.hot, body.selling .sb-l .chip-s[title] { display: none; }
  body.selling .sb-r .icon-btn { width: 32px; height: 32px; }
  body.selling .sb-l { grid-row: 1; grid-column: 1; }
  body.selling .sb-r { grid-row: 1; grid-column: 2; }
  body.selling .timebar, body.selling .feverbar { grid-row: 2; }
  body.selling .today { padding: 2px 8px; font-size: 12px; }
  body.selling .timebar { height: 7px; }
  body.selling .scene.v2 { --ground: 6%; --ch: 74px; }
  body.selling .l-npc { z-index: 6; }
  body.selling .bubble { font-size: 11px; padding: 5px 7px; max-width: 128px; min-width: 70px; margin-bottom: 4px; }
  /* lời thoại hiện ở ngang thân nhân vật (không đẩy lên mép trên khung) */
  body.selling .cust .say { animation: none; top: auto; bottom: 34px; font-size: 11px; max-width: 140px; padding: 3px 7px; transform: translateX(-50%); z-index: 8; border-color: var(--brand); }
  body.selling .cust .say:after { display: none; }
}
@media (max-width: 899px) and (max-height: 760px) { body.selling .scene.v2 { --ch: 64px; } }
/* ===== Mobile: khung bán hàng gọn 1 màn hình, không cần cuộn (bỏ bảng tóm tắt order) ===== */
@media (max-width: 899px) {
  body.selling .scene { flex: 1 1 auto; height: auto; min-height: 180px; max-height: none; }
  body.selling .play { flex: 0 1 auto; min-height: 0; max-height: 64%; overflow-y: auto; padding: 6px 8px calc(6px + var(--safe-b)); display: flex; flex-direction: column; }
  body.selling #ticket { display: none; }
  body.selling .prep { grid-template-columns: 54px 1fr; gap: 6px; flex: 1; min-height: 0; }
  body.selling .cupcol { justify-content: flex-start; padding-top: 2px; }
  body.selling .cupview svg { width: 52px; height: auto; }
  body.selling .steps { display: none; }
  body.selling .controls { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  body.selling .tools { gap: 6px; margin: 0 0 2px; }
  body.selling .tools .btn { min-height: 34px; padding: 4px 8px; font-size: 13px; }
  body.selling .lbl { margin: 2px 0 1px; font-size: 11px; line-height: 1.1; }
  body.selling #c-base, body.selling #c-top { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 5px; padding-bottom: 2px; scrollbar-width: none; }
  body.selling #c-base::-webkit-scrollbar, body.selling #c-top::-webkit-scrollbar { display: none; }
  body.selling .chip { flex: none; min-height: 34px; padding: 3px 8px; font-size: 12px; gap: 4px; }
  body.selling .chip .chip-img { width: 22px; height: 22px; }
  body.selling .two { gap: 6px; }
  body.selling .chips.seg .chip { min-height: 30px; font-size: 11px; padding: 2px 1px; }
  body.selling #btn-shake { position: static; margin-top: 6px; min-height: 42px; font-size: 16px; }
}
/* icon xu vàng thay emoji */
.coin-ic { width: 1.2em; height: 1.2em; vertical-align: -.22em; }
/* Quà mỗi ngày: nút điểm danh gọn, không đè dòng ghi chú */
[data-checkin] { min-height: 46px !important; font-size: 16px !important; padding: 8px 14px !important; margin: 4px 0 10px; }
[data-checkin] + .note { margin-top: 6px; line-height: 1.4; }
/* Shop: icon nằm giữa ô, không tràn */
.iart { overflow: hidden; line-height: 1; margin: 0 auto 6px; flex: none; }
.iart > img, .iart .iart-img { width: 80% !important; height: 80% !important; max-width: 80%; max-height: 80%; object-fit: contain; display: block; margin: auto; }
.icard { display: flex; flex-direction: column; align-items: center; text-align: center; }
.pill { display: inline-flex; align-items: center; gap: 4px; line-height: 1; }
.pill .ic { vertical-align: 0; }
.lvstep span { width: 40px; height: 40px; display: grid; place-items: center; overflow: hidden; line-height: 1; }
.lvstep span .lv-img { width: 40px !important; height: 36px !important; object-fit: contain; }
.lvstep b { min-width: 0; line-height: 1.2; overflow-wrap: anywhere; }
.lvstep small { white-space: nowrap; }
.upart { display: grid; place-items: center; overflow: hidden; line-height: 1; }
.upart img { max-width: 90%; max-height: 90%; object-fit: contain; }
.lvstep { flex: none; min-height: 56px; }
.lvstep b { color: var(--dark); } .lvstep.cur b { color: var(--dark); }
/* ===== Trang chủ: chỉ còn nút nhỏ "Bắt đầu bán hàng" chỉ vào tiệm, bấm mới hiện bảng đầy đủ ===== */
.hub { pointer-events: none; padding: 10px 12px 18px; align-items: center; }
.hub > * { pointer-events: auto; }
.hub .announce { align-self: stretch; }
.hub-mini { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border-radius: 999px; border: 3px solid var(--dark); background: var(--brand); color: #fff;
  font-family: var(--f-head); font-weight: 700; font-size: 16px; box-shadow: 0 4px 0 rgba(23,23,23,.35); cursor: pointer; animation: hubBob 1.8s ease-in-out infinite; }
.hub-mini::before { content: ""; position: absolute; left: 50%; top: -13px; margin-left: -10px; border: 10px solid transparent; border-top: 0; border-bottom: 12px solid var(--dark); }
.hub-mini::after { content: ""; position: absolute; left: 50%; top: -8px; margin-left: -7px; border: 7px solid transparent; border-top: 0; border-bottom: 9px solid var(--brand); }
.hub-mini .dot { position: absolute; top: -8px; right: -6px; background: #e5484d; color: #fff; font-style: normal; font-size: 11px; min-width: 20px; height: 20px; line-height: 20px; border-radius: 99px; border: 2px solid #fff; }
@keyframes hubBob { 50% { transform: translateY(-4px); } }
body.reduced .hub-mini { animation: none; }
.modal.hub-modal { padding: 0; background: transparent; box-shadow: none; border: 0; max-width: 520px; width: calc(100% - 24px); position: relative; }
.modal.hub-modal .hub-card { margin: 0; }
.hub-x { position: absolute; top: 8px; right: 8px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: 2.5px solid var(--dark); background: #fff; font-weight: 800; cursor: pointer; }
.hub { bottom: calc(var(--ground, 30%) - 120px); }
.scene.v2 .hub { bottom: calc(var(--ground, 30%) - 120px); }
@media (min-width: 900px) { .hub, .scene.v2 .hub { bottom: 6%; } }
.modal.hub-modal .hub-top { padding-right: 34px; }
.obj-ic { width: 1.6em; height: 1.6em; object-fit: contain; vertical-align: middle; } .ci-cell .obj-ic, .achcard .obj-ic, .upart .obj-ic, .evbanner .obj-ic { width: 40px; height: 40px; }
/* ===== Visual/UX spec: CUP HERO (ly là vật thể trung tâm của gameplay) ===== */
.cupview { transition: transform .25s cubic-bezier(.3,1.6,.5,1), box-shadow .3s; }
.cupview.filled svg { transform: scale(1.04); transition: transform .25s; }
.cupview.pop { animation: cupPop .32s cubic-bezier(.3,1.6,.5,1); }
.cupview.done { box-shadow: 0 0 0 2px var(--brand) inset, 0 0 22px rgba(244,123,32,.45) !important; }
@keyframes cupPop { 40% { transform: scale(1.08); } }
@media (min-width: 900px) { body.selling .cupview svg { width: 124px; } }
@media (max-width: 899px) {
  body.selling .prep { grid-template-columns: 96px 1fr; gap: 10px; }
  body.selling .cupview { width: 92px; min-height: 120px; display: grid; place-items: center; background: #fff; border-radius: 18px; box-shadow: 0 0 0 2px var(--line) inset, 0 5px 0 rgba(23,23,23,.06); }
  body.selling .cupview svg { width: 88px; height: auto; }
}
@media (max-width: 899px) and (max-height: 700px) {
  body.selling .prep { grid-template-columns: 82px 1fr; }
  body.selling .cupview { width: 80px; min-height: 104px; }
  body.selling .cupview svg { width: 74px; }
}
/* ===== Visual/UX spec: lớp asset bối cảnh ===== */
.scene.v2.assetbg .l-sky { background: #9fd8f2; }
.sky-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scene.v2.tod-morning .sky-bg { filter: saturate(.95) brightness(1.03); }
.scene.v2.tod-afternoon .sky-bg { filter: sepia(.12) saturate(1.05); }
.scene.v2.w-rain .sky-bg { filter: grayscale(.45) brightness(.9); }
.cloud-img { position: absolute; width: clamp(110px, 18vw, 260px); opacity: .95; animation: drift 70s linear infinite; }
.cloud-img.k0 { top: 8%; left: 6%; } .cloud-img.k1 { top: 16%; left: 58%; animation-duration: 90s; width: clamp(90px, 14vw, 200px); }
.cloud-img.k2 { top: 4%; left: 34%; animation-duration: 110s; width: clamp(70px, 10vw, 150px); } .cloud-img.k3 { top: 22%; left: 82%; animation-duration: 80s; width: clamp(60px, 9vw, 130px); }
.scene.v2.tod-night .cloud-img { opacity: .18; } .scene.v2.tod-sunset .cloud-img { filter: sepia(.35) hue-rotate(-20deg) saturate(1.3); }
.city-img { position: absolute; left: -4%; width: 108%; height: auto; bottom: calc(var(--ground) + 9%); }
.city-img.back { opacity: .9; } .city-img.front { bottom: calc(var(--ground) + 8.5%); width: 112%; left: -6%; }
.green-img { position: absolute; left: -3%; width: 106%; bottom: calc(var(--ground) + 8%); height: auto; max-height: 14%; object-fit: cover; object-position: top; }
.scene.v2.tod-night .city-img, .scene.v2.tod-night .green-img { filter: brightness(.55) saturate(.9) hue-rotate(10deg); }
.scene.v2.tod-sunset .city-img { filter: sepia(.2) saturate(1.1) brightness(.95); }
.scene.v2 .l-street .road.asset { background: none; border: 0; overflow: hidden; height: 10%; }
.road-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.scene.v2 .l-street .walk.asset { background-size: auto 100%; background-repeat: repeat-x; background-position: top center; }
.wires-img { position: absolute; left: 0; width: 100%; bottom: calc(var(--ground) + 10%); height: 26%; object-fit: fill; opacity: .95; }
.lamp-img { position: absolute; bottom: calc(var(--ground) + 1%); height: 30%; } .lamp-img.l { left: 3%; } .lamp-img.r { right: 3%; }
.scene.v2.tod-night .lamp-img { filter: drop-shadow(0 0 16px rgba(255,214,140,.9)); }
.l-fg { z-index: 7; } .fg-img { position: absolute; left: -2%; width: 104%; bottom: -3%; height: auto; max-height: 12%; object-fit: cover; object-position: top; }
body.selling .l-fg { display: none; }
@media (max-width: 899px) { .lamp-img { display: none; } .wires-img { height: 18%; } }
/* Biển hiệu động: khung asset + tên tiệm render HTML (tự co chữ) */
.shop-sign.sign-v3 { background: center / 100% 100% no-repeat; border: 0; box-shadow: none; padding: 10px 26px 12px; min-width: 180px; max-width: min(78vw, 360px); width: max-content; text-align: center; color: #5a2e14; }
.shop-sign.sign-v3 .sign-txt { display: block; font-family: var(--f-head); font-weight: 700; font-size: 20px; line-height: 1.1; white-space: nowrap; color: #5a2e14; }
.shop-sign.sign-v3 small { display: block; font-size: 9px; letter-spacing: .5px; color: #b86520; margin-top: 1px; }
/* Chủ tiệm theo trạng thái */
.player[data-state="working"] .spr { animation: work .7s ease-in-out infinite; transform-origin: 50% 100%; }
.player[data-state="celebrate"] .spr { animation: hop .55s ease-out 3; }
@keyframes work { 50% { transform: rotate(-3deg) translateY(-2px); } }
/* Onboarding 3 bước */
.ob-steps { display: flex; justify-content: center; gap: 6px; margin: 4px 0 10px; } .ob-steps i { width: 26px; height: 5px; border-radius: 9px; background: var(--line); } .ob-steps i.on { background: var(--brand); }
.ob-gender { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 12px; }
.ob-g { border: 3px solid var(--line); background: #fff; border-radius: 18px; padding: 8px 6px 6px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; transition: transform .15s; }
.ob-g img { height: 150px; width: auto; object-fit: contain; } .ob-g b { font-size: 16px; }
.ob-g.on { border-color: var(--brand); background: #FFF4EA; transform: translateY(-2px); box-shadow: 0 4px 0 rgba(244,123,32,.25); }
.ob-step input#ob-name { width: 100%; } .ob-cnt { display: block; text-align: right; margin: 2px 0 8px; }
.ob-preview { position: relative; height: 210px; border-radius: 18px; overflow: hidden; margin: 8px 0 12px; background: linear-gradient(180deg, #9FD8F2, #FFF1DC 70%, #EADCC8 70%); }
.ob-preview .ob-sign { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); }
.ob-preview .ob-pl { position: absolute; left: 50%; bottom: 6px; height: 150px; transform: translateX(-50%); }
/* Trang chủ visual-first: thanh nổi gọn */
.hub-float { display: flex; flex-direction: column; align-items: center; gap: 6px; background: rgba(255,249,242,.93); border: 2.5px solid var(--dark); border-radius: 18px; padding: 8px 12px 10px; box-shadow: 0 6px 0 rgba(23,23,23,.18); max-width: min(92vw, 420px); }
.hf-info { font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.hf-prog { display: grid; grid-template-columns: auto 1fr auto; gap: 6px; align-items: center; width: 100%; font-size: 11px; font-weight: 700; } .hf-prog .pb { min-width: 90px; }
.hub-float .hub-mini { margin-top: 2px; animation: none; } .hub-float .hub-mini::before, .hub-float .hub-mini::after { display: none; }
.sum-shop{display:block;font-size:13px;color:var(--brand);font-weight:700;margin-top:2px}
/* ===== Art v2 (trasua_assets.zip) ===== */
.shop-sign.sign-v3 { width: clamp(220px, 34vw, 340px); max-width: 80vw; aspect-ratio: 900 / 342; height: auto; min-width: 0; padding: 0 16% 4%; box-sizing: border-box;
  display: flex; flex-direction: column; justify-content: center; align-items: center; padding-top: 7%; }
.shop-sign.sign-v3 .sign-txt { font-size: clamp(14px, 2.2vw, 22px); color: #6a3412; max-width: 100%; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 0 #fff8ee; }
.shop-sign.sign-v3 small { font-size: clamp(7px, 1vw, 9px); color: #c46a20; }
.ob-preview .ob-sign { width: 250px; }
.sky-bg { object-position: center 70%; }
@media (max-width: 899px) {
  .scene.v2 { --bs: 2.1; }
  body.selling .scene.v2 { --bs: 1.75; }
  .hub, .scene.v2 .hub { bottom: 2%; }
  .shop-sign.sign-v3 { width: 230px; }
}
.shop-sign.sign-v3 { padding: 0 !important; }
.shop-sign.sign-v3 .sign-txt { max-width: 70%; margin-top: 8%; }
/* ===== Xe máy có người lái + xe đỗ ===== */
.rider { position: absolute; bottom: calc(var(--ground) + 3.5%); height: 13%; z-index: 3; will-change: left; animation: moto 14s linear infinite; }
.rider.rtl { animation-name: moto-r; }
.rider.lane1 { bottom: calc(var(--ground) + 1.5%); z-index: 4; }
.rider-img { height: 100%; width: auto; display: block; filter: drop-shadow(0 4px 3px rgba(0,0,0,.25)); animation: bounce-ride .35s ease-in-out infinite alternate; }
.rider-img.flip { transform: scaleX(-1); animation-name: bounce-ride-f; }
@keyframes bounce-ride { to { transform: translateY(-2px); } }
@keyframes bounce-ride-f { from { transform: scaleX(-1); } to { transform: scaleX(-1) translateY(-2px); } }
.parked { position: absolute; height: 10%; bottom: calc(var(--ground) - 5%); z-index: 3; filter: drop-shadow(0 5px 3px rgba(0,0,0,.2)); }
.parked.p1 { left: 2%; } .parked.p2 { right: 2%; transform: scaleX(-1); }
body.selling .rider, body.selling .parked { display: none; }
@media (max-width: 899px) { .rider { height: 9%; } .parked { height: 7%; bottom: calc(var(--ground) - 3%); } }
@media (prefers-reduced-motion: reduce) { .rider { display: none; } }
body.reduced .rider { display: none; }
/* Người đi bộ đi đúng trên vỉa hè (ngay dưới mép đường) */
.walker.v2 { bottom: calc(var(--ground) - 9%); z-index: 1; } .walker.v2.rtl { bottom: calc(var(--ground) - 5%); }
@media (max-width: 899px) { .walker { display: block; } .walker.v2 { bottom: calc(var(--ground) - 13%); } .walker.v2.rtl { bottom: calc(var(--ground) - 8%); } }
.scene.v2 .l-walk { z-index: 4; }
/* Trang chủ: thanh thông tin 1 hàng gọn trên vỉa hè */
.hub-float.one { flex-direction: row; align-items: center; gap: 8px; padding: 4px 4px 4px 10px; border-radius: 999px; border-width: 2px; max-width: min(96vw, 520px); box-shadow: 0 4px 0 rgba(23,23,23,.16); }
.hub-float.one > span { white-space: nowrap; font-size: 12px; font-weight: 800; color: var(--ink); display: inline-flex; align-items: center; gap: 3px; }
.hub-float.one .hf-i .ic { width: 22px; height: 22px; }
.hub-float.one .hf-hot { color: #c4501a; max-width: 92px; overflow: hidden; text-overflow: ellipsis; display: inline-block; }
.hub-float.one .hf-lv { gap: 5px; } .hub-float.one .hf-lv .pb { width: 46px; margin: 0; height: 6px; }
.hub-float.one .hub-mini { padding: 7px 14px; font-size: 14px; border-width: 2px; margin: 0; box-shadow: 0 3px 0 rgba(23,23,23,.3); }
.hub, .scene.v2 .hub { bottom: 2.5%; }
@media (max-width: 899px) { .hub, .scene.v2 .hub { bottom: 1.5%; } .hub-float.one { gap: 6px; } .hub-float.one .hf-lv .pb { width: 30px; } .hub-float.one .hf-hot { max-width: 70px; } }
@media (max-width: 370px) { .hub-float.one .hf-hot { display: none; } }
/* ===== Lắc ly v2: ly thật + bọt + kết quả mượt ===== */
#ov-shake { backdrop-filter: blur(3px); background: rgba(40, 22, 10, .38); }
.shake-card.v2 { background: linear-gradient(180deg, #FFF9F2, #FFEBD6); border: 3px solid #6a3412; border-radius: 26px; box-shadow: 0 10px 0 rgba(106,52,18,.25), 0 20px 40px rgba(0,0,0,.25); padding: 14px 18px 16px; animation: popIn .22s cubic-bezier(.3,1.5,.5,1); }
@keyframes popIn { from { transform: scale(.85); opacity: 0; } }
.shake-stage { position: relative; height: 150px; display: grid; place-items: center; }
.shake-glow { position: absolute; width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle, rgba(255,200,120,.65), transparent 65%); animation: glowP 1s ease-in-out infinite alternate; }
@keyframes glowP { to { transform: scale(1.12); opacity: .7; } }
.shake-drink { position: relative; height: 136px; width: auto; filter: drop-shadow(0 8px 6px rgba(0,0,0,.22)); animation: shakeCup .16s ease-in-out infinite alternate; transform-origin: 50% 85%; }
@keyframes shakeCup { from { transform: rotate(-9deg) translateY(1px); } to { transform: rotate(9deg) translateY(-3px); } }
.sk-b { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, rgba(255,255,255,.2) 60%, rgba(255,200,150,.5)); border: 1.5px solid rgba(255,255,255,.9); animation: bub 1.1s ease-in infinite; opacity: 0; }
.sk-b.b1 { left: 30%; animation-delay: 0s; } .sk-b.b2 { left: 62%; animation-delay: .3s; width: 9px; height: 9px; } .sk-b.b3 { left: 40%; animation-delay: .6s; width: 7px; height: 7px; } .sk-b.b4 { left: 68%; animation-delay: .85s; }
@keyframes bub { 0% { bottom: 20%; opacity: 0; } 20% { opacity: 1; } 100% { bottom: 95%; opacity: 0; transform: translateX(8px); } }
.shake-card.v2 h3 { margin: 2px 0 8px; font-size: 24px; color: #c4501a; letter-spacing: 1px; text-shadow: 0 2px 0 #fff; }
.shake-card.v2 .shakebar { height: 46px; border-radius: 999px; border: 3px solid #6a3412; background: #f1e6da; box-shadow: inset 0 3px 0 rgba(0,0,0,.08); }
.shake-card.v2 .z.under { background: linear-gradient(180deg, #efe4d8, #e2d4c4); } .shake-card.v2 .z.over { background: linear-gradient(180deg, #ffcdc5, #f5aa9e); }
.shake-card.v2 .z.good { background: linear-gradient(180deg, #ffd59a, #ffb36b); }
.shake-card.v2 .z.perfect { background: linear-gradient(180deg, #ff9a3c, #f47b20); box-shadow: 0 0 0 2px #6a3412 inset, 0 0 16px rgba(255,150,40,.9); animation: perf .6s ease-in-out infinite alternate; }
@keyframes perf { to { filter: brightness(1.15); } }
.shake-card.v2 .needle { width: 8px; margin-left: -4px; top: -7px; bottom: -7px; background: #fff; border: 2.5px solid #6a3412; border-radius: 6px; box-shadow: 0 2px 4px rgba(0,0,0,.25); }
.shake-card.v2 .needle i { position: absolute; left: 50%; top: -14px; margin-left: -7px; border: 7px solid transparent; border-top: 9px solid #6a3412; }
.shake-res { position: absolute; z-index: 2; font-family: var(--f-head); font-weight: 800; font-size: 34px; color: #fff; -webkit-text-stroke: 2px #6a3412; text-shadow: 0 4px 0 #6a3412; opacity: 0; transform: scale(.4) rotate(-8deg); }
#ov-shake.done .shake-res { opacity: 1; transform: scale(1) rotate(-6deg); transition: transform .3s cubic-bezier(.3,1.8,.5,1), opacity .15s; }
#ov-shake.done .shake-drink { animation: none; transform: scale(1.06); transition: transform .2s; }
#ov-shake.r-perfect .shake-res { color: #ffd34d; } #ov-shake.r-under .shake-res, #ov-shake.r-over .shake-res { color: #ffb4a8; }
#ov-shake.r-perfect .shake-glow { background: radial-gradient(circle, rgba(255,215,90,.95), transparent 68%); transform: scale(1.35); }
/* Dải thông báo khách (trên khu order) */
.feed { display: flex; flex-direction: column; gap: 3px; min-height: 30px; margin-bottom: 6px; }
.feed .fd { display: flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 12px; background: #fff; border: 2px solid var(--line); font-size: 12.5px; line-height: 1.25; opacity: 0; transform: translateY(-6px); transition: .25s; }
.feed .fd.in { opacity: 1; transform: none; } .feed .fd:nth-child(2) { opacity: .55; font-size: 11.5px; padding: 3px 8px; }
.feed .fd.talk { border-color: #f3c99a; background: #FFF7EC; } .feed .fd.good { border-color: #9ad6a8; background: #EFFAF1; } .feed .fd.bad { border-color: #f2b3ab; background: #FFF0EE; }
.fd-ava { width: 26px; height: 26px; flex: none; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: #fff; }
.fd-ava .spr-wrap, .fd-ava .spr { height: 26px !important; width: auto; } .fd-ava .chibi { --cs: 22px; }
.fd-money { font-family: var(--f-head); font-weight: 800; font-size: 15px; color: #1f7a3d; } .fd-money.neg { color: #b3261e; }
.fd-q .stars { color: #f5a623; font-style: normal; letter-spacing: 1px; } .fd-q b { font-size: 12px; } .fd-q .q-perfect { color: #f47b20; }
body.selling .cust .say, body.selling .bubble.react { display: none !important; }
@media (max-width: 899px) { .feed .fd:nth-child(2) { display: none; } .feed { min-height: 0; margin-bottom: 4px; } .shake-stage { height: 128px; } .shake-drink { height: 116px; } }
/* Thanh trên khi bán: icon gọn, bấm xem chi tiết */
.sb-icons { gap: 4px !important; flex-wrap: nowrap; }
.sbi { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; background: rgba(255,255,255,.88); display: grid; place-items: center; font-size: 15px; line-height: 1; padding: 0; cursor: pointer; box-shadow: 0 2px 0 rgba(0,0,0,.15); }
.sbi .ic, .sbi .obj-ic { width: 20px; height: 20px; vertical-align: 0; }
.sbi.day { background: var(--dark); color: #fff; font-family: var(--f-head); font-weight: 800; font-size: 13px; width: auto; min-width: 30px; padding: 0 8px; border-radius: 99px; }
.sbi.day::before { content: 'Ngày '; font-size: 10px; margin-right: 2px; opacity: .8; }
.modal.dayinfo .di-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.modal.dayinfo .di-ic { font-size: 24px; width: 32px; text-align: center; flex: none; } .modal.dayinfo small { display: block; color: var(--muted); }
.modal.dayinfo .trend-card { margin: 4px 0 0; }
.shop-sign.sign-v3 .sign-txt { margin-top: 10%; }
/* Màn intro bắt buộc tài khoản */
.modal.gate { text-align: center; max-width: 420px; background: linear-gradient(180deg, #FFF9F2, #FFEAD2); }
.gate-hero { position: relative; height: 170px; margin: -6px 0 4px; }
.gate-shop { position: absolute; left: 50%; bottom: 0; height: 160px; transform: translateX(-50%); filter: drop-shadow(0 8px 8px rgba(0,0,0,.18)); }
.gate-pl { position: absolute; bottom: 0; height: 120px; filter: drop-shadow(0 6px 4px rgba(0,0,0,.2)); } .gate-pl.l { left: 0; } .gate-pl.r { right: 0; }
.gate-feat { list-style: none; padding: 0; margin: 8px 0 12px; text-align: left; font-size: 13px; display: grid; gap: 6px; }
.gate-feat li { background: #fff; border-radius: 12px; padding: 7px 10px; border: 2px solid var(--line); }
.modal.gate .btn { margin-top: 6px; }
html, body { overflow-x: hidden; max-width: 100%; }
.scene { overflow: hidden; }
.walker.v2 { bottom: calc(var(--ground) - 6%); } .walker.v2.rtl { bottom: calc(var(--ground) - 2.5%); }
@media (max-width: 899px) { .walker.v2 { bottom: calc(var(--ground) - 6%); } .walker.v2.rtl { bottom: calc(var(--ground) - 2.5%); } }
.sbi.day { white-space: nowrap; }
@media (max-width: 899px) {
  .stage, body.selling .play, body.selling .prep, body.selling .controls, body.selling .two, body.selling .two > div, body.selling .chips { min-width: 0; max-width: 100%; }
  body.selling .stage { width: 100%; }
  body.selling .two { grid-template-columns: minmax(0, 1fr); }
  body.selling .prep { grid-template-columns: 88px minmax(0, 1fr); }
  body.selling .cupview { width: 84px; }
  body.selling .chips.seg .chip { padding: 2px 0; font-size: 10.5px; }
}
/* Tên tiệm căn đúng giữa ô kem của khung biển hiệu (ô kem: 44%–68% chiều cao, tâm 56%) */
.shop-sign.sign-v3 { display: block !important; }
.shop-sign.sign-v3 .sign-txt { position: absolute; left: 50%; top: 56%; transform: translate(-50%, -50%); margin: 0 !important; max-width: 66%; line-height: 1; text-align: center; }
/* ===== Vỉa hè (asset street_sidewalk) là dải ngay dưới mép đường; NPC đi/ngồi + decor nằm trong dải này ===== */
.scene.v2 { --sw: 13%; }
@media (max-width: 899px) { .scene.v2 { --sw: 15%; } }
.scene.v2 .l-street .walk.asset { top: auto; bottom: calc(var(--ground) + 2% - var(--sw)); height: var(--sw); background-size: auto 100%; background-position: center top; background-color: transparent; }
.walker.v2, .walker.v2.ltr { bottom: calc(var(--ground) + 2% - var(--sw) * .78) !important; }
.walker.v2.rtl { bottom: calc(var(--ground) + 2% - var(--sw) * .42) !important; }
.walker.v2 .spr { height: calc(var(--ch) * .78); }
.sitter { position: absolute; bottom: calc(var(--ground) + 2% - var(--sw) * .86); z-index: 2; }
.sitter .spr { height: calc(var(--ch) * .62); filter: drop-shadow(0 4px 3px rgba(0,0,0,.2)); }
.sitter.s0 { left: 6%; } .sitter.s1 { right: 9%; }
@media (max-width: 899px) { .sitter.s0 { left: 2%; } }
/* Decor đã mua: trên vỉa hè 2 bên tiệm, dưới lớp nhân vật */
.eqd { position: absolute; bottom: calc(var(--ground) + 2% - var(--sw) * .92); z-index: 1; filter: drop-shadow(0 5px 4px rgba(0,0,0,.2)); pointer-events: none; }
.eqd.table { left: 3%; width: 12%; } .eqd.lamp { left: 16%; width: 4%; bottom: calc(var(--ground) + 1%); }
.eqd.plant { right: 3%; width: 6%; } .eqd.poster { right: 11%; width: 6%; }
@media (max-width: 899px) { .eqd.table { left: 1%; width: 22%; } .eqd.lamp { left: 24%; width: 7%; bottom: calc(var(--ground) + 2% - var(--sw) * .9); } .eqd.plant { right: 1%; width: 11%; } .eqd.poster { right: 13%; width: 11%; } }
body.selling .eqd { opacity: .95; }
/* Ly hero = ảnh món khách order, lấp dần theo thành phần đúng */
.cup-hero { position: relative; width: 100%; height: 100%; min-height: 110px; display: grid; place-items: center; }
.cup-hero img { grid-area: 1 / 1; width: auto; max-width: 100%; height: 112px; object-fit: contain; }
.cup-hero .ch-ghost { filter: grayscale(1) brightness(1.35) opacity(.28); }
.cup-hero .ch-fill { transition: clip-path .45s cubic-bezier(.3,1.3,.5,1); filter: drop-shadow(0 4px 4px rgba(0,0,0,.18)); }
.cup-hero .ch-pct { position: absolute; bottom: -2px; right: -2px; background: var(--brand); color: #fff; font-family: var(--f-head); font-weight: 800; font-size: 11px; border-radius: 99px; padding: 0 6px; border: 2px solid #fff; }
.cup-hero .ch-bad { position: absolute; top: -4px; left: 50%; transform: translateX(-50%); background: #ffe1dc; color: #b3261e; font-size: 10px; font-weight: 800; border-radius: 99px; padding: 1px 6px; white-space: nowrap; }
.cup-hero.bad .ch-fill { filter: drop-shadow(0 0 4px rgba(220,60,40,.8)); }
.cup-hero.shaken .ch-fill { animation: chGlow 1.2s ease-in-out infinite alternate; }
@keyframes chGlow { to { filter: drop-shadow(0 0 10px rgba(255,190,80,.95)); } }
@media (min-width: 900px) { .cup-hero img { height: 150px; } }
@media (max-width: 899px) and (max-height: 700px) { .cup-hero img { height: 92px; } .cup-hero { min-height: 92px; } }
.fxl{display:block;font-size:10px;color:#1f7a3d;font-weight:800;margin:2px 0 4px;line-height:1.2}
/* Kế hoạch phát triển */
.goal { display: grid; grid-template-columns: 30px minmax(0,1fr) auto; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.goal .gi { font-size: 22px; text-align: center; } .goal b { display: block; font-size: 13px; line-height: 1.2; } .goal small { display: block; font-size: 11px; color: var(--muted); line-height: 1.25; }
.goal .pb { margin: 4px 0 0; height: 6px; } .goal.ready b { color: #c4501a; }
.rcard.goals-card .goal:last-child { border-bottom: 0; }
.goal-fab { position: absolute; top: 10px; left: 10px; z-index: 6; display: inline-flex; align-items: center; gap: 4px; border: 2px solid var(--dark); background: rgba(255,249,242,.95); border-radius: 999px; padding: 4px 10px 4px 8px; font-size: 16px; cursor: pointer; box-shadow: 0 3px 0 rgba(0,0,0,.18); pointer-events: auto; }
.goal-fab b { font-family: var(--f-head); font-size: 13px; } .goal-fab .dot { position: absolute; top: -6px; right: -6px; background: #e5484d; color: #fff; font-style: normal; font-size: 11px; border-radius: 99px; padding: 0 5px; border: 2px solid #fff; }
.hub .goal-fab { position: fixed; top: calc(var(--hud-h) + 10px); left: 10px; }
@media (min-width: 900px) { .hub .goal-fab { display: none; } }
.modal.goals { text-align: left; } .modal.goals h3 { text-align: center; }
/* Mobile trang chủ: hạ mặt đất xuống để dùng hết khung, vỉa hè rộng hơn — người đi bộ đi ở nửa dưới vỉa hè, không đè lên tiệm */
@media (max-width: 899px) {
  body:not(.selling) .scene.v2 { --ground: 30%; --sw: 24%; --bs: 1.9; }
  body:not(.selling) .walker.v2, body:not(.selling) .walker.v2.ltr { bottom: calc(var(--ground) + 2% - var(--sw) * .86) !important; }
  body:not(.selling) .walker.v2.rtl { bottom: calc(var(--ground) + 2% - var(--sw) * .52) !important; }
  body:not(.selling) .sitter { bottom: calc(var(--ground) + 2% - var(--sw) * .9); }
  body:not(.selling) .scene.v2 .l-street .walk.asset { background-size: auto 100%; }
}
