/* Canvas-first workspace, using the existing JoyFont light/blue palette. */
.practice-launch{padding:12px 24px;max-width:1500px;margin:auto}
body.practice-open{overflow:hidden;overscroll-behavior:none}
.practice-open>header,.practice-open #pairing,.practice-open #workroom,.practice-open .practice-launch{display:none!important}
#practice{--p-toolbar-height:64px;--p-ink:#172033;--p-muted:#687386;--p-blue:#1769e0;--p-border:#dfe3ea;position:fixed;inset:0;z-index:100;background:#edf0f5;color:var(--p-ink);font:15px/1.5 system-ui,-apple-system,"Segoe UI",sans-serif;text-align:left;isolation:isolate}
#practice[hidden],#practice [hidden]{display:none!important}
#practice *{box-sizing:border-box;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
#practice input:not([type=range]):not([type=checkbox]),#practice textarea,#practice [contenteditable=true]{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}
#practice[data-home=true] .practice-stage,#practice[data-home=true] .practice-toolbar,#practice[data-home=true] .practice-rail,#practice[data-home=true] .practice-current-brush{visibility:hidden}
#practice svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0;pointer-events:none}
#practice [data-practice-icon]{display:inline-flex;align-items:center;justify-content:center;pointer-events:none}
#practice button{font:inherit;line-height:1.3;letter-spacing:0;min-height:44px;border:1px solid transparent;border-radius:9px;padding:10px 14px;background:var(--p-blue);color:#fff;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
#practice button.secondary{background:#f5f6f8;border-color:var(--p-border);color:var(--p-ink)}
#practice button:disabled{opacity:.35;cursor:default}
#practice button:focus-visible,#practice input:focus-visible,#practice select:focus-visible,#practice summary:focus-visible{outline:3px solid #8db8f4;outline-offset:2px}
#practice button.practice-danger{color:#b8333b;background:#fff3f3;border-color:#f0d3d5}
#practice .practice-stage{position:absolute;inset:calc(64px + env(safe-area-inset-top)) 0 0;overflow:hidden;touch-action:none;background:#fff;color-scheme:light;color-scheme:only light}
#practice[data-focus=true] .practice-stage{inset:0}
/* The paper stays white while its transparent live-ink layer is cleared or resized. */
#practice-canvas{background-color:#fff}
#practice-live,#practice-erase-paper{background-color:transparent}
#practice-erase-paper{pointer-events:none}
#practice-pad canvas{position:absolute;inset:0;width:100%;height:100%;touch-action:none;user-select:none;-webkit-user-select:none}
#practice .practice-toolbar{position:absolute;inset:0 0 auto;height:calc(64px + env(safe-area-inset-top));padding:env(safe-area-inset-top) max(12px,env(safe-area-inset-right)) 0 max(12px,env(safe-area-inset-left));display:flex;align-items:center;gap:16px;background:rgba(255,255,255,.97);border:0;border-bottom:1px solid var(--p-border);box-shadow:0 2px 14px #17203306;color:var(--p-ink);z-index:2}
#practice .practice-toolbar button,#practice .practice-rail button,#practice .practice-current-brush,#practice .practice-icon-button,#practice .practice-text-button{background:transparent;color:var(--p-ink);border:0}
#practice .practice-gallery-button{display:flex;align-items:center;gap:8px;padding:8px 10px;font-weight:650}
#practice .practice-document{min-width:0;flex:1;display:flex;flex-direction:column;gap:1px}
#practice-document-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:600}
#practice-save-state{font-size:11px;color:var(--p-muted)}
#practice .practice-main-tools{display:flex;align-items:center;gap:4px}
#practice .practice-main-tools button{width:52px;height:54px;padding:5px 3px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border-radius:8px}
#practice .practice-main-tools span:not([data-practice-icon]){font-size:10px}
#practice button[aria-pressed=true]{color:var(--p-blue);background:#edf4ff}
#practice .practice-rail{position:absolute;left:max(12px,env(safe-area-inset-left));top:calc(var(--p-toolbar-height) + env(safe-area-inset-top) + 8px);bottom:calc(48px + env(safe-area-inset-bottom));margin:auto 0;height:max-content;max-height:calc(100% - var(--p-toolbar-height) - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 56px);width:54px;padding:6px 4px;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none;display:flex;flex-direction:column;align-items:center;gap:4px;border:1px solid var(--p-border);border-radius:13px;background:rgba(255,255,255,.96);box-shadow:0 4px 20px #1720330b;z-index:1}
#practice .practice-rail::-webkit-scrollbar{display:none}
#practice .practice-rail>*{flex:none}
#practice .practice-rail button{width:44px;min-height:42px;padding:8px;display:flex;align-items:center;justify-content:center}
#practice .practice-size-chip{display:flex;flex-direction:column;align-items:center;gap:0;padding:3px 0}
#practice-size-direct{width:42px;min-width:0;height:38px;border:1px solid var(--p-border);border-radius:6px;padding:2px 0;text-align:center;font:600 16px system-ui;color:var(--p-ink);background:#fff;appearance:textfield;-moz-appearance:textfield;touch-action:manipulation}
#practice-size-direct::-webkit-inner-spin-button,#practice-size-direct::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
#practice-size-label{font-size:15px;font-weight:700;font-variant-numeric:tabular-nums}
#practice .practice-size-chip small{font-size:9px;color:var(--p-muted)}
#practice-size-slider{writing-mode:vertical-lr;direction:rtl;width:34px;height:176px;min-height:0;margin:5px 0;padding:0;accent-color:var(--p-blue);touch-action:none;background:transparent;cursor:pointer}
#practice .practice-current-brush{position:absolute;left:max(16px,env(safe-area-inset-left));bottom:calc(12px + env(safe-area-inset-bottom));max-width:35%;min-height:32px;padding:5px 10px;border:1px solid var(--p-border);background:rgba(255,255,255,.94);font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-shadow:0 2px 8px #17203306}
#practice .practice-status{position:absolute;right:calc(116px + env(safe-area-inset-right));bottom:calc(14px + env(safe-area-inset-bottom));max-width:min(calc(65% - 132px),600px);margin:0;padding:4px 8px;color:var(--p-muted);font-size:11px;line-height:1.45;pointer-events:none;text-align:right;background:rgba(255,255,255,.9);border-radius:6px;z-index:2}
#practice .practice-status[data-error=true]{color:#a42b1c;background:#fff0e9;border:1px solid #f1c8b4;pointer-events:auto;font-size:13px}
#practice .practice-restore{position:absolute;top:calc(12px + env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right));display:flex;align-items:center;gap:8px;background:#fff;color:var(--p-blue);border:1px solid var(--p-border);box-shadow:0 3px 16px #17203312;z-index:4}
#practice[data-focus=true] .practice-toolbar,#practice[data-focus=true] .practice-rail,#practice[data-focus=true] .practice-current-brush{display:none}
#practice .practice-quick-dock{position:absolute;right:max(12px,env(safe-area-inset-right));top:calc(80px + env(safe-area-inset-top));bottom:calc(65px + env(safe-area-inset-bottom));width:58px;height:max-content;max-height:calc(100dvh - 160px);overflow-y:auto;display:flex;flex-direction:column;gap:4px;padding:5px;border:1px solid var(--p-border);border-radius:12px;background:rgba(255,255,255,.96);box-shadow:0 4px 18px #1720330b;z-index:3;overscroll-behavior:contain;touch-action:pan-y}
#practice .practice-quick-button,#practice .practice-quick-customize{width:46px;min-height:49px;padding:5px 1px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;background:transparent;color:var(--p-ink);border-radius:8px;font-size:10px}
#practice .practice-quick-button[aria-pressed=true]{color:var(--p-blue);background:#edf4ff}
#practice .practice-quick-customize{border-top:1px solid var(--p-border);border-radius:0 0 8px 8px;color:var(--p-muted)}
#practice .practice-quick-list{display:flex;flex-direction:column;gap:8px;margin-bottom:16px}
#practice .practice-quick-row{display:flex;align-items:center;gap:6px;min-width:0;padding:7px 3px;border-bottom:1px solid var(--p-border)}
#practice .practice-quick-handle{min-width:36px;min-height:44px;padding:6px;touch-action:none;cursor:grab;background:#f5f6f8;color:var(--p-muted)}
#practice .practice-quick-name{flex:1;min-width:0;font-size:12px;color:var(--p-ink)}
#practice .practice-quick-move{min-width:32px;min-height:40px;padding:5px;background:#f5f6f8;color:var(--p-ink)}
#practice .practice-quick-row input[type=checkbox]{width:20px;height:20px;accent-color:var(--p-blue);flex:none}
#practice .practice-quick-row[data-dragging=true]{opacity:.45}
#practice .practice-quick-row[data-drop=true]{border-top:3px solid var(--p-blue)}
#practice .practice-quick-list[data-drop-end=true]{border-bottom:3px solid var(--p-blue)}
#practice[data-home=true] .practice-quick-dock{visibility:hidden}
#practice[data-focus=true] .practice-quick-dock{display:none}
#practice[data-focus=true] .practice-status:not([data-error=true]){display:none}
#practice dialog{color:var(--p-ink);background:#fff;box-shadow:0 16px 70px #17203329;overscroll-behavior:contain;border:1px solid var(--p-border);font:inherit;padding:0;z-index:10}
#practice dialog::backdrop{background:#1720332e}
#practice .practice-panel::backdrop{background:transparent}
#practice h1,#practice h2,#practice h3{color:var(--p-ink);line-height:1.3;letter-spacing:0}
#practice h1{font-size:29px;margin:2px 0 0}
#practice h2{font-size:19px;margin:0}
#practice .practice-icon-button{width:44px;height:44px;padding:10px;display:flex;align-items:center;justify-content:center}
#practice .practice-gallery{width:100%;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;inset:0;border:0;border-radius:0;background:#f5f6f8;overflow:auto;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}
#practice .practice-gallery-empty{margin:40px 28px;text-align:center;color:var(--p-muted);line-height:1.9}
#practice .practice-gallery-card[aria-pressed=true]{background:#edf4ff;outline:3px solid var(--p-blue);outline-offset:5px}
#practice .practice-gallery-heading{display:flex;justify-content:space-between;align-items:center;padding:24px 28px 10px;gap:20px}
#practice .practice-eyebrow{font-size:10px;letter-spacing:.1em;color:var(--p-muted)}
#practice .practice-gallery-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:8px 28px 12px}
#practice .practice-gallery-actions span{font-size:12px;color:var(--p-muted);margin-left:auto}
#practice .practice-gallery-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px;padding:14px 28px 32px}
#practice .practice-gallery-card{padding:0;text-align:left;background:transparent;color:var(--p-ink);min-width:0;border-radius:10px;display:flex;flex-direction:column;gap:6px}
#practice .practice-gallery-card[aria-current=true]{background:transparent;color:var(--p-blue)}
#practice .practice-gallery-card canvas{display:block;width:100%;aspect-ratio:1;height:auto;background:#fff;border:1px solid #dfe3ea;border-radius:7px;box-shadow:0 3px 12px #17203308}
#practice .practice-gallery-card[aria-current=true] canvas{border:2px solid var(--p-blue)}
#practice .practice-gallery-card strong{display:block;width:100%;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:3px 2px 0;font-weight:600}
#practice .practice-gallery-card small{font-size:11px;color:var(--p-muted);padding:0 2px}
#practice .practice-panel{position:fixed;inset:calc(76px + env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) auto auto;margin:0;width:360px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 104px - env(safe-area-inset-top));border-radius:15px;overflow:auto}
#practice .practice-panel-heading{position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 12px 9px 20px;background:#fff;border-bottom:1px solid #edf0f5;z-index:2}
#practice .practice-panel>section{padding:14px 20px 22px}
#practice .practice-feedback{margin:0;padding:0 20px;font-size:12px;color:var(--p-muted)}
#practice .practice-feedback:empty{display:none}
#practice .practice-feedback[data-error=true]{padding:12px 20px;color:#a42b1c;background:#fff0e9}
#practice .practice-panel label{display:block;font-size:12px;margin:0 0 14px;color:var(--p-muted)}
#practice .practice-panel input:not([type=checkbox]),#practice .practice-panel select{display:block;width:100%;height:43px;min-height:43px;margin-top:5px;padding:8px 10px;font:16px system-ui;background:#fff;color:var(--p-ink);border:1px solid var(--p-border);border-radius:8px}
#practice .practice-check{display:flex;align-items:center;gap:9px;font-size:13px!important;color:var(--p-ink)!important}
#practice .practice-check input{width:19px;height:19px;accent-color:var(--p-blue);margin:0;flex-shrink:0}
#practice .practice-hint{font-size:12px;line-height:1.6;color:var(--p-muted);margin:0 0 14px}
#practice .practice-eraser-heading{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:4px 12px;margin:18px 0 10px}
#practice .practice-eraser-heading h3{font-size:13px;margin:0;font-weight:600}
#practice-erase-size-label{font-size:11px;color:var(--p-muted);font-variant-numeric:tabular-nums}
#practice .practice-eraser-presets{display:grid;grid-template-columns:repeat(auto-fit,minmax(48px,1fr));gap:6px;margin:0 0 12px;min-width:0}
#practice .practice-eraser-preset{min-width:48px;min-height:88px;padding:5px 2px;display:flex;flex-direction:column;align-items:center;gap:2px;border:1px solid var(--p-border);background:#f5f6f8;color:var(--p-ink);border-radius:9px}
#practice .practice-eraser-preset[aria-pressed=true]{border-color:var(--p-blue);background:#edf4ff;color:var(--p-blue)}
#practice .practice-eraser-circle{height:44px;width:100%;display:flex;align-items:center;justify-content:center;flex:none;pointer-events:none}
/* Every dot uses the same 1/24 scale; no minimum diameter changes the ratios. */
#practice .practice-eraser-dot{display:block;width:var(--eraser-dot);height:var(--eraser-dot);flex:none;border-radius:50%;background:currentColor;pointer-events:none}
#practice [data-practice-erase-size="80"]{--eraser-dot:3.333333px}
#practice [data-practice-erase-size="160"]{--eraser-dot:6.666667px}
#practice [data-practice-erase-size="240"]{--eraser-dot:10px}
#practice [data-practice-erase-size="480"]{--eraser-dot:20px}
#practice [data-practice-erase-size="960"]{--eraser-dot:40px}
#practice .practice-eraser-step{font-size:11px;font-weight:600;white-space:nowrap;pointer-events:none}
#practice .practice-eraser-name{font-size:10px;line-height:1.3;color:var(--p-muted);pointer-events:none}
#practice .practice-eraser-advanced{margin:0 0 16px;border-top:1px solid #edf0f5}
#practice .practice-eraser-advanced summary{color:var(--p-muted);font-weight:400}
#practice .practice-actions{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}
#practice .practice-action-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0}
#practice .practice-action-grid button{font-size:13px;padding:10px 7px;background:#f5f6f8;color:var(--p-ink);border-color:var(--p-border)}
#practice .practice-action-grid button[aria-pressed=true]{color:var(--p-blue);border-color:#b7d1f6;background:#edf4ff}
#practice hr{height:1px;border:0;background:#edf0f5;margin:22px 0}
#practice .practice-menu-list{display:flex;flex-direction:column;gap:8px}
#practice .practice-menu-list button{text-align:left;color:var(--p-ink);background:#f5f6f8;padding:14px}
#practice .practice-menu-list span{display:block;font-size:11px;color:var(--p-muted);margin-top:5px}
#practice .practice-brush-list{display:flex;flex-direction:column;gap:2px}
#practice-brush-setup{padding:0 0 8px;margin:0 0 16px;border-bottom:1px solid var(--p-border)}
#practice-brush-setup h3{font-size:15px;margin:0 0 10px}
#practice-brush-setup button{width:100%;margin:0 0 12px}
#practice .practice-brush-row{display:flex;align-items:stretch;gap:4px;border-bottom:1px solid #edf0f5}
#practice .practice-brush-choice{display:flex;flex-direction:column;flex:1;min-width:0;padding:10px 8px;color:var(--p-ink);background:transparent;text-align:left;gap:4px}
#practice .practice-brush-choice[aria-pressed=true]{background:#edf4ff;color:var(--p-blue)}
#practice .practice-brush-choice span{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;font-weight:550}
#practice .practice-brush-choice canvas{width:100%;height:32px;display:block}
#practice .practice-brush-edit-button{align-self:center;min-width:44px;padding:8px 5px;background:transparent;color:var(--p-muted);font-size:11px}
#practice .practice-text-button{padding:7px 0;min-height:36px;font-size:12px;color:var(--p-blue);margin-bottom:8px}
#practice-fields details{border-top:1px solid #edf0f5;margin:12px 0}
#practice summary{padding:12px 0;cursor:pointer;font-size:13px;font-weight:600}
#practice .practice-field-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 12px;padding-top:5px}
#practice .practice-confirm-dialog{width:min(680px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);border-radius:15px;padding:24px;overflow:auto;overflow-wrap:anywhere;scroll-padding-block:12px 92px}
/* Security fields are a vertical form, independent of the floating panels. */
#practice .practice-confirm-dialog>label:not(.practice-check){display:block;min-width:0;margin:16px 0 0;font-size:14px;color:var(--p-ink)}
#practice .practice-confirm-dialog input:not([type=checkbox]),#practice .practice-confirm-dialog textarea{display:block;width:100%;max-width:100%;min-width:0;min-height:44px;margin-top:6px;padding:10px 12px;font:16px/1.5 system-ui;background:#fff;color:var(--p-ink);border:1px solid var(--p-border);border-radius:8px}
#practice .practice-confirm-dialog textarea{resize:vertical;white-space:pre-wrap;overflow-wrap:anywhere}
#practice .practice-confirm-dialog .practice-check{align-items:flex-start;margin:16px 0;line-height:1.55}
#practice .practice-confirm-dialog .practice-check input{margin-top:2px;flex:none}
#practice .practice-confirm-dialog .practice-actions{position:sticky;bottom:0;margin:16px 0 0;padding:12px 0 0;background:#fff;border-top:1px solid #edf0f5}
#practice .practice-confirm-dialog .practice-actions button{flex:1 1 150px;min-width:0;overflow-wrap:anywhere}
#practice-security-title{margin:0 0 10px!important}
#practice-security-error:empty{display:none}
#practice-security-error{margin-top:14px;color:#a42b1c}
@media(max-width:480px){#practice .practice-confirm-dialog{padding:18px}#practice .practice-confirm-dialog .practice-actions button{flex-basis:110px}}
#practice-dialog-context{font-size:14px;line-height:1.7}
#practice-differences fieldset{border:1px solid var(--p-border);border-radius:9px;padding:12px;margin:12px 0}
#practice-differences legend{font-size:13px}
#practice-differences select{max-width:100%;font:14px system-ui;min-height:40px}
#practice-differences pre{white-space:pre-wrap;font:12px/1.5 system-ui}
@media(max-width:1000px){#practice .practice-gallery-grid{grid-template-columns:repeat(3,minmax(0,1fr))}#practice .practice-toolbar{gap:6px}#practice .practice-main-tools button{width:46px}#practice .practice-document{max-width:200px}}
@media(max-width:650px){#practice{--p-toolbar-height:100px}#practice .practice-stage{inset:calc(100px + env(safe-area-inset-top)) 0 0}#practice[data-focus=true] .practice-stage{inset:0}#practice .practice-toolbar{height:calc(100px + env(safe-area-inset-top));flex-wrap:wrap;gap:0 8px;align-content:center;padding-bottom:3px}#practice .practice-gallery-button{height:40px;min-height:40px;font-size:13px}#practice .practice-document{max-width:none}#practice .practice-main-tools{width:100%;justify-content:space-between}#practice .practice-main-tools button{height:48px;width:44px;min-height:44px}#practice .practice-panel{top:calc(110px + env(safe-area-inset-top));max-height:calc(100dvh - 124px - env(safe-area-inset-top))}#practice .practice-gallery{width:100vw;height:100dvh;max-height:100dvh;border:0;border-radius:0}#practice .practice-gallery-heading{padding:20px 18px 10px}#practice .practice-gallery-actions{padding:8px 18px}#practice .practice-gallery-actions span{display:none}#practice .practice-gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 16px;padding:14px 18px 28px}#practice .practice-rail{left:max(8px,env(safe-area-inset-left))}#practice-size-slider{height:130px}#practice .practice-current-brush{max-width:42%;font-size:10px}#practice .practice-status{max-width:52%;font-size:10px}}
@media(orientation:landscape) and (max-height:600px){#practice-size-slider{height:80px}#practice .practice-rail button{min-height:36px;height:36px}#practice .practice-current-brush{bottom:6px}#practice .practice-status{bottom:6px}}

/* Small contextual controls; the drawing area remains the primary surface. */
.practice-node-tools,.practice-recovery{position:absolute;z-index:7;right:16px;bottom:80px;left:96px;display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end;pointer-events:none}.practice-node-tools[hidden]{display:none}.practice-node-tools button,.practice-recovery button{pointer-events:auto;min-height:40px;border:1px solid #dce3e5;box-shadow:0 2px 12px #17203315}.practice-recovery{bottom:132px}.practice-recovery:has(button:not([hidden])){background:#fff7e8;padding:8px;border-radius:8px}

#practice .practice-panel{right:max(82px,env(safe-area-inset-right));max-width:calc(100vw - 94px)}
@media(max-width:600px){#practice .practice-quick-dock{right:6px;top:calc(110px + env(safe-area-inset-top));width:52px;padding:2px}#practice .practice-panel{right:66px;max-width:calc(100vw - 78px)}}
#practice .practice-quick-name{display:flex!important;align-items:center;gap:7px;margin:0!important}

#practice .practice-password-field{display:block;position:relative;min-width:0;margin-top:6px}
#practice .practice-confirm-dialog .practice-password-field input{margin-top:0;padding-right:54px}
#practice .practice-password-toggle{position:absolute;right:2px;top:2px;bottom:2px;width:46px;min-height:40px;padding:10px;display:flex;align-items:center;justify-content:center;color:var(--p-muted);background:transparent;border:0;border-radius:6px;touch-action:manipulation}
#practice .practice-password-toggle svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
#practice .practice-password-toggle[aria-pressed=true] .practice-eye-slash{display:none}
#practice .practice-selection-tools{position:absolute;left:max(72px,env(safe-area-inset-left));right:max(82px,env(safe-area-inset-right));bottom:calc(58px + env(safe-area-inset-bottom));z-index:6;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:6px;pointer-events:none}
#practice .practice-selection-tools[hidden],#practice[data-home=true] .practice-selection-tools{display:none}
#practice .practice-selection-tools button,#practice .practice-selection-tools span{pointer-events:auto;min-height:44px;box-shadow:0 2px 12px #17203315}
#practice .practice-selection-tools span{display:flex;align-items:center;background:#fff;border:1px solid var(--p-border);border-radius:8px;padding:8px;font-size:12px}

/* Persistent view percentage; tapping returns to 100% at the paper centre. */
#practice .practice-view-percent{position:absolute;right:max(16px,env(safe-area-inset-right));bottom:calc(12px + env(safe-area-inset-bottom));min-width:88px;min-height:32px;padding:5px 10px;border:1px solid var(--p-border);background:rgba(255,255,255,.94);color:var(--p-ink);font:600 12px/1.5 system-ui;font-variant-numeric:tabular-nums;z-index:3}
#practice[data-home=true] .practice-view-percent{visibility:hidden}
@media(max-width:650px){#practice .practice-current-brush{max-width:calc(35% - 16px)}#practice .practice-status{max-width:calc(65% - 132px)}}

/* Conceal paper and controls while its short native-file capability is suspended. */
#practice[data-native-picker=hidden]>*{visibility:hidden!important}
#practice[data-native-picker=hidden] .practice-picker-cover,#practice[data-native-picker=hidden] .practice-picker-cover *{visibility:visible!important}
#practice .practice-picker-cover{position:absolute;inset:0;width:100%;height:100%;max-width:100vw;max-height:100dvh;margin:0;border:0;z-index:100;background:#edf0f5;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:16px;text-align:center;padding:24px}
#practice .practice-picker-cover::backdrop{background:#edf0f5}

#practice-loading{box-sizing:border-box;max-width:calc(100vw - 32px);width:360px;padding:28px;border:1px solid #dfe3ea;border-radius:16px;background:#fff;color:#172033;text-align:center;font:15px/1.6 system-ui}
#practice-loading::backdrop{background:#17203366}
#practice-loading h2{font-size:19px;margin:14px 0 8px}
#practice-loading p{margin:8px 0}
.practice-loading-spinner{width:32px;height:32px;margin:auto;border:3px solid #dfe3ea;border-top-color:#1769e0;border-radius:50%;animation:practice-loading-spin .9s linear infinite}
@keyframes practice-loading-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.practice-loading-spinner{animation:none}}

/* Device verification dialogs also work while the practice shell is locked. */
#practice-device-dialog,#practice-device-cover{box-sizing:border-box;width:min(92vw,520px);max-height:85dvh;overflow-y:auto;overflow-x:hidden;padding:24px;border:1px solid #d6dfeb;border-radius:16px;background:#fff;color:#1c2a40}
#practice-device-dialog .practice-actions{display:flex;flex-wrap:wrap;gap:10px}
#practice-device-dialog p,#practice-device-cover p{overflow-wrap:anywhere;line-height:1.6}
/* Stack the saved widths inside the rail; similar values share the same column. */
#practice-size-marks{display:grid;width:100%;gap:2px}
#practice-size-marks:empty{display:none}
#practice #practice-size-marks .practice-width-mark{
  display:flex;align-items:center;justify-content:center;width:100%;min-width:0;
  height:44px;min-height:44px;padding:0;background:transparent;color:#536176;border-radius:7px;
}
#practice #practice-size-marks .practice-width-mark[aria-pressed=true]{background:#dceaff;color:#124d9f;box-shadow:inset 0 0 0 1px #87ace2}
#practice .practice-width-sample{display:block;width:24px;max-width:100%;border-radius:8px;background:currentColor;pointer-events:none}
#practice .practice-rail :focus-visible{outline-offset:-3px}
#practice-widths-list>div{display:flex;gap:4px}#practice-widths-list button:first-child{flex:1}
#practice[data-private-away=true]>*{visibility:hidden!important}
#practice[data-private-away=true] #practice-away-cover,#practice[data-private-away=true] #practice-security{visibility:visible!important}
#practice .practice-away-cover:not([hidden]){position:absolute;inset:0;z-index:100;display:grid;align-content:center;justify-items:center;background:#edf1f6;color:#172033}
