:root {
  --ink: #1d2b36;
  --ink2: #3c5160;
  --teal: #2bb3a3;
  --teal-d: #1f8a7e;
  --mint: #d3f3ec;
  --orange: #ff8a2a;
  --orange-d: #e06a0b;
  --cream: #fffaf0;
  --red: #ff4d6d;
  --yellow: #ffd23f;
  --green: #2ecc71;
  --font: 'Fredoka', 'Arial Rounded MT Bold', 'Trebuchet MS', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #9fd9d2; font-family: var(--font); color: var(--ink); -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
#app { position: fixed; inset: 0; }
#gl, #c2d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#c2d { z-index: 2; background: #e3f4f0; pointer-events: none; }
#ui { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
#ui > * { position: absolute; }
.interactive, button, .btn { pointer-events: auto; }
.hidden { display: none !important; }
.pos { color: #11966a; }
.neg { color: #d62845; }
.muted { color: var(--ink2); opacity: 0.85; }

/* ---------- buttons ---------- */
.btn {
  font-family: var(--font); font-weight: 600; font-size: 18px; color: var(--ink);
  background: #fff; border: 3px solid var(--ink); border-radius: 16px; padding: 10px 18px;
  box-shadow: 0 5px 0 var(--ink); cursor: pointer; transition: transform 0.06s, box-shadow 0.06s, background 0.15s;
}
.btn:hover:not(:disabled) { background: #f3fffc; }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.btn.primary { background: var(--orange); color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,0.18); }
.btn.primary:hover:not(:disabled) { background: #ff9a45; }
.btn.big { font-size: 24px; padding: 14px 28px; }
.btn.small { font-size: 16px; padding: 7px 13px; border-radius: 13px; box-shadow: 0 4px 0 var(--ink); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn:focus-visible { outline: 4px solid var(--yellow); outline-offset: 2px; }
.swatch { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ink); vertical-align: -3px; margin-right: 6px; }

/* ---------- HUD ---------- */
.hud { top: 0; left: 0; right: 0; display: flex; gap: 8px; align-items: center; padding: max(10px, env(safe-area-inset-top)) 12px 10px; }
.hud .spacer { flex: 1; }
.pill { background: #fff; border: 3px solid var(--ink); border-radius: 999px; padding: 4px 14px; font-weight: 600; font-size: 17px; box-shadow: 0 3px 0 var(--ink); white-space: nowrap; }
.pill.money { background: #e7fff4; color: #0c7a55; }
.pill.money.neg { background: #ffe7ea; color: #c21d3b; }
.pill.money.bump { animation: bump 0.45s; }
@keyframes bump { 30% { transform: scale(1.25); } }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--ink); background: #fff; font-size: 18px; cursor: pointer; box-shadow: 0 3px 0 var(--ink); font-family: var(--font); display: grid; place-items: center; padding: 0; }
.icon-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }

.hint { top: 64px; left: 50%; transform: translateX(-50%); width: max-content; background: rgba(29,43,54,0.88); color: #fff; padding: 9px 18px; border-radius: 16px; font-size: 18px; text-align: center; max-width: min(92vw, 640px); line-height: 1.3; }
.hint b { color: var(--yellow); }
.timer { top: 64px; right: 14px; background: #fff; border: 3px solid var(--ink); border-radius: 14px; padding: 4px 12px; font-weight: 700; font-size: 20px; box-shadow: 0 3px 0 var(--ink); }
.timer.low { background: #ffe0e5; color: #c21d3b; animation: pulse 0.6s infinite; }
@keyframes pulse { 50% { transform: scale(1.08); } }

/* ---------- bubbles ---------- */
.bubbles { inset: 0; z-index: 6; }
.bubble { position: absolute; left: 0; top: 0; max-width: min(320px, 70vw); background: #fff; border: 3px solid var(--ink); border-radius: 18px; padding: 8px 14px 10px; font-size: 18px; line-height: 1.25; box-shadow: 0 4px 0 rgba(29,43,54,0.9); animation: bubIn 0.18s ease-out; --tail: 50%; }
/* tail: a dark triangle with a white one inside, both hanging fully below the text */
.bubble::before, .bubble::after { content: ''; position: absolute; top: 100%; left: var(--tail); transform: translateX(-50%); width: 0; height: 0; border-style: solid; border-color: transparent; border-bottom-width: 0; }
.bubble::before { border-width: 16px 12px 0; border-top-color: var(--ink); }
.bubble::after { border-width: 11px 8.25px 0; border-top-color: #fff; }
.bubble.out { opacity: 0; transition: opacity 0.2s; }
.bubble-name { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--teal-d); margin-bottom: 1px; }
.bubble.small { font-size: 16px; padding: 5px 10px; font-weight: 700; color: #c21d3b; }
.bubble.narrate { background: #fff8d6; font-style: italic; }
.bubble.narrate::after { border-top-color: #fff8d6; }
@keyframes bubIn { from { opacity: 0; scale: 0.85; } }

/* ---------- nurse ---------- */
.nurse { left: 12px; bottom: 14px; display: flex; align-items: center; gap: 12px; background: var(--cream); border: 3px solid var(--ink); border-radius: 22px; padding: 10px 14px 10px 10px; max-width: min(600px, calc(100vw - 24px)); box-shadow: 0 6px 0 var(--ink); animation: slideUp 0.25s ease-out; z-index: 7; }
.nurse-avatar { flex: 0 0 64px; width: 64px; height: 64px; border-radius: 50%; background: #b8a1e3; border: 3px solid var(--ink); overflow: hidden; }
.nurse-avatar svg { width: 100%; height: 100%; display: block; }
.nurse-body { flex: 1; min-width: 0; }
.nurse-name { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #7b5fc4; }
.nurse-text { font-size: 18px; line-height: 1.3; }
.nurse-text b { color: var(--orange-d); }
.nurse .btn { flex: 0 0 auto; align-self: flex-end; }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } }

/* ---------- chart ---------- */
.chart { left: 14px; top: 70px; width: min(290px, 44vw); background: #fff; border: 3px solid var(--ink); border-radius: 12px; padding: 22px 14px 12px; box-shadow: 0 6px 0 var(--ink); transform: rotate(-1.5deg); animation: slideIn 0.25s ease-out; background-image: repeating-linear-gradient(#fff 0 27px, #e2f1ff 27px 28px); }
.chart-clip { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); width: 80px; height: 22px; background: #b0bec5; border: 3px solid var(--ink); border-radius: 8px; }
.chart-title { font-weight: 700; font-size: 13px; letter-spacing: 0.12em; color: var(--teal-d); margin-bottom: 4px; }
.chart-row { font-size: 16px; line-height: 1.35; margin: 2px 0; }
.chart-row.complaint { font-size: 15px; }
.chart-row.small { font-size: 13px; color: var(--ink2); }
.chart-note { margin-top: 8px; background: #fff6c9; border: 2px dashed #d4a017; border-radius: 10px; padding: 6px 8px; font-size: 14px; transform: rotate(1deg); }
@keyframes slideIn { from { transform: translateX(-40px) rotate(-1.5deg); opacity: 0; } }

/* ---------- tool tray ---------- */
.tray { left: 50%; bottom: 12px; transform: translateX(-50%); width: max-content; background: rgba(255,250,240,0.96); border: 3px solid var(--ink); border-radius: 22px; padding: 8px 10px 10px; box-shadow: 0 6px 0 var(--ink); text-align: center; pointer-events: auto; max-width: calc(100vw - 16px); animation: slideUp 0.25s ease-out; }
.tray.shake { animation: shake 0.4s; }
@keyframes shake { 20% { transform: translateX(calc(-50% - 10px)); } 40% { transform: translateX(calc(-50% + 10px)); } 60% { transform: translateX(calc(-50% - 6px)); } 80% { transform: translateX(calc(-50% + 6px)); } }
.tray-title { font-weight: 700; font-size: 15px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--teal-d); margin-bottom: 6px; }
.tray-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.tool { width: 84px; padding: 6px 4px 6px; background: #fff; border: 3px solid var(--ink); border-radius: 16px; box-shadow: 0 4px 0 var(--ink); cursor: pointer; font-family: var(--font); color: var(--ink); display: flex; flex-direction: column; align-items: center; gap: 2px; transition: transform 0.08s; }
.tool svg { width: 44px; height: 44px; }
.tool span { font-size: 12.5px; font-weight: 600; line-height: 1.1; }
.tool:hover { transform: translateY(-4px); background: #f0fffb; }
.tool:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.tool.glow { background: #fff3c4; animation: glow 0.9s infinite alternate; }
@keyframes glow { from { box-shadow: 0 4px 0 var(--ink), 0 0 0 0 rgba(255,138,42,0.0); } to { box-shadow: 0 4px 0 var(--ink), 0 0 0 8px rgba(255,138,42,0.55); } }

/* ---------- meters ---------- */
.meters { right: 14px; top: 110px; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.meter { background: #fff; border: 3px solid var(--ink); border-radius: 14px; padding: 6px 10px 8px; box-shadow: 0 4px 0 var(--ink); width: 210px; }
.meter.small { width: 150px; }
.meter.wide { width: 290px; }
.meter-label { font-size: 13px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 4px; }
.meter-track { position: relative; height: 18px; background: #e9eef2; border: 2px solid var(--ink); border-radius: 9px; overflow: hidden; }
.meter-zone { position: absolute; top: 0; bottom: 0; }
.meter.vertical .meter-zone { top: auto; left: 0; right: 0; }
.meter-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--teal); border-radius: 6px; transition: width 0.06s linear; }
.meter-mark { position: absolute; top: -2px; bottom: -2px; width: 6px; margin-left: -3px; background: var(--ink); border-radius: 3px; box-shadow: 0 0 0 2px #fff; }
.meter.vertical { width: 76px; text-align: center; }
.meter.vertical .meter-track { height: 190px; width: 30px; margin: 0 auto; }
.meter.vertical .meter-fill { top: auto; right: 0; width: auto !important; transition: height 0.06s linear; }
.meter.vertical .meter-mark { left: -2px; right: -2px; top: auto; width: auto; height: 6px; margin: 0 0 -3px 0; }
.meter-ends { display: flex; justify-content: space-between; font-size: 18px; margin-top: 2px; }

/* ---------- pops / flash ---------- */
.pops { inset: 0; overflow: hidden; }
.pop { position: absolute; transform: translate(-50%, -50%); font-weight: 700; font-size: 26px; color: var(--ink); text-shadow: 0 3px 0 #fff, 3px 0 0 #fff, -3px 0 0 #fff, 0 -3px 0 #fff, 2px 2px 0 #fff, -2px -2px 0 #fff, 2px -2px 0 #fff, -2px 2px 0 #fff; animation: popUp 1.3s ease-out forwards; white-space: nowrap; }
.pop.good { color: #11966a; }
.pop.bad { color: #e0213f; font-size: 32px; }
.pop.zzz { color: #6a5acd; font-size: 22px; }
.pop.huge { font-size: 120px; text-shadow: none; }
@keyframes popUp { 0% { opacity: 0; transform: translate(-50%, -30%) scale(0.6); } 15% { opacity: 1; transform: translate(-50%, -60%) scale(1.15); } 30% { transform: translate(-50%, -70%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -160%) scale(1); } }
.flash { inset: 0; opacity: 0; }
.flash.go { animation: flash 0.45s ease-out; }
@keyframes flash { 0% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- action buttons ---------- */
.actions { left: 50%; bottom: 16px; transform: translateX(-50%); text-align: center; width: max-content; max-width: calc(100vw - 16px); }
.actions:empty { display: none; }
.actions-title { display: inline-block; background: var(--ink); color: #fff; font-weight: 600; padding: 4px 14px; border-radius: 12px 12px 0 0; font-size: 15px; }
.actions-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; background: rgba(255,250,240,0.95); border: 3px solid var(--ink); border-radius: 18px; padding: 10px; box-shadow: 0 5px 0 var(--ink); }

/* ---------- modal cards ---------- */
.modal { inset: 0; display: grid; place-items: center; background: rgba(20,40,45,0.45); pointer-events: auto; z-index: 20; padding: 16px; animation: fadeIn 0.2s; overflow-y: auto; }
@keyframes fadeIn { from { opacity: 0; } }
.card { position: relative; background: var(--cream); border: 4px solid var(--ink); border-radius: 26px; padding: 22px 24px 20px; width: min(460px, 100%); box-shadow: 0 10px 0 var(--ink); text-align: center; animation: cardIn 0.3s cubic-bezier(.2,1.4,.4,1); }
@keyframes cardIn { from { transform: scale(0.7) rotate(-3deg); opacity: 0; } }
.card-icon { font-size: 46px; line-height: 1; margin-top: -4px; margin-bottom: 4px; }
.card-title { font-size: 30px; font-weight: 700; line-height: 1.1; margin-bottom: 8px; }
.card-body { font-size: 18px; line-height: 1.4; }
.card-body p { margin: 6px 0; }
.card-buttons { display: flex; gap: 12px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.howto { text-align: left; padding-left: 0; list-style: none; margin: 6px 0 0; counter-reset: s; }
.howto li { counter-increment: s; position: relative; padding: 6px 0 6px 40px; font-size: 17px; line-height: 1.35; }
.howto li::before { content: counter(s); position: absolute; left: 0; top: 4px; width: 28px; height: 28px; border-radius: 50%; background: var(--teal); color: #fff; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--ink); }
.howto b { color: var(--orange-d); }

.stars { display: flex; justify-content: center; gap: 6px; margin: 8px 0; }
.star { display: inline-block; line-height: 0; }
.star svg { width: 58px; height: 58px; }
.star.on { color: var(--yellow); animation: starIn 0.4s cubic-bezier(.2,1.6,.4,1) backwards; }
@keyframes starIn { from { transform: scale(0) rotate(-90deg); } }
.result-name { font-size: 24px; font-weight: 700; }
.result-pay { font-size: 34px; font-weight: 700; color: #11966a; }
.result-pay.zero { color: #a0aab2; }
.result-pay .tip { font-size: 18px; color: var(--orange-d); }
.review { margin-top: 10px; background: #fff; border: 2px solid var(--ink); border-radius: 14px; padding: 10px 14px; font-size: 17px; font-style: italic; position: relative; }
.review span { display: block; font-style: normal; font-size: 13px; font-weight: 600; color: var(--ink2); margin-top: 4px; }
.review span::before { content: '— '; }
.review.small { font-size: 15px; padding: 7px 10px; margin-top: 8px; }
.review.bad { background: #fff0f2; }

.summons { background: #fffdf3; background-image: repeating-linear-gradient(#fffdf3 0 29px, #f1e7c7 29px 30px); }
.summons .card-title { color: #c21d3b; }
.summons .case { font-family: Georgia, 'Times New Roman', serif; font-size: 18px; font-weight: 700; }
.summons .severity { display: inline-block; margin: 8px 0; padding: 3px 12px; border: 3px solid currentColor; border-radius: 8px; font-weight: 700; transform: rotate(-4deg); font-size: 18px; letter-spacing: 0.05em; text-transform: uppercase; }
.summons .sev1 { color: #d4a017; }
.summons .sev2 { color: #e06a0b; }
.summons .sev3 { color: #c21d3b; font-size: 22px; }
.summons .claim { font-family: Georgia, 'Times New Roman', serif; font-style: italic; font-size: 17px; margin: 6px 0; }
.summons .damages { font-size: 22px; margin-top: 8px; }
.summons .damages b { color: #c21d3b; }
.summons .damages small { display: block; font-size: 14px; color: var(--ink2); }

.summary { width: 100%; border-collapse: collapse; font-size: 16px; text-align: left; }
.summary td { padding: 5px 4px; border-bottom: 2px dashed #e0d7c3; }
.summary .st { color: #e3a900; white-space: nowrap; }
.summary .st .off { color: #d5dde3; }
.summary .pos, .summary .neg { text-align: right; font-weight: 600; white-space: nowrap; }
.totals { display: flex; justify-content: space-around; margin: 12px 0 4px; font-size: 16px; }
.totals b { display: block; font-size: 22px; }
.bank { margin-top: 10px; font-size: 20px; }

.shop-card { width: min(520px, 100%); }
.shop-bank { font-size: 20px; margin-bottom: 8px; }
.shop-list { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.shop-row { display: flex; align-items: center; gap: 12px; background: #fff; border: 3px solid var(--ink); border-radius: 16px; padding: 8px 10px; }
.shop-icon { font-size: 32px; width: 42px; text-align: center; }
.shop-info { flex: 1; min-width: 0; }
.shop-info b { display: block; font-size: 17px; }
.shop-info span { font-size: 14px; color: var(--ink2); line-height: 1.25; display: block; }
.dots { display: flex; gap: 5px; margin-top: 4px; }
.dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink); background: #e9eef2; }
.dots i.on { background: var(--orange); }
.swatches { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.sw { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--ink); cursor: pointer; padding: 0; }
.sw.on { box-shadow: 0 0 0 3px var(--yellow); transform: scale(1.1); }

/* ---------- surgery vitals ---------- */
.vitals { top: 64px; left: 14px; background: #062019; color: #5dffb0; border: 3px solid var(--ink); border-radius: 14px; padding: 6px 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; box-shadow: 0 4px 0 var(--ink); font-size: 26px; }
.vitals small { font-size: 13px; opacity: 0.8; }
.vitals .heart { color: #ff4d6d; display: inline-block; }
.vitals .heart.beat { animation: beat 0.3s; }
.vitals.danger { color: #ff6b6b; animation: pulse 0.5s infinite; }
@keyframes beat { 30% { transform: scale(1.4); } }

/* ---------- stethoscope rhythm lane ---------- */
.lane { left: 50%; bottom: 22px; transform: translateX(-50%); width: min(620px, 92vw); height: 70px; background: rgba(29,43,54,0.85); border: 3px solid var(--ink); border-radius: 18px; overflow: hidden; }
.lane-line { position: absolute; left: 20%; top: 6px; bottom: 6px; width: 6px; margin-left: -3px; background: var(--yellow); border-radius: 3px; box-shadow: 0 0 12px var(--yellow); }
.lane-label { position: absolute; right: 12px; top: 6px; color: #fff; font-size: 13px; opacity: 0.8; }
.note { position: absolute; left: 0; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; display: grid; place-items: center; font-size: 34px; color: #ff4d6d; filter: drop-shadow(0 2px 0 #fff); }
.note.hit { opacity: 0; transition: opacity 0.2s; }
.note.miss { filter: grayscale(1); opacity: 0.4; }

/* ---------- cast wrap guide ---------- */
.wrap-guide { left: 0; top: 0; width: 150px; height: 150px; margin: -75px 0 0 -75px; border: 4px dashed rgba(255,210,63,0.9); border-radius: 50%; animation: spin 2.4s linear infinite; }
.wrap-arrow { position: absolute; right: -16px; top: -18px; width: 38px; height: 38px; background: var(--yellow); border-radius: 50%; padding: 4px; }
.wrap-arrow svg { width: 100%; height: 100%; display: block; }
@keyframes spin { to { rotate: 360deg; } }

/* ---------- baby peekaboo hands ---------- */
.peek-hands { inset: 0; overflow: hidden; }
.peek-hands .hand { position: absolute; bottom: -30px; font-size: min(42vh, 360px); line-height: 1; transition: transform 0.25s cubic-bezier(.3,1.4,.5,1); filter: drop-shadow(0 6px 0 rgba(0,0,0,0.25)); }
.peek-hands .hand.l { left: -6vw; transform: translateX(-60%) rotate(-15deg); }
.peek-hands .hand.r { right: -6vw; transform: translateX(60%) rotate(15deg); }
.peek-hands.closed .hand.l { transform: translateX(24vw) rotate(-6deg); }
.peek-hands.closed .hand.r { transform: translateX(-24vw) rotate(6deg); }

/* ---------- sneeze cloud ---------- */
.sneeze-cloud { inset: 0; background: radial-gradient(circle at 40% 45%, rgba(230,255,235,0.95) 0 18%, transparent 19%), radial-gradient(circle at 60% 55%, rgba(220,255,225,0.9) 0 22%, transparent 23%), radial-gradient(circle at 48% 62%, rgba(240,255,240,0.9) 0 16%, transparent 17%), radial-gradient(circle at 30% 65%, rgba(225,255,230,0.85) 0 12%, transparent 13%), radial-gradient(circle at 70% 35%, rgba(235,255,240,0.85) 0 13%, transparent 14%); animation: sneezeFade 1.6s ease-in forwards; }
.sneeze-cloud.mega { background-color: rgba(230,255,235,0.6); }
@keyframes sneezeFade { 0% { opacity: 1; transform: scale(0.6); } 15% { transform: scale(1.05); } 60% { opacity: 0.9; } 100% { opacity: 0; transform: scale(1.1); } }

.spot-label { left: 0; top: 0; background: var(--ink); color: #fff; padding: 4px 12px; border-radius: 10px; font-size: 15px; font-weight: 600; translate: -50% -100%; white-space: nowrap; }

/* ---------- touch controls ---------- */
.touch { inset: 0; z-index: 8; }
.tbtn { position: absolute; bottom: max(20px, env(safe-area-inset-bottom)); width: 84px; height: 84px; border-radius: 50%; border: 4px solid var(--ink); background: rgba(255,255,255,0.85); font-size: 34px; font-family: var(--font); box-shadow: 0 5px 0 var(--ink); touch-action: none; color: var(--ink); }
.tbtn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.tbtn.left { left: 20px; }
.tbtn.right { left: 120px; }
.tbtn.jump { right: 24px; width: 100px; height: 100px; background: rgba(255,138,42,0.9); color: #fff; }
@media (hover: hover) and (pointer: fine) { .touch .tbtn { opacity: 0.35; } }

/* ---------- title ---------- */
#title { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; overflow-y: auto; background: radial-gradient(ellipse at center, rgba(255,250,240,0.0) 0%, rgba(29,60,60,0.35) 100%); padding: 16px; }
.title-inner { text-align: center; }
.logo { display: flex; flex-direction: column; align-items: center; gap: 0; line-height: 0.92; filter: drop-shadow(0 8px 0 var(--ink)); }
.logo span { display: flex; }
.logo i { font-style: normal; font-weight: 700; display: inline-block; -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; animation: wobble 2.6s ease-in-out infinite; }
.logo .w1 i { font-size: clamp(56px, 13vw, 120px); color: #fff; }
.logo .w2 i { font-size: clamp(66px, 16vw, 150px); color: var(--orange); }
.logo i:nth-child(odd) { rotate: -4deg; }
.logo i:nth-child(even) { rotate: 3deg; translate: 0 6px; }
.logo i:nth-child(1) { animation-delay: 0s; } .logo i:nth-child(2) { animation-delay: .15s; } .logo i:nth-child(3) { animation-delay: .3s; } .logo i:nth-child(4) { animation-delay: .45s; } .logo i:nth-child(5) { animation-delay: .6s; } .logo i:nth-child(6) { animation-delay: .75s; }
@keyframes wobble { 50% { transform: translateY(-8px); } }
.tagline { margin-top: 18px; font-size: clamp(18px, 3.4vw, 26px); font-weight: 600; background: var(--ink); color: #fff; display: inline-block; padding: 6px 18px; border-radius: 14px; transform: rotate(-2deg); }
.title-buttons { display: flex; flex-direction: column; gap: 14px; align-items: center; margin-top: 28px; }
.credits { margin-top: 26px; font-size: 15px; background: rgba(255,250,240,0.85); display: inline-block; padding: 6px 14px; border-radius: 12px; border: 2px solid var(--ink); }
#loading { position: absolute; inset: 0; display: grid; place-items: center; font-size: 28px; font-weight: 600; background: #9fd9d2; z-index: 40; padding: 20px; text-align: center; }
.noscript { position: absolute; inset: 0; display: grid; place-items: center; background: #fff; z-index: 50; font-size: 22px; }

/* ---------- small screens ---------- */
@media (max-width: 700px) {
  .pill { font-size: 14px; padding: 3px 10px; }
  .icon-btn { width: 34px; height: 34px; font-size: 15px; }
  .hint { top: 54px; font-size: 15px; padding: 7px 12px; }
  .timer { top: 100px; font-size: 16px; }
  .chart { top: 54px; width: min(240px, 58vw); padding: 16px 10px 6px; }
  .chart-row.complaint { font-size: 13px; }
  .chart-row { font-size: 14px; }
  .chart-note { font-size: 13px; }
  .tool { width: 62px; padding: 4px 2px; border-radius: 13px; }
  .tool svg { width: 32px; height: 32px; }
  .tool span { font-size: 10.5px; }
  .tray-row { gap: 5px; }
  .meters { top: 100px; right: 8px; }
  .meter { width: 150px; padding: 4px 8px 6px; }
  .meter.wide { width: 200px; }
  .meter.vertical { width: 62px; }
  .meter.vertical .meter-track { height: 130px; }
  .nurse-avatar { flex-basis: 48px; width: 48px; height: 48px; }
  .nurse-text { font-size: 15px; }
  .bubble { font-size: 15px; }
  .card { padding: 18px 16px 16px; }
  .card-title { font-size: 24px; }
  .card-body { font-size: 16px; }
  .howto li { font-size: 15px; }
  .vitals { top: 54px; font-size: 20px; }
  .btn.big { font-size: 20px; }
}

/* ---------- overlay panels (settings, achievements, accounts) ---------- */
.overlay { position: absolute; inset: 0; z-index: 45; display: grid; place-items: center; background: rgba(20,40,45,0.5); padding: 16px; overflow-y: auto; animation: fadeIn 0.18s; }
.overlay.hidden { display: none; }
.panel { width: min(520px, 100%); max-height: calc(100% - 8px); overflow-y: auto; padding-top: 20px; }
.panel-x { position: absolute; top: 10px; right: 12px; width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--ink); background: #fff; font-size: 16px; font-weight: 700; cursor: pointer; font-family: var(--font); color: var(--ink); z-index: 2; }
.btn.danger { background: #ff5d73; color: #fff; }
.link-btn { display: block; margin: 14px auto 0; background: none; border: none; font-family: var(--font); font-size: 15px; text-decoration: underline; cursor: pointer; color: var(--ink2); }
.link-btn.danger { color: #c21d3b; }
.secret-card { background: #fff6d6; background-image: radial-gradient(circle at 20% 10%, rgba(255,210,63,0.35), transparent 40%), radial-gradient(circle at 85% 90%, rgba(155,93,229,0.18), transparent 40%); }
.card-body ol.steps { text-align: left; margin: 8px 0; padding-left: 24px; }
.card-body ol.steps li { margin: 4px 0; }
.kbd { display: inline-block; border: 2px solid var(--ink); border-radius: 6px; padding: 0 6px; background: #fff; }

/* settings */
.set-list { text-align: left; display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff; border: 3px solid var(--ink); border-radius: 14px; padding: 7px 10px 7px 12px; min-height: 48px; }
.set-row.wide { flex-wrap: wrap; }
.set-label { font-weight: 600; font-size: 16px; white-space: nowrap; }
.set-row input[type=range] { flex: 1; max-width: 220px; accent-color: var(--orange); height: 28px; }
.seg { display: flex; border: 3px solid var(--ink); border-radius: 12px; overflow: hidden; }
.seg button { border: none; background: #fff; padding: 6px 10px; font-family: var(--font); font-size: 14px; font-weight: 600; cursor: pointer; color: var(--ink); }
.seg button + button { border-left: 2px solid var(--ink); }
.seg button.on { background: var(--teal); color: #fff; }
.toggle { width: 58px; height: 32px; border-radius: 16px; border: 3px solid var(--ink); background: #d9e2ec; position: relative; cursor: pointer; padding: 0; flex: 0 0 auto; }
.toggle i { position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid var(--ink); transition: left 0.15s; }
.toggle.on { background: var(--green); }
.toggle.on i { left: 28px; }
.code-row { display: flex; gap: 8px; flex: 1; min-width: 200px; }
.code-row input { flex: 1; min-width: 0; font-family: var(--font); font-size: 16px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; border: 3px solid var(--ink); border-radius: 10px; padding: 6px 10px; -webkit-user-select: text; user-select: text; }
.code-msg { font-size: 15px; text-align: center; min-height: 0; }
.code-msg:empty { display: none; }
.code-msg.ok { color: #11966a; }
.code-msg.no { color: #c21d3b; }
.version { margin-top: 10px; font-size: 13px; color: var(--ink2); cursor: default; }

/* achievements */
.ach-count { font-weight: 600; margin-bottom: 8px; }
.ach-list { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.ach { display: flex; gap: 10px; align-items: center; background: #f1f4f6; border: 2px solid #c9d3da; border-radius: 12px; padding: 6px 10px; opacity: 0.75; }
.ach.got { background: #fff; border: 3px solid var(--ink); opacity: 1; }
.ach-icon { font-size: 26px; width: 34px; text-align: center; filter: grayscale(1); }
.ach.got .ach-icon { filter: none; }
.ach-info b { display: block; font-size: 15px; }
.ach-info span { display: block; font-size: 13px; color: var(--ink2); line-height: 1.25; }

/* toasts */
.toasts { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 60; pointer-events: none; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { display: flex; gap: 10px; align-items: center; background: var(--ink); color: #fff; border: 3px solid var(--yellow); border-radius: 16px; padding: 8px 16px 8px 10px; box-shadow: 0 5px 0 rgba(0,0,0,0.3); animation: toastIn 0.35s cubic-bezier(.2,1.5,.4,1); transition: opacity 0.35s, transform 0.35s; }
.toast.out { opacity: 0; transform: translateY(-20px); }
.toast-icon { font-size: 30px; }
.toast small { display: block; font-size: 12px; color: var(--yellow); text-transform: uppercase; letter-spacing: 0.06em; }
.toast b { font-size: 17px; }
@keyframes toastIn { from { transform: translateY(-40px) scale(0.8); opacity: 0; } }

/* tabs, leaderboards, account */
.tabs { display: flex; gap: 6px; justify-content: center; margin: 4px 0 10px; }
.tab { font-family: var(--font); font-size: 15px; font-weight: 600; padding: 7px 14px; border-radius: 12px; border: 3px solid var(--ink); background: #fff; cursor: pointer; color: var(--ink); }
.tab.on { background: var(--orange); color: #fff; }
.lb-box { min-height: 120px; }
.lb { width: 100%; border-collapse: collapse; font-size: 16px; }
.lb td { padding: 6px 6px; border-bottom: 2px dashed #e0d7c3; text-align: left; }
.lb .rk { width: 40px; text-align: center; font-weight: 700; }
.lb .vl { text-align: right; font-weight: 700; white-space: nowrap; }
.lb .nm { word-break: break-all; }
.lb tr.me td { background: #fff3c4; }
.lb-msg { padding: 30px 10px; color: var(--ink2); }
.lb-foot { margin-top: 8px; font-size: 15px; }
.acct-form { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.acct-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 15px; }
.acct-form input { font-family: var(--font); font-size: 18px; border: 3px solid var(--ink); border-radius: 12px; padding: 8px 12px; -webkit-user-select: text; user-select: text; }
.acct-form .btn { align-self: center; margin-top: 4px; }
.form-err { color: #c21d3b; font-weight: 600; font-size: 15px; min-height: 0; }
.form-err:empty { display: none; }
.fine { font-size: 13px; color: var(--ink2); line-height: 1.35; margin: 4px 0 0; }
.acct-stats { display: flex; justify-content: space-around; margin: 6px 0 10px; }
.acct-stats b { display: block; font-size: 24px; }
.acct-stats span { font-size: 13px; color: var(--ink2); }
.pick-save { display: flex; gap: 10px; margin: 10px 0; }
.pick-save > div { flex: 1; background: #fff; border: 3px solid var(--ink); border-radius: 12px; padding: 8px; }
.pick-save b, .pick-save span { display: block; }

/* title extras */
.title-menu { display: flex; gap: 10px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.menu-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 82px; padding: 8px 4px 6px; border-radius: 16px; border: 3px solid var(--ink); background: rgba(255,250,240,0.95); box-shadow: 0 4px 0 var(--ink); cursor: pointer; font-family: var(--font); color: var(--ink); }
.menu-btn span { font-size: 24px; line-height: 1; }
.menu-btn small { font-size: 13px; font-weight: 600; max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.tagline { cursor: pointer; min-height: 1.4em; max-width: min(92vw, 640px); }
.tagline.flip { animation: tagFlip 0.36s ease-in-out; }
.tagline.fine { background: #6d2bb3; }
@keyframes tagFlip { 50% { transform: rotate(-2deg) scaleY(0); } }
.logo i { cursor: pointer; }
.logo i.boing { animation: boing 0.45s cubic-bezier(.2,1.8,.4,1); }
@keyframes boing { 40% { transform: translateY(-22px) scale(1.15); } }
.logo.upside { transform: rotate(180deg); transition: transform 0.8s cubic-bezier(.3,1.5,.4,1); }
.spk { cursor: pointer; display: inline-block; }
.spk.boing { animation: boing 0.35s; }
.taco { position: absolute; top: -60px; z-index: 40; pointer-events: none; animation: tacoFall 2.6s linear forwards; }
@keyframes tacoFall { to { transform: translateY(115vh) rotate(540deg); } }
.roach { position: absolute; bottom: 12px; left: -60px; z-index: 40; font-size: 38px; pointer-events: none; animation: roachRun 4s linear forwards; }
@keyframes roachRun { 0% { left: -60px; transform: scaleX(-1); } 45% { left: 55vw; transform: scaleX(-1) translateY(-6px); } 50% { left: 55vw; transform: scaleX(1); } 100% { left: 110vw; transform: scaleX(-1); } }
.summons .fine-print { margin-top: 10px; font-size: 9px; color: #b5a77a; font-family: Georgia, serif; line-height: 1.2; }
.fs-float { position: absolute; top: 60px; left: 50%; transform: translateX(-50%); z-index: 44; }

/* bigger text setting */
body.big-text .bubble { font-size: 22px; max-width: min(380px, 80vw); }
body.big-text .bubble-name { font-size: 14px; }
body.big-text .hint { font-size: 21px; }
body.big-text .nurse-text { font-size: 20px; }
body.big-text .card-body, body.big-text .howto li { font-size: 20px; }
body.big-text .chart-row { font-size: 18px; }
body.big-text .chart-row.complaint { font-size: 17px; }

/* phones held sideways: keep the top bar small so it is not in the way */
@media (max-height: 500px) and (orientation: landscape) {
  .hud { padding: max(4px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) 4px max(8px, env(safe-area-inset-left)); gap: 5px; }
  .pill { font-size: 13px; padding: 2px 9px; border-width: 2px; box-shadow: 0 2px 0 var(--ink); }
  .icon-btn { width: 30px; height: 30px; font-size: 14px; border-width: 2px; box-shadow: 0 2px 0 var(--ink); }
  .hint { top: 40px; font-size: 14px; padding: 5px 12px; }
  .meters { top: 74px; }
  .chart { top: 40px; }
  .vitals { top: 40px; }
  .timer { top: 40px; }
  .title-menu { margin-top: 10px; }
  .title-buttons { margin-top: 14px; gap: 10px; }
  .logo .w1 i { font-size: clamp(40px, 9vh, 80px); }
  .logo .w2 i { font-size: clamp(48px, 11vh, 96px); }
  .tagline { margin-top: 10px; }
  .credits { margin-top: 12px; }
  .menu-btn { width: 62px; padding: 4px 2px 3px; border-width: 2px; box-shadow: 0 3px 0 var(--ink); }
  .menu-btn span { font-size: 18px; }
  .menu-btn small { font-size: 11px; max-width: 58px; }
  .tagline { font-size: 16px; padding: 4px 12px; }
  .title-buttons .btn { font-size: 15px; padding: 6px 14px; }
  .title-buttons .btn.big { font-size: 18px; padding: 8px 22px; }
  .credits { font-size: 12px; padding: 3px 10px; }
  .title-buttons { flex-direction: row; justify-content: center; }
}

/* ---------- drawn icons ---------- */
svg.ic { display: inline-block; vertical-align: middle; overflow: visible; }
svg.ic.in { width: 1.2em; height: 1.2em; vertical-align: -0.25em; }
.card-icon svg { width: 60px; height: 60px; }
.shop-icon svg { width: 38px; height: 38px; }
.ach-icon svg { width: 32px; height: 32px; }
.toast-icon svg { width: 38px; height: 38px; }
.menu-btn span svg { width: 28px; height: 28px; }
.icon-btn svg { width: 22px; height: 22px; }
.note svg { width: 38px; height: 38px; }
.vitals .heart svg { width: 24px; height: 24px; vertical-align: -3px; }
.peek-hands .hand svg { width: min(48vh, 400px); height: min(48vh, 400px); }
.peek-hands .hand.r svg { transform: scaleX(-1); }
.tbtn svg { width: 42px; height: 42px; }
.taco svg { width: 100%; height: 100%; }
.roach { width: 52px; height: 52px; }
.roach svg { width: 100%; height: 100%; }
.pop.huge svg { width: 150px; height: 150px; }
.meter-ends svg { width: 24px; height: 24px; }
.lb .rk svg.rank { width: 30px; height: 30px; }
.summary .st svg { width: 17px; height: 17px; }
.summary .st .ic:nth-child(n) { margin-right: 1px; }
.btn svg.ic.in { margin-right: 2px; }
@media (max-width: 700px), (max-height: 500px) { .icon-btn svg { width: 17px; height: 17px; } .tbtn svg { width: 36px; height: 36px; } }

/* creator's secret guide */
.guide { text-align: left; }
.guide h3 { margin: 14px 0 6px; font-size: 17px; color: var(--teal-d); }
.g-item { background: #fff; border: 2px solid var(--ink); border-radius: 12px; padding: 6px 12px; margin: 6px 0; }
.g-item summary { font-weight: 700; cursor: pointer; }
.g-item p { margin: 6px 0 2px; font-size: 15px; line-height: 1.35; }
.menu-btn.creator { background: #fff3c4; }
.acct-stats { gap: 6px; }
.acct-stats b { font-size: 20px; }

/* keep edge UI clear of the iPhone notch and rounded corners (home-screen app, full screen) */
.hud { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
.chart, .vitals { left: max(14px, env(safe-area-inset-left)); }
.nurse { left: max(12px, env(safe-area-inset-left)); bottom: max(14px, env(safe-area-inset-bottom)); max-width: min(600px, calc(100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right))); }
.meters, .timer { right: max(14px, env(safe-area-inset-right)); }
.tray { bottom: max(12px, env(safe-area-inset-bottom)); }
.actions { bottom: max(16px, env(safe-area-inset-bottom)); }
.tbtn.left { left: max(20px, env(safe-area-inset-left)); }
.tbtn.right { left: calc(max(20px, env(safe-area-inset-left)) + 100px); }
.tbtn.jump { right: max(24px, env(safe-area-inset-right)); }
#title, .overlay { padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
@media (max-width: 700px) { .meters { right: max(8px, env(safe-area-inset-right)); } }
@media (max-height: 500px) and (orientation: landscape) {
  .hud { padding: max(4px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) 4px max(8px, env(safe-area-inset-left)); }
}
.summary-card .totals { flex-wrap: wrap; gap: 4px 10px; }
.bills { font-size: 13px; margin-top: 2px; }

/* new tools */
.scope-view { inset: 0; z-index: -1; }
.scope-view canvas { position: absolute; left: 0; top: 0; }
.bp-heart { width: 54px; height: 54px; align-self: flex-end; opacity: 0.35; transition: opacity 0.3s; }
.bp-heart svg { width: 100%; height: 100%; }
.bp-heart.on { animation: bpBeat 0.5s ease-out; }
@keyframes bpBeat { 0% { opacity: 1; transform: scale(1.35); } 100% { opacity: 0.35; transform: scale(1); } }
.tray-row { max-width: min(760px, calc(100vw - 30px)); margin: 0 auto; }

/* ---------- v1.5: folding tray and chart ---------- */
.tray-head { position: relative; display: flex; align-items: center; justify-content: center; padding: 0 30px; }
.tray-fold { position: absolute; right: -4px; top: -4px; width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--ink); background: #fff; display: grid; place-items: center; padding: 0; cursor: pointer; box-shadow: 0 2px 0 var(--ink); pointer-events: auto; }
.tray-fold svg.ic { width: 18px; height: 18px; transform: rotate(90deg); transition: transform 0.2s; }
.tray.min { padding: 6px 10px; cursor: pointer; }
.tray.min .tray-row { display: none; }
.tray.min .tray-title { margin-bottom: 0; }
.tray.min .tray-title::after { content: '  · tap to open'; text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--ink2); }
.tray.min .tray-fold svg.ic { transform: rotate(-90deg); }
.chart { pointer-events: auto; cursor: pointer; }
.chart.min { padding: 18px 12px 8px; }
.chart.min > :not(.chart-clip):not(.chart-title) { display: none; }
.chart.min .chart-title::after { content: ' (tap)'; color: var(--ink2); font-weight: 600; letter-spacing: 0; }
/* ---------- admin panel ---------- */
.admin-search { width: 100%; box-sizing: border-box; font: 600 17px var(--font); border: 3px solid var(--ink); border-radius: 12px; padding: 8px 12px; margin: 6px 0 8px; -webkit-user-select: text; user-select: text; }
.admin-list { max-height: min(46vh, 380px); overflow: auto; display: flex; flex-direction: column; gap: 6px; padding: 2px; }
.admin-user { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; font: 600 16px var(--font); color: var(--ink); background: #fff; border: 3px solid var(--ink); border-radius: 12px; padding: 8px 12px; cursor: pointer; box-shadow: 0 3px 0 var(--ink); }
.admin-user span { font-size: 13px; color: var(--ink2); font-weight: 600; white-space: nowrap; }
.admin-user.me { background: #fff6d6; }
.admin-who { font-size: 18px; margin: 4px 0 8px; }
.admin-label { font-weight: 700; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal-d); margin: 8px 0 4px; }
.admin-money, .admin-ups { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-ups .btn svg.ic { width: 20px; height: 20px; vertical-align: -4px; }
.admin-sum { margin: 10px 0 2px; font-weight: 700; font-size: 16px; }
.form-ok { color: var(--teal-d); font-weight: 700; min-height: 1.2em; margin-top: 6px; }
.gift-list { text-align: left; margin: 6px auto; padding-left: 20px; font-size: 18px; }
/* ---------- promotions ---------- */
.promo-rank { font-size: 30px; font-weight: 700; color: var(--teal-d); margin: 2px 0 6px; }
.perks { text-align: left; margin: 8px auto 0; padding-left: 22px; max-width: 420px; line-height: 1.35; }
.shop-rank { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin: -2px 0 6px; font-size: 17px; }
.shop-rank svg.ic { width: 24px; height: 24px; }
.shop-rank span { flex-basis: 100%; font-size: 13px; color: var(--ink2); }
.day-rank { font-weight: 700; color: var(--teal-d); margin: -4px 0 6px; }
.day-rank svg.ic { width: 22px; height: 22px; vertical-align: -5px; }
.pause-card .card-icon { cursor: pointer; }

/* bubbles that move out of the way during a procedure */
.bubble-dock { position: absolute; left: max(12px, env(safe-area-inset-left)); top: 62px; z-index: 6; display: flex; flex-direction: column; gap: 6px; max-width: min(300px, 40vw); pointer-events: none; }
.bubble.docked { position: relative; transform: none !important; max-width: 100%; font-size: 15px; padding: 6px 11px 7px; opacity: 0.94; }
.bubble.docked::before, .bubble.docked::after { display: none; }
.bubble.docked .bubble-name { font-size: 11px; }
@media (max-height: 420px) { .bubble-dock { max-width: min(260px, 36vw); } .bubble.docked { font-size: 13px; } }

/* tools listed on the patient chart */
.chart-tools { margin-top: 8px; background: #eef9f7; border: 2px solid var(--teal); border-radius: 10px; padding: 6px 8px; }
.chart-tools-title { font-weight: 700; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal-d); margin-bottom: 3px; }
.chart-tool { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 16px; padding: 2px 0; }
.chart-tool svg { width: 28px; height: 28px; flex: 0 0 28px; }
.chart-tool svg.ic.in { width: 18px; height: 18px; flex-basis: 18px; margin-left: auto; }
.chart-tool.done { opacity: 0.5; text-decoration: line-through; }
.chart-tool.now span { background: #fff1a8; border-radius: 6px; padding: 0 4px; }
@media (max-height: 420px) { .chart-tool { font-size: 13px; } .chart-tool svg { width: 22px; height: 22px; flex-basis: 22px; } }

/* admin panel v2 */
.admin-panel { max-width: min(620px, calc(100vw - 24px)); }
.admin-sections { max-height: min(52vh, 460px); overflow: auto; padding: 2px 4px; margin-top: 6px; text-align: left; }
.admin-sec { border-top: 2px dashed #d9e2ec; padding-top: 6px; margin-top: 8px; }
.admin-field { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 4px 0; }
.admin-field label { font-weight: 700; font-size: 14px; min-width: 104px; }
.admin-field input, .admin-select { font: 600 16px var(--font); border: 3px solid var(--ink); border-radius: 10px; padding: 5px 9px; width: 130px; -webkit-user-select: text; user-select: text; background: #fff; color: var(--ink); }
.admin-select { width: auto; max-width: 260px; }
.admin-row { margin: 4px 0; }
.admin-who { font-size: 20px; display: flex; flex-direction: column; align-items: center; }
.admin-who span { font-size: 14px; color: var(--teal-d); font-weight: 700; }
.admin-user.hid { opacity: 0.6; }
.admin-event { text-align: left; background: #fff6d6; border: 2px solid #d4a017; border-radius: 12px; padding: 6px 10px 10px; margin-bottom: 6px; }
.admin-event p { margin: 2px 0 6px; }
.btn.danger { background: #ffd6d6; }
.err { color: #c21d3b; }
.promo-num { font-weight: 700; color: var(--ink2); margin: -4px 0 6px; }
.promo-ups { text-align: left; margin: 8px auto 4px; max-width: 440px; display: flex; flex-wrap: wrap; gap: 6px 12px; }
.promo-ups b { flex-basis: 100%; }
.promo-ups span { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.promo-ups svg.ic { width: 22px; height: 22px; }
.boost { font-weight: 700; color: #b8860b; }
.tabs .tab { white-space: nowrap; }
/* blood pressure dial */
.bp-dial { width: 132px; height: 132px; margin: 0 0 6px auto; filter: drop-shadow(0 4px 0 rgba(29,43,54,0.9)); }
.bp-dial svg { width: 100%; height: 100%; display: block; }
@media (max-height: 420px) { .bp-dial { width: 104px; height: 104px; } }

/* bigger tap targets for secrets on phones */
.spk { padding: 8px; margin: -8px; touch-action: manipulation; }
.tagline, .logo i { -webkit-touch-callout: none; touch-action: manipulation; }
.logo { touch-action: none; }

/* your job, in the top bar */
.hud .pill.job { background: #fff8e1; max-width: 32vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 720px) { .hud .pill.job { display: none !important; } }
/* admin panel: player info, sub labels, on/off pairs */
.admin-info { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 12px; font-size: 14px; }
.admin-info div { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dashed rgba(29,43,54,0.15); padding: 2px 0; }
.admin-info span { color: #5b6b75; }
.admin-sub { font-size: 13px; color: #5b6b75; margin: 6px 0 2px; font-weight: 600; }
.admin-pair { display: inline-flex; gap: 2px; margin: 0 6px 6px 0; }
.admin-pair .btn:last-child { padding-left: 8px; padding-right: 8px; }
.admin-select.wide { width: 230px; max-width: 100%; }
.admin-field input[type="text"]::placeholder { color: #9aa6ad; font-weight: 500; }
