/* A dark FLINT table, even when the surrounding panel uses the light theme. */
#pxSanddune { padding: 12px; --ink: #000000; --bone: #EAEEF0; --rim: #9EB6C4; --rim-tint: 158,182,196; --ink-tint: 0,0,0; }
#pxSanddune .sanddune-card { background: var(--ink); color: var(--bone); width: 100%; max-width: 420px; height: calc(100dvh - 24px); max-height: 900px; padding: 12px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; border: 1px solid rgba(var(--rim-tint),.15); border-radius: var(--r-card); font-family: var(--mono, 'IBM Plex Mono', monospace); }
#pxSanddune .pxpop-head { margin: 0; flex-shrink: 0; }
#pxSanddune button { color: var(--bone); font: inherit; cursor: pointer; }
#pxSanddune button:focus-visible, #pxSanddune canvas:focus-visible { outline: 2px solid var(--rim); outline-offset: 2px; }
.sanddune-hud { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: var(--fs-sm); }
.sanddune-hud small { display: block; color: var(--rim); font-size: var(--fs-2xs); margin-bottom: 3px; }
#pxSanddune .sanddune-pause { border: 1px solid rgba(var(--rim-tint),.19); background: transparent; border-radius: var(--r-ctl); min-height: 36px; padding: 5px 8px; font-size: var(--fs-sm); }
.sanddune-table { flex: 1; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; }
.sanddune-table canvas { display: block; touch-action: none; border-radius: var(--r-lg); max-width: 100%; max-height: 100%; }
.sanddune-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: rgba(var(--ink-tint),.85); border-radius: var(--r-lg); text-align: center; font-size: var(--fs-lg); }
.sanddune-overlay[hidden] { display: none; }
#pxSanddune .sanddune-action { border: 1px solid rgba(var(--rim-tint),.33); background: rgba(var(--rim-tint),.06); border-radius: var(--r-ctl); min-height: 44px; padding: 10px 18px; font-size: var(--fs-md); touch-action: none; }
#pxSanddune .sanddune-launch { width: 100%; flex-shrink: 0; user-select: none; -webkit-user-select: none; background: rgba(var(--rim-tint),.04); }
#pxSanddune .sanddune-launch:disabled { opacity: .5; cursor: default; }
.sanddune-help { color: var(--rim); font-size: var(--fs-xs); text-align: center; line-height: 1.5; margin: 0; }
@media(max-height: 550px) { #pxSanddune { padding: 6px; } #pxSanddune .sanddune-card { height: calc(100dvh - 12px); padding: 8px; gap: 6px; } .sanddune-help { font-size: var(--fs-2xs); } }
#pxSanddune .pxpop-title { color: var(--rim); }
#pxSanddune .pxpop-close { min-width: 36px; min-height: 36px; }

#pxSanddune .sanddune-launch[aria-pressed="true"] { background: rgba(var(--rim-tint),.19); }
/* Edge-to-edge playfield. HUD and controls float over the canvas. */
#pxSanddune { padding: 0; background: var(--ink); }
#pxSanddune .sanddune-card { position: relative; width: 100%; max-width: none; height: 100dvh; max-height: none; padding: 0; border: 0; border-radius: 0; }
#pxSanddune .sanddune-table { position: absolute; inset: 0; }
#pxSanddune canvas, #pxSanddune .sanddune-overlay { border-radius: 0; }
#pxSanddune .pxpop-head { position: absolute; top: 12px; left: 16px; right: 12px; z-index: 2; pointer-events: none; }
#pxSanddune .pxpop-close { pointer-events: auto; }
#pxSanddune .sanddune-hud { position: absolute; top: 62px; left: 16px; right: 16px; z-index: 2; pointer-events: none; }
#pxSanddune .sanddune-pause { pointer-events: auto; }
#pxSanddune .sanddune-launch { position: absolute; bottom: 56px; left: 16px; width: calc(100% - 32px); z-index: 2; }
#pxSanddune .sanddune-help { position: absolute; bottom: 14px; left: 12px; right: 12px; pointer-events: none; }
