:root {
  color-scheme: light;
  --green: #21483d;
  --green-deep: #17362e;
  --green-light: #dce8df;
  --brass: #bd9855;
  --brass-light: #e2c987;
  --paper: #f3ead6;
  --ink: #26352d;
  --muted: #8d8878;
  --red: #a9463e;
  font-family: "Cairo", Tahoma, sans-serif;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; height: 100dvh; margin: 0; padding: 0; overflow: hidden; }
body {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  width: 100dvw;
  min-width: 0;
  min-height: 0;
  color: var(--ink);
  background-color: #0b111e;
}
button { font: inherit; }
button:focus-visible, a:focus-visible { outline: 3px solid #e8bb64; outline-offset: 3px; }
.game-shell {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1200px;
  height: 675px;
  min-width: 1200px;
  min-height: 675px;
  --game-scale: 1;
  transform: translate(-50%, -50%) scale(var(--game-scale));
  transform-origin: center center;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  box-sizing: border-box;
  background: #e9e1d0;
  box-shadow: 0 24px 80px #100e0b99, 0 0 0 9px #60472d, 0 0 0 12px #a68148;
}
.main-menu {
  position: absolute;
  z-index: 1000;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  padding: 28px 34px 18px;
  border: 4px solid #d5e2e8;
  outline: 1px solid #9dcad8;
  outline-offset: -10px;
  color: #1e293b;
  background: linear-gradient(145deg, #ffffff 0%, #f8fbfc 48%, #e8f0f3 100%);
  box-shadow: inset 0 0 28px rgba(255,255,255,.9), 0 0 35px rgba(15,35,48,.2);
  text-align: center;
  box-sizing: border-box;
  opacity: 1;
  transition: opacity .28s ease, visibility .28s ease;
}
.main-menu[hidden], .main-menu.is-hidden { display: none !important; }
.main-menu.is-leaving { opacity: 0; visibility: hidden; }
.game-world { position: relative; display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; }
.main-menu:not(.is-hidden) ~ .game-world { display: none !important; }
.menu-top-stats { width: min(100%, 680px); display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.menu-top-stats > div { min-width: 0; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #d5e2e8; border-radius: 10px; color: #475569; background: rgba(255,255,255,.78); box-shadow: 0 4px 12px rgba(30,41,59,.06); font-size: 12px; }
.menu-top-stats strong { color: #1e293b; white-space: nowrap; font-size: 14px; }
.menu-brand-img { width: clamp(112px, 21vh, 170px); height: clamp(112px, 21vh, 170px); object-fit: contain; image-rendering: pixelated; margin-bottom: 2px; filter: drop-shadow(0 5px 12px rgba(30,41,59,.16)); animation: logo-float 3s ease-in-out infinite alternate; }
@keyframes logo-float { from { transform: translateY(0); } to { transform: translateY(-5px); } }
.menu-content { width: min(100%, 400px); padding: 18px 26px 20px; display: flex; flex-direction: column; align-items: center; border: 1px solid rgba(157,202,216,.85); border-radius: 16px; color: #1e293b; background: rgba(255,255,255,.94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 12px 32px rgba(30,41,59,.12), inset 0 1px 0 #fff; }
.menu-subtitle { margin: 0 0 12px; color: #475569; font-size: 1rem; line-height: 1.5; font-weight: 700; }
.menu-actions { display: flex; flex-direction: column; align-items: center; width: 100%; margin: 0 auto; }
.menu-btn { width: 100%; min-width: 0; min-height: 0; padding: 10px 18px; margin: 4px 0; border: 1px solid #cbd5e1; border-radius: 8px; color: #1e293b; background: #f8fafc; box-shadow: 0 2px 5px rgba(30,41,59,.08); cursor: pointer; font-family: "Cairo", sans-serif; font-size: .95rem; font-weight: 800; text-align: center; transition: all .15s ease; }
#btn-start-game { border: 1px solid #059669; color: #fff; background: #10b981; box-shadow: 0 3px 0 #059669, 0 6px 12px rgba(16,185,129,.2); text-shadow: none; }
#btn-start-game:hover { border-color: #047857; background: #0da674; transform: translateY(-1px); box-shadow: 0 4px 0 #047857, 0 8px 14px rgba(16,185,129,.22); }
#btn-start-game:active { transform: translateY(2px); box-shadow: 0 1px 0 #047857; }
#btn-continue-game, #btn-continue-game:disabled { border: 1px solid #cbd5e1; color: #64748b; background: #e2e8f0; box-shadow: none; cursor: not-allowed; opacity: .75; }
.menu-btn:disabled { opacity: .6; cursor: not-allowed; }
.menu-footer { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #475569; font-size: .8rem; }
.menu-version { color: #0369a1; font-weight: 700; text-shadow: none; }
.menu-cache-btn { padding: 5px 12px; border: 1px solid #9dcad8; border-radius: 6px; color: #334155; background: rgba(255,255,255,.72); cursor: pointer; font: inherit; font-size: .75rem; font-weight: 600; }
.menu-cache-btn:hover { border-color: #0369a1; color: #075985; background: #f0f9ff; }
.menu-cache-btn:disabled { opacity: .55; cursor: wait; }
.menu-location { color: #475569; font-family: "Amiri", serif; font-size: 12px; letter-spacing: .04em; }
@media (max-height: 600px) {
  .main-menu { padding: 12px 22px; }
  .menu-top-stats > div { padding: 6px 11px; font-size: 10px; }
  .menu-content { padding: 8px 20px 10px; }
  .menu-subtitle { margin-bottom: 5px; font-size: .85rem; }
  .menu-brand-img { width: 96px; height: 96px; }
  .menu-btn { padding: 7px 14px; margin: 3px 0; font-size: .85rem; }
}
@media (max-width: 540px) {
  .main-menu { padding: 18px 14px 12px; }
  .menu-top-stats { gap: 6px; }
  .menu-top-stats > div { padding: 7px 8px; flex-direction: column; gap: 2px; font-size: 9px; }
  .menu-top-stats strong { font-size: 11px; }
  .menu-content { width: min(100%, 360px); padding: 12px 18px; }
  .menu-footer { flex-wrap: wrap; justify-content: center; gap: 5px 12px; font-size: .7rem; }
  .menu-location { flex-basis: 100%; }
}
.topbar {
  z-index: 3;
  flex-shrink: 0;
  min-height: 52px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f8f2e5;
  background: linear-gradient(110deg, #19382f, #285342 68%, #1c3e34);
  border-bottom: 4px solid #987642;
  box-shadow: 0 4px 12px #14130f66;
}
.brand { flex: 0 1 205px; min-width: 0; display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.topbar-logo-img { width: 36px; height: 36px; object-fit: contain; image-rendering: pixelated; }
.brand strong, .brand small { display: block; white-space: nowrap; }
.brand strong { font-size: 15px; }
.brand small { color: #c4cbb8; font-size: 10px; letter-spacing: .3px; }
.hud { flex: 1 1 auto; display: flex; justify-content: space-between; align-items: center; gap: 4px; min-width: 0; overflow: hidden; }
.hud-item { flex: 1 1 0; display: flex; align-items: center; gap: 5px; min-width: 0 !important; }
.hud-item > span:last-child { min-width: 0; }
.queue-item, .health-item { min-width: 0 !important; }
.health-item .hud-icon { color: #e8a08c; }
.hud-item small, .hud-item strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hud-item small { color: #c2cbbd; font-size: clamp(.55rem, 1.15vh, .7rem); line-height: 1.4; }
.hud-item strong { font-size: clamp(.65rem, 1.5vh, .85rem); font-weight: 700; }
.hud-icon { width: 26px; height: 26px; display: grid; flex: 0 0 26px; place-items: center; color: #e5cc8d; border: 1px solid #657b5e; background: #ffffff0b; border-radius: 8px; font-size: 11px; }
.hud-icon.star { color: #e7bd59; font-size: 17px; }
.hud-icon.shield { color: #9dc6a2; font-size: 20px; }
.shortage-item .hud-icon { color: #dcb96a; font-weight: 900; }
.utility-actions { display: flex; flex-shrink: 0; align-items: center; gap: 5px; }
.icon-button { width: 34px; height: 34px; color: #f2e7cb; border: 1px solid #65806c; border-radius: 8px; background: #ffffff0c; cursor: pointer; font-size: 18px; transition: .18s ease; }
.icon-button:hover { background: #ffffff20; border-color: #d4b768; transform: translateY(-1px); }
.phone-button { position: relative; color: #e4d193; }
.phone-button.ringing { color: #fff3c0; border-color: #f0c466; background: #a74b3a; animation: phone-pulse .9s ease-in-out infinite, phone-vibrate .16s linear infinite; }
@keyframes phone-pulse { 0%,100% { box-shadow: 0 0 0 0 #f0c46633; } 50% { box-shadow: 0 0 0 5px #f0c46666; } }
@keyframes phone-vibrate { 0%,100% { translate: 0; } 25% { translate: -1px 0; } 75% { translate: 1px 0; } }
.scene { flex: 1; min-height: 0; padding: 17px 26px 0; display: flex; flex-direction: column; background: linear-gradient(145deg, #eee8d8, #e4dcc9); }
.scene-heading { display: flex; align-items: center; justify-content: space-between; min-height: 50px; margin-bottom: 11px; }
.eyebrow { color: #9b8356; font-size: 10px; font-weight: 700; letter-spacing: .7px; }
h1 { margin: 0; font-size: clamp(17px, 1.55vw, 22px); line-height: 1.35; color: #283c32; }
h1 span { color: #b89a5c; }
.open-sign { padding: 5px 11px; border: 1px solid #cad6c6; border-radius: 99px; color: #557655; background: #edf2e8; font-size: 10px; font-weight: 700; }
.open-sign i { display: inline-block; width: 7px; height: 7px; margin-left: 4px; background: #76a76a; border-radius: 50%; box-shadow: 0 0 7px #76a76a; }
.station { flex: 1; min-height: 0; }
.station[hidden] { display: none !important; }
.station-counter { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.42fr); grid-template-rows: minmax(0, 1fr); gap: 10px 16px; height: 100%; min-height: 0; }
.customer-side, .desk-side { position: relative; min-height: 0; overflow: hidden; border: 1px solid #cfc3a8; border-radius: 11px; background: #f6f0e2; box-shadow: 0 4px 12px #4f3d2810; }
.customer-side { display: flex; flex-direction: column; align-items: stretch; background: linear-gradient(#e9dec6, #f8f2e4 63%); }
.window-label { display: flex; align-items: center; gap: 7px; color: #625e4f; font-size: 11px; font-weight: 700; }
.window-label > span { width: 22px; height: 22px; display: grid; place-items: center; color: #f4e3b4; border-radius: 7px; background: var(--green); font-size: 12px; }
.customer-side > .window-label { position: absolute; z-index: 1; top: 12px; right: 14px; }
.customer-scene { position: relative; flex: 1 1 0; min-height: 0; overflow: hidden; background: linear-gradient(#d5d0ba 0%, #b8b59d 68%, #80644a 69%, #604530 100%); }
.customer-scene::before { content: ""; position: absolute; inset: 0; opacity: .38; background: repeating-linear-gradient(90deg, transparent 0 54px, #fff5 55px 58px, transparent 59px 110px); }
.shelf-blur { position: absolute; top: 22%; right: 7%; left: 7%; height: 47%; display: flex; justify-content: space-around; align-items: end; border-bottom: 7px solid #725b3c; }
.shelf-blur i { width: 14%; height: 64%; border-radius: 5px 5px 1px 1px; background: #62816a; box-shadow: inset 0 4px #a9bc8b, 0 -3px 4px #40382744; }
.shelf-blur i:nth-child(2) { height: 77%; background: #b08a55; }
.shelf-blur i:nth-child(3) { height: 56%; background: #8b685a; }
.shelf-blur i:nth-child(4) { height: 72%; background: #c2a75d; }
.shelf-blur i:nth-child(5) { height: 61%; background: #748a67; }
.customer-portrait { position: absolute; z-index: 1; bottom: 1px; right: 50%; display: flex; align-items: flex-end; justify-content: center; width: 100%; height: 180px; max-width: 100%; transform: translateX(50%); transition: .3s ease; }
.portrait-halo { display: none !important; }
.portrait-face { position: absolute; z-index: 2; top: 27px; right: 50%; width: 80px; height: 93px; transform: translateX(50%); border: 1px solid #8b6048; border-radius: 46% 46% 42% 42%; color: transparent; background: linear-gradient(135deg, #d2a27d, #aa7657); box-shadow: none; font-size: 0; }
.portrait-body { position: absolute; bottom: -34px; right: 50%; width: 166px; height: 122px; transform: translateX(50%); border: 2px solid #4d5946; border-radius: 48% 48% 0 0; background: linear-gradient(90deg, #566951, #879477 50%, #566951); }
.customer-portrait.young .portrait-face { border-radius: 42% 42% 45% 45%; background: linear-gradient(135deg,#d9aa87,#b57e5e); box-shadow: inset 0 14px #292521; }
.customer-portrait.young .portrait-body { background: linear-gradient(90deg,#514e4a,#73706a 50%,#514e4a); }
.portrait-body { z-index: 0; }
.customer-portrait.woman::before,
.customer-portrait.elder-woman::before { content: ""; position: absolute; z-index: 1; top: 18px; right: 50%; width: 98px; height: 119px; transform: translateX(50%); border: 2px solid #55463c; border-radius: 48% 48% 41% 41%; background: linear-gradient(135deg, #a9876a, #705747 70%, #59483c); box-shadow: 0 3px 7px #34251955; }
.customer-portrait.woman::after,
.customer-portrait.elder-woman::after { content: ""; position: absolute; z-index: 1; right: 50%; bottom: 8px; width: 143px; height: 78px; transform: translateX(50%); border: 2px solid #655348; border-radius: 46% 46% 8% 8%; background: linear-gradient(100deg, #72584e, #a17b68 50%, #72584e); clip-path: polygon(18% 0, 82% 0, 100% 100%, 0 100%); }
.customer-portrait.woman .portrait-face { z-index: 2; top: 29px; width: 70px; height: 88px; border: 0; border-radius: 45% 45% 43% 43%; background: linear-gradient(135deg, #d5a27e, #b17a5d); box-shadow: none; }
.customer-portrait.woman .portrait-body { width: 176px; height: 116px; border-color: #5b4a40; border-radius: 48% 48% 0 0; background: linear-gradient(90deg, #71554e, #a07a64 50%, #71554e); }
.customer-portrait.elder-woman::before { top: 14px; width: 108px; height: 129px; border-color: #54463b; border-radius: 48% 48% 36% 36%; background: linear-gradient(135deg, #80705b, #b49b77 53%, #71624f); }
.customer-portrait.elder-woman::after { bottom: 2px; width: 158px; height: 91px; border-color: #76664f; border-radius: 48% 48% 5% 5%; background: linear-gradient(100deg, #74644e, #b09a76 50%, #74644e); clip-path: polygon(24% 0, 76% 0, 100% 100%, 0 100%); }
.customer-portrait.elder-woman .portrait-face { z-index: 2; top: 31px; width: 68px; height: 83px; border: 0; border-radius: 46% 46% 45% 45%; background: linear-gradient(135deg, #c99a78, #a8765c); box-shadow: none; }
.customer-portrait.elder-woman .portrait-body { width: 179px; height: 112px; transform: translateX(50%) rotate(-1deg); border-color: #675a49; border-radius: 50% 50% 0 0; background: linear-gradient(90deg, #75664f, #a29170 50%, #75664f); }
.customer-reaction-bubble { position: absolute; z-index: 4; top: 29%; left: 4%; width: min(45%, 170px); min-height: 56px; padding: 8px 9px; display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: center; gap: 5px; border: 1px solid #d5c8aa; border-radius: 12px; color: #514a3d; background: #fffdf6; box-shadow: 0 4px 11px #38291b24; }
.customer-reaction-bubble[hidden] { display: none; }
.reaction-emoji { font-size: 17px; line-height: 1; text-align: center; }
.reaction-text { font-size: 11px; line-height: 1.55; }
.reaction-tail { position: absolute; top: 50%; right: -6px; width: 11px; height: 11px; transform: translateY(-50%) rotate(45deg); border-top: 1px solid #d5c8aa; border-right: 1px solid #d5c8aa; background: #fffdf6; }
.customer-reaction-bubble.reaction-pop { animation: reaction-pop .36s ease-out both; }
@keyframes reaction-pop {
  0% { opacity: 0; transform: scale(.8) translateY(6px); }
  60% { opacity: 1; transform: scale(1.04) translateY(-2px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
.rx-scrambled { display: inline-block; color: #50483d; filter: blur(.45px); font-family: "Amiri", "Times New Roman", serif; font-style: italic; letter-spacing: 1.2px; text-decoration: underline wavy #7b6754 1px; text-shadow: 1px 1px #8c765a66; transform: rotate(-1deg); }
.rx-decoded { color: #384b42; filter: none; font-style: normal; text-decoration: none; transform: none; }
.counter-wood { position: absolute; z-index: 2; bottom: 0; width: 100%; height: 18px; border-top: 3px solid #ba9562; background: repeating-linear-gradient(0deg,#533d2c 0 4px,#6d5135 4px 7px); box-shadow: 0 -4px 8px #2c211c55; }
.customer-caption { padding: 10px 15px 3px; }
.customer-number { color: #9b8356; font-size: 10px; font-weight: 700; }
.customer-caption h2 { margin: 1px 0 0; font-size: 19px; line-height: 1.45; color: #293d32; }
.customer-tag { color: #898273; font-size: 10px; }
.dialogue-card { position: relative; min-height: 62px; margin: 8px 13px 13px; padding: 9px 14px 9px 30px; border: 1px solid #e4d7ba; border-radius: 9px; background: #fffcf4; box-shadow: 0 3px 7px #765d3510; }
.dialogue-card p { margin: 0; color: #554f43; font-size: 11px; line-height: 1.8; }
.dialogue-card p.dialogue-reveal-fast { animation: dialogue-reveal .18s ease-out both; }
.dialogue-card p.dialogue-reveal-normal { animation: dialogue-reveal .55s ease-out both; }
.dialogue-card p.dialogue-reveal-slow { animation: dialogue-reveal 1.25s ease-out both; }
@keyframes dialogue-reveal { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.quote-mark { position: absolute; top: 0; left: 9px; color: #c2a66c; font-family: Georgia,serif; font-size: 29px; }
.dialogue-tail { position: absolute; bottom: -6px; right: 25px; width: 10px; height: 10px; transform: rotate(45deg); border-left: 1px solid #e4d7ba; border-bottom: 1px solid #e4d7ba; background: #fffcf4; }
.queue-chatter-box { min-height: 27px; margin: 0 13px 8px; padding: 4px 8px; display: flex; align-items: center; gap: 6px; border: 1px solid #dfd9c9; border-radius: 7px; color: #77796d; background: #f5f4ed; }
.queue-chatter-box > span { flex: 0 0 auto; color: #a8946c; font-family: Georgia,serif; font-size: 16px; line-height: 1; }
.queue-chatter-box p { overflow: hidden; margin: 0; color: #72766c; font-size: 10px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.desk-side { display: flex; flex-direction: column; height: 100%; min-height: 0; background: #f5efdf; }
.desk-topline { min-height: 39px; padding: 0 13px; display: flex; align-items: center; justify-content: space-between; color: #787363; font-size: 10px; font-weight: 700; }
.desk-time { color: #a79e8a; font-weight: 500; }
.desk-time b { margin-right: 4px; color: #d3a849; font-size: 15px; }
.desk-workspace { position: relative; flex: 1 1 0; min-height: 0; overflow: hidden; display: grid; place-items: center; border-top: 1px solid #ded4bf; border-bottom: 1px solid #b49a72; background-color: #81613e; background-image: repeating-linear-gradient(2deg, transparent 0 18px, #422d1d1c 19px 21px, transparent 22px 33px), linear-gradient(90deg,#765737,#9a764c 34%,#846443 66%,#705235); box-shadow: inset 0 7px 12px #33251b35, inset 0 -8px 14px #33251b30; }
.desk-workspace::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .16; background: repeating-linear-gradient(88deg, transparent 0 86px, #e6ca8d 87px 88px, transparent 89px 170px); }
.prescription { position: relative; z-index: 1; width: min(46%, 218px); height: 196px; padding: 9px 12px; transform: rotate(-3deg); text-align: right; color: #524d42; border: 1px solid #e5dcc7; border-radius: 2px; background: #fbf8eb; box-shadow: 0 8px 13px #2e201b55; cursor: zoom-in; transition: .2s ease; }
.prescription::after { content: attr(data-stamp-label); position: absolute; z-index: 2; right: 50%; bottom: 31%; padding: 4px 8px; border: 3px double currentColor; border-radius: 5px; color: transparent; opacity: 0; pointer-events: none; font-size: 15px; font-weight: 900; white-space: nowrap; transform: translateX(50%) rotate(-12deg) scale(1.35); }
.prescription[data-stamp-type="accepted"]::after { color: #23885c; }
.prescription[data-stamp-type="rejected"]::after { color: #aa4138; }
.prescription.stamp-impact { animation: prescription-impact .42s cubic-bezier(.2,.8,.25,1); }
.prescription.stamp-impact::after { animation: stamp-ink .56s ease-out both; }
.prescription:hover { transform: rotate(0) translateY(-3px); box-shadow: 0 12px 19px #2e201b66; }
.rx-top { display: flex; align-items: center; justify-content: space-between; color: #3b5747; font-size: 9px; line-height: 1.2; text-align: center; }
.rx-top b { font-family: Georgia,serif; font-size: 22px; font-style: italic; }
.rx-top i { color: #a64e43; font-style: normal; font-size: 19px; }
.rx-rule { display: block; height: 1px; margin: 6px 0; background: #c8bd9f; }
.rx-meta { display: flex; justify-content: space-between; color: #9a917c; font-size: 7px; }
.rx-meta b { color: #625c4e; font-weight: 500; }
.rx-patient { display: block; margin-top: 6px; font-size: 8px; }
.rx-medicine { display: block; margin: 5px 0 0 30px; direction: ltr; text-align: left; color: #384b42; font-family: Georgia,serif; font-size: 11px; line-height: 1.55; }
.rx-signature { position: absolute; bottom: 29px; right: 13px; color: #456b8a; font-family: "Amiri",serif; font-size: 12px; transform: rotate(-5deg); }
.rx-seal { position: absolute; bottom: 28px; left: 14px; width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid #ab5a4f; border-radius: 50%; color: #ab5a4f; font-size: 7px; line-height: 1.1; transform: rotate(-14deg); }
.rx-seal.invalid { opacity: .25; border-style: dashed; text-decoration: line-through; }
.rx-seal.counterfeit { opacity: .8; border: 3px double #a54138; color: #a54138; transform: rotate(12deg) scale(1.08); }
.rx-forensic { position: absolute; right: 50%; bottom: 30px; display: none; width: 76px; transform: translateX(50%) rotate(-8deg); border: 1px dashed #5dc58b; border-radius: 3px; color: #31a969; background: #d3ffe376; box-shadow: 0 0 12px #42f58c99; text-align: center; font: 800 7px/1.5 monospace; }
.rx-workpaper { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 9px; width: min(94%, 440px); }
.rx-workpaper .prescription { flex: 0 1 218px; width: min(46%, 218px); }
.rx-checklist { flex: 0 1 190px; width: min(45%, 190px); padding: 8px; border: 1px solid #d5c7a6; border-radius: 6px; color: #554f43; background: #fffdf5ed; box-shadow: 0 5px 12px #2e201b33; }
.rx-checklist[hidden] { display: none; }
.rx-checklist h3 { margin: 0 0 6px; color: #385742; font-size: 9px; line-height: 1.5; }
.rx-checklist ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.rx-checklist li { display: grid; grid-template-columns: 13px 13px minmax(0,1fr); align-items: start; gap: 4px; color: #766d5d; font-size: 8px; line-height: 1.6; }
.rx-checklist .checklist-number, .rx-checklist .checklist-status { width: 13px; height: 13px; display: grid; place-items: center; border: 1px solid #b8ad96; border-radius: 50%; color: #796f5d; background: #fff; font-size: 8px; font-weight: 900; line-height: 1; }
.rx-checklist .checklist-status { border-radius: 3px; color: transparent; font-size: 10px; }
.rx-checklist .checklist-copy { min-width: 0; }
.rx-checklist li.is-complete { color: #3d7155; }
.rx-checklist li.is-complete .checklist-number { border-color: #3d8b63; color: #fff; background: #3d8b63; }
.rx-checklist li.is-complete .checklist-status { border-color: #3d8b63; color: #fff; background: #3d8b63; }
.desk-side.uv-active .desk-workspace { background-image: repeating-linear-gradient(2deg, transparent 0 18px, #96ffd324 19px 21px, transparent 22px 33px), linear-gradient(90deg,#55476b,#695779 34%,#54476c 66%,#493d5c); }
.desk-side.uv-active .rx-forensic { display: block; }
.desk-side.uv-active .rx-forensic.authentic { color: #25a85f; border-color: #25a85f; box-shadow: 0 0 14px #35f47e; }
.desk-side.uv-active .rx-forensic.counterfeit { color: #f03e4f; border-color: #f03e4f; background: #ff657322; box-shadow: 0 0 14px #ff273f; }
.desk-tools { position: absolute; z-index: 3; top: 6px; left: 3%; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; max-width: 40%; }
.desk-tool { position: relative; min-height: 26px; padding: 2px 6px; border: 1px solid #cfb47a; border-radius: 6px; color: #f3e7c7; background: #493a29d9; box-shadow: 0 3px 7px #251b1277; cursor: pointer; font-size: 8px; font-weight: 700; }
.desk-tool:hover { border-color: #f0d98a; background: #59472f; }
.uv-tool[aria-pressed="true"] { border-color: #8df1aa; color: #a1ffc0; background: #253f35; box-shadow: 0 0 12px #63e99788; }
.uv-tool { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.uv-tool i { display: inline; color: #d4c49d; font-size: 7px; font-style: normal; }
.letter-tool { max-width: 154px; color: #f0dfb8; white-space: nowrap; }
.letter-tool span { margin-left: 3px; }
.doc-tool { max-width: 166px; color: #e6f4f0; border-color: #9dcac0; background: #25483fe8; white-space: nowrap; }
.doc-tool:hover { border-color: #d3eee7; background: #326255; }
.doc-tool span { margin-left: 3px; }
.calculator-tool { color: #f7edcf; border-color: #c4a86d; background: #5b492fe8; white-space: nowrap; }
.calculator-tool:hover { border-color: #f0d98a; background: #725936; }
.counter-phone { width: 36px; height: 37px; font-size: 17px; }
.phone-ring-dot { position: absolute; top: -3px; right: -3px; width: 8px; height: 8px; border: 1px solid #f6e8c1; border-radius: 50%; background: #a84437; }
.desk-tool.ringing { animation: phone-pulse .9s ease-in-out infinite, phone-vibrate .16s linear infinite; border-color: #f0c466; }
.rx-hint { position: absolute; bottom: 5px; right: 0; width: 100%; color: #a19479; text-align: center; font-size: 7px; }
.rx-hint span { color: #977c49; font-size: 13px; vertical-align: middle; }
.desk-props { position: absolute; z-index: 1; inset: 0; pointer-events: none; }
.jar { position: absolute; bottom: 18px; width: 30px; height: 56px; border: 2px solid #d5c293; border-radius: 6px 6px 10px 10px; background: linear-gradient(90deg,#83916b88,#dfd2a888,#74845d88); box-shadow: 0 4px 7px #36231555; }
.jar::before { content: ""; position: absolute; top: -8px; right: 5px; width: 16px; height: 8px; border-radius: 2px 2px 0 0; background: #c3aa6e; }
.jar-one { right: 7%; }
.jar-two { right: 17%; height: 44px; width: 25px; }
.pen-cup { position: absolute; left: 8%; bottom: 16px; color: #bfaa7b; font-size: 35px; transform: rotate(11deg); }
.desk-stamp { position: absolute; z-index: 0; bottom: 17px; left: 24%; width: 55px; height: 55px; display: grid; place-items: center; border: 2px solid #bd9753; border-radius: 50%; color: #d4b36e; text-align: center; font-size: 8px; line-height: 1.3; transform: rotate(-15deg); opacity: .7; }
.desk-drawer { position: absolute; z-index: 2; left: 4%; bottom: 12px; min-width: 111px; padding: 5px 9px; border: 1px solid #bd9e6d; border-radius: 5px; color: #f8eaca; background: linear-gradient(#60482e,#423222); box-shadow: 0 4px 9px #24181088; text-align: center; }
.drawer-label { display: block; font-size: 8px; color: #dbc99e; }
.desk-drawer strong { display: block; font-size: 13px; }
.desk-drawer strong small { font-size: 8px; }
.drawer-button { padding: 2px 6px; color: #4a3b2b; border: 0; border-radius: 3px; background: #d3b877; font-size: 8px; cursor: pointer; }
.drawer-button:hover { background: #ecd697; }
.customer-actions { display: flex; flex: 0 0 auto; flex-direction: column; gap: 6px; margin-top: auto; padding: 6px 12px; }
.patient-dialogue-actions [hidden] { display: none; }
.patient-dialogue-actions { display: grid; gap: 4px; }
.patient-question-button, .patient-match-button { width: 100%; min-height: 27px; padding: 4px 8px; border: 1px solid #9a7a48; border-radius: 6px; color: #fff8e9; background: #705334; cursor: pointer; font-size: 8px; font-weight: 700; }
.patient-match-button { border-color: #557a56; background: #3e6a51; }
.patient-question-button:hover, .patient-match-button:hover { filter: brightness(1.08); }
.patient-question-button:disabled, .patient-match-button:disabled { opacity: .58; cursor: not-allowed; }
.clinic-call-button { border-color: #61758b; background: #53677c; }
.patient-clinic-status { position: relative; overflow: hidden; margin: 0; padding: 5px 7px; border-radius: 4px; color: #53677c; background: #e7edf1; font-size: 8px; text-align: center; }
.patient-clinic-status.is-calling::after { content: ""; position: absolute; right: 0; bottom: 0; width: 100%; height: 2px; background: #6283a1; transform-origin: right; animation: clinic-call-progress 3s linear forwards; }
.patient-clue { margin: 0; padding: 5px 7px; border-right: 2px solid #b98642; border-radius: 3px; color: #544d40; background: #f8f0df; font-size: 8px; line-height: 1.7; }
.medicine-retrieval { display: grid; grid-template-columns: minmax(140px, .65fr) minmax(0, 1fr); align-items: center; flex: 0 0 auto; width: 100%; min-width: 0; gap: 4px 8px; }
.medicine-retrieval[hidden] { display: none; }
.retrieval-button { width: auto; min-width: 0; height: 32px; min-height: 32px; justify-self: start; padding: 2px 12px; border: 1px solid #9a7a48; border-radius: 6px; color: #fff8e9; background: linear-gradient(110deg, #705334, #8b6a3d); box-shadow: 0 2px 5px #30271f24; cursor: pointer; font-size: .8rem; font-weight: 700; transition: .16s ease; }
.retrieval-button:hover:not(:disabled) { border-color: #e4c57f; filter: brightness(1.08); }
.retrieval-button:disabled { opacity: .78; cursor: not-allowed; }
.medicine-retrieval.is-ready .retrieval-button { border-color: #557a56; background: linear-gradient(110deg, #3e6a51, #648257); }
.medicine-progress { height: 4px; overflow: hidden; border-radius: 5px; background: #d7c9a9; }
.medicine-progress span { display: block; width: 0; height: 100%; background: #f0ca6c; }
.medicine-retrieval.is-searching .medicine-progress span { animation: shelf-search 1.7s ease-out forwards; }
.medicine-retrieval.is-ready .medicine-progress span { width: 100%; background: #7aa36d; }
.medicine-retrieval p { grid-column: 2; margin: 0; color: #77705f; font-size: 8px; text-align: center; }
.transaction-actions { display: flex; flex: 0 0 44px; align-items: stretch; gap: 8px; height: 44px; margin-bottom: 4px; }
.action-button { min-height: 0; min-width: 0; flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: clamp(4px, 1vh, 8px); padding: 4px; border: 1px solid transparent; border-radius: 7px; cursor: pointer; font-size: 10px; font-weight: 700; transition: .16s ease; }
.action-button:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.04); box-shadow: 0 3px 6px #30271f24; }
.action-button.stamp-impact { animation: stamp-impact .34s cubic-bezier(.2,.8,.25,1); }
@keyframes stamp-impact { 0% { transform: translateY(0) scale(1); } 30% { transform: translateY(3px) scale(.94); } 72% { transform: translateY(-1px) scale(1.025); } 100% { transform: translateY(0) scale(1); } }
@keyframes prescription-impact { 0%,100% { transform: rotate(-3deg) translateY(0); } 28% { transform: rotate(-1deg) translateY(3px) scale(.985); } 70% { transform: rotate(-4deg) translateY(-2px); } }
@keyframes stamp-ink { 0% { opacity: 0; transform: translateX(50%) rotate(-12deg) scale(1.35); } 30% { opacity: .9; transform: translateX(50%) rotate(-12deg) scale(.94); } 55%,100% { opacity: .72; transform: translateX(50%) rotate(-12deg) scale(1); } }
.action-button span { font-size: 15px; }
.accept-button { color: #f9f4e9; border: 2px solid #b6d2bd; border-radius: 4px; background: linear-gradient(145deg,#34744f,#235a3d); box-shadow: inset 0 0 0 2px #ffffff18, 0 3px 0 #173e2c, 0 5px 9px #30271f32; letter-spacing: .1px; }
.reject-button { color: #8b4239; border: 2px solid #e6c6b8; border-radius: 4px; background: linear-gradient(145deg,#fff8f2,#ecd8d0); box-shadow: inset 0 0 0 2px #ffffffb8, 0 3px 0 #a9796b, 0 5px 9px #30271f20; }
.accept-button:not(:disabled), .reject-button:not(:disabled) { animation: stamp-ready 2.8s ease-in-out infinite; }
.accept-button.stamp-impact:not(:disabled), .reject-button.stamp-impact:not(:disabled) { animation: stamp-impact .34s cubic-bezier(.2,.8,.25,1), stamp-ready 2.8s ease-in-out infinite; }
@keyframes stamp-ready { 50% { box-shadow: inset 0 0 0 2px #ffffff22, 0 3px 0 #173e2c, 0 6px 12px #30271f45; } }
.action-button:disabled { opacity: .43; cursor: not-allowed; }
@keyframes shelf-search { from { width: 0; } to { width: 100%; } }
@keyframes clinic-call-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.station-switch { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 34px; margin-top: 4px; padding: 4px 8px 6px; color: #a19885; font-size: 9px; }
.station-counter .station-switch { flex: 0 0 auto; margin-top: 0; padding: 4px 12px; }
.station-switch-actions { display: flex; align-items: center; gap: 7px; }
.station-switch-actions .switch-button { min-height: 32px; }
#btn-end-shift { border-color: #9c7541; color: #fff8e6; background: #6b4d2e; }
#btn-end-shift[hidden] { display: none !important; }
.switch-button { padding: 3px 8px; border: 1px solid #cbb98e; border-radius: 99px; color: #4d5b47; background: #f5efdF; cursor: pointer; font-size: .75rem; font-weight: 700; transition: .16s ease; }
.switch-button:hover { color: #fff9e9; border-color: #315343; background: #315343; }
.switch-button b { margin-right: 3px; color: #b28e4f; }
.utility-actions { flex: 0 0 auto; gap: 4px; }
.icon-button { width: auto; min-width: 30px; height: 30px; padding: 3px 8px; border-radius: 99px; font-size: .75rem; }
#btn-goto-station-2 { margin-top: 6px; }
.game-footer { min-height: 32px; margin-top: 4px; display: flex; align-items: center; justify-content: space-between; color: #988e79; font-size: 9px; }
.game-footer i { color: #b89a5c; font-style: normal; }
.game-footer b { color: #687258; }
.footer-leaf { color: #9a8457; font-size: 15px; }

/* Computer station */
.station-computer { display: flex; flex-direction: column; align-items: stretch; justify-content: stretch; gap: 7px; }
.clinical-terminal { flex: 1 1 0; min-height: 0; overflow: hidden; display: flex; flex-direction: column; border: 1px solid #b9c9c4; border-radius: 12px; color: #30453a; background: #f7faf8; box-shadow: 0 8px 20px #3142391a, inset 0 0 0 4px #e6eeea; }
.terminal-topbar { flex: 0 0 42px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #d5e0dc; color: #53675c; background: linear-gradient(100deg,#fff,#edf4f0); font-size: 9px; font-weight: 700; }
.terminal-topbar > div { display: flex; align-items: center; gap: 14px; }
.terminal-topbar strong { color: #31523f; }
.secure-status { display: inline-flex; align-items: center; gap: 5px; color: #21865d; }
.secure-status i, .status-online { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #1eaa6d; box-shadow: 0 0 0 3px #dff3e8; }
.terminal-layout { flex: 1 1 0; min-height: 0; padding: 12px; display: grid; grid-template-columns: minmax(190px,.75fr) minmax(0,2fr); gap: 12px; }
.terminal-status-card { min-height: 0; padding: 13px; display: flex; flex-direction: column; align-items: flex-start; border: 1px solid #d4dfd9; border-radius: 10px; background: linear-gradient(155deg,#fff,#eef5f1); box-shadow: 0 3px 9px #2948330c; }
.terminal-brand-mark { width: 38px; height: 38px; margin-bottom: 8px; display: grid; place-items: center; border: 1px solid #cae0d1; border-radius: 11px; color: #178356; background: #eaf5ee; font-size: 23px; }
.terminal-kicker { color: #8c9a8f; font-size: 8px; font-weight: 800; }
.terminal-status-card h2 { margin: 2px 0 12px; color: #2e503b; font-size: 14px; }
.terminal-status-card dl { width: 100%; margin: 0; display: grid; gap: 8px; }
.terminal-status-card dl > div { padding-bottom: 7px; border-bottom: 1px solid #e1e9e3; }
.terminal-status-card dt { margin-bottom: 3px; color: #8b978d; font-size: 8px; }
.terminal-status-card dd { margin: 0; color: #475b4b; font-size: 9px; font-weight: 700; line-height: 1.5; }
.terminal-status-card .status-online { width: 6px; height: 6px; margin-left: 4px; }
.terminal-drawer-link { width: 100%; min-height: 32px; margin-top: auto; padding: 5px 8px; border: 1px solid #c6d9cd; border-radius: 6px; color: #36734f; background: #f2f8f3; cursor: pointer; font: inherit; font-size: 9px; font-weight: 800; }
.terminal-apps-panel { min-width: 0; min-height: 0; padding: 3px 3px 0 0; display: flex; flex-direction: column; }
.terminal-apps-heading { flex: 0 0 auto; margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.terminal-apps-heading h2 { margin: 0; color: #304e3b; font-size: 13px; }
.terminal-apps-heading p { margin: 2px 0 0; color: #87958a; font-size: 8px; }
.terminal-app-count { padding: 4px 8px; border: 1px solid #d7e5dc; border-radius: 99px; color: #41805b; background: #f0f7f2; font-size: 8px; font-weight: 800; white-space: nowrap; }
.desktop-grid { flex: 1 1 0; min-height: 0; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); grid-template-rows: repeat(2,minmax(0,1fr)); gap: 8px; }
.desktop-card { min-width: 0; min-height: 0; padding: 7px 5px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: 1px solid #d5e1da; border-radius: 9px; color: #395542; background: linear-gradient(145deg,#fff,#f1f7f3); box-shadow: 0 3px 8px #2c49350c; cursor: pointer; transition: .18s ease; }
.desktop-card:hover { border-color: #80b698; background: #f7fcf8; transform: translateY(-2px); }
.desktop-card.is-locked,
.lab-device.is-locked,
.switch-button.is-locked,
#btn-uv-light.is-locked,
#tawfiq-note-button.is-locked,
#debts-button.is-locked,
#patient-pharmacists.is-locked,
.uv-reveal-button.is-locked { opacity: .48; filter: saturate(.55); cursor: not-allowed; }
.desktop-card.is-locked:hover,
.lab-device.is-locked:hover,
.switch-button.is-locked:hover { transform: none; }
.app-icon { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #cce0d2; border-radius: 11px; color: #258257; background: linear-gradient(145deg,#f1f8f3,#dceee2); font-size: 21px; box-shadow: 0 3px 6px #244b3310; }
.registry-icon { color: #92733d; }
.shortage-icon { font-size: 19px; }
.debts-icon { color: #9a5d50; }
.checks-icon { color: #a16443; }
.calculator-icon { color: #53738b; font-size: 19px; }
.upgrade-icon { color: #63814f; }
.pos-icon { border-color: #b7d8c3; color: #08734a; background: linear-gradient(145deg,#eaf8ef,#ccebd8); font-family: monospace; }
.desktop-card b { font-size: 9px; line-height: 1.4; text-align: center; }
.desktop-card small { color: #87968b; font-size: 7px; line-height: 1.4; text-align: center; }
.terminal-taskbar { flex: 0 0 27px; padding: 0 13px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #d4e0d8; color: #718276; background: #eef4f0; font-size: 8px; }
.terminal-taskbar i { color: #b1c2b6; font-style: normal; }
.terminal-taskbar span:last-child { color: #32875d; }
.computer-nav { flex: 0 0 auto; width: 100%; padding: 0; }

/* Lab station */
.station-lab { display: flex; flex-direction: column; justify-content: stretch; gap: 7px; }
.lab-header { flex: 0 0 auto; min-height: 42px; padding: 0 5px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lab-title-group { min-width: 0; }
.lab-header p { margin: 3px 0 0; color: #8d968b; font-size: 8px; }
.lab-title-group .window-label { color: #3b5946; font-size: 12px; font-weight: 900; }
.lab-title-group .window-label > span { color: #fff; background: #27865b; }
.lab-cash { display: flex; align-items: center; gap: 8px; color: #75684f; font-size: 9px; }
.lab-cash strong { color: #355342; font-size: 11px; }
.lab-cash button { min-height: 27px; padding: 3px 10px; border: 1px solid #a68a58; border-radius: 5px; color: #f7eedc; background: #385445; cursor: pointer; font: inherit; }
.day-one-prep { min-height: 48px; margin: 0; padding: 6px 9px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid #c9d8c7; border-radius: 8px; color: #405444; background: linear-gradient(110deg,#f8fbf5,#e9f1e6); box-shadow: 0 3px 8px #2b21120d; }
.day-one-prep[hidden] { display: none !important; }
.day-one-prep strong { font-size: 10px; }
.day-one-prep p { margin: 2px 0 0; color: #84785e; font-size: 8px; }
.day-one-prep > span { direction: ltr; color: #355b42; font-size: 12px; font-weight: 800; }
.day-one-prep button { min-height: 32px; padding: 4px 12px; border: 1px solid #8e7546; border-radius: 5px; color: #fff; background: #376046; cursor: pointer; font: inherit; font-size: 9px; font-weight: 700; }
.day-one-prep button:disabled { opacity: .55; cursor: not-allowed; }
.lab-workspace { flex: 1 1 0; min-height: 0; padding: 10px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); grid-template-rows: repeat(3,minmax(0,1fr)); gap: 9px; border: 1px solid #c8d6cf; border-radius: 12px; background: radial-gradient(ellipse at center,#fff 0%,#f1f5f1 68%,#e8efeb 100%); box-shadow: inset 0 0 0 5px #edf2ef, 0 7px 16px #2e4a3613; }
.lab-device { position: relative; min-width: 0; min-height: 0; height: 100%; padding: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; overflow: hidden; border: 1px solid #cbd9d1; border-radius: 10px; color: #435448; background: linear-gradient(145deg,#fff,#edf3ef); box-shadow: 0 4px 10px #263d2e17, inset 0 1px #fff; cursor: pointer; transition: .18s ease; }
.lab-device:hover { transform: translateY(-2px); box-shadow: 0 8px 13px #2d47341c; border-color: #94b5a0; }
.lab-device strong { font-size: 11px; text-align: center; }
.lab-device > small { color: #7d8b7f; font-size: 8px; text-align: center; }
.lab-fridge { grid-area: 1 / 1; }
.lab-scanner { grid-area: 1 / 3; }
.lab-vitals { grid-area: 3 / 3; }
.lab-printer { grid-area: 3 / 1; }
.compounding-zone { grid-area: 2 / 2; min-width: 0; min-height: 0; padding: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; border: 1px dashed #b5c9bb; border-radius: 10px; background: #edf5ef; }
.compounding-kicker { color: #427355; font-size: 9px; font-weight: 900; text-align: center; }
.compounding-zone .mortar-device { flex: 1 1 0; width: 100%; min-height: 0; border-color: #d2d7cc; background: linear-gradient(145deg,#f7f5eb,#e5e2d4); }
.compounding-zone .mortar { width: 62px; height: 48px; }
.compounding-zone .mortar i { font-size: 26px; }
.compounding-zone .day-one-prep { flex: 0 0 auto; width: 100%; }
.compounding-zone .day-one-prep > span { font-size: 9px; }
.compounding-zone .day-one-prep button { min-height: 27px; padding: 3px 7px; font-size: 8px; }
.device-top { position: absolute; top: 8px; right: 9px; left: 9px; display: flex; justify-content: space-between; color: #c6c6a9; font-size: 8px; }
.device-light { width: 6px; height: 6px; border-radius: 50%; background: #84ae6e; box-shadow: 0 0 7px #84ae6e; }
.device-screen { width: 85%; min-height: 70px; padding: 7px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 5px solid #6c7060; border-radius: 8px; color: #9bd18e; background: #15241d; box-shadow: inset 0 0 11px #050b08; font-family: monospace; }
.device-screen small { font-size: 7px; }
.device-screen b { font-size: 17px; }
.device-screen i { color: #c9a362; font-style: normal; font-size: 10px; }
.device-button { width: 16px; height: 16px; margin-left: 64%; display: grid; place-items: center; border: 1px solid #aeb38d; border-radius: 50%; color: #9ec278; font-size: 8px; }
.scanner-device { background: linear-gradient(145deg,#fff,#e8ece8); color: #39453d; }
.scanner-device > small { color: #746d5c; }
.scanner-body { width: 80px; height: 52px; display: grid; place-items: center; transform: skew(-13deg); border: 3px solid #756d5c; border-radius: 10px 18px 8px 8px; color: #b24c40; background: linear-gradient(#e4dfd1,#b7b09c); box-shadow: 0 5px 8px #423b2d66; font-size: 22px; }
.scanner-handle { position: absolute; top: 38%; left: calc(50% - 1px); width: 20px; height: 29%; min-height: 20px; transform: rotate(-20deg); border: 3px solid #716957; border-radius: 3px 3px 9px 9px; background: #bcb5a2; }
.scanner-beam { position: absolute; top: 68%; left: 35%; width: 31%; height: 2px; background: #e96d56; box-shadow: 0 0 12px #f44; }
.thermometer-device, .lab-fridge { background: linear-gradient(145deg,#fff,#e9f0e9); color: #485043; }
.thermometer-device > small { color: #77715e; }
.thermometer { position: relative; width: 22px; height: 91px; border: 4px solid #867c67; border-radius: 12px; background: #e5ddc8; }
.thermometer::after { content: ""; position: absolute; bottom: -12px; right: -9px; width: 32px; height: 32px; border: 4px solid #867c67; border-radius: 50%; background: #ad5144; }
.thermometer i { position: absolute; bottom: 5px; right: 5px; left: 5px; height: 49px; border-radius: 7px; background: #bb5044; }
.temp-display { position: absolute; top: 43px; left: calc(50% + 28px); padding: 5px 7px; border-radius: 4px; color: #9be48c; background: #18251e; font-family: monospace; font-size: 16px; }
.temp-display small { font-size: 8px; }
.mortar-device { background: linear-gradient(145deg,#f8f6ec,#e3e1d5); color: #494235; }
.mortar-device > small { color: #77705f; }
.mortar { width: 91px; height: 75px; display: grid; place-items: center; border: 5px solid #817760; border-top: 0; border-radius: 8px 8px 48% 48%; color: #c3af87; background: linear-gradient(#c0b49a,#89816d); box-shadow: inset 0 -8px 10px #635a48; }
.mortar i { transform: rotate(-29deg); font-size: 35px; font-style: normal; }
.printer-art { position: relative; width: 76px; height: 48px; display: grid; place-items: center; border: 3px solid #819087; border-radius: 8px; color: #387454; background: linear-gradient(#e5ece7,#b9c8bd); box-shadow: 0 5px 8px #344c3a24; }
.printer-art::before { content: ""; position: absolute; top: -13px; width: 56px; height: 16px; border: 2px solid #8a9b90; border-radius: 3px; background: #fff; }
.printer-art i { position: absolute; top: 11px; right: 8px; left: 8px; height: 2px; background: #89978d; }
.printer-art i:nth-child(2) { top: 18px; right: 14px; left: 14px; }
.printer-art b { position: absolute; bottom: -19px; left: -6px; padding: 2px 4px; border: 1px solid #b4c7b9; border-radius: 3px; background: #f8fbf8; font: 700 8px monospace; }
.lab-note { flex: 0 0 auto; align-self: flex-start; margin: 0 7px; color: #77715f; font-size: 9px; }
.lab-note span { color: #bb9451; }
.lab-nav { flex: 0 0 auto; justify-content: flex-start; min-height: 30px; margin: 0; padding: 0; }
@media (max-height: 600px) {
  .terminal-topbar { flex-basis: 34px; padding: 0 10px; font-size: 8px; }
  .terminal-layout { padding: 7px; gap: 7px; }
  .terminal-status-card { padding: 8px; }
  .terminal-brand-mark { width: 30px; height: 30px; margin-bottom: 4px; font-size: 18px; }
  .terminal-status-card h2 { margin-bottom: 7px; font-size: 12px; }
  .terminal-status-card dl { gap: 5px; }
  .terminal-status-card dl > div { padding-bottom: 4px; }
  .desktop-grid { gap: 5px; }
  .desktop-card { gap: 3px; padding: 4px; }
  .app-icon { width: 30px; height: 30px; border-radius: 8px; font-size: 17px; }
  .desktop-card b { font-size: 8px; }
  .terminal-taskbar { flex-basis: 22px; }
  .lab-header { min-height: 34px; }
  .lab-workspace { padding: 6px; gap: 6px; }
  .lab-device { padding: 5px; gap: 3px; }
  .lab-device strong { font-size: 9px; }
  .lab-device > small { font-size: 7px; }
  .thermometer { height: 52px; }
  .thermometer i { height: 29px; }
  .thermometer::after { width: 25px; height: 25px; }
  .temp-display { top: 28px; font-size: 12px; }
  .scanner-body { width: 61px; height: 36px; }
  .scanner-handle { width: 17px; }
  .device-screen { min-height: 49px; padding: 4px; border-width: 3px; }
  .device-screen b { font-size: 13px; }
  .compounding-zone { padding: 5px; gap: 4px; }
  .compounding-kicker { font-size: 8px; }
  .compounding-zone .mortar { width: 47px; height: 35px; }
  .compounding-zone .mortar i { font-size: 20px; }
  .day-one-prep { min-height: 37px; padding: 4px 6px; }
  .day-one-prep strong { font-size: 8px; }
  .day-one-prep p { font-size: 7px; }
  .day-one-prep button { min-height: 23px; }
  .lab-note { font-size: 8px; }
  .lab-nav { min-height: 26px; }
}
@media (max-width: 760px) {
  .terminal-layout { grid-template-columns: minmax(160px,.7fr) minmax(0,2fr); }
  .terminal-status-card dd { font-size: 8px; }
  .desktop-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
}

/* Modals and feedback */
.modal-backdrop { position: fixed; z-index: 10; inset: 0; padding: 20px; display: grid; place-items: center; background: #151812ad; backdrop-filter: blur(3px); }
.modal-backdrop[hidden] { display: none; }
.modal-backdrop.prologue-backdrop { padding: 12px; background: rgba(25,35,30,.54); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.settings-backdrop { position: fixed; z-index: 1100; inset: 0; padding: 22px; display: grid; place-items: center; background: rgba(15,23,42,.42); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.settings-backdrop[hidden] { display: none; }
.settings-window { width: min(760px, 100%); max-height: calc(100% - 24px); display: flex; flex-direction: column; overflow: hidden; border: 1px solid #d5e2e8; border-radius: 16px; color: #1e293b; background: #fff; box-shadow: 0 24px 70px rgba(15,23,42,.24), inset 0 1px 0 #fff; }
.settings-header { min-height: 72px; padding: 14px 22px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e2ebef; background: linear-gradient(110deg,#fff,#f3fafb); }
.settings-kicker { color: #10b981; font-size: 10px; font-weight: 800; }
.settings-header h2 { margin: 2px 0 0; color: #1e293b; font-size: 20px; }
.settings-close { width: 34px; height: 34px; border: 1px solid #d5e2e8; border-radius: 50%; color: #475569; background: #fff; cursor: pointer; font-size: 22px; line-height: 1; }
.settings-close:hover { color: #047857; border-color: #10b981; }
.settings-layout { min-height: 0; flex: 1; display: grid; grid-template-columns: 190px minmax(0,1fr); direction: rtl; }
.settings-tabs { padding: 16px 12px; display: flex; flex-direction: column; gap: 7px; border-left: 1px solid #e2ebef; background: #f7fafb; }
.settings-tab { min-height: 40px; padding: 8px 11px; border: 1px solid transparent; border-radius: 8px; color: #475569; background: transparent; cursor: pointer; text-align: right; font: inherit; font-size: 12px; font-weight: 700; }
.settings-tab:hover { color: #047857; background: #ecfdf5; }
.settings-tab.is-active { border-color: #a7f3d0; color: #047857; background: #ecfdf5; box-shadow: inset -3px 0 #10b981; }
.settings-panels { min-height: 290px; overflow-y: auto; padding: 18px 22px; }
.settings-panel[hidden] { display: none !important; }
.settings-panel h3 { margin: 0 0 16px; color: #1e293b; font-size: 16px; }
.settings-range-row { margin: 0 0 15px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 14px; color: #334155; font-size: 12px; font-weight: 700; }
.settings-range-row output { color: #047857; font-variant-numeric: tabular-nums; }
.settings-range-row input[type="range"] { grid-column: 1 / -1; width: 100%; height: 6px; margin: 3px 0 0; border-radius: 6px; accent-color: #10b981; cursor: pointer; }
.settings-control-row { margin: 2px 0 14px; display: flex; align-items: center; justify-content: space-between; color: #334155; font-size: 12px; font-weight: 700; }
.settings-secondary-button, .settings-primary-button { min-height: 36px; padding: 7px 14px; border: 1px solid #cbd5e1; border-radius: 8px; color: #334155; background: #f8fafc; cursor: pointer; font: inherit; font-size: 12px; font-weight: 700; }
.settings-primary-button { border-color: #059669; color: #fff; background: #10b981; box-shadow: 0 2px 0 #059669; }
.settings-primary-button:hover { background: #059669; }
.settings-secondary-button:hover { border-color: #10b981; color: #047857; background: #ecfdf5; }
.settings-danger-button { min-height: 36px; padding: 7px 14px; border: 1px solid #fecaca; border-radius: 8px; color: #b91c1c; background: #fff7f7; cursor: pointer; font: inherit; font-size: 12px; font-weight: 700; }
.settings-danger-button:hover { border-color: #ef4444; background: #fef2f2; }
.settings-account-actions { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 9px; }
.settings-fullscreen-button { margin-bottom: 14px; }
.dialogue-speed-options { margin: 4px 0 14px; padding: 10px 12px; display: flex; flex-wrap: wrap; gap: 14px; border: 1px solid #d5e2e8; border-radius: 9px; color: #475569; font-size: 11px; }
.dialogue-speed-options legend { padding: 0 5px; color: #334155; font-weight: 700; }
.dialogue-speed-options label, .settings-check-row { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.dialogue-speed-options input, .settings-check-row input { accent-color: #10b981; }
.settings-info-card { padding: 14px; border: 1px solid #d5e2e8; border-radius: 10px; color: #475569; background: #f8fbfc; font-size: 12px; line-height: 1.7; }
.settings-info-card strong { color: #1e293b; }
.settings-info-card p { margin: 5px 0 0; }
.account-save-card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.settings-google-button { min-height: 38px; padding: 7px 12px; display: inline-flex; align-items: center; gap: 9px; border: 1px solid #d1d5db; border-radius: 8px; color: #334155; background: #fff; box-shadow: 0 2px 6px rgba(30,41,59,.08); cursor: pointer; font: inherit; font-size: 12px; font-weight: 700; }
.settings-google-button > span { width: 21px; height: 21px; display: grid; place-items: center; border: 1px solid #e2e8f0; border-radius: 50%; color: #4285f4; background: #fff; font-family: Arial, sans-serif; font-size: 14px; font-weight: 800; }
.settings-google-button:hover { border-color: #9dcad8; background: #f8fbfc; }
.save-sync-status { padding: 5px 9px; border: 1px solid #a7f3d0; border-radius: 999px; color: #047857; background: #ecfdf5; font-size: 10px; font-weight: 700; }
.save-sync-status.is-error { border-color: #fecaca; color: #b91c1c; background: #fef2f2; }
.save-last-saved { color: #64748b; font-size: 10px; }
.account-save-card #btn-manual-sync { align-self: stretch; }
.gift-code-form { margin-top: 14px; padding: 12px; border: 1px solid #d5e2e8; border-radius: 10px; color: #334155; background: #f8fbfc; font-size: 12px; font-weight: 700; }
.gift-code-form > div { margin-top: 7px; display: flex; gap: 7px; }
.gift-code-form input { min-width: 0; flex: 1; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 7px; color: #1e293b; background: #fff; font: inherit; direction: ltr; text-align: left; }
.gift-code-form input:focus { outline: 2px solid #a7f3d0; border-color: #10b981; }
.gift-code-form p { min-height: 18px; margin: 7px 0 0; color: #047857; font-size: 11px; font-weight: 600; }
.gift-code-form p.is-error { color: #b91c1c; }
.settings-check-row { margin-bottom: 16px; color: #334155; font-size: 12px; font-weight: 700; }
.settings-footer { min-height: 62px; padding: 11px 20px; display: flex; justify-content: flex-start; border-top: 1px solid #e2ebef; background: #f8fafc; }
html.settings-reduced-motion *, html.settings-reduced-motion *::before, html.settings-reduced-motion *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
@media (max-width: 640px) {
  .settings-backdrop { padding: 10px; }
  .settings-window { max-height: calc(100% - 10px); }
  .settings-layout { grid-template-columns: 130px minmax(0,1fr); }
  .settings-tabs { padding: 10px 7px; }
  .settings-tab { padding: 7px; font-size: 10px; }
  .settings-panels { min-height: 250px; padding: 14px; }
}
.modal { position: relative; width: min(85%, 520px); max-height: calc(100% - 40px); overflow: auto; padding: 25px 28px; border: 1px solid #c3a76a; border-radius: 13px; background: #f7f0e1; box-shadow: 0 18px 60px #08090788, inset 0 0 0 5px #ede2cb; animation: modal-in .2s ease-out; }
.modal.pos-receipt-modal { width: min(94%, 900px); max-height: calc(100% - 24px); padding: 18px; border-color: #b8c9bf; border-radius: 14px; color: #30453a; background: #f7faf8; box-shadow: 0 18px 48px #101c1680, inset 0 0 0 4px #e6eeea; }
.pos-receipt { padding: clamp(12px, 2.2vh, 20px); border: 1px solid #d5e0d9; border-radius: 10px; background: #fff; }
.pos-receipt-slide { animation: receipt-slide .45s cubic-bezier(.18,.75,.28,1) both; }
@keyframes receipt-slide { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: translateY(0); } }
.pos-receipt-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 2px solid #e7eee9; }
.pos-receipt-header h2 { margin: 3px 0 0; color: #234b39; font-size: clamp(16px, 2.7vh, 22px); }
.pos-shift-badge { flex: 0 0 auto; padding: 5px 9px; border: 1px solid #d4e5da; border-radius: 99px; color: #26734f; background: #eff8f2; font-size: 9px; font-weight: 900; }
.pos-customer { margin: 10px 0; padding: 8px 10px; display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 3px 9px; border-right: 3px solid #2b8a5b; border-radius: 6px; color: #718077; background: #f4f8f5; font-size: 10px; }
.pos-customer strong { color: #2a503a; font-size: 12px; }
.pos-customer small { grid-column: 2; color: #849087; font-size: 9px; }
.pos-table-wrap { max-height: 230px; overflow: auto; border: 1px solid #dfe8e2; border-radius: 7px; }
.pos-table { width: 100%; border-collapse: collapse; color: #43564a; font-size: 10px; text-align: right; }
.pos-table th, .pos-table td { min-width: 62px; padding: 8px 9px; border-bottom: 1px solid #e8eee9; white-space: nowrap; }
.pos-table th { position: sticky; top: 0; z-index: 1; color: #526a5b; background: #edf4ef; font-size: 9px; font-weight: 900; }
.pos-table tbody tr:last-child td { border-bottom: 0; }
.pos-table .pos-barcode { color: #607989; font-family: Consolas,monospace; letter-spacing: .03em; }
.pos-table .pos-empty { padding: 20px; color: #89968d; text-align: center; }
.pos-scan-actions { margin-top: 9px; display: flex; gap: 8px; }
.pos-scan-button, .pos-clear-button, .pos-approve-button { min-height: 36px; padding: 7px 11px; border: 1px solid #cbd9d0; border-radius: 7px; cursor: pointer; font: inherit; font-size: 10px; font-weight: 900; }
.pos-scan-button { flex: 1; border-color: #168053; color: #fff; background: linear-gradient(180deg,#219363,#14764e); box-shadow: 0 2px 0 #0c5d3d; }
.pos-clear-button { color: #7c514a; background: #fff8f6; }
.pos-scan-button:disabled, .pos-clear-button:disabled, .pos-approve-button:disabled { opacity: .48; cursor: not-allowed; }
.pos-totals { margin-top: 10px; padding: 8px 11px; border: 1px solid #e0e8e3; border-radius: 7px; background: #fbfdfb; }
.pos-total-row { min-height: 29px; display: flex; justify-content: space-between; align-items: center; gap: 10px; color: #617067; font-size: 10px; }
.pos-total-row strong { color: #355641; font-variant-numeric: tabular-nums; }
.pos-grand-total { margin: 5px -5px -3px; padding: 9px 10px; display: flex; justify-content: space-between; align-items: center; gap: 10px; border-radius: 5px; color: #eef7f1; background: #203d31; font-size: 11px; font-weight: 900; }
.pos-grand-total strong { color: #fff; font-size: 16px; font-variant-numeric: tabular-nums; }
.pos-status { margin: 8px 0 0 !important; color: #728078; font-size: 9px !important; text-align: center; }
.pos-approve-button { width: 100%; min-height: 40px; margin-top: 7px; border-color: #b18f4d; color: #fff; background: linear-gradient(180deg,#b39555,#92753e); box-shadow: 0 2px 0 #735b30; }
.pos-unavailable { margin-top: 14px; padding: 20px; }
.modal.expense-confirm-modal { width: min(90%, 600px); max-height: calc(100% - 24px); padding: 18px; border-color: #b7c9bd; border-radius: 15px; color: #30453a; background: #f6f9f7; box-shadow: 0 18px 48px #101c1680, inset 0 0 0 4px #e6eeea; }
.expense-confirm-card { padding: clamp(14px, 2.5vh, 24px); border: 1px solid #d5e0d9; border-radius: 11px; background: linear-gradient(145deg,#fff,#f5f8f6); }
.expense-confirm-card h2 { margin: 5px 0 4px; color: #234b39; font-size: clamp(17px, 3vh, 24px); }
.expense-confirm-card .modal-subtitle { margin-bottom: 12px; }
.expense-confirm-breakdown { padding: 8px 11px; border: 1px solid #dce5df; border-radius: 9px; background: #fff; }
.expense-confirm-row { min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #edf1ee; color: #596a60; font-size: 11px; font-weight: 700; }
.expense-confirm-row:last-child { border-bottom: 0; }
.expense-confirm-row strong { flex: 0 0 auto; color: #285d43; font-size: 13px; font-weight: 900; }
.expense-confirm-row.expense-confirm-total { margin-top: 4px; padding-top: 6px; border-top: 1px solid #dce5df; border-bottom: 0; color: #344a3c; }
.expense-confirm-total strong { color: #14754e; font-size: 15px; }
.expense-confirm-note, .expense-confirm-warning { margin: 9px 0 0 !important; color: #69786e; font-size: 10px !important; line-height: 1.6 !important; }
.expense-confirm-warning { padding: 8px 10px; border-right: 3px solid #bc654a; border-radius: 5px; color: #8a493b; background: #fff3ef; }
.expense-confirm-balance { margin: 11px 0 0 !important; padding: 9px 11px; display: flex; justify-content: space-between; gap: 8px; border-radius: 7px; color: #53655a; background: #eaf2ed; font-size: 11px !important; font-weight: 800; }
.expense-confirm-balance strong { color: #1d7149; font-size: 14px; }
.expense-confirm-button { width: 100%; min-height: 44px; margin-top: 13px; padding: 8px 12px; border: 1px solid #14754e; border-radius: 8px; color: #fff; background: linear-gradient(180deg,#19875b,#116b49); box-shadow: 0 3px 0 #0c563a; cursor: pointer; font: inherit; font-size: 12px; font-weight: 900; }
.expense-confirm-button:hover { background: linear-gradient(180deg,#13774f,#0d5e40); }
.modal.cash-drawer-modal { width: min(92%, 620px); max-height: calc(100% - 24px); padding: 22px; border-color: #b6c8bd; border-radius: 13px; color: #30453a; background: #f7faf8; box-shadow: 0 18px 48px #101c1680, inset 0 0 0 4px #e6eeea; }
.cash-drawer-ledger { margin-top: 12px; padding: 12px; border: 1px solid #cbd9d0; border-radius: 10px; background: linear-gradient(145deg,#edf2ee,#e1e9e3); box-shadow: inset 0 2px 6px #32463b12; }
.cash-drawer-total { margin-bottom: 10px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid #d5e0d7; border-radius: 8px; color: #5a6c5e; background: #fff; font-size: 11px; font-weight: 800; }
.cash-drawer-total strong { color: #1c6e49; font-size: 18px; }
.cash-denomination-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.cash-drawer-open-anim .cash-denomination { animation: drawer-denomination-in .38s cubic-bezier(.2,.8,.25,1) both; }
.cash-drawer-open-anim .cash-denomination:nth-child(2) { animation-delay: .035s; }
.cash-drawer-open-anim .cash-denomination:nth-child(3) { animation-delay: .07s; }
.cash-drawer-open-anim .cash-denomination:nth-child(4) { animation-delay: .105s; }
.cash-drawer-open-anim .cash-denomination:nth-child(5) { animation-delay: .14s; }
.cash-drawer-open-anim .cash-denomination:nth-child(6) { animation-delay: .175s; }
@keyframes drawer-denomination-in { from { opacity: .45; transform: translateY(9px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
.cash-denomination { min-width: 0; min-height: 100px; padding: 9px 7px; display: grid; justify-items: center; align-content: center; gap: 4px; border: 1px solid #c8b991; border-radius: 7px; color: #554f40; background: linear-gradient(145deg,#fffdf5,#f1e8d2); box-shadow: 0 3px 6px #3c332315, inset 0 0 0 3px #fff9; }
.cash-note-icon { width: 43px; height: 23px; display: grid; place-items: center; border: 1px solid #aeb99b; border-radius: 3px; color: #527452; background: repeating-linear-gradient(135deg,#e9efe1 0 5px,#f9f8ed 5px 10px); font-size: 8px; font-weight: 900; }
.cash-denomination > strong { color: #435c47; font-size: 10px; }
.cash-denomination > small { color: #8c907e; font-size: 8px; }
.cash-denomination > b { color: #6f663e; font-size: 9px; }
.cash-coins-note { margin: 8px 0 0 !important; color: #7a7060; font-size: 9px !important; text-align: center; }
.cash-in-words { margin: 10px 0 0 !important; padding: 9px 11px; display: grid; gap: 4px; border-right: 3px solid #32875d; border-radius: 5px; color: #607066; background: #fff; font-size: 9px !important; }
.cash-in-words strong { color: #31523f; font-size: 11px; line-height: 1.7; }
.modal.prologue-modal { width: min(88%, 700px); max-height: calc(100% - 12px); overflow: auto; padding: 0; border: 0; border-radius: 18px; background: transparent; box-shadow: none; }
.prologue-card { position: relative; overflow: hidden; padding: clamp(20px, 3.5vh, 34px) clamp(22px, 5vw, 54px); border: 1px solid #bdc9c6; border-radius: 16px; color: #26352d; background: #fcfbf7; box-shadow: 0 20px 58px rgba(8,20,16,.3), inset 0 1px 0 #fff; }
.prologue-card::before { content: ""; position: absolute; top: 0; right: 0; left: 0; height: 7px; background: linear-gradient(90deg,#0f7655,#10b981 46%,#d1b878); }
.prologue-letterhead { padding-bottom: 15px; border-bottom: 1px solid #dbe4df; text-align: center; }
.prologue-pharmacy { color: #146447; font-size: 13px; font-weight: 900; letter-spacing: .04em; }
.prologue-date { margin-top: 9px; color: #52635d; font-size: 13px; font-weight: 900; }
.prologue-title { margin: 16px 0 10px !important; color: #1d392c !important; font-size: clamp(24px, 4.3vh, 35px) !important; font-weight: 900; text-align: center; }
.prologue-narrative { margin: 0; color: #26352d; font-family: "Amiri",serif; font-size: clamp(17px, 2.7vh, 21px) !important; line-height: 1.9 !important; }
.prologue-signature { margin-top: 9px; color: #617267; font-family: "Amiri",serif; font-size: 17px; font-weight: 700; }
.prologue-finances { margin-top: 16px; padding: 9px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; border: 1px solid #d6e1d9; border-radius: 11px; background: #f5f7f3; }
.prologue-finance-item { min-height: 54px; padding: 7px 12px; display: flex; flex-direction: column; justify-content: center; gap: 3px; border: 1px solid #e0e7e1; border-radius: 8px; background: #fff; }
.prologue-finance-item span { color: #68786f; font-size: 10px; font-weight: 700; }
.prologue-finance-item strong { color: #21563e; font-size: 17px; font-weight: 900; }
.prologue-finance-item small { color: #829087; font-size: 8px; line-height: 1.5; }
.prologue-finance-item.opening-cash strong { color: #4a8a62; }
.prologue-finance-item.operating-cost strong { color: #35483c; }
.prologue-start { width: min(100%,520px); min-height: 54px; margin: 16px auto 0; padding: 10px 18px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid #059669; border-radius: 9px; color: #fff; background: linear-gradient(180deg,#10b981,#0c9165); box-shadow: 0 3px 0 #07845b, 0 8px 18px rgba(8,132,91,.18); cursor: pointer; font: inherit; font-size: 14px; font-weight: 900; line-height: 1.5; text-align: center; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.prologue-start:hover { background: linear-gradient(180deg,#0d9969,#06734f); box-shadow: 0 3px 0 #066c4d, 0 6px 13px rgba(8,132,91,.2); transform: translateY(1px); }
.prologue-start:focus-visible { outline: 3px solid #a7f3d0; outline-offset: 3px; }
@keyframes modal-in { from { opacity: 0; transform: translateY(9px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .action-button.stamp-impact, .prescription.stamp-impact, .prescription.stamp-impact::after,
  .pos-receipt-slide, .cash-drawer-open-anim .cash-denomination { animation-duration: .01ms; animation-iteration-count: 1; }
}
.modal-close { position: absolute; top: 10px; left: 12px; width: 29px; height: 29px; border: 1px solid #d6cbb4; border-radius: 50%; color: #756d5d; background: #fffaf0; cursor: pointer; font-size: 21px; line-height: 1; }
.modal h2 { margin: 0 0 4px; color: #30483a; font-size: clamp(1rem, 3.2vh, 1.45rem); }
#modal-title, .story-card h2 { font-size: clamp(1rem, 3.2vh, 1.45rem); }
#modal-content, #modal-content p, .story-card p { font-size: clamp(.85rem, 2.5vh, 1.05rem); line-height: 1.6; }
.modal-subtitle { margin: 0 0 15px; color: #928876; font-size: clamp(.75rem, 1.5vh, .9rem); }
.modal-kicker { color: #ae8d4e; font-size: 9px; font-weight: 800; letter-spacing: .5px; }
.modal.facility-modal { width: min(94%, 780px); max-height: calc(100% - 24px); overflow: auto; }
.facility-grid { margin-top: 12px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.facility-card { min-width: 0; min-height: 148px; padding: 11px 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; border: 1px solid #d5e0dc; border-radius: 10px; color: #34483a; background: linear-gradient(145deg,#fff,#f4f8f6); box-shadow: 0 4px 11px #2345330c; }
.facility-card.is-installed { border-color: #9dcbb1; background: linear-gradient(145deg,#fbfffc,#edf8f1); }
.facility-icon { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid #cfe0d5; border-radius: 9px; color: #16835d; background: #e9f5ee; font-size: 18px; font-weight: 900; }
.facility-card h3 { margin: 0; color: #31503c; font-size: 11px; line-height: 1.5; }
.facility-card p { flex: 1; margin: 0 !important; color: #768277; font-size: 9px !important; line-height: 1.6 !important; }
.facility-card button { min-height: 29px; width: 100%; padding: 5px 7px; border: 1px solid #3e8b63; border-radius: 6px; color: #fff; background: #287c53; cursor: pointer; font: inherit; font-size: 9px; font-weight: 800; }
.facility-card button:disabled { border-color: #c9d9cc; color: #4b674f; background: #e4eee3; cursor: default; }
.facility-card button.cannot-afford { border-color: #ad968c; background: #987769; }
.facility-card .facility-inspect-button { border-color: #c5d5cd; color: #41624f; background: #edf4ef; }
.facility-inspection { margin-top: 16px; padding: 15px; display: flex; align-items: flex-start; gap: 11px; border: 1px solid #cfe0d3; border-radius: 9px; color: #3c5945; background: #f3f8f3; }
.facility-inspection > span { flex: 0 0 27px; width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #389264; font-weight: 900; }
.facility-inspection p { margin: 1px 0 0 !important; font-size: 12px !important; line-height: 1.8 !important; }
@media (max-width: 560px) {
  .facility-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
  .facility-card { min-height: 142px; padding: 8px; }
  .modal.pos-receipt-modal { padding: 12px; }
  .pos-receipt { padding: 9px; }
  .pos-table th, .pos-table td { min-width: 54px; padding: 6px; font-size: 8px; }
  .pos-scan-actions { flex-direction: column; }
}
@media (max-height: 520px) {
  .modal-backdrop.prologue-backdrop { padding: 6px; }
  .modal.prologue-modal { max-height: calc(100% - 6px); }
  .prologue-card { padding-top: 15px; padding-bottom: 13px; }
  .prologue-card::before { height: 5px; }
  .prologue-letterhead { padding-bottom: 9px; }
  .prologue-date { margin-top: 4px; font-size: 11px; }
  .prologue-title { margin: 10px 0 5px !important; font-size: clamp(20px, 4vh, 27px) !important; }
  .prologue-narrative { font-size: clamp(15px, 2.5vh, 18px) !important; line-height: 1.75 !important; }
  .prologue-signature { margin-top: 4px; font-size: 14px; }
  .prologue-finances { margin-top: 8px; padding: 6px; gap: 7px; }
  .prologue-finance-item { min-height: 50px; padding: 5px 9px; }
  .modal.pos-receipt-modal { max-height: calc(100% - 12px); }
  .pos-table-wrap { max-height: 140px; }
  .prologue-finance-item strong { font-size: 15px; }
  .prologue-finance-item small { font-size: 7px; }
  .prologue-start { width: min(100%,520px); min-height: 44px; margin-top: 9px; padding: 6px 12px; font-size: 12px; }
}
.large-rx { margin-top: 15px; padding: 20px; border: 1px solid #d8cfb9; border-radius: 5px; color: #47493d; background: #fffdf6; box-shadow: 0 4px 11px #5e4d3021; }
.uv-document { position: relative; overflow: hidden; isolation: isolate; }
.uv-document::after { content: ""; position: absolute; z-index: 3; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(circle 100px at var(--beam-x, 50%) var(--beam-y, 50%), #baffd74a 0 24%, #80ffce1d 56%, transparent 100%); transition: opacity .12s ease; }
.uv-document.uv-lit::after { opacity: 1; }
.uv-document.uv-lit { cursor: crosshair; }
.uv-secret { position: absolute; z-index: 2; right: 12%; bottom: 13px; left: 12%; padding: 5px 8px; border: 1px dashed #35dc8a; border-radius: 4px; color: #088647; background: #9dffbf36; box-shadow: 0 0 13px #51f78c; opacity: 0; pointer-events: none; text-align: center; font-size: 10px; font-weight: 900; text-shadow: 0 0 7px #65ff9d; -webkit-mask-image: radial-gradient(circle 100px at var(--beam-x, 50%) var(--beam-y, 50%), #000 0 55%, transparent 100%); mask-image: radial-gradient(circle 100px at var(--beam-x, 50%) var(--beam-y, 50%), #000 0 55%, transparent 100%); }
.uv-document.uv-lit .uv-secret { opacity: 1; }
.uv-document.uv-lit.uv-revealed .uv-secret { -webkit-mask-image: none; mask-image: none; }
.letter-inspection { margin-top: 14px; padding: 12px; border: 1px solid #bca879; border-radius: 8px; background: #e9dfc8; }
.management-contract { position: relative; margin-top: 14px; padding: 22px clamp(16px,4vw,34px); border: 1px solid #b8c8c3; border-radius: 5px; color: #26352d; background: #fcfbf7; box-shadow: 0 5px 16px rgba(27,48,38,.12), inset 0 0 0 5px #f4f5ef; }
.contract-letterhead { padding-bottom: 13px; border-bottom: 2px solid #d5e0dc; text-align: center; }
.contract-authority { color: #147251; font-size: 10px; font-weight: 900; }
.contract-letterhead h3 { margin: 5px 0; color: #203d31; font-size: clamp(15px,2.4vh,20px); font-weight: 900; }
.contract-reference { color: #687970; font-size: 9px; font-weight: 700; }
.contract-body { padding: 12px 0 4px; font-family: "Amiri",serif; font-size: clamp(14px,2.2vh,17px); line-height: 1.85; }
.contract-body > p { margin: 7px 0; }
.contract-body strong { color: #245743; }
.contract-appendix { margin-top: 10px; padding: 9px 12px; border-right: 3px solid #10b981; border-radius: 4px; background: #f0f5f1; }
.contract-appendix > strong { font-family: "Cairo",sans-serif; font-size: 11px; }
.contract-appendix p { margin: 4px 0 0; }
.contract-signatures { margin-top: 8px; padding-top: 12px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 10px; border-top: 1px dashed #cbd6d1; text-align: center; }
.contract-signatures > div { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.contract-sign-line { min-width: 92px; padding: 0 5px 4px; border-bottom: 1px solid #87978f; color: #305a46; font-family: "Amiri",serif; font-size: 16px; font-weight: 700; }
.contract-signatures small { color: #687970; font-size: 9px; }
.contract-stamp { width: 66px; height: 66px; display: grid; place-content: center; border: 3px double #23835f; border-radius: 50%; color: #17764f; font-size: 9px; font-weight: 900; line-height: 1.45; transform: rotate(-8deg); }
.tawfiq-note { position: relative; min-height: 220px; overflow: hidden; padding: 22px 24px; transform: rotate(-.5deg); border: 1px solid #bcae8c; color: #5e513c; background-color: #e7d8b7; background-image: repeating-linear-gradient(5deg, transparent 0 17px, #806c4820 18px 19px, transparent 20px 29px), radial-gradient(ellipse at 12% 18%, #fff8 0 2%, transparent 22%), radial-gradient(ellipse at 88% 73%, #92794b26 0 1%, transparent 24%), linear-gradient(135deg,#f1e5c7,#d8c8a4); box-shadow: 0 7px 13px #5b48242c, inset 0 0 25px #9a7a402e; }
.tawfiq-note::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .25; background: repeating-linear-gradient(135deg, transparent 0 41px, #fff8 42px, transparent 44px 83px); }
.letter-heading { margin: 0 0 12px; color: #735a36; font-family: "Amiri",serif; font-size: 19px; }
.letter-body { position: relative; z-index: 1; margin: 0; font-family: "Amiri",serif; font-size: 14px; line-height: 1.9; }
.letter-signature { margin-top: 10px; color: #536b85; font-family: "Amiri",serif; font-size: 17px; }
.letter-uv-instructions { margin: 9px 0 0; color: #7c715d; font-size: 9px; }
.uv-reveal-button { margin-top: 9px; padding: 7px 10px; border: 1px solid #4f8460; border-radius: 6px; color: #f4f4e7; background: #355d43; cursor: pointer; font-size: 10px; font-weight: 700; }
.uv-reveal-button:disabled { border-color: #aaa17f; color: #716b59; background: #ddd4bf; cursor: not-allowed; }
.letter-clue-status { min-height: 17px; margin: 5px 0 0; color: #47704e; font-size: 9px; }
.rx-uv-clue { bottom: 8px; }
.large-rx-head { padding-bottom: 10px; display: flex; justify-content: space-between; border-bottom: 1px solid #d9d1be; color: #3d5b48; }
.large-rx-head b { font-family: Georgia,serif; font-size: 25px; font-style: italic; }
.large-rx p { margin: 10px 0; font-size: 12px; }
.rx-details { display: grid; grid-template-columns: 90px 1fr; gap: 6px 10px; padding-top: 8px; border-top: 1px dashed #d3c9b3; font-size: 11px; }
.rx-details span { color: #8d8572; }
.rx-details strong { font-weight: 700; }
.seal-status { color: #46724e; }
.seal-status.invalid-text { color: #a54138; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 15px; }
.modal-actions button, .modal-action, .btn-primary { min-height: 40px; min-width: 90px; padding: 8px 16px; border: 1px solid #cfc2a5; border-radius: 6px; color: #4c5946; background: #eee6d4; cursor: pointer; font-size: clamp(.85rem, 2.2vh, 1rem); font-weight: 700; }
.modal-action.primary { border-color: #3e6a51; color: white; background: #3e6a51; }
.desk-calculator { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; margin-top: 14px; }
.desk-calculator label { display: grid; gap: 5px; color: #586656; font-size: 10px; font-weight: 700; }
.desk-calculator label:first-child { grid-column: 1 / -1; }
.desk-calculator input { width: 100%; min-height: 38px; padding: 7px 9px; border: 1px solid #d3c7ac; border-radius: 6px; color: #34483a; background: #fffdf7; font: inherit; font-size: 13px; }
.desk-calculator input:focus { outline: 2px solid #a7f3d0; border-color: #10b981; }
.calculator-result { grid-column: 1 / -1; padding: 10px 12px; display: flex; justify-content: space-between; gap: 10px; border: 1px solid #d6e1d9; border-radius: 7px; color: #56665a; background: #f5f7f3; font-size: 11px; }
.calculator-result strong { color: #21563e; }
.calculator-balance { grid-column: 1 / -1; min-height: 20px; margin: 0 !important; color: #385742; font-size: 12px !important; font-weight: 800; }
.search-box { width: 100%; margin: 8px 0 12px; padding: 10px 12px; border: 1px solid #d3c7ac; border-radius: 7px; outline: 0; color: #37473b; background: #fffdf7; font: inherit; font-size: 11px; }
.search-box:focus { border-color: #728c68; box-shadow: 0 0 0 3px #91a77c33; }
.database-row { padding: 9px 11px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 7px 12px; border-bottom: 1px solid #eee8da; font-size: 11px; }
.database-row[hidden] { display: none !important; }
.database-row > div:first-child strong, .database-row > div:first-child small { display: block; }
.database-row > div:first-child small { margin-top: 3px; color: #99917f; font-size: 9px; }
.db-pinned-section { padding: 8px; border: 1px solid #b8dfc7; border-radius: 9px; background: #f2faf5; }
.db-section-label { display: block; margin: 2px 4px 7px; color: #28714d; font-size: 10px; font-weight: 900; }
.database-row.db-pinned-card { margin-bottom: 5px; border: 1px solid #b8dfc7; border-radius: 8px; background: #edf8f2; }
.database-row.db-pinned-card:last-child { margin-bottom: 0; }
.database-row.db-shortage-card { background: #fff8f5; border-color: #e8cfc8; }
.database-row.db-shortage-card.db-pinned-card { background: linear-gradient(110deg,#fff8f5,#edf8f2); border-color: #d8cfc0; }
.modal.database-modal { scrollbar-width: thin; scrollbar-color: #9da997 #f0eee6; scroll-behavior: smooth; }
.database-modal .data-list { max-height: min(58vh, 500px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: #9da997 #f0eee6; scroll-behavior: smooth; }
.database-modal .data-list::-webkit-scrollbar, .modal.database-modal::-webkit-scrollbar { width: 9px; }
.database-modal .data-list::-webkit-scrollbar-track, .modal.database-modal::-webkit-scrollbar-track { border-radius: 8px; background: #f0eee6; }
.database-modal .data-list::-webkit-scrollbar-thumb, .modal.database-modal::-webkit-scrollbar-thumb { border: 2px solid #f0eee6; border-radius: 8px; background: #9da997; }
.database-modal .data-list::-webkit-scrollbar-thumb:hover, .modal.database-modal::-webkit-scrollbar-thumb:hover { background: #71816f; }
.database-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.database-actions button { min-height: 30px; padding: 4px 10px; border: 1px solid #9c8656; border-radius: 5px; color: #39533f; background: #f1ebdb; cursor: pointer; font: inherit; font-size: 9px; font-weight: 700; }
.database-actions button:hover { color: #fff; background: #42634d; }
.database-actions .db-alternative-button,
.database-actions .db-shortage-button { min-height: 36px; padding: 6px 11px; font-size: 11px; }
.database-actions .db-alternative-button { border-color: #16835d; color: #fff; background: #16835d; }
.database-actions .db-alternative-button:hover { border-color: #116b49; background: #116b49; }
.database-actions .db-shortage-button { border-color: #b77561; color: #874b3d; background: #fff2ed; }
.database-actions .db-shortage-button:hover { color: #fff; background: #a75f4c; }
.database-actions .db-shortage-button:disabled { border-color: #d7d1c7; color: #878174; background: #f0eee9; cursor: not-allowed; }
.db-shortage-lock { align-self: center; color: #8d7556; font-size: 10px; font-weight: 700; }
.data-list { border: 1px solid #e1d8c5; border-radius: 8px; overflow: hidden; background: #fffdf7; }
.data-row { padding: 9px 11px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid #eee8da; font-size: 11px; }
.data-row[hidden] { display: none !important; }
.data-row:last-child { border-bottom: 0; }
.data-row small { display: block; color: #99917f; font-size: 9px; }
.pill { padding: 3px 7px; border-radius: 99px; color: #56744e; background: #e9f0e3; font-size: 9px; white-space: nowrap; }
.pill.warn { color: #9b5039; background: #fce8e6; }
.empty-state { padding: 14px; color: #958d7c; text-align: center; font-size: 11px; }
.summary-list { margin-top: 12px; }
.upgrade-shop { margin-top: 14px; padding: 12px; border: 1px solid #d5c49f; border-radius: 8px; background: #f0e8d6; }
.upgrade-shop h3 { margin: 0 0 3px; color: #405644; font-size: 12px; }
.upgrade-shop > p { margin: 0 0 9px; color: #8d8677; font-size: 9px; }
.upgrade-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.upgrade-card { min-width: 0; padding: 8px 6px; display: flex; flex-direction: column; align-items: center; gap: 4px; border: 1px solid #d6c6a5; border-radius: 7px; color: #465442; background: #fffaf0; text-align: center; }
.upgrade-card b { font-size: 9px; }
.upgrade-card small { color: #928876; font-size: 8px; }
.upgrade-card button { padding: 4px 7px; border: 0; border-radius: 4px; color: white; background: #3e6a51; cursor: pointer; font-size: 8px; font-weight: 700; }
.upgrade-card button:disabled { color: #52654e; background: #dce8d3; cursor: default; }
.upgrade-card button.cannot-afford { background: #90745b; }
.supply-order-row { align-items: center; }
.supply-order-controls { display: flex; align-items: center; gap: 8px; }
.supply-order-controls button { width: 28px; height: 28px; border: 1px solid #9a8456; border-radius: 5px; color: #fff; background: #3e6a51; cursor: pointer; font: inherit; font-weight: 800; }
.supply-order-controls button:disabled { opacity: .45; cursor: not-allowed; }
.supply-order-controls b { min-width: 16px; color: #355342; text-align: center; }
.ending-card { padding: 10px 12px; border: 1px solid #d8c99f; border-radius: 8px; color: #53614c; background: #fffaf0; font-size: 10px; line-height: 1.8; }
.ending-card h3 { margin: 0 0 5px; color: #38533f; font-size: 16px; }
.ending-card.syndicate { border-color: #b65f50; background: #f6e7dc; }
.ending-card.bankruptcy { border-color: #9c5548; background: #f1e2d9; }
.ending-card.buyout { border-color: #b49351; background: #f5efd9; }
.ending-card.hero { border-color: #73956a; background: #e8f0df; }
.ending-card.campaign { border-color: #9c895f; background: #f0ead8; }
.choice-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.choice-actions button { padding: 8px 12px; border: 1px solid #cfc2a5; border-radius: 6px; color: #4c5946; background: #eee6d4; cursor: pointer; font-size: 10px; font-weight: 700; }
.modal .choice-actions button { min-height: 40px; min-width: 90px; padding: 8px 16px; font-size: clamp(.85rem, 2.2vh, 1rem); font-weight: 700; }
.choice-actions button.primary { border-color: #3e6a51; color: white; background: #3e6a51; }
.choice-actions button.danger { border-color: #934e42; color: white; background: #934e42; }
.credit-badge { display: inline-block; margin-right: 5px; padding: 2px 6px; border-radius: 99px; color: #664f2e; background: #f0dfb8; font-size: 8px; }
.event-card { padding: 11px 13px; border: 1px solid #ddcfb3; border-radius: 8px; color: #625a4a; background: #fffaf0; font-size: 10px; line-height: 1.8; }
.event-card strong { color: #3c5543; }
.event-card.warning { border-color: #c78d74; background: #f5e7db; }
.toast-region { position: fixed; z-index: 20; bottom: 21px; left: 50%; display: grid; gap: 8px; transform: translateX(-50%); pointer-events: none; }
.toast { min-width: 220px; max-width: calc(100% - 40px); padding: 10px 16px; border: 1px solid #c7b173; border-radius: 8px; color: #f8f2e5; background: #274c3d; box-shadow: 0 8px 20px #15120f55; text-align: center; font-size: 11px; animation: toast-in .22s ease-out; }
.toast.bad { border-color: #d19b87; background: #783f37; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Smartphone hub */
.smartphone-launcher { position: relative; }
.phone-unread-badge { position: absolute; z-index: 2; top: -7px; right: -7px; min-width: 16px; height: 16px; padding: 0 4px; display: grid; place-items: center; border: 1px solid #fff4dc; border-radius: 99px; color: white; background: #b73531; font: 800 9px/1 Arial,sans-serif; }
.phone-unread-badge[hidden] { display: none; }
.phone-button.ringing { animation: phone-pulse .9s ease-in-out infinite, phone-vibrate .16s linear infinite; }
.counter-phone { display: grid; place-items: center; }
.counter-phone .phone-unread-badge { top: -5px; right: -5px; }
.smartphone-backdrop { position: fixed; z-index: 15; inset: 0; padding: 18px; display: grid; place-items: center; background: #121710b8; backdrop-filter: blur(4px); }
.smartphone-backdrop[hidden] { display: none; }
.smartphone { width: min(358px, 100%); height: min(690px, 100%); padding: 8px; border: 2px solid #8a7858; border-radius: 38px; background: linear-gradient(145deg,#222724,#090d0b); box-shadow: 0 24px 70px #080907a8, inset 0 0 0 2px #4e5148; }
.smartphone-bezel { height: 100%; overflow: hidden; display: flex; flex-direction: column; border: 1px solid #485046; border-radius: 30px; background: #edf0e9; }
.smartphone-statusbar { flex: 0 0 32px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; color: #25352c; background: #f4f4ec; font-size: 10px; font-weight: 800; }
.phone-status-icons { direction: ltr; letter-spacing: 1px; }
.smartphone-appbar { min-height: 48px; padding: 7px 14px; display: flex; align-items: center; justify-content: space-between; color: #f7f1df; background: linear-gradient(110deg,#19382f,#285342); border-bottom: 2px solid #ad8b50; }
.smartphone-appbar strong { font-size: 14px; }
.smartphone-close { width: 29px; height: 29px; border: 1px solid #aeb8a4; border-radius: 50%; color: #fff3da; background: #ffffff12; cursor: pointer; font-size: 20px; line-height: 1; }
.smartphone-screen { flex: 1; min-height: 0; padding: 15px 13px; overflow: auto; color: #304137; background: linear-gradient(155deg,#eef1e8,#e3e8dd); scrollbar-width: thin; scrollbar-color: #a9ae9d transparent; }
.smartphone-home { min-height: 100%; display: flex; flex-direction: column; }
.smartphone-greeting { margin: 0 0 4px; color: #87907e; font-size: 10px; }
.smartphone-home h2 { margin: 0 0 18px; color: #314837; font-size: 17px; }
.phone-app-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.phone-app { position: relative; min-height: 92px; padding: 10px 5px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; border: 1px solid #ccd3c2; border-radius: 13px; color: #405542; background: #fafbf5; box-shadow: 0 4px 9px #37453012; cursor: pointer; }
.phone-app:hover { border-color: #b59c64; transform: translateY(-2px); }
.phone-app-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: white; background: #52775b; font-size: 22px; }
.phone-app.news .phone-app-icon { background: #b57440; }
.phone-app.messages .phone-app-icon { background: #4a8a70; }
.phone-app.social .phone-app-icon { background: #6277a1; }
.phone-app strong { font-size: 9px; }
.phone-app .phone-unread-badge { top: 3px; right: 3px; }
.phone-home-note { margin-top: auto; padding: 11px; border: 1px solid #d5c9a9; border-radius: 10px; color: #70664f; background: #f7f0df; font-size: 9px; line-height: 1.8; }
.phone-app-view { display: flex; flex-direction: column; gap: 9px; }
.phone-app-view h2 { margin: 0 0 2px; color: #344c39; font-size: 15px; }
.phone-app-view > p { margin: 0 0 3px; color: #868d7b; font-size: 9px; }
.social-feed { gap: 8px; }
.social-feed-header { padding: 2px 1px 8px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid #d5ddd1; }
.social-live-dot { flex: 0 0 9px; width: 9px; height: 9px; border-radius: 50%; background: #16a66a; box-shadow: 0 0 0 4px #dff1e5; }
.social-feed-header h2 { margin: 0 !important; color: #2f4d3b !important; font-size: 13px !important; }
.social-feed-header p { margin: 2px 0 0; color: #879183; font-size: 8px; }
.social-post-card { overflow: hidden; border: 1px solid #d4ddd5; border-radius: 12px; background: #fff; box-shadow: 0 4px 10px #273a2c0c; }
.social-post-author { padding: 10px 10px 8px; display: flex; align-items: center; gap: 8px; }
.social-page-avatar { flex: 0 0 34px; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #cde4d5; border-radius: 50%; color: #fff; background: linear-gradient(145deg,#438d69,#236a51); font-size: 15px; font-weight: 900; }
.social-post-author > div { min-width: 0; flex: 1; display: grid; gap: 3px; }
.social-post-author strong { color: #344c39; font-size: 9px; }
.social-post-author small { color: #969d90; font-size: 7px; }
.social-post-badge { padding: 3px 7px; border-radius: 99px; color: #1c6b8c; background: #e6f3f8; font-size: 7px; font-weight: 800; }
.social-post-copy { margin: 0 !important; padding: 2px 11px 11px; color: #465448; font-size: 9px !important; line-height: 1.85 !important; }
.social-post-stats { padding: 7px 10px; display: flex; justify-content: space-between; gap: 6px; border-top: 1px solid #edf0ea; color: #7d877b; font-size: 7px; }
.social-post-actions { padding: 7px 9px; display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid #e8ede7; color: #627465; text-align: center; font-size: 8px; font-weight: 700; }
.social-comments-thread { display: grid; gap: 7px; }
.social-comments-thread > h3 { margin: 0; display: flex; justify-content: space-between; color: #435b48; font-size: 9px; }
.social-comments-thread > h3 span { color: #929a8b; font-size: 7px; font-weight: 500; }
.social-comment { padding: 8px; display: flex; align-items: flex-start; gap: 7px; border: 1px solid #e0e6dc; border-radius: 9px; background: #f8faf6; }
.social-comment-avatar { flex: 0 0 25px; width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid #fff; border-radius: 50%; color: #fff; background: #a77a4a; font-size: 8px; font-weight: 800; }
.social-comment-avatar.avatar-2 { background: #8c7894; }
.social-comment-avatar.avatar-3 { background: #648497; }
.social-comment > div { min-width: 0; }
.social-comment strong { color: #435747; font-size: 8px; }
.social-comment p { margin: 2px 0 3px; color: #647064; font-size: 8px; line-height: 1.7; }
.social-comment small { color: #a0a494; font-size: 7px; }
.message-section-heading { margin: 3px 0 0; color: #66745f; font-size: 9px; }
.message-contact-list { display: grid; gap: 6px; }
.message-contact { position: relative; min-width: 0; padding: 9px 8px; display: flex; align-items: center; gap: 8px; border: 1px solid #d2d9cc; border-radius: 11px; color: #36493b; background: #fbfcf7; box-shadow: 0 3px 8px #3745300b; cursor: pointer; text-align: right; }
.message-contact:hover { border-color: #a7b99f; background: #fff; }
.contact-avatar { flex: 0 0 36px; width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid #ffffffaa; border-radius: 50%; color: #fff; background: #547a61; box-shadow: 0 2px 4px #20281d24; font-size: 10px; font-weight: 800; }
.delta-avatar { background: #b17c42; font-size: 8px; }
.pharmacists-avatar { background: #6981a2; font-size: 17px; }
.contact-copy { min-width: 0; flex: 1; display: grid; gap: 3px; }
.contact-copy strong { overflow: hidden; color: #3b5140; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.contact-copy strong small { color: #89917e; font-size: 8px; }
.contact-copy > span { overflow: hidden; color: #858b7c; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.contact-unread { min-width: 17px; height: 17px; padding: 0 4px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #3d9b6b; font-size: 8px; }
.message-thread { min-height: 100%; }
.thread-heading { position: sticky; z-index: 1; top: -15px; margin: -15px -13px 1px; padding: 9px 12px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid #d2d8ca; background: #eef1e8f5; }
.thread-heading .contact-avatar { width: 31px; height: 31px; flex-basis: 31px; }
.thread-heading > strong { color: #3b5140; font-size: 10px; }
.thread-heading > strong small { color: #89917e; font-size: 8px; }
.thread-back { width: 26px; height: 26px; padding: 0; border: 1px solid #c9d2c4; border-radius: 50%; color: #4c6852; background: #fff; cursor: pointer; font-size: 21px; line-height: 1; }
.thread-date { align-self: center; padding: 3px 8px; border-radius: 99px; color: #8a907f; background: #f8f9f4; font-size: 7px; }
.chat-bubble { max-width: 88%; padding: 8px 10px; border: 1px solid #d5dbce; border-radius: 11px 11px 3px 11px; color: #4b5948; background: #fbfcf7; box-shadow: 0 2px 5px #3745300b; }
.chat-bubble p { margin: 0; font-size: 9px; line-height: 1.8; }
.chat-bubble small { display: block; margin-top: 3px; color: #949986; font-size: 7px; }
.chat-bubble.outgoing { align-self: flex-start; border-color: #c4d6c1; border-radius: 11px 11px 11px 3px; background: #e1efdc; }
.tawfiq-replies { gap: 6px; }
.tawfiq-replies button { text-align: right; line-height: 1.7; }
.news-empty-state { padding: 17px 12px; display: grid; justify-items: center; gap: 8px; border: 1px dashed #c5d3bd; border-radius: 12px; color: #61745c; background: #f8fbf5; text-align: center; }
.news-empty-state > span { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid #c8d8c0; border-radius: 50%; color: #5d8a5b; background: #e8f1e2; font-size: 18px; font-weight: 800; }
.news-empty-state strong { max-width: 230px; font-size: 9px; line-height: 1.8; }
.phone-message-card { padding: 10px 11px; border: 1px solid #d2d7c8; border-radius: 11px; color: #485444; background: #fbfcf6; box-shadow: 0 3px 8px #3745300b; }
.phone-message-card.unread { border-right: 3px solid #b98642; }
.phone-message-card h3 { margin: 0 0 4px; color: #405945; font-size: 10px; }
.phone-message-card p { margin: 0; font-size: 9px; line-height: 1.8; }
.phone-message-card small { display: block; margin-top: 5px; color: #9a927f; font-size: 8px; }
.phone-action-list { margin-top: 4px; display: grid; gap: 7px; }
.phone-action-list button, .phone-back { padding: 8px 10px; border: 1px solid #b5c5af; border-radius: 8px; color: #f8f6e8; background: #3e6e4b; cursor: pointer; font-size: 9px; font-weight: 700; }
.phone-action-list button.danger { border-color: #9f6254; background: #8d493e; }
.phone-back { align-self: flex-start; margin-top: 4px; color: #465744; background: #e1e8db; }
.phone-supplier-channels { display: grid; gap: 7px; }
.phone-supplier-channel { padding: 9px 11px; display: flex; flex-direction: column; gap: 3px; border: 1px solid #c9c4a8; border-radius: 9px; color: #405945; background: #f3f1e5; cursor: pointer; text-align: right; }
.phone-supplier-channel strong { font-size: 10px; }
.phone-supplier-channel small { color: #828875; font-size: 8px; }
.phone-supplier-channel:hover { border-color: #b28e4f; background: #fff9e8; }
.sample-dispense-button { min-height: 32px; border: 1px solid #ae9252; border-radius: 6px; color: #fff8df; background: #557548; cursor: pointer; font: inherit; font-size: 9px; font-weight: 700; }
.sample-dispense-button:hover { background: #668d55; }
.sample-dispense-button:disabled { opacity: .55; cursor: not-allowed; }
.phone-feed-tag { display: inline-block; margin-bottom: 4px; color: #9c7640; font-size: 8px; font-weight: 800; }
.pharmacist-chat { gap: 7px; }
.pharmacist-message { padding: 8px 9px; }
.pharmacist-message.hazem-message { margin-right: 12px; border-right: 3px solid #819974; }
.pharmacist-approve { padding: 8px 10px; border: 1px solid #3e6a51; border-radius: 8px; color: #fff; background: #3e6a51; cursor: pointer; font-size: 9px; font-weight: 700; }
.pharmacist-approve:disabled { opacity: .6; cursor: wait; }
.day-decisions { margin-top: 8px; padding: 7px 9px; border: 1px solid #dfd4ba; border-radius: 7px; background: #faf7ed; }
.day-decisions h3 { margin: 0 0 4px; color: #705334; font-size: 9px; }
.day-decisions ul { display: grid; gap: 3px; margin: 0; padding: 0; list-style: none; }
.day-decisions li { display: flex; justify-content: space-between; gap: 8px; color: #52634b; font-size: 8px; }
.day-decisions li.is-flawed { color: #9a5142; }
.smartphone-home-indicator { flex: 0 0 17px; display: grid; place-items: center; background: #f4f4ec; }
.smartphone-home-indicator::after { content: ""; width: 76px; height: 4px; border-radius: 99px; background: #495146; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.orientation-overlay { display: none; }
@media (orientation: portrait) {
  #orientation-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: max(20px, env(safe-area-inset-top))
      max(20px, env(safe-area-inset-right))
      max(20px, env(safe-area-inset-bottom))
      max(20px, env(safe-area-inset-left));
    color: #fff;
    background: #0b111e;
    text-align: center;
  }
  .rotate-device-icon {
    margin-bottom: 12px;
    font-size: clamp(2.5rem, 12vw, 4rem);
    animation: rotate-device-nudge 1.8s ease-in-out infinite;
  }
  @keyframes rotate-device-nudge {
    0%, 100% { transform: rotate(0deg) translateX(0); }
    25% { transform: rotate(-12deg) translateX(-3px); }
    75% { transform: rotate(12deg) translateX(3px); }
  }
  #orientation-overlay p {
    max-width: 28rem;
    margin: 0;
    font-size: clamp(1rem, 5vw, 1.4rem);
    line-height: 1.6;
  }
}

@media (orientation: landscape) and (max-width: 950px) and (max-height: 600px) {
  .main-menu { padding: calc(20px / var(--game-scale)) calc(24px / var(--game-scale)); }
  .menu-top-stats { gap: calc(10px / var(--game-scale)); }
  .menu-top-stats > div { min-height: calc(44px / var(--game-scale)); padding: calc(8px / var(--game-scale)) calc(12px / var(--game-scale)); font-size: calc(12px / var(--game-scale)); }
  .menu-top-stats strong { font-size: calc(14px / var(--game-scale)); }
  .menu-brand-img { width: calc(112px / var(--game-scale)); height: calc(112px / var(--game-scale)); }
  .menu-content { width: min(100%, calc(430px / var(--game-scale))); padding: calc(16px / var(--game-scale)) calc(22px / var(--game-scale)); }
  .menu-subtitle { font-size: calc(15px / var(--game-scale)); }
  .menu-btn { min-height: calc(48px / var(--game-scale)); margin: calc(4px / var(--game-scale)) 0; padding: calc(8px / var(--game-scale)) calc(14px / var(--game-scale)); font-size: calc(14px / var(--game-scale)); }
  .menu-footer { gap: calc(10px / var(--game-scale)); font-size: calc(11px / var(--game-scale)); }
  .menu-cache-btn { min-height: calc(40px / var(--game-scale)); padding: calc(6px / var(--game-scale)) calc(10px / var(--game-scale)); font-size: calc(11px / var(--game-scale)); }
  .prologue-card { padding: calc(22px / var(--game-scale)) calc(28px / var(--game-scale)); }
  .prologue-card h2 { font-size: calc(22px / var(--game-scale)); }
  .prologue-card p { font-size: calc(15px / var(--game-scale)); line-height: 1.65; }
  .prologue-card button { min-height: calc(48px / var(--game-scale)); padding: calc(8px / var(--game-scale)) calc(12px / var(--game-scale)); font-size: calc(14px / var(--game-scale)); }
  .topbar {
    min-height: calc(50px / var(--game-scale));
    padding: calc(4px / var(--game-scale)) calc(8px / var(--game-scale));
    gap: calc(8px / var(--game-scale));
    background: linear-gradient(110deg, #102d26, #1d4939 68%, #15382f);
  }
  .brand { flex-basis: calc(170px / var(--game-scale)); gap: calc(6px / var(--game-scale)); }
  .topbar-logo-img { width: calc(32px / var(--game-scale)); height: calc(32px / var(--game-scale)); }
  .brand strong { font-size: calc(15px / var(--game-scale)); }
  .brand small { font-size: calc(10px / var(--game-scale)); }
  .hud { gap: calc(3px / var(--game-scale)); }
  .hud-item { gap: calc(3px / var(--game-scale)); }
  .hud-item small { color: #e0e8dc; font-size: calc(9px / var(--game-scale)); }
  .hud-item strong { font-size: calc(12px / var(--game-scale)); }
  .hud-icon { width: calc(22px / var(--game-scale)); height: calc(22px / var(--game-scale)); flex-basis: calc(22px / var(--game-scale)); font-size: calc(10px / var(--game-scale)); }
  .utility-actions { gap: calc(3px / var(--game-scale)); }
  .icon-button { width: calc(40px / var(--game-scale)); height: calc(40px / var(--game-scale)); font-size: calc(17px / var(--game-scale)); }
  .scene { padding: calc(8px / var(--game-scale)) calc(12px / var(--game-scale)) 0; }
  .scene-heading { min-height: calc(36px / var(--game-scale)); margin-bottom: calc(4px / var(--game-scale)); }
  .scene-heading .eyebrow, .open-sign { font-size: calc(10px / var(--game-scale)); }
  h1 { font-size: calc(19px / var(--game-scale)); }
  .station-counter { grid-template-rows: minmax(0, 1fr) auto; gap: calc(5px / var(--game-scale)) calc(10px / var(--game-scale)); }
  .station-counter .station-switch {
    min-height: calc(44px / var(--game-scale));
    justify-content: flex-end;
    padding: 0;
  }
  .station-counter { grid-template-rows: minmax(0, 1fr); }
  .station-counter .station-switch > span { display: none; }
  .customer-reaction-bubble {
    width: min(52%, calc(220px / var(--game-scale)));
    min-height: calc(64px / var(--game-scale));
    padding: calc(9px / var(--game-scale)) calc(10px / var(--game-scale));
    grid-template-columns: calc(25px / var(--game-scale)) minmax(0, 1fr);
    gap: calc(6px / var(--game-scale));
    border-color: #b6a783;
    color: #302c24;
    background: #fffef9;
  }
  .reaction-emoji { font-size: calc(20px / var(--game-scale)); }
  .reaction-text { font-size: calc(14px / var(--game-scale)); line-height: 1.5; }
  .customer-caption { padding: calc(9px / var(--game-scale)) calc(14px / var(--game-scale)) calc(3px / var(--game-scale)); }
  .customer-number, .customer-tag { font-size: calc(11px / var(--game-scale)); }
  .customer-caption h2 { font-size: calc(21px / var(--game-scale)); }
  .dialogue-card {
    min-height: calc(68px / var(--game-scale));
    margin: calc(8px / var(--game-scale)) calc(12px / var(--game-scale)) calc(10px / var(--game-scale));
    padding: calc(10px / var(--game-scale)) calc(14px / var(--game-scale)) calc(10px / var(--game-scale)) calc(30px / var(--game-scale));
    border-color: #c9b991;
    background: #fffef9;
  }
  .dialogue-card p { color: #332f27; font-size: calc(14px / var(--game-scale)); line-height: 1.65; }
  .queue-chatter-box { min-height: calc(32px / var(--game-scale)); margin: 0 calc(12px / var(--game-scale)) calc(7px / var(--game-scale)); }
  .queue-chatter-box p { color: #4a4b41; font-size: calc(11px / var(--game-scale)); }
  .queue-chatter-box { display: none; }
  .dialogue-card {
    min-height: calc(50px / var(--game-scale));
    margin: calc(4px / var(--game-scale)) calc(8px / var(--game-scale));
    padding: calc(5px / var(--game-scale)) calc(10px / var(--game-scale));
  }
  .dialogue-card p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: #332f27;
    font-size: calc(12px / var(--game-scale));
    line-height: 1.45;
  }
  .desk-topline { min-height: calc(20px / var(--game-scale)); padding-inline: calc(8px / var(--game-scale)); font-size: calc(10px / var(--game-scale)); }
  .desk-tools {
    left: 3%;
    width: calc(190px / var(--game-scale));
    max-width: none;
    flex-wrap: nowrap;
    gap: calc(2px / var(--game-scale));
  }
  .desk-tool {
    width: auto;
    min-width: 0;
    height: calc(34px / var(--game-scale));
    min-height: calc(34px / var(--game-scale));
    padding: 0;
    font-size: 0;
  }
  .desk-tool > span { font-size: calc(16px / var(--game-scale)); }
  .desk-tool > i { display: none; }
  .desk-tools .desk-tool {
    flex: 1 1 0;
    height: calc(34px / var(--game-scale));
    min-height: calc(34px / var(--game-scale));
  }
  .desk-drawer {
    left: 3%;
    bottom: 0;
    width: calc(40px / var(--game-scale));
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .drawer-label, .desk-drawer strong { display: none; }
  .drawer-button {
    display: grid;
    width: 100%;
    min-height: calc(40px / var(--game-scale));
    padding: 0;
    place-items: center;
    font-size: 0;
  }
  .drawer-button span { font-size: calc(18px / var(--game-scale)); }
  .rx-workpaper {
    position: absolute;
    inset: 0;
    width: auto;
    height: auto;
    justify-content: flex-end;
    gap: calc(8px / var(--game-scale));
    padding-left: calc(190px / var(--game-scale));
  }
  .rx-workpaper .prescription { transform: rotate(-3deg) scale(.68); }
  .rx-workpaper .prescription:hover { transform: rotate(0) scale(.68); }
  .rx-checklist { padding: calc(10px / var(--game-scale)); }
  .rx-checklist h3 { font-size: calc(12px / var(--game-scale)); }
  .rx-checklist li { grid-template-columns: calc(16px / var(--game-scale)) calc(16px / var(--game-scale)) minmax(0,1fr); gap: calc(5px / var(--game-scale)); font-size: calc(10px / var(--game-scale)); }
  .desk-tool, .patient-question-button, .patient-match-button, .retrieval-button, .switch-button {
    min-height: calc(44px / var(--game-scale));
    padding: calc(7px / var(--game-scale)) calc(11px / var(--game-scale));
    font-size: calc(12px / var(--game-scale));
  }
  .customer-actions { gap: calc(2px / var(--game-scale)); padding: 0 calc(8px / var(--game-scale)); }
  .medicine-retrieval { grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); gap: calc(4px / var(--game-scale)); }
  .retrieval-button { height: auto; min-height: calc(44px / var(--game-scale)); font-size: calc(11px / var(--game-scale)); }
  .medicine-retrieval p { display: none; }
  .transaction-actions { flex-basis: calc(52px / var(--game-scale)); height: calc(52px / var(--game-scale)); gap: calc(6px / var(--game-scale)); }
  .action-button, .action-btn, .btn {
    min-height: calc(52px / var(--game-scale));
    padding: calc(8px / var(--game-scale)) calc(12px / var(--game-scale));
    font-size: calc(14px / var(--game-scale));
    line-height: 1.35;
    touch-action: manipulation;
  }
  .action-button span { font-size: calc(19px / var(--game-scale)); }
  .station-switch { min-height: calc(40px / var(--game-scale)); font-size: calc(11px / var(--game-scale)); }
  .station-switch-actions .switch-button { min-height: calc(44px / var(--game-scale)); }
  .modal-backdrop { padding: calc(12px / var(--game-scale)); }
  .modal {
    width: min(94%, calc(760px / var(--game-scale)));
    max-height: calc(100% - 24px);
    padding: calc(24px / var(--game-scale)) calc(28px / var(--game-scale));
    font-size: calc(16px / var(--game-scale));
  }
  .modal h2, #modal-title { font-size: calc(22px / var(--game-scale)); }
  #modal-content, #modal-content p, .story-card p { font-size: calc(15px / var(--game-scale)); line-height: 1.65; }
  #modal-content li, #modal-content label { font-size: calc(14px / var(--game-scale)); line-height: 1.55; }
  .modal-subtitle { font-size: calc(12px / var(--game-scale)); }
  .modal-kicker { font-size: calc(11px / var(--game-scale)); }
  #modal-content button { min-height: calc(44px / var(--game-scale)); padding: calc(8px / var(--game-scale)) calc(12px / var(--game-scale)); font-size: calc(13px / var(--game-scale)); }
  .modal-close { width: calc(44px / var(--game-scale)); height: calc(44px / var(--game-scale)); font-size: calc(24px / var(--game-scale)); }
  .modal.pos-receipt-modal { padding: calc(16px / var(--game-scale)); }
  .pos-receipt { padding: calc(14px / var(--game-scale)); }
  .pos-receipt-header h2 { font-size: calc(20px / var(--game-scale)); }
  .pos-shift-badge, .pos-customer, .pos-customer small, .pos-table, .pos-table th,
  .pos-total-row, .pos-grand-total { font-size: calc(12px / var(--game-scale)); }
  .pos-status { font-size: calc(12px / var(--game-scale)) !important; }
  .pos-customer strong, .pos-grand-total strong { font-size: calc(15px / var(--game-scale)); }
  .pos-scan-button, .pos-clear-button, .pos-approve-button { min-height: calc(44px / var(--game-scale)); padding: calc(8px / var(--game-scale)) calc(11px / var(--game-scale)); font-size: calc(12px / var(--game-scale)); }
}

@media (orientation: landscape) and (max-width: 950px) and (max-height: 375px) {
  .rx-workpaper .prescription { transform: rotate(-3deg) scale(.46); }
  .rx-workpaper .prescription:hover { transform: rotate(0) scale(.46); }
  .desk-tools .desk-tool { height: calc(28px / var(--game-scale)); min-height: calc(28px / var(--game-scale)); }
  .desk-drawer { width: calc(30px / var(--game-scale)); }
  .drawer-button { min-height: calc(30px / var(--game-scale)); }
  .drawer-button span { font-size: calc(15px / var(--game-scale)); }
}

@media (orientation: landscape) and (max-width: 950px) and (max-height: 600px) {
  .rx-workpaper .prescription { transition: none; }
  .terminal-topbar { flex-basis: calc(28px / var(--game-scale)); min-height: calc(28px / var(--game-scale)); padding-inline: calc(8px / var(--game-scale)); gap: calc(6px / var(--game-scale)); font-size: calc(10px / var(--game-scale)); }
  .terminal-topbar > div { gap: calc(7px / var(--game-scale)); }
  .terminal-layout { padding: calc(6px / var(--game-scale)); gap: calc(6px / var(--game-scale)); }
  .terminal-status-card { padding: calc(6px / var(--game-scale)); }
  .terminal-brand-mark { width: calc(28px / var(--game-scale)); height: calc(28px / var(--game-scale)); margin-bottom: calc(4px / var(--game-scale)); font-size: calc(17px / var(--game-scale)); }
  .terminal-kicker, .terminal-status-card dt { font-size: calc(9px / var(--game-scale)); }
  .terminal-status-card h2 { margin: calc(2px / var(--game-scale)) 0 calc(5px / var(--game-scale)); font-size: calc(13px / var(--game-scale)); }
  .terminal-status-card dl { gap: calc(4px / var(--game-scale)); }
  .terminal-status-card dl > div { padding-bottom: calc(3px / var(--game-scale)); }
  .terminal-status-card dd { font-size: calc(10px / var(--game-scale)); line-height: 1.4; }
  .terminal-drawer-link { min-height: calc(40px / var(--game-scale)); padding: calc(4px / var(--game-scale)); font-size: calc(10px / var(--game-scale)); }
  .terminal-apps-heading { margin-bottom: calc(4px / var(--game-scale)); }
  .terminal-apps-heading h2 { font-size: calc(14px / var(--game-scale)); }
  .terminal-apps-heading p { display: none; }
  .terminal-app-count { padding: calc(3px / var(--game-scale)) calc(6px / var(--game-scale)); font-size: calc(10px / var(--game-scale)); }
  .desktop-grid { gap: calc(5px / var(--game-scale)); }
  .desktop-card { min-height: calc(48px / var(--game-scale)); padding: calc(4px / var(--game-scale)); gap: calc(3px / var(--game-scale)); }
  .desktop-card b { font-size: calc(11px / var(--game-scale)); line-height: 1.3; }
  .desktop-card small { display: none; }
  .app-icon { width: calc(24px / var(--game-scale)); height: calc(24px / var(--game-scale)); border-radius: calc(6px / var(--game-scale)); font-size: calc(15px / var(--game-scale)); }
  .terminal-taskbar { flex-basis: calc(18px / var(--game-scale)); padding-inline: calc(8px / var(--game-scale)); font-size: calc(9px / var(--game-scale)); }
  .station-computer { gap: calc(4px / var(--game-scale)); }
  .computer-nav { min-height: calc(44px / var(--game-scale)); }
  .lab-header { min-height: calc(32px / var(--game-scale)); gap: calc(6px / var(--game-scale)); }
  .lab-header p { display: none; }
  .lab-title-group .window-label { font-size: calc(11px / var(--game-scale)); }
  .lab-cash { gap: calc(5px / var(--game-scale)); font-size: calc(10px / var(--game-scale)); }
  .lab-cash strong { font-size: calc(11px / var(--game-scale)); }
  .lab-cash button { min-height: calc(40px / var(--game-scale)); padding: calc(4px / var(--game-scale)) calc(8px / var(--game-scale)); }
  .lab-workspace { padding: calc(5px / var(--game-scale)); gap: calc(5px / var(--game-scale)); }
  .lab-device { min-height: calc(44px / var(--game-scale)); padding: calc(4px / var(--game-scale)); gap: calc(3px / var(--game-scale)); }
  .lab-device strong { font-size: calc(10px / var(--game-scale)); line-height: 1.35; }
  .lab-device > small { font-size: calc(8px / var(--game-scale)); line-height: 1.35; }
  .lab-note { display: none; }
  .lab-nav { min-height: calc(44px / var(--game-scale)); }
  .compounding-kicker { font-size: calc(9px / var(--game-scale)); }
  .compounding-zone .mortar { width: calc(42px / var(--game-scale)); height: calc(34px / var(--game-scale)); }
  .compounding-zone .mortar i { font-size: calc(20px / var(--game-scale)); }
  .device-screen { min-height: calc(36px / var(--game-scale)); padding: calc(3px / var(--game-scale)); }
  .device-screen b { font-size: calc(12px / var(--game-scale)); }
  .lab-workspace { grid-template-rows: repeat(2, minmax(0, 1fr)); }
  .lab-fridge { grid-area: 1 / 1; }
  .lab-scanner { grid-area: 1 / 2; }
  .lab-vitals { grid-area: 1 / 3; }
  .lab-printer { grid-area: 2 / 1; }
  .compounding-zone { grid-area: 2 / 2 / 3 / 4; }
  .compounding-kicker { display: none; }
  .compounding-zone .mortar-device { min-height: calc(38px / var(--game-scale)); }
  .thermometer { height: calc(30px / var(--game-scale)); }
  .thermometer i { height: calc(18px / var(--game-scale)); }
  .temp-display { top: calc(6px / var(--game-scale)); font-size: calc(11px / var(--game-scale)); }
  .scanner-body { width: calc(48px / var(--game-scale)); height: calc(30px / var(--game-scale)); }
  .printer-art { width: calc(48px / var(--game-scale)); height: calc(30px / var(--game-scale)); }
}
