/* Shared windows of the Puddlehold phone games (revision 11.11.2026, X-05 and X-09).
   Start and result windows look alike everywhere: gold title, an optional line below, short
   rules on parchment, one big start button. Only the middle scrolls on a short screen, so the
   buttons never slip out of view. The frame comes from Survivor's .panel or the menu's .phm-panel.
   Load order: ../css/style.css (if used), ../vendor/puddlehold-hud/menu.css, this file, the game's css.
   Jersey 10 is sharp only at 56/3 px and twice that, so only those two sizes are used. */
:root {
  /* the menu's tokens also outside .phm-menu, so a .phm-btn in a game window looks the same */
  --phm-wood: #6e3f1c; --phm-wood-dark: #3a2210; --phm-parch: #ead6a4; --phm-parch-hi: #fff5d0; --phm-parch-lo: #efd48f;
  --phm-gold: #ffd43a; --phm-ink: #2b1a0e; --phm-text: #fff6dc; --phm-muted: #eed9a8; --phm-leaf: #9be07a; --phm-brown: #6b4a22;
  --phm-btn-hi: #ffb64a; --phm-btn-lo: #ec8c22; --phm-red-hi: #e06a3c; --phm-red-lo: #b3361a;
  --phm-px: 18.667px; --phm-px2: 37.333px;
  --phm-outline: 1px 0 0 #2b1a0e, -1px 0 0 #2b1a0e, 0 1px 0 #2b1a0e, 0 -1px 0 #2b1a0e, 1px 1px 0 #2b1a0e, -1px 1px 0 #2b1a0e, 1px -1px 0 #2b1a0e, -1px -1px 0 #2b1a0e;
}

/* the window: <div class="panel hpanel"> (or "phm-panel hpanel", whose fixed menu height is undone here) with
   h2, .hsub, then .hscroll (art, .hhow, .hcard ...), then .hbtns */
.hpanel {
  width: min(380px, calc(100vw - 24px)); height: auto; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px);
  display: flex; flex-direction: column; align-items: center; gap: 6px; overflow: hidden; box-sizing: border-box;
  padding: 12px 14px; text-align: center; color: var(--phm-text); line-height: 1.15;
}
.hpanel, .hpanel * { font-size: var(--phm-rx, 16px); font-weight: 600; letter-spacing: 0; }
.hpanel h2 { margin: 4px 0 0; font-family: var(--title, 'Jersey 10', sans-serif); font-weight: 400; -webkit-font-smoothing: none; font-size: var(--phm-px2); line-height: 1; color: var(--phm-gold); text-shadow: var(--phm-outline); }
.hsub { margin: 0; white-space: pre-line; color: var(--phm-muted); text-shadow: var(--phm-outline); }
.hscroll {
  align-self: stretch; flex: 0 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
/* art row: 1x sprites shown at whole CSS pixels */
.hart { display: flex; justify-content: center; align-items: flex-end; gap: 2px; min-height: 57px; }
.hart img { image-rendering: pixelated; }
.hart img.flip { transform: scaleX(-1); }
/* parchment cards: rules (.hhow) and anything else (.hcard: best list, stats, receipt) */
.hhow, .hcard {
  margin: 0; align-self: stretch; white-space: pre-line; text-align: left; color: var(--phm-ink); line-height: 1.25;
  padding: 2px 6px; border: 12px solid transparent; border-image: url(../assets/herpderp/ui/parchment.png) 30 fill / 30px round;
}
.hcard h3 { margin: 0 0 2px; font-family: inherit; text-align: center; color: var(--phm-brown); line-height: 1; }
.hcard ol, .hcard ul { margin: 0; padding: 0 0 0 1.4em; }
.hcard .row { display: flex; justify-content: space-between; gap: 8px; }
.hcard .row b { color: var(--phm-brown); }
.hstars { display: flex; justify-content: center; gap: 6px; margin: 2px 0; }
.hstars img { width: 54px; height: 54px; image-rendering: pixelated; }
.hstars img.pop { animation: hpop .35s steps(4) both; }
@keyframes hpop { from { transform: scale(0); } 70% { transform: scale(1.25); } to { transform: scale(1); } }
/* buttons: the first is the main one (.phm-btn.phm-big), more are .phm-btn.phm-quiet */
.hbtns { flex: none; display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; margin: 2px 0 4px; max-width: 100%; }
.hbtns .phm-btn { font-family: inherit; max-width: 100%; white-space: normal; }
.hbtns .phm-btn.phm-big { order: -1; font-size: var(--phm-rx2, 22px); font-weight: 700; line-height: 1.1; } /* the main button comes first */
.hpanel input { font-family: inherit; padding: 2px 8px; min-height: 40px; text-align: center; color: var(--phm-ink);
  background: var(--phm-parch-hi); border: 3px solid var(--phm-ink); border-radius: 10px; }

/* landscape hint for games that only work upright (X-09, js/phone.js rotateHint) */
.pw-rotate { position: fixed; inset: 0; z-index: 950; display: grid; place-items: center; padding: 16px; background: #160d06; }
.pw-rotate[hidden] { display: none; }
.pw-rotate p {
  margin: 0; max-width: 360px; text-align: center; white-space: pre-line; color: var(--phm-ink); font-size: var(--phm-rx, 16px); line-height: 1.25;
  padding: 6px 10px; border: 12px solid transparent; border-image: url(../assets/herpderp/ui/parchment.png) 30 fill / 30px round;
}
