

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body, #root { height: 100%; }
body { overflow: hidden; font-family: 'Vazirmatn', system-ui, sans-serif; background: #2a1810; color: #3a2414; }
canvas { display: block; touch-action: none; }
button { font-family: inherit; cursor: pointer; border: none; }
img { user-select: none; -webkit-user-drag: none; }

.stage { position: fixed; inset: 0; display: flex; justify-content: center; background: radial-gradient(circle at 50% 30%, #7a4a26, #22130b); }
.frame { position: relative; height: 100%; width: min(100vw, 62vh); overflow: hidden; background: #e9c995; box-shadow: 0 0 60px #0008; }

/* world labels */
.city-tag { display: flex; flex-direction: column; align-items: center; background: linear-gradient(#fff4dc, #f1d49b); border: 2px solid #b5782d; color: #4a2a10; border-radius: 12px; padding: 0 10px; font-weight: 800; font-size: 13px; line-height: 1.7; white-space: nowrap; box-shadow: 0 3px 0 #7a4a1c; cursor: pointer; }
.city-tag.locked { background: #3d2a20d9; color: #f4dfb8; border-color: #6b4c35; box-shadow: none; }
.city-tag.locked small { color: #ffd257; font-size: 10px; line-height: 1.4; }
.city-tag.bought { border-color: #1fa5a0; }
.route-tag { background: #2b1c12cc; color: #ffd98a; font-size: 10px; padding: 0 6px; border-radius: 8px; white-space: nowrap; line-height: 1.8; }
.car-tag { display: flex; align-items: center; gap: 2px; background: #1d4f63e6; color: #fff; font-size: 11px; font-weight: 700; padding: 0 6px; border-radius: 10px; white-space: nowrap; line-height: 1.7; cursor: pointer; }
.car-tag img { width: 16px; height: 16px; }
.car-tag.on { background: #e0a326; color: #2a1608; }

/* HUD */
.hud { position: absolute; inset: 0; pointer-events: none; z-index: 20; direction: rtl; }
.hud > * { pointer-events: auto; }
.topbar { position: absolute; top: calc(env(safe-area-inset-top) + 8px); inset-inline: 8px; display: flex; gap: 8px; align-items: stretch; }
.gold { flex: 1; display: flex; align-items: center; gap: 6px; background: linear-gradient(#3b2416ee, #26160cee); border: 2px solid #c8933a; border-radius: 14px; padding: 4px 8px; color: #ffe2a0; min-width: 0; }
.gold img { width: 36px; height: 36px; }
.gcol { flex: 1; min-width: 0; line-height: 1.3; }
.gcol b { font-size: 18px; }
.gcol small { font-size: 10px; opacity: .8; }
.bar { height: 7px; background: #0006; border-radius: 6px; overflow: hidden; margin: 2px 0; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffd257, #1fd0b8); border-radius: 6px; transition: width .3s; margin-inline-start: auto; }
.bar.big { height: 10px; }
.days { display: flex; flex-direction: column; align-items: center; justify-content: center; background: linear-gradient(#1d5d6e, #123a47); border: 2px solid #59c7c0; color: #e9fffb; border-radius: 14px; padding: 0 10px; line-height: 1.3; }
.days b { font-size: 18px; }
.days small { font-size: 10px; }
.days.warn { background: linear-gradient(#a33a1f, #6d2010); border-color: #ff9e7a; animation: pulse 1s infinite; }
.pausebtn { width: 52px; background: none; padding: 0; }
.pausebtn img { width: 52px; height: 52px; }
@keyframes pulse { 50% { transform: scale(1.06); } }

.toasts { position: absolute; top: calc(env(safe-area-inset-top) + 76px); inset-inline: 12px; display: flex; flex-direction: column; gap: 4px; align-items: center; pointer-events: none !important; }
.toast { background: #2a1a10e0; color: #fff1d0; padding: 2px 14px; border-radius: 20px; font-size: 13px; line-height: 1.8; animation: tin .25s ease-out; text-align: center; overflow-wrap: anywhere; }
.toast.bad { background: #8e2a16ee; }
.toast.good { background: #16736ce8; }
.toast.gold { background: #b07a1aee; }
@keyframes tin { from { transform: translateY(-10px) scale(.9); opacity: 0; } }
.floats { position: absolute; inset-inline: 0; bottom: 330px; display: flex; justify-content: center; pointer-events: none !important; }
.float { position: absolute; font-size: 30px; font-weight: 900; animation: fup 1.3s ease-out forwards; text-shadow: 0 2px 0 #0007; }
.float.g { color: #ffd84a; } .float.b { color: #ff6a4a; }
@keyframes fup { from { transform: translateY(20px) scale(.6); opacity: 1; } 30% { transform: translateY(0) scale(1.2); } to { transform: translateY(-70px); opacity: 0; } }

.panel { position: absolute; bottom: 0; inset-inline: 0; padding: 8px 8px calc(env(safe-area-inset-bottom) + 8px); background: linear-gradient(#f8ead0f2, #ecd2a2f7); border-top: 3px solid #b5782d; border-radius: 18px 18px 0 0; box-shadow: 0 -6px 20px #0004; }
.tut { position: absolute; bottom: 100%; margin-bottom: 8px; inset-inline: 8px; background: #fffaf0; border: 2px solid #1fa5a0; border-radius: 14px; padding: 6px 10px; font-size: 13px; line-height: 1.8; color: #2a3f3f; animation: tin .3s; box-shadow: 0 4px 12px #0003; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.chip { flex: none; display: flex; align-items: center; gap: 4px; background: #fff7e6; border: 2px solid #d3ac6a; border-radius: 12px; padding: 0 8px 0 4px; font-size: 12px; font-weight: 700; color: #5a3416; min-height: 36px; }
.chip img { width: 28px; height: 28px; }
.chip.on { background: #ffd56a; border-color: #a0661b; }
.chip.add { background: #1fa5a0; color: #fff; border-color: #127570; padding: 0 10px; }
.dot { width: 8px; height: 8px; border-radius: 50%; } .dot.green { background: #2ab35a; } .dot.amber { background: #e59a1c; } .dot.red { background: #e2321e; animation: pulse .4s infinite; }
.market .mhead { display: flex; justify-content: space-between; font-size: 14px; color: #5a3416; line-height: 1.7; }
.row { display: flex; align-items: center; gap: 6px; background: #fffaf0b0; border-radius: 12px; padding: 2px 6px; margin-top: 4px; }
.row img { width: 36px; height: 36px; }
.nm { flex: 1; min-width: 0; line-height: 1.35; display: flex; flex-direction: column; }
.nm b { font-size: 14px; } .nm small { font-size: 11px; color: #85633f; }
.pr { font-weight: 900; font-size: 17px; min-width: 54px; text-align: center; color: #5a3416; }
.pr small { font-size: 10px; margin-inline-start: 2px; }
.pr.up small { color: #c0391b; } .pr.dn small { color: #178a54; }
.sb, .bb { min-height: 40px; border-radius: 10px; font-weight: 800; transition: transform .08s; }
.sb { background: #c2562e; color: #fff; padding: 0 10px; font-size: 13px; box-shadow: 0 3px 0 #7d3015; }
.bb { background: #1fa5a0; color: #fff; width: 44px; font-size: 22px; box-shadow: 0 3px 0 #11706b; }
.sb:disabled, .acts button:disabled { opacity: .4; }
.sb:active, .bb:active, .acts button:active, .btn-main:active, .chip:active { transform: translateY(2px) scale(.96); }
.acts { display: flex; gap: 6px; margin-top: 6px; }
.acts button { flex: 1; min-height: 42px; border-radius: 12px; background: #6b3f1d; color: #ffe8bf; font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; gap: 4px; box-shadow: 0 3px 0 #3d220d; }
.acts img { width: 24px; height: 24px; }
.hint { text-align: center; font-size: 11px; color: #8a6640; margin-top: 4px; line-height: 1.7; }
.travel { display: flex; flex-direction: column; gap: 4px; padding: 6px 4px; line-height: 1.7; font-size: 14px; }
.travel small { font-size: 12px; color: #7a5a38; }
.fight { display: flex; gap: 10px; align-items: center; color: #8e2a16; animation: pulse .5s infinite; }
.fight img { width: 56px; height: 56px; }
.fight div { display: flex; flex-direction: column; }

/* overlays */
.overlay { position: absolute; inset: 0; background: #1a0e07a8; display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 30; animation: fin .2s; }
@keyframes fin { from { opacity: 0; } }
.dialog { width: 100%; max-width: 340px; background: url(/assets/panel_frame.webp) center/100% 100% no-repeat, linear-gradient(#fbefd6, #efd29c); border-radius: 22px; border: 3px solid #b5782d; padding: 22px 20px; text-align: center; line-height: 1.8; color: #4a2a10; animation: pop .3s cubic-bezier(.3,1.6,.6,1); }
@keyframes pop { from { transform: scale(.7); opacity: 0; } }
.dialog h3 { font-size: 21px; font-weight: 900; }
.dialog p { font-size: 14px; margin-top: 4px; }
.dialog .small { font-size: 12px; color: #7a5a38; }
.dimg { width: 110px; height: 110px; object-fit: contain; margin: -10px auto 0; }
.drow { display: flex; gap: 8px; margin-top: 14px; } .drow > * { flex: 1; }
.dcol { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.btn-main { min-height: 52px; border-radius: 16px; background: url(/assets/btn_primary.webp) center/100% 100% no-repeat, linear-gradient(#ffcf5a, #d98b1c); color: #3a1d06; font-size: 18px; font-weight: 900; padding: 0 24px; box-shadow: 0 4px 0 #8a5212; }
.btn-sec { min-height: 44px; border-radius: 14px; background: #fff6e2; color: #6b3f1d; border: 2px solid #c8933a; font-size: 15px; font-weight: 700; }
.rstars { display: flex; justify-content: center; gap: 6px; margin: 6px 0; }
.rstars img { width: 64px; height: 64px; }
.rstars img.off { filter: grayscale(1) brightness(.6); opacity: .5; }
.rstars img.pop { animation: spop .5s cubic-bezier(.3,1.8,.5,1) both; }
.rstars img:nth-child(2) { transform: translateY(-10px); width: 76px; height: 76px; }
@keyframes spop { from { transform: scale(0) rotate(-90deg); } }

/* intro */
.intro { position: absolute; inset: 0; z-index: 25; overflow-y: auto; direction: rtl; }
.intro-bg { position: absolute; inset: 0; background: url(/assets/title_bg.webp) center/cover; }
.intro-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(#0000 20%, #2a1608cc 75%); }
.intro-inner { position: relative; display: flex; flex-direction: column; align-items: center; padding: 24px 16px; gap: 6px; min-height: 100%; }
.logo { width: min(56vw, 210px); animation: bob 3s ease-in-out infinite; filter: drop-shadow(0 8px 12px #0006); }
@keyframes bob { 50% { transform: translateY(-8px); } }
.intro h1 { font-size: 26px; font-weight: 900; color: #fff3d6; text-shadow: 0 3px 0 #6b3a12, 0 0 16px #0008; text-align: center; line-height: 1.6; }
.motto { color: #ffe3a6; font-size: 14px; text-shadow: 0 2px 4px #000a; }
.intro .btn-main { margin: 10px 0; min-width: 200px; animation: pulse 1.6s infinite; }
.levels { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 6px; }
.lvl { display: grid; grid-template-columns: 34px 1fr auto; grid-template-rows: auto auto; align-items: center; column-gap: 8px; background: #fff3dbee; border: 2px solid #c8933a; border-radius: 14px; padding: 4px 10px; text-align: start; line-height: 1.5; color: #4a2a10; }
.lvl b { grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; background: #1fa5a0; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.lt { font-weight: 800; font-size: 14px; } .lg { font-size: 11px; color: #85633f; grid-column: 2; }
.ls { grid-row: 1 / span 2; grid-column: 3; display: flex; }
.ls img { width: 22px; height: 22px; } .ls img.off { filter: grayscale(1); opacity: .35; }
.lvl.lock { opacity: .5; filter: grayscale(.6); }

.loading { position: absolute; inset: 0; z-index: 40; background: radial-gradient(circle, #6b3f1d, #22130b); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: #ffe3a6; direction: rtl; padding: 30px; }
.loading img { width: 160px; }
.loading .bar { width: 70%; }

/* SAZITO_PLATFORM_CONTAINER_FIX_SCRUM_4531 */
/* No author .container rule found; Tailwind's built-in .container
   utility never had a phone gutter in EITHER preview or a real build
   (width:100% + breakpoint max-width, no padding/margin, ever) — see
   platformContainerFix.ts for the full mechanism, verified both ways.
   Scoped to @layer components (not unlayered) so a REAL utility class the
   author DID apply — e.g. class="container px-8" — still wins: Tailwind's
   own @layer utilities (publish) and its unlayered runtime injection
   (preview) both outrank @layer components; this default only applies
   when nothing else sets padding/margin at all. */
@layer components {
  .container {
    margin-inline: auto;
    padding-inline: 1rem;
  }
  @media (min-width: 640px) {
    .container {
      padding-inline: 1.5rem;
    }
  }
}
