/* The practice uses the same drawer, suits, colors and card feedback as the table. */
:root body #onboarding-modal.sz-drawer{width:min(600px,calc(100vw - 32px));height:min(780px,calc(var(--app-height,100dvh) - 32px))}
:root body #onboarding-modal>.modal-body{padding:24px 28px;scrollbar-gutter:auto}
.onboarding-picture{max-width:480px;margin:auto;width:100%;color:var(--ink)}
.intro-step{font-size:12px;letter-spacing:.06em;color:var(--muted);margin-bottom:12px}
:root body #onboarding-modal h3{margin:0;font-size:24px;line-height:1.4;letter-spacing:-.02em}
.intro-instruction{margin:8px 0 24px;font-size:14px;line-height:1.5;color:var(--muted)}
.intro-player{display:flex;align-items:center;gap:7px;font-size:14px}
.intro-player>span{margin-left:auto;font-variant-numeric:tabular-nums;color:var(--muted)}
:root body #onboarding-modal .player-flower{width:18px;height:20px}
/* The same five bougainvillea bracts as the live table: rival gold, player red. */
.intro-player>.intro-damage{display:inline-flex;align-items:center;gap:3px;margin-left:2px}
.intro-damage .wound-bract{width:14px;height:18px;flex:none;overflow:visible}
.intro-damage .wound-bract:not(.filled) path{fill:color-mix(in srgb,var(--ink) 22%,transparent)}
.intro-damage .bract-core{display:none}
.intro-damage .filled,.intro-damage .filled path{fill:var(--red)}
.intro-damage .filled .bract-core{display:block;fill:var(--gold-center)}
.intro-opponent .intro-damage .filled,.intro-opponent .intro-damage .filled path{fill:var(--gold)}
.intro-opponent .intro-damage .filled .bract-core{fill:var(--red)}
.intro-opponent .intro-player strong{color:var(--gold-text)}
.intro-self .intro-player strong{color:var(--red-text)}
:root body #onboarding-modal .intro-card{position:relative;display:block;box-sizing:border-box;flex:none;width:58px;height:82px;min-width:0;min-height:0;padding:6px;border:1px solid var(--card-edge);border-radius:7px;background:var(--card-face);color:var(--card-ink);text-align:left;box-shadow:var(--flat-shadow);font-family:var(--rank-font);touch-action:pan-y;user-select:none;-webkit-user-select:none}
.intro-card b{display:block;font:800 24px/1 var(--rank-font)}
.intro-card>span{display:block;width:16px;height:16px;margin-top:3px;line-height:1}
.intro-card svg{display:block;width:100%;height:100%}
.intro-card>i{position:absolute;right:4px;bottom:7px;width:29px;height:29px;opacity:.08}
:root body #onboarding-modal .intro-red{color:var(--card-red)}
.intro-rack{display:flex;justify-content:center;padding:24px 0 8px;touch-action:pan-y}
.intro-rack .intro-card+.intro-card{margin-left:-9px}
:root body #onboarding-modal .intro-rack .intro-selected{transform:translateY(-14px);outline:2px solid var(--red);outline-offset:-2px;background:var(--selected);box-shadow:var(--lift-shadow)}
.intro-card:focus-visible{outline:3px solid var(--red);outline-offset:2px}
.intro-card em{position:absolute;right:3px;top:4px;font:700 11px/1 system-ui;color:var(--card-red)}
.intro-trio{display:flex;justify-content:center;gap:8px;padding:14px 0 0;min-height:96px}
.intro-wait{display:grid;place-content:center;color:var(--muted);font-size:14px}
.intro-opponent small{display:block;height:22px;padding-top:6px;text-align:center;color:var(--muted);font-size:12px}
.intro-result{min-height:62px;display:grid;place-content:center;text-align:center;border-block:1px solid var(--line);margin:14px 0 18px;font-size:15px;font-weight:650;line-height:1.5}
.intro-played:empty{display:none}
.onboarding-footer{flex:none;padding:12px 28px 20px;border-top:1px solid var(--line);background:var(--paper)}
#intro-feedback{min-height:20px;margin:0 0 10px;font-size:13px;line-height:1.5;color:var(--muted);text-align:center}
:root body #onboarding-start{display:block;width:100%;min-height:48px;border-radius:8px;font:650 16px/1.4 system-ui;background:var(--red-text);color:var(--paper);border:0}
:root body #onboarding-start:disabled{opacity:.45;cursor:default}
:root body #onboarding-start:focus-visible{outline:2px solid var(--ink);outline-offset:3px}
.sz-first-game-hint{position:fixed;z-index:65;box-sizing:border-box;background:var(--panel);color:var(--ink);border:1px solid var(--line);border-radius:12px;padding:12px 14px;box-shadow:var(--lift-shadow);pointer-events:none}
.sz-first-game-hint[hidden]{display:none}
.sz-first-game-hint::after{content:'';position:absolute;bottom:-6px;left:calc(50% - 5px);width:10px;height:10px;transform:rotate(45deg);background:var(--panel);border-right:1px solid var(--line);border-bottom:1px solid var(--line)}
.sz-first-game-hint p{font-size:14px;line-height:1.55;margin:0}
:root body .sz-first-game-hint button{display:block;margin:4px 0 -6px auto;padding:8px;min-height:40px;background:none;border:0;color:var(--red-text);font-size:13px;pointer-events:auto}
/* Horizontal card gestures retain vertical scrolling, including inside practice. */
:root body .table{touch-action:pan-y}
:root body #own-hand,:root body #own-table{touch-action:pan-y;user-select:none;-webkit-user-select:none}
.sz-onboarding-setting{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:20px 0;padding:16px 0;border-block:1px solid var(--line)}
:root body #settings-modal .sz-onboarding-setting label{display:flex;gap:10px;align-items:center;min-height:44px;font-size:16px}
:root body #onboarding-enabled{flex:none;appearance:auto;width:20px;height:20px;margin:0;accent-color:var(--red)}
.sz-onboarding-setting p{margin:0;font-size:12px;color:var(--muted);line-height:1.5}
:root body #onboarding-reopen{flex:none;min-height:44px;padding:8px 0;background:none;border:0;color:var(--ink);font:inherit;text-decoration:underline;text-underline-offset:4px}

@media(max-width:700px),(max-height:500px) and (max-width:1000px){
 :root body #onboarding-modal.sz-drawer{width:100%;height:var(--app-height,100dvh)}
 :root body #onboarding-modal>.modal-body{padding:20px;display:flex;flex-direction:column;justify-content:safe center}
 :root body #onboarding-modal h3{font-size:22px}
 :root body #onboarding-modal .intro-card{width:48px;height:70px;padding:5px}
 .intro-card b{font-size:23px}
 .intro-rack .intro-card+.intro-card{margin-left:-10px}
 .intro-trio{min-height:84px}
 .onboarding-footer{padding:12px 20px max(16px,env(safe-area-inset-bottom))}
}
@media(max-width:359px){
 :root body #onboarding-modal>.modal-body{padding:16px}
 :root body #onboarding-modal .intro-rack .intro-card{width:43px;height:66px}
 :root body #onboarding-modal h3{font-size:20px}
}
@media(max-height:700px){
 :root body #onboarding-modal>.modal-body{padding-block:12px}
 .intro-instruction{margin-bottom:14px}
 .intro-result{min-height:48px;margin:10px 0}
 .intro-trio{padding-top:8px;min-height:74px}
 :root body #onboarding-modal .intro-card{height:66px}
 .intro-rack{padding-top:19px}
}
/* The final teaching beat is the resolved play; spare cards add no new lesson. */
#onboarding-modal[data-lesson-stage=done] .intro-rack{display:none}
