/* Alphabet Shift: single approved Big Cats animation with three rule lines. */
.as-tutorial-dialog {
  --as-paper:#faf9f6;--as-ink:#30332d;--as-line:#d9d8cf;--as-neutral:#f3f1eb;
  --as-sage:#dae7d0;--as-sage-border:#a7bda0;--as-selected:#557750;--as-used:#e8e5db;
  width:min(calc(100% - 24px),440px);max-height:calc(100dvh - 32px);
  padding:0;border:1px solid var(--as-line);border-radius:3px;background:var(--as-paper);color:var(--as-ink);
  overflow:auto;overscroll-behavior:contain;font-family:Rubik,system-ui,sans-serif;
}
.as-tutorial-dialog::backdrop{background:#20282080}
.as-tutorial-dialog .modal-inner,.as-tutorial-dialog .modal-body{padding:0;margin:0;max-height:none;overflow:visible}
.as-tutorial-dialog .modal-inner>.modal-heading,.as-tutorial-dialog .modal-actions{display:none}
.as-tutorial,.as-tutorial *{box-sizing:border-box}
.as-tutorial-header{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;padding:12px 16px;background:var(--as-paper);border-bottom:1px solid var(--as-line)}
.as-tutorial-header h2{margin:0;font:600 20px/1.3 Rubik,system-ui,sans-serif}
.as-tutorial-close{display:grid;place-items:center;width:44px;height:44px;padding:10px;background:transparent;color:var(--as-ink);border:0;border-radius:0;cursor:pointer}
.as-tutorial-close svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
.as-tutorial-close:focus-visible{outline:2px solid var(--as-selected);outline-offset:-2px}
.as-tutorial-step{margin:0;padding:24px 20px;border-bottom:1px solid var(--as-line)}
.as-tutorial-step:last-child{border:0}
.as-demo{width:100%;max-width:320px;margin:0 auto;user-select:none}
.as-demo-theme{text-align:center;font-size:15px;font-weight:600;line-height:1.4;margin:0 0 12px}
.as-demo-rows{display:grid;gap:5px;margin:0 10px 8px}
.as-demo-row{position:relative;display:flex;justify-content:center;align-items:center;height:29px;border:1px solid var(--as-line);border-radius:3px;background:var(--as-neutral);font:600 13px/1 Rubik,system-ui,sans-serif;letter-spacing:.1em;padding:0 44px}
.as-demo-row.as-active{background:var(--as-sage);border-color:var(--as-sage-border)}
.as-demo-row-controls{position:absolute;right:3px;display:flex;align-items:center;gap:5px;letter-spacing:0;font-size:16px}
.as-demo-submit{display:grid;place-items:center;width:21px;height:21px;background:var(--as-selected);color:white;border-radius:2px}
.as-demo-wheel{display:block;width:100%;height:auto;overflow:visible}
.as-wedge{stroke:var(--as-paper);stroke-width:1.85;stroke-linejoin:round}
.as-neutral{fill:var(--as-neutral)}.as-active{fill:var(--as-sage)}.as-selected{fill:var(--as-selected)}
.as-used{fill:var(--as-used)}.as-spent{fill:#e5e3da}
.as-letter{font:600 31px Rubik,system-ui,sans-serif;text-anchor:middle;dominant-baseline:middle;fill:var(--as-ink)}
.as-letter-selected{fill:white}.as-letter-used{fill:#8b8b82}
.as-pointer{fill:none;stroke:var(--as-selected);stroke-width:3;opacity:.85}
.as-pointer.as-blocked{stroke:#8b8b82;stroke-dasharray:5 4}
.as-demo-shift{display:flex;align-items:center;justify-content:center;gap:6px;width:90px;height:34px;margin:8px auto 0;border:1px solid var(--as-sage-border);border-radius:3px;background:var(--as-sage);font-size:13px;font-weight:500}
.as-demo-shift svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.as-demo-shift.as-pressed{background:var(--as-selected);color:white}
.as-tutorial-step figcaption{max-width:340px;margin:18px auto 0;font-size:16px;line-height:1.5;text-align:left;color:var(--as-ink)}
.as-tutorial-caption-line{display:block}
[data-theme="dark"] .as-tutorial-dialog{--as-paper:#1c1b20;--as-ink:#eeeee8;--as-line:#45464a;--as-neutral:#2c2e2c;--as-sage:#394c37;--as-sage-border:#70866a;--as-selected:#557750;--as-used:#343632;color-scheme:dark}[data-theme="dark"] .as-spent{fill:#30322f}[data-theme="dark"] .as-letter-used{fill:#92978e}

@media(max-width:360px){.as-tutorial-step{padding:20px 14px}.as-demo-row{font-size:12px}.as-tutorial-step figcaption{font-size:15px}}

/* Integrate the prototype as the shared site's scrollable instruction dialog.
   Alphabet Shift has its own sticky title/x; hide the shared duplicate x. */
#rules-dialog.as-tutorial-dialog #rules-close{display:none!important}
#rules-dialog.as-tutorial-dialog .modal-inner{
 display:block!important;padding:0!important;max-height:none!important
}
#rules-dialog.as-tutorial-dialog .modal-body{
 display:block!important;padding:0!important;overflow:visible!important;
 max-height:none!important
}
#rules-dialog.as-tutorial-dialog{
 max-height:min(82vh,750px)!important;overflow-y:auto!important
}
#rules-dialog.as-tutorial-dialog .modal-heading{display:none!important}
#rules-dialog.as-tutorial-dialog .as-tutorial-header{
 position:sticky;top:0;z-index:4
}
