#onboarding{width:min(100%,520px);margin:0 auto;padding:max(24px,env(safe-area-inset-top)) 24px max(32px,env(safe-area-inset-bottom));box-sizing:border-box}
.setup-top,.setup-actions{display:flex;align-items:center;justify-content:space-between;gap:12px}
.setup-top .brand{font-size:20px;display:flex;align-items:center;gap:10px}
.setup-top>button{padding:12px 0;color:var(--muted)}
.setup-progress{display:flex;gap:6px;margin:40px 0 18px}
.setup-progress span{height:3px;flex:1;border-radius:3px;background:var(--accent)}
.setup-progress .pending{background:var(--border)}
.setup-step{font-size:11px;font-weight:650;letter-spacing:.13em;color:var(--muted)}
#onboarding h1{font-size:clamp(28px,6vw,38px);line-height:1.13;margin:8px 0 10px;outline:none}
.setup-intro,.setup-device p{color:var(--muted);line-height:1.55}
.setup-form{margin-top:24px}
.setup-form fieldset{padding:0;margin:0;border:0;min-width:0}
.setup-form .field small{font-weight:400;color:var(--muted)}
.setup-form input,.setup-form select{font-size:16px}
.setup-form input[readonly]{color:var(--muted)}
.setup-actions{margin-top:22px}
.setup-actions .primary{flex:1;min-height:46px}
.setup-device{margin-top:16px;padding:16px 18px;border:1px solid var(--border);border-radius:14px;background:var(--panel)}
.setup-device h2{font-size:16px;margin:0 0 6px}
.setup-device p{font-size:14px;margin:4px 0}
@media(min-width:640px){#onboarding{margin-top:5vh}}

.tour-tip{position:fixed;inset:auto;z-index:30;visibility:hidden;width:min(18rem,calc(100vw - 20px));margin:0;padding:0;color:var(--text);background:var(--panel);border:1px solid var(--accent);border-radius:12px;box-sizing:border-box;box-shadow:0 6px 24px rgb(0 0 0 / 38%);overflow-wrap:anywhere}
.tour-content{padding:0 14px 10px;max-height:calc(var(--tip-max-height,75dvh) - 2px);box-sizing:border-box;overflow:auto;overscroll-behavior:contain;border-radius:inherit}
.tour-top,.tour-bottom{display:flex;align-items:center;justify-content:space-between;gap:8px}
.tour-bottom{justify-content:flex-end;margin-top:8px}
.tour-top .walkthrough-progress{color:var(--muted);font-size:.8rem;font-weight:600}
.tour-exit,.tour-continue{min-height:44px}
.tour-tip .tour-exit{padding:0 4px;font-size:.85rem;font-weight:600;color:var(--text)}
.tour-tip .tour-continue{padding:0 18px;color:var(--on-accent)}
.picker-tour-tip{position:relative;visibility:visible;width:100%;margin:14px auto 0}
.picker-tour-tip .tour-arrow{left:calc(50% - 6px)}
.tour-tip h3{margin:4px 0;font-size:1rem;line-height:1.25}
.tour-tip p{margin:0;font-size:.875rem;line-height:1.45;color:var(--text)}
.tour-arrow{position:absolute;width:12px;height:12px;transform:rotate(45deg);background:var(--panel);pointer-events:none}
.tour-tip[data-side=bottom] .tour-arrow{top:-7px;border-top:1px solid var(--accent);border-left:1px solid var(--accent)}
.tour-tip[data-side=top] .tour-arrow{bottom:-7px;border-right:1px solid var(--accent);border-bottom:1px solid var(--accent)}
.walkthrough-target{outline:2px solid var(--accent);outline-offset:3px;scroll-margin-block:18px}
.walkthrough-target:focus-visible{outline-offset:5px}
.group-tabs [role=tab].walkthrough-target{color:var(--text);background:var(--accent-soft);outline:2px solid var(--accent);outline-offset:-2px}
.picker-select:has(select.walkthrough-target){outline:2px solid var(--accent);outline-offset:3px}
/* Leave room between the choices and the copy action for either tooltip. */
#sheet:has(.tour-tip) #group-copy .sheet-actions{margin-block-start:clamp(6rem,21dvh,11rem)}
.tour-confetti{position:fixed;inset:0;width:100%;height:100%;z-index:1000;pointer-events:none}
@media(prefers-reduced-motion:reduce){.tour-confetti{display:none}}
