/* Native proficiency dialog: closed dialogs keep the browser's display:none.
   Two IDs contain the necessary overrides of the older global button theme. */
body.profile-level-open { overflow:hidden; }
html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog {
 --level-ink:#27364b; --level-muted:#64748b; --level-line:#dfe6ef; --level-accent:#365fba;
 box-sizing:border-box; position:fixed; inset:0; width:min(520px,calc(100vw - 48px));
 max-width:calc(100vw - 48px); max-height:calc(100vh - 48px); max-height:calc(100dvh - 48px);
 margin:auto; padding:0; overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain;
 border:1px solid var(--level-line); border-radius:12px; background:#fff; color:var(--level-ink);
 box-shadow:0 20px 70px #14233b26; font-family:inherit; animation:none; transition:none;
}
html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog::backdrop { background:rgb(20 33 53 / 42%); animation:none; transition:none; }
html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog .profile-level-form { position:relative; box-sizing:border-box; min-width:0; margin:0; padding:26px; }
html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog .profile-level-heading { display:flex; align-items:center; gap:14px; min-width:0; padding-right:30px; }
html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog .profile-level-icon { display:grid; place-items:center; flex:0 0 42px; width:42px; height:42px; border:1px solid #e1e9f6; border-radius:8px; background:#f1f5fc; color:var(--level-accent); }
html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog .profile-level-icon .icon { width:22px; height:22px; }
html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog #profile-level-title { min-width:0; margin:0; font-size:23px; font-weight:650; line-height:1.45; letter-spacing:0; overflow-wrap:anywhere; }
html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog #profile-level-title [data-i18n] { color:inherit; font:inherit; }
html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog .profile-level-description { margin:12px 0 18px; color:var(--level-muted); font-size:14px; line-height:1.8; overflow-wrap:anywhere; }
html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog .profile-level-close { position:absolute; top:12px; right:12px; display:grid; place-items:center; width:44px; height:44px; min-height:44px; margin:0; padding:10px; border:0; border-radius:6px; background:transparent; color:#748299; box-shadow:none; cursor:pointer; animation:none; transition:none; transform:none; }
html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog .profile-level-close .icon { width:20px; height:20px; }
html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog .profile-level-close:hover { background:#f1f5f9; color:#334155; }
html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog .profile-level-options { display:grid; gap:8px; min-width:0; min-inline-size:0; margin:0; padding:0; border:0; }
html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog .profile-level-option { position:relative; display:grid; grid-template-columns:76px minmax(0,1fr) 20px; align-items:center; gap:4px 12px; box-sizing:border-box; min-width:0; min-height:68px; margin:0; padding:12px; border:1px solid var(--level-line); border-radius:8px; background:#fff; cursor:pointer; animation:none; transition:none; }
html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog .profile-level-option input[type=radio][name=level] { position:absolute; width:1px; height:1px; min-width:0; min-height:0; margin:0; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; opacity:0; }
html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog .profile-level-badge { grid-column:1; grid-row:1 / 3; display:inline-flex; align-items:center; justify-content:center; min-height:32px; padding:5px 7px; border:1px solid #e1e7f0; border-radius:5px; background:#f6f8fc; color:#53657e; font-size:12px; font-weight:650; line-height:1.5; white-space:nowrap; }
html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog .profile-level-copy { grid-column:2; grid-row:1; display:block; min-width:0; color:var(--level-ink); }
html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog .profile-level-copy strong { display:block; margin:0 0 3px; font-size:14px; font-weight:600; line-height:1.55; overflow-wrap:anywhere; }
html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog .profile-level-copy>span:not(.profile-level-current) { display:block; color:var(--level-muted); font-size:12px; line-height:1.65; overflow-wrap:anywhere; }
html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog .profile-level-current { display:inline-flex; align-items:center; width:fit-content; max-width:100%; margin-top:4px; padding:1px 6px; border:1px solid #d9e4f5; border-radius:3px; background:#f4f7fd; color:#5271a8; font-size:10px; font-weight:500; line-height:1.65; overflow-wrap:anywhere; }
html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog .profile-level-option>.profile-level-current { grid-column:2; grid-row:2; justify-self:start; margin-top:0; }
html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog .profile-level-check { grid-column:3; grid-row:1 / 3; display:grid; place-items:center; width:20px; height:20px; color:var(--level-accent); opacity:0; }
html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog .profile-level-check .icon { width:20px; height:20px; }
html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog .profile-level-option:hover { border-color:#bccce5; background:#fafcff; }
html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog .profile-level-option:has(input:checked) { border-color:#6f8fc7; background:#f1f5fc; }
html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog .profile-level-option:has(input:checked) .profile-level-badge { border-color:var(--level-accent); background:var(--level-accent); color:#fff; }
html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog .profile-level-option:has(input:checked) .profile-level-check { opacity:1; }
html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog .profile-level-option:has(input:focus-visible) { outline:2px solid #365fba; outline-offset:3px; }
html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog .profile-level-option:has(input:disabled) { cursor:default; }
html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog .profile-level-error { margin:16px 0 0; color:#a94747; font-size:13px; line-height:1.7; overflow-wrap:anywhere; }
html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog .profile-level-error:empty { margin:0; }
html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog .profile-level-actions { display:flex; flex-wrap:wrap; gap:12px; margin:22px 0 0; padding:20px 0 0; border-top:1px solid #e8edf4; }
html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog .profile-level-actions .btn { --btn-h:44px; --btn-r:6px; flex:1 1 140px; min-width:0; min-height:44px!important; padding:10px 16px!important; border-radius:6px!important; font-size:14px!important; line-height:1.5!important; white-space:normal; text-align:center; box-shadow:none!important; transform:none!important; animation:none!important; transition:none!important; }
html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog .profile-level-actions .btn:not(.secondary) { border-color:var(--level-accent)!important; background:var(--level-accent)!important; color:#fff!important; }
html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog .profile-level-actions .btn:not(.secondary):hover:not(:disabled) { border-color:#2e51a1!important; background:#2e51a1!important; }
html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog .profile-level-actions .btn.secondary { border-color:#d7e0ec!important; background:#fff!important; color:#455873!important; }
html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog .profile-level-actions .btn.secondary:hover:not(:disabled) { border-color:#b8c8e0!important; background:#f6f9fd!important; }
html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog .profile-level-actions .btn:disabled { opacity:.6; cursor:default; }
html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog :is(.profile-level-close,.profile-level-actions .btn):focus-visible { outline:2px solid #365fba; outline-offset:3px; box-shadow:none!important; }

@media (max-width:600px) {
 html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog { inset:auto 12px 0; width:calc(100vw - 24px); max-width:calc(100vw - 24px); max-height:calc(100vh - 24px); max-height:calc(100dvh - 24px); margin:0; border-radius:8px 8px 0 0; border-bottom:0; }
 html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog .profile-level-form { padding:22px 18px calc(20px + env(safe-area-inset-bottom,0px)); }
 html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog #profile-level-title { font-size:21px; }
 html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog .profile-level-description { margin:12px 0 18px; font-size:13px; }
 html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog .profile-level-option { grid-template-columns:68px minmax(0,1fr) 18px; gap:3px 10px; min-height:72px; padding:12px; }
 html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog .profile-level-badge { padding:5px; font-size:11px; }
 html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog .profile-level-check,
 html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog .profile-level-check .icon { width:18px; height:18px; }
 html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog .profile-level-actions { gap:10px; margin-top:18px; padding-top:16px; }
 html.atelier-theme body #modal-root dialog#profile-level-dialog.profile-level-dialog .profile-level-actions .btn { flex-basis:calc(50% - 5px); }
}
