/* Sky Elevator (2026-11-07): full-screen canvas + kid-sized gauges. Flat bright cards, chunky buttons, nothing smaller than 13px. */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #9fdcff; font-family: "Trebuchet MS", "Comic Sans MS", Verdana, sans-serif;
  touch-action: none; -webkit-user-select: none; user-select: none; overscroll-behavior: none; }
#sky { position: fixed; inset: 0; display: block; touch-action: none; }
#topbar { position: fixed; top: calc(10px + env(safe-area-inset-top)); right: 14px; z-index: 8; display: flex; gap: 10px; }
.pillBtn { width: 56px; height: 56px; border: 0; border-radius: 50%; background: rgba(255,255,255,.88); color: #3b3f8f; font-size: 26px; cursor: pointer; box-shadow: 0 4px 0 rgba(0,0,0,.18); }
.pillBtn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,.18); }
.pillBtn.off { opacity: .45; }
.card { background: rgba(255,255,255,.93); border-radius: 20px; box-shadow: 0 5px 0 rgba(0,0,0,.16); color: #25304a; }
#gauges { position: fixed; left: 104px; top: calc(12px + env(safe-area-inset-top)); z-index: 6; display: flex; flex-direction: column; gap: 8px; width: 260px; }
#altCard { padding: 10px 14px 10px; }
.layerChip { display: inline-block; padding: 3px 12px; border-radius: 12px; color: #fff; font-weight: 900; font-size: 14px; letter-spacing: 1px; background: #ff9f5a; }
#altCard .big { font-size: 30px; font-weight: 900; margin-top: 4px; line-height: 1.05; }
#altCard .small { font-size: 14px; font-weight: 700; color: #5a6b8a; }
#aboutBtn { margin-top: 8px; border: 0; background: #ece7ff; color: #4b3fc0; font-family: inherit; font-weight: 900; font-size: 15px; border-radius: 14px; padding: 8px 12px; cursor: pointer; }
#gauges .row { display: flex; gap: 8px; }
.card.mini { padding: 6px 8px 8px; text-align: center; }
.card.mini b { display: block; font-size: 11px; letter-spacing: 1px; color: #5a6b8a; }
.card.mini span { display: block; font-size: 14px; font-weight: 900; }
#tempCard { flex: 1.6; } #airCard { flex: 1; }
#tempGraph { width: 150px; height: 110px; } #airJar { width: 90px; height: 90px; }
#ladder { position: fixed; right: 14px; top: 50%; transform: translateY(-40%); z-index: 6; display: flex; flex-direction: column-reverse; gap: 8px; }
.rung { min-width: 150px; min-height: 46px; border: 0; border-radius: 16px; color: #fff; font-family: inherit; font-weight: 900; font-size: 15px; padding: 6px 12px; text-align: left; cursor: pointer; box-shadow: 0 4px 0 rgba(0,0,0,.18); opacity: .82; }
.rung.on { opacity: 1; outline: 4px solid #fff; transform: scale(1.06); }
#ride { position: fixed; right: 14px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 6; display: flex; flex-direction: column; gap: 10px; }
.rideBtn { width: 72px; height: 72px; border: 0; border-radius: 50%; background: #ffd43b; color: #6b4a00; font-size: 30px; box-shadow: 0 6px 0 rgba(0,0,0,.2); cursor: pointer; }
.rideBtn:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0,0,0,.2); }
#noteBtn { position: fixed; left: 104px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 6; }
#wordLabel { position: fixed; left: 50%; top: 40%; transform: translate(-50%,-50%) scale(.6); opacity: 0; z-index: 7; pointer-events: none; padding: 14px 34px; border-radius: 30px;
  background: #fff; color: #25304a; font-size: clamp(28px, 6vmin, 56px); font-weight: 900; box-shadow: 0 6px 0 rgba(0,0,0,.18); transition: opacity .3s, transform .3s; white-space: nowrap; }
#wordLabel.show { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.pop { position: fixed; z-index: 20; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.pop.show { opacity: 1; pointer-events: auto; }
.x { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: #eef1f8; font-size: 18px; cursor: pointer; }
#thingCard { z-index: 20; left: 50%; bottom: calc(110px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); width: min(92vw, 560px); padding: 14px 54px 14px 14px; display: flex; gap: 12px; align-items: center; }
#thingCard.show { transform: translate(-50%, 0); }
#thingCard .ti { font-size: 52px; line-height: 1; }
#thingCard h3 { font-size: 22px; font-weight: 900; color: #4b3fc0; } #thingCard .h { font-weight: 800; color: #5a6b8a; font-size: 15px; } #thingCard .f { font-size: 18px; font-weight: 700; line-height: 1.3; margin-top: 4px; }
#layerCard { z-index: 20; left: 50%; top: 50%; transform: translate(-50%, -46%); width: min(94vw, 640px); max-height: 86vh; overflow-y: auto; padding: 18px 20px; }
#layerCard.show { transform: translate(-50%, -50%); }
#layerCard .head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; padding: 10px; border-radius: 16px; color: #fff; }
#layerCard .li { font-size: 46px; } #layerCard h2 { font-size: 28px; font-weight: 900; } #layerCard .say { font-weight: 800; opacity: .95; }
#layerCard .grid { display: flex; gap: 10px; margin-bottom: 10px; } #layerCard .grid > div { flex: 1; background: #f3f5fb; border-radius: 14px; padding: 8px 10px; }
#layerCard b { display: block; font-size: 15px; color: #4b3fc0; margin: 4px 0; } #layerCard p { font-size: 16px; font-weight: 700; }
#layerCard .things { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; } #layerCard .things span { background: #f3f5fb; border-radius: 12px; padding: 4px 10px; font-weight: 800; font-size: 15px; }
#layerCard .facts { list-style: none; } #layerCard .facts li { font-size: 17px; font-weight: 700; padding: 8px 10px 8px 44px; margin: 6px 0; background: #fff7e0; border-radius: 12px; position: relative; cursor: pointer; line-height: 1.3; }
#layerCard .facts li::before { content: '\1F50A'; position: absolute; left: 12px; top: 8px; }
#layerCard .nav { display: flex; justify-content: space-between; margin-top: 8px; position: sticky; bottom: -18px; background: #fff; padding: 8px 0 12px; } #layerCard .nav button { border: 0; border-radius: 14px; padding: 10px 16px; font-family: inherit; font-weight: 900; font-size: 16px; background: #ffd43b; color: #6b4a00; cursor: pointer; }
#notebook { left: 50%; top: 50%; transform: translate(-50%, -46%); width: min(94vw, 600px); max-height: 84vh; overflow-y: auto; padding: 18px 20px; }
#notebook.show { transform: translate(-50%, -50%); }
#notebook h2 { font-size: 26px; font-weight: 900; } #notebook .sub { font-weight: 700; color: #5a6b8a; margin-bottom: 10px; }
#notebook .list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
#notebook .nb { border: 0; border-radius: 14px; padding: 10px; background: #f3f5fb; font-family: inherit; font-weight: 800; font-size: 15px; text-align: left; cursor: pointer; color: #25304a; }
#notebook .nb.got { background: #e6fcf5; } #notebook .nb .e { font-size: 26px; display: block; } #notebook .nb.miss .e { filter: grayscale(1) opacity(.45); }
#handHint { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 5; padding: 12px 22px; border-radius: 22px; background: rgba(255,255,255,.92);
  font-weight: 900; color: #4b3fc0; font-size: clamp(16px, 2.6vmin, 22px); box-shadow: 0 4px 0 rgba(0,0,0,.15); transition: opacity .4s; white-space: nowrap; pointer-events: none; }
#handHint.gone { opacity: 0; }
/* window scenes hide every ride-only widget (the back pill is drawn on the canvas) */
body.in-scene #gauges, body.in-scene #ladder, body.in-scene #ride, body.in-scene #noteBtn { display: none; }
/* phones */
@media (max-width: 640px) {
  #topbar { right: 8px; gap: 6px; } .pillBtn { width: 46px; height: 46px; font-size: 21px; }
  #gauges { left: 66px; right: 8px; width: auto; top: calc(70px + env(safe-area-inset-top)); flex-direction: row; gap: 5px; }
  #gauges .row { gap: 5px; }
  #altCard { flex: 1; min-width: 0; padding: 6px 8px; cursor: pointer; } .layerChip { font-size: 11px; padding: 2px 8px; letter-spacing: .5px; }
  #altCard .big { font-size: 19px; } #altCard .small { font-size: 11px; } #aboutBtn { font-size: 12px; padding: 4px 8px; margin-top: 4px; }
  .card.mini { padding: 4px 5px 5px; } .card.mini b { font-size: 9px; letter-spacing: .5px; }
  #tempGraph { width: 74px; height: 54px; } #airJar { width: 46px; height: 46px; } .card.mini span { font-size: 11px; }
  #tempCard, #airCard { flex: none; } #airCard { width: 60px; }
  #ladder { right: 8px; top: auto; bottom: calc(190px + env(safe-area-inset-bottom)); transform: none; gap: 6px; }
  .rung { min-width: 0; width: 46px; min-height: 46px; padding: 0; text-align: center; font-size: 22px; }
  .rung .n { display: none; }
  .rideBtn { width: 60px; height: 60px; font-size: 24px; }
  #ride { right: 8px; } #noteBtn { left: 74px; }
  #handHint { white-space: normal; width: 62vw; left: 44%; text-align: center; font-size: 14px; bottom: calc(90px + env(safe-area-inset-bottom)); }
  #wordLabel { top: 42%; }
}
@media (prefers-reduced-motion: reduce) { .pop, #wordLabel { transition: none; } }
