/* Pocket Hoard: paper-cut cave. Soot, clay, ember orange, coin gold, bone text. */
:root{--soot:#17100c;--umber:#2b1e17;--clay:#4a3224;--ember:#ff7a2f;--gold:#f2c14e;--bone:#efe3c8;--dim:#b8a888;--red:#c8452b}
.ph{position:relative;color:var(--bone);font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;margin:0 auto}
.ph button{font-family:inherit;color:inherit;touch-action:manipulation;-webkit-tap-highlight-color:transparent;cursor:pointer}
.ph button:focus-visible{outline:3px solid var(--gold);outline-offset:2px}
.ph-hud{display:flex;align-items:center;gap:8px;min-height:48px;padding:2px 0}
.ph-gold{display:flex;align-items:center;gap:6px;min-width:76px;font-size:1.25rem;font-weight:800;color:var(--gold)}
.ph-gold .coin{width:18px;height:18px;border-radius:50%;background:var(--gold);box-shadow:inset -3px -3px 0 #b9852c,2px 2px 0 rgba(0,0,0,.45);flex:none}
.ph-raidbox{flex:1;display:flex;flex-direction:column;line-height:1.15;min-width:0}
.ph-raidbox b{font-size:1rem}
.ph-raidbox span{font-size:.78rem;color:var(--dim)}
.ph-hbtn{min-height:44px;min-width:56px;padding:0 10px;border:0;border-radius:8px;background:var(--clay);font-size:.78rem;font-weight:700;box-shadow:0 3px 0 #0e0907}
.ph-hbtn:active{transform:translateY(2px);box-shadow:0 1px 0 #0e0907}
.ph-bars{display:grid;grid-template-columns:3fr 2fr;gap:8px;margin:2px 0 8px}
.bar{position:relative;height:16px;background:#0e0907;border-radius:4px;overflow:hidden}
.bar i{position:absolute;inset:0;transform-origin:left center;transform:scaleX(1);background:var(--red);transition:transform .12s linear}
.bar.heat i{background:var(--ember)}
.bar.hot i{background:#6a5a4a}
.bar.low{animation:ph-pulse .8s infinite alternate}
.bar span{position:absolute;left:6px;top:0;font-size:.62rem;line-height:16px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--bone);text-shadow:0 1px 0 #000}
.ph-field{position:relative;margin:0 auto;border-radius:6px;overflow:hidden;background:var(--umber);box-shadow:0 0 0 3px #0e0907,0 6px 0 3px #0e0907}
.ph-field canvas{display:block;touch-action:none;cursor:crosshair}
.ph-tip{position:absolute;left:8px;right:8px;top:30px;padding:8px 10px;border-radius:6px;background:rgba(23,16,12,.88);border-left:4px solid var(--gold);font-size:.88rem;font-weight:600;pointer-events:none}
.ph-bar{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;margin-top:14px}
.ph-up{min-height:58px;padding:4px 2px;border:0;border-radius:8px;background:var(--clay);box-shadow:0 4px 0 #0e0907;display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1.2;opacity:.72}
.ph-up .n{font-size:.76rem;font-weight:800}
.ph-up .l{font-size:.64rem;color:var(--dim)}
.ph-up .c{font-size:.8rem;font-weight:800;color:var(--gold)}
.ph-up.can{opacity:1;background:#6a4528;box-shadow:0 4px 0 #0e0907,inset 0 0 0 2px var(--gold)}
.ph-up:active{transform:translateY(3px);box-shadow:0 1px 0 #0e0907}
.ph-ov{position:absolute;inset:0;overflow-y:auto;background:rgba(23,16,12,.94);-webkit-overflow-scrolling:touch;user-select:text;-webkit-user-select:text}
.ph-ov[hidden],.ph-tip[hidden],#ph-call[hidden]{display:none}
.ph-call{position:absolute;right:8px;bottom:8px;min-height:44px;min-width:92px;padding:0 12px;border:0;border-radius:22px;background:var(--ember);color:#1a0d05;font-size:.82rem;font-weight:800;box-shadow:0 4px 0 #8a3510;z-index:2}
.ph-call:active{transform:translateY(3px);box-shadow:0 1px 0 #8a3510}
.ph-call small{display:block;font-size:.62rem;font-weight:700;opacity:.8}
.ph-streak{color:var(--ember)!important;font-weight:700}
.ph-goal{background:#0e0907;border-radius:8px;padding:8px 10px;color:var(--gold)!important;font-weight:600}
.ph-ov .card{padding:16px 14px 20px;text-align:center}
.ph-ov h2{font-size:1.9rem;letter-spacing:.02em;color:var(--gold);text-shadow:3px 3px 0 #0e0907;margin-bottom:6px}
.ph-ov h3{font-size:.85rem;text-transform:uppercase;letter-spacing:.06em;color:var(--dim);margin:14px 0 6px;display:flex;justify-content:space-between}
.ph-ov .em{color:var(--ember)}
.ph-ov p{font-size:.88rem;line-height:1.4;color:var(--bone);margin:6px 0}
.ph-ov .best,.ph-ov .party{color:var(--dim);font-size:.78rem}
.ph-go{display:block;width:100%;min-height:52px;margin:10px 0 0;border:0;border-radius:10px;background:var(--ember);color:#1a0d05;font-size:1.15rem;font-weight:800;box-shadow:0 5px 0 #8a3510}
.ph-go.alt{background:var(--clay);color:var(--bone);font-size:.95rem;box-shadow:0 5px 0 #0e0907;min-height:48px}
.ph-go small{display:block;font-size:.7rem;font-weight:600;color:var(--dim)}
.ph-go:active{transform:translateY(3px)}
.res{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:10px 0}
.res div{background:#0e0907;border-radius:8px;padding:8px 2px}
.res b{display:block;font-size:1.4rem;color:var(--gold)}
.res small{font-size:.66rem;color:var(--dim)}
.earn{color:var(--ember)!important;font-weight:700}
.perms{display:grid;gap:6px}
.ph-perm{display:grid;grid-template-columns:1fr auto;gap:0 8px;align-items:center;text-align:left;min-height:48px;padding:6px 10px;border:0;border-radius:8px;background:var(--clay);opacity:.7}
.ph-perm.can{opacity:1;box-shadow:inset 0 0 0 2px var(--gold)}
.ph-perm b{font-size:.88rem}
.ph-perm small{grid-column:1;font-size:.7rem;color:var(--dim)}
.ph-perm i{grid-row:1/3;grid-column:2;font-style:normal;font-weight:800;font-size:.8rem;color:var(--ember)}
.cols{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}
.ph-col{min-height:62px;border:0;border-radius:8px;background:var(--clay);padding:6px 0;display:flex;flex-direction:column;align-items:center;gap:4px;opacity:.75}
.ph-col.on{opacity:1;box-shadow:inset 0 0 0 3px var(--bone)}
.ph-col.can{opacity:1;box-shadow:inset 0 0 0 2px var(--gold)}
.ph-col .sw{width:26px;height:26px;border-radius:50%;border:4px solid}
.ph-col small{font-size:.62rem}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
@keyframes ph-pulse{from{opacity:1}to{opacity:.55}}
@media (prefers-reduced-motion:reduce){.bar i,.ph-up,.ph-go{transition:none}.bar.low{animation:none}}
@media (max-width:340px){.ph-hbtn{min-width:48px;padding:0 6px}.ph-gold{min-width:60px}}

/* Full screen: the stage is a flex column, the field takes what is left, the canvas is the largest 9:12 fit. */
html.pip-immersive .facts,html.pip-native .facts,html.pip-immersive .how,html.pip-native .how,html.pip-immersive .pip-actions,html.pip-native .pip-actions,html.pip-immersive .ad-well,html.pip-immersive footer,html.pip-immersive #similar-games,html.pip-immersive .game-title,html.pip-native .game-title{display:none!important}
html.pip-immersive .game-wrap.pip-stage,html.pip-native .game-wrap.pip-stage{display:flex;flex-direction:column;overflow:hidden;padding:4px max(4px,env(safe-area-inset-right)) max(4px,env(safe-area-inset-bottom)) max(4px,env(safe-area-inset-left))}
html.pip-immersive .ph,html.pip-native .ph{flex:1;min-height:0;width:100%;max-width:none;margin:0;display:flex;flex-direction:column}
html.pip-immersive .ph-field,html.pip-native .ph-field{flex:1;min-height:0;width:auto;align-self:stretch;background:transparent;box-shadow:none;border-radius:0;overflow:visible}
html.pip-immersive .ph-field canvas,html.pip-native .ph-field canvas{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);border-radius:6px;box-shadow:0 0 0 3px #0e0907,0 8px 24px rgba(0,0,0,.5)}
html.pip-immersive .ph-up,html.pip-native .ph-up{min-height:52px}
html.pip-immersive .ph-bar,html.pip-native .ph-bar{margin-top:6px}
html.pip-immersive .ph-hud,html.pip-native .ph-hud{min-height:44px;padding:0}
html.pip-immersive .ph-bars,html.pip-native .ph-bars{margin:2px 0 6px}
html.pip-immersive .ph-up,html.pip-native .ph-up{padding:2px}
@media (orientation:landscape) and (max-height:520px){
  html.pip-immersive .ph,html.pip-native .ph{display:grid;grid-template-columns:minmax(0,1fr) minmax(210px,300px);grid-template-rows:auto auto 1fr;column-gap:12px}
  html.pip-immersive .ph-field,html.pip-native .ph-field{grid-column:1;grid-row:1/5}
  html.pip-immersive .ph-hud,html.pip-native .ph-hud{grid-column:2;grid-row:1}
  html.pip-immersive .ph-bars,html.pip-native .ph-bars{grid-column:2;grid-row:2}
  html.pip-immersive .ph-bar,html.pip-native .ph-bar{grid-column:2;grid-row:3;margin-top:4px;grid-template-columns:1fr 1fr 1fr;align-content:start}
  html.pip-immersive .ph-up,html.pip-native .ph-up{min-height:48px}
}
/* On a phone, keep the playfield high: the how-to copy stays below the game. */
