/* Patient kiosk - layout (palette + primitives from ../theme.css) */
body{display:flex;flex-direction:column;overflow:hidden;user-select:none;touch-action:manipulation;
  padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}

#bar{display:flex;align-items:center;justify-content:space-between;padding:18px 26px 8px;border-bottom:0}
#bedLabel{font-weight:700;font-size:20px}
#lead{margin:0 26px 6px;color:var(--muted);font-size:16px}

#grid{flex:1;display:grid;gap:16px;padding:14px 22px 24px;grid-template-columns:repeat(2,1fr);align-content:stretch}
.tile{border:1px solid var(--border);border-radius:20px;background:var(--card);color:var(--text);
  font-size:clamp(18px,3vw,24px);font-weight:600;cursor:pointer;box-shadow:var(--shadow);
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;min-height:118px;padding:18px;
  transition:transform .06s ease,box-shadow .12s,background .12s,border-color .12s}
.tile .ico{width:64px;height:64px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  color:var(--primary);background:var(--primary-050)}
.tile .ico svg{width:34px;height:34px}
.tile .lbl{text-align:center;line-height:1.2}
.tile:active{transform:scale(.97);box-shadow:var(--shadow-lg)}
.tile.pending{border-color:var(--primary);background:var(--primary-050)}
.tile.bedpick .lbl{font-size:20px}
.tile.emergency{grid-column:1 / -1;flex-direction:row;gap:18px;background:var(--emergency);border-color:var(--emergency);color:#fff;min-height:104px;font-size:clamp(20px,3.6vw,28px)}
.tile.emergency .ico{background:rgba(255,255,255,.2);color:#fff;width:60px;height:60px}
.tile.emergency .ico svg{width:32px;height:32px}

/* status overlay */
#status{position:fixed;inset:0;background:rgba(22,26,35,.55);display:flex;align-items:center;justify-content:center;padding:24px}
#statusCard{background:var(--card);border-radius:24px;padding:40px;max-width:520px;text-align:center;width:100%;box-shadow:var(--shadow-lg)}
#statusIcon{width:84px;height:84px;border-radius:50%;background:var(--ok);color:#fff;display:flex;align-items:center;justify-content:center;font-size:32px;font-weight:800;margin:0 auto 18px}
#statusCard.responding #statusIcon{background:var(--primary)}
#statusCard.waiting #statusIcon{background:var(--warn)}
#statusTitle{margin:.2em 0;font-size:25px}
#statusDetail{color:var(--muted);min-height:1.4em}
#statusDone{margin-top:22px;border:1px solid var(--border);border-radius:14px;background:var(--card);color:var(--text);font-size:18px;padding:14px 32px;cursor:pointer}
#statusDone:hover{background:var(--surface2)}

/* deliberate exit affordance */
#exitHot{position:fixed;top:0;left:0;width:84px;height:84px;z-index:50}
#exitRing{position:absolute;inset:14px;border-radius:50%;border:3px solid transparent;transition:border-color .2s}
#exitHot.holding #exitRing{border-color:rgba(60,79,253,.3);animation:fill 3s linear forwards}
@keyframes fill{to{border-color:var(--primary);transform:rotate(360deg)}}
#exitSheet{position:fixed;inset:0;background:rgba(22,26,35,.45);display:flex;align-items:flex-end;justify-content:center;z-index:60}
.sheet{background:var(--card);border-radius:24px 24px 0 0;padding:28px;max-width:560px;width:100%;text-align:center;box-shadow:var(--shadow-lg)}
.sheet h2{margin:.2em 0}
.sheet p{color:var(--muted)}
.row{display:flex;gap:12px;margin-top:18px}
.row button{flex:1;border:1px solid var(--border);border-radius:14px;font-size:18px;padding:16px;cursor:pointer;background:var(--card);color:var(--text)}
.row .danger{background:var(--emergency);border-color:var(--emergency);color:#fff;font-weight:700}
.exited{height:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:14px;color:var(--muted);text-align:center}
