/* ─── Work, treatment and book pages (modern bento system) ─── */
.err { font-size: 13.5px; color: #9B3526; font-weight: 500; }
.err:empty { display: none; }

/* Page head (Work) */
.page-head { display: grid; gap: 20px; margin-top: 12px; padding: clamp(36px, 6vw, 72px); border-radius: var(--r-xl); background: var(--deep); color: var(--bg); }
.page-head h1 { font-size: clamp(3.2rem, 8vw, 7rem); letter-spacing: -.045em; }
.page-head h1 em { color: var(--lime); }
.page-head .muted { color: rgba(244,241,234,.75); }
.page-head .label { color: var(--lime); }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filters button { min-height: 42px; padding: 0 18px; border-radius: 99px; background: rgba(244,241,234,.08); color: var(--bg); font-weight: 600; font-size: 14.5px; background-image: none; }
.filters button[aria-current] { background: var(--bg); color: var(--ink); }

/* Work grid: bento-style cards, varied sizes */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.tile { display: flex; flex-direction: column; gap: 0; overflow: hidden; margin: 0; border-radius: var(--r-xl); background: #fff; }
.tile__open { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--blush); }
.tile__open img { transition: transform .8s var(--ease); }
.tile:hover .tile__open img { transform: scale(1.05); }
.tile figcaption { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; font-size: 14px; }
.tile__title { font: 600 1.05rem/1.3 var(--display); letter-spacing: -.02em; }
.gallery__end { display: flex; justify-content: center; padding: 48px 0 0; }

/* Viewer: dark, immersive */
.viewer { position: fixed; inset: 0; z-index: 90; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: center; padding: 72px clamp(20px, 6vw, 110px); background: rgba(28,30,18,.96); color: var(--bg); }
.viewer[hidden] { display: none; }
.viewer__photo { position: relative; display: grid; place-items: center; height: 100%; max-height: calc(100svh - 144px); margin: 0; }
.viewer__photo picture { height: 100%; }
.viewer__photo img { height: 100%; width: auto; max-width: 100%; object-fit: contain; border-radius: var(--r-lg); }
.viewer__info { display: grid; gap: 14px; justify-items: start; padding: 28px; border-radius: var(--r-xl); background: rgba(244,241,234,.06); }
.viewer__info .label { color: var(--lime); }
.viewer__title { font-size: 2.2rem; }
.viewer__info .muted { color: rgba(244,241,234,.72); }
.viewer__book { background: var(--bg); color: var(--ink); }
.viewer__book:hover { background: var(--lime); }
.viewer__btn { position: fixed; width: 52px; height: 52px; border-radius: 50%; background: rgba(244,241,234,.1); color: var(--bg); font-size: 1.2rem; transition: background .2s; }
.viewer__btn:hover { background: rgba(244,241,234,.22); }
.viewer__prev { left: 20px; top: 50%; } .viewer__next { right: 20px; top: 50%; } .viewer__close { right: 20px; top: 20px; }

/* Treatment page: photo tile + configurator panel */
.tp { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; margin-top: 12px; }
.tp > * { min-width: 0; }
.tp__photo { position: sticky; top: 96px; margin: 0; aspect-ratio: 4 / 5; border-radius: var(--r-xl); }
.tp__form { display: grid; gap: 22px; padding: clamp(24px, 4vw, 48px); border-radius: var(--r-xl); background: #fff; }
.tp__form > .label a { background: none; }
.tp__name { font-size: clamp(2.8rem, 5vw, 4.6rem); }
.tp__live { display: flex; align-items: baseline; flex-wrap: wrap; gap: 14px; }
.tp__price { font: 600 3rem/1 var(--display); letter-spacing: -.04em; }
.tp__live .muted { padding: 6px 12px; border-radius: 99px; background: var(--bg); font-weight: 600; font-size: 14px; color: var(--ink); }
.opt { display: grid; gap: 10px; padding-top: 20px; border-top: 1px solid var(--line); }
.opt legend { padding: 0; margin-bottom: 10px; font: 600 12.5px/1 var(--text); letter-spacing: .08em; text-transform: uppercase; color: var(--olive); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill input, .extra input, .check input, .toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pill span { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 99px; background: var(--bg); font-weight: 600; font-size: 14.5px; cursor: pointer; transition: background .2s, color .2s; }
.pill span:hover { background: #E9E4D8; }
.pill input:checked + span { background: var(--ink); color: var(--bg); }
.pill input:focus-visible + span, .extra input:focus-visible ~ .tick, .check input:focus-visible + span, .toggle input:focus-visible + .toggle__ui { outline: 2px solid var(--olive); outline-offset: 3px; }
.pill svg { width: 12px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.extras { display: grid; gap: 6px; }
.extra { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 58px; padding: 0 8px 0 18px; border-radius: var(--r-md); background: var(--bg); cursor: pointer; font-weight: 600; }
.extra .muted { margin-left: 6px; font-weight: 400; font-size: 13.5px; }
.tick { width: 26px; height: 26px; flex: none; margin-right: 10px; border-radius: 8px; box-shadow: inset 0 0 0 1.5px var(--ink); transition: background .2s; }
.extra input:checked ~ .tick { background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F4F1EA' stroke-width='3'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 16px no-repeat; }
.counter { display: inline-flex; align-items: center; gap: 4px; }
.counter button { width: 40px; height: 40px; border-radius: 50%; background: #fff; font-size: 1.2rem; }
.counter output { min-width: 2ch; text-align: center; }
.extra__nudge { padding: 12px 18px; border-radius: var(--r-md); background: var(--lime); font-size: 14px; color: var(--ink); }
.extra__nudge .line-link { background-image: linear-gradient(currentColor, currentColor); }
.tp__sure { display: flex; flex-wrap: wrap; gap: 6px; }
.tp__sure li { padding: 6px 12px; border-radius: 99px; background: var(--bg); font-size: 13.5px; }

/* Book */
.book { margin-top: 12px; transition: opacity .4s var(--ease); }
.book.is-fading { opacity: 0; }
.book__title { padding: clamp(32px, 5vw, 64px); border-radius: var(--r-xl); background: var(--deep); color: var(--bg); font-size: clamp(2.8rem, 6vw, 5.6rem); letter-spacing: -.045em; }
.book__title em { color: var(--lime); }
.book__grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 12px; align-items: start; margin-top: 12px; }
.empty { display: grid; gap: 18px; justify-items: start; padding: 40px; border-radius: var(--r-xl); background: #fff; }
.steps3 { display: grid; gap: 12px; }
.step { border-radius: var(--r-xl); background: #fff; }
.step__head button { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 80px; padding: 0 28px; text-align: left; font: 600 1.6rem/1.2 var(--display); letter-spacing: -.03em; }
.step__n { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--bg); font: 600 13px/1 var(--text); letter-spacing: 0; }
.step.is-open .step__n, .step.is-done .step__n { background: var(--ink); color: var(--bg); }
.step__done { margin-left: auto; font: 500 14px/1.4 var(--text); letter-spacing: 0; }
.step:not(.is-done) .step__done { display: none; }
.step:not(.is-open):not(.is-done) { opacity: .55; }
.step__body { display: grid; gap: 20px; padding: 0 28px 30px; }
.step__body > .btn { justify-self: start; }
.dates { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.date { flex: none; display: grid; justify-items: center; gap: 4px; width: 64px; padding: 12px 0; border-radius: var(--r-md); background: var(--bg); }
.date .label { font-size: 11px; color: inherit; }
.date__n { font: 600 1.5rem/1 var(--display); }
.date:disabled { opacity: .35; cursor: not-allowed; text-decoration: line-through; }
.date.is-on, .time.is-on { background: var(--ink); color: var(--bg); }
.times { display: flex; flex-wrap: wrap; gap: 6px; }
.time { min-width: 88px; min-height: 46px; padding: 0 16px; border-radius: 99px; background: var(--bg); font-weight: 600; font-size: 15px; }
.time:disabled { opacity: .35; cursor: not-allowed; }
.date:not(:disabled):not(.is-on):hover, .time:not(:disabled):not(.is-on):hover { background: #E9E4D8; }
.reasons { display: grid; gap: 2px; font-size: 13.5px; }
.reasons:empty { display: none; }
.when-line { padding: 14px 18px; border-radius: var(--r-md); background: var(--lime); font-weight: 600; font-size: 15px; max-width: none; }
.when-line:empty { display: none; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { position: relative; }
.field input, .field textarea { width: 100%; min-height: 60px; padding: 24px 16px 8px; border: 1.5px solid transparent; border-radius: var(--r-md); background: var(--bg); resize: vertical; transition: border-color .2s, background .2s; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); background: #fff; }
.field label { position: absolute; left: 17px; top: 19px; color: var(--muted); pointer-events: none; transform-origin: left top; transition: transform .2s var(--ease); }
.field input:focus + label, .field input:not(:placeholder-shown) + label, .field textarea:focus + label, .field textarea:not(:placeholder-shown) + label { transform: translateY(-11px) scale(.78); }
.field input[aria-invalid="true"] { border-color: #9B3526; }
.toggle { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 0 18px; border-radius: var(--r-md); background: var(--blush); cursor: pointer; font-weight: 600; }
.toggle .muted { font-weight: 400; }
.toggle__ui { position: relative; width: 46px; height: 28px; flex: none; border-radius: 99px; background: rgba(28,30,18,.18); transition: background .2s; }
.toggle__ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); }
.toggle input:checked + .toggle__ui { background: var(--ink); }
.toggle input:checked + .toggle__ui::after { transform: translateX(18px); }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: var(--r-md); background: var(--bg); cursor: pointer; font-size: 14.5px; }
.check span::before { content: ""; display: inline-block; width: 20px; height: 20px; margin: 0 12px -4px 0; border-radius: 6px; box-shadow: inset 0 0 0 1.5px var(--ink); }
.check input:checked + span::before { background: var(--ink); }

/* Summary */
.summary { position: sticky; top: 96px; }
.summary__bar { display: none; }
.summary__body { display: grid; gap: 16px; padding: 28px; border-radius: var(--r-xl); background: var(--ink); color: var(--bg); }
.summary__body .label { color: var(--lime); }
.summary__items li { display: grid; grid-template-columns: 1fr auto 30px; gap: 10px; align-items: start; padding: 12px 0; border-bottom: 1px solid rgba(244,241,234,.14); }
.summary__items li > div { display: grid; }
.summary__items .muted { color: rgba(244,241,234,.6); }
.summary__x { width: 30px; height: 30px; border-radius: 50%; background: rgba(244,241,234,.1); color: var(--bg); }
.summary dl div { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14.5px; }
.summary dd { margin: 0; font-weight: 600; }
.summary__now { margin-top: 6px; padding: 12px 14px !important; border-radius: var(--r-md); background: var(--lime); color: var(--ink); }
.summary__body > .muted { color: rgba(244,241,234,.65); }

/* Confirmation */
.done { display: grid; gap: 24px; justify-items: start; margin-top: 12px; padding: clamp(32px, 6vw, 72px); border-radius: var(--r-xl); background: var(--deep); color: var(--bg); opacity: 0; transition: opacity .8s var(--ease); }
.done.is-showing { opacity: 1; }
.done:focus { outline: none; }
.done h1 { font-size: clamp(2.8rem, 6vw, 5.4rem); letter-spacing: -.045em; }
.done h1 em { color: var(--lime); }
.done__list { display: grid; gap: 8px; width: 100%; max-width: 720px; }
.done__list div { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 14px 18px; border-radius: var(--r-md); background: rgba(244,241,234,.06); }
.done__list .label { color: var(--lime); }
.done__acts { display: flex; flex-wrap: wrap; gap: 10px; }
.done .btn { background: var(--bg); color: var(--ink); }
.done .btn--line { background: transparent; color: var(--bg); box-shadow: inset 0 0 0 1.5px rgba(244,241,234,.5); }
.done .muted { color: rgba(244,241,234,.7); }
.book-faq { padding-block: clamp(56px, 8vw, 100px) 0; }
.book-faq .faq { max-width: 860px; }
.book-faq__title { margin-bottom: 28px; }

@media (max-width: 1000px) {
  .gallery { grid-template-columns: 1fr 1fr; }
  .tp, .book__grid { grid-template-columns: 1fr; }
  .tp__photo { position: static; }
  .summary { order: -1; top: 88px; z-index: 5; }
  .summary__bar { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 56px; padding: 0 22px; border-radius: 99px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: 14.5px; box-shadow: 0 10px 24px rgba(28,30,18,.2); }
  .summary__body { display: none; margin-top: 8px; }
  .summary.is-open .summary__body { display: grid; }
  .viewer { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; padding: 80px 16px 90px; }
  .viewer__photo { max-height: 56svh; }
  .viewer__prev, .viewer__next { top: auto; bottom: 20px; }
}
@media (max-width: 640px) {
  .gallery { grid-template-columns: 1fr 1fr; gap: 8px; }
  .tile figcaption { flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; }
  .two { grid-template-columns: 1fr; }
  .done__list div { grid-template-columns: 1fr; gap: 2px; }
  .step__head button { font-size: 1.35rem; padding: 0 20px; }
  .step__body { padding: 0 20px 24px; }
}
