/* =========================================================================
   سرقفلی — styles. Right-to-left. Stage is a fixed 1280×720 canvas scaled to the window.
   Use logical properties (inline-start = right in RTL) for anything directional.
   ========================================================================= */
:root {
  /* «کاشیِ اصفهان روی چوبِ گردو»: one palette for the whole game.
     walnut (surfaces) · saffron gold (accent, money) · turquoise (good) · lapis (info, rare) · pomegranate (danger) · cream (paper, text).
     Only legendary items step outside it (royal violet). */
  --brick: #52331f; --brick-d: #2a180e;
  --wood: #6b452b; --wood-d: #3c2415; --wood-l: #8a5d3c;
  --saffron: #e0a92e; --gold: #ecc25a; --turq: #26a8a4; --turq-d: #14686a;
  --lapis: #1d4a96; --lapis-l: #4f83c9;
  --pome: #b02a1f; --green: #26a8a4;
  --paper: #f6ecd6; --paper-d: #e6d6b2; --ink: #2a180e; --cream: #f6ecd6;
  --good: #97ddd7; --bad: #eea093;
  --legend: #a83cff; --legend-2: #ff5fb0;
  --f-display: 'Lalezar', 'Vazirmatn', system-ui, sans-serif;
  --f-body: 'Vazirmatn', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  --f-nastaliq: 'Noto Nastaliq Urdu', 'Vazirmatn', serif;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; overflow: hidden; background: #0e0805; color: var(--cream);
  font-family: var(--f-body); user-select: none; -webkit-user-select: none; direction: rtl;
}
#stage {
  position: absolute; left: 50%; top: 50%; width: 1280px; height: 720px; transform-origin: center;
  overflow: hidden; background: var(--brick-d); box-shadow: 0 0 80px #000;
}
.screen { position: absolute; inset: 0; }
#fx { position: absolute; inset: 0; pointer-events: none; z-index: 50; }
#coach { position: absolute; inset: 0; pointer-events: none; z-index: 55; }
#modal {
  position: absolute; inset: 0; z-index: 60; display: none; align-items: center; justify-content: center;
  background: rgba(14, 8, 5, .72); backdrop-filter: blur(2px);
}
#modal.open { display: flex; }
#muteBtn, .icon-btn {
  width: 36px; height: 36px; border-radius: 8px; cursor: pointer; font-size: 16px; color: var(--cream);
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(244, 216, 140, .3); flex: none;
}
#muteBtn { position: absolute; top: 12px; left: 10px; z-index: 70; }
#muteBtn:hover, .icon-btn:hover { background: rgba(255, 255, 255, .16); }

.num { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.nastaliq { font-family: var(--f-nastaliq); line-height: 2.1; }
.muted { opacity: .7; }
.small { font-size: 12px; }
.warn { color: #eea093; font-weight: 800; }
.good-txt { color: var(--good); }
.neg, .neg .num { color: #eea093 !important; }
b { font-weight: 800; }

.era-chip {
  display: inline-block; background: var(--era); color: #fff; border-radius: 6px; padding: 0 7px; font-size: 12px;
  font-weight: 700; line-height: 1.6; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .2); white-space: nowrap;
}

/* ---------------- buttons ---------------- */
.btn {
  font-family: var(--f-body); font-weight: 800; font-size: 16px; color: var(--ink); cursor: pointer;
  background: linear-gradient(#ecc25a, #e0a92e); border: 2px solid #6b452b; border-radius: 10px; padding: 8px 18px;
  box-shadow: 0 4px 0 #6b452b, 0 6px 14px rgba(0, 0, 0, .35); transition: transform .08s, box-shadow .08s, filter .15s;
  display: inline-block; text-align: center; line-height: 1.4;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #6b452b; }
.btn:disabled { filter: grayscale(.8) brightness(.65); cursor: not-allowed; transform: none; }
.btn small { display: block; font-weight: 600; font-size: 11px; opacity: .8; }
.btn.big { font-size: 20px; padding: 11px 28px; }
.btn.good { background: linear-gradient(#97ddd7, #26a8a4); border-color: #0f4e4c; color: #051f1f; box-shadow: 0 4px 0 #0f4e4c, 0 6px 14px rgba(0, 0, 0, .35); }
.btn.bad { background: linear-gradient(#e0705f, #b02a1f); border-color: #68150f; color: #fff; box-shadow: 0 4px 0 #68150f, 0 6px 14px rgba(0, 0, 0, .35); }
.btn.ghost { background: rgba(249, 233, 189, .08); color: var(--cream); border-color: rgba(249, 233, 189, .35); box-shadow: none; }
.btn.ghost:active { box-shadow: none; }

/* ---------------- shared bars & panels ---------------- */
.topbar, .hud {
  position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between;
  padding-inline: 16px 56px; background: linear-gradient(#2a180e, #1a0f09); border-bottom: 3px solid #9a6c14; z-index: 5;
}
.topbar { height: 64px; }
.hud { height: 60px; }
.tb-a, .tb-b, .hud-a, .hud-b { width: 410px; display: flex; gap: 14px; align-items: center; }
.tb-a, .tb-b { flex-direction: column; align-items: flex-start; gap: 3px; }
.tb-b { align-items: flex-end; }
.hud-b { justify-content: flex-end; }
.hud-stack { display: flex; flex-direction: column; gap: 3px; }
.tb-c, .hud-c { flex: 1; text-align: center; }
.tb-title { font-family: var(--f-display); font-size: 26px; color: var(--gold); line-height: 1.1; }
.tb-date, .hud .date { font-size: 12.5px; opacity: .85; }
.money { font-size: 15px; white-space: nowrap; display: flex; align-items: center; gap: 5px; }
.money b { font-family: var(--f-display); font-size: 26px; color: var(--gold); font-weight: normal; line-height: 1; }
.money .unit { opacity: .7; font-size: 13px; }
.aberu { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.aberu-label { font-size: 13px; opacity: .85; }
.pips i { display: inline-block; width: 8px; height: 13px; margin-inline-end: 2px; border-radius: 2px; background: rgba(255, 255, 255, .15); vertical-align: middle; }
.pips i.on { background: var(--turq); box-shadow: 0 0 6px var(--turq); }

.streak { display: flex; align-items: center; gap: 5px; font-size: 13px; white-space: nowrap; cursor: help; transition: filter .3s; }
.streak.cold { filter: grayscale(1) opacity(.55); }
.streak .flame { font-size: 15px; }
.streak .s-mult { font-weight: 800; color: var(--saffron); min-width: 44px; }
.s-pips i { display: inline-block; width: 6px; height: 9px; margin-inline-end: 2px; border-radius: 2px; background: rgba(255, 255, 255, .12); }
.s-pips i.on { background: linear-gradient(#f4d88c, #e0705f); box-shadow: 0 0 5px #e0705f; }
.streak.blazing .flame { animation: flicker .4s infinite alternate; }

.rentbar {
  position: relative; width: 300px; height: 22px; border-radius: 11px; overflow: hidden; background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(244, 216, 140, .25); display: flex; align-items: center; justify-content: center;
}
.rentbar-fill { position: absolute; inset-block: 0; inset-inline-start: 0; background: linear-gradient(90deg, #b02a1f, #e0705f); transition: width .4s; }
.rentbar.ok .rentbar-fill { background: linear-gradient(90deg, #1a8a88, #5cc6c0); }
.rentbar-txt { position: relative; font-size: 12px; font-weight: 700; text-shadow: 0 1px 2px #000; white-space: nowrap; }
.tals { display: flex; gap: 3px; }
.tal { font-size: 21px; cursor: help; }
.clock {
  position: relative; height: 18px; width: 380px; margin: 4px auto 0; background: rgba(255, 255, 255, .1);
  border-radius: 9px; overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.clock-fill { position: absolute; inset-block: 0; inset-inline-start: 0; background: linear-gradient(270deg, var(--gold), var(--saffron), var(--pome)); }
#clockTxt { position: relative; font-size: 12px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px #000; }

.panel { background: rgba(249, 233, 189, .06); border: 2px solid rgba(244, 216, 140, .18); border-radius: 14px; padding: 14px 18px; }
.panel h2 { font-family: var(--f-display); font-weight: normal; color: var(--gold); margin: 0 0 4px; font-size: 28px; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 14px; font-size: 13px; margin: 2px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); }
.chip.good { background: rgba(38, 168, 164, .3); border-color: #26a8a4; }
.chip.bad { background: rgba(176, 42, 31, .3); border-color: #b02a1f; }
.chip.plain { opacity: .6; }

.wall-tiles, .screen-title::after {
  background-color: var(--turq-d);
  background-image:
    radial-gradient(circle at 50% 50%, var(--turq) 0 20%, transparent 22%),
    linear-gradient(45deg, transparent 45%, var(--gold) 46% 54%, transparent 55%),
    linear-gradient(-45deg, transparent 45%, var(--gold) 46% 54%, transparent 55%);
  background-size: 26px 26px;
}

/* ---------------- title & intro ---------------- */
.screen-title { background: radial-gradient(ellipse at 38% 30%, #8a5d3c 0%, #3c2415 45%, #1a0f09 100%); }
.screen-title::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 26px; border-top: 3px solid var(--gold); }
.title-wrap { display: flex; height: 100%; align-items: center; padding: 0 70px 20px; gap: 30px; }
.title-haji { width: 400px; flex: none; filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .6)); animation: breathe 4s ease-in-out infinite; }
.title-main { flex: 1; text-align: center; }
.title-fa { font-family: var(--f-display); font-size: 170px; line-height: 1.05; color: var(--saffron); text-shadow: 0 5px 0 #6b452b, 0 12px 40px rgba(0, 0, 0, .6); }
.tagline { font-size: 22px; opacity: .85; margin: 0 0 26px; }
.title-btns { display: flex; gap: 14px; justify-content: center; align-items: center; }
.epigraph { margin-top: 30px; font-size: 21px; color: var(--paper); line-height: 1.9; }
.epigraph-by { font-size: 13px; opacity: .6; }
.meta-line { margin-top: 14px; font-size: 13px; opacity: .65; }
.demo-tag { position: absolute; right: 16px; top: 14px; font-size: 12px; opacity: .5; }

.screen-intro, .screen-week, .screen-haji, .screen-end { background: radial-gradient(ellipse at 50% 30%, #52331f, #2a180e 70%); }
.intro-card { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; text-align: center; padding: 0 150px; animation: fadeIn .5s; }
.intro-art { height: 270px; display: flex; align-items: center; justify-content: center; }
.ia-emoji { font-size: 80px; line-height: 1.3; direction: ltr; }
.ia-emoji.big { font-size: 150px; filter: drop-shadow(0 0 30px rgba(244, 216, 140, .5)); }
.ia-haji { width: 230px; animation: breathe 4s ease-in-out infinite; }
.ia-bazaar { display: flex; gap: 12px; align-items: flex-end; }
.ia-bazaar .arch { width: 110px; height: 210px; border-radius: 55px 55px 0 0; background: linear-gradient(#f4d88c, #c08b1f 55%, #3c2415); box-shadow: inset 0 0 0 8px #2a180e, inset 0 -40px 50px rgba(0, 0, 0, .55); }
.ia-bazaar .arch:nth-child(2), .ia-bazaar .arch:nth-child(3) { height: 250px; }
.ia-deed .deed-paper { width: 250px; padding: 18px; background: var(--paper); color: var(--ink); position: relative; transform: rotate(-3deg); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.deed-t { font-family: var(--f-display); font-size: 38px; }
.deed-name { margin-top: 30px; font-weight: 800; }
.deed-paper .stamp-svg { position: absolute; width: 96px; height: 96px; left: -24px; bottom: -24px; }
.intro-title { font-family: var(--f-display); font-size: 46px; color: var(--saffron); }
.intro-text { font-size: 25px; line-height: 1.8; max-width: 900px; margin: 6px 0; }
.haji-quote { background: rgba(0, 0, 0, .3); border-inline-start: 4px solid var(--saffron); padding: 10px 18px; margin: 8px 0; max-width: 860px; font-size: 20px; line-height: 1.8; }
.intro-hint { opacity: .5; font-size: 13px; margin-top: 16px; animation: blink 1.6s infinite; }
.dots { margin-top: 10px; display: flex; gap: 8px; }
.dots span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .25); }
.dots span.on { background: var(--saffron); }

/* ---------------- week intro ---------------- */
.week-card { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 820px; text-align: center; animation: fadeIn .4s; }
.week-num { font-family: var(--f-display); font-size: 72px; color: var(--gold); line-height: 1.15; }
.week-rent { font-size: 20px; }
.week-rent b { color: var(--gold); font-size: 24px; }
.infl { margin-top: 6px; font-size: 15px; opacity: .9; }
.infl.nowruz { color: #f7d0c8; }
.bulletin { background: var(--paper); color: var(--ink); border-radius: 6px; padding: 12px 18px; margin: 16px auto; text-align: start; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); transform: rotate(.6deg); }
.bulletin-head { font-weight: 800; border-bottom: 2px solid var(--ink); padding-bottom: 4px; margin-bottom: 6px; display: flex; justify-content: space-between; }
.rule { font-size: 19px; font-weight: 600; padding: 4px 0; }
.rule.old { font-size: 12.5px; opacity: .65; font-weight: 400; border-top: 1px dashed rgba(0, 0, 0, .2); margin-top: 4px; }
.badge { background: var(--pome); color: #fff; font-size: 11px; padding: 1px 7px; border-radius: 4px; vertical-align: middle; margin-inline-end: 4px; }
.haji-line { display: flex; align-items: center; gap: 16px; text-align: start; margin: 10px auto 22px; width: 680px; }
.mini-haji { width: 92px; flex: none; }
.hl-text { font-size: 19px; line-height: 1.8; }

/* ---------------- morning ---------------- */
.screen-morning, .screen-summary, .screen-peddler { background: radial-gradient(ellipse at 50% 0%, #52331f, #1a0f09 75%); }
.morning-grid { position: absolute; top: 80px; left: 20px; right: 20px; bottom: 100px; display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px; }
.morning-bottom { position: absolute; left: 20px; right: 20px; bottom: 16px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.morning-bottom .chips { flex: 1; }
.goal { background: rgba(224, 169, 46, .12); border: 1px solid rgba(224, 169, 46, .5); border-radius: 10px; padding: 8px 14px; font-size: 15px; max-width: 470px; }
.goal b { color: var(--gold); }
.envelopes { display: flex; gap: 20px; justify-content: center; margin: 14px 0 12px; }
.envelope {
  width: 120px; height: 150px; border-radius: 10px; border: 3px solid #6b452b; cursor: pointer; font-family: inherit;
  background: linear-gradient(135deg, #f9e9bd, #e0a92e); box-shadow: 0 6px 0 #6b452b, 0 10px 20px rgba(0, 0, 0, .4);
  display: flex; flex-direction: column; align-items: center; justify-content: center; transition: transform .15s;
}
.envelope:nth-child(1) { transform: rotate(4deg); }
.envelope:nth-child(3) { transform: rotate(-4deg); }
.envelope:hover { transform: translateY(-8px) rotate(1deg); }
.env-seal { width: 48px; height: 48px; border-radius: 50%; background: #8e1f16; color: #f4d88c; display: flex; align-items: center; justify-content: center; font-size: 26px; box-shadow: inset 0 0 0 3px #68150f; }
.env-fa { font-family: var(--f-nastaliq); font-size: 20px; color: #52331f; }
.falcard { width: 120px; height: 150px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 6px; animation: flipIn .45s; }
.falcard.good { background: linear-gradient(#f6ecd6, #97ddd7); color: #0a3534; border: 3px solid #26a8a4; }
.falcard.bad { background: linear-gradient(#f7d0c8, #eea093); color: #430d0a; border: 3px solid #b02a1f; }
.falcard.other { opacity: .35; transform: scale(.88); }
.falcard.chosen { transform: scale(1.06); box-shadow: 0 0 26px var(--gold); }
.fc-icon { font-size: 42px; }
.fc-name { font-weight: 800; font-size: 15px; line-height: 1.3; }
.fal-result { text-align: center; padding: 4px 12px 10px; border-radius: 10px; background: rgba(0, 0, 0, .25); border: 1px solid rgba(255, 255, 255, .1); }
.fal-result.good { border-color: rgba(38, 168, 164, .7); }
.fal-result.bad { border-color: rgba(176, 42, 31, .7); }
.verse { font-size: 19px; color: var(--paper); line-height: 1.95; }
.fal-effect { margin-top: 4px; font-size: 15px; }
.fal-skip { text-align: center; }
.crate-row { display: flex; gap: 22px; align-items: center; margin: 10px 0; }
.crate { font-size: 96px; line-height: 1; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .5)); }
.crate.opened { animation: bob .5s; }
.crate-buy { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.crate-price { font-size: 20px; }
.crate-price small { opacity: .6; font-size: 12px; }
.crate-log { max-height: 150px; overflow: auto; }
.crate-item { font-size: 14px; padding: 3px 0; border-bottom: 1px dashed rgba(255, 255, 255, .12); animation: fadeIn .4s; display: flex; justify-content: space-between; }
.crate-item b { color: var(--gold); }
.shelf-mini { margin-top: 10px; font-size: 24px; letter-spacing: 2px; padding: 6px 8px; background: rgba(0, 0, 0, .25); border-radius: 8px; min-height: 44px; }

/* ---------------- day ---------------- */
.screen-day { background: var(--brick-d); }
.day-main { position: absolute; top: 60px; left: 0; right: 0; height: 488px; display: flex; }

.queue-col { width: 170px; flex: none; background: linear-gradient(#2a180e, #1a0f09); border-inline-end: 3px solid #3c2415; display: flex; flex-direction: column; align-items: center; padding: 12px 8px; gap: 6px; }
.door { position: relative; width: 150px; height: 340px; flex: none; }
.door-arch { position: absolute; inset: 0; border-radius: 75px 75px 0 0; background: linear-gradient(#0e0805, #2a180e); box-shadow: inset 0 0 0 6px #6b452b, inset 0 0 0 9px #2a180e, 0 0 0 3px #8a5d3c; overflow: hidden; }
.door-light { position: absolute; left: 10%; top: 0; width: 80%; height: 100%; background: radial-gradient(ellipse at 50% 10%, rgba(244, 216, 140, .35), transparent 70%); }
.queue { position: absolute; top: 44px; left: 0; right: 0; display: flex; flex-direction: column; align-items: center; }
.q-person { position: relative; width: 80px; height: 72px; overflow: hidden; margin-top: -2px; animation: qIn .35s ease-out; }
.q-person svg { width: 80px; height: 93px; }
.q-person.official svg { filter: saturate(.4); }
.q-person.restless svg { animation: wobble .5s infinite; }
.q-icon { position: absolute; left: 0; bottom: 6px; font-size: 14px; background: rgba(0, 0, 0, .65); border-radius: 50%; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; }
.q-bar { position: absolute; bottom: 0; left: 14px; right: 14px; height: 4px; background: rgba(0, 0, 0, .65); border-radius: 2px; overflow: hidden; }
.q-bar b { display: block; height: 100%; width: 100%; background: #5cc6c0; }
.q-person.restless .q-bar b { background: #cc4535; }
.queue-label { font-size: 13px; opacity: .75; }
.day-chips { display: flex; flex-wrap: wrap; justify-content: center; }
.day-chips .chip { font-size: 10.5px; padding: 2px 6px; }

.counter-col {
  position: relative; flex: 1; display: flex;
  background:
    linear-gradient(rgba(0, 0, 0, .18), rgba(0, 0, 0, .3)),
    repeating-linear-gradient(0deg, transparent 0 22px, rgba(0, 0, 0, .28) 22px 24px),
    repeating-linear-gradient(90deg, transparent 0 46px, rgba(0, 0, 0, .2) 46px 48px),
    var(--brick);
}
.wall-tiles { position: absolute; left: 0; right: 0; top: 0; height: 16px; border-bottom: 2px solid var(--gold); }
.counter-top { position: absolute; left: 0; right: 0; bottom: 0; height: 12px; background: linear-gradient(var(--wood-l), var(--wood-d)); }
.cust-col { width: 250px; flex: none; display: flex; flex-direction: column; align-items: center; padding: 18px 10px 10px; position: relative; z-index: 1; }
.cust { width: 214px; text-align: center; position: relative; }
.cust.empty { visibility: hidden; }
.cust.enter { animation: custIn .35s ease-out; }
.cust.exit { animation: custOut .32s ease-in forwards; }
.portrait { width: 214px; height: 206px; }
.portrait svg { width: 100%; height: 100%; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .5)); }
.nameplate { margin-top: -12px; background: #2a180e; border: 2px solid #9a6c14; border-radius: 8px; padding: 1px 12px; font-size: 14px; position: relative; display: inline-block; white-space: nowrap; }
.patience { height: 10px; background: rgba(0, 0, 0, .45); border-radius: 5px; margin: 8px 8px 0; overflow: hidden; }
.patience-fill { height: 100%; width: 100%; background: #5cc6c0; transition: background .3s; }
.patience-fill.mid { background: #ecc25a; }
.patience-fill.low { background: #cc4535; }
.cust-actions { display: flex; flex-direction: column; gap: 9px; margin-top: 12px; width: 220px; }
.cust-actions .btn { width: 100%; }
.stamp-btn { font-size: 19px; }
.smoke { position: absolute; inset: -20px; background: radial-gradient(circle, rgba(246, 236, 214, .9), transparent 62%); animation: smoke 1s ease-out forwards; pointer-events: none; }

.desk-col { flex: 1; display: flex; flex-direction: column; padding-block: 20px 18px; padding-inline: 6px 16px; position: relative; z-index: 1; min-width: 0; }
.bubble {
  visibility: hidden; position: relative; background: #f9e9bd; color: var(--ink); border-radius: 14px; padding: 8px 16px;
  min-height: 48px; font-size: 17px; margin: 0 0 10px; box-shadow: 0 6px 16px rgba(0, 0, 0, .35); align-self: flex-start; max-width: 100%; line-height: 1.7;
}
.bubble::before { content: ''; position: absolute; right: -12px; top: 14px; border-top: 8px solid transparent; border-bottom: 8px solid transparent; border-left: 12px solid #f9e9bd; }
.bubble.show { visibility: visible; animation: pop .25s ease-out; }
.desk {
  flex: 1; border-radius: 14px; background: linear-gradient(#6b452b, #52331f); border: 4px solid #3c2415; padding: 8px;
  box-shadow: inset 0 0 0 3px rgba(244, 216, 140, .1), 0 10px 20px rgba(0, 0, 0, .4);
  display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; min-height: 0;
}
.idle-msg { text-align: center; opacity: .85; }
.idle-icon { font-size: 50px; }
.tip { margin-top: 10px; font-size: 14px; opacity: .8; max-width: 400px; line-height: 1.7; }

.want { text-align: center; }
.want-big { font-size: 92px; line-height: 1.1; animation: bob 1.1s ease-in-out infinite alternate; }
.want-label { font-size: 21px; }
.want-label b { color: var(--gold); }
.want p { margin: 6px 0 12px; }

.haggle { width: 100%; display: flex; flex-direction: column; gap: 8px; align-items: stretch; padding: 0 8px; }
.h-item { display: flex; gap: 12px; align-items: center; font-size: 17px; }
.h-item .emoji { font-size: 56px; line-height: 1; }
.meter { position: relative; height: 60px; border-radius: 10px; overflow: hidden; border: 3px solid #1a0f09; cursor: pointer; box-shadow: inset 0 2px 8px rgba(0, 0, 0, .4); }
.zone { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; color: rgba(0, 0, 0, .6); overflow: hidden; white-space: nowrap; }
.z-cheap { background: #c79d74; }
.z-fair { background: #5cc6c0; }
.z-sweet { background: linear-gradient(#f9e9bd, #e0a92e); color: #6b452b; font-size: 20px; }
.z-fair2 { background: #97ddd7; }
.z-greedy { background: repeating-linear-gradient(45deg, #cc4535 0 10px, #b02a1f 10px 20px); color: #fff; }
.needle { position: absolute; top: -4px; bottom: -4px; width: 6px; margin-inline-start: -3px; background: #1a0f09; box-shadow: 0 0 0 2px #fff; border-radius: 3px; }
.meter.locked .needle { background: #fff; box-shadow: 0 0 14px 4px #fff; }
.meter.lock-greedy { animation: shake .35s; }
.meter.lock-sweet { box-shadow: 0 0 24px 6px var(--gold); }
.h-scale { display: flex; justify-content: space-between; font-size: 11px; opacity: .55; margin-top: -4px; }
.h-readout { display: flex; justify-content: center; align-items: center; gap: 12px; min-height: 40px; }
.h-zone { padding: 0 12px; border-radius: 12px; font-weight: 800; font-size: 15px; color: var(--ink); }
.h-price { font-family: var(--f-display); font-size: 32px; color: var(--gold); }
.btn.deal { align-self: center; }
.haggle:has(.meter.locked) .deal { visibility: hidden; }

.offer { display: flex; gap: 20px; align-items: center; width: 100%; padding: 0 8px; }
.flip-card { width: 170px; height: 210px; perspective: 800px; cursor: pointer; position: relative; flex: none; }
.flip-card .face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 12px; transition: transform .45s;
  display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--ink); gap: 6px;
}
.face.front { background: radial-gradient(#f9e9bd, #f4d88c); border: 3px solid #8a5d3c; }
.face.front .emoji { font-size: 100px; line-height: 1.1; }
.face.front small { opacity: .6; }
.face.back { background: repeating-radial-gradient(circle at 50% 50%, #ecc25a 0 6px, #e0c29c 6px 12px); border: 3px dashed #8a5d3c; transform: rotateY(180deg); }
.flip-card.flipped .front { transform: rotateY(-180deg); }
.flip-card.flipped .back { transform: rotateY(0deg); }
.flip-card.shimmer .face { box-shadow: 0 0 0 3px #cc4535, 0 0 22px 4px rgba(204, 69, 53, .8); animation: shimmer 1s ease-in-out infinite alternate; }
.flip-card.busted .back { background: #f7d0c8; }
.sticker { background: #fff; color: #b02a1f; border: 2px solid #b02a1f; padding: 8px 12px; transform: rotate(7deg); text-align: center; box-shadow: 2px 3px 0 rgba(0, 0, 0, .25); display: flex; flex-direction: column; }
.sticker b { font-size: 18px; font-weight: 900; font-family: Arial, var(--f-body), sans-serif; }
.sticker small { font-size: 11px; color: #6b452b; }
.seal { text-align: center; }
.seal-ring { width: 104px; height: 104px; border-radius: 50%; border: 5px double #8e1f16; color: #8e1f16; display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 800; transform: rotate(8deg); margin: 0 auto 6px; background: rgba(142, 31, 22, .06); }
.seal small { font-size: 12px; opacity: .7; }
.offer-info { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.o-name { font-family: var(--f-display); font-size: 25px; color: var(--gold); line-height: 1.25; }
.o-row { font-size: 15px; }
.o-ask { font-size: 21px; margin-top: 4px; }
.o-ask b { color: var(--gold); }
.o-btns { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.o-btns .btn { padding: 7px 13px; }

.notice {
  position: relative; width: 372px; color: var(--ink); padding: 10px 16px 8px; border-radius: 3px; font-size: 14px;
  background: #f9e9bd linear-gradient(rgba(0, 0, 0, .035) 1px, transparent 1px); background-size: 100% 22px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45); animation: slideUp .3s ease-out;
}
.notice.nazar { box-shadow: 0 0 0 3px #cc4535, 0 0 30px 6px rgba(204, 69, 53, .8); }
.notice.nazar::after { content: '🧿'; position: absolute; top: -14px; left: -14px; font-size: 30px; }
.notice [data-hl] { cursor: help; border-radius: 4px; transition: background .12s; }
.notice [data-hl]:hover { background: rgba(224, 169, 46, .3); }
.n-top { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--ink); padding-bottom: 4px; }
.n-issuer { font-weight: 800; font-size: 15px; padding: 0 4px; }
.n-serial { font-size: 11px; opacity: .6; }
.n-title { text-align: center; font-family: var(--f-display); font-size: 26px; line-height: 1.3; }
.n-fee { text-align: center; background: rgba(0, 0, 0, .05); padding: 3px; font-weight: 800; font-size: 15px; }
.n-fields { width: 100%; margin: 6px 0; border-collapse: collapse; }
.n-fields td { padding: 2px 6px; border-bottom: 1px dotted rgba(0, 0, 0, .3); }
.n-fields td b { font-size: 17px; }
.n-fields td:last-child { text-align: left; }
.n-foot { display: flex; justify-content: space-between; align-items: flex-end; height: 84px; }
.n-stamp { width: 82px; height: 82px; }
.stamp-svg { width: 100%; height: 100%; display: block; }
.no-stamp { width: 78px; height: 78px; border: 2px dashed rgba(0, 0, 0, .12); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; color: rgba(0, 0, 0, .3); }
.n-sig { width: 140px; text-align: center; }
.sig-svg { width: 130px; height: 50px; }
.sig-line { border-top: 1px solid var(--ink); font-size: 10px; opacity: .7; }
.n-stamped { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.big-stamp { font-family: var(--f-display); font-size: 46px; padding: 2px 20px; border: 5px solid; border-radius: 8px; transform: rotate(-12deg); animation: stampIn .25s cubic-bezier(.2, 1.6, .5, 1); opacity: .88; text-align: center; line-height: 1.25; background: rgba(255, 255, 255, .25); }
.big-stamp span { display: block; font-size: 20px; }
.big-stamp.green { color: #14686a; border-color: #14686a; }
.big-stamp.red { color: #b02a1f; border-color: #b02a1f; }
.big-stamp.blue { color: #2a62b5; border-color: #2a62b5; }

.rulebook {
  width: 360px; flex: none; background: var(--paper); color: var(--ink); padding-block: 8px 10px; padding-inline: 16px 12px; overflow-y: auto;
  position: relative; font-size: 13px; border-inline-start: 6px solid #8e1f16; box-shadow: inset -8px 0 16px rgba(0, 0, 0, .15); line-height: 1.6;
}
.rulebook::-webkit-scrollbar { width: 6px; }
.rulebook::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, .25); border-radius: 3px; }
.rulebook.pulse { animation: rbPulse 1s ease-out; }
.rulebook .hl { background: #f9e9bd !important; box-shadow: 0 0 0 2px #e0a92e; border-radius: 4px; }
.rb-arts.hl-miss { box-shadow: 0 0 0 2px #b02a1f; border-radius: 4px; }
.rb-head { font-family: var(--f-display); font-size: 24px; color: #8e1f16; line-height: 1.3; }
.rb-today { background: var(--ink); color: var(--gold); padding: 1px 8px; border-radius: 4px; display: inline-block; font-size: 13px; transition: box-shadow .12s; }
.rb-today.hl { color: var(--ink); }
.rb-sec { font-weight: 800; font-size: 11.5px; color: #8e1f16; margin: 6px 0 2px; border-bottom: 1px solid rgba(0, 0, 0, .2); }
.rb-rules { margin: 0; padding-inline-start: 18px; }
.rb-rules li { margin: 1px 0; }
.rb-rules li.new { background: #f9e9bd; font-weight: 700; }
.rb-stamps { display: flex; justify-content: space-between; }
.rb-stamp { width: 104px; text-align: center; padding: 2px 0; }
.rb-stamp .stamp-svg { width: 56px; height: 56px; margin: 0 auto; }
.rb-issuer { font-size: 11px; line-height: 1.3; }
.rb-arts { width: 100%; border-collapse: collapse; }
.rb-arts td { padding: 1px 4px; border-bottom: 1px dotted rgba(0, 0, 0, .2); }
.rb-arts td.anum { font-weight: 800; white-space: nowrap; width: 82px; }
.rb-arts td.cap { font-weight: 800; text-align: left; white-space: nowrap; color: #8e1f16; }
.rb-eras { line-height: 1.7; }
.era-legend { display: flex; gap: 4px; margin-top: 4px; }

.shelf-wrap {
  position: absolute; left: 0; right: 0; bottom: 0; height: 172px; display: flex; align-items: center; padding: 0 14px; gap: 12px;
  background: linear-gradient(#52331f, #3c2415); border-top: 6px solid var(--wood-l); box-shadow: inset 0 10px 20px rgba(0, 0, 0, .4);
}
.shelf-label { width: 72px; flex: none; font-family: var(--f-display); font-size: 24px; color: var(--gold); text-align: center; line-height: 1.3; }
#shelfCount { display: block; font-family: var(--f-body); font-size: 13px; color: var(--cream); }
.shelf { flex: 1; display: grid; grid-template-columns: repeat(10, 1fr); gap: 10px; }
.slot {
  height: 136px; border-radius: 12px; background: linear-gradient(#f9e9bd, #ecc25a); color: var(--ink); position: relative; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 3px solid #8a5d3c;
  box-shadow: 0 6px 0 #2a180e; transition: transform .12s, opacity .2s;
}
.slot:hover { transform: translateY(-4px); }
.slot .emoji { font-size: 54px; line-height: 1.1; pointer-events: none; }
.slot .era-chip { pointer-events: none; }
.s-val { position: absolute; top: 4px; left: 4px; background: var(--ink); color: var(--gold); font-size: 11.5px; font-weight: 800; padding: 0 6px; border-radius: 8px; pointer-events: none; }
.slot.empty { background: rgba(0, 0, 0, .2); border: 2px dashed rgba(244, 216, 140, .15); box-shadow: none; cursor: default; }
.slot.empty:hover { transform: none; }
.slot.match { animation: glow .8s ease-in-out infinite alternate; border-color: var(--gold); }
.slot.dim { opacity: .45; }
.slot.reserved { opacity: .2; transform: scale(.92); }
.slot.shake { animation: shake .3s; }

.blackout { position: absolute; left: 0; right: 0; top: 60px; bottom: 0; pointer-events: none; z-index: 4; }
.blackout.on { background: radial-gradient(ellipse at 55% 42%, transparent 22%, rgba(8, 21, 48, .62) 72%); }
.blackout.candle { background: radial-gradient(ellipse at 55% 42%, rgba(236, 194, 90, .07) 30%, rgba(8, 21, 48, .3) 78%); }
.screen.hurt { animation: hurtShake .32s; }
.screen.hurt::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 40; box-shadow: inset 0 0 140px rgba(204, 69, 53, .6); animation: hurtFlash .55s forwards; }

/* ---------------- summary ---------------- */
.summary-grid { position: absolute; top: 84px; left: 20px; right: 20px; bottom: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.sum-row { display: flex; justify-content: space-between; padding: 7px 4px; border-bottom: 1px dashed rgba(249, 233, 189, .2); font-size: 17px; }
.sum-row.good b { color: var(--good); }
.sum-row.bad b { color: var(--bad); }
.sum-row.muted { opacity: .6; }
.audit { margin-top: 14px; padding: 10px 12px; border-radius: 10px; font-size: 14px; line-height: 1.8; }
.audit.bad { background: rgba(176, 42, 31, .2); border: 1px solid rgba(176, 42, 31, .6); }
.audit.ok { background: rgba(38, 168, 164, .15); border: 1px solid rgba(38, 168, 164, .5); }
.audit ul { margin: 4px 0 0; padding-inline-start: 18px; }
.bill {
  display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 10px; margin: 8px 0; cursor: pointer;
  background: rgba(255, 255, 255, .06); border: 2px solid rgba(255, 255, 255, .12); transition: background .15s, border-color .15s;
}
.bill:hover { background: rgba(255, 255, 255, .1); }
.bill.on { border-color: #26a8a4; background: rgba(38, 168, 164, .15); }
.bill.off { border-color: #b02a1f; background: rgba(176, 42, 31, .12); }
.bill .check { width: 26px; height: 26px; flex: none; border-radius: 6px; border: 2px solid currentColor; display: flex; align-items: center; justify-content: center; font-weight: 900; }
.b-icon { font-size: 26px; }
.b-name { flex: 1; display: flex; flex-direction: column; font-size: 17px; }
.b-name small { opacity: .7; font-size: 12px; }
.b-amt { font-size: 17px; }
.bill-total { display: flex; justify-content: space-between; font-size: 20px; margin: 10px 0; padding-top: 10px; border-top: 2px solid rgba(249, 233, 189, .3); }
.rent-warn, .rent-note { background: rgba(224, 169, 46, .12); border: 1px solid rgba(224, 169, 46, .6); padding: 7px 12px; border-radius: 8px; margin-bottom: 12px; font-size: 15px; }
.rent-note { opacity: .85; border-style: dashed; }
.bills-panel .btn.big { width: 100%; }

/* ---------------- haji visit ---------------- */
.haji-scene { position: absolute; inset: 0; display: flex; align-items: center; padding: 30px 50px 30px 60px; gap: 40px; }
.haji-portrait { width: 400px; flex: none; position: relative; filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .6)); animation: breathe 4s ease-in-out infinite; }
.tea { position: absolute; bottom: 0; left: -10px; font-size: 54px; }
.haji-right { flex: 1; min-width: 0; }
.haji-name { font-family: var(--f-display); font-size: 40px; color: var(--gold); }
.haji-talk { display: flex; gap: 18px; align-items: center; }
.dialog { flex: 1; background: var(--paper); color: var(--ink); padding: 16px 22px; border-radius: 12px; margin: 12px 0; position: relative; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); animation: pop .3s; font-size: 21px; line-height: 1.9; }
.dialog::before { content: ''; position: absolute; right: -14px; top: 30px; border-top: 10px solid transparent; border-bottom: 10px solid transparent; border-left: 14px solid var(--paper); }
.rent-box { font-size: 19px; margin: 10px 0; }
.rent-box b { color: var(--gold); }
.haji-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.haji-stats { margin-top: 22px; display: flex; gap: 20px; align-items: center; opacity: .85; }
.deed-doc { width: 230px; flex: none; background: #f9e9bd; color: var(--ink); padding: 12px 14px; transform: rotate(-3deg); box-shadow: 0 12px 30px rgba(0, 0, 0, .5); border: 1px solid #c79d74; animation: slideUp .4s; text-align: center; }
.dd-head { font-size: 12px; font-weight: 800; border-bottom: 1px solid var(--ink); padding-bottom: 2px; }
.dd-title { font-family: var(--f-display); font-size: 30px; }
.dd-body { font-size: 12.5px; line-height: 1.7; }
.dd-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.dd-foot .stamp-svg { width: 76px; height: 76px; }
.dd-foot .sig-svg { width: 100px; height: 40px; }

/* ---------------- peddler ---------------- */
.peddler { position: absolute; top: 80px; left: 30px; right: 30px; bottom: 18px; }
.peddler-intro { font-size: 17px; text-align: center; opacity: .9; margin: 6px 0; }
.peddler-intro i { font-style: normal; color: var(--gold); }
.offers { display: flex; gap: 26px; justify-content: center; margin: 16px 0 22px; }
.tcard {
  width: 260px; padding: 16px; border-radius: 14px; background: linear-gradient(#f9e9bd, #ecc25a); color: var(--ink); text-align: center;
  border: 3px solid #8a5d3c; box-shadow: 0 8px 0 #6b452b, 0 12px 30px rgba(0, 0, 0, .4); display: flex; flex-direction: column; align-items: center; gap: 3px;
  transition: transform .15s; animation: fadeIn .4s;
}
.tcard:hover { transform: translateY(-4px) rotate(1deg); }
.tcard.sold { opacity: .55; }
.t-emoji { font-size: 64px; line-height: 1.15; }
.t-name { font-family: var(--f-display); font-size: 25px; line-height: 1.3; }
.t-desc { font-size: 14px; min-height: 66px; margin: 4px 0 8px; line-height: 1.7; }
.peddler-bottom { display: flex; justify-content: space-between; align-items: flex-end; }
.tslots { display: flex; gap: 10px; margin-top: 6px; }
.tslot { width: 88px; height: 88px; border-radius: 12px; background: rgba(249, 233, 189, .1); border: 2px solid rgba(244, 216, 140, .3); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 34px; cursor: help; }
.tslot small { font-size: 10px; text-align: center; line-height: 1.3; }
.tslot.empty { border-style: dashed; opacity: .5; }
.peddler-side { display: flex; flex-direction: column; gap: 10px; width: 390px; }

/* ---------------- endings ---------------- */
.end-card { position: absolute; inset: 0; display: flex; align-items: center; padding: 30px 60px; gap: 40px; animation: fadeIn .6s; }
.end-haji { width: 300px; flex: none; filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .6)); }
.end-card.over .end-haji { filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .6)) sepia(.4); }
.end-body { flex: 1; min-width: 0; }
.end-body .dialog { font-size: 18px; padding: 10px 18px; margin: 8px 0; }
.end-title { font-family: var(--f-display); font-size: 46px; color: var(--gold); line-height: 1.2; }
.end-title small { font-size: 24px; opacity: .7; }
.end-stats { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin: 10px 0; }
.end-stats div { background: rgba(249, 233, 189, .08); border-radius: 10px; padding: 6px; text-align: center; }
.end-stats b { display: block; font-family: var(--f-display); font-weight: normal; font-size: 30px; color: var(--gold); }
.end-stats span { font-size: 12px; opacity: .75; }
.recap { margin: 6px 0; padding-inline-start: 0; list-style: none; font-size: 14.5px; line-height: 1.8; }
.ledger-sum { background: rgba(0, 0, 0, .25); border-radius: 10px; padding: 8px 14px; font-size: 14px; }
.ledger-sum ul { margin: 4px 0 0; padding-inline-start: 18px; }
.ledger-sum li.nastaliq { font-size: 14px; line-height: 2; }
.end-btns { display: flex; gap: 12px; margin-top: 12px; }

/* ---------------- modals ---------------- */
.modal-card { background: var(--paper); color: var(--ink); border-radius: 14px; padding: 24px 30px; max-width: 800px; text-align: center; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); border: 3px solid #8a5d3c; animation: pop .3s; }
.modal-card h2 { font-family: var(--f-display); font-weight: normal; font-size: 34px; margin: 0 0 10px; color: #8e1f16; }
.modal-card .btn.ghost { color: var(--ink); border-color: rgba(0, 0, 0, .3); }
.modal-card.pause { display: flex; flex-direction: column; gap: 12px; min-width: 320px; }
.ledger { max-width: 640px; }
.ledger-found { opacity: .7; }
.ledger-paper { background: #f4d88c; padding: 16px 22px; transform: rotate(1deg); border: 1px solid #c79d74; box-shadow: inset 0 0 40px rgba(107, 69, 43, .25), 0 6px 14px rgba(0, 0, 0, .2); margin: 14px 0 18px; }
.ledger-no { font-size: 12px; opacity: .6; }
.ledger-text { font-size: 22px; color: #3c2415; line-height: 2.2; }
.ledger-sign { text-align: left; margin-top: 6px; }

/* ---------------- coach marks ---------------- */
.coach-ring {
  position: absolute; border: 3px solid var(--gold); border-radius: 14px; pointer-events: none;
  box-shadow: 0 0 0 1600px rgba(14, 8, 5, .55), 0 0 24px var(--gold); animation: ringPulse 1.2s ease-in-out infinite;
}
.coach-pop {
  position: absolute; width: 340px; background: var(--paper); color: var(--ink); border-radius: 12px; padding: 14px 16px; pointer-events: auto;
  border: 3px solid #8a5d3c; box-shadow: 0 14px 40px rgba(0, 0, 0, .6); font-size: 15px; line-height: 1.8; animation: pop .25s;
  display: flex; flex-direction: column; gap: 10px; align-items: flex-start;
}
.coach-pop b { color: #8e1f16; }

/* ---------------- fx ---------------- */
.fly { position: absolute; font-size: 44px; line-height: 1; margin: -24px 0 0 -24px; will-change: transform; }
.coin-fly { font-size: 24px; margin: -12px 0 0 -12px; }
.float { position: absolute; transform: translateX(-50%); font-weight: 800; font-size: 20px; white-space: nowrap; animation: floatUp 1.3s ease-out forwards; text-shadow: 0 2px 4px #000; }
.float.good { color: var(--good); }
.float.bad { color: #eea093; }
.banner {
  position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); font-family: var(--f-display); font-size: 60px; text-align: center;
  color: var(--gold); text-shadow: 0 4px 0 #52331f, 0 0 30px rgba(0, 0, 0, .9); animation: bannerAnim 1.5s ease-out forwards; white-space: nowrap; line-height: 1.3;
}
.banner small { display: block; font-family: var(--f-body); font-size: 19px; color: var(--cream); text-shadow: 0 2px 6px #000; }
.banner.red { color: #eea093; }
.banner.green { color: var(--good); }
#toasts { position: absolute; top: 70px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; align-items: center; }
.toast { background: rgba(14, 8, 5, .92); border: 1px solid rgba(244, 216, 140, .3); padding: 5px 16px; border-radius: 20px; font-size: 14px; animation: toastAnim 2.6s forwards; white-space: nowrap; }
.toast.bad { border-color: #b02a1f; }
.toast.good { border-color: #26a8a4; }
.toast.muted { opacity: .85; font-size: 13px; }

@keyframes fadeIn { from { opacity: 0; } }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
@keyframes breathe { 50% { transform: translateY(-5px); } }
@keyframes blink { 50% { opacity: .15; } }
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(-8px); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes wobble { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(3deg); } }
@keyframes flicker { from { transform: scale(1); } to { transform: scale(1.18) rotate(-6deg); } }
@keyframes qIn { from { transform: translateY(-20px); opacity: 0; } }
@keyframes slideUp { from { transform: translateY(40px) rotate(-2deg); opacity: 0; } }
@keyframes flipIn { from { transform: rotateY(90deg); } }
@keyframes custIn { from { transform: translateX(70px); opacity: 0; } }
@keyframes custOut { to { transform: translateX(90px); opacity: 0; } }
@keyframes stampIn { from { transform: rotate(-12deg) scale(2.4); opacity: 0; } }
@keyframes glow { from { box-shadow: 0 6px 0 #2a180e, 0 0 0 0 rgba(224, 169, 46, 0); } to { box-shadow: 0 6px 0 #2a180e, 0 0 22px 6px rgba(224, 169, 46, .85); } }
@keyframes shimmer { to { box-shadow: 0 0 0 3px #cc4535, 0 0 6px 1px rgba(204, 69, 53, .4); } }
@keyframes rbPulse { 0% { box-shadow: inset 0 0 0 0 rgba(224, 169, 46, 0); } 30% { box-shadow: inset 0 0 0 5px rgba(224, 169, 46, .9); } 100% { box-shadow: inset -8px 0 16px rgba(0, 0, 0, .15); } }
@keyframes ringPulse { 50% { border-color: #f9e9bd; } }
@keyframes smoke { from { opacity: 0; transform: scale(.6); } 40% { opacity: 1; } to { opacity: 0; transform: scale(1.4) translateY(-30px); } }
@keyframes floatUp { from { opacity: 0; transform: translate(-50%, -6px); } 15% { opacity: 1; } to { opacity: 0; transform: translate(-50%, 34px); } }
@keyframes toastAnim { 0% { opacity: 0; transform: translateY(-8px); } 10%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes hurtShake { 0%, 100% { transform: translate(0); } 20% { transform: translate(-5px, 2px); } 40% { transform: translate(5px, -2px); } 60% { transform: translate(-3px, 1px); } 80% { transform: translate(3px, 0); } }
@keyframes hurtFlash { from { opacity: 1; } to { opacity: 0; } }
@keyframes bannerAnim {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.6); }
  14% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
  24% { transform: translate(-50%, -50%) scale(1); }
  80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -62%) scale(1); }
}


/* =========================================================================
   Jackpots, mini-games, visitors, rumors, Persian shop decor
   ========================================================================= */

/* ---------- jackpot & money rain ---------- */
.jackpot { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 52; pointer-events: none; animation: jpIn .25s ease-out; }
.jackpot::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 45%, rgba(236, 194, 90, .35), rgba(14, 8, 5, .55) 70%); animation: jpFade 2.7s forwards; }
.jackpot.small::before { background: radial-gradient(circle at 50% 45%, rgba(236, 194, 90, .22), rgba(14, 8, 5, .25) 65%); animation-duration: 1.7s; }
.jp-rays {
  position: absolute; left: 50%; top: 45%; width: 1400px; height: 1400px; margin: -700px 0 0 -700px; opacity: .55;
  background: repeating-conic-gradient(from 0deg, rgba(244, 216, 140, .55) 0 7deg, transparent 7deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 8%, transparent 55%); mask: radial-gradient(circle, #000 8%, transparent 55%);
  animation: spin 6s linear infinite, jpFade 2.7s forwards;
}
.jackpot.small .jp-rays { opacity: .3; animation: spin 6s linear infinite, jpFade 1.7s forwards; }
.jp-box { position: relative; text-align: center; animation: jpPop .5s cubic-bezier(.2, 1.6, .4, 1), jpFade 2.7s forwards; }
.jackpot.small .jp-box { animation: jpPop .4s cubic-bezier(.2, 1.6, .4, 1), jpFade 1.7s forwards; }
.jp-title { font-family: var(--f-display); font-size: 96px; line-height: 1.1; color: #f9e9bd; text-shadow: 0 5px 0 #8a5d3c, 0 0 40px rgba(236, 194, 90, .9), 0 0 90px rgba(224, 169, 46, .6); }
.jackpot.small .jp-title { font-size: 64px; }
.jp-amount { font-family: var(--f-display); font-size: 58px; color: #fff; text-shadow: 0 4px 0 #14686a, 0 0 30px rgba(205, 238, 234, .8); }
.jackpot.small .jp-amount { font-size: 40px; }
.jp-sub { font-size: 20px; font-weight: 800; color: var(--cream); text-shadow: 0 2px 8px #000; margin-top: 4px; }
.rain { position: absolute; top: -60px; z-index: 53; pointer-events: none; animation-name: rainFall; animation-timing-function: cubic-bezier(.3, .1, .7, 1); animation-fill-mode: both; }
.rain-coin { font-size: 30px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); }
.rain-bill { width: 58px; height: 28px; border-radius: 3px; border: 1px solid #0f4e4c; background: linear-gradient(135deg, #97ddd7, #1a8a88); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .25), 0 3px 6px rgba(0, 0, 0, .35); }
.rain-bill::after { content: ''; position: absolute; left: 21px; top: 6px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .55); }
.screen.joy { animation: hurtShake .4s; }
.screen.joy::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 40; box-shadow: inset 0 0 160px rgba(236, 194, 90, .7); animation: hurtFlash 1.2s forwards; }

/* ---------- taarof ---------- */
.taarof { text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.tf-title { font-family: var(--f-display); font-size: 40px; color: var(--gold); line-height: 1.2; }
.tf-sub { font-size: 17px; }
.tf-count { display: flex; gap: 8px; }
.tf-count i { width: 26px; height: 26px; border-radius: 50%; background: rgba(255, 255, 255, .12); border: 2px solid rgba(244, 216, 140, .35); }
.tf-count i.on { background: radial-gradient(#f9e9bd, #e0a92e); border-color: #f9e9bd; box-shadow: 0 0 10px rgba(224, 169, 46, .8); }
.tf-btns { display: flex; gap: 12px; }
.tf-btns .btn { font-size: 19px; }

/* ---------- cash counting ---------- */
.cash { width: 100%; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.cash-top { display: flex; gap: 14px; align-items: center; width: 100%; }
.cash-ref { text-align: center; font-size: 11px; opacity: .9; }
.cash-info { flex: 1; font-size: 14px; line-height: 1.7; }
.cash-timer { height: 8px; border-radius: 4px; background: rgba(0, 0, 0, .4); overflow: hidden; margin-top: 6px; }
.cash-timer b { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #cc4535, #ecc25a, #5cc6c0); }
.bills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.note {
  position: relative; width: 132px; height: 66px; border-radius: 5px; cursor: pointer; overflow: hidden; color: #0a3534;
  background: linear-gradient(135deg, #cdeeea, #5cc6c0); border: 2px solid #14686a; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .35), 0 3px 0 rgba(0, 0, 0, .3);
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 2px 6px; transition: transform .1s;
}
.note:hover { transform: translateY(-2px); }
.cash-ref .note { cursor: default; width: 120px; height: 60px; }
.note.pink { background: linear-gradient(135deg, #f7d0c8, #e0705f); border-color: #1d4a96; color: #0e2350; }
.note.chek { background: linear-gradient(135deg, #f9e9bd, #e0a92e); border-color: #74500d; color: #4f3306; }
.note-head { font-size: 11px; font-weight: 800; }
.note-mid { display: flex; align-items: center; gap: 12px; }
.note-art { font-size: 20px; }
.note-wm { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .8); background: radial-gradient(rgba(255, 255, 255, .6), transparent 70%); }
.note-wm.off { visibility: hidden; }
.note-serial { font-size: 10px; letter-spacing: 1px; opacity: .8; }
.note-copy { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--f-display); font-size: 28px; color: rgba(176, 42, 31, .55); transform: rotate(-18deg); pointer-events: none; }
.note-x { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 46px; font-weight: 900; color: #b02a1f; background: rgba(255, 255, 255, .35); pointer-events: none; }
.note.flagged { border-color: #b02a1f; }
.note.missed { box-shadow: 0 0 0 3px #cc4535, 0 0 16px #cc4535; }
.note.ok-caught { box-shadow: 0 0 0 3px #26a8a4, 0 0 14px #26a8a4; }
.note.wrong { box-shadow: 0 0 0 3px #ecc25a; }
.note-why { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0, 0, 0, .75); color: #fff; font-size: 10px; text-align: center; }

/* ---------- shell game (سه‌کاسه) ---------- */
.shell { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.cups { position: relative; width: 430px; height: 170px; background: radial-gradient(ellipse at 50% 85%, #8e1f16 0 46%, transparent 47%); }
.cups::after { content: 'معرکه'; position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); font-family: var(--f-nastaliq); font-size: 14px; color: rgba(244, 216, 140, .5); }
.cup { position: absolute; top: 40px; width: 92px; height: 100px; z-index: 2; transition: left .25s, transform .25s; }
.cup-body {
  position: absolute; inset: 0; border-radius: 46px 46px 14px 14px / 70px 70px 14px 14px;
  background: linear-gradient(90deg, #6b452b, #c08b1f 35%, #ecc25a 50%, #a97b55 70%, #52331f);
  box-shadow: inset 0 -10px 0 rgba(0, 0, 0, .25), 0 8px 10px rgba(0, 0, 0, .45);
}
.cup-body::before { content: ''; position: absolute; left: 34px; top: -10px; width: 24px; height: 14px; border-radius: 8px; background: #8a5d3c; }
.cup.up { transform: translateY(-62px); }
.cup.pickable { cursor: pointer; }
.cup.pickable:hover { transform: translateY(-10px); filter: brightness(1.15); }
.cup.arc-up { animation-name: arcUp; animation-timing-function: ease-in-out; }
.cup.arc-down { animation-name: arcDown; animation-timing-function: ease-in-out; }
.bead { position: absolute; top: 112px; width: 18px; height: 18px; margin-left: 0; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #eea093, #b02a1f 60%, #68150f); box-shadow: 0 3px 4px rgba(0, 0, 0, .5); opacity: 0; transition: opacity .15s; z-index: 1; }
.bead.show { opacity: 1; }
.shell-ctrl { display: flex; gap: 10px; align-items: center; min-height: 56px; flex-wrap: wrap; justify-content: center; }
.shell-msg { font-size: 17px; }
.shell-msg b { color: var(--gold); }

/* ---------- story visitors ---------- */
.visit { width: 100%; display: flex; flex-direction: column; gap: 12px; padding: 4px 10px; }
.v-text { background: #f9e9bd; color: var(--ink); border-radius: 10px; padding: 12px 16px; font-size: 16px; line-height: 1.95; box-shadow: 0 4px 12px rgba(0, 0, 0, .3); max-height: 230px; overflow: auto; }
.v-opts { display: flex; flex-direction: column; gap: 8px; }
.v-opts .btn { width: 100%; }
.cust.t-visitor .nameplate, .cust.t-hustler .nameplate { border-color: var(--saffron); background: #3c2415; white-space: normal; max-width: 232px; font-size: 12.5px; line-height: 1.5; }

/* ---------- rumors ---------- */
.rumor { margin-top: 6px; padding-top: 6px; border-top: 1px dashed rgba(0, 0, 0, .25); font-size: 14.5px; color: #52331f; }
.rumor.hint { color: #0f4e4c; }
.rumor.lie { color: #153573; }
.rumor-btn { position: relative; font-size: 17px; }
.rumor-count { position: absolute; top: -6px; left: -6px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--pome); color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; padding: 0 4px; }
.rumor-count:empty { display: none; }
.rumor-btn.ping { animation: ping .6s; }
.rumor-list { list-style: none; padding: 0; margin: 0 0 10px; max-height: 420px; overflow: auto; text-align: start; }
.rumor-list li { padding: 8px 10px; border-bottom: 1px dashed rgba(0, 0, 0, .2); font-size: 15px; line-height: 1.8; }
.rumor-list li.lie { background: rgba(29, 74, 150, .07); }
.rumor-list .rk { display: inline-block; font-size: 11px; font-weight: 800; background: rgba(0, 0, 0, .08); border-radius: 6px; padding: 0 6px; margin-inline-end: 6px; }
.rumor-list small { display: block; opacity: .55; }
.modal-card.rumors { width: 640px; }
.today-rumors { margin-top: 12px; padding: 8px 12px; border-radius: 10px; background: rgba(249, 233, 189, .07); font-size: 14px; line-height: 1.8; }
.today-rumors .lie { opacity: .8; }

/* ---------- morning notes, early rent, special customers ---------- */
.morning-notes { position: absolute; top: 72px; left: 20px; right: 20px; background: rgba(38, 168, 164, .14); border: 1px solid rgba(38, 168, 164, .5); border-radius: 10px; padding: 6px 14px; font-size: 14px; line-height: 1.8; z-index: 2; }
.morning-grid.with-notes { top: 112px; }
.btn.early { width: 100%; margin-bottom: 10px; }
.want.rich .want-big { filter: drop-shadow(0 0 18px rgba(185, 205, 236, .9)); }
.slot.gold { background: linear-gradient(#f9e9bd, #ecc25a); border-color: #c08b1f; box-shadow: 0 6px 0 #2a180e, 0 0 16px rgba(236, 194, 90, .8); }
.slot.gold::after { content: '★'; position: absolute; top: 4px; right: 6px; color: #c08b1f; font-size: 16px; }
.seal.gold .seal-ring { border-color: #c08b1f; color: #8a5d3c; background: radial-gradient(#f9e9bd, #f4d88c); box-shadow: 0 0 18px rgba(236, 194, 90, .9); }
.seal.gold small { color: #8a5d3c; font-weight: 800; opacity: 1; }

/* ---------- shop decor: the no-credit sign & father's photo ---------- */
.wall-sign {
  position: absolute; top: 26px; left: 22px; z-index: 0; background: #f9e9bd; color: #68150f; border: 3px solid #52331f; border-radius: 4px;
  padding: 2px 10px; font-weight: 800; font-size: 13px; text-align: center; line-height: 1.5; transform: rotate(-2deg); box-shadow: 0 4px 8px rgba(0, 0, 0, .4);
}
.wall-sign small { display: block; font-size: 11px; font-weight: 600; color: #3c2415; }
.wall-photo { position: absolute; top: 24px; left: 190px; z-index: 0; width: 48px; height: 60px; background: #ecc25a; border: 4px solid #6b452b; box-shadow: 0 4px 8px rgba(0, 0, 0, .45); overflow: hidden; }
.wp-face { position: absolute; left: 10px; top: 10px; width: 20px; height: 24px; border-radius: 50%; background: #a97b55; box-shadow: 0 26px 0 6px #6b452b; }
.wp-ribbon { position: absolute; top: -6px; right: -12px; width: 34px; height: 10px; background: #1a0f09; transform: rotate(45deg); }
.desk-col { z-index: 1; }

@keyframes rainFall { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 85% { opacity: 1; } 100% { transform: translate(var(--sway), 820px) rotate(var(--rot)); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes jpIn { from { opacity: 0; } }
@keyframes jpPop { from { transform: scale(.3); opacity: 0; } }
@keyframes jpFade { 0%, 82% { opacity: 1; } 100% { opacity: 0; } }
@keyframes arcUp { 50% { transform: translateY(-26px) scale(1.05); } }
@keyframes arcDown { 50% { transform: translateY(14px) scale(.96); } }
@keyframes ping { 50% { transform: scale(1.35); box-shadow: 0 0 14px var(--gold); } }

/* =========================================================================
   IRANIAN VISUAL IDENTITY (overrides)
   girih tiles · termeh · khatam · bazaar brick vaults with skylights · inscription bands
   ========================================================================= */
#stage { background: #2a180e; }
.screen-title { background: radial-gradient(ellipse at 55% 45%, rgba(107, 69, 43, .55), rgba(14, 8, 5, .96) 72%), var(--bricks); background-size: auto, 48px 24px; }
.screen-intro, .screen-week, .screen-end, .screen-morning, .screen-summary, .screen-peddler {
  background: radial-gradient(ellipse at 50% 20%, rgba(107, 69, 43, .45), rgba(14, 8, 5, .94) 72%), var(--bricks); background-size: auto, 48px 24px;
}
.screen-haji { background: radial-gradient(ellipse at 40% 35%, rgba(107, 69, 43, .5), rgba(14, 8, 5, .95) 70%), var(--girih-dark); background-size: auto, 64px 64px; }
.screen-haji::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: linear-gradient(rgba(38, 7, 6, .35), rgba(38, 7, 6, .65)), var(--termeh); background-size: auto, 84px 84px; border-top: 4px solid var(--gold); }
.screen-intro::after, .screen-week::after, .screen-end::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 24px; background: var(--girih-sm); background-size: 22px 22px; border-top: 3px solid var(--gold);
}
.screen-title::after { background: var(--girih-sm); background-size: 22px 22px; }

/* title: the bazaar portal (iwan) */
.title-main { position: relative; align-self: stretch; display: flex; flex-direction: column; justify-content: center; padding-top: 150px; }
.title-portal { position: absolute; left: 50%; top: 50%; width: 660px; height: 610px; transform: translate(-50%, -50%); z-index: 0; filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .6)); }
.portal-svg { width: 100%; height: 100%; }
.title-main > *:not(.title-portal) { position: relative; z-index: 1; }
.title-fa { font-size: 150px; background: linear-gradient(#f9e9bd, #e0a92e 55%, #9a6c14); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 5px 0 #52331f) drop-shadow(0 10px 24px rgba(0, 0, 0, .7)); }
.epigraph { margin-top: 22px; }

/* bars: walnut with a khatam inlay strip */
.hud, .topbar { background: linear-gradient(#3c2415, #1a0f09); border-bottom: none; }
.hud::after, .topbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -8px; height: 8px; background: var(--khatam); background-size: 16px 16px; box-shadow: 0 3px 6px rgba(0, 0, 0, .55); }

/* the street door */
.queue-col { background: linear-gradient(rgba(14, 8, 5, .6), rgba(14, 8, 5, .85)), var(--bricks); background-size: auto, 48px 24px; border-inline-end: 3px solid #2a180e; }
.door { position: relative; }
.door-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.queue { top: 78px; }

/* the shop interior: brick vault + skylight shafts + inscription band */
.counter-col {
  background:
    linear-gradient(104deg, transparent 16%, rgba(249, 233, 189, .11) 23%, rgba(249, 233, 189, .03) 31%, transparent 35%),
    linear-gradient(97deg, transparent 56%, rgba(249, 233, 189, .08) 62%, transparent 69%),
    linear-gradient(rgba(26, 15, 9, .15), rgba(26, 15, 9, .55)),
    var(--bricks);
  background-size: auto, auto, auto, 48px 24px;
}
.kativeh {
  position: absolute; left: 0; right: 0; top: 0; height: 30px; z-index: 2; padding: 0 64px;
  background: linear-gradient(#153573, #153573); border-top: 2px solid var(--gold); border-bottom: 3px solid var(--gold);
  color: #f4d88c; font-family: var(--f-nastaliq); font-size: 14px; line-height: 30px; text-align: center; white-space: nowrap; overflow: visible;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .45);
}
.kativeh::before, .kativeh::after { content: ''; position: absolute; top: 0; bottom: 0; width: 58px; background: var(--girih-sm); background-size: 22px 22px; }
.kativeh::before { right: 0; border-left: 2px solid var(--gold); }
.kativeh::after { left: 0; border-right: 2px solid var(--gold); }
.cust-col { padding-top: 40px; }
.desk-col { padding-block: 40px 18px; }
.wall-sign { top: 42px; }
.wall-photo { top: 40px; }
.bubble { background: #f9e9bd; border: 2px solid #c79d74; }
.bubble::before { border-left-color: #c79d74; }

/* the counter is covered with termeh */
.desk {
  background: linear-gradient(rgba(38, 7, 6, .64), rgba(38, 7, 6, .74)), var(--termeh); background-size: auto, 84px 84px;
  border: 4px solid #2a180e; box-shadow: inset 0 0 0 2px #c08b1f, inset 0 0 0 7px rgba(0, 0, 0, .3), 0 10px 22px rgba(0, 0, 0, .5);
}

/* the shelf: walnut niches (طاقچه) with a khatam strip */
.shelf-wrap { background: linear-gradient(rgba(26, 15, 9, .2), rgba(26, 15, 9, .55)), linear-gradient(#6b452b, #3c2415); border-top: none; }
.shelf-wrap::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 10px; background: var(--khatam); background-size: 16px 16px; box-shadow: 0 2px 6px rgba(0, 0, 0, .6); }
.slot {
  border-radius: 54px 54px 10px 10px; background: radial-gradient(ellipse at 50% 32%, #f9e9bd, #ecc25a 72%);
  border: 3px solid #8a5d3c; box-shadow: inset 0 -10px 18px rgba(107, 69, 43, .2), 0 6px 0 #2a180e;
}
.slot.empty { border-radius: 54px 54px 10px 10px; background: rgba(0, 0, 0, .25); }
.slot .emoji { width: 66px; height: 66px; display: block; }
.slot.in-set { border-color: #1a8a88; }
.set-badge { position: absolute; top: 18px; right: 4px; background: #1a8a88; color: #fff; font-size: 10px; font-weight: 800; padding: 0 5px; border-radius: 6px; pointer-events: none; }
.slot .s-val { top: 18px; }
.slot.gold::after { top: -2px; right: auto; left: calc(50% - 6px); }

/* SVG antiques */
.item-svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .25)); }
.item-svg.mini { display: inline-block; width: 26px; height: 26px; vertical-align: middle; filter: none; }
.h-item .emoji { width: 66px; height: 66px; display: block; flex: none; }
.face.front .emoji { width: 124px; height: 124px; display: block; }
.want-big { display: flex; justify-content: center; gap: 10px; }
.want-big .item-svg { width: 104px; height: 104px; }
.fly { margin: -30px 0 0 -30px; }
.fly .item-svg { width: 60px; height: 60px; }
.ia-items { display: grid; grid-template-columns: repeat(3, 110px); gap: 14px; }
.ia-items .item-svg { width: 110px; height: 110px; }
.ia-bazaar { gap: 16px; }
.ia-bazaar .door-svg { width: 120px; height: 250px; }
.shelf-mini .item-svg.mini { width: 30px; height: 30px; }

/* rulebook: illuminated header */
.rulebook { background: #f9e9bd; border-inline-start: 7px solid #153573; box-shadow: inset -2px 0 0 #ecc25a, inset -10px 0 16px rgba(0, 0, 0, .12); }
.rb-head { background: linear-gradient(#153573, #153573); color: #f4d88c; margin-block: -8px 6px; margin-inline: -16px -12px; padding: 4px 14px; border-bottom: 3px solid var(--gold); }

/* panels with a tile frieze */
.panel { background: linear-gradient(rgba(42, 24, 14, .86), rgba(26, 15, 9, .92)); border: 2px solid #8a5d3c; position: relative; overflow: hidden; padding-top: 24px;
  box-shadow: inset 0 0 0 4px rgba(236, 194, 90, .07), 0 10px 30px rgba(0, 0, 0, .45); }
.panel::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 10px; background: var(--girih-sm); background-size: 22px 22px; border-bottom: 2px solid var(--gold); }
.bulletin { border-top: 8px solid #153573; }
.modal-card { border: 3px solid #8a5d3c; box-shadow: inset 0 0 0 5px rgba(21, 53, 115, .12), 0 20px 60px rgba(0, 0, 0, .6); }

/* the sale receipt */
.receipt {
  position: absolute; width: 280px; z-index: 51; background: #f9e9bd; color: var(--ink); border-radius: 6px; padding: 6px 12px 10px; font-size: 13px;
  border-top: 5px solid #153573; box-shadow: 0 12px 30px rgba(0, 0, 0, .55); animation: rcIn .25s ease-out;
  background-image: repeating-linear-gradient(transparent 0 21px, rgba(0, 0, 0, .05) 21px 22px);
}
.rc-head { font-weight: 800; text-align: center; color: #153573; border-bottom: 1px dashed rgba(0, 0, 0, .35); margin-bottom: 3px; }
.rc-line { display: flex; justify-content: space-between; gap: 8px; padding: 1px 2px; opacity: 0; animation: rcLine .25s ease-out forwards; line-height: 1.6; }
.rc-line span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-line b { font-weight: 800; color: #14686a; white-space: nowrap; }
.rc-line.base b { color: var(--ink); }
.rc-line.low b { color: #b02a1f; }
.rc-line.charm { background: rgba(236, 194, 90, .45); border-radius: 4px; }
.rc-total { display: flex; justify-content: space-between; border-top: 2px solid var(--ink); margin-top: 4px; padding-top: 2px; font-size: 17px; font-weight: 800; opacity: 0; animation: rcTotal .35s cubic-bezier(.2, 1.6, .4, 1) forwards; }
.rc-total b { color: #153573; }
.receipt.out { animation: rcOut .4s forwards; }
.tal.fire { animation: talFire .6s; display: inline-block; }
.t-tag { font-size: 11px; font-weight: 800; background: rgba(0, 0, 0, .1); border-radius: 8px; padding: 0 8px; }
.t-tag.income { background: #1a8a88; color: #fff; }

/* visitors: side portrait, Haji at the counter */
.v-row { display: flex; gap: 10px; align-items: center; }
.v-side { width: 92px; flex: none; text-align: center; font-size: 12px; }
.v-side svg { width: 92px; height: 107px; }
.visit.haji-visit .v-text { border-inline-start: 5px solid #8e1f16; }
.cust.is-haji .portrait svg { filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .5)); }
.q-person.haji svg { width: 74px; height: 96px; }

@keyframes rcIn { from { opacity: 0; transform: scale(.9); } }
@keyframes rcLine { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes rcTotal { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes rcOut { to { opacity: 0; transform: translateY(-14px); } }
@keyframes talFire { 35% { transform: scale(1.7) rotate(-12deg); filter: drop-shadow(0 0 8px #f4d88c); } }
.day-main { top: 68px; height: 480px; }
.blackout { top: 68px; }

/* =========================================================================
   Tooltips, traits, rarity, phone, comic effects, living portraits
   ========================================================================= */
#tip {
  position: absolute; z-index: 80; max-width: 280px; pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s;
  background: #f9e9bd; color: var(--ink); border: 2px solid #8a5d3c; border-top: 4px solid #153573; border-radius: 8px; padding: 7px 11px;
  font-size: 13px; line-height: 1.7; box-shadow: 0 10px 26px rgba(0, 0, 0, .55);
}
#tip.show { opacity: 1; transform: none; }
#tip b { color: #153573; }
.tip-tag { display: inline-block; margin-inline-start: 6px; font-size: 10.5px; font-weight: 800; background: rgba(0, 0, 0, .08); border-radius: 6px; padding: 0 6px; }

.trait { display: inline-block; margin-inline-start: 6px; font-size: 11.5px; font-weight: 700; background: #f9e9bd; color: #52331f; border-radius: 8px; padding: 0 7px; cursor: help; }

/* charm rarity (Balatro-style borders) */
.tcard.r-rare { border-color: #2a62b5; box-shadow: 0 8px 0 #153573, 0 0 18px rgba(42, 98, 181, .45); }
.tcard.r-legend { border-color: #c08b1f; background: linear-gradient(#f9e9bd, #ecc25a); box-shadow: 0 8px 0 #8a5d3c, 0 0 26px rgba(224, 169, 46, .75); animation: legendGlow 1.6s ease-in-out infinite alternate; }
.tslot.r-rare { border-color: #2a62b5; }
.tslot.r-legend { border-color: #ecc25a; box-shadow: 0 0 12px rgba(224, 169, 46, .6); }
.tal.r-rare { filter: drop-shadow(0 0 3px #83a8db); }
.tal.r-legend { filter: drop-shadow(0 0 5px #f4d88c); }
.tal { cursor: help; }

/* Mom's call */
#phone { position: absolute; top: 76px; left: 50%; transform: translateX(-50%); z-index: 57; }
.phone-card { display: flex; align-items: center; gap: 10px; background: #0e2350; color: #fff; border: 2px solid #4f83c9; border-radius: 16px; padding: 8px 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .6); animation: phoneIn .3s, phoneShake .5s .3s infinite; }
.phone-card small { display: block; font-size: 11px; opacity: .7; }
.phone-icon { font-size: 30px; }
.phone-card .btn { padding: 4px 12px; font-size: 14px; }
.modal-card.mom { max-width: 560px; }
.mom-text { font-size: 17px; line-height: 2; margin-bottom: 12px; text-align: start; background: #f6ecd6; border-radius: 12px; padding: 10px 14px; border: 1px solid #b9cdec; }
.mom-btns { display: flex; gap: 10px; justify-content: center; }

/* Divan of Hafez: one envelope already open */
.envelope.peek { background: linear-gradient(135deg, #f9e9bd, #f4d88c); gap: 2px; }
.envelope.peek.good { border-color: #26a8a4; }
.envelope.peek.bad { border-color: #b02a1f; }
.envelope.peek small { font-size: 10px; opacity: .7; }

/* Thick glasses: the wrong line glows red */
.notice [data-hl].wrong { background: rgba(204, 69, 53, .35) !important; box-shadow: 0 0 0 2px #cc4535; }

/* 🔍 inspect mode (Papers, Please): click two things; a red pair is proof */
.insp-btn { position: absolute; top: 8px; inset-inline-end: 8px; z-index: 3; font: 800 14px/1.5 var(--f-body); color: var(--cream); cursor: pointer;
  background: rgba(0, 0, 0, .5); border: 2px solid #c08b1f; border-radius: 18px; padding: 2px 12px; transition: background .15s, box-shadow .15s, transform .08s; }
.insp-btn:hover { background: rgba(0, 0, 0, .7); }
.insp-btn:active { transform: scale(.95); }
.insp-btn.on { background: #f9e9bd; color: var(--ink); border-color: #f9e9bd; box-shadow: 0 0 0 3px rgba(42, 98, 181, .6), 0 0 16px rgba(249, 233, 189, .8); }
.insp-msg { visibility: hidden; position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); z-index: 3; white-space: nowrap; pointer-events: none;
  font-weight: 800; font-size: 15px; padding: 2px 14px; border-radius: 14px; background: #f9e9bd; color: var(--ink); box-shadow: 0 4px 12px rgba(0, 0, 0, .45); }
.insp-msg.show { visibility: visible; animation: pop .2s ease-out; }
.insp-msg.bad { background: #b02a1f; color: #fff; font-size: 17px; }
.insp-msg.ok { background: #1a8a88; color: #fff; }
.screen.insp-n [data-ig=n], .screen.insp-s [data-ig=s] { outline: 2px dashed rgba(42, 98, 181, .6); outline-offset: 1px; cursor: zoom-in; border-radius: 4px; }
.screen.insp-n [data-ig=n]:hover, .screen.insp-s [data-ig=s]:hover { outline-style: solid; background: rgba(42, 98, 181, .12); }
.screen.insp-s .offer-info [data-ig=s] { outline-color: rgba(249, 233, 189, .8); }
.screen.insp-n .notice [data-hl]:hover { background: rgba(42, 98, 181, .12); }
[data-insp].insp-sel { outline: 3px solid #2a62b5 !important; outline-offset: 1px; background: rgba(42, 98, 181, .2) !important; }
.insp-bad { outline: 3px solid #cc4535 !important; outline-offset: 1px; background: rgba(204, 69, 53, .32) !important; animation: inspBad .45s; }
.insp-ok { outline: 3px solid #1a8a88 !important; outline-offset: 1px; }
.insp-meh { outline: 3px solid #c79d74 !important; outline-offset: 1px; }
@keyframes inspBad { 30% { translate: -3px 0; } 60% { translate: 3px 0; } }
.insp-era { display: inline-block; border-radius: 6px; }
.cat-tag { display: inline-flex; align-items: center; gap: 2px; padding: 0 8px 0 4px; border-radius: 10px; background: rgba(249, 233, 189, .85); border: 1px solid #8a5d3c; font-size: 13px; font-weight: 800; }
.cat-tag .item-svg.mini { width: 24px; height: 24px; filter: none; }
.rb-era { border-radius: 4px; }
.btn.proof { animation: proofGlow .6s ease-in-out infinite alternate; }
@keyframes proofGlow { to { box-shadow: 0 4px 0 #68150f, 0 0 18px 4px rgba(249, 233, 189, .9); } }
.v-aside { margin-top: 6px; font-size: 13px; opacity: .75; font-style: normal; color: #52331f; }

/* firecracker */
.screen.boom { animation: hurtShake .45s; }
.screen.boom::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 40; background: radial-gradient(circle at 80% 30%, rgba(244, 216, 140, .55), transparent 40%); animation: hurtFlash .6s forwards; }

/* living portraits: blink & breathe */
.person .eyes { transform-box: fill-box; transform-origin: center; animation: blink 5.2s infinite; }
.portrait svg { animation: breatheP 3.6s ease-in-out infinite; transform-origin: 50% 100%; }
.cust.exit .portrait svg, .cust.enter .portrait svg { animation: none; }

@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 95.5% { transform: scaleY(.08); } }
@keyframes breatheP { 50% { transform: scale(1.012, 1.018); } }
@keyframes phoneIn { from { transform: translateY(-20px); opacity: 0; } }
@keyframes phoneShake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-2deg); } 75% { transform: rotate(2deg); } }
@keyframes legendGlow { to { box-shadow: 0 8px 0 #8a5d3c, 0 0 36px rgba(224, 169, 46, .95); } }

/* =========================================================================
   گنجینه: the collection book (Balatro's collection) + talisman unlock toasts
   ========================================================================= */
.book {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 10px; padding: 16px 26px 38px;
  background: radial-gradient(ellipse at 50% 12%, rgba(107, 69, 43, .45), rgba(14, 8, 5, .96) 72%), var(--bricks); background-size: auto, 48px 24px;
}
.book.enter { animation: fadeIn .25s; }
.book::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 22px; background: var(--girih-sm); background-size: 22px 22px; border-top: 3px solid var(--gold); }
.book-head { display: flex; align-items: center; gap: 22px; padding-inline-end: 44px; }
.book-title { font-family: var(--f-display); font-size: 46px; line-height: 1.1; color: var(--gold); text-shadow: 0 3px 0 #52331f, 0 8px 20px rgba(0, 0, 0, .6); }
.book-sub { flex: 1; font-size: 15px; opacity: .9; }
.book-sub b { color: var(--gold); }
.book-tabs { display: flex; gap: 8px; margin-bottom: -10px; position: relative; z-index: 1; }
.book-tab {
  position: relative; font-family: var(--f-body); font-weight: 800; font-size: 15px; color: var(--cream); cursor: pointer; padding: 7px 18px 9px;
  background: rgba(249, 233, 189, .07); border: 2px solid rgba(244, 216, 140, .25); border-bottom: none; border-radius: 10px 10px 0 0;
}
.book-tab:hover:not(.on) { background: rgba(249, 233, 189, .14); }
.book-tab.on { background: linear-gradient(#ecc25a, #e0a92e); color: var(--ink); border-color: #6b452b; }
.book-tab .num { font-size: 12px; opacity: .7; margin-inline-start: 4px; }
.new-dot { position: absolute; top: -5px; left: -5px; width: 12px; height: 12px; border-radius: 50%; background: var(--pome); box-shadow: 0 0 0 2px #2a180e; animation: ping 1.4s infinite; }
.book .panel { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; padding: 22px 16px 14px; border-start-start-radius: 0; }
.bk-hint { font-size: 13px; opacity: .85; }
.bk-hint b { color: var(--gold); }

.bk-grid { flex: 1; min-height: 0; display: grid; gap: 8px; }
.g-cats, .g-vis { grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(3, 1fr); }
.g-tals { grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(4, 1fr); }
.bk-card {
  position: relative; min-height: 0; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 6px; text-align: center; cursor: help; color: var(--ink); background: linear-gradient(#f9e9bd, #ecc25a);
  border: 3px solid #8a5d3c; border-radius: 12px; box-shadow: 0 4px 0 #6b452b; transition: transform .12s; animation: fadeIn .3s;
}
.bk-card:hover { transform: translateY(-3px); }
.bk-card.unseen, .bk-card.locked { color: var(--cream); background: rgba(249, 233, 189, .05); border: 2px dashed rgba(244, 216, 140, .28); box-shadow: none; }
.bk-name { font-family: var(--f-display); font-size: 19px; line-height: 1.2; }
.bk-sub { font-size: 11px; opacity: .7; }
.sil { filter: brightness(0) drop-shadow(0 0 1px rgba(244, 216, 140, .6)); opacity: .75; }
.new-badge {
  position: absolute; top: 5px; inset-inline-start: 5px; z-index: 2; background: var(--pome); color: #fff; font-family: var(--f-body); font-size: 10.5px;
  font-weight: 800; padding: 0 7px; border-radius: 6px; box-shadow: 0 2px 0 #68150f; animation: newPulse .9s ease-in-out infinite alternate;
}

.bk-art { width: 84px; height: 84px; flex: none; }
.bk-eras { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; }
.era-chip.off { background: rgba(0, 0, 0, .1); color: rgba(42, 24, 14, .45); box-shadow: none; }

.bk-tal .bk-name { font-size: 15px; line-height: 1.15; }
.bk-emoji { position: relative; font-size: 36px; line-height: 1.15; }
.bk-tal.locked .bk-emoji { font-size: 28px; }
.bk-lock { position: absolute; left: 50%; top: 55%; transform: translate(-50%, -50%); font-size: 18px; }
.bk-goal { font-size: 11px; line-height: 1.45; font-weight: 600; }
.bk-prog { position: relative; width: 88%; height: 14px; margin-top: 2px; border-radius: 7px; overflow: hidden; background: rgba(0, 0, 0, .35); border: 1px solid rgba(244, 216, 140, .25); }
.bk-prog i { position: absolute; inset-block: 0; inset-inline-start: 0; background: linear-gradient(90deg, #1a8a88, #5cc6c0); }
.bk-prog span { position: relative; display: block; font-size: 10px; font-weight: 800; line-height: 12px; text-align: center; text-shadow: 0 1px 2px #000; }
.bk-tal.r-rare { border-color: #2a62b5; box-shadow: 0 4px 0 #153573, 0 0 12px rgba(42, 98, 181, .45); }
.bk-tal.r-legend { border-color: #c08b1f; background: linear-gradient(#f9e9bd, #ecc25a); box-shadow: 0 4px 0 #8a5d3c, 0 0 18px rgba(224, 169, 46, .75); }

.bk-face { height: 100px; flex: none; }
.bk-face svg { height: 100%; width: auto; display: block; }

.bk-pages { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; padding: 8px 12px 4px; }
.bk-page {
  position: relative; display: flex; flex-direction: column; gap: 8px; padding: 16px 22px; color: var(--ink); background: #f4d88c; transform: rotate(-1deg);
  border: 1px solid #c79d74; box-shadow: inset 0 0 40px rgba(107, 69, 43, .25), 0 8px 20px rgba(0, 0, 0, .45); animation: fadeIn .3s;
}
.bk-page:nth-child(2) { transform: rotate(.8deg); }
.bk-page .ledger-text { flex: 1; font-size: 21px; line-height: 2.2; margin-top: 10px; }
.bk-page.unseen { align-items: center; justify-content: center; text-align: center; color: var(--cream); background: rgba(244, 216, 140, .06); border: 2px dashed rgba(244, 216, 140, .28); box-shadow: none; }
.bk-q { font-family: var(--f-display); font-size: 96px; line-height: 1; opacity: .45; }

/* the title screen's book button sits on the meta line, under the epigraph */
.title-meta { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 10px; }
.title-meta .meta-line { margin: 0; }
.book-btn { position: relative; font-size: 14px; padding: 4px 16px; }
.new-count {
  position: absolute; top: -10px; left: -10px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--pome); color: #fff;
  font-size: 12px; line-height: 22px; box-shadow: 0 0 0 2px #2a180e; animation: ping 1.4s infinite;
}
.end-unlocks { margin: 6px 0; font-size: 14px; }
.end-unlocks .chip { font-weight: 700; }

/* talisman unlocked: a gold card drops in (outside #fx, so it survives screen changes) */
#unlocks { position: absolute; top: 64px; left: 50%; transform: translateX(-50%); z-index: 75; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.unlock-toast {
  position: relative; display: flex; align-items: center; gap: 14px; min-width: 400px; padding: 18px 22px 12px; overflow: hidden; border-radius: 14px;
  background: linear-gradient(rgba(42, 24, 14, .97), rgba(26, 15, 9, .97)); border: 2px solid var(--gold);
  box-shadow: 0 0 0 4px rgba(236, 194, 90, .15), 0 14px 40px rgba(0, 0, 0, .7), 0 0 30px rgba(224, 169, 46, .45);
  animation: unlockIn .45s cubic-bezier(.2, 1.4, .4, 1), unlockOut .5s 4.2s forwards;
}
.unlock-toast::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: var(--girih-sm); background-size: 22px 22px; border-bottom: 2px solid var(--gold); }
.unlock-toast.r-rare { border-color: #83a8db; }
.unlock-toast.r-legend { border-color: #f4d88c; box-shadow: 0 0 0 4px rgba(244, 216, 140, .2), 0 14px 40px rgba(0, 0, 0, .7), 0 0 44px rgba(244, 216, 140, .8); }
.ut-emoji { font-size: 50px; line-height: 1; animation: wobble 1s ease-in-out infinite; }
.ut-body { display: flex; flex-direction: column; }
.ut-body small { font-size: 12px; font-weight: 700; color: var(--gold); }
.ut-body b { font-family: var(--f-display); font-weight: normal; font-size: 28px; line-height: 1.25; }
.ut-body span { font-size: 13px; opacity: .8; }

@keyframes newPulse { to { transform: scale(1.12); } }
@keyframes unlockIn { from { transform: translateY(-40px) scale(.8); opacity: 0; } }
@keyframes unlockOut { to { transform: translateY(-20px); opacity: 0; } }

/* =========================================================================
   «چونه با تاس»: push-your-luck haggling with backgammon dice
   ========================================================================= */
.dice-haggle { gap: 10px; }
.want-acts { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.want-acts .btn { font-size: 15px; padding: 8px 16px; }
.bad-txt { color: #eea093; font-weight: 700; }
.offer-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.h-offer { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.h-offer small { font-size: 12px; opacity: .75; font-weight: 700; }
.h-offer b { font-family: var(--f-display); font-weight: normal; font-size: 34px; color: var(--gold); transition: transform .15s; }
.offer-mult { font-size: 13px; opacity: .8; }
.tell { padding: 6px 12px; border-radius: 12px; font-weight: 800; font-size: 15px; background: rgba(0, 0, 0, .25); transition: background .2s; }
.tell.calm { color: #cdeeea; }
.tell.warm { color: #f4d88c; background: rgba(138, 93, 60, .35); }
.tell.hot { color: #fff; background: rgba(176, 42, 31, .65); animation: shake .4s; }
.dice-tray {
  position: relative; display: flex; justify-content: center; align-items: center; gap: 20px; height: 96px; border-radius: 12px;
  background: linear-gradient(rgba(26, 15, 9, .55), rgba(26, 15, 9, .55)), var(--khatam); background-size: auto, 26px 26px;
  box-shadow: inset 0 0 0 3px #2a180e, inset 0 6px 18px rgba(0, 0, 0, .65);
}
.die { width: 60px; height: 60px; filter: drop-shadow(0 5px 4px rgba(0, 0, 0, .55)); }
.die-svg { width: 100%; height: 100%; display: block; }
.die.tumble { animation: tumble .14s linear infinite; }
.die.tumble:nth-child(2) { animation-duration: .17s; animation-direction: reverse; }
.die.land { animation: dieLand .32s cubic-bezier(.2, 1.6, .4, 1); }
.die.double { filter: drop-shadow(0 0 10px #f4d88c) drop-shadow(0 0 4px #fff); }
.die.sixes { filter: drop-shadow(0 0 18px #f4d88c) drop-shadow(0 0 6px #fff); animation: dieLand .32s cubic-bezier(.2, 1.6, .4, 1), sixesPulse .5s .32s ease-in-out infinite alternate; }
.die.snake { filter: grayscale(.4) drop-shadow(0 0 8px #b02a1f); }
.roll-msg {
  position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-weight: 800; font-size: 14px;
  padding: 1px 10px; border-radius: 10px; background: rgba(0, 0, 0, .55); opacity: 0;
}
.roll-msg.show { opacity: 1; animation: pop .25s ease-out; }
.roll-msg.double { color: #f4d88c; font-size: 18px; }
.roll-msg.sixes { color: #fff; background: linear-gradient(90deg, #c08b1f, #f4d88c, #c08b1f); color: #3c2415; font-size: 20px; }
.roll-msg.snake, .roll-msg.bust { color: #eea093; }
.h-actions { display: flex; gap: 12px; justify-content: center; }
.h-actions .btn { flex: 1; max-width: 230px; }
.btn.roll { background: linear-gradient(#ecc25a, #c08b1f); color: #2a180e; border-color: #6b452b; }
.r-pips { display: inline-flex; gap: 3px; vertical-align: middle; margin-inline-end: 4px; }
.r-pips i { width: 8px; height: 8px; border-radius: 2px; background: rgba(0, 0, 0, .25); }
.r-pips i.on { background: #2a180e; }
@keyframes tumble { 0% { transform: rotate(0) translateY(0); } 50% { transform: rotate(180deg) translateY(-14px) scale(.9); } 100% { transform: rotate(360deg) translateY(0); } }
@keyframes dieLand { 0% { transform: scale(1.35) rotate(-12deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes sixesPulse { to { transform: scale(1.12); } }

/* «تاسِ طلایی»: the hot-bazaar jackpot roll */
.golden {
  position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); z-index: 60; padding: 18px 34px 16px; border-radius: 18px; text-align: center;
  background: radial-gradient(circle at 50% 30%, rgba(82, 51, 31, .97), rgba(26, 15, 9, .97)); border: 3px solid #f4d88c;
  box-shadow: 0 0 0 6px rgba(244, 216, 140, .18), 0 0 60px rgba(224, 169, 46, .7), 0 20px 50px rgba(0, 0, 0, .7); animation: pop .3s ease-out;
}
.gd-title { font-family: var(--f-display); font-size: 34px; color: #f4d88c; line-height: 1.3; }
.gd-title small { display: block; font-family: var(--f-body, inherit); font-size: 14px; color: var(--cream); opacity: .85; }
.gd-dice { display: flex; gap: 18px; justify-content: center; margin: 12px 0 8px; }
.gd-dice .die { width: 76px; height: 76px; }
.die.gold .die-svg rect:first-child { fill: #f9e9bd; stroke: #c08b1f; }
.gd-res { min-height: 30px; font-weight: 800; font-size: 20px; color: #fff; }
.gd-res .num { color: #f4d88c; }

/* چهارشنبه‌سوری: jump over the fire */
.bonfire {
  position: absolute; z-index: 58; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 18px 12px; cursor: pointer;
  border-radius: 16px; border: 3px solid #ecc25a; color: #fff; font-family: inherit;
  background: radial-gradient(circle at 50% 70%, #e0705f, #6b452b 70%); box-shadow: 0 0 30px rgba(224, 112, 95, .9), 0 10px 24px rgba(0, 0, 0, .6);
  animation: pop .2s ease-out, bfShake .5s ease-in-out infinite alternate;
}
.bonfire .bf-flame { font-size: 46px; line-height: 1; animation: flicker .18s steps(2) infinite; }
.bonfire b { font-family: var(--f-display); font-weight: normal; font-size: 26px; line-height: 1.1; }
.bonfire small { font-size: 11px; opacity: .9; }
.bf-bar { position: absolute; left: 10px; right: 10px; bottom: 4px; height: 4px; border-radius: 2px; background: #f9e9bd; transform-origin: left; animation: bfTimer 2.6s linear forwards; }
.bonfire.jumped { animation: bfJump .5s ease-out forwards; pointer-events: none; }
@keyframes bfShake { to { transform: translateY(-4px) rotate(1.5deg); } }
@keyframes flicker { 50% { transform: scale(1.08, .94); } }
@keyframes bfTimer { to { transform: scaleX(0); } }
@keyframes bfJump { to { transform: translateY(-80px) scale(1.4); opacity: 0; } }

/* peddler: budget warning, sell-back, the evening visit */
.budget-line { text-align: center; margin: -4px auto 0; padding: 6px 14px; border-radius: 10px; width: fit-content; font-size: 15px; font-weight: 700; background: rgba(20, 104, 106, .3); }
.budget-line.warn { background: rgba(176, 42, 31, .35); color: #f7d0c8; }
button.tslot { font-family: inherit; color: inherit; cursor: pointer; padding: 0; transition: transform .12s, box-shadow .12s; }
button.tslot:hover { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--gold); }
.tslot.selling { box-shadow: 0 0 0 3px #cc4535, 0 0 18px rgba(204, 69, 53, .7); animation: shake .3s; }
.sell-hint { opacity: .75; }
.peddler.evening .offers { gap: 40px; }
.screen-peddler:has(.peddler.evening) { background-color: #081530; }

/* story time: the clock freezes while a visitor talks */
.clock.frozen { box-shadow: 0 0 0 2px #b9cdec, 0 0 14px rgba(185, 205, 236, .6); }
.clock.frozen::after { content: '⏸ زمان ایستاده'; position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%); font-size: 11px; font-weight: 800; color: #0e2350; background: #e1e9f6; padding: 0 6px; border-radius: 6px; }
.rb-locked { margin: 30px 14px; text-align: center; font-size: 15px; line-height: 1.9; opacity: .85; }
.chip.new-feature { background: linear-gradient(#f9e9bd, #ecc25a); color: #3c2415; font-weight: 800; animation: pop .4s ease-out; }

/* ---- dice haggle v2: roll, then choose ---- */
.lucky-line { margin-top: 3px; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.lucky-line small { opacity: .7; }
.lucky-num { color: #cdeeea; font-size: 16px; }
.lucky-line.pulse { animation: luckyPulse .6s ease-out; }
@keyframes luckyPulse { 30% { transform: scale(1.18); color: #cdeeea; text-shadow: 0 0 10px #cdeeea; } }
.beads-box { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.beads-box small { font-size: 12px; opacity: .75; font-weight: 700; }
.beads { display: flex; flex-wrap: wrap; gap: 3px; max-width: 210px; justify-content: flex-end; }
.beads i { width: 13px; height: 13px; border-radius: 50%; background: rgba(0, 0, 0, .35); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .5); transition: background .25s, transform .25s; }
.beads i.on { background: radial-gradient(circle at 35% 30%, #cdeeea, #26a8a4 70%); box-shadow: 0 0 4px rgba(151, 221, 215, .5); }
.beads i.on.warm { background: radial-gradient(circle at 35% 30%, #f9e9bd, #c08b1f 70%); box-shadow: 0 0 4px rgba(224, 169, 46, .5); }
.beads i.on.hot { background: radial-gradient(circle at 35% 30%, #f7d0c8, #b02a1f 70%); box-shadow: 0 0 6px rgba(204, 69, 53, .7); animation: beadShake .5s ease-in-out infinite; }
.beads .inf { font-size: 22px; font-weight: 800; color: #f4d88c; }
.beads .inf small { font-size: 11px; opacity: .8; }
@keyframes beadShake { 50% { transform: translateY(-1.5px); } }
.die { background: none; border: none; padding: 0; cursor: default; position: relative; }
.die.pickable { cursor: pointer; animation: pickBob .7s ease-in-out infinite alternate; }
.die.pickable:hover { transform: translateY(-6px) scale(1.08); filter: drop-shadow(0 0 10px #cdeeea) drop-shadow(0 6px 4px rgba(0, 0, 0, .5)); animation: none; }
.die.chosen { filter: drop-shadow(0 0 10px #cdeeea); }
.die.spent { opacity: .45; filter: grayscale(.6); transform: scale(.9); }
@keyframes pickBob { to { transform: translateY(-4px); } }
.assign-hint { min-height: 22px; text-align: center; font-size: 14px; opacity: 0; transition: opacity .2s; margin-top: -4px; }
.assign-hint.show { opacity: 1; }
.good-txt { color: #97ddd7; }
.risk { padding: 0 5px; border-radius: 5px; }
.risk.zero { background: #14686a; color: #fff; }
.risk.low { background: #1a8a88; color: #fff; }
.risk.mid { background: #c08b1f; color: #fff; }
.risk.high { background: #b02a1f; color: #fff; }
.dice-tray .rr { position: absolute; bottom: 4px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #f4d88c; background: #3c2415; color: #f4d88c; font-weight: 800; cursor: pointer; display: none; }
.dice-tray .rr[data-rr="0"] { inset-inline-start: calc(50% - 64px); }
.dice-tray .rr[data-rr="1"] { inset-inline-start: calc(50% + 40px); }
.dice-tray.can-reroll .rr { display: block; }
.tslot.pulse, .tal.pulse { animation: pop .4s ease-out; }

/* receipt as the payoff: bigger sales, bigger paper */
.receipt.big { transform: scale(1.12); transform-origin: top right; }
.receipt.huge { transform: scale(1.28); transform-origin: top right; box-shadow: 0 0 0 3px #f4d88c, 0 0 40px rgba(244, 216, 140, .75), 0 12px 30px rgba(0, 0, 0, .6); }
.rc-line.hot b { color: #a97b55; }
.receipt .rc-total { opacity: 1; animation: none; }
.receipt .rc-num { display: inline-block; min-width: 60px; text-align: left; }
.receipt.counting .rc-num { color: #a97b55; }
.receipt.landed .rc-total { animation: rcTotal .35s cubic-bezier(.2, 1.6, .4, 1); }
.receipt.landed .rc-num { color: #153573; }
.screen.shake-big { animation: shakeBig .45s ease-out; }
@keyframes shakeBig { 10% { transform: translate(-8px, 4px); } 30% { transform: translate(7px, -5px); } 50% { transform: translate(-5px, 3px); } 70% { transform: translate(3px, -2px); } 100% { transform: none; } }

/* daily target («دخلِ امروز»), boss day, best sale */
.day-goal { position: relative; height: 20px; width: 380px; margin: 4px auto 0; border-radius: 10px; overflow: hidden; background: rgba(0, 0, 0, .35); box-shadow: inset 0 0 0 1px rgba(244, 216, 140, .25); display: flex; align-items: center; justify-content: center; }
.day-goal span { position: relative; z-index: 1; font-size: 12.5px; font-weight: 800; text-shadow: 0 1px 2px rgba(0, 0, 0, .8); white-space: nowrap; }
.dg-fill { position: absolute; inset-block: 0; inset-inline-start: 0; background: linear-gradient(270deg, #26a8a4, #97ddd7); transition: width .5s cubic-bezier(.2, 1.3, .4, 1); }
.dg-fill.hit { background: linear-gradient(270deg, #c08b1f, #f4d88c); box-shadow: 0 0 12px #f4d88c; }
.boss-card { margin: 0 auto 8px; width: fit-content; max-width: 860px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 18px; border-radius: 12px;
  background: linear-gradient(rgba(104, 21, 15, .85), rgba(38, 7, 6, .9)); border: 2px solid #cc4535; box-shadow: 0 0 18px rgba(204, 69, 53, .45); }
.boss-card b { font-size: 17px; color: #f4d88c; }
.boss-card span { font-size: 14px; }
.boss-card small { font-size: 12px; color: #f4d88c; }
.best-sale { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: rgba(236, 194, 90, .14); border: 1px solid rgba(236, 194, 90, .5); }
.bs-head { font-size: 14px; margin-bottom: 4px; }
.bs-lines { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 13px; }
.bs-lines span { background: rgba(0, 0, 0, .25); padding: 0 6px; border-radius: 6px; }
.bs-lines span.charm { background: rgba(236, 194, 90, .45); color: #2a180e; }
.bs-lines i { opacity: .6; font-style: normal; }
.bs-lines b { color: var(--gold); font-size: 16px; }
/* compact haggle desk so everything fits */
.dice-haggle { gap: 6px; }
.dice-haggle .h-item .emoji { font-size: 42px; }
.dice-haggle .h-item { font-size: 16px; }
.dice-haggle .dice-tray { height: 78px; }
.dice-haggle .die { width: 52px; height: 52px; }
.dice-haggle .h-offer b { font-size: 30px; }
.dice-haggle .h-actions .btn.big { padding: 8px 20px; font-size: 19px; }
.dice-haggle .assign-hint { min-height: 20px; font-size: 13px; }
.clock.slow { box-shadow: 0 0 0 2px #ecc25a; }
.clock.slow::after { content: '🐢 زمان آهسته'; position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%); font-size: 11px; font-weight: 800; color: #3c2415; background: #f9e9bd; padding: 0 6px; border-radius: 6px; }
.screen-morning .boss-card { position: absolute; top: 76px; left: 50%; transform: translateX(-50%); z-index: 3; margin: 0; flex-direction: row; flex-wrap: wrap; justify-content: center; column-gap: 12px; padding: 6px 16px; }
.morning-grid.with-boss { top: 140px; }
.morning-grid.with-boss.with-notes { top: 170px; }
.screen-morning:has(.boss-card) .morning-notes { top: 128px; }

/* «همیشگی‌ها»: regulars with memory (badge on the nameplate and in the queue, memory tooltip, granddaughter) */
.reg-badge { display: inline-block; margin-inline-start: 6px; font-size: 11.5px; font-weight: 800; background: linear-gradient(#f9e9bd, #ecc25a); color: #3c2415; border-radius: 8px; padding: 0 7px; cursor: help; box-shadow: 0 0 0 1px #8a5d3c; }
.reg-badge.m-fair, .q-reg.m-fair { background: linear-gradient(#cdeeea, #97ddd7); color: #0a3534; box-shadow: 0 0 0 1px #14686a; }
.reg-badge.m-gouge, .reg-badge.m-storm, .q-reg.m-gouge, .q-reg.m-storm { background: linear-gradient(#f7d0c8, #eea093); color: #68150f; box-shadow: 0 0 0 1px #b02a1f; }
.q-person.reg { box-shadow: inset 0 0 0 2px rgba(236, 194, 90, .75); border-radius: 10px; }
.q-reg { position: absolute; top: 2px; left: 50%; transform: translateX(-50%); z-index: 1; font-size: 10px; font-weight: 800; line-height: 15px; white-space: nowrap; padding: 0 5px; border-radius: 6px;
  background: linear-gradient(#f9e9bd, #ecc25a); color: #3c2415; box-shadow: 0 0 0 1px #8a5d3c; pointer-events: none; }
.bubble .reg-say { display: block; font-size: .86em; font-weight: 700; color: #8a5d3c; margin-bottom: 2px; }
.reg-fx { display: inline-block; font-size: 11px; font-weight: 800; padding: 0 6px; border-radius: 6px; margin-inline-start: 4px; cursor: help; }
.reg-fx.good { background: #97ddd7; color: #0a3534; }
.reg-fx.bad { background: #eea093; color: #68150f; }
.portrait:has(.reg-kid) { position: relative; }
.portrait .reg-kid { position: absolute; left: -16px; bottom: -6px; width: 92px; height: 107px; z-index: 1; }
.portrait .reg-kid svg { animation-delay: -1.3s; }

/* =========================================================================
   v4 LAYOUT SYSTEM — one place that decides where everything lives, so nothing collides
   HUD zones · desk layouts · floating lanes (toasts, receipts, phone, unlocks, banners)
   ========================================================================= */
/* HUD: money | clock + target | rent + charms (two rows) */
.hud { height: 64px; padding-inline: 16px 56px; gap: 14px; }
.hud-a { width: 330px; flex: none; gap: 12px; }
.hud-c { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.hud-b { width: 470px; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.hud-row { display: flex; align-items: center; gap: 6px; justify-content: flex-end; max-width: 100%; }
.hud .tals { gap: 2px; }
.hud .tal { font-size: 19px; }
.hud .icon-btn { width: 28px; height: 28px; font-size: 14px; display: grid; place-items: center; padding: 0; }
.hud .rentbar { width: 330px; height: 20px; }
.hud .clock, .hud .day-goal { width: 100%; max-width: 420px; margin: 0; }
.hud .clock { height: 20px; justify-content: flex-end; padding-inline: 10px; }
.clock-date { position: absolute; inset-inline-start: 10px; font-size: 11.5px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px #000; white-space: nowrap; z-index: 1; }
.hud #clockTxt { position: relative; z-index: 1; }
.clock.frozen::after, .clock.slow::after { inset-inline-end: auto; inset-inline-start: 50%; transform: translate(50%, -50%); z-index: 2; }
.day-main { top: 72px; height: 476px; }

/* floating lanes */
#toasts { top: auto; bottom: 184px; left: 50%; transform: translateX(-50%); z-index: 54; width: max-content; max-width: 720px; }
.toast { white-space: normal; text-align: center; max-width: 720px; }
.receipt { transform-origin: top left; }
.receipt.big, .receipt.huge { transform-origin: top left; }
#phone { top: 84px; left: auto; right: 14px; transform: none; }
#unlocks { top: 84px; left: 14px; transform: none; align-items: flex-start; }
.banner { top: 36%; max-width: 1100px; white-space: normal; }

/* buttons: three sizes, one shape */
.btn { border-radius: 12px; }
.btn.big { padding: 10px 24px; font-size: 19px; }

/* ---- dice bag haggle (v3) ---- */
.dice-haggle { display: flex; flex-direction: column; gap: 7px; width: 100%; padding: 0 6px; }
.hg-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hg-top .h-item { min-width: 0; }
.hg-top .h-item .emoji { font-size: 40px; }
.hg-top .h-item b { font-size: 16px; display: block; line-height: 1.4; }
.hg-top .h-item small { display: block; font-size: 12px; }
.hg-top .h-offer { align-items: flex-end; flex: none; }
.hg-top .h-offer b { font-size: 30px; }
.anger-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 10px; border-radius: 10px; background: rgba(0, 0, 0, .25); min-height: 34px; }
.anger-lbl { font-size: 13px; font-weight: 700; white-space: nowrap; }
.anger { display: flex; gap: 4px; align-items: center; }
.anger i { width: 24px; height: 24px; border-radius: 50%; border: 2px dashed rgba(244, 216, 140, .45); display: grid; place-items: center; font-style: normal; font-size: 14px; line-height: 1; }
.anger i.f { border: 2px solid #eea093; background: radial-gradient(circle at 35% 30%, #eea093, #b02a1f 70%); animation: pop .25s ease-out; }
.anger i.f.hot { box-shadow: 0 0 10px rgba(204, 69, 53, .8); }
.anger.pulse { animation: shake .4s; }
.anger .inf { font-size: 22px; font-weight: 800; color: #f4d88c; }
.anger small { font-size: 11px; opacity: .85; }
.h-tally { font-size: 13px; font-weight: 800; white-space: nowrap; opacity: .9; }
.dice-haggle .dice-tray { height: 78px; gap: 10px; }
.dice-haggle .die { width: 50px; height: 50px; }
.die.land.hit { filter: drop-shadow(0 0 8px #f4d88c) drop-shadow(0 4px 3px rgba(0, 0, 0, .5)); }
.die.land.bad { filter: drop-shadow(0 0 9px #e0705f) drop-shadow(0 4px 3px rgba(0, 0, 0, .5)); animation: dieLand .32s cubic-bezier(.2, 1.6, .4, 1), shake .35s .32s; }
.die.land.star { filter: drop-shadow(0 0 10px #97ddd7) drop-shadow(0 4px 3px rgba(0, 0, 0, .5)); }
.die.land.blank { opacity: .8; }
.die.pair { transform: translateY(-7px) scale(1.1); filter: drop-shadow(0 0 14px #97ddd7) drop-shadow(0 0 4px #fff); }
.die.jack { animation: sixesPulse .5s ease-in-out infinite alternate; filter: drop-shadow(0 0 18px #f4d88c) drop-shadow(0 0 6px #fff); }
.roll-msg.warn { color: #eea093; }
.h-actions .rr-btn { flex: none; max-width: none; padding: 8px 12px; font-size: 16px; }
/* dice in the peddler */
.die-card .t-die { width: 66px; height: 66px; margin: 6px auto 2px; }
.t-faces { display: flex; gap: 3px; justify-content: center; font-size: 17px; margin: 2px 0 4px; }
.t-tag.dice { background: #2a62b5; color: #fff; }
.bag-title { margin-top: 8px; }
.bag { display: flex; gap: 6px; margin-top: 4px; }
.bag-die { width: 40px; height: 40px; padding: 0; border: none; background: none; cursor: pointer; transition: transform .12s; }
.bag-die:hover { transform: translateY(-3px); }
.bag-die.selling { outline: 3px solid #cc4535; border-radius: 10px; animation: shake .3s; }
.dice-haggle .dice-tray { height: 96px; align-items: flex-start; padding-top: 8px; }
.dice-haggle .roll-msg { bottom: 3px; font-size: 13px; }
/* official desk: the notice fits under the inspect button, stamp included */
.desk.t-official { align-items: flex-start; }
.desk.t-official .notice { transform: scale(.88); transform-origin: top center; margin-top: 30px; }
.desk.t-official .insp-btn, .desk.t-seller .insp-btn { top: 6px; }
.desk.t-seller .offer { margin-top: 26px; }
/* banknotes: tight line-height so the serial number is never clipped */
.note > * { line-height: 1.25; }
.note .note-art { line-height: 1.1; }
/* toasts live in the door/queue column (right), stacking up from above the shelf: never over the desk or its buttons */
#toasts { top: auto; bottom: 184px; left: auto; right: 10px; transform: none; width: 248px; max-width: 248px; align-items: stretch; }
#toasts .toast { max-width: 248px; font-size: 13px; padding: 5px 12px; border-radius: 12px; line-height: 1.6; }
.anger i.t { border: 2px solid rgba(244, 216, 140, .55); background: rgba(255, 255, 255, .12); font-size: 12px; }

/* legendary: the one thing allowed outside the palette, so it reads as special at a glance */
.tcard.r-legend, .bk-tal.r-legend { border-color: var(--legend); background: linear-gradient(#f3e6ff, #e3c2ff); color: var(--ink);
  box-shadow: 0 8px 0 #5a1f8a, 0 0 26px rgba(168, 60, 255, .7); animation: legendGlow 1.6s ease-in-out infinite alternate; }
.tslot.r-legend { border-color: var(--legend); box-shadow: 0 0 12px rgba(168, 60, 255, .7); }
.tal.r-legend { filter: drop-shadow(0 0 5px var(--legend)) drop-shadow(0 0 2px var(--legend-2)); }
.unlock-toast.r-legend { border-color: var(--legend); box-shadow: 0 0 0 4px rgba(168, 60, 255, .2), 0 14px 40px rgba(0, 0, 0, .7), 0 0 44px rgba(168, 60, 255, .8); }
@keyframes legendGlow { to { box-shadow: 0 8px 0 #5a1f8a, 0 0 38px rgba(255, 95, 176, .9); } }
/* rare = lapis everywhere */
.tcard.r-rare, .bk-tal.r-rare { border-color: var(--lapis-l); }
.tslot.r-rare { border-color: var(--lapis-l); box-shadow: 0 0 10px rgba(79, 131, 201, .55); }
.tal.r-rare { filter: drop-shadow(0 0 3px var(--lapis-l)); }

/* ---- story spine: the dossier, Haji's suspicion ---- */
.dossier-btn { position: relative; }
.dossier-btn .badge { position: absolute; top: -6px; inset-inline-start: -6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--gold); color: var(--ink); font-size: 10px; font-weight: 800; line-height: 16px; }
.modal-card.dossier { width: 520px; max-width: 92%; }
.dos-sub { font-size: 13px; opacity: .8; margin: -4px 0 10px; }
.dos-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.dos-row { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; column-gap: 8px; padding: 6px 10px; border-radius: 10px; background: rgba(0, 0, 0, .06); border: 1px dashed rgba(42, 24, 14, .3); }
.dos-row small { grid-column: 2 / 4; font-size: 12px; opacity: .75; }
.dos-row.ok { background: rgba(38, 168, 164, .16); border: 1px solid var(--turq); }
.dos-row.gone { opacity: .5; text-decoration: line-through; }
.dos-ic { font-size: 22px; text-align: center; }
.dos-name { font-weight: 800; }
.dos-st { font-weight: 800; }
.dos-row.ok .dos-st { color: var(--turq-d); }
.dos-sus { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 12px; font-weight: 800; }
.dos-sus small { width: 100%; text-align: center; font-weight: 600; opacity: .75; }
.sus-pips { display: inline-flex; gap: 3px; vertical-align: middle; }
.sus-pips i { width: 10px; height: 10px; border-radius: 50%; background: rgba(0, 0, 0, .2); border: 1px solid rgba(0, 0, 0, .25); }
.sus-pips i.on { background: var(--pome); border-color: #68150f; box-shadow: 0 0 5px rgba(176, 42, 31, .6); }
.week-dossier { margin-top: 10px; font-size: 15px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.chip.dossier-chip { cursor: pointer; background: rgba(236, 194, 90, .18); border-color: var(--gold); color: var(--cream); font-family: inherit; }
.btn.dossier-play { background: linear-gradient(#f4d88c, #c08b1f); }
.end-text { font-size: 16px; line-height: 1.9; margin: 6px 0 10px; }

/* ---------------- the icon set (js/icons.js): inline SVG, sized by the font around it ---------------- */
.ico { display: inline-block; width: 1.15em; height: 1.15em; vertical-align: -.22em; flex: none; overflow: visible; }
.ico.em { width: 1.1em; height: 1.1em; }
.ico.charm { filter: drop-shadow(0 1px 1.5px rgba(14, 8, 5, .45)); }
.ico.charm.em { width: 1.25em; height: 1.25em; vertical-align: -.3em; }
.ico.charm-raw { width: 1.2em; height: 1.2em; }
.ico.h2-ico { width: 1.1em; height: 1.1em; vertical-align: -.2em; }
.coin .ico { width: 1.3em; height: 1.3em; vertical-align: -.3em; }
.aberu-label .ico { width: 1.25em; height: 1.25em; vertical-align: -.3em; }
.streak .flame .ico { width: 1.25em; height: 1.25em; }
.hud .tal .ico { width: 1.3em; height: 1.3em; }
#muteBtn .ico, .icon-btn .ico, .hud .icon-btn .ico { width: 20px; height: 20px; vertical-align: middle; }
#muteBtn { display: grid; place-items: center; padding: 0; }
.q-icon .ico { width: 17px; height: 17px; vertical-align: 0; }
.env-seal { background: none; box-shadow: none; }
.env-seal .ico { width: 54px; height: 54px; filter: drop-shadow(0 3px 3px rgba(14, 8, 5, .5)); }
.fc-icon .ico { width: 1.2em; height: 1.2em; }
.crate .ico, .tea .ico, .ia-emoji .ico, .rain-coin .ico, .bf-flame .ico { vertical-align: 0; }
.crate .ico, .ia-emoji .ico { width: 1em; height: 1em; }
.tslot .ico.charm { width: 46px; height: 46px; margin-bottom: 3px; }
.t-emoji .ico.charm { width: 1.1em; height: 1.1em; vertical-align: 0; }
.bk-emoji .ico.charm { width: 1.02em; height: 1.02em; vertical-align: 0; }
.bk-lock .ico { width: 1.2em; height: 1.2em; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6)); }
.sil .ico { filter: none; }
.ut-emoji .ico.charm { width: 1.3em; height: 1.3em; vertical-align: 0; }
.btn .ico { vertical-align: -.25em; }
.btn.big .ico { width: 1.2em; height: 1.2em; }
.anger i .ico, #hAnger i .ico { width: 80%; height: 80%; vertical-align: middle; }
.ico-emoji { font-style: normal; }

/* ---------------- the logo: the key emblem under the arch's apex, the name in gold with an ink outline ---------------- */
.title-main > .title-emblem { position: absolute; left: 50%; top: calc(50% - 150px); transform: translate(-50%, -50%); z-index: 1; line-height: 0;
  filter: drop-shadow(0 6px 10px rgba(14, 8, 5, .65)); animation: emblemIn .9s cubic-bezier(.2, .9, .3, 1.2) both; }
.title-emblem .emblem { display: block; }
.title-portal path[stroke="#153573"][opacity=".9"] { display: none; } /* the muqarnas gives way to the emblem */
@keyframes emblemIn { from { opacity: 0; transform: translate(-50%, -50%) scale(.6) rotate(-25deg); } }
.title-main { padding-top: 204px; }
.title-fa { font-size: 136px; -webkit-text-stroke: 3px #2a180e; letter-spacing: 1px; }
.tagline { margin-bottom: 18px; color: var(--paper); font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 12px; }
.tagline::before, .tagline::after { content: ''; width: 54px; height: 2px; background: linear-gradient(90deg, transparent, #ecc25a); }
.tagline::after { background: linear-gradient(-90deg, transparent, #ecc25a); }
.title-main .epigraph { margin-top: 14px; }
.bk-emoji .ico.charm-raw { width: 1.02em; height: 1.02em; vertical-align: 0; }
.bk-tal.locked .bk-emoji .ico.charm-raw { width: 1.05em; height: 1.05em; }
/* the progress bar of a locked charm never gets squeezed away by a two-line goal */
.bk-prog { flex: none; }
.bk-tal.locked .bk-goal { line-height: 1.3; }
.bk-tal.locked .bk-prog { margin-top: 0; }
.bk-emoji .ico, .ut-emoji .ico, .t-emoji .ico { display: block; margin: 0 auto; }

/* ---------------- v5 engine: luck, engraving, price creep, sadaqa ---------------- */
.luck-chip { display: inline-flex; align-items: center; gap: 3px; margin-inline-start: 8px; padding: 1px 8px; border-radius: 99px; font-size: 13px; font-weight: 800;
  background: rgba(38, 168, 164, .22); border: 1px solid rgba(92, 198, 192, .55); color: #cdeeea; cursor: help; }
.luck-chip.zero { opacity: .45; font-weight: 600; }
.luck-chip .ico, .luck-chip .ico-emoji { width: 1.1em; height: 1.1em; font-size: 1em; }
.die.land.lucky { filter: drop-shadow(0 0 12px #5cc6c0) drop-shadow(0 0 4px #fff); animation: luckyFlip .34s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes luckyFlip { 0% { transform: rotateY(90deg) scale(.9); } 100% { transform: rotateY(0) scale(1); } }
/* engraving card: from-face ← to-face */
.engrave-card { background: linear-gradient(#cdeeea, #5cc6c0); }
.engrave-card.picking { outline: 4px solid #f4d88c; outline-offset: 3px; animation: engraveGlow .8s ease-in-out infinite alternate; }
@keyframes engraveGlow { to { outline-color: #fbf5e8; box-shadow: 0 8px 0 #6b452b, 0 0 26px #f4d88c; } }
.t-engrave { display: flex; align-items: center; gap: 8px; margin: 6px 0 2px; }
.t-engrave .die-svg { width: 54px; height: 54px; }
.t-engrave .arrow { font-size: 26px; font-weight: 900; color: var(--ink); }
/* the bag shows every face, so an engraved die reads at a glance */
.bag-die { width: 46px; height: auto; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.bag-die > .die-svg { width: 40px; height: 40px; }
.mini-faces { display: grid; grid-template-columns: repeat(3, 14px); gap: 1px; padding: 1px; border-radius: 4px; background: rgba(0, 0, 0, .28); }
.mini-faces i { width: 14px; height: 14px; display: block; }
.mini-faces svg { width: 14px; height: 14px; display: block; }
.bag-die.engraved .mini-faces { box-shadow: 0 0 0 1px #5cc6c0; }
.bag.engraving .bag-die.can-engrave { outline: 3px solid #f4d88c; border-radius: 10px; animation: engraveGlow .7s ease-in-out infinite alternate; }
.bag.engraving .bag-die.no-engrave { opacity: .35; cursor: not-allowed; }
.creep { font-size: 13px; opacity: .85; text-align: center; cursor: help; }
.sadaqa-btn small { display: block; font-size: 11px; opacity: .85; }
/* four stall cards + the face strip under each die must fit the 720px stage */
.peddler .offers { margin: 8px 0 12px; gap: 22px; }
.peddler .tcard { padding: 12px 14px; }
.peddler .t-desc { min-height: 48px; margin: 2px 0 6px; line-height: 1.6; }
.peddler .t-emoji { font-size: 56px; }
.peddler .tcard .ico.charm { width: 64px; height: 64px; }
.mini-faces { grid-template-columns: repeat(3, 12px); }
.mini-faces i, .mini-faces svg { width: 12px; height: 12px; }

/* ---------------- v6: four acts (food, phones, coins), endings ---------------- */
/* act cards on the week screen: a coffeehouse-painting header per act */
.act-badge { display: inline-block; padding: 4px 16px; border-radius: 99px; background: var(--saffron); color: var(--ink); font-family: var(--f-display); font-size: 22px; margin-bottom: 6px; }
.act-news { font-size: 17px; font-weight: 700; color: #f9e9bd; margin: 4px 0; }
.act-sub { font-size: 14px; opacity: .85; margin-bottom: 8px; line-height: 1.7; }
.week-card.act-food .act-badge { background: #97ddd7; }
.week-card.act-phone .act-badge { background: #83a8db; }
.week-card.act-gold .act-badge { background: linear-gradient(#f4d88c, #c08b1f); }
/* family chips on shelf items */
.fam-chip { position: absolute; top: 3px; inset-inline-start: 3px; font-size: 10px; font-weight: 800; padding: 0 5px; border-radius: 99px; background: rgba(42, 24, 14, .72); color: #f9e9bd; line-height: 1.5; }
.fam-chip.fresh { color: #97ddd7; letter-spacing: 1px; }
.fam-chip.fresh.f1 { color: #e0705f; }
.fam-chip.gold { color: #f4d88c; }
/* the fridge: four cold slots beside the shelf */
.shelf-wrap { display: flex; align-items: flex-end; gap: 10px; }
.fridge { display: none; }
.fridge.on { display: flex; flex-direction: column; gap: 2px; padding: 4px 6px 6px; border-radius: 10px; background: linear-gradient(#cdeeea, #97ddd7); border: 3px solid #5cc6c0; box-shadow: inset 0 0 12px rgba(255, 255, 255, .6); }
.fridge-head { font-size: 11px; font-weight: 800; color: var(--ink); text-align: center; }
.fridge-slots { display: flex; gap: 4px; }
.fridge .slot { background: rgba(255, 255, 255, .35); }
/* food: the official price on the haggle */
.cap-tag { display: inline-block; margin-inline-start: 6px; padding: 1px 8px; border-radius: 99px; font-size: 12px; font-weight: 800; background: #14686a; color: #cdeeea; cursor: help; }
.cap-tag.over { background: #b02a1f; color: #fbf5e8; animation: shake .35s; }
.offer-mult.over { color: #e0705f; }
/* sellers' goods: what to check on the back */
.exp-label, .box-label, .gold-label { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 12px; border-radius: 6px; background: #fbf5e8; color: var(--ink); border: 2px dashed #8a5d3c; font-weight: 800; }
.exp-label small, .box-label small, .gold-label small { font-size: 11px; opacity: .75; font-weight: 600; }
.box-label b { font-size: 14px; letter-spacing: 1px; }
.imei-screen { font-weight: 900; letter-spacing: 1px; padding: 0 6px; border-radius: 4px; background: #153573; color: #b9cdec; }
.rb-goods { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; line-height: 1.6; }
.rb-good { padding: 3px 6px; border-radius: 6px; background: rgba(42, 24, 14, .06); }
/* morning suppliers */
.sup-tabs { display: flex; gap: 6px; margin: 2px 0 4px; }
.sup-tab { flex: 1; padding: 4px 6px; border-radius: 8px; border: 2px solid rgba(244, 216, 140, .35); background: rgba(249, 233, 189, .06); color: var(--cream); font: inherit; font-size: 12px; cursor: pointer; }
.sup-tab.on { background: var(--saffron); color: var(--ink); border-color: var(--saffron); font-weight: 800; }
.fridge-buy { width: 100%; margin: 4px 0; }
.fridge-buy small { display: block; font-size: 11px; }
/* act 4: the live dollar rate in the HUD */
.rate { display: none; }
.rate.up, .rate.down, .rate:not(:empty) { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12.5px; margin-top: 2px; }
.rate.up { color: #97ddd7; }
.rate.down { color: #eea093; }
.rate-spark { width: 60px; height: 18px; }
/* endings */
.end-card.ending { align-items: center; }
.end-art { width: 320px; flex: none; display: flex; justify-content: center; }
.ea-group { display: flex; align-items: flex-end; justify-content: center; }
.ea-p { width: 150px; margin-inline-start: -30px; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .5)); }
.ea-p:first-child { margin-inline-start: 0; }
.ea-p.small { width: 110px; opacity: .85; }
.end-haji.grey { filter: grayscale(.7) drop-shadow(0 20px 30px rgba(0, 0, 0, .6)); }
.end-count { font-size: 13px; letter-spacing: .5px; color: var(--saffron); }
.end-title small { display: block; font-size: 16px; opacity: .8; font-family: var(--f-body); }
.end-epi { font-size: 14px; opacity: .8; font-style: italic; border-inline-start: 3px solid var(--saffron); padding-inline-start: 10px; margin: 6px 0; }
.end-strip { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; margin: 8px 0; }
.end-tile { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 99px; background: rgba(249, 233, 189, .08); border: 1px solid rgba(249, 233, 189, .25); cursor: help; }
.end-tile.seen { background: rgba(236, 194, 90, .2); border-color: var(--saffron); }
.end-tile.locked { opacity: .55; }
.endings-gallery { width: 760px; }
.eg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 12px 0 16px; }
.end-tile.big { flex-direction: column; border-radius: 14px; padding: 12px; text-align: center; min-height: 120px; justify-content: center; }
.end-tile.big .et-ic { font-size: 34px; }
.end-tile.big small { font-size: 12px; opacity: .85; line-height: 1.6; }
.father-btn { background: linear-gradient(#f9e9bd, #ecc25a); }
.father-reveal { width: 620px; text-align: center; }
.fr-art { display: flex; align-items: center; justify-content: center; gap: 10px; }
.fr-art > svg, .fr-art > div { width: 150px; }
.fr-arrow { font-size: 30px; color: var(--saffron); }
/* how to play */
.howto { width: 820px; }
.howto-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin: 10px 0 14px; text-align: start; }
.ht-row { display: flex; gap: 10px; align-items: flex-start; }
.ht-ic { font-size: 30px; line-height: 1; flex: none; width: 40px; text-align: center; }
.ht-ic .ico { width: 34px; height: 34px; }
.ht-row b { font-size: 16px; color: var(--saffron); }
.ht-row p { margin: 2px 0 0; font-size: 13.5px; line-height: 1.75; }
/* ---------------- selling UX: goods on the counter, a price meter, reactions, motion ---------------- */
.want-items { display: flex; gap: 10px; justify-content: center; margin: 8px 0 4px; }
.want-item { position: relative; width: 96px; padding: 6px 4px 4px; border-radius: 12px; border: 3px solid var(--saffron); background: linear-gradient(#fbf5e8, #efe2c2); color: var(--ink);
  cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: 0 5px 0 #8a5d3c, 0 0 18px rgba(236, 194, 90, .45);
  animation: wantIn .35s cubic-bezier(.2, 1.4, .4, 1) both; transition: transform .12s; }
.want-item:nth-child(2) { animation-delay: .05s; } .want-item:nth-child(3) { animation-delay: .1s; } .want-item:nth-child(4) { animation-delay: .15s; }
.want-item:hover { transform: translateY(-5px) scale(1.04); }
.want-item:active { transform: translateY(1px) scale(.97); }
.want-item .item-svg { width: 64px; height: 64px; }
.want-item > span { position: relative; height: 16px; }
.want-item > span .era-chip, .want-item > span .fam-chip { position: static; font-size: 10px; }
.want-item b { font-size: 15px; }
@keyframes wantIn { from { opacity: 0; transform: translateY(18px) scale(.8); } }
.want .want-big { display: none; }
.want:has(.want-items) .want-big { display: none; }
.want:not(:has(.want-items)) .want-big { display: flex; }
/* the price meter */
.price-meter { position: relative; height: 16px; margin: 2px 4px 6px; border-radius: 99px; background: rgba(0, 0, 0, .35); border: 1px solid rgba(249, 233, 189, .25); overflow: visible; }
.pm-fill { position: absolute; inset-block: 2px; inset-inline-start: 2px; width: 0; max-width: calc(100% - 4px); border-radius: 99px; background: linear-gradient(90deg, #c08b1f, #ecc25a);
  transition: width .45s cubic-bezier(.2, .9, .3, 1.2), background .3s; }
.pm-fill.good { background: linear-gradient(90deg, #1a8a88, #5cc6c0); box-shadow: 0 0 10px #5cc6c0; }
.pm-fill.over { background: linear-gradient(90deg, #b02a1f, #e0705f); box-shadow: 0 0 10px #e0705f; }
.pm-worth { position: absolute; inset-inline-start: 50%; top: -4px; bottom: -4px; width: 3px; border-radius: 2px; background: #fbf5e8; }
.pm-worth small { position: absolute; top: -15px; inset-inline-start: -14px; font-size: 10px; font-style: normal; white-space: nowrap; opacity: .85; }
.price-meter.capped::after { content: ''; position: absolute; inset-block: 1px; inset-inline-start: calc(50% + 4px); inset-inline-end: 1px; border-radius: 0 99px 99px 0; background: repeating-linear-gradient(45deg, rgba(176, 42, 31, .35) 0 5px, transparent 5px 10px); pointer-events: none; }
.pm-pct { position: absolute; inset-inline-end: 8px; top: 0; font-size: 11px; font-weight: 800; line-height: 16px; color: #fbf5e8; text-shadow: 0 1px 2px #000; }
.h-offer b.rolling { transform: scale(1.12); }
/* reactions + anticipation */
.float.react { font-size: 34px; animation: reactPop 1.1s cubic-bezier(.2, 1.5, .4, 1) forwards; }
.float.react .ico, .float.react .ico-emoji { width: 38px; height: 38px; font-size: 34px; }
@keyframes reactPop { 0% { transform: translate(-50%, 0) scale(.3); opacity: 0; } 25% { transform: translate(-50%, -30px) scale(1.15); opacity: 1; } 80% { opacity: 1; } 100% { transform: translate(-50%, -54px) scale(1); opacity: 0; } }
.dice-tray.charge .die { animation: charge .18s ease-in-out; }
@keyframes charge { 50% { transform: scale(1.12, .82) translateY(4px); } }
#hudMoney b.rolling { color: #f9e9bd; text-shadow: 0 0 10px #ecc25a; }
.slot.fresh-in { animation: slotIn .35s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes slotIn { from { transform: scale(.7); opacity: 0; } }
/* reduce motion */
.calm-motion *, .calm-motion *::before, .calm-motion *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
/* the dollar ticker floats under the clock (act 4) instead of pushing the HUD up */
.hud-c { position: relative; }
.rate.up, .rate.down, .rate:not(:empty) { position: absolute; top: calc(100% + 4px); left: 50%; transform: translateX(-50%); z-index: 6; margin: 0;
  padding: 2px 12px; border-radius: 99px; background: rgba(26, 15, 9, .88); border: 1px solid rgba(244, 216, 140, .4); white-space: nowrap; pointer-events: none; }
.kativeh.gone { visibility: hidden; }
/* the fridge: a compact 2×2 cold box that never squeezes the shelf */
.fridge.on { flex: none; padding: 3px 5px 5px; align-self: flex-end; margin-bottom: 6px; }
.fridge-slots { display: grid; grid-template-columns: repeat(2, 64px); grid-auto-rows: 62px; gap: 4px; }
.fridge .slot { width: 64px; height: 62px; min-width: 0; padding: 0; }
.fridge .slot .emoji { width: 46px; height: 46px; margin: 2px auto 0; }
.fridge .slot .emoji svg { width: 46px; height: 46px; }
.fridge .slot .s-val { font-size: 10px; bottom: 1px; }
.fridge .slot .fam-chip { font-size: 8px; top: 1px; }
.fridge .slot.empty { background: rgba(255, 255, 255, .25); border: 2px dashed rgba(20, 104, 106, .4); }
/* the first-ever morning: Mash Hassan says "just sell today" */
.first-morning { position: absolute; top: 74px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; z-index: 3;
  background: rgba(26, 15, 9, .92); border: 2px solid var(--saffron); border-radius: 14px; padding: 8px 18px 8px 10px; width: 640px; }
.fm-hassan { width: 70px; flex: none; }
.fm-text { font-size: 16px; line-height: 1.7; }
.morning-grid.first { opacity: .35; pointer-events: none; filter: grayscale(.5); }
.sadaqa-btn.hidden { visibility: hidden; }
.rx-tag { display: inline-block; padding: 0 8px; border-radius: 6px; background: #fbf5e8; color: var(--ink); font-size: .8em; font-weight: 800; border: 2px dashed #26a8a4; cursor: help; }
.holo-label { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 12px; border-radius: 6px; font-weight: 800;
  background: linear-gradient(120deg, #e1e9f6, #97ddd7, #f4d88c, #e1e9f6); color: var(--ink); border: 2px solid #83a8db; }
.holo-label.none { background: #e6d6b2; border-style: dashed; border-color: #8a5d3c; }
.holo-label small { font-size: 11px; opacity: .75; font-weight: 600; }
.fam-chip.herb { color: #97ddd7; }
.continue-btn small { display: block; font-size: 12px; font-weight: 600; opacity: .9; }
/* «دفترچه‌ی مش حسن»: the first days' checklist in the queue column */
.tut-card { width: 156px; margin-top: auto; padding: 6px 8px 8px; border-radius: 10px; background: #f9e9bd; color: var(--ink); border: 2px solid #c08b1f;
  box-shadow: 0 4px 0 #8a5d3c, 0 8px 18px rgba(0, 0, 0, .4); font-size: 12px; animation: wantIn .4s both; position: relative; z-index: 2; }
.tut-head { display: flex; align-items: center; gap: 4px; font-size: 12px; }
.tut-face { width: 30px; height: 30px; border-radius: 50%; overflow: hidden; background: #e0c29c; flex: none; }
.tut-face svg { width: 44px; margin: -4px 0 0 -7px; }
.tut-x { margin-inline-start: auto; border: none; background: none; font-size: 16px; line-height: 1; cursor: pointer; color: #8a5d3c; padding: 0 2px; }
.tut-list { margin: 4px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; }
.tut-list li { display: flex; gap: 5px; align-items: flex-start; line-height: 1.45; padding: 2px 4px; border-radius: 6px; background: rgba(255, 255, 255, .45); font-weight: 700; }
.tut-list li.done { background: rgba(38, 168, 164, .22); color: #0f4e4c; text-decoration: line-through; text-decoration-color: rgba(15, 78, 76, .5); }
.queue-col:has(.tut-card) .day-chips { display: none; }
/* ---------------- the later acts' mini-games ---------------- */
.mg { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.mg-head { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.mg-practice { font-size: 11px; padding: 1px 8px; border-radius: 99px; background: #26a8a4; color: #fbf5e8; font-weight: 800; }
.mg-time { margin-inline-start: auto; width: 120px; height: 8px; border-radius: 99px; background: rgba(0, 0, 0, .35); overflow: hidden; display: block; }
.mg-time b { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #cc4535, #ecc25a); transition: width .2s linear; }
.mg-sub { font-size: 14px; opacity: .92; }
.mg-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.mg-btns .btn { padding: 6px 12px; font-size: 15px; }
/* scale */
.mg-scale { display: flex; align-items: center; gap: 14px; justify-content: center; }
.mg-dial { width: 210px; height: 116px; }
.mg-needle { transform-origin: 100px 100px; transition: transform .35s cubic-bezier(.3, 1.6, .5, 1); }
/* vpn */
.mg-vpn { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.vpn-row { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px; border: 2px solid #4f83c9; background: #153573; color: #e1e9f6; font: inherit; font-size: 14px; cursor: pointer; transition: transform .1s; }
.vpn-row:hover { transform: translateY(-2px); }
.vpn-row.ok { border-color: #5cc6c0; box-shadow: 0 0 10px rgba(92, 198, 192, .5); }
.vpn-row.dead { opacity: .45; border-color: #cc4535; text-decoration: line-through; cursor: not-allowed; }
.vpn-row small { margin-inline-start: auto; font-size: 11px; opacity: .9; }
.bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.bars b { width: 3px; background: rgba(225, 233, 246, .25); border-radius: 1px; }
.bars b:nth-child(1) { height: 4px; } .bars b:nth-child(2) { height: 7px; } .bars b:nth-child(3) { height: 10px; } .bars b:nth-child(4) { height: 14px; }
.bars.b1 b:nth-child(-n+1), .bars.b2 b:nth-child(-n+2), .bars.b3 b:nth-child(-n+3), .bars.b4 b:nth-child(-n+4) { background: #5cc6c0; }
.mg-score { text-align: center; font-size: 15px; letter-spacing: 3px; }
/* prescription */
.mg-rx { display: flex; gap: 12px; align-items: flex-start; }
.rx-paper { width: 210px; flex: none; padding: 8px 10px; border-radius: 4px; background: #fbf5e8; color: #153573; transform: rotate(-2deg); box-shadow: 0 4px 10px rgba(0, 0, 0, .4); font-size: 13px; }
.rx-doc { font-weight: 800; border-bottom: 1px solid #83a8db; margin-bottom: 4px; }
.rx-line { font-family: var(--f-display); font-size: 15px; line-height: 1.6; transform: skewX(-6deg); }
.rx-sign { text-align: end; font-size: 11px; opacity: .7; }
.rx-boxes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; flex: 1; }
.rx-box { display: flex; flex-direction: column; align-items: center; padding: 2px; border-radius: 10px; border: 2px solid #c79d74; background: #f6ecd6; color: var(--ink); cursor: pointer; font: inherit; }
.rx-box .item-svg { width: 56px; height: 56px; }
.rx-box small { font-size: 10px; font-weight: 800; }
.rx-box.right { border-color: #26a8a4; background: #cdeeea; }
.rx-box.wrong { border-color: #cc4535; background: #f7d0c8; }
/* balance */
.mg-bal { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bal-svg { width: 260px; height: 104px; }
.bal-coins { display: flex; gap: 8px; }
.bal-coin { width: 40px; height: 40px; border-radius: 50%; border: 3px solid #74500d; background: radial-gradient(circle at 35% 30%, #f9e9bd, #ecc25a 55%, #c08b1f); font: inherit; font-weight: 900; color: #3c2415; cursor: pointer; transition: transform .15s; }
.bal-coin.p1 { transform: translateY(-10px) translateX(4px); box-shadow: 0 0 0 3px #26a8a4; }
.bal-coin.p2 { transform: translateY(-10px) translateX(-4px); box-shadow: 0 0 0 3px #2a62b5; }
.bal-coin.accuse { animation: engraveGlow .6s ease-in-out infinite alternate; outline: 3px solid #f4d88c; }
.bal-log { font-size: 12px; opacity: .85; min-height: 16px; text-align: center; }
.tomorrow { margin: 6px 0; padding: 6px 10px; border-radius: 8px; background: rgba(38, 168, 164, .14); border: 1px solid rgba(92, 198, 192, .4); font-size: 13px; line-height: 1.7; }
.credit-btn small { display: block; font-size: 11px; }
/* the act-opening story scene (why the shop changes) */
.act-scene { width: 680px; text-align: start; }
.as-act { display: inline-block; padding: 3px 14px; border-radius: 99px; background: var(--saffron); color: var(--ink); font-family: var(--f-display); font-size: 20px; margin-bottom: 10px; }
.act-scene.act-food .as-act { background: #97ddd7; } .act-scene.act-phone .as-act { background: #83a8db; }
.act-scene.act-herb .as-act { background: #e0c29c; } .act-scene.act-gold .as-act { background: linear-gradient(#f4d88c, #c08b1f); }
.as-row { display: flex; gap: 14px; align-items: center; min-height: 140px; }
.as-face { width: 130px; flex: none; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .45)); }
.as-text { font-size: 18px; line-height: 1.9; }
.as-text i { opacity: .9; }
.as-dots { display: flex; gap: 6px; justify-content: center; margin: 10px 0; }
.as-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(249, 233, 189, .3); }
.as-dots i.on { background: var(--saffron); }

/* the title: one primary row (continue · new run), one row of small links, no meta row inside the arch */
.title-main .title-btns { gap: 12px; }
.title-main .title-btns .btn { min-width: 190px; }
.title-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 12px; max-width: 100%; padding: 0 14px; }
.title-links .btn { position: relative; font-size: 13px; padding: 4px 10px; min-height: 0; }
.title-links .btn .ico { width: 1.1em; height: 1.1em; vertical-align: -2px; }
.new-dot { position: absolute; top: -4px; left: -4px; width: 11px; height: 11px; border-radius: 50%; background: var(--pome); box-shadow: 0 0 0 2px #2a180e; animation: ping 1.4s infinite; }
.demo-tag { opacity: .6; }
.title-main .epigraph { margin-top: 10px; font-size: 19px; line-height: 1.7; }
.title-main .epigraph-by { font-size: 12px; line-height: 1.2; }
.title-main .tagline { margin-bottom: 14px; }
.title-links { margin-top: 10px; }
.title-main > .title-emblem { top: calc(50% - 148px); }

/* ---------------- «زینتِ حجره»: the decor shop ---------------- */
.decor-btn { position: relative; }
.decor-btn small { display: block; font-size: 11px; opacity: .8; }
.decor-shop { width: 1060px; max-width: 96%; padding: 16px 20px 18px; }
.dc-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 10px; }
.dc-head b { font-family: var(--f-display); font-size: 26px; color: var(--gold); font-weight: 400; }
.dc-head .dc-money { margin-inline-start: auto; display: flex; align-items: center; gap: 4px; }
.dc-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; margin-bottom: 14px; }
.dc-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 6px; border-radius: 12px; min-height: 200px;
  background: linear-gradient(#f9e9bd, #e6d6b2); color: var(--ink); border: 2px solid #c08b1f; box-shadow: 0 3px 0 #8a5d3c; text-align: center; }
.dc-card.locked { background: linear-gradient(#5c3d28, #3c2415); color: var(--paper); border-color: #6b452b; box-shadow: 0 3px 0 #1a0f09; }
.dc-card.locked .dc-pic { filter: grayscale(1) brightness(.55); opacity: .7; }
.dc-card.unl { animation: wantIn .4s both; border-color: #e0a92e; box-shadow: 0 0 0 2px rgba(236, 194, 90, .5), 0 3px 0 #8a5d3c; }
.dc-card.own { border-color: #26a8a4; }
.dc-card.legend:not(.locked) { background: linear-gradient(#e1e9f6, #97ddd7 60%, #f4d88c); }
.dc-pic { width: 84px; height: 84px; display: flex; align-items: center; justify-content: center; }
.dc-pic svg { width: 100%; height: 100%; }
.dc-emoji { font-size: 52px; line-height: 1; }
.dc-emoji .ico { width: 60px; height: 60px; }
.dc-name { font-weight: 800; font-size: 13.5px; line-height: 1.25; min-height: 34px; display: flex; align-items: center; }
.dc-card .btn.small { font-size: 12px; padding: 4px 8px; margin-top: auto; }
.dc-lock { font-size: 11px; line-height: 1.35; opacity: .9; margin-top: auto; width: 100%; }
.dc-lock .ico { width: 12px; height: 12px; vertical-align: -1px; }
.dc-bar { height: 5px; border-radius: 3px; background: rgba(0, 0, 0, .35); margin: 4px 6px 2px; overflow: hidden; }
.dc-bar i { display: block; height: 100%; background: #ecc25a; }
.dc-lock small { font-size: 10.5px; opacity: .75; }
.decor-toast .ut-emoji svg { width: 64px; height: 64px; }

/* ---------------- time: the Nowruz countdown, the calendar that tears off every morning ---------------- */
.tb-eid { color: #97ddd7; font-weight: 700; white-space: nowrap; }
.tb-eid .ico { width: 1em; height: 1em; vertical-align: -2px; }
.cal-flip { position: absolute; left: 50%; top: 92px; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 16px;
  padding: 12px 20px 12px 16px; border-radius: 16px; background: rgba(26, 15, 9, .92); border: 2px solid #c08b1f; box-shadow: 0 12px 30px rgba(0, 0, 0, .6);
  color: var(--paper); cursor: pointer; animation: calIn .35s cubic-bezier(.2, .9, .3, 1.2) both; }
.cal-flip.out { animation: calOut .45s ease-in both; }
@keyframes calIn { from { opacity: 0; transform: translate(-50%, -20px) scale(.92); } }
@keyframes calOut { to { opacity: 0; transform: translate(-50%, -14px) scale(.96); } }
.cal-pad { position: relative; width: 92px; height: 112px; flex: none; }
.cal-page { position: absolute; inset: 0; border-radius: 6px 6px 8px 8px; background: #fbf5e8; color: var(--ink); text-align: center; overflow: hidden;
  border: 2px solid #8a5d3c; box-shadow: 0 4px 0 #c79d74, 0 6px 0 #a97b55; transform-origin: 50% 0; }
.cal-page::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 22px; background: #8e1f16; }
.cal-ring { position: absolute; top: -2px; left: 50%; width: 46px; height: 8px; transform: translateX(-50%); border: 2px solid #ecc25a; border-bottom: 0; border-radius: 4px 4px 0 0; z-index: 1; }
.cal-wd { position: relative; z-index: 1; color: #fbf5e8; font-size: 12px; font-weight: 800; line-height: 22px; }
.cal-n { font-family: var(--f-display); font-size: 48px; line-height: 1.1; margin-top: 2px; }
.cal-m { font-size: 13px; font-weight: 800; color: #8a5d3c; margin-top: -4px; }
.cal-page.old { animation: calTear .75s .55s cubic-bezier(.5, 0, .8, .4) forwards; z-index: 2; }
@keyframes calTear { 0% { transform: rotate(0); } 25% { transform: rotate(-6deg) translateY(2px); } 100% { transform: translate(-60px, 150px) rotate(-38deg); opacity: 0; } }
.cal-side { display: flex; flex-direction: column; gap: 5px; max-width: 420px; }
.cal-eid { font-family: var(--f-display); font-size: 24px; color: #97ddd7; line-height: 1.1; }
.cal-air { font-size: 15px; line-height: 1.45; }
.cal-bread { font-size: 12.5px; opacity: .75; }
.cal-side .ico { width: 1.1em; height: 1.1em; vertical-align: -3px; }
.calm-motion .cal-page.old { animation: none; display: none; }

/* ---------------- «یافته‌ها»: a find pops out of the goods ---------------- */
.find-pop { position: relative; display: flex; align-items: center; gap: 14px; width: 470px; padding: 14px 18px 12px; border-radius: 16px; overflow: hidden; pointer-events: auto; cursor: pointer;
  background: linear-gradient(#fbf5e8, #f0dcb0); color: var(--ink); border: 3px solid #c08b1f; box-shadow: 0 0 0 3px #2a180e, 0 14px 34px rgba(0, 0, 0, .6);
  animation: findIn .55s cubic-bezier(.2, 1.4, .4, 1) both; }
.find-pop.r-rare { border-color: #26a8a4; background: linear-gradient(#f2fbf9, #bfe9e4); }
.find-pop.r-legend { border-color: #e0a92e; background: linear-gradient(#fff8e2, #f4d88c 60%, #ecc25a); box-shadow: 0 0 0 3px #2a180e, 0 0 40px rgba(236, 194, 90, .8), 0 14px 34px rgba(0, 0, 0, .6); }
@keyframes findIn { 0% { opacity: 0; transform: translateY(-30px) scale(.6) rotate(-4deg); } 60% { opacity: 1; } }
.fp-rays { position: absolute; left: 6px; top: 50%; width: 150px; height: 150px; margin-top: -75px; border-radius: 50%; pointer-events: none;
  background: repeating-conic-gradient(rgba(236, 194, 90, .45) 0 10deg, transparent 10deg 24deg); animation: spin 9s linear infinite; opacity: .8; }
.find-pop .fp-icon { position: relative; width: 92px; height: 92px; flex: none; display: flex; align-items: center; justify-content: center; animation: fpBob 1.6s ease-in-out infinite; }
.fp-icon svg { width: 100%; height: 100%; }
.fd-emoji { font-size: 60px; line-height: 1; }
.fd-emoji .ico { width: 72px; height: 72px; }
@keyframes fpBob { 50% { transform: translateY(-5px) rotate(3deg); } }
.fp-body { position: relative; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.fp-body small { font-size: 11.5px; font-weight: 800; color: #8a5d3c; }
.fp-body b { font-family: var(--f-display); font-size: 25px; font-weight: 400; line-height: 1.15; }
.fp-body span { font-size: 13px; line-height: 1.5; }
.fp-body i { font-size: 12.5px; color: #6b452b; }
.fp-body em { font-style: normal; font-size: 12px; font-weight: 800; color: #1c7a5c; }
.fp-body .ico { width: 1em; height: 1em; vertical-align: -2px; }
.g-finds { grid-template-columns: repeat(6, 1fr); }
.bk-find.r-rare:not(.unseen) { border-color: #26a8a4; }
.bk-find.r-legend:not(.unseen) { border-color: #e0a92e; box-shadow: 0 0 0 2px rgba(236, 194, 90, .5); }
.bk-find .bk-emoji .ico { width: 54px; height: 54px; }
.calm-motion .fp-rays, .calm-motion .find-pop .fp-icon { animation: none; }

/* ---------------- epilogues: what became of everyone, one page each ---------------- */
.screen-end .epi-scene { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 30px; }
.epi-head { font-family: var(--f-display); font-size: 34px; color: var(--gold); text-shadow: 0 3px 0 #2a180e; }
.epi-card { display: flex; align-items: center; gap: 26px; width: 860px; max-width: 94%; min-height: 250px; padding: 22px 30px; border-radius: 18px;
  background: linear-gradient(#fbf5e8, #f0dcb0); color: var(--ink); border: 3px solid #c08b1f; box-shadow: 0 0 0 3px #2a180e, 0 18px 40px rgba(0, 0, 0, .55);
  animation: wantIn .5s both; }
.epi-face { width: 210px; height: 230px; flex: none; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; border-radius: 14px; background: radial-gradient(#f4d88c, #c79d74); border: 2px solid #8a5d3c; }
.epi-face svg { width: 100%; height: auto; }
.epi-emoji { font-size: 110px; line-height: 1; align-self: center; }
.epi-emoji .ico, .epi-emoji svg { width: 150px; height: 150px; }
.epi-text { font-size: 20px; line-height: 1.85; margin: 0; }
.epi-btns { display: flex; gap: 12px; }
/* a skipped receipt shows every line at once */
.receipt.skip .rc-line { animation-delay: 0s !important; animation-duration: .01s !important; }
/* the bag's contents live on a small badge, so tumbling dice never pop a tooltip under the mouse */
.dice-tray { position: relative; }
.tray-info { position: absolute; top: -10px; inset-inline-start: -8px; z-index: 2; display: inline-flex; align-items: center; gap: 1px; padding: 1px 6px 1px 4px; border-radius: 10px;
  background: #2a180e; color: #f9e9bd; border: 1.5px solid #c08b1f; font-size: 11px; font-weight: 800; cursor: help; line-height: 1.5; }
.tray-info .ico { width: 13px; height: 13px; }
/* the shop's sign: nastaliq sits low and tall; centre it in the band and never let it spill out */
.kativeh { line-height: 24px; padding-bottom: 4px; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; }
/* a visitor's scene always fits the desk: the story text takes what's left (and scrolls if it must), the choices never get cut */
.desk.t-visitor .visit { height: 100%; gap: 8px; padding-block: 2px; }
.desk.t-visitor .v-row { flex: 1 1 auto; min-height: 70px; display: flex; }
.desk.t-visitor .v-text { flex: 1; max-height: none; font-size: 15px; line-height: 1.8; padding: 9px 14px; }
.desk.t-visitor .v-opts { flex: none; gap: 6px; }
.desk.t-visitor .v-opts .btn { padding: 5px 12px; font-size: 14px; line-height: 1.45; }
.desk.t-visitor .v-opts .btn small { font-size: 11.5px; }
/* over the official price: the safe sale glows, the risky one turns red */
.h-actions .capsell { background: linear-gradient(#5cc6c0, #26a8a4); border-color: #0f4e4c; color: #0b2a29; animation: wantIn .3s both; }
.h-actions .capsell.hidden { display: none; }
.h-actions .btn.risky { background: linear-gradient(#e0705f, #b02a1f); border-color: #68150f; color: #fbf5e8; }
/* the rulebook: each office's stamp heads its own articles, so the stamp and the rule visibly belong together */
.rb-offices { display: flex; flex-direction: column; gap: 6px; }
.rb-office { display: flex; gap: 6px; align-items: flex-start; padding: 4px; border-radius: 8px; background: rgba(42, 24, 14, .05); border: 1px solid rgba(138, 93, 60, .25); }
.rb-office.new { border-color: #c08b1f; box-shadow: 0 0 0 2px rgba(236, 194, 90, .45); }
.rb-office .rb-stamp { width: 66px; flex: none; text-align: center; }
.rb-office .rb-stamp .stamp-svg { width: 44px; height: 44px; }
.rb-office .rb-issuer { font-size: 10.5px; line-height: 1.3; }
.rb-office .rb-arts { flex: 1; }
.rb-office .rb-arts td { padding: 1px 3px; }
.rb-offices.hl-miss { outline: 2px dashed #b02a1f; outline-offset: 2px; }
.vpn-label b { color: #1f7a3f; }
.vpn-label.dead b { color: #b02a1f; }
/* the new act's card: Mash Hassan + the three first steps */
.act-guide .ag-list { margin: 6px 24px 12px; padding: 0 18px; font-size: 15px; line-height: 1.9; text-align: start; }
.ag-card { margin-top: 8px; }
.cal-yday { font-size: 13.5px; line-height: 1.5; color: #f4d88c; border-inline-start: 3px solid #c08b1f; padding-inline-start: 8px; }
/* «ادامه»: previously… */
.previously { width: 560px; max-width: 92%; padding: 18px 24px; text-align: start; }
.pv-head { font-family: var(--f-display); font-size: 26px; color: var(--gold); margin-bottom: 8px; }
.pv-row { font-size: 15px; line-height: 1.9; }
.pv-row .neg { color: #e0705f; }
.previously .btn { margin-top: 12px; }
.act-guide .ag-list, .tut-list.ag { list-style-type: persian; }
/* several morning notes (a starter delivery + the newspaper) stay in one compact strip above the panels */
.morning-notes { max-height: 38px; overflow-y: auto; font-size: 13px; line-height: 1.45; padding-block: 3px; }
.morning-notes > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* over the official price, three actions share the row */
.h-actions:has(.capsell:not(.hidden)) { gap: 6px; }
.h-actions:has(.capsell:not(.hidden)) .btn.big { padding: 6px 10px; font-size: 13.5px; }
.h-actions:has(.capsell:not(.hidden)) .btn.big small { font-size: 10.5px; }
.morning-notes { max-height: 46px; }
.morning-notes > div { white-space: normal; }
.act-guide .ag-gift { margin: 8px 24px 0; padding: 8px 12px; border-radius: 10px; background: rgba(38, 168, 164, .12); border: 1px dashed #26a8a4; font-size: 14px; line-height: 1.7; text-align: start; }
.morning-grid.with-notes { top: 122px; }
/* act 5: the exchange-rate ticker moves beside the shop's (now long) sign instead of covering it */
.screen-day .rate.up, .screen-day .rate.down, .screen-day .rate:not(:empty) { transform: translateX(calc(-50% - 212px)); padding: 1px 10px; font-size: 12px; }
/* every supplier you've met stays open: compact tabs that wrap */
.sup-tabs { flex-wrap: wrap; gap: 4px; }
.sup-tabs.n3 .sup-tab, .sup-tabs.n4 .sup-tab, .sup-tabs.n5 .sup-tab { flex: 1 1 0; min-width: 0; padding: 4px 6px; font-size: 12.5px; white-space: nowrap; }
/* the groceries corner: a wooden dry-goods rack beside the fridge, apart from the relic shelf */
.food-corner { display: flex; gap: 6px; align-items: flex-end; flex: none; }
.food-corner:not(:has(.on)) { display: none; }
.dryrack { display: none; }
.dryrack.on { display: flex; flex-direction: column; gap: 2px; padding: 3px 5px 5px; border-radius: 10px; margin-bottom: 6px;
  background: linear-gradient(#c79d74, #8a5d3c); border: 3px solid #6b452b; box-shadow: inset 0 0 10px rgba(42, 24, 14, .35); }
.dryrack .fridge-head { color: #fbf5e8; }
.dryrack .fridge-slots { display: grid; grid-template-columns: repeat(2, 64px); grid-auto-rows: 62px; gap: 4px; }
.dryrack .slot { width: 64px; height: 62px; min-width: 0; padding: 0; background: rgba(251, 245, 232, .3); }
.dryrack .slot .emoji { width: 46px; height: 46px; margin: 2px auto 0; }
.dryrack .slot .emoji svg { width: 46px; height: 46px; }
.dryrack .slot .s-val { font-size: 10px; bottom: 1px; }
.dryrack .slot .fam-chip { font-size: 8px; top: 1px; }
.dryrack .slot.empty { background: rgba(251, 245, 232, .18); border: 2px dashed rgba(42, 24, 14, .4); }
/* playtest mode */
.pt-panel, .pt-code { width: 640px; max-width: 94%; padding: 16px 22px; text-align: start; }
.pt-code { width: 360px; text-align: center; }
.pt-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0; }
.pt-row b { min-width: 48px; }
.pt-opts { flex-direction: column; align-items: flex-start; gap: 4px; font-size: 14px; }
.pt-note { font-size: 13px; opacity: .8; margin: 4px 0; }
.pt-input { width: 100%; font: inherit; font-size: 20px; padding: 6px 10px; border-radius: 8px; border: 2px solid #c08b1f; background: #fbf5e8; color: var(--ink); text-align: center; }
.pt-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; padding-top: 8px; border-top: 1px dashed rgba(244, 216, 140, .4); }
.pt-tools b { width: 100%; font-size: 13px; }
.title-links .pt-btn { opacity: .7; }
/* «طاغوت»: a paper sticker slapped over the Pahlavi label; the old word peeks out at the edge */
.era-chip.taghut { position: relative; overflow: visible; }
.era-chip.taghut .old { opacity: .9; }
.era-chip.taghut .stk { position: absolute; inset: -2px -3px -2px 22%; display: flex; align-items: center; justify-content: center; padding: 0 3px;
  background: #fbf5e8; color: #2a180e; font-size: .78em; font-weight: 800; white-space: nowrap; transform: rotate(-5deg);
  border: 1px dashed #8a5d3c; box-shadow: 1px 1px 2px rgba(0, 0, 0, .35); border-radius: 2px; }
.taghut-b { background: #fbf5e8; color: #2a180e; padding: 0 4px; border: 1px dashed #8a5d3c; display: inline-block; transform: rotate(-3deg); }
/* the scale: hold to pour; the needle lags and settles instead of jumping */
.mg-needle.pour { transition: none; }
.mg-pour { touch-action: none; user-select: none; }
.mg-pour.down { filter: brightness(.9); transform: translateY(2px); }
.fal-tabir { font-size: 13px; margin-top: 4px; opacity: .9; }
.cal-verse { font-size: 14px; line-height: 1.6; color: #fbf5e8; }
.cal-verse .nastaliq { font-size: 15px; }
.cal-verse small { opacity: .7; }
.np-role { display: block; font-size: 11px; font-weight: 600; opacity: .75; }
/* builds: the HUD chip, the badges on the peddler's cards, the starting kits */
.build-chip { display: inline-flex; align-items: center; gap: 3px; margin-inline-start: 4px; padding: 1px 6px; border-radius: 99px; font-size: 12px; font-weight: 800; cursor: help;
  background: rgba(244, 216, 140, .14); border: 1px solid rgba(244, 216, 140, .45); color: #f4d88c; white-space: nowrap; }
.build-chip.none { opacity: .55; font-weight: 600; }
.build-chip.t2 { background: rgba(236, 194, 90, .28); }
.build-chip.t3 { background: linear-gradient(90deg, #ecc25a, #f4d88c); color: #2a180e; box-shadow: 0 0 8px rgba(236, 194, 90, .6); }
.build-chip .ico { width: 1em; height: 1em; vertical-align: -2px; }
.tcard .bld-tag, .kit-card .bld-tag { font-size: 10.5px; font-weight: 800; color: #2a180e; background: #f4d88c; border-radius: 6px; padding: 0 6px; align-self: center; margin-bottom: 2px; }
.mini-face svg { width: 20px; height: 20px; vertical-align: middle; }
.kit-pick { width: 860px; max-width: 95%; padding: 16px 20px; text-align: center; }
.kit-row { display: flex; gap: 12px; justify-content: center; margin-top: 10px; }
.kit-card { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px; border-radius: 14px; cursor: pointer; font: inherit;
  background: linear-gradient(#fbf5e8, #f0dcb0); color: var(--ink); border: 3px solid #c08b1f; box-shadow: 0 4px 0 #8a5d3c; transition: transform .12s; }
.kit-card:hover { transform: translateY(-4px); }
.kit-icon .ico { width: 34px; height: 34px; }
.kit-name { font-family: var(--f-display); font-size: 21px; }
.kit-dice { display: flex; gap: 4px; }
.kit-die svg { width: 40px; height: 40px; }
.kit-desc { font-size: 13px; line-height: 1.6; }
.kit-charm { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 10px; background: #2a180e; }
.kit-charm svg, .kit-charm img { width: 32px; height: 32px; }

/* ---- threads: staged scenes (the last night, the dossier on the table, the peddler's answer) ---- */
.th-stage .th-pre { display: block; font-size: 15px; opacity: .78; margin-bottom: 4px; }
.th-stage .as-face .epi-emoji { font-size: 90px; text-align: center; }
.th-stage .as-face .epi-emoji .ico, .th-stage .as-face .epi-emoji svg { width: 110px; height: 110px; }
/* a counter per family (act 3+): a phone glass case, the herb jars, the money changer's velvet tray, beside the relic shelf */
.counters { display: flex; gap: 6px; align-items: flex-end; flex: none; }
.counters:empty { display: none; }
.counter { display: flex; flex-direction: column; gap: 2px; padding: 3px 5px 5px; border-radius: 10px; margin-bottom: 6px; border: 3px solid; transition: box-shadow .2s; }
.counter .fridge-head { white-space: nowrap; }
.counter .fridge-head small { font-weight: 600; opacity: .8; }
.counter .fridge-slots { display: grid; grid-template-columns: repeat(2, 64px); grid-auto-rows: 62px; gap: 4px; }
.counter .slot { width: 64px; height: 62px; min-width: 0; padding: 0; }
.counter .slot .emoji { width: 46px; height: 46px; margin: 2px auto 0; }
.counter .slot .emoji svg { width: 46px; height: 46px; }
.counter .slot .s-val { font-size: 10px; bottom: 1px; }
.counter .slot .fam-chip { font-size: 8px; top: 1px; }
.counter .slot.empty { border: 2px dashed rgba(255, 255, 255, .35); }
.counter.c-phone { background: linear-gradient(135deg, rgba(225, 233, 246, .7), rgba(79, 131, 201, .45) 60%, rgba(225, 233, 246, .6)); border-color: #4f83c9; box-shadow: inset 0 0 12px rgba(255, 255, 255, .5); }
.counter.c-phone .slot { background: rgba(255, 255, 255, .4); }
.counter.c-herb { background: linear-gradient(#d6e6c4, #86ad6f); border-color: #3f6b2f; box-shadow: inset 0 0 10px rgba(29, 74, 40, .3); }
.counter.c-herb .slot { background: rgba(251, 245, 232, .4); }
.counter.c-gold { background: radial-gradient(circle at 50% 30%, #8e2a22, #4a0f0c); border-color: #ecc25a; box-shadow: inset 0 0 12px rgba(0, 0, 0, .5); }
.counter.c-gold .fridge-head { color: #f4d88c; }
.counter.c-gold .slot { background: rgba(244, 216, 140, .22); }
.counter.c-gold .slot.empty { border-color: rgba(244, 216, 140, .4); }
.counter.bare .fridge-head small { color: #b02a1f; opacity: 1; font-weight: 800; }
.counter.c-gold.bare .fridge-head small { color: #ffb3a8; }
.counter.wanted { box-shadow: 0 0 0 3px #f4d88c, 0 0 14px rgba(244, 216, 140, .8); }
/* with counters beside it, the relic shelf folds into two rows of five */
.shelf-wrap:not([data-counters="0"]):is([data-counters]) .shelf { flex: none; grid-template-columns: repeat(5, 76px); grid-auto-rows: 74px; gap: 4px; align-self: flex-end; margin-bottom: 6px; }
.shelf-wrap:not([data-counters="0"]):is([data-counters]) .shelf .slot { height: 74px; padding: 0; gap: 0; box-shadow: 0 3px 0 #2a180e; }
.shelf-wrap:not([data-counters="0"]):is([data-counters]) .shelf .slot .emoji { width: 52px; height: 52px; margin: 0 auto; }
.shelf-wrap:not([data-counters="0"]):is([data-counters]) .shelf .slot .emoji svg { width: 52px; height: 52px; }
.shelf-wrap:not([data-counters="0"]):is([data-counters]) .shelf .slot .s-val { font-size: 11px; bottom: 1px; }
.shelf-wrap:not([data-counters="0"]):is([data-counters]) .shelf .slot .era-chip, .shelf-wrap:not([data-counters="0"]):is([data-counters]) .shelf .slot .fam-chip { font-size: 9px; top: 1px; }
.shelf-wrap:not([data-counters="0"]):is([data-counters]) .shelf-label { width: 56px; font-size: 20px; }
/* the morning: each supplier tab shows how many of its goods you hold; an empty counter is marked */
.sup-tab .sup-n { margin-inline-start: 4px; padding: 0 5px; border-radius: 99px; background: rgba(42, 24, 14, .15); font-size: 11px; font-weight: 800; }
.sup-tab.empty .sup-n { background: #b02a1f; color: #fbf5e8; }
.stock-line { line-height: 1.8; }
/* compact slots (fridge, dry rack, counters, the folded shelf): the price is a small tag at the bottom, not a block over the art */
.fridge .slot .s-val, .dryrack .slot .s-val, .counter .slot .s-val, .shelf-wrap:not([data-counters="0"]):is([data-counters]) .shelf .slot .s-val { top: auto; bottom: 1px; left: 2px; padding: 0 4px; line-height: 1.45; border-radius: 6px; }
.screen-day .counters, .screen-day .food-corner { position: relative; z-index: 1; } /* the counters stand in front of the ledge's little decorations */
.th-stage .as-dots i { background: rgba(82, 51, 31, .22); }
.th-stage .as-dots i.on { background: #c08b1f; }
/* playtest: the run's scripted moments, by act */
.pt-ev-head { margin-top: 10px; font-size: 14px; }
.pt-ev-head small { opacity: .7; }
.pt-events { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; max-height: 220px; overflow-y: auto; margin: 6px 0 8px; padding: 2px; }
.pt-ev { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 8px; border: 1.5px solid rgba(42, 24, 14, .25); background: rgba(251, 245, 232, .6);
  font: inherit; font-size: 12.5px; text-align: start; cursor: pointer; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-ev:hover { background: #f9e9bd; }
.pt-ev.today { border-color: #c08b1f; }
.pt-ev.on { background: #ecc25a; border-color: #8a5d3c; font-weight: 800; }
.pt-ev .ico { width: 16px; height: 16px; flex: none; }
.pt-ev-day { flex: none; padding: 0 5px; border-radius: 6px; background: #2a180e; color: #f4d88c; font-size: 11px; font-weight: 800; }
.pt-panel { max-height: 92%; overflow-y: auto; }
/* the book scrolls: fixed-height cards, as many rows as the tab needs */
.book .bk-grid, .book .bk-pages { overflow-y: auto; overscroll-behavior: contain; align-content: start; grid-template-rows: none; padding: 4px 8px 12px;
  scrollbar-width: thin; scrollbar-color: #c08b1f rgba(0, 0, 0, .25); }
.book .bk-grid::-webkit-scrollbar, .book .bk-pages::-webkit-scrollbar { width: 10px; }
.book .bk-grid::-webkit-scrollbar-thumb, .book .bk-pages::-webkit-scrollbar-thumb { background: #c08b1f; border-radius: 6px; border: 2px solid #2a180e; }
.book .g-cats, .book .g-vis { grid-auto-rows: 170px; }
.book .g-tals { grid-auto-rows: 132px; }
.book .g-finds { grid-auto-rows: 150px; }
.book .bk-pages { grid-auto-rows: minmax(250px, auto); gap: 22px; }
.book .bk-card, .book .bk-page { cursor: pointer; }
.book .bk-page { overflow: hidden; }
.book .bk-page:hover { transform: rotate(0) translateY(-3px); }
/* the close-up */
.bk-zoom { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; background: rgba(14, 8, 5, .8); animation: fadeIn .18s; }
.bkz-card { position: relative; width: 860px; max-width: 92%; height: 500px; max-height: 88%; display: grid; grid-template-columns: 320px 1fr; grid-template-rows: minmax(0, 1fr) auto;
  gap: 14px 24px; padding: 24px 28px 14px; color: var(--ink); background: linear-gradient(#fbf5e8, #f4d88c); border: 4px solid #8a5d3c; border-radius: 18px;
  box-shadow: 0 10px 0 #52331f, 0 24px 60px rgba(0, 0, 0, .6); animation: pop .22s; }
.bkz-card.r-rare { border-color: #2a62b5; box-shadow: 0 10px 0 #153573, 0 0 30px rgba(42, 98, 181, .5); }
.bkz-card.r-legend { border-color: #c08b1f; box-shadow: 0 10px 0 #8a5d3c, 0 0 40px rgba(224, 169, 46, .7); }
.bkz-card.unseen { color: var(--cream); background: linear-gradient(#3c2415, #1a0f09); border-style: dashed; border-color: rgba(244, 216, 140, .45); }
.bkz-art { min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 14px;
  background: radial-gradient(circle, rgba(255, 255, 255, .75), rgba(236, 194, 90, .25) 70%); border: 2px solid rgba(138, 93, 60, .35); }
.bkz-card.unseen .bkz-art { background: radial-gradient(circle, rgba(244, 216, 140, .12), transparent 70%); border-color: rgba(244, 216, 140, .2); }
.bkz-art > svg, .bkz-art .item-svg { width: 250px; height: 250px; }
.bkz-art .ico, .bkz-art img, .bkz-art .fd-emoji svg { width: 190px; height: 190px; }
.t-vis .bkz-art > svg { width: auto; height: 100%; max-height: 400px; }
.bkz-art .bk-q { font-size: 160px; }
.bkz-text { min-height: 0; overflow-y: auto; padding-inline-end: 4px; scrollbar-width: thin; scrollbar-color: #c08b1f transparent; }
.bkz-title { font-family: var(--f-display); font-size: 36px; line-height: 1.2; }
.bkz-sub { font-size: 14px; opacity: .75; margin: 2px 0 10px; }
.bkz-body { font-size: 16px; line-height: 1.95; }
.bkz-body p { margin: 0 0 10px; }
.bkz-body b { color: #8e1f16; }
.bkz-card.unseen .bkz-body b { color: var(--gold); }
.bkz-quote { font-style: italic; padding-inline-start: 12px; border-inline-start: 3px solid #c08b1f; opacity: .9; }
.bkz-ledger { font-size: 24px; line-height: 2.3; }
.bkz-card.page .bkz-title { font-size: 22px; font-family: var(--f-body); font-weight: 800; opacity: .75; }
.bkz-prog { width: 100%; height: 18px; }
.bkz-nav { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
.bkz-n { font-size: 13px; font-weight: 800; opacity: .7; }
.bkz-card.unseen .bkz-nav .btn { color: var(--cream); }
.bkz-x { position: absolute; top: 8px; left: 10px; width: 34px; height: 34px; border-radius: 50%; border: 2px solid #8a5d3c; background: #fbf5e8; color: var(--ink);
  font-size: 16px; font-weight: 800; cursor: pointer; z-index: 1; }
.bkz-x:hover { background: #ecc25a; }
.bkz-nav .btn { color: var(--ink); border: 2px solid #8a5d3c; background: rgba(255, 255, 255, .55); font-weight: 800; }
.bkz-nav .btn:hover { background: #ecc25a; }
.bkz-card.unseen .bkz-nav .btn { color: var(--cream); border-color: rgba(244, 216, 140, .5); background: rgba(244, 216, 140, .08); }
/* زیرپله's verses: two lines to a row, like a page of poetry (right line, then left) */
.rap { margin: 2px 0 8px; padding: 6px 12px; border-radius: 8px; background: rgba(42, 24, 14, .07); border-inline-start: 3px solid #26a8a4;
  font-size: 13.5px; line-height: 1.75; font-weight: 600; }
.rap span { display: block; }
.rap span:nth-child(4n+3), .rap span:nth-child(4n+4) { color: #14686a; } /* every other couplet in the tile's teal, so the runs read */
.bkz-body .rap { font-size: 14.5px; }
/* a visitor's long text scrolls inside its box (the answers stay in view); a verse rolls by itself (js/flow.js) */
.desk.t-visitor .v-row { min-height: 0; align-items: stretch; }
.desk.t-visitor .v-text { overflow-y: auto; scrollbar-width: thin; scrollbar-color: #c08b1f transparent; }
.desk.t-visitor .v-opts:has(> :nth-child(4)) { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; } /* four answers: two by two, so the text keeps its room */
.sup-tab .sup-hot { margin-inline-start: 3px; display: inline-flex; vertical-align: -2px; }
.sup-tab .sup-hot .ico { width: 14px; height: 14px; }
.hot-line { margin: 4px 0 2px; padding: 3px 10px; border-radius: 8px; font-size: 12.5px; line-height: 1.6; background: rgba(236, 194, 90, .16); border: 1px solid rgba(236, 194, 90, .45); }
.hot-line b { color: var(--gold); }
.hot-line .ico { width: 14px; height: 14px; vertical-align: -2px; }
/* inside Telegram: no rubber-band scrolling, no long-press menus, no blue tap flashes */
html.in-telegram, html.in-telegram body { overscroll-behavior: none; touch-action: manipulation; }
html.in-telegram * { -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; }
