:root {
  color-scheme: light;
  --ink: #19213c;
  --navy: #1a213b;
  --muted: #525c74;
  --paper: #f3f4f9;
  --white: #fff;
  --line: #dfe3ed;
  --yellow: #ffcf58;
  --lavender: #e8e7fa;
  --radius: 18px;
  font-family: "Noto Sans Hebrew", "Arial Hebrew", Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, input, select { font: inherit; }
button, select, summary { cursor: pointer; }
button:disabled { opacity: .5; cursor: not-allowed; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #6955dc; outline-offset: 3px; }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: clamp(1.75rem, 4vw, 2.65rem); letter-spacing: -.045em; line-height: 1.08; }
h2 { font-size: clamp(1.28rem, 2.8vw, 1.67rem); letter-spacing: -.02em; }
h3 { font-size: 1.12rem; }
h4 { font-size: 1rem; }
p { color: var(--muted); line-height: 1.55; }
small { line-height: 1.4; }
.button {
  border: 1px solid transparent; border-radius: 10px; min-height: 43px; padding: .56rem .9rem;
  font-weight: 700; color: var(--ink); line-height: 1.24; transition: background .13s, border-color .13s;
}
.primary { background: var(--yellow); border-color: #edb829; }
.primary:hover:not(:disabled) { background: #ffdc78; }
.secondary { background: #f7f7fd; border-color: #d8dcee; }
.secondary:hover:not(:disabled), .quiet:hover:not(:disabled) { background: var(--lavender); }
.quiet { background: transparent; border-color: transparent; }
.active { background: #e3e0fc; color: #392b8b; border-color: #cfc7f2; }
.tile-icon {
  display: inline-grid; place-items: center; flex: none; border-radius: 13px;
  background: var(--tile); width: 48px; height: 48px; font-size: 1.45rem; line-height: 1;
}
.brand { display: flex; align-items: center; gap: .65rem; line-height: 1.08; font-size: 1.05rem; font-weight: 600; }
.brand strong { display: block; font-size: 1.2em; font-weight: 850; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--yellow); color: var(--ink); font-size: 1.55rem; }
.entry {
  position: relative; isolation: isolate; display: grid; grid-template-rows: auto 1fr;
  align-items: center; min-height: 100vh; padding: 2rem clamp(1rem, 7vw, 6rem) max(5.5rem, 10vh);
  background: radial-gradient(ellipse at 16% 20%, #333b70 0, #252d56 37%, #181f39 76%);
}
.entry-header { color: #fff; align-self: start; margin-bottom: 2rem; }
.entry-panel {
  width: min(100%, 640px); justify-self: center; background: #fdfdff; border-radius: 24px; padding: clamp(1.2rem, 5vw, 2.6rem);
  box-shadow: 0 25px 75px #0c102859; margin-block: .5rem; border: 1px solid #ffffff90;
}
.entry-wide .entry-panel { width: min(100%, 940px); }
.intro-copy { margin: .65rem 0 1.3rem; }
.device-options, .business-grid { display: grid; gap: .8rem; grid-template-columns: repeat(2,minmax(0,1fr)); }
.business-grid { grid-template-columns: repeat(4,minmax(0,1fr)); margin-bottom: 1rem; }
.device-choice, .business-choice {
  border: 1px solid var(--line); border-radius: 15px; text-align: start; background: #fff;
  color: var(--ink); padding: 1rem; display: grid; justify-items: start; gap: .5rem;
}
.device-choice:hover, .business-choice:hover, .save-card:hover { background: #f5f3ff; border-color: #bab2e9; }
.business-choice.selected { border-color: #775cce; box-shadow: inset 0 0 0 1px #775cce; background: #f4f1ff; }
.device-choice strong { font-size: 1.17rem; }
.device-choice span:not(.tile-icon), .business-choice span:not(.tile-icon) { color: var(--muted); font-size: .875rem; line-height: 1.4; }
.skyline {
  position: absolute; bottom: 0; inset-inline: 0; user-select: none; overflow: hidden; z-index: -1;
  display: flex; align-items: flex-end; gap: 5px; justify-content: space-around; pointer-events: none;
}
.skyline i {
  height: var(--height); flex: 1 0 34px; max-width: 95px; border-radius: 5px 5px 0 0;
  background: radial-gradient(circle, #726f9a 1.5px, transparent 2px) top right / 14px 14px, #2c3459;
  border-top: 3px solid #3b4573;
}
.level-select { display: flex; gap: .65rem; align-items: center; flex-wrap: wrap; margin: 1rem 0; }
.level-select small { color: var(--muted); font-size: .875rem; }
.save-list { display: grid; gap: .6rem; margin-bottom: 1rem; }
.save-card { border: 1px solid var(--line); color: var(--ink); border-radius: 13px; background: #fff; text-align: start; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .7rem; padding: .7rem; }
.save-card small { display: block; color: var(--muted); }
.game {
  display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: auto 1fr;
  min-height: 100vh; max-width: 1240px; margin-inline: auto;
}
.game.has-phone { grid-template-columns: minmax(0,1fr) clamp(225px, 23vw, 290px); }
.game-header {
  grid-column: 1/-1; position: sticky; top: 0; z-index: 6;
  background: var(--navy); color: #fff; border-bottom: 4px solid #343f65;
}
.game-header-inner { display: flex; align-items: center; gap: clamp(.4rem,2vw,1rem); padding: .66rem clamp(.65rem, 3vw, 1.6rem); }
.game-header .brand { margin-inline-end: auto; }
.game-header .brand strong { display: inline; }
.top-date { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem .55rem; color: #d9e1f6; }
.top-date strong { color: #fff; white-space: nowrap; }
.top-funds { color: var(--ink); background: #fff2ca; border-radius: 9px; padding: .45rem .6rem; font-weight: 800; white-space: nowrap; }
.game-menu { position: relative; }
.game-menu summary { list-style: none; color: #202644; background: var(--yellow); border: 2px solid #e9af3d; border-radius: 8px; padding: .55rem .68rem; font-weight: 800; white-space: nowrap; }
.game-menu summary::-webkit-details-marker { display: none; }
.game-menu nav {
  position: absolute; inset-inline-end: 0; top: calc(100% + .55rem);
  display: grid; min-width: 185px; gap: .2rem; padding: .38rem;
  border: 2px solid #65739b; border-radius: 10px; background: #222b49;
  box-shadow: 0 5px 14px #141a3673;
}
.menu-link {
  text-align: start; padding: .5rem .62rem; border: 0; border-radius: 6px;
  color: #fff; background: transparent; font-weight: 700; min-height: 39px;
}
.menu-link span { margin-inline-end: .36rem; color: #cbd5f7; }
.menu-link:hover, .menu-link.current { background: #3b4771; }
.workspace { min-width: 0; grid-column: 1; grid-row: 2; padding: clamp(.75rem,3vw,1.75rem); display: flex; flex-direction: column; gap: 1rem; align-self: start; }
.business-return { align-self: flex-start; }
[data-action="call-elevator"][hidden] { display: none; }
.phone-column { grid-column: 2; grid-row: 2; padding: clamp(.75rem,3vw,1.75rem) 0 1rem clamp(.8rem,2vw,1.6rem); min-width: 0; }
.phone-layout .workspace { width: 100%; max-width: 780px; margin-inline: auto; }
.page-head, .page-title, .section-heading, .phase-head, .event-title, .goal { display: flex; align-items: center; gap: .8rem; }
.page-head, .section-heading, .phase-head, .goal { justify-content: space-between; }
.page-head { padding-block: .25rem .4rem; }
.page-title .tile-icon { width: 60px; height: 60px; font-size: 1.9rem; }
.page-title p, .simple-head p { margin-top: .28rem; }
.phase-head p, .section-heading p { margin-top: .23rem; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(.85rem,2vw,1.35rem); min-width: 0; }
.equipment, .equipment > div { display: flex; align-items: center; gap: .8rem; }
.equipment { justify-content: space-between; background: #fffaf0; border-color: #eadfc3; }
.metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .65rem; }
.metric { display: grid; gap: .5rem; padding: .85rem; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.metric span, .metric small { color: var(--muted); font-size: .875rem; }
.metric strong { font-size: clamp(1.33rem,3vw,1.8rem); }
.badge { display: inline-flex; align-items: center; white-space: nowrap; font-size: .875rem; font-weight: 750; background: #eeedf8; border-radius: 99px; padding: .34rem .66rem; color: #4a4074; }
.positive { background: #dff3e7; color: #205a3b; }
.negative { background: #fde9e4; color: #913c29; }
.products, .upgrades { margin-top: .75rem; }
.product, .upgrade, .worker, .offer, .business-row, .goal { border-top: 1px solid var(--line); padding: .85rem 0; }
.product:last-child, .upgrade:last-child, .business-row:last-child { padding-bottom: 0; }
.product { display: grid; grid-template-columns: minmax(110px,1.2fr) minmax(110px,.9fr) minmax(122px,.9fr); align-items: center; gap: .5rem 1rem; }
.product-meta, .product-cost, .product-controls label, .worker label, .shop-picker { font-size: .875rem; color: var(--muted); line-height: 1.45; }
.product-meta { margin-top: .32rem; }
.product-cost { line-height: 1.6; }
.product-controls { display: grid; gap: .45rem; }
.product-controls label { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .2rem; }
input, select { border: 1px solid #cdd2e3; border-radius: 8px; min-height: 39px; padding: .4rem .55rem; background: #fff; color: var(--ink); }
input[type=number] { width: 5.2rem; direction: ltr; }
select { max-width: 100%; }
.worker { display: flex; gap: .55rem; align-items: center; flex-wrap: wrap; }
.worker > div { flex: 1; min-width: 110px; }
.worker small { color: var(--muted); display: block; }
.worker label { display: grid; gap: .2rem; }
.upgrade, .offer, .business-row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.upgrade > div, .offer > div, .business-row > div:nth-child(2) { flex: 1 1 130px; }
.upgrade p, .offer p { font-size: .875rem; }
.row-actions { display: flex; gap: .35rem; flex-wrap: wrap; }
.segmented { display: inline-flex; gap: .2rem; background: #f1f0f9; padding: .2rem; border-radius: 11px; margin: .75rem 0; }
.empty { padding: .8rem .75rem; background: #f5f5fb; border-radius: 10px; }
.empty p { margin-top: .16rem; }
.guide, .warning { display: flex; align-items: center; gap: .65rem; border: 1px solid #ead9a3; background: #fff5d8; padding: .73rem .87rem; border-radius: 12px; flex-wrap: wrap; }
.guide > div { flex: 1 1 160px; }
.phone { background: #edecf7; border: 6px solid #252c4b; border-radius: 29px; box-shadow: 0 11px 28px #1b21331a; min-width: 0; overflow: hidden; }
.phone-notch { width: 53px; height: 5px; border-radius: 99px; background: #252c4b; margin: .53rem auto .05rem; }
.phone-header { display: flex; align-items: center; gap: .4rem; padding: .75rem .7rem .5rem; }
.phone-header span { color: #6551b5; }
.phone-tabs { display: flex; flex-wrap: wrap; padding: 0 .5rem; gap: .2rem; }
.phone-tabs button { flex: 1; padding-inline: .38rem; font-size: .875rem; min-height: 38px; }
.phone-body { padding: .55rem; display: grid; gap: .45rem; }
.message, .phone-card { display: flex; gap: .5rem; background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: .62rem; align-items: start; }
.message .tile-icon { width: 34px; height: 34px; font-size: 1rem; border-radius: 8px; }
.message p, .phone-card p { font-size: .875rem; }
.phone-card { display: grid; }
.balance { font-size: 1.75rem; }
.timeline { display: grid; grid-template-columns: repeat(3,1fr); gap: .45rem; margin: 1rem 0; }
.timeline div { display: grid; padding: .7rem; border-radius: 10px; background: #f3f4fa; border-top: 3px solid #d5d8e9; gap: .15rem; }
.timeline .reached { border-color: #7b63cd; background: #f2efff; }
.timeline span { font-size: .875rem; color: var(--muted); }
.event-panel { padding: 1rem; border: 1px solid #e1dfed; border-radius: 13px; background: #f7f6fc; }
.event-panel > p { margin: .5rem 0 .8rem; }
.options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .6rem; }
.options > div { background: #fff; border: 1px solid var(--line); padding: .75rem; border-radius: 10px; }
.options p { margin: .35rem 0 .65rem; }
.day-report .metrics, .day-report > .guide { margin: .8rem 0; }
.day-report > .button { margin-top: .8rem; }
.report-item { border-top: 1px solid var(--line); padding: .74rem 0; }
.report-item p { margin-top: .28rem; }
.report-list { display: grid; gap: .7rem; }
.report-list details > .card { margin-top: .6rem; }
.goal { margin-top: .55rem; }
dialog {
  color: var(--ink); border: 1px solid var(--line); border-radius: 18px; padding: 1.2rem;
  width: min(91vw,510px); max-height: calc(100dvh - 2rem); box-shadow: 0 16px 60px #1b203762;
}
dialog::backdrop { background: #141b36a8; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .65rem; }
.close { border: 0; background: #f0eef8; border-radius: 9px; color: var(--ink); width: 39px; height: 39px; font-size: 1.4rem; }
dialog > p { margin-bottom: .7rem; }
dialog form { display: grid; gap: .75rem; }
dialog form label { display: grid; gap: .28rem; }
dialog form > .button { justify-self: start; }
dialog .form-error { color: #8b2217; font-weight: 700; }
@media (max-width: 1120px) {
  .product { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .product-controls { grid-column: 1/-1; grid-template-columns: minmax(0,1fr) auto; }
  .product-controls label { justify-content: start; gap: .55rem; }
}
@media (max-width: 850px) {
  .game, .game.has-phone { display: block; }
  .phone { width: min(100%,430px); margin-inline: auto; }
  .business-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .top-date .activity { display: none; }
}
@media (max-width: 480px) {
  .entry { padding-top: 1rem; }
  .entry-header { margin-bottom: .75rem; }
  .device-choice, .business-choice { padding: .6rem; }
  .section-heading, .phase-head, .equipment, .page-head { flex-wrap: wrap; }
  .game-header .brand { font-size: .78rem; gap: .35rem; }
  .game-header .brand strong { display: block; }
  .game-header .brand-mark { width: 28px; height: 28px; font-size: 1.05rem; }
  .top-date { font-size: .8rem; }
  .top-date > span { display: none; }
  .top-funds { font-size: .85rem; }
  .game-menu summary { padding-inline: .38rem; font-size: .85rem; }
  .metrics { gap: .37rem; }
  .metric { padding: .55rem; gap: .32rem; }
  .options { grid-template-columns: 1fr; }
  .section-heading > div, .phase-head > div { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

.town-stage {
  width: min(100%, 930px); margin-inline: auto; border: 3px solid #343f60;
  background: #eef5e9; border-radius: 13px; padding: clamp(.52rem, 2.2vw, 1.15rem);
  box-shadow: 0 5px 0 #9ca9a4;
}
.town-controls { display: flex; justify-content: space-between; align-items: center; gap: .65rem; flex-wrap: wrap; }
.walk-scene {
  direction: ltr; position: relative; isolation: isolate; overflow: hidden;
  margin-block: .75rem; border: 3px solid #485b55; border-radius: 8px;
  background: #cfdfc7; cursor: crosshair; touch-action: manipulation;
  container-type: inline-size;
}
.walk-scene canvas { display: block; width: 100%; height: auto; }
.walk-scene:focus-visible { outline: 3px solid #6555bb; outline-offset: 3px; }
.room-scene { border-color: #68718b; background: #d9dce6; }
.scene-marker { position: absolute; top: 50%; left: 50%; width: 1px; height: 1px; pointer-events: none; }
.pointer-aim {
  display: none; position: absolute; left: 50%; top: 44%;
  width: 14px; height: 14px; translate: -50% -50%; border: 2px solid #fff;
  border-radius: 50%; box-shadow: 0 0 0 1px #182837; pointer-events: none; z-index: 4;
}
[data-pointer-locked] .pointer-aim { display: block; }
.mouse-lock-toggle[aria-pressed="true"] { color: #2f2a3c; background: #f4dda0; }
.pointer-lock-status { position: absolute; inset-inline-end: .75rem; top: 100%; color: #fff; background: #263450; padding: .45rem .65rem; border-radius: 6px; }
.pointer-lock-status:empty { display: none; }
.scene-label {
  position: absolute; translate: -50% -96%; direction: rtl; max-width: min(27%, 10rem);
  padding: .18rem .36rem; z-index: 1; border: 1px solid #687d8e; border-radius: 5px;
  background: #243745f5; color: #fffdf3; font-size: clamp(.68rem,2.2cqw,.95rem);
  font-weight: 800; line-height: 1.2; box-shadow: 0 2px 0 #28354850;
}
.scene-label:hover, .scene-label:focus-visible, .scene-label.nearby { background: #f4dda0; color: #293449; border-color: #aa8c53; }
.listing-label { background: #fff2cc; color: #32251c; border-color: #a6774f; }
.listing-label small { display: block; color: #634826; font-size: .8em; }
.ride-label small { display: block; font-size: .8em; }
.ride-label.ride-open { background: #285d50; border-color: #84c4a4; color: #fff; }
.park-pass { display: flex; flex-wrap: wrap; align-items: center; justify-content: end; gap: .32rem; direction: rtl; }
.park-pass p { color: #fff; padding: .35rem .5rem; border-radius: 6px; background: var(--hud-bg); flex-basis: 100%; }
.park-pass p:empty { display: none; }
.immersive .floor-controls .park-pass { margin-left: auto; max-width: min(330px,66%); }
.room-scene .scene-label { font-size: clamp(.67rem,2cqw,.86rem); }
.town-entrance { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.town-entrance p { font-weight: 650; }
.cleaning-progress { display: flex; align-items: center; gap: .5rem; font-weight: 750; }
.cleaning-ring {
  display: grid; place-items: center; flex: 0 0 3.25rem; width: 3.25rem; aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(#70e3b4 var(--clean-progress,0%),#53627d 0);
}
.cleaning-ring span {
  display: grid; place-items: center; width: 2.65rem; aspect-ratio: 1; border-radius: 50%;
  background: #252f48; color: #fff; font-size: .75rem; font-variant-numeric: tabular-nums;
}

.shop-floor {
  --floor-tile: #edf0f8;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fafafe;
  padding: clamp(.55rem, 2vw, 1rem);
}
.floor-heading, .floor-task, .floor-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .55rem;
  flex-wrap: wrap;
}
.floor-heading p { margin-top: .2rem; }
.floor-roster { margin-block: -.2rem .7rem; font-size: .9rem; }
.crew-recruitment { margin-block-start: 1rem; }
.elevator-ride { max-width: 25rem; margin: 2rem auto; text-align: center; }
.elevator-doors {
  width: min(70%,12rem); height: 10rem; margin: 0 auto 1rem; border: .5rem solid #53627d; border-bottom-width: .28rem;
  border-radius: 7px 7px 2px 2px;
  background: linear-gradient(90deg,#9babc3 0%,#dbdfec 47%,#445572 49%,#445572 51%,#becadd 53%,#879bb8 100%);
  box-shadow: inset 0 0 1.25rem #3a4b6f45;
}
.preparation {
  border: 1px solid #d3ccbf; border-radius: 13px; background: #fffdfa;
  margin-block: .8rem; padding: clamp(.65rem, 2vw, 1rem);
}
.prep-heading, .prep-actions { display: flex; align-items: center; justify-content: space-between; gap: .65rem; flex-wrap: wrap; }
.prep-actions > p { flex: 1 1 180px; }
.prep-choice-prompt { margin-block: .7rem; }
.prep-choices { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(8.5rem,100%),1fr)); gap: .5rem; }
.prep-choices .prep-choice { display: flex; align-items: center; justify-content: center; gap: .4rem; min-height: 3.3rem; }
.prep-choice span { font-size: 1.35rem; }
.prep-feedback { margin-block: .65rem 0; color: #8b3543; }
.customer-bubble.vip-customer { border-color: #a67619; }
.vip-label { color: #674607; background: #ffe5a8; border-radius: 5px; padding: .06rem .25rem; font-weight: 800; }
.pizza-board {
  display: grid; place-items: center; position: relative; overflow: hidden;
  height: clamp(9rem,27vh,14rem); margin-block: .65rem; border-radius: 10px; border: 1px solid #9c6c48;
  background: repeating-linear-gradient(0deg,#c5915c 0 24px,#bb8350 24px 26px,#ce9f70 26px 28px);
}
.pizza-crust {
  width: clamp(6.8rem,25vw,10rem); height: auto; aspect-ratio: 1; position: relative;
  overflow: hidden; border-radius: 49% 46% 48% 51%;
  background: radial-gradient(circle at 38% 37%,#ffe7b9 24%,#ecc68a 70%);
  box-shadow: inset 0 0 0 6px #edc383, 0 6px 10px #4f291a45;
}
.pizza-crust.pizza-size-1,.pizza-crust.pizza-size-2 { width: clamp(8rem,30vw,11.8rem); }
.pizza-board-dough .pizza-crust,.pizza-board-roll .pizza-crust { transform: scale(.68,.83); }
.pizza-sauce,.pizza-cheese { position: absolute; inset: 10%; border-radius: inherit; }
.pizza-sauce { background: radial-gradient(circle at 38% 32%,#e96848,#ad3930 80%); }
.pizza-cheese {
  inset: 13%;
  background: radial-gradient(ellipse at 20% 40%,#ba6135 0 6%,transparent 8%) 0 0 / 32px 31px,
    radial-gradient(ellipse at 67% 85%,#df9655 0 10%,transparent 12%) 1px 4px / 39px 32px,
    radial-gradient(circle,#ffe797,#e8ad58);
}
.pizza-pin { position: absolute; width: 42%; height: 1.1rem; rotate: -17deg; border-radius: 10px; background: #b56f37; box-shadow: inset 0 4px #e0aa71; }
.pizza-board-oven { background: repeating-linear-gradient(0deg,#453238 0 23px,#695053 24px 26px); border-color: #674947; }
.pizza-board.baking { box-shadow: inset 0 -2.5rem 2.4rem #ff76294d; }
.pizza-board.cooked .pizza-crust { box-shadow: inset 0 0 0 7px #bb723d,0 5px 9px #210f11b0; }
.pizza-oven-progress { position: absolute; inset: auto 0 0; height: 5px; background: #ffc071; transform-origin: right; animation: pizza-baking var(--bake-time) linear var(--elapsed) both; }
@keyframes pizza-baking { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .pizza-oven-progress { animation-timing-function: steps(1,end); } }
.prep-worktop {
  position: relative; overflow: hidden; isolation: isolate;
  aspect-ratio: 2.3; min-height: 105px; max-height: 245px; margin-block: .65rem;
  border: 1px solid #69584c; border-radius: 9px;
  background: repeating-linear-gradient(92deg, #312c2a11 0 3px, #f7f3e414 3px 5px), linear-gradient(145deg,#78736a,#37342f);
}
.prep-pizza { background: repeating-linear-gradient(90deg,#b19065 0 8%,#ab875e 8% 9%); }
.prep-games { background: linear-gradient(145deg,#8086b5,#3f476e); }
.prep-delivery { background: repeating-linear-gradient(90deg,#b99770 0 8%,#a78864 8% 9%); }
.prep-park { background: linear-gradient(145deg,#7eac80,#436c69); }
.prep-pets { background: repeating-linear-gradient(0deg,#9acacc 0 13%,#77acae 14% 15%); }
.prep-magic { background: radial-gradient(ellipse at center,#9e74b6,#4c3b70 72%); }
.prep-hotel { background: repeating-linear-gradient(140deg,#856b92 0 10%,#90749d 11% 12%); }
.prep-dough .worktop-prop, .prep-sauce .worktop-prop, .prep-oven .worktop-prop {
  width: auto; aspect-ratio: 1; background: #f4dfac; border-radius: 50%;
  border: 4px solid #b4824d; box-shadow: 4px 6px 0 #60494180;
}
.prep-sauce .worktop-prop { background: radial-gradient(circle,#f3d083 0 6%,transparent 7%) 0 0/17% 22%, radial-gradient(circle,#b9503e 0 66%,#f4dfac 67%); }
.prep-oven { background: repeating-linear-gradient(0deg,#995445 0 12%,#663d3c 13% 15%); }
.prep-oven .worktop-prop { background: radial-gradient(circle,#e0a446 0 14%,#f3c774 15% 36%,#cb7548 37% 67%,#eda15b 68%); border-color: #814d3c; }
[data-prep-surface] { touch-action: none; cursor: grab; user-select: none; }
[data-prep-surface].prepping { cursor: grabbing; }
.prepping .prep-hand { translate: 0 calc(-1 * var(--prep-pan, 0px)); }
.worktop-prop {
  position: absolute; inset: 23% auto auto 50%; translate: -50% 0; rotate: -8deg;
  width: 36%; height: 59%; border-radius: 12%;
  background: linear-gradient(135deg,#c5a379,#86664e); box-shadow: 3px 8px 12px #100e0d91;
}
.prep-scoop .worktop-prop, .prep-cone .worktop-prop {
  border-radius: 50%; aspect-ratio: 1.3; width: auto;
  background: radial-gradient(ellipse,#a6b5bc 0 27%,#687777 29% 40%,#e1e8e3 43% 51%,#889596 54% 60%,#949b9b 61%);
}
.prep-scan .worktop-prop {
  background: repeating-linear-gradient(90deg,#302a27 0 2%,#d9d7ca 3% 5%) center / 36% 36% no-repeat, linear-gradient(133deg,#e1d2b2,#937658);
}
.prep-wrap .worktop-prop {
  background: repeating-linear-gradient(132deg,#e9d6b900 0 8px,#f8ebc83d 9px 10px), linear-gradient(135deg,#efe1ca,#ae9575);
}
.prep-hand {
  position: absolute; width: 13%; height: 54%; bottom: -10%; border-radius: 43% 42% 18% 18%;
  background: linear-gradient(90deg,#b57b60,#dfae88 37% 61%,#ab7154);
  box-shadow: 2px 4px 6px #20191c48;
}
.prep-hand-left { left: 28%; rotate: -34deg; }
.prep-hand-right { right: 28%; rotate: 34deg; }
.prep-steps { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; padding-inline-start: 1.25rem; margin: .75rem 0 0; font-size: .85rem; color: var(--muted); }
.prep-steps .done { color: #285d3d; }
.prep-steps [aria-current] { font-weight: 800; color: var(--ink); }
.floor-task label { display: flex; gap: .45rem; align-items: center; flex-wrap: wrap; }
.floor-task select { max-width: 100%; }
#floor-message { min-height: 2.7em; margin-block: .45rem; }
.floor-controls { justify-content: center; }
.dpad {
  direction: ltr;
  display: grid;
  grid-template: repeat(2, 42px) / repeat(3, 44px);
  gap: .2rem;
}
.dpad button { padding: .2rem; touch-action: manipulation; min-height: unset; }
.move-up { grid-area: 1 / 2; }
.move-left { grid-area: 2 / 1; }
.move-down { grid-area: 2 / 2; }
.move-right { grid-area: 2 / 3; }
.floor-footer { display: flex; justify-content: flex-end; margin-top: .7rem; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.walk-scene { aspect-ratio: 112 / 65; }
.walk-scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.immersive {
  --hud-bg: #202b46f2;
  --hud-border: #687795;
  --edge: clamp(.55rem, 2vw, 1.25rem);
  display: block;
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  background: #9fbd8a;
}
.immersive .game-header {
  position: absolute;
  inset: max(env(safe-area-inset-top), var(--edge)) var(--edge) auto;
  border: 0;
  background: transparent;
  pointer-events: none;
}
.immersive .game-header-inner {
  gap: .35rem;
  padding: 0;
  pointer-events: none;
}
.immersive .game-header-inner > * { pointer-events: auto; }
.immersive .game-header .brand {
  background: var(--hud-bg);
  border: 1px solid var(--hud-border);
  border-radius: 9px;
  padding: .34rem .48rem;
  min-width: 0;
}
.immersive .game-header .brand-mark { width: 32px; height: 32px; font-size: 1.22rem; }
.immersive .top-date {
  background: var(--hud-bg);
  border: 1px solid var(--hud-border);
  border-radius: 8px;
  padding: .54rem .56rem;
  font-size: .9rem;
  white-space: nowrap;
}
.immersive .activity { display: none; }
.immersive .workspace,
.immersive .workspace > :is(.card,.town-stage),
.immersive .shop-floor {
  position: absolute;
  height: 100%;
  align-self: stretch;
  inset: 0;
  display: block;
  margin: 0;
  padding: 0;
  max-width: none;
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.immersive .shop-floor { pointer-events: none; }
.immersive .shop-floor > :is(.walk-scene,.floor-controls,.floor-task,.preparation) { pointer-events: auto; }
.immersive .walk-scene {
  position: absolute;
  inset: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border: none;
  border-radius: 0;
}
.immersive .walk-scene:focus-visible { outline-offset: -3px; }
.immersive .workspace > .page-head,
.immersive .workspace > .card > :is(.section-heading,.timeline,.floor-footer),
.immersive .shop-floor > :is(.floor-heading,.floor-roster) { display: none; }
.immersive .workspace > .warning {
  position: absolute;
  z-index: 7;
  top: 4.3rem;
  right: var(--edge);
  max-width: min(90%, 350px);
}
.immersive .town-controls, .immersive .floor-controls {
  position: absolute;
  z-index: 2;
  bottom: max(env(safe-area-inset-bottom), var(--edge));
  left: var(--edge);
  right: var(--edge);
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: nowrap;
  gap: .5rem;
  direction: ltr;
  pointer-events: none;
}
.immersive .town-controls > *, .immersive .floor-controls > * { pointer-events: auto; }
.immersive .town-entrance, .immersive .floor-controls > .button { margin-left: auto; }
.immersive .dpad { padding: .28rem; border-radius: 10px; background: #263450b8; gap: .2rem; flex: 0 0 auto; }
.immersive .dpad .button { border: 1px solid #ccd5ef; background: #f0f4fc; }
.immersive .dpad .button:active { background: var(--yellow); }
.immersive .town-entrance {
  direction: rtl;
  justify-content: flex-start;
  max-width: 390px;
  padding: .45rem;
  border: 1px solid var(--hud-border);
  border-radius: 9px;
  background: var(--hud-bg);
  gap: .35rem;
}
.immersive .town-entrance p {
  flex-basis: 100%;
  color: #f3f6ff;
  font-size: .87rem;
}
.immersive .town-entrance .button { padding: .45rem .55rem; min-height: 38px; font-size: .88rem; }
.immersive .floor-task {
  position: absolute;
  z-index: 2;
  bottom: calc(max(env(safe-area-inset-bottom), var(--edge)) + 3.15rem);
  right: var(--edge);
  display: flex;
  padding: .4rem .53rem;
  max-width: calc(100% - var(--edge) * 2);
  border-radius: 9px;
  background: var(--hud-bg);
  color: #fff;
}
.immersive #floor-message {
  position: absolute;
  bottom: calc(max(env(safe-area-inset-bottom), var(--edge)) + 7.3rem);
  right: var(--edge);
  z-index: 2;
  max-width: min(450px,calc(100% - var(--edge) * 2));
  min-height: 0;
  margin: 0;
  padding: .36rem .52rem;
  border-radius: 7px;
  background: var(--hud-bg);
  color: #f5f7ff;
  font-size: .875rem;
}
.immersive .preparation {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 49%;
  transform: translate(-50%,-50%);
  width: min(560px, calc(100% - var(--edge) * 2));
  max-height: min(66dvh, 520px);
  overflow-y: auto;
  margin: 0;
  box-shadow: 0 8px 30px #1820376a;
}

.guide-menu { position: relative; }
.guide-menu summary, .fullscreen-toggle {
  list-style: none;
  color: #fbfcff;
  background: #253655;
  border: 1px solid #7889ab;
  border-radius: 8px;
  padding: .55rem .62rem;
  min-height: 42px;
  font-weight: 800;
  white-space: nowrap;
}
.guide-menu summary::-webkit-details-marker { display: none; }
.guide-menu[open] summary { background: #455a82; }
.fullscreen-toggle { font-size: 1.25rem; line-height: 1; }
.objective-panel {
  position: absolute;
  z-index: 7;
  top: calc(100% + .45rem);
  inset-inline-end: 0;
  width: min(348px, calc(100vw - 1.4rem));
  max-height: min(75dvh, 550px);
  overflow-y: auto;
  padding: .87rem;
  color: #202a42;
  background: #fbfbff;
  border: 2px solid #7281a6;
  border-radius: 12px;
  box-shadow: 0 7px 25px #171f3b66;
}
.objective-panel h2 { margin-block: .26rem .4rem; }
.objective-business { font-size: .875rem; font-weight: 800; }
.objective-actions, .objective-extra { display: flex; gap: .34rem; flex-wrap: wrap; margin-top: .65rem; }
.objective-extra { border-top: 1px solid var(--line); padding-top: .28rem; }
.objective-items { list-style: none; padding: 0; margin-block: .45rem 0; }
.objective-items li {
  display: flex;
  gap: .6rem;
  justify-content: space-between;
  align-items: center;
  padding-block: .42rem;
  border-top: 1px solid var(--line);
}
.objective-items small { display: block; color: var(--muted); }
@media (max-width: 580px) {
  .immersive .game-header .brand { padding: .18rem; }
  .immersive .game-header .brand > span:last-child { display: none; }
  .immersive .top-date > span { display: none; }
  .immersive .top-date { font-size: .78rem; padding: .55rem .35rem; }
  .guide-menu summary, .immersive .game-menu summary, .fullscreen-toggle {
    padding-inline: .38rem;
    font-size: .83rem;
  }
  .objective-panel {
    position: fixed;
    inset-inline: auto var(--edge);
    top: calc(max(env(safe-area-inset-top), var(--edge)) + 3.35rem);
    width: min(348px,calc(100vw - var(--edge) * 2));
  }
  .immersive .floor-task { font-size: .84rem; }
  .immersive .dpad { grid-template: repeat(2,40px) / repeat(3,40px); }
}

.warehouse-label { background: #294655f5; border-color: #7b9ca8; }
.immersive .town-entrance .world-work-note { color: #fae1a6; }
.ice-game { padding: clamp(.65rem,3vw,1.2rem); background: #fffaf1; }
.ice-worktop {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(90px,28%);
  align-items: stretch;
  gap: .65rem;
  margin-block: .7rem;
  padding: .55rem;
  border: 2px solid #6e8490;
  border-radius: 12px;
  background: linear-gradient(145deg,#d5eeeb,#a8d1d5);
}
.ice-tubs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .35rem; }
.ice-tub, .ice-cone-pick {
  display: grid;
  place-items: center;
  gap: .35rem;
  font-weight: 800;
  color: #222f43;
  padding: .42rem .2rem;
  min-height: 94px;
  border: 2px solid #809ba4;
  border-radius: 9px;
  background: #f6faff;
}
.ice-tub:not(:disabled):hover, .ice-cone-pick:hover { border-color: #554395; background: #f1ebfc; }
.ice-tub i {
  width: min(38px,75%);
  aspect-ratio: 1;
  border-radius: 50% 53% 45% 48%;
  background: var(--ice);
  box-shadow: inset 3px 3px #ffffff54,inset -4px -5px #30223526,0 3px #44536542;
}
.ice-side { display: grid; place-content: center; }
.ice-cone-pick { padding-inline: .45rem; text-align: center; }
.ice-cone {
  display: block;
  width: 43px;
  height: 47px;
  background: repeating-linear-gradient(45deg,#d39960 0 4px,#b77642 5px 6px);
  clip-path: polygon(2% 0,98% 0,52% 100%);
}
.ice-stack { display: flex; flex-direction: column-reverse; align-items: center; justify-content: flex-start; min-height: 106px; }
.ice-stack i {
  display: block;
  width: 45px;
  height: 39px;
  margin-bottom: -5px;
  border-radius: 50% 48% 40% 45%;
  background: var(--ice);
  box-shadow: inset 2px 3px #ffffff4f,inset -3px -4px #2f223533;
}

.customer-bubble {
  position: absolute;
  z-index: 2;
  translate: -50% -100%;
  min-width: 2.25rem;
  max-width: 9rem;
  padding: .23rem .45rem;
  border: 1px solid #78839b;
  border-radius: 8px;
  background: #fbfdffff;
  color: #263248;
  box-shadow: 0 2px 0 #2b3a5140;
  font-size: clamp(.7rem,1.5cqw,.9rem);
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
}
.customer-bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: calc(50% - 4px);
  width: 7px;
  height: 7px;
  margin-top: -3px;
  rotate: 45deg;
  border-right: 1px solid #78839b;
  border-bottom: 1px solid #78839b;
  background: inherit;
}
.customer-bubble.next-customer { background: #fff0be; border-color: #8a6c39; z-index: 3; }

.game-menu nav { max-height: min(76dvh, 620px); overflow-y: auto; }
.settings-grid { display: flex; align-items: end; gap: .8rem; flex-wrap: wrap; }
.settings-grid label { display: grid; gap: .25rem; }
.market-group { margin-block: .8rem; width: 100%; }
.market-swatch { width: 32px; height: 32px; border-radius: 50%; background: var(--swatch); border: 1px solid #69788a; }
.design-grid { display: grid; grid-template-columns: repeat(var(--columns,10),minmax(0,1fr)); gap: 3px; margin-block: .8rem; max-width: 540px; }
.design-grid button { aspect-ratio: 1; color: #294564; border: 1px solid #adbec8; border-radius: 4px; background: #edf4f3; font-size: 1.15rem; }
.design-grid button:enabled:hover { background: #fff0be; }
.avatar-card { display: flex; flex-wrap: wrap; align-items: center; gap: 1.1rem; }
.avatar-preview { position: relative; width: 83px; height: 117px; background: #e8e6f4; border-radius: 10px; }
.avatar-preview i,.avatar-preview b,.avatar-preview span { position: absolute; left: 50%; transform: translateX(-50%); }
.avatar-preview i { top: 13px; width: 35px; height: 33px; background: linear-gradient(var(--hair) 30%,#f3b67c 30%); border-radius: 4px; }
.avatar-preview b { top: 45px; width: 49px; height: 35px; background: linear-gradient(var(--shirt) 28%,var(--apron) 28%); }
.avatar-preview span { top: 80px; width: 31px; height: 24px; background: linear-gradient(90deg,#36435a 45%,transparent 45% 55%,#36435a 55%); }
.topping-picker { display: flex; flex-wrap: wrap; gap: .35rem; margin-block: .55rem; }
.topping-preview { display: block; width: 35px; height: 14px; margin-bottom: -7px; border-radius: 55% 55% 30% 30%; background: var(--ice); z-index: 1; }
.customer-bubble small, [data-deadline] { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.customer-bubble { white-space: normal; width: max-content; }
.phone-card .upgrade { width: 100%; }

.event-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .45rem;
  border: 1px solid #d8ad53;
  border-radius: 9px;
  padding: .38rem .55rem;
  background: #fff0be;
  color: #372d41;
}
.immersive .event-alert {
  position: absolute;
  z-index: 5;
  top: calc(max(env(safe-area-inset-top),var(--edge)) + 3.35rem);
  right: var(--edge);
  max-width: calc(100% - var(--edge)*2);
}
.sale-toast {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 27%;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  padding: .45rem .78rem;
  border-radius: 10px;
  border: 1px solid #5d9071;
  background: #effee9;
  color: #245840;
  pointer-events: none;
  animation: sale-fade 3.8s ease forwards;
}
.sale-toast strong { font-size: 1.45rem; direction: ltr; }
@keyframes sale-fade { 0%,75% { opacity: 1; } 100% { opacity: 0; } }

.rent-row { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-block: .4rem; }

.menu-group-title { padding: .35rem .62rem .12rem; color: #bfcee8; font-size: .78rem; font-weight: 750; }
.crew-table-wrap { overflow-x: auto; margin-block: .6rem; }
.crew-table { width: 100%; min-width: 415px; border-collapse: collapse; text-align: start; }
.crew-table th, .crew-table td { padding: .45rem .5rem; border-bottom: 1px solid var(--line); text-align: start; vertical-align: middle; }
.crew-table thead { background: #f2f5fc; color: #364561; }
.crew-person { display: flex; gap: .45rem; align-items: center; }
.crew-person small { display: block; font-size: .76rem; font-weight: 500; }
.crew-person .tile-icon { width: 30px; height: 30px; }
.worker-speed { display: flex; flex-wrap: wrap; gap: .3rem; min-width: 8rem; }
.worker-speed .button { padding: .35rem .55rem; font-size: .79rem; }

.save-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .45rem; align-items: center; }
.save-row .save-card { min-width: 0; }
.delete-city { color: #a53848; border-color: #d7a6ae; background: #fff2f4; }
.delete-city:hover { background: #fce1e6; }
.day-hud { display: flex; justify-content: flex-end; }
.immersive .day-hud {
  position: absolute;
  z-index: 5;
  top: calc(max(env(safe-area-inset-top),var(--edge)) + 3.35rem);
  left: var(--edge);
}
.immersive .day-hud + .event-alert { top: calc(max(env(safe-area-inset-top),var(--edge)) + 6.65rem); }
.clock-display {
  display: flex;
  gap: .55rem;
  align-items: center;
  padding: .52rem .66rem;
  border: 1px solid #7a89a9;
  border-radius: 8px;
  background: #243450;
  color: #f6f8ff;
  font-size: .83rem;
  font-weight: 750;
}
.clock-display time { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.night-tint {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(#142144,#263453);
  opacity: var(--night,0);
  pointer-events: none;
  transition: opacity 1.2s linear;
}
.room-scene .night-tint { opacity: calc(var(--night,0)*.45); }
