: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%; }
.bubble::after { content: ''; position: absolute; bottom: -13px; left: var(--tail); width: 18px; height: 18px; background: #fff; border-right: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: translateX(-50%) rotate(45deg) translateY(-50%); transform-origin: center; margin-bottom: 4px; }
.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 { background: #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 { font-size: 54px; color: #d5dde3; -webkit-text-stroke: 3px var(--ink); line-height: 1; }
.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-guide::after { content: '↻'; position: absolute; right: -14px; top: -16px; font-size: 32px; color: var(--yellow); text-shadow: 0 2px 0 var(--ink); }
@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; 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; }
}
