/* Shared game actions; pq aliases retain existing installed-game markup. */
.gr-button,:where(.pq-app) .pq-button { display:inline-flex; align-items:center; justify-content:center; gap:12px; min-width:44px; min-height:58px; padding:13px 18px; border:1px solid #b6c9b880; border-radius:10px; background:#d0ebd60a; color:#edf1df !important; font:inherit; font-size:max(16pt,1em); line-height:1.35; text-decoration:none !important; font-weight:600; text-align:center; white-space:normal; overflow-wrap:anywhere; transition:background .15s,border-color .15s; }
.gr-button svg,:where(.pq-app) .pq-button svg { width:28px; height:28px; flex:0 0 28px; }
.gr-button:hover,:where(.pq-app) .pq-button:hover { background:#d0ebd621; border-color:#e0d6ad; }
.gr-button--primary,:where(.pq-app) .pq-button--gold { color:#153a3b !important; background:linear-gradient(110deg,#ebcc97,#d5ae73); border-color:#f0d49d; box-shadow:0 5px 16px #021e2633; text-shadow:none; }
.gr-button--primary:hover,:where(.pq-app) .pq-button--gold:hover { background:linear-gradient(110deg,#f7dda9,#e7c489); border-color:#ffedbd; }
.gr-button--large,:where(.pq-app) .pq-button--large { min-height:64px; padding:16px 22px; gap:13px; }
.gr-button--large svg:last-child,:where(.pq-app) .pq-button--large svg:last-child { margin-left:8px; }
.gr-button--quiet,:where(.pq-app) .pq-button--quiet { background:transparent; border-color:transparent; color:#d2e0cf !important; box-shadow:none; }
.gr-button--quiet:hover,:where(.pq-app) .pq-button--quiet:hover { background:#c4d8bc16; border-color:#c4d8bc40; }
.gr-button--wide,:where(.pq-app) .pq-button--wide { width:100%; }
.gr-button:disabled,:where(.pq-app) .pq-button:disabled,:where(.pq-app) .pq-disabled { opacity:.62; pointer-events:none; }
.gr-button:focus-visible { outline:4px solid #f4cc83; outline-offset:4px; }
@media(prefers-reduced-motion:reduce) { .gr-button,:where(.pq-app) .pq-button { transition:none; } }

/* Game-only reusable transient feedback. A game positions its own notice host. */
.gr-notice-host { position:absolute; z-index:8; left:16px; right:16px; top:16px; display:flex; justify-content:center; pointer-events:none; }
.gr-notice { display:flex; align-items:center; gap:12px; width:max-content; max-width:min(100%,760px); padding:12px 18px; border:1px solid #91b8af; border-radius:12px; background:#123b43f5; color:#eef0db; box-shadow:0 8px 24px #00151d66; font:max(16pt,1rem)/1.25 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; animation:gr-notice-in .22s ease-out; pointer-events:none; box-sizing:border-box; }
.gr-notice__icon { display:flex; align-items:center; color:#b1d4c1; flex:none; }
.gr-notice__icon svg { display:block; width:32px; height:32px; }
.gr-notice__copy { display:grid; gap:4px; min-width:0; overflow-wrap:anywhere; }
.gr-notice__copy>strong { font-size:inherit; color:inherit; font-weight:650; }
.gr-notice__copy>span { font-size:inherit; color:#cfddd0; }
.gr-notice--warning { border-color:#e8bb76; background:#483b26f5; color:#ffdda1; }
.gr-notice--warning .gr-notice__icon { color:#f6ce8e; }
.gr-notice--success { border-color:#9bcfae; }
@keyframes gr-notice-in { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }
@media(max-width:480px) { .gr-notice-host { left:8px; right:8px; top:8px; }.gr-notice { padding:10px 12px; gap:10px; } }
@media(prefers-reduced-motion:reduce) { .gr-notice { animation:none; } }

/* Opt-in whole-game screen shell, independent of any installed game's theme. */
.gr-screen-dialog { position:fixed; inset:0; width:100dvw; max-width:none; height:100dvh; max-height:none; margin:0; border:0; border-radius:0; background:var(--gr-screen-background,#0b2c36); box-shadow:none; }
.gr-screen-dialog::backdrop { background:var(--gr-screen-background,#0b2c36); backdrop-filter:none; }
.gr-screen-dialog>.gr-dialog__head { padding:16px 24px; background:var(--gr-screen-header,#10343d); }
.gr-screen-dialog>.gr-dialog__body { flex:1; width:min(100%,1600px); margin:0 auto; padding:24px; display:block; min-height:0; overflow:visible; }
.gr-screen-dialog>.gr-dialog__body.gr-scroll-viewport { overflow-x:hidden; overflow-y:auto; }
.gr-screen-dialog>.gr-dialog__body.gr-scroll-needed { padding-right:48px; }
.gr-screen-dialog>.gr-dialog__body>:last-child { margin-bottom:0; }
@media(max-width:600px) { .gr-screen-dialog>.gr-dialog__head { padding:12px 16px; }.gr-screen-dialog>.gr-dialog__body { padding:16px; }.gr-screen-dialog>.gr-dialog__body.gr-scroll-needed { padding-right:44px; } }
@media(max-height:500px) and (min-width:601px) { .gr-screen-dialog>.gr-dialog__head { padding:4px 16px; }.gr-screen-dialog>.gr-dialog__head .gr-icon-button { width:56px; height:56px; flex-basis:56px; padding:8px; }.gr-screen-dialog>.gr-dialog__body { padding:8px 16px; } }
