:root {
  color-scheme: dark;
  --black: #08090b;
  --white: #f8f8f6;
  --silver: #c7cdd2;
  --ink: var(--white);
  --muted: #b7c1c9;
  --line: #434a52;
  --surface: #121519;
  --soft: #1c2025;
  --danger: #ffcecb;
  --gutter: clamp(.85rem, 4vw, 3.75rem);
  font-family: Arial, Helvetica, sans-serif;
  font-synthesis: none;
  color: var(--ink);
  background: var(--black);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overscroll-behavior: none; }
body {
  height: 100vh; height: 100dvh;
  display: grid; grid-template-rows: auto minmax(0, 1fr); grid-template-columns: minmax(0, 1fr);
  overflow: clip; line-height: 1.4;
}
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { line-height: 1.12; }
h1 { font-size: clamp(1.65rem, 4vw, 3.4rem); letter-spacing: -.052em; }
h2 { font-size: clamp(1.3rem, 2.7vw, 2.1rem); letter-spacing: -.035em; }
h3 { font-size: 1.05rem; }
a { color: inherit; text-underline-offset: .2em; }
button, input, select { color: inherit; font: inherit; }
button, select, input[type=checkbox] { cursor: pointer; }
button:disabled, input:disabled, select:disabled { cursor: default; opacity: .55; }
:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
[hidden] { display: none !important; }
.visually-hidden, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.skip-link:focus { position: fixed; top: .3rem; left: .3rem; z-index: 4; padding: .55rem; background: var(--white); color: var(--black); }
.muted, .form-help, .demo-note { color: var(--muted); font-size: .9rem; }

.app-header {
  display: flex; justify-content: space-between; align-items: center; gap: .75rem;
  min-height: clamp(3.25rem, 8dvh, 5rem);
  padding: max(.5rem, env(safe-area-inset-top)) var(--gutter) .5rem;
  border-bottom: 1px solid var(--line);
}
.brand, .header-tools, .language-switch { display: flex; align-items: center; }
.brand { gap: .65rem; white-space: nowrap; line-height: 1; }
.brand-mark {
  font: 900 35px/.9 Impact, 'Arial Black', sans-serif; letter-spacing: -.1em; padding-right: 4px;
  background: linear-gradient(170deg,#fff 5%,#89939d 31%,#fff 45%,#677481 53%,#f0f5fa 73%,#a0a9b3 94%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-name { display: grid; gap: .25rem; }
.brand-name strong { font: 900 1.07rem/1 'Arial Black', Arial, sans-serif; letter-spacing: .015em; }
.brand-name > span { color: var(--silver); font-size: .55rem; letter-spacing: .13em; }
.header-tools { gap: clamp(.8rem, 3vw, 2rem); }
.salon-link { font-size: .9rem; text-decoration-color: var(--muted); white-space: nowrap; }
.language-switch { gap: .15rem; }
.language-switch::before { content: "/"; order: 1; color: var(--muted); }
.language-switch button { padding: .45rem .15rem; background: transparent; border: 0; color: var(--muted); font-size: .87rem; }
.language-switch button:last-child { order: 2; }
.language-switch [aria-pressed=true] { color: white; font-weight: bold; }

.workspace, .access-screen {
  width: min(100% - 2 * var(--gutter), 68rem); margin-inline: auto; min-height: 0; min-width: 0;
}
.workspace {
  display: grid; grid-template: "heading" auto "content" minmax(0, 1fr) "nav" auto / minmax(0, 1fr);
  gap: clamp(.65rem, 2.5dvh, 1.75rem);
  padding-top: clamp(.8rem, 3dvh, 2.5rem); padding-bottom: max(.4rem, env(safe-area-inset-bottom));
}
.workspace-heading {
  grid-area: heading; display: flex; align-items: center; justify-content: space-between; gap: .6rem;
}
.demo-info-button { border: 1px solid var(--line); white-space: nowrap; color: var(--silver); background: transparent; font-size: .84rem; padding: .42rem .65rem; }
.section-nav {
  grid-area: nav; display: grid; grid-template-columns: repeat(4,minmax(0,1fr));
  padding: 0; border-top: 1px solid var(--line);
}
.section-nav :is(button, a) {
  min-width: 0; min-height: 2.85rem; border: 0; border-top: 2px solid transparent; margin-top: -1px;
  display: grid; place-content: center; padding: .4rem .15rem;
  background: transparent; color: var(--muted); font-size: clamp(.85rem, 1.6vw, 1rem); text-decoration: none; white-space: nowrap;
}
.section-nav [aria-selected=true], .section-nav :is(button, a):hover { color: white; border-top-color: var(--white); }
.section-nav [aria-selected=true] { font-weight: 700; }
.panel {
  grid-area: content; min-height: 0; min-width: 0; align-self: start;
  border: 1px solid var(--line); padding: clamp(.9rem, 2.4vw, 1.7rem);
  background: var(--surface); overflow-wrap: anywhere;
}
.section-heading, .dialog-heading, .calendar-toolbar, .calendar-heading, .period-controls, .availability-line, .dialog-actions {
  display: flex; justify-content: space-between; align-items: center; gap: .7rem;
}
.section-heading { margin-bottom: .9rem; }
.section-heading p, .calendar-heading p { margin-top: .3rem; }
.access-screen { grid-row: 2; align-self: center; }
.access-screen p { margin: .65rem 0 1rem; }
.eyebrow { color: var(--silver); text-transform: uppercase; font-size: .76rem; letter-spacing: .1em; }
.button, .icon-button, .demo-info-button, .view-switch button {
  line-height: 1.2; border-radius: 2px; transition: background-color .12s, color .12s;
}
.button, .icon-button, .view-switch button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.55rem; padding: .44rem .8rem; background: var(--soft); border: 1px solid var(--line); font-size: .94rem; }
.icon-button { min-width: 2.55rem; padding-inline: .5rem; }
.button.primary, .view-switch [aria-pressed=true] { color: var(--black); background: var(--white); border-color: var(--white); font-weight: 600; }
.button:hover:not(:disabled), .icon-button:hover:not(:disabled), .demo-info-button:hover { border-color: var(--silver); }
.button.primary:hover:not(:disabled) { background: var(--silver); }
.button.danger { color: var(--danger); border-color: #836768; }
.text-button { padding: .35rem .05rem; background: transparent; border: 0; text-decoration: underline; text-underline-offset: .2em; font-size: .9rem; }
.notice, .form-error { font-size: .87rem; padding: .45rem .65rem; border-left: 2px solid var(--silver); color: var(--white); background: var(--soft); }
.notice { margin-top: .6rem; }
.form-error, .notice.error { color: var(--danger); border-color: var(--danger); }
.surface, .day-card, .service-item { min-width: 0; border: 1px solid var(--line); }
.surface { padding: .8rem; }
.appointment-actions, .appointment-topline, .view-switch { display: flex; align-items: center; gap: .5rem; }
.appointment-actions { flex-wrap: wrap; }
.appointment-time, .price-preview { font-weight: 700; }
.appointment-state { color: var(--silver); border: 1px solid var(--line); padding: .1rem .35rem; font-size: .8rem; }
.appointment-phone, .appointment-details, .appointment-reference, .empty-day, .block-item p { color: var(--muted); font-size: .87rem; }
.empty-day { padding: .8rem; }
.form-stack { display: grid; gap: .75rem; }
.form-stack > .button { justify-self: start; }
form label { display: grid; gap: .25rem; min-width: 0; font-size: .9rem; font-weight: 600; }
input, select { min-width: 0; max-width: 100%; width: 100%; min-height: 2.55rem; padding: .4rem .55rem; background: var(--black); color: var(--white); border: 1px solid #626971; border-radius: 2px; font-size: 1rem; font-weight: 400; }
select { padding-right: .4rem; }
input[type=checkbox] { width: 1.1rem; min-height: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--white); }
.checkbox-label { display: flex; align-items: center; gap: .45rem; font-size: .9rem; font-weight: 400; cursor: pointer; }
.two-columns, .hours-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; }
.hours-row > strong, [data-weekday] { text-transform: capitalize; }
.block-item, .day-block { overflow-wrap: anywhere; }
dialog {
  width: min(32rem, calc(100% - 1.5rem)); max-height: calc(100dvh - 1.5rem); color: var(--white);
  padding: clamp(1rem, 3vw, 1.65rem); background: var(--surface); border: 1px solid #67717b;
}
dialog::backdrop { background: rgb(3 4 6 / 80%); }
.dialog-heading { align-items: start; margin-bottom: .85rem; }
.dialog-heading .icon-button { flex-shrink: 0; }
.dialog-actions { justify-content: flex-end; }
.confirm-dialog > p { margin: .6rem 0 1rem; white-space: pre-line; }
.notification-strip { margin: 1rem 0; padding-block: .9rem; display: grid; gap: .55rem; border-block: 1px solid var(--line); }
.notification-strip h2 { font-size: 1.08rem; }
.notification-strip > div { display: flex; align-items: baseline; justify-content: space-between; gap: .4rem; font-size: .9rem; }
.notification-strip strong { color: var(--silver); text-align: right; }
#demo-fallback .demo-panel { display: none; }
#demo-fallback .demo-panel:target, #demo-fallback:not(:has(.demo-panel:target)) #demo-rendez-vous { display: block; }
.demo-list { display: grid; margin: .7rem 0 0; padding: 0; list-style: none; }
.demo-list li { display: flex; justify-content: space-between; gap: .7rem; align-items: baseline; border-top: 1px solid var(--line); padding: .42rem 0; }
.demo-list li strong { white-space: nowrap; }
.demo-list li span { color: var(--silver); text-align: right; }
@media (min-height: 780px) and (min-width: 720px) {
  .workspace { padding-top: min(5dvh, 3.5rem); gap: min(3.6dvh, 2rem); }
  .panel { padding: 1.7rem 2.1rem; }
  .section-nav :is(button,a) { min-height: 3.6rem; }
}
@media (max-width: 40rem) {
  .section-nav { grid-template-columns: 1.2fr 1fr 1fr 1fr; }
  .brand-mark { font-size: 27px; }
  .brand-name strong { font-size: .92rem; }
  .brand-name > span { font-size: .49rem; }
  .header-tools { gap: .55rem; }
  .salon-link { font-size: .84rem; }
  .workspace { gap: .6rem; }
  .panel { padding: .85rem; }
  .workspace-heading .demo-note { max-width: 48%; font-size: .73rem; }
  .demo-info-button { padding: .35rem .45rem; }
}
@media (max-width: 24rem) {
  .brand { gap: .35rem; }
  .brand-name > span { letter-spacing: .035em; }
  .section-nav :is(button,a) { font-size: .8rem; }
}
@media (max-width: 22rem) {
  .app-header .brand-name > span { display: none; }
  .app-header { gap: .35rem; }
}
@media (max-height: 610px) {
  .workspace { padding-top: .45rem; gap: .42rem; }
  .workspace-heading h1 { font-size: 1.45rem; }
  .app-header { min-height: 2.55rem; padding-block: .22rem; }
  .section-nav :is(button,a) { min-height: 2.55rem; }
  .panel { padding: .65rem .8rem; }
}
@media (orientation: landscape) and (max-height: 480px) {
  .workspace { width: min(100% - 1.4rem, 68rem); grid-template: "heading nav" auto "content content" minmax(0, 1fr) / auto 1fr; column-gap: 1.2rem; padding-bottom: .3rem; }
  .workspace-heading { justify-content: flex-start; }
  .workspace-heading h1 { font-size: 1.1rem; }
  .section-nav { border: 0; }
  .section-nav :is(button,a) { min-height: 2rem; border-width: 0 0 1px; border-style: solid; border-color: var(--line); font-size: .82rem; }
  .section-nav [aria-selected=true] { border-bottom-color: var(--white); }
  .section-heading { margin-bottom: .4rem; }
  .section-heading h2 { font-size: 1.17rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
