:root {
  color-scheme:light;
  --canvas:#f7f4fa; --paper:var(--canvas); --card:var(--canvas); --surface:#fffcff;
  --ink:#382d49; --heading:var(--ink); --muted:#65596d; --link:#4e42a6;
  --line:#d0c4d9; --owner-line:var(--line); --strong-line:#a795b2; --field-line:#95839f;
  --subtle:#eee8f3; --hover-surface:#e7def1; --selected:#dfd4f2; --on-selected:#362768;
  --action:#4e42a6; --on-action:white; --primary-hover:#403489; --focus:#5845ae;
  --red:#8a414e; --closed:#f5e6e9; --past:#786f80; --panel-shadow:#291d391a;
  --foot:#e9e0ed; --on-foot:var(--ink); --foot-sub:#584d62;
  --linen-opacity:.72; --linen-filter:grayscale(1) contrast(1.18) brightness(.94);
  --quiet-panel:color-mix(in srgb,var(--surface) 92%,transparent);
  color:var(--ink); background:var(--canvas);
}
:root[data-theme="dark"] {
  color-scheme:dark;
  --canvas:#211d2b; --surface:#2a2434;
  --ink:#f3edf9; --muted:#cdc1d8; --link:#c7bbff;
  --line:#51465c; --strong-line:#776682; --field-line:#897796;
  --subtle:#312a3c; --hover-surface:#42374e; --selected:#4b3e65; --on-selected:#f4ecff;
  --action:#c7bbff; --on-action:#292044; --primary-hover:#d5ccff; --focus:#c7bbff;
  --red:#f3b5c1; --closed:#402d38; --past:#a59aad; --panel-shadow:#100d1940;
  --foot:#362d41; --foot-sub:#ddd1e6;
  --linen-opacity:.68; --linen-filter:grayscale(1) invert(1) contrast(1.12) brightness(1.25);
}
.home,.owner-body { isolation:isolate; }
.home::before,.owner-body::before {
  content:""; position:fixed; inset:0; z-index:-1; pointer-events:none;
  background:url("/static/studio-linen.webp") center / cover no-repeat;
  opacity:var(--linen-opacity); filter:var(--linen-filter); mix-blend-mode:luminosity;
}
@media(max-aspect-ratio:1/1) { .home::before,.owner-body::before { background-position:4% center; } }
@media print, (forced-colors:active) { .home::before,.owner-body::before { display:none; } }
h1,h2,.sign-brand,.portal-head .brand{color:var(--heading)}
.primary{background:var(--action);color:var(--on-action);border-radius:100px;box-shadow:0 3px 10px var(--panel-shadow)}
.primary:hover{background:var(--primary-hover)}
.modes a[aria-current],.date-cell[aria-current],#calendar button[aria-pressed=true],#times button[aria-pressed=true]{background:var(--selected);color:var(--on-selected);box-shadow:inset 0 0 0 1.5px var(--link)}
dialog{box-shadow:0 20px 84px var(--panel-shadow)}
dialog::backdrop{background:rgb(25 19 38 / 52%)}
.dialog-head,.page-editor .dialog-head{background:var(--paper)}
.theme-toggle{display:grid;place-items:center;min-width:38px;min-height:40px;padding:7px;border:0;border-radius:4px;background:transparent;color:var(--link)}
.theme-toggle:hover{background:var(--hover-surface)}.theme-toggle svg{width:19px;height:19px;stroke:currentColor;fill:none;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.6}
.theme-toggle .sun,:root[data-theme=dark] .theme-toggle .moon{display:none}:root[data-theme=dark] .theme-toggle .sun{display:block}
#settings,#details,.appointment-edit,.login-form{accent-color:var(--action)}
input:not([type=checkbox]), select, textarea {
  min-height:44px; border-radius:8px; color:var(--ink); line-height:1.4;
}
textarea { resize:vertical; }
input:not([type=checkbox]):focus, select:focus, textarea:focus { border-color:var(--focus); }
.secondary, #retry { border-radius:8px; color:var(--link); }
.secondary:enabled:hover, #retry:hover { background:var(--hover-surface); }
.account-tools { gap:4px; }
.account-tools .theme-toggle, .account-tools .language-picker summary, .account-tools .account-link {
  min-height:44px; border-radius:22px;
}
.account-tools .theme-toggle, .account-tools .language-picker summary { min-width:44px; justify-content:center; }
.account-tools a.account-link, .account-tools button.account-link {
  padding-inline:12px; border:1px solid var(--strong-line); background:var(--quiet-panel);
}
.account-tools a.account-link:hover, .account-tools button.account-link:hover { background:var(--hover-surface); }
.account-tools .language-picker nav { border-radius:10px; padding:5px; box-shadow:0 10px 28px var(--panel-shadow); }
.language-picker nav a { min-height:40px; border-radius:6px; }
.language-picker nav a[aria-current]::after { content:"✓"; margin-inline-start:auto; color:var(--link); }
.skip-link { position:fixed; top:8px; left:8px; z-index:20; padding:8px 15px; border-radius:6px;
  background:var(--surface); color:var(--link); transform:translateY(calc(-100% - 20px)); }
.skip-link:focus { transform:none; }
@media (prefers-reduced-motion:no-preference) {
  .account-tools :is(button,a,summary), .primary, .secondary, .package-choice, .portal-nav a, .date-cell {
    transition:background-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
  }
}
a.home-link {
  color:var(--heading); margin:0; min-width:44px; min-height:44px;
  width:fit-content; border-radius:4px; text-decoration:none;
}
.home-link span { border-color:var(--strong-line); letter-spacing:-.05em; }
.home-link b { font:32px/1.12 var(--serif); }
.login-top .home-link b { font-size:24px; }
.home-link small { color:var(--muted); border-left:1px solid var(--line); padding-left:14px; }
a.home-link:hover span, a.home-link:focus-visible span { background:var(--hover-surface); }
@media(max-width:700px) {
  .home-link small { display:none; }
  .home-link { gap:8px; }
  .home-link span { width:28px; height:34px; font-size:20px; }
}
@media(max-width:480px) { .home-link b { display:none; } }
@media(min-width:701px){.portal{max-width:1310px}}
@media(max-width:700px){.theme-toggle{min-width:40px;min-height:42px}}
@media(max-width:420px){.account-tools{gap:2px}}
