/* Compact control deck: approximately half the original 232px height. */
.gold-play .drawn-controls {
  grid-template-rows: 20px 44px 44px;
  gap: 4px 6px;
  padding: 0 8px 4px;
  border-radius: 12px;
}
.gold-play .console-heading { font-size: 10px; gap: 8px; letter-spacing: .5px; }
.gold-play .console-heading small { font-size: 7px; letter-spacing: 1px; }
.gold-play .drawn-controls .drawn-key {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0 4px;
  min-height: 44px;
  padding: 4px 2px;
  border-radius: 8px;
  box-shadow: inset 0 1px #fff1c51a, 0 1px #070906;
}
.gold-play .drawn-key strong { font-size: 14px; line-height: 1.1; letter-spacing: 0; }
.gold-play .drawn-key svg { width: 14px; height: 14px; }
.gold-play .drawn-key small { flex-basis: 100%; font-size: 8px; line-height: 1; }
.gold-play .drawn-controls .gold-push { flex-direction: column; flex-wrap: nowrap; gap: 2px; padding-block: 2px; }
.gold-play .gold-push strong { font-size: 18px; line-height: 18px; }
.gold-play .gold-push > span { font-size: 7px; line-height: 7px; }
.gold-play .gold-push small { flex-basis: auto; font-size: 7px; white-space: nowrap; }
.gold-play .drawn-arrows { height: 20px; min-height: 20px; font-size: 9px; }
.gold-play .drawn-arrows svg { width: 12px; height: 12px; }
.gold-play .drawn-controls.is-collapsed { grid-template-rows: 32px; padding-bottom: 0; }
.gold-play .drawn-controls.is-collapsed .drawn-arrows { height: 32px; min-height: 32px; }
@media (max-width: 360px) {
  .gold-play .drawn-controls { gap: 4px; padding-inline: 6px; }
  .gold-play .drawn-key strong { font-size: 12px; }
  .gold-play .drawn-key svg { width: 12px; height: 12px; }
  .gold-play .gold-push strong { font-size: 17px; }
  .gold-play .gold-push small { font-size: 6px; }
}

/* Swap the shared 90-degree camera box before rotating; preserve the full frame. */
.camera-live{container-type:size}
.camera-live video,.gold-play .camera-live video{
  position:absolute;
  left:50%;top:50%;
  width:100cqh;height:100cqw;
  max-width:none;max-height:none;
  object-fit:contain;
  transform:translate(-50%,-50%) rotate(90deg);
  transform-origin:center;
}
.gold-play > .steel-header {
  position: relative;
  z-index: 5;
  padding-bottom: 38px;
}
.gold-play > .steel-header > .pachi-counter {
  position: absolute;
  top: calc(100% - 38px);
  left: 0;
  right: 0;
  z-index: 5;
}

/* Keep video fixed; only its controls follow the counter overlay. */
.gold-play .video-stage > :is(.gold-video-speaker,.gold-machine-side,.camera-volume){translate:0 var(--counter-cover-offset,0px)}

/* Receipt-driven black/gold command feedback, kept inside the free header space. */
.gold-play .console-heading { min-width:0; }
.gold-play .console-heading > span { flex-shrink:0; }
.gold-play .console-heading:has(.command-progress) > small { display:none; }
.command-progress { min-width:0; color:#ead29a; }
.gold-play .console-heading .command-progress { flex:1; max-width:360px; margin-left:auto; }
.command-progress-caption { display:flex; align-items:center; justify-content:space-between; gap:8px; font-size:10px; line-height:14px; letter-spacing:0; }
.command-progress-caption > span { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.command-progress-caption b { font-size:10px; font-variant-numeric:tabular-nums; font-weight:600; flex-shrink:0; }
.command-progress-track { height:4px; overflow:hidden; border-radius:20px; background:#070a07; box-shadow:inset 0 0 0 1px #dcb87530; }
.command-progress-track > span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#937139,#dec080,#ffedb9); box-shadow:0 0 8px #e7c77960; transition:width .16s linear; }
.command-progress.is-done { color:#bde1be; }
.command-progress.is-done .command-progress-track > span { background:linear-gradient(90deg,#749875,#c6e7b8); }
.command-progress.is-error { color:#f0b3a8; }
.command-progress.is-error .command-progress-track > span { background:#d68a79; }
.command-progress.is-pending { color:#edc488; }
.turn-purchase-dialog .command-progress { margin:12px 0 18px; }
.turn-purchase-dialog .command-progress-caption { font-size:13px; line-height:24px; }
.turn-purchase-dialog .command-progress-caption b { font-size:13px; }
.turn-purchase-dialog .command-progress-track { height:6px; }
@media (prefers-reduced-motion:reduce) { .command-progress-track > span { transition:none; } }

/* Account help actions stay together and remain easy to tap on phones. */
.auth-help-row{display:flex;justify-content:flex-end;align-items:center;gap:16px;grid-column:1/-1;margin-top:-7px;flex-wrap:wrap}
.auth-help-row .forgot{margin:0;min-height:44px;display:inline-flex;align-items:center;font-size:14px}
.auth-help-row .auth-support-link{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:8px 12px;border:1px solid #dededb;border-radius:8px;background:#f6f6f4;color:#242424;font-size:14px;font-weight:500;line-height:1.4;text-decoration:none}
.auth-help-row .auth-support-link:hover{background:#ecece8}
.auth-help-row button:focus-visible{outline:2px solid #385b4c;outline-offset:3px}

/* Compact choice preserves the existing retain and abandon flows. */
.leave-machine-dialog{box-sizing:border-box;position:fixed;inset:0;width:min(328px,calc(100% - 32px));max-width:100%;max-height:calc(100dvh - 32px);margin:auto;padding:20px 18px 18px;border:1px solid #716b46;border-radius:18px;background:#191c16;color:#f3e3b5;box-shadow:0 16px 48px #0005;font-family:inherit;overflow:auto}
.leave-machine-dialog::backdrop{background:#0009;backdrop-filter:blur(3px)}
.leave-machine-dialog header{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:26px}
.leave-machine-dialog h2{margin:0;font-size:18px;line-height:26px;font-weight:600;color:#f3e3b5}
.leave-machine-dialog header button{display:grid;place-items:center;flex:none;width:44px;height:44px;margin:-9px -10px -9px 0;padding:0;background:transparent;color:#bcb59a;border:0;border-radius:8px;font:inherit;font-size:28px;line-height:1;cursor:pointer}
.leave-machine-dialog>p{margin:7px 0 20px;font-size:12px;line-height:18px;color:#a7a58e;overflow-wrap:anywhere}
.leave-machine-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.leave-machine-options>button{display:flex;align-items:center;justify-content:center;min-height:44px;width:100%;padding:10px 8px;border-radius:8px;font:inherit;cursor:pointer}
.leave-machine-options strong{font-size:15px;line-height:22px;font-weight:600}
.leave-machine-keep{background:#d9bd72;border:1px solid #e1ca8d;color:#292617}
.leave-machine-abandon{background:#30271f;border:1px solid #79624d;color:#cf8d73}
.leave-machine-options>button:disabled{opacity:.45;cursor:wait}
.leave-machine-dialog button:focus-visible{outline:2px solid #f4dc96;outline-offset:3px}

/* The watch permission shares the speaker's size, border and counter offset. */
.gold-play .gold-video-watch{top:56px;touch-action:manipulation}
.gold-play .gold-video-watch[aria-pressed=true]{border-color:#e2c36d;color:#ffe397;background:#242516ee}
.gold-play .gold-video-watch:disabled{opacity:.55}
.gold-play .balanced-controls .key-special-game{grid-area:3/1/4/9}
.gold-play .balanced-controls:has(.control-status) .key-special-game{grid-row:4}

/* Compact special-game points UI. */
.sg-progress{position:absolute;z-index:4;top:10px;left:62px;right:58px;min-height:28px;padding:5px 8px;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:2px 7px;border:1px solid #9b824d66;border-radius:7px;background:#10140ee8;color:#dfc47e;font-size:11px;line-height:17px;translate:0 var(--counter-cover-offset,0px);pointer-events:none}.sg-progress strong{font-size:11px;font-weight:500}.sg-progress small{flex-basis:100%;text-align:center;color:#d6a78b}
.sg-dialog{box-sizing:border-box;position:fixed;inset:0;margin:auto;width:min(360px,calc(100% - 28px));max-width:none;max-height:calc(100dvh - 44px);padding:16px;border:1px solid #827145;border-radius:16px;background:#181c15;color:#eddfb8;box-shadow:0 18px 60px #0008;font:14px/1.5 system-ui,'PingFang SC',sans-serif;overflow:auto;overscroll-behavior:contain}.sg-dialog::backdrop{background:#0009;backdrop-filter:blur(3px)}.sg-dialog *{box-sizing:border-box}.sg-dialog header{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}.sg-dialog h2{font-size:18px;line-height:26px;margin:0;font-weight:600}.sg-dialog header small{font-size:11px;color:#a49f87}.sg-dialog button{min-height:42px;touch-action:manipulation;font:inherit;font-weight:550;padding:8px 12px;background:#2a2c22;color:#e7d5a2;border:1px solid #736445;border-radius:8px;cursor:pointer}.sg-dialog header button{flex:none;width:40px;min-height:40px;padding:0;margin-right:-7px;background:transparent;border:0;font-size:26px;color:#b8b195}.sg-dialog button:disabled{opacity:.45;cursor:default}.sg-dialog :is(button,input,summary):focus-visible{outline:2px solid #e7c77e;outline-offset:2px}.sg-dialog .sg-primary{background:#dbbc71;color:#292517;border:1px solid #e3cc8b}.sg-balance,.sg-summary{display:flex;align-items:center;justify-content:space-between;gap:10px}.sg-balance{padding:8px 0 12px;color:#b8b29a;font-size:12px}.sg-balance b{font-size:18px;color:#f1df9d;font-variant-numeric:tabular-nums}.sg-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.sg-option{display:flex;flex-direction:column;gap:4px;border:1px solid #615739;border-radius:10px;background:#22261d;padding:8px 10px}.sg-option-head{display:flex;align-items:center;justify-content:space-between;gap:4px}.sg-option-head b{font-size:20px;line-height:24px;color:#edce81}.sg-option-head small{font-size:11px;color:#c5b78e}.sg-digits{font-size:10px;color:#a4a08b;letter-spacing:1px}.sg-option input{min-width:0;width:100%;height:36px;margin:3px 0 0;padding:5px 8px;border-radius:6px;border:1px solid #8a774b;background:#10140f;color:#f4e9ca;font-size:16px;line-height:24px}.sg-option input:disabled{opacity:.6}.sg-summary{margin-top:12px;font-size:13px}.sg-summary b{font-size:16px}.sg-limit{margin:5px 0 10px;font-size:10px;color:#a8a18b}.sg-actions{display:flex;gap:8px;margin-top:12px}.sg-actions button{flex:1;min-width:0}.sg-rules{margin-top:12px;border-top:1px solid #55503a}.sg-rules summary{padding:12px 0 5px;cursor:pointer;font-size:12px;color:#c4b997;min-height:40px}.sg-rule-copy p,.sg-confirm p{font-size:12px;line-height:1.7;color:#bcb69f;margin:8px 0}.sg-confirm h3{font-size:13px;margin:14px 0 0;color:#e0ce9b}.sg-confirm-items{display:flex;flex-wrap:wrap;gap:5px 12px;font-size:12px;color:#c4b998;margin-top:8px}.sg-current{margin:0 0 10px;padding:8px;border-radius:7px;background:#ddbf7412;font-size:12px;color:#e8ca80}.sg-error{font-size:12px;color:#efab98;line-height:1.5;margin:8px 0}.sg-muted{color:#b4aa8e;font-size:12px}.sg-record{display:grid;grid-template-columns:1fr auto;gap:4px;padding:9px 0;border-bottom:1px solid #514a34;font-size:12px}.sg-record small{grid-column:1/-1;color:#9e9985;font-size:10px}.sg-result{text-align:center;padding:24px 18px}.sg-result p{font-size:13px;color:#b7ad8d;margin:12px 0}.sg-result>strong{display:block;font-size:30px;color:#e4c477}.sg-result>small{display:block;color:#aba58f;font-size:12px;margin-bottom:16px}.sg-result>button{width:100%}

.sg-dialog button{min-height:44px}.sg-dialog header button{width:44px;min-height:44px}.sg-dialog summary{min-height:44px}.sg-option input{height:40px}.sg-dialog header small,.sg-option-head small,.sg-digits,.sg-limit,.sg-record small{font-size:12px}.sg-progress,.sg-progress strong{font-size:12px}.sg-dialog .sg-viewer-open{min-height:44px}

/* Exact-tail points choices share the existing confirmation flow. */
.sg-modes{display:flex;gap:8px;padding:4px;background:#10140f;border:1px solid #55503a;border-radius:10px;margin:0 0 12px}.sg-modes button{flex:1;min-width:0;display:flex;align-items:center;justify-content:center;gap:3px 8px;flex-wrap:wrap;padding:7px 5px;background:transparent;border-color:transparent;font-size:13px}.sg-modes button[aria-pressed=true]{background:#373325;border-color:#8a774b;color:#f0d68f}.sg-modes small{font-size:12px;font-weight:400;color:#c4b997}.sg-number-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:3px 0 12px;font-size:13px;color:#bcb69f}.sg-number-heading b{color:#edce81;font-size:14px;font-weight:600}.sg-number-heading small{margin-left:5px;font-size:12px;font-weight:400;color:#c4b997}.sg-number-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}.sg-number-option{display:flex;flex-direction:column;min-width:0;outline:1px solid #74643e;border-radius:8px;background:#22261d;text-align:center;overflow:hidden}.sg-number-option> b{padding:5px 0 4px;font-size:20px;font-weight:550;line-height:26px;color:#edce81}.sg-number-option[data-filled=true]{outline-color:#dfc177;background:#3a3422}.sg-number-option input{width:100%;min-width:0;height:44px;padding:5px 3px;border:0;border-top:1px solid #74643e;border-radius:0;background:#10140f;color:#f4e9ca;font:16px/1.5 system-ui;text-align:center;margin:0}.sg-number-option input:disabled{opacity:.5}.sg-number-option:focus-within{outline:2px solid #e7c77e;outline-offset:2px}.sg-number-option input:focus-visible{outline:none}.sg-dialog button:active:not(:disabled){filter:brightness(1.12)}

/* Personal special-game records remain available after leaving a machine. */
.sg-history{margin-top:24px;padding:16px 14px;background:#131710;border:1px solid #4c432c;border-radius:16px;color:#e8dbb5}
.sg-history .sg-history-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}
.sg-history .sg-history-heading h2{margin:0;font-size:17px;line-height:24px}
.sg-history-heading>span{font-size:11px;color:#a9a38b}
.sg-history-hint{margin:8px 0 14px;color:#aaa38c;font-size:12px;line-height:1.7}
.sg-history-tabs{display:flex;gap:6px;padding:4px;border-radius:10px;background:#090c08}
.sg-history-tabs button{display:flex;align-items:center;justify-content:center;gap:6px;flex:1;min-height:44px;border:0;border-radius:7px;background:transparent;color:#b4ad94;font:inherit;font-size:13px;cursor:pointer}
.sg-history-tabs button[aria-pressed=true]{background:#d9bd78;color:#1d2118;font-weight:600}
.sg-history-tabs button>span{font-size:11px;min-width:17px;line-height:17px;border-radius:10px;background:#0002}
.sg-history-record{border-bottom:1px solid #34382a}
.sg-history-record:last-of-type{border-bottom:0}
.sg-history-record summary{display:flex;align-items:center;gap:10px;min-height:76px;padding:12px 0;cursor:pointer;list-style:none}
.sg-history-record summary::-webkit-details-marker{display:none}
.sg-history-machine{display:flex;flex:1;min-width:0;flex-direction:column;gap:6px}
.sg-history-machine strong{font-size:13px;line-height:1.45;overflow-wrap:anywhere;font-weight:600}
.sg-history-machine small{font-size:11px;line-height:1.5;color:#bcb394}
.sg-history-machine small[data-state=active]{color:#d9bd78}
.sg-history-machine small[data-state=review]{color:#e5a785}
.sg-history-amount{display:flex;flex-direction:column;align-items:flex-end;gap:5px;max-width:45%;overflow-wrap:anywhere;text-align:right;font-variant-numeric:tabular-nums}
.sg-history-amount b{font-size:18px;line-height:1.25;color:#ead39b;font-weight:600}
.sg-history-amount small{font-size:10px;color:#aaa38c}
.sg-history-chevron{color:#a89b77;font-size:22px;line-height:1;flex:none}
.sg-history-record[open] .sg-history-chevron{transform:rotate(90deg)}
.sg-history-detail{padding:0 0 14px;color:#bcb59c;font-size:12px;line-height:1.6}
.sg-history-detail p{margin:7px 0}
.sg-history-detail>small{display:block;margin-top:10px;color:#96937e;font-size:10px;overflow-wrap:anywhere}
.sg-history-choices{display:flex;flex-wrap:wrap;gap:6px}
.sg-history-choices span{background:#242a1e;border-radius:5px;padding:3px 7px;color:#e5d7b2}
.sg-history-detail .sg-history-draw{color:#ead39b;margin-top:12px}
.sg-history-detail [data-net=win]{color:#9acaaa}
.sg-history-detail [data-net=loss]{color:#e6a18f}
.sg-history-empty{margin:0;padding:23px 0 10px;text-align:center;color:#a9a38b;font-size:12px}
.sg-history-error{font-size:12px;line-height:1.6;color:#e6a18f}
.sg-history-pages{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-top:10px;font-size:12px;color:#aaa38c}
.sg-history-pages button{min-height:44px;padding:0 12px;border:1px solid #4c432c;border-radius:8px;background:transparent;color:#d9bd78;font:inherit;cursor:pointer}
.sg-history-pages button:disabled{opacity:.4;cursor:default}
.sg-history button:focus-visible,.sg-history summary:focus-visible{outline:2px solid #edcf83;outline-offset:3px}
.sg-history-cancel{min-height:44px;margin-top:10px;padding:8px 14px;border:1px solid #796c49;border-radius:8px;background:transparent;color:#e5cf98;font:inherit;cursor:pointer}
.sg-history .sg-history-confirm{width:min(360px,calc(100vw - 32px));max-height:calc(100dvh - 40px);overflow-y:auto}
.sg-history-confirm p{margin:10px 0;font-size:13px;line-height:1.7;color:#c9c1a7}.sg-history-confirm>small{font-size:12px;color:#b5ad95}
.sg-history-confirm .sg-summary{margin:12px 0;padding:12px;background:#262a1e;border-radius:8px}

/* Generated member numbers are information, not form fields. */
.register .member-code-label{display:block;margin-bottom:7px;font-size:12px;font-weight:600;line-height:normal}
.register .member-code-value{display:flex;min-height:44px;flex-direction:column;justify-content:center;gap:3px;cursor:default}
.register .member-code-value strong{color:#263e34;font-size:14px;font-weight:600;line-height:20px;overflow-wrap:anywhere}
.register .member-code-value small{color:#626862;font-size:11px;line-height:16px}
.member-code-assigned{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:18px;padding:14px 16px;border-radius:8px;background:#f1f5f2;color:#263e34}
.member-code-assigned>span{flex-shrink:0;font-size:13px}
.member-code-assigned output{font-size:23px;font-weight:650;letter-spacing:.04em;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;min-width:0;user-select:all}

.admin-topup-dialog{width:min(480px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow-y:auto}.admin-topup-dialog input{width:100%;box-sizing:border-box;min-height:44px}.admin-topup-dialog .admin-topup-member,.admin-topup-dialog .admin-topup-note{font-size:13px;line-height:1.5;color:#bdb8a4;margin:6px 0 16px}.admin-topup-funding{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:16px 0}.admin-topup-funding button{min-height:44px;padding:8px;border:1px solid #71633b;border-radius:10px;background:#20231b;color:#d7c999;font:inherit;font-size:14px}.admin-topup-funding button[aria-pressed=true]{background:#e0bd63;color:#17190f}.admin-topup-funding button:disabled{opacity:.45}.admin-topup-dialog .turn-preview small{line-height:1.6}.admin-topup-dialog footer button{min-height:44px}
