* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #1b1d22; color: #f3f1ea;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; touch-action: none; user-select: none; -webkit-user-select: none; }
#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }
.label { font-size: 11px; letter-spacing: .12em; opacity: .8; margin-bottom: 4px; font-weight: 700; }

#sweat { position: fixed; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background:
    radial-gradient(circle at 4% 10%, rgba(180,220,255,.55) 0 1.4%, transparent 1.6%),
    radial-gradient(circle at 96% 22%, rgba(180,220,255,.5) 0 1.1%, transparent 1.3%),
    radial-gradient(circle at 8% 70%, rgba(180,220,255,.5) 0 1.8%, transparent 2%),
    radial-gradient(circle at 92% 84%, rgba(180,220,255,.5) 0 1.5%, transparent 1.7%),
    radial-gradient(circle at 18% 4%, rgba(180,220,255,.45) 0 .9%, transparent 1.1%),
    radial-gradient(circle at 80% 6%, rgba(180,220,255,.45) 0 1.2%, transparent 1.4%),
    radial-gradient(circle at 3% 42%, rgba(180,220,255,.45) 0 1%, transparent 1.2%),
    radial-gradient(circle at 97% 55%, rgba(180,220,255,.45) 0 1.3%, transparent 1.5%); }
#vignette { position: fixed; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(120,0,0,.55) 100%); }

#hud { position: fixed; inset: 0; pointer-events: none; }
#sketch-wrap { position: absolute; top: 16px; left: 16px; width: min(260px, 44vw); }
#sketch-bar, #slip-bar, #cool-bar { height: 12px; background: rgba(0,0,0,.45); border-radius: 6px; overflow: hidden; position: relative; }
#sketch-fill { height: 100%; width: 0; background: linear-gradient(90deg, #6cc070, #e6c84a 50%, #e0533d); }
#item-wrap { position: absolute; top: 16px; right: 16px; width: min(200px, 40vw); text-align: right; }
#item-spot { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
#slip-fill { height: 100%; width: 0; background: #e0913d; float: right; }
#turn { position: absolute; top: 76px; left: 50%; transform: translateX(-50%); font-weight: 700; font-size: 15px;
  background: rgba(0,0,0,.45); padding: 6px 12px; border-radius: 8px; white-space: nowrap; }
#turn:empty, #prompt:empty, #toast:empty, #guard-says:empty, #cam-hint:empty { display: none; }
#prompt { position: absolute; bottom: 22%; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.6);
  padding: 8px 14px; border-radius: 8px; font-size: 15px; max-width: 90vw; text-align: center; }
#toast { position: absolute; top: 30%; left: 50%; transform: translateX(-50%); font-size: 20px; font-weight: 700;
  text-shadow: 0 2px 6px #000; text-align: center; max-width: 90vw; }
#crosshair { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: rgba(255,255,255,.7); }

#guardcam { position: fixed; inset: 0; pointer-events: none; }
#guardcam::before { content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.08) 0 2px, transparent 2px 4px); }
#rec { position: absolute; top: 16px; left: 16px; font-weight: 800; letter-spacing: .1em; font-family: ui-monospace, monospace; }
#rec .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #e0533d; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }
#cool-wrap { position: absolute; top: 16px; right: 16px; width: min(260px, 44vw); }
#cool-fill { height: 100%; width: 50%; background: #5fb8e8; }
#cool-line { position: absolute; top: 0; bottom: 0; left: 55%; width: 2px; background: #fff; }
#gaze { position: absolute; width: 22px; height: 22px; margin: -11px; border: 2px solid #fff; border-radius: 50%; }
#guard-says { position: absolute; top: 64px; left: 50%; transform: translateX(-50%); background: #f3f1ea; color: #1b1d22;
  padding: 10px 14px; border-radius: 12px; font-weight: 600; max-width: 86vw; text-align: center; }
#replies { position: absolute; bottom: 8%; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px;
  pointer-events: auto; width: min(460px, 92vw); }
#replies button { text-align: left; }
#cam-hint { position: absolute; bottom: 30%; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.6);
  padding: 6px 12px; border-radius: 8px; font-size: 14px; text-align: center; max-width: 90vw; }

button { font: inherit; font-weight: 700; font-size: 16px; padding: 10px 18px; border-radius: 10px; border: 0;
  background: #f0b429; color: #1b1d22; cursor: pointer; }
.screen { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px 16px; text-align: center; background: rgba(20,22,26,.92); overflow-y: auto; }
.screen h1 { font-size: clamp(32px, 8vw, 56px); margin: 0 0 4px; letter-spacing: .02em; }
.screen p { max-width: 560px; line-height: 1.45; margin: 8px 0; }
.sub { opacity: .7; margin-top: 0 !important; }
.keys { font-size: 14px; opacity: .85; margin: 14px 0 20px; line-height: 1.8; }
#found, #found2 { margin-top: 22px; font-size: 14px; max-width: 520px; width: 100%; }
.sol { display: flex; justify-content: space-between; padding: 6px 10px; border-bottom: 1px solid rgba(255,255,255,.1); }
.sol.locked { opacity: .45; }

#touch { position: fixed; inset: 0; pointer-events: none; }
#stick { position: absolute; left: 24px; bottom: 28px; width: 120px; height: 120px; border-radius: 50%;
  background: rgba(255,255,255,.12); pointer-events: auto; }
#nub { position: absolute; left: 40px; top: 40px; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.5); }
#tbuttons { position: absolute; right: 12px; bottom: 24px; display: grid; grid-template-columns: repeat(3, 64px); gap: 8px; pointer-events: auto; }
#tbuttons button { padding: 10px 0; font-size: 13px; background: rgba(240,180,41,.85); }
#cam-fix { position: absolute; right: 16px; bottom: 38%; pointer-events: auto; padding: 16px 20px; }
@media (min-width: 900px) {
  #replies { left: 24px; transform: none; bottom: 24px; width: 380px; }
}
