:root {
  --bg: #14121f; --bg2: #1c1a2b; --card: #242036; --card2: #2c2742; --line: #3a3352;
  --text: #fbf6ee; --muted: #a9a2c2; --accent: #f6b93b; --accent2: #ff7a3d; --ok: #3ddc97; --bad: #ff5d5d; --warn: #ffb02e;
  --rare: #4fa3ff; --epic: #b46bff; --legend: #ffb02e;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font: 15px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; overscroll-behavior: none; }
body { background: radial-gradient(120% 55% at 50% 0%, #3a2440 0%, var(--bg) 62%); }
body.noscroll { overflow: hidden; }
#app { display: flex; flex-direction: column; height: 100%; max-width: 520px; margin: 0 auto; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
.muted { color: var(--muted); font-size: 13px; }
.center { text-align: center; } .right { text-align: right; }
.good { color: var(--ok); } .bad { color: var(--bad); } .warn { color: var(--warn); }
h2 { margin: 8px 0 4px; font-size: 22px; } h3 { margin: 18px 0 8px; font-size: 16px; }
.fine { color: var(--muted); font-size: 12px; margin-top: 14px; }

/* ---------- шапка ---------- */
.top { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; gap: 10px; }
.player { display: flex; gap: 10px; align-items: center; min-width: 0; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; overflow: hidden; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent2), #c0396b); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.vip { box-shadow: 0 0 0 2px #ffd25e, 0 0 12px rgba(246, 185, 59, .6); }
.pinfo { min-width: 0; }
.pname { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.lvl { font-size: 11px; color: var(--accent); font-weight: 700; }
.xpbar { width: 110px; height: 5px; border-radius: 3px; background: var(--card); margin-top: 4px; overflow: hidden; }
.xpfill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width .4s; }
.wallet { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.coins { display: flex; align-items: center; gap: 6px; font-size: 20px; font-weight: 800; }
.coin-sm { width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffe9a3, #f6b93b 55%, #c47a0b); box-shadow: inset 0 -2px 0 #9b5d06; }
.cash-pill { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: linear-gradient(135deg, #2d6b4f, #1f4d39); color: #d8ffe9; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 4px rgba(61, 220, 151, .18); } }

main { flex: 1; overflow-y: auto; padding: 0 14px 16px; }
.screen { display: none; animation: fade .2s; } .screen.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }

/* ---------- общие элементы ---------- */
.list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.card, .item { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.card { margin-top: 12px; }
.item { display: flex; align-items: center; gap: 12px; }
.item .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--bg2); display: grid; place-items: center; font-size: 24px; flex-shrink: 0; }
.item .body { flex: 1; min-width: 0; }
.item .t { font-weight: 600; } .item .d { color: var(--muted); font-size: 12.5px; }
.item.featured { border-color: var(--accent); background: linear-gradient(135deg, #3a2a3a, #3a2b1e); }
.item.me { border-color: var(--accent2); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.row.gap { margin-top: 10px; } .grow { flex: 1; }
.btn { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #2a1300; font-weight: 700; padding: 10px 14px;
  border-radius: 12px; white-space: nowrap; transition: transform .08s; }
.btn:active { transform: scale(.96); }
.btn.ghost { background: var(--bg2); color: var(--text); border: 1px solid var(--line); }
.btn.star { background: linear-gradient(135deg, #ffd25e, #f6a823); }
.btn:disabled { opacity: .45; filter: grayscale(.6); }
.btn.done { background: var(--bg2); color: var(--ok); }
.btn.big { display: block; width: 100%; margin-top: 12px; padding: 14px; font-size: 16px; border-radius: 14px; }
.link { color: var(--accent); font-size: 13px; font-weight: 600; }
.tag { font-size: 11.5px; padding: 3px 8px; border-radius: 8px; background: var(--bg2); color: var(--accent); display: inline-block; }
.tag.off { color: var(--muted); } .tag.warn { color: var(--warn); }
.bar { height: 10px; background: var(--bg2); border-radius: 6px; overflow: hidden; margin: 6px 0; }
.bar.thin { height: 6px; }
.fill { height: 100%; width: 0; background: linear-gradient(90deg, #ffd25e, #f6b93b, #ff8a3d); transition: width .3s; border-radius: 6px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; margin: 10px 0 4px; gap: 2px; }
.seg.seg4 { grid-template-columns: repeat(4, 1fr); } .seg.seg5 { grid-template-columns: repeat(5, 1fr); }
.seg button { padding: 8px 2px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: 13px; }
.seg button.active { background: var(--card2); color: var(--text); }
.tip { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: rgba(246, 185, 59, .1); color: #ffe3a3; font-size: 13px; }
.card.tip { border-color: rgba(246, 185, 59, .35); }
.big-ico { font-size: 40px; line-height: 1; }
.big { font-size: 20px; }
.mode { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.m-manual { background: #3a3352; color: #d7d1ef; } .m-auto { background: #4a3b16; color: #ffd25e; } .m-autonomous { background: #1d4a37; color: #7cf0bd; }

/* ---------- кухня ---------- */
.place-bar { display: flex; align-items: center; gap: 8px; margin: 2px 0 6px; }
.place { flex: 1; display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 6px 10px; text-align: left; min-width: 0; }
.pico { font-size: 24px; }
.pt { display: flex; flex-direction: column; min-width: 0; flex: 1; } .pt b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rep { font-weight: 700; color: var(--accent); white-space: nowrap; }
.boosts { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.boost { font-size: 12px; padding: 3px 8px; border-radius: 999px; background: #3a2b52; color: #e6d9ff; }

.hall { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hall.n1 { grid-template-columns: 1fr; } .hall.n1 .table { min-height: 230px; }
.table { position: relative; background: linear-gradient(180deg, #3b2c25, #2a201b); border: 1px solid #4d3a2e; border-radius: 18px; padding: 10px 8px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 196px; text-align: center; transition: transform .1s; overflow: hidden; }
.table:active { transform: scale(.97); }
.table.free { justify-content: center; opacity: .7; }
.chair { font-size: 34px; opacity: .6; }
.table.waiting { border-color: #8a5b2e; box-shadow: 0 0 0 1px rgba(246, 185, 59, .15) inset; }
.table.cooking { border-color: var(--accent); }
.table.paid { border-color: var(--ok); animation: glow 1.2s infinite; }
@keyframes glow { 50% { box-shadow: 0 0 16px rgba(61, 220, 151, .35); } }
.table.vip { border-color: var(--legend); }
.viptag { position: absolute; top: 6px; right: 8px; font-size: 10px; font-weight: 800; color: #2a1300; background: var(--legend); padding: 1px 6px; border-radius: 6px; z-index: 2; }
.cust { width: 74px; height: 74px; animation: bob 2.4s ease-in-out infinite; }
.n1 .cust { width: 110px; height: 110px; }
.cust svg { width: 100%; height: 100%; }
@keyframes bob { 50% { transform: translateY(-3px); } }
.chewing .chew { animation: chew .35s infinite alternate; transform-origin: 50px 52px; }
@keyframes chew { to { transform: scaleY(.4); } }
.tmid { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; z-index: 1; }
.bubble { position: relative; background: #fff8ec; color: #2a1a10; border-radius: 12px; padding: 4px 8px; display: flex; align-items: center; gap: 6px;
  max-width: 100%; border: 2px solid var(--rar); font-size: 12px; font-weight: 700; }
.bubble::before { content: ''; position: absolute; top: -7px; left: 50%; margin-left: -6px; border: 6px solid transparent; border-bottom-color: var(--rar); border-top: 0; }
.bubble .dish { font-size: 20px; } .bubble .dname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.patience { width: 90%; height: 7px; border-radius: 4px; background: rgba(0, 0, 0, .35); overflow: hidden; }
.pfill { height: 100%; background: var(--ok); border-radius: 4px; transition: width .25s linear; }
.pfill.mid { background: var(--warn); } .pfill.low { background: var(--bad); }
.plate-ico { font-size: 28px; } .plate-ico.eat { animation: bite 1s infinite; }
@keyframes bite { 50% { transform: scale(.9) rotate(-6deg); } }
.eatbar { width: 70%; height: 5px; background: rgba(0, 0, 0, .35); border-radius: 3px; overflow: hidden; }
.efill { height: 100%; background: var(--accent); }
.cash-on-table { display: flex; align-items: center; gap: 4px; animation: pop .35s; }
.cash-on-table b { color: var(--ok); font-size: 16px; }
.money { width: 46px; } .crumbs { width: 60px; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.stars-mini { color: var(--accent); letter-spacing: 2px; font-size: 13px; }
.tstate { font-size: 11.5px; color: #e8d6c4; margin-top: auto; z-index: 1; }
.table.dirty { justify-content: center; }

.kitchen-panel { margin-top: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.stock { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px; margin-top: 8px; }
.stk { background: var(--bg2); border-radius: 10px; padding: 4px; text-align: center; font-size: 12px; }
.stk span { font-size: 20px; display: block; } .stk b { display: block; }
.stk.mid b { color: var(--warn); } .stk.low b { color: var(--bad); } .stk.low { animation: pulse 1.2s infinite; }
.sbar { height: 3px; background: #0006; border-radius: 2px; overflow: hidden; margin-top: 2px; } .sbar div { height: 100%; background: var(--ok); }
.staff-row { display: flex; align-items: center; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.sr { position: relative; width: 34px; height: 34px; border-radius: 10px; background: var(--bg2); display: grid; place-items: center; font-size: 18px; opacity: .35; }
.sr.on { opacity: 1; box-shadow: 0 0 0 1px var(--ok) inset; }
.sr i { position: absolute; right: 2px; bottom: 0; font-size: 9px; font-style: normal; color: var(--ok); font-weight: 800; }

.autopanel { display: flex; flex-direction: column; gap: 8px; }
.auto-art { position: relative; border-radius: 16px; overflow: hidden; }
.bldsvg { width: 100%; display: block; border-radius: 16px; }
.auto-badge { position: absolute; left: 10px; bottom: 10px; background: rgba(20, 18, 31, .8); padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.auto-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.auto-stats div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 8px 4px; }
.auto-stats b { display: block; font-size: 17px; color: var(--accent); } .auto-stats span { font-size: 11px; color: var(--muted); }
.register-card .cash-n { font-size: 22px; color: var(--ok); }
.reg-ico { font-size: 20px; }
.hall.auto .table { min-height: 120px; pointer-events: none; }
.auto-seat .cust { width: 56px; height: 56px; animation: bob 2.4s ease-in-out infinite; animation-delay: var(--d); }
.auto-seat .plate-ico { animation: bite 1.4s infinite; animation-delay: var(--d); }

/* ---------- оверлей готовки ---------- */
.overlay { position: fixed; inset: 0; z-index: 20; background: radial-gradient(120% 60% at 50% 0%, #432a3a 0%, var(--bg) 65%); display: flex; flex-direction: column;
  max-width: 520px; margin: 0 auto; padding: 10px 14px calc(14px + var(--safe-b)); touch-action: none; user-select: none; -webkit-user-select: none; }
.overlay[hidden] { display: none; }
.cook-head { display: flex; align-items: center; gap: 10px; }
.close { width: 36px; height: 36px; border-radius: 50%; background: var(--card); font-size: 16px; flex-shrink: 0; }
.cook-cust { width: 54px; height: 54px; flex-shrink: 0; } .cook-cust svg { width: 100%; height: 100%; }
.cook-info { flex: 1; min-width: 0; } .cook-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cook-info .patience { width: 100%; margin-top: 6px; }
.rar { font-size: 11px; font-weight: 700; }
.steps-dots { display: flex; justify-content: center; gap: 6px; margin: 10px 0 4px; }
.dot { width: 32px; height: 32px; border-radius: 10px; background: var(--card); display: grid; place-items: center; font-size: 16px; opacity: .5; }
.dot.cur { opacity: 1; box-shadow: 0 0 0 2px var(--accent); } .dot.done { opacity: 1; background: #1d4a37; } .dot.staff { border: 1px dashed var(--ok); }
.cook-stage { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.mg { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; animation: fade .2s; }
.mg-head { text-align: center; margin: 6px 0; } .mg-title { font-size: 19px; font-weight: 800; } .mg-hint { color: var(--muted); font-size: 13px; margin-top: 2px; }
.mg-stage { flex: 1; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.mg-foot { width: 100%; }
.mg-flash { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); font-size: 26px; font-weight: 900; padding: 12px 20px; border-radius: 16px;
  background: rgba(20, 18, 31, .85); animation: pop .25s; z-index: 5; white-space: nowrap; }
.mg-flash.ok { color: var(--ok); } .mg-flash.bad { color: var(--bad); } .mg-flash.meh { color: var(--warn); }

.heat { position: relative; width: min(86vw, 360px); border-radius: 18px; background: #1b1826; padding: 8px; touch-action: none; }
.heat.on { box-shadow: 0 0 24px rgba(255, 122, 61, .45); }
.heat .station { width: 100%; display: block; pointer-events: none; }
.heat.on .flame { animation: flick .15s infinite alternate; }
@keyframes flick { to { opacity: .55; } }
.heat-label { position: absolute; top: 10px; right: 14px; font-size: 12px; color: var(--muted); }
.gauge { position: relative; width: min(86vw, 360px); height: 26px; border-radius: 13px;
  background: linear-gradient(90deg, #f3b9a7 0%, #e0a066 35%, #c7772f 55%, #8a4a1c 75%, #2a1a12 100%); margin-top: 6px; }
.gz { position: absolute; top: -3px; bottom: -3px; border: 3px solid var(--ok); border-radius: 10px; background: rgba(61, 220, 151, .25); }
.needle { position: absolute; top: -8px; width: 4px; height: 42px; margin-left: -2px; background: #fff; border-radius: 2px; box-shadow: 0 0 6px #000; }
.needle.in { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.gauge-labels { position: absolute; top: 34px; left: 0; right: 0; display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }

.swipe-area, .tap-area { width: min(80vw, 320px); touch-action: none; position: relative; }
.grater, .board { width: 100%; display: block; }
.knife-wrap { position: absolute; right: 8%; top: 4%; width: 34%; transform: rotate(-35deg); pointer-events: none; }
.knife-wrap.cut { animation: cut .18s; }
@keyframes cut { 50% { transform: translate(-30%, 45%) rotate(-55deg); } }
.count { font-size: 18px; color: var(--muted); } .count b { color: var(--accent); font-size: 26px; }

.bottles { display: flex; gap: 12px; justify-content: center; }
.bottle-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; background: var(--card); border-radius: 16px; border: 1px solid var(--line); font-size: 12px; font-weight: 600; }
.bottle { width: 64px; height: 110px; }
.bottle-btn.squeeze .bottle { animation: squeeze .4s; }
@keyframes squeeze { 40% { transform: scaleX(1.15) scaleY(.9); } }

.order-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.chip { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; }
.chip.done { background: #1d4a37; border-color: var(--ok); }
.asm-base { width: min(80vw, 300px); }
.basesvg { width: 100%; display: block; }
.basesvg .layer { animation: drop .3s; }
@keyframes drop { from { transform: translateY(-30px); opacity: 0; } }
.asm-base.wrapped .basesvg { animation: wrap .5s; }
@keyframes wrap { 30% { transform: scale(.85) rotate(-6deg); } }
.asm-items { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.ing-btn { background: var(--card2); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; font-weight: 600; font-size: 14px; }
.ing-btn:disabled { opacity: .3; }
.shake { animation: shake .3s; } @keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.staff-step .bar { width: 80%; height: 14px; }
.ready .plate-big { width: min(70vw, 280px); animation: pop .4s; }
.ready .plate-big.legend { filter: drop-shadow(0 0 18px #ffb02e); animation: legend 1.6s infinite; }
@keyframes legend { 50% { filter: drop-shadow(0 0 30px #ffd25e); transform: scale(1.03); } }
.dishes-gold { --plate: #ffd25e; --plate2: #f6b93b; } .dishes-craft { --plate: #c8955a; --plate2: #a87440; }

/* ---------- сортировка ---------- */
.sort .bins { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; width: 100%; margin-top: 8px; }
.bin { background: #2a3a4a; border: 2px dashed #5c7a99; border-radius: 16px; min-height: 86px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 13px; position: relative; }
.bin-ico { font-size: 30px; }
.bin-n { position: absolute; top: 6px; right: 10px; font-size: 12px; color: var(--ok); }
.bin.hit { animation: hit .35s; border-color: var(--ok); } .bin.miss { animation: shake .3s; border-color: var(--bad); }
@keyframes hit { 50% { transform: scale(1.06); } }
.crate { margin-top: auto; width: 100%; background: linear-gradient(180deg, #a8743e, #7c5228); border-radius: 16px; padding: 12px; border: 3px solid #5a3a1a; }
.crate-items { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.pack { aspect-ratio: 1; border-radius: 12px; background: #f3e3c3; display: grid; place-items: center; font-size: 28px; touch-action: none; box-shadow: 0 3px 0 #c9a46a; }
.pack.sel { outline: 3px solid var(--accent); } .pack.lift { opacity: .3; } .pack.gone { visibility: hidden; }
.pack.ghost { position: fixed; width: 58px; height: 58px; z-index: 50; pointer-events: none; transform: scale(1.15); box-shadow: 0 8px 20px rgba(0, 0, 0, .5); }

/* ---------- лист / результат ---------- */
.sheet-bg { position: fixed; inset: 0; z-index: 30; background: rgba(8, 6, 14, .65); display: flex; align-items: flex-end; justify-content: center; }
.sheet-bg[hidden] { display: none; }
.sheet { width: 100%; max-width: 520px; max-height: 88vh; overflow-y: auto; background: var(--bg2); border-radius: 22px 22px 0 0; padding: 18px 16px calc(18px + var(--safe-b)); animation: up .25s; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.result { text-align: center; position: relative; }
.stars { font-size: 46px; letter-spacing: 6px; }
.star { color: #4a4360; display: inline-block; }
.star.on { color: #ffd25e; animation: starpop .45s both; animation-delay: calc(var(--i) * .15s); text-shadow: 0 0 14px rgba(255, 210, 94, .6); }
@keyframes starpop { from { transform: scale(0) rotate(-90deg); } 70% { transform: scale(1.3); } }
.res-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.res-row div { background: var(--card); border-radius: 12px; padding: 8px 4px; } .res-row b { display: block; font-size: 18px; color: var(--ok); } .res-row span { font-size: 11px; color: var(--muted); }
.notes { text-align: left; margin: 8px 0; padding-left: 18px; font-size: 13.5px; } .notes li { margin: 3px 0; }
.unlock { margin: 8px 0; padding: 10px; border-radius: 12px; background: linear-gradient(135deg, #4a3b16, #3a2b52); font-weight: 800; }
.frag { margin: 6px 0; color: #cfe2ff; }
.result.legend { background: radial-gradient(circle at 50% 0%, rgba(255, 176, 46, .25), transparent 60%); }
.legend-burst { position: absolute; left: 50%; top: -10px; font-size: 80px; transform: translateX(-50%); animation: burst 1.2s infinite; pointer-events: none; opacity: .7; }
@keyframes burst { 50% { transform: translateX(-50%) scale(1.3) rotate(20deg); opacity: 1; } }
.rsheet { text-align: center; } .rsheet .rar { color: var(--rar); font-weight: 800; margin-bottom: 6px; }

/* ---------- прокачка / персонал ---------- */
.regs { display: flex; flex-direction: column; gap: 6px; }
.reg { display: flex; align-items: center; gap: 8px; font-size: 12.5px; opacity: .45; } .reg.on { opacity: 1; }
.reg span:last-child { color: var(--muted); margin-left: auto; text-align: right; font-size: 11px; }
.mode-card .checks { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.chk { font-size: 12px; padding: 3px 8px; border-radius: 8px; background: var(--bg2); color: var(--muted); } .chk.on { color: var(--ok); }
.staff-card.hired { border-color: #2f6b52; }
.sico { width: 46px; height: 46px; border-radius: 14px; background: var(--bg2); display: grid; place-items: center; font-size: 26px; flex-shrink: 0; }
.staff-card .tag { margin-left: 6px; }
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.tier { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; }
.tier b { font-size: 13px; } .tier span { color: var(--accent); font-weight: 700; } .tier i { font-style: normal; color: var(--muted); font-size: 10.5px; }
.tier:not(:disabled) { border-color: var(--accent); }
.tier.owned { background: #1d4a37; border-color: var(--ok); opacity: 1; filter: none; } .tier.owned span { color: var(--ok); }
.tier:disabled:not(.owned) { opacity: .45; }

/* ---------- рецепты ---------- */
.target-card .hint { margin-top: 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.recipe { position: relative; background: var(--card); border: 2px solid color-mix(in srgb, var(--rar) 45%, transparent); border-radius: 14px; padding: 10px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; font-size: 13px; }
.recipe .ricon { font-size: 30px; } .recipe .rar { color: var(--rar); } .recipe .rsub { font-size: 12px; color: var(--muted); }
.recipe.menu, .recipe.frag { opacity: .75; } .recipe.menu .ricon, .recipe.frag .ricon { filter: grayscale(.8); }
.recipe.target { box-shadow: 0 0 0 2px var(--accent); opacity: 1; }
.recipe.r-legendary.open { background: linear-gradient(160deg, #3d2f12, var(--card)); }
.rbar { width: 80%; height: 5px; background: var(--bg2); border-radius: 3px; overflow: hidden; } .rbar span { display: block; height: 100%; background: var(--rar); }

/* ---------- сеть ---------- */
.net-card .big { color: var(--accent); }
.place-card .bldsvg { margin-bottom: 8px; }
.place-card.active { border-color: var(--accent); }
.place-card.locked { opacity: .5; }
.req { font-size: 13px; color: var(--bad); margin-top: 4px; } .req.ok { color: var(--ok); }

/* ---------- ещё ---------- */
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-top: 10px; }
.day { background: var(--bg2); border-radius: 10px; padding: 6px 2px; text-align: center; font-size: 10.5px; color: var(--muted); }
.day b { display: block; color: var(--text); font-size: 11px; } .day i { font-style: normal; display: block; }
.day.got { background: #1d4a37; color: var(--ok); } .day.next { outline: 2px solid var(--accent); }
.rank { width: 28px; text-align: center; font-weight: 700; color: var(--muted); }
.rank.r1 { color: #ffd25e; } .rank.r2 { color: #d5d9f0; } .rank.r3 { color: #e19a5b; }
.toggle { width: 50px; height: 30px; border-radius: 15px; background: var(--line); position: relative; flex-shrink: 0; }
.toggle::after { content: ''; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: .2s; }
.toggle.on { background: var(--ok); } .toggle.on::after { left: 23px; }

/* ---------- вкладки ---------- */
.tabs { display: grid; grid-template-columns: repeat(6, 1fr); background: var(--bg2); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + var(--safe-b)); }
.tabs button { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10.5px; color: var(--muted); padding: 4px 0; border-radius: 10px; }
.tabs button span { font-size: 20px; }
.tabs button i { font-style: normal; }
.lang-seg { margin: 0; min-width: 170px; }
.tabs button.active { color: var(--text); background: var(--card); }

/* ---------- заказ ждёт игрока ---------- */
.table.needs-you { border-color: var(--warn); animation: glowWarn 1.2s infinite; }
@keyframes glowWarn { 50% { box-shadow: 0 0 16px rgba(255, 176, 46, .45); } }
.tstate .need { color: #ffd27a; font-weight: 700; }

/* ---------- рекламные места ---------- */
.adhint { margin-top: 10px; display: flex; align-items: center; gap: 10px; background: linear-gradient(135deg, #2e2552, #3a2b1e); border: 1px solid #5c4a85;
  border-radius: 14px; padding: 10px 12px; animation: fade .25s; }
.adhint .grow { font-size: 13px; }
.adhint-btns { display: flex; flex-direction: column; gap: 6px; }
.adhint .x { color: var(--muted); font-size: 16px; padding: 4px; }
.btn.small { padding: 7px 10px; font-size: 13px; border-radius: 10px; }
.mini-ad { position: absolute; top: 6px; left: 6px; z-index: 3; font-size: 11px; font-weight: 800; padding: 3px 7px; border-radius: 8px;
  background: #5c4a85; color: #fff; animation: pulse 1.2s infinite; }
.trial-tag { color: #cbb8ff; }
.fakead { position: fixed; inset: 0; z-index: 70; background: rgba(8, 6, 14, .92); display: grid; place-items: center; }
.fakead[hidden] { display: none !important; }
.fa-box { width: min(86vw, 340px); background: var(--bg2); border: 1px solid var(--line); border-radius: 20px; padding: 22px 18px; text-align: center; position: relative; }
.fa-tag { position: absolute; top: 10px; right: 12px; font-size: 10px; font-weight: 900; color: #2a1300; background: var(--warn); padding: 2px 6px; border-radius: 6px; }
.fa-ico { font-size: 54px; } .fa-count { font-size: 40px; font-weight: 900; color: var(--accent); margin: 8px 0 2px; }
.fa-box .btn { margin-top: 12px; }

#toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px); background: #3a3352; padding: 10px 16px;
  border-radius: 12px; opacity: 0; transition: .25s; pointer-events: none; width: max-content; max-width: min(90vw, 440px); text-align: center; z-index: 60; }
#toast.show { opacity: 1; transform: translateX(-50%); }
.float { position: fixed; pointer-events: none; font-weight: 800; font-size: 24px; color: var(--ok); transform: translateX(-50%);
  text-shadow: 0 2px 8px rgba(0, 0, 0, .5); animation: rise .9s ease-out forwards; z-index: 55; }
@keyframes rise { to { margin-top: -90px; opacity: 0; } }
.fatal { padding: 40px 20px; text-align: center; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.tabs button { position: relative; }
.tbadge { position: absolute; top: 0; right: calc(50% - 22px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #ff5a4e; color: #fff; font-size: 10.5px; font-weight: 800; line-height: 17px; text-align: center; font-style: normal; box-shadow: 0 0 0 2px var(--bg, #14121f); }
.tbadge[hidden] { display: none; }
[data-ugroup].has-new { position: relative; }
[data-ugroup].has-new::after { content: ''; position: absolute; top: 3px; right: 3px; width: 8px; height: 8px; border-radius: 50%; background: #ff5a4e; }
#toast.tappable { pointer-events: auto; cursor: pointer; }
.recipe { position: relative; }
.newtag { position: absolute; top: 6px; right: 6px; background: #ff5a4e; color: #fff; font-size: 9.5px; font-weight: 800; padding: 1px 5px; border-radius: 6px; letter-spacing: .3px; }
[data-more].has-new { position: relative; }
[data-more].has-new::after { content: ''; position: absolute; top: 3px; right: 3px; width: 8px; height: 8px; border-radius: 50%; background: #ff5a4e; }
.dish-icon { position: relative; display: block; width: max-content; margin: 0 auto; text-align: center; font-size: min(42vw, 170px); line-height: 1.15; animation: pop .4s; }
.asm-base .dish-icon { font-size: 110px; }
.dish-icon b { font-weight: normal; }
.dish-icon.dark b { filter: brightness(.5) saturate(.5) contrast(1.2); }
.dish-badge { position: absolute; right: -.12em; bottom: .02em; font-size: .38em; font-style: normal; filter: drop-shadow(0 2px 4px rgba(0,0,0,.6)); }
.dish-icon.inline { display: inline-block; font-size: inherit; line-height: inherit; margin: 0; animation: none; vertical-align: baseline; }
.dish-icon.inline .dish-badge { font-size: .5em; right: -.2em; bottom: -.05em; }
.table.closed { opacity: .55; border-style: dashed; text-align: center; } .table.closed .muted { font-size: 12px; padding: 0 8px; }
/* подсказка «как играть» в мини-играх */
.demo { position: absolute; inset: 0; pointer-events: none; display: grid; place-items: center; z-index: 3; }
.demo-hand { font-size: 46px; filter: drop-shadow(0 4px 8px rgba(0,0,0,.6)); }
.demo.updown .demo-hand { animation: demo-updown 1s ease-in-out infinite; }
.demo.tap .demo-hand { animation: demo-tap .8s ease-in-out infinite; }
.demo.hold .demo-hand { animation: demo-hold 1.8s ease-in-out infinite; }
.demo-text { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); width: max-content; max-width: 92%; text-align: center; background: rgba(20, 18, 31, .88); color: #fff; font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px; }
@keyframes demo-updown { 0%, 100% { transform: translateY(-45px); } 50% { transform: translateY(45px); } }
@keyframes demo-tap { 0%, 100% { transform: translateY(-14px); } 45% { transform: translateY(6px) scale(.9); } }
@keyframes demo-hold { 0% { transform: translateY(-16px); } 25%, 75% { transform: translateY(4px) scale(.88); } 100% { transform: translateY(-16px); } }
.item.inactive .ico, .item.inactive .t, .item.inactive .d:not(.warn) { opacity: .5; }
.item .d.you { color: var(--text, #fff); }
.coins { cursor: pointer; position: relative; background: none; border: 0; color: inherit; font-family: inherit; padding: 0; }
.coins-plus { font-style: normal; margin-left: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent, #ffb02e); color: #1b1826; font-size: 15px; font-weight: 900; line-height: 20px; text-align: center; display: inline-block; }
.tier.locked span { font-size: 12px; color: var(--muted); font-weight: 600; }
