/* pyramid-solitaire polish: fit the rack to the phone, match guide, coach, result extras. */
body.pyramid-depth-art { --py-art-rack: 100%; }
body.pyramid-depth-art .ps-depth-rack-scroll { overflow-x: visible; padding: 4px 0; }
.ps-card.ps-match { box-shadow: 0 0 0 3px #38bdf8, 0 0 12px 2px #38bdf899, 0 4px 8px #0006 !important; animation: ps-match-pulse 1.1s ease-in-out infinite; }
@keyframes ps-match-pulse { 50% { transform: translateY(-4%); } }
.ps-card.open:not(.sel):not(.ps-match) { cursor: pointer; }
#ps-coach { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; padding: 8px 10px; border-radius: 10px; background: #fff7e0; color: #4a3410; border: 1px solid #d8b574; font-size: .9375rem; line-height: 1.4; }
#ps-coach[hidden] { display: none; }
#ps-coach span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
#ps-coach button { min-width: 44px; min-height: 44px; border: 0; border-radius: 8px; background: #b45309; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.ps-over-extra { margin: 8px 0 0; padding-top: 8px; border-top: 1px solid #0002; font-size: .875rem; line-height: 1.5; }
.ps-over-extra[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .ps-card.ps-match { animation: none; } }
/* Finish: felt weave, card sheen, softer lift. */
.ps-table { background-image: radial-gradient(120% 90% at 50% 0, #1a8a47 0, #14532d 62%, #0c3320 100%), repeating-linear-gradient(45deg, #ffffff08 0 2px, transparent 2px 5px); box-shadow: inset 0 0 0 2px #0b2e19, inset 0 0 40px #0008, 0 8px 22px #0f172a40; }
.ps-card.open { background-image: linear-gradient(155deg, #fff 0, #fff 55%, #eef2f7 100%); }
.ps-card.open:not(.sel):hover { transform: translateY(-3%); }
.ps-card { transition: transform .18s cubic-bezier(.3,.7,.4,1), box-shadow .18s ease, filter .18s ease, opacity .18s; }

/* Full screen: fit the table to the stage, hide intro and ad chrome, no scroll. */
html.pip-immersive .game-wrap.pip-stage, html.pip-native .game-wrap.pip-stage { display: flex; flex-direction: column; align-items: center; overflow: hidden; padding-left: 10px; padding-right: 10px; padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); gap: 6px; }
html.pip-native .game-wrap.pip-stage { padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
html.pip-immersive .pip-stage > :is(.ps-how, .hd-about, .ps-planner, .pip-actions, .game-title, .facts),
html.pip-native .pip-stage > :is(.ps-how, .hd-about, .ps-planner, .pip-actions, .game-title, .facts) { display: none; }
html.pip-immersive .pip-stage > :is(.hud, .ps-modes, .ps-stats, #status, .ps-table),
html.pip-native .pip-stage > :is(.hud, .ps-modes, .ps-stats, #status, .ps-table) { width: 100%; max-width: 480px; margin-top: 0; margin-bottom: 0; flex: none; }
html.pip-immersive .pip-stage > .ps-table, html.pip-native .pip-stage > .ps-table { width: min(100%, calc((var(--pip-vvh, 100dvh) - 330px) / 1.05)); min-width: 220px; }
html.pip-immersive .pip-stage > #status:empty, html.pip-native .pip-stage > #status:empty { display: none; }
html.pip-immersive .pip-stage .ps-modes button, html.pip-native .pip-stage .ps-modes button { min-height: 44px; }
@media (orientation: landscape) and (max-height: 520px) {
  html.pip-immersive .game-wrap.pip-stage, html.pip-native .game-wrap.pip-stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(190px, 260px); grid-auto-rows: min-content; align-content: start; column-gap: 14px; align-items: start; justify-items: stretch; }
  html.pip-immersive .pip-stage > .ps-table, html.pip-native .pip-stage > .ps-table { grid-column: 1; grid-row: 1 / span 6; justify-self: center; width: min(100%, calc((var(--pip-vvh, 100dvh) - 100px) / 1.05)); min-width: 0; }
  html.pip-immersive .pip-stage > :is(.hud, .ps-modes, .ps-stats, #status), html.pip-native .pip-stage > :is(.hud, .ps-modes, .ps-stats, #status) { grid-column: 2; max-width: none; }
}

/* qa: depth panels hidden in full screen */
html.pip-immersive #pyramid-depth-gameplay,html.pip-immersive #pyramid-depth-replay,html.pip-native #pyramid-depth-gameplay,html.pip-native #pyramid-depth-replay{display:none !important}
