/* sauna.css — the inside of the sauna (sauna upgrade, owner 2026-10-11).
 *
 * Its own file so the sauna's presentation never collides with the Gym room's in
 * art.css. Everything is sized in art px (`--art-px`, set by artRoom's fluid stage),
 * so it scales with the scene. Colour literals are the skin's palette (palette.css)
 * written out, like art.css does, so nothing depends on load order.
 *
 * Motion rule, same as art.css: every animation sits inside
 * `prefers-reduced-motion: no-preference`; outside it the room is a still picture.
 */

/* ---- the screen: the scene top-aligned and full width, warm dark wood below ---- */
.sr-screen {
  position: relative; min-height: 100vh; background: #2a1c14;
  margin: calc(-1 * env(safe-area-inset-top)) 0 0;
}
.sr-scene .art-stage.fluid { background: #2a1c14; }
.art-room-sauna .art-canvas { background-color: #2a1c14; overflow: hidden; }

/* wooden plaques — the same wood as the Gym's top bar and the live pill */
.sr-plaque {
  position: absolute; z-index: 5;
  padding: 7px 13px; background: #c9975b; color: #3a2c23;
  border: 2px solid #3a2c23; border-radius: 4px;
  box-shadow: inset 0 2px 0 #ddb07a, inset 0 -2px 0 #8a5a35, 3px 3px 0 rgba(20, 12, 8, .5);
  font: inherit; font-size: 13px; font-weight: 800; letter-spacing: .5px;
  text-shadow: 0 1px 0 rgba(255, 233, 196, .55);
}
.sr-back {
  top: calc(env(safe-area-inset-top) + 10px); right: 10px;
  width: 40px; height: 40px; padding: 0; font-size: 18px; line-height: 1;
}
.sr-plaque:active { transform: translateY(1px); }

/* ---- decor layers (never take a tap: the room's hotspots own the hand) ---- */
.sr-glow, .sr-haze, .sr-burst { position: absolute; pointer-events: none; }
/* the fire window's warm light, spilling onto the floor boards */
.sr-glow {
  background: radial-gradient(ellipse 60% 55% at 62% 45%, rgba(255, 150, 70, .55), rgba(255, 120, 50, .18) 55%, transparent 75%);
  mix-blend-mode: screen; opacity: .8;
}
.sr-puff, .sr-cloud {
  position: absolute; display: block; border-radius: 50%;
  background: #f8f3e4; mix-blend-mode: screen; opacity: 0;
}
.sr-puff { width: calc(46 * var(--art-px)); height: calc(30 * var(--art-px)); filter: blur(calc(7 * var(--art-px))); }
.sr-puff0 { left: 4%;  top: 62%; }
.sr-puff1 { left: 40%; top: 72%; }
.sr-puff2 { left: 70%; top: 50%; }
.sr-puff3 { left: 22%; top: 30%; }
.sr-cloud { width: calc(58 * var(--art-px)); height: calc(52 * var(--art-px)); filter: blur(calc(5 * var(--art-px))); bottom: 0; }
.sr-cloud0 { left: 20%; } .sr-cloud1 { left: 38%; } .sr-cloud2 { left: 8%; }
.sr-cloud3 { left: 50%; } .sr-cloud4 { left: 28%; } .sr-cloud5 { left: 44%; }

@media (prefers-reduced-motion: no-preference) {
  @keyframes srFlicker {
    0%, 100% { opacity: .75; } 18% { opacity: .95; } 31% { opacity: .7; }
    52% { opacity: 1; } 67% { opacity: .78; } 83% { opacity: .9; }
  }
  .sr-glow { animation: srFlicker 2.6s steps(6, end) infinite; }

  /* heat haze: slow pale drifts across the benches, never in step with each other */
  @keyframes srDrift {
    0%   { opacity: 0;   transform: translate(0, 0) scale(.8); }
    30%  { opacity: .22; }
    70%  { opacity: .16; }
    100% { opacity: 0;   transform: translate(calc(18 * var(--art-px)), calc(-40 * var(--art-px))) scale(1.4); }
  }
  .sr-puff { animation: srDrift 9s ease-in-out infinite; }
  .sr-puff1 { animation-delay: -2.3s; animation-duration: 11s; }
  .sr-puff2 { animation-delay: -5.1s; animation-duration: 10s; }
  .sr-puff3 { animation-delay: -7.4s; animation-duration: 12s; }

  /* löyly: water on the stones — a cloud rolls up and spreads, once */
  @keyframes srBurst {
    0%   { opacity: 0;   transform: translateY(0) scale(.5); }
    15%  { opacity: 1; }
    100% { opacity: 0;   transform: translateY(calc(-120 * var(--art-px))) scale(2.4); }
  }
  .sr-burst.go .sr-cloud { animation: srBurst 2.4s cubic-bezier(.2, .6, .3, 1) 1 forwards; }
  .sr-burst.go .sr-cloud1 { animation-delay: .12s; }
  .sr-burst.go .sr-cloud2 { animation-delay: .25s; }
  .sr-burst.go .sr-cloud3 { animation-delay: .35s; }
  .sr-burst.go .sr-cloud4 { animation-delay: .5s; }
  .sr-burst.go .sr-cloud5 { animation-delay: .62s; }
}

/* ---- the door transition (an overlay over the Gym while it plays) ---- */
.sd-overlay { position: fixed; inset: 0; z-index: 65; pointer-events: none; }
.sd-hole {
  position: fixed; overflow: hidden; background: #2a1c14;
  box-shadow: 0 0 0 2px #3a2c23, 0 0 18px 4px rgba(255, 150, 70, .45);
}
.sd-holescene { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.sd-leaf {
  position: fixed; background-repeat: no-repeat; image-rendering: pixelated;
  backface-visibility: hidden; box-shadow: 2px 0 0 #3a2c23;
}
.sd-leaf.hinge-right { transform-origin: right center; }
.sd-leaf.hinge-left { transform-origin: left center; }
/* The doorway's copy of the scene holds every character on its first frame: the real
   screen starts its loops on that same frame, so the hand-off under the fading overlay
   can never show a person in two poses at once. */
.sd-holescene .art-sprite { animation: none !important; }

/* ================= the logging panel — "A · smoked glass" (owner's pick, step 4) =================
   Dark warm glass over the lower half of the scene: the room shows through, blurred,
   and the type is cream. Chips are dark wood; the chosen one is terracotta. Icons are
   pixel art at an integer 2x, so they stay crisp. */
.sp-panel {
  position: fixed; z-index: 20;
  left: 50%; bottom: calc(env(safe-area-inset-bottom) + 10px);
  width: min(calc(100% - 20px), 460px); transform: translateX(-50%);
  max-height: calc(100vh - 140px); overflow-y: auto; overscroll-behavior: contain;
  padding: 12px; color: #f8f3e4;
  background: linear-gradient(180deg, rgba(40, 22, 14, .58), rgba(28, 16, 10, .74));
  -webkit-backdrop-filter: blur(7px) saturate(1.15); backdrop-filter: blur(7px) saturate(1.15);
  border: 2px solid #3a2c23; border-radius: 6px;
  box-shadow: inset 0 1px 0 rgba(255, 214, 170, .22), inset 0 0 0 1px rgba(255, 190, 140, .08), 4px 4px 0 rgba(10, 6, 4, .55);
}
.sp-panel.editing { border-color: #c96f4a; }
.sp-pix { display: block; image-rendering: pixelated; }
.sp-lbl { font-size: 9.5px; font-weight: 900; letter-spacing: 1.4px; text-transform: uppercase; color: #e7b98a; }

.sp-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
/* the native date picker, invisible over its control, so a tap anywhere on it opens it */
.sp-datein { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.sp-cancel { padding: 0; background: none; border: none; color: #e7b98a; font-size: 11px; font-weight: 800; text-decoration: underline; }

.sp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.sp-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 8px; border-radius: 4px;
  background: rgba(255, 220, 180, .06); box-shadow: inset 0 0 0 1px rgba(255, 220, 180, .12); }
.sp-colhead { display: flex; gap: 8px; align-items: flex-start; }
.sp-colr { min-width: 0; }
.sp-thermo { position: relative; flex: 0 0 auto; touch-action: none; cursor: ns-resize; border-radius: 3px; }
.sp-thermo:focus-visible { outline: 2px solid #e7b98a; outline-offset: 2px; }
.sp-merc { position: absolute; background: #c8322a; box-shadow: inset -2px 0 0 #8e1d18; pointer-events: none; }
.sp-glass { flex: 0 0 auto; }

.sp-lblrow { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.sp-big { display: inline-flex; align-items: baseline; margin: 3px 0 6px; cursor: text; }
.sp-bignum {
  padding: 0; margin: 0; border: none; background: none; color: #f8f3e4; font: inherit;
  font-size: 26px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .35); -moz-appearance: textfield; appearance: textfield;
  border-bottom: 2px dashed rgba(231, 185, 138, .35);   /* says "you can type here" */
}
.sp-bignum:focus { outline: none; border-bottom-color: #e7b98a; }
.sp-bignum::-webkit-outer-spin-button, .sp-bignum::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sp-big small { font-size: 12px; font-weight: 800; margin-left: 2px; }

.sp-unit { display: inline-flex; }
.sp-unit button { padding: 2px 6px; font: inherit; font-size: 10px; font-weight: 900; background: #3d271a; color: #e7b98a; border: 1.5px solid #1f140d; }
.sp-unit button.on { background: #f8f3e4; color: #3a2c23; }


.sp-note { display: block; width: 100%; margin: 0 0 8px; padding: 8px; font: inherit; font-size: 13px; resize: vertical;
  color: #f8f3e4; background: rgba(255, 220, 180, .08); border: 1.5px solid rgba(255, 220, 180, .3); border-radius: 4px; }
.sp-note::placeholder { color: rgba(231, 185, 138, .7); }

.sp-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sp-acts.one { grid-template-columns: 1fr; }
.sp-btn { padding: 11px 6px; font: inherit; font-size: 14px; font-weight: 900; color: #f8f3e4;
  border: 2px solid #1f140d; border-radius: 4px; }
.sp-log { background: #3a5a40; box-shadow: inset 0 2px 0 #5f8565, inset 0 -2px 0 #24392a, 3px 3px 0 rgba(0, 0, 0, .4); }
.sp-live { background: #c96f4a; box-shadow: inset 0 2px 0 #e39572, inset 0 -2px 0 #8f3d22, 3px 3px 0 rgba(0, 0, 0, .4); }
.sp-delete { background: #4a2a1e; box-shadow: inset 0 2px 0 #6e4433, 3px 3px 0 rgba(0, 0, 0, .4); color: #ffb489; }
.sp-btn:active { transform: translateY(1px); }
.sp-log.done { background: #5f8565; }

.sp-week { display: flex; gap: 3px; align-items: flex-end; }
.sp-day { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 9px; font-weight: 900; color: #e7b98a; }
.sp-day.today { color: #ffb489; }
.sp-day.later { opacity: .45; }
.sp-link { padding: 0; background: none; border: none; font: inherit; font-size: 11px; font-weight: 800; color: #e7b98a; white-space: nowrap; }

.sp-hist { display: flex; flex-direction: column; gap: 5px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed rgba(255, 220, 180, .25); }
.sp-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; width: 100%; padding: 8px 9px; text-align: left;
  font: inherit; color: #f8f3e4; background: rgba(255, 220, 180, .06); border: 1px solid rgba(255, 220, 180, .14); border-radius: 4px; }
.sp-row.on { border-color: #c96f4a; background: rgba(201, 111, 74, .18); }
.sp-rdate { font-size: 11px; font-weight: 700; color: #e7b98a; min-width: 82px; }
.sp-rmain { font-size: 13px; font-weight: 800; }
.sp-redit { margin-left: auto; font-size: 10.5px; font-weight: 800; color: #e7b98a; }
.sp-rnote { flex: 1 0 100%; font-size: 11px; font-style: italic; color: rgba(248, 243, 228, .75); }
.sp-empty { font-size: 12px; font-style: italic; color: #e7b98a; }

/* ---- the live session (step 5) ---- */
.sp-panel.live { border-color: #c96f4a; }
.sp-livetag { font-size: 11px; font-weight: 900; letter-spacing: 1.5px; color: #ff9a6b; }
.sp-livesub { font-size: 11px; font-weight: 800; color: #e7b98a; }
.sp-face { display: flex; align-items: center; gap: 14px; margin: 12px 4px 12px; }
.sp-bigglass { position: relative; flex: 0 0 auto; }
.sp-bigglass img { position: absolute; inset: 0; width: 100%; height: 100%; }
.sp-glassend { opacity: 0; transition: opacity 1s linear; }
.sp-readout { min-width: 0; }
.sp-clock { font-size: 46px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums;
  color: #f8f3e4; text-shadow: 0 3px 0 rgba(0, 0, 0, .35); }
.sp-clock.over { color: #ff9a6b; }
.sp-of { margin-top: 6px; font-size: 11.5px; font-weight: 800; color: #e7b98a; line-height: 1.35; }
.sp-plus { background: #5b3a25; box-shadow: inset 0 2px 0 rgba(255, 210, 160, .25), inset 0 -2px 0 #3d271a, 3px 3px 0 rgba(0, 0, 0, .4); }
.sp-discard { display: block; margin: 9px auto 0; }
.sp-hint { margin-top: 10px; font-size: 10.5px; line-height: 1.45; color: rgba(248, 243, 228, .7); }
.sp-ask { padding: 10px; border-radius: 4px; background: rgba(201, 111, 74, .16); box-shadow: inset 0 0 0 1px rgba(255, 154, 107, .45); }
.sp-asktitle { margin-bottom: 9px; font-size: 13px; font-weight: 800; line-height: 1.35; }
@media (prefers-reduced-motion: no-preference) {
  @keyframes spDing { 0%, 100% { box-shadow: inset 0 1px 0 rgba(255, 214, 170, .22), 4px 4px 0 rgba(10, 6, 4, .55); }
    50% { box-shadow: inset 0 0 0 3px #ff9a6b, 4px 4px 0 rgba(10, 6, 4, .55); } }
  .sp-panel.sp-ding { animation: spDing .5s ease-out 3; }
}

/* ---- the iPhone timer setup ---- */
.sp-copy { margin: 10px 0 8px; font-size: 12px; line-height: 1.5; }
.sp-steps { margin: 0 0 10px; padding-left: 20px; font-size: 12px; line-height: 1.5; }
.sp-steps li + li { margin-top: 3px; }
.sp-namerow { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.sp-namein { padding: 8px; font: inherit; font-size: 13px; color: #f8f3e4;
  background: rgba(255, 220, 180, .08); border: 1.5px solid rgba(255, 220, 180, .3); border-radius: 4px; }

/* ================= second review (owner, 2026-10-12) ================= */

/* top row: this week's doors, then the day */
.sp-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; min-height: 44px; }
.sp-edithead { display: flex; flex-direction: column; gap: 4px; }
/* the date: step arrows (owner's pick of three) */
.sp-dmid b { font-size: 12.5px; font-weight: 900; color: #f8f3e4; }
.sp-dmid span { font-size: 10.5px; font-weight: 800; color: #e7b98a; }
.sp-dstep { display: flex; align-items: stretch; height: 42px; box-sizing: border-box;   /* = a door */
  border: 1.5px solid #1f140d; border-radius: 4px; overflow: hidden; box-shadow: 0 2px 0 rgba(0, 0, 0, .35); }
.sp-darrow { width: 30px; padding: 0; font: inherit; font-size: 18px; font-weight: 900; color: #f8f3e4; background: #5b3a25; border: none; }
.sp-darrow:disabled { color: rgba(248, 243, 228, .25); }
.sp-dmid { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 62px; padding: 4px 6px; line-height: 1.15; background: #3d271a; cursor: pointer; }

/* the ruler: a numbered tape you slide under a fixed ▼ marker (owner's pick) */
/* margin-top:auto pins each ruler to the foot of its box, and the two boxes share a
   row height, so the heat and time rulers sit on one line (owner) */
.sp-ruler { position: relative; height: 34px; margin-top: auto; overflow: hidden; touch-action: none; cursor: grab;
  background: #2a1a10; border: 1.5px solid #1f140d; border-radius: 4px;
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, .35), 0 1px 0 rgba(255, 210, 160, .15);
  /* the ends fade, so the tape reads as running on past them */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); }
.sp-ruler.grab { cursor: grabbing; }
.sp-ruler:focus-visible { outline: 2px solid #e7b98a; outline-offset: 2px; }
.sp-tape { position: absolute; inset: 0; pointer-events: none; }
.sp-tape i { position: absolute; top: 0; width: 2px; height: 5px; margin-left: -1px; background: rgba(231, 185, 138, .4); }
.sp-tape i.mid { height: 8px; background: rgba(231, 185, 138, .6); }
.sp-tape i.big { height: 11px; background: #e7b98a; }
.sp-tape b { position: absolute; bottom: 3px; transform: translateX(-50%); font-size: 10px; font-weight: 900;
  color: #f8f3e4; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* the fixed marker: a terracotta pixel ▼ with a hairline down the middle */
.sp-marker { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #c96f4a; pointer-events: none; }
.sp-marker::before { content: ''; position: absolute; left: 50%; top: 0; transform: translateX(-50%);
  border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 7px solid #ff9a6b; }

/* "Start time": small, under the time, above the dial (owner) */
.sp-starttime { display: inline-block; margin-top: 2px; padding: 3px 8px; font: inherit; font-size: 11px; font-weight: 900;
  color: #f8f3e4; background: #c96f4a; border: 1.5px solid #1f140d; border-radius: 3px;
  box-shadow: inset 0 1px 0 #e39572, 0 2px 0 rgba(0, 0, 0, .35); }
.sp-starttime:active { transform: translateY(1px); }

/* ＋ Add a note — where "Same as last time" used to be */
.sp-addnote { width: 100%; margin: 0 0 8px; padding: 9px; font: inherit; font-size: 12px; font-weight: 800; color: #e7b98a;
  background: rgba(255, 220, 180, .06); border: 1.5px dashed rgba(255, 220, 180, .35); border-radius: 4px; }

/* history + the iPhone timer: real buttons with pixel icons */
.sp-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.sp-tools.one { grid-template-columns: 1fr; }
.sp-tool { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 6px 8px;
  font: inherit; font-size: 12px; font-weight: 800; color: #f8f3e4; white-space: nowrap;
  background: #3d271a; border: 1.5px solid #1f140d; border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 210, 160, .2), 0 2px 0 rgba(0, 0, 0, .4); }
.sp-tool:active { transform: translateY(1px); }
