/* Lina 2026: restrained site, client Mini App and master workspace. */
:root {
  --color-bg: #fff;
  --color-surface: #fff;
  --color-text: #252b31;
  --color-text-muted: #5b6876;
  --color-action: #222a32;
  --color-action-text: #fff;
  --color-copper: #4d6278;
  --color-border: #d7dfe7;
  --color-control-border: #aebccc;
  --font-editorial: "Onest", system-ui, sans-serif;
  --radius-control: 3px;
  --radius-media: 0;
  --radius-dialog: 5px;
}

html, body { background: #fff; }
button, input, textarea, select { font-family: var(--font-ui); }
[hidden] { display: none !important; }

/* Website */
.site-landing { display: block; color: var(--color-text); }
.admin-view .site-landing, .telegram-app .site-landing { display: none; }
html.site-booking-focus .site-intro, html.site-booking-focus .site-results { display: none; }
.site-topbar {
  height: 62px; display: flex; justify-content: space-between;
  align-items: center; gap: 24px; padding: 0 clamp(20px, 4vw, 54px);
  border-bottom: 1px solid var(--color-border);
}
.site-topbar a, .site-intro a { text-decoration: none; }
.site-wordmark { color: var(--color-text); font-size: 27px; font-weight: 600; letter-spacing: -.07em; }
.site-topbar-location { color: var(--color-text-muted); font-size: 12px; }
.site-intro {
  max-width: 1240px; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(250px, .65fr);
  gap: clamp(24px, 4vw, 52px); align-items: stretch; margin: auto;
  padding: 30px clamp(20px, 4vw, 54px);
}
.site-intro-copy { display: flex; flex-direction: column; align-items: flex-start; }
.site-eyebrow {
  width: min(100%, 560px); display: flex; gap: 20px;
  color: var(--color-copper); font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase;
}
.site-eyebrow span + span::before { content: '·'; margin-right: 20px; }
.site-intro h1 {
  max-width: 740px; margin: 20px 0 14px; font-family: var(--font-ui);
  font-size: clamp(48px, 5.1vw, 68px); font-weight: 600; letter-spacing: -.07em; line-height: 1.02;
}
.site-intro-copy > p { max-width: 450px; margin: 0; color: var(--color-text-muted); font-size: 15px; line-height: 1.5; }
.site-intro-actions { display: flex; align-items: center; margin-top: 21px; }
.site-primary-link {
  min-height: 46px; display: inline-flex; align-items: center; gap: 32px; padding: 0 17px;
  color: #fff; background: var(--color-action); font-size: 14px; font-weight: 600;
}
.site-intro-portrait { width: 100%; height: 305px; min-height: 0; object-fit: cover; object-position: 50% 24%; }
.site-results { max-width: 1240px; margin: auto; padding: 25px clamp(20px, 4vw, 54px) 28px; border-top: 1px solid var(--color-border); }
.site-results-heading { display: grid; grid-template-columns: 1fr auto; gap: 4px 28px; align-items: end; margin-bottom: 18px; }
.site-results-heading > span { grid-column: 1/-1; color: var(--color-copper); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.site-results-heading h2, .works-panel-heading h2 { margin: 0; font-size: clamp(30px, 3vw, 40px); font-weight: 600; letter-spacing: -.06em; line-height: 1.05; }
.site-results-heading p { max-width: 360px; margin: 0 0 2px; color: var(--color-text-muted); font-size: 13px; line-height: 1.4; }
.site-results-grid, .client-works-grid { display: grid; gap: 10px; }
.work-picker { min-width: 0; display: flex; gap: 5px; overflow-x: auto; scrollbar-width: none; }
.work-picker::-webkit-scrollbar { display: none; }
.work-picker button { min-height: 40px; display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; padding: 0 14px; border: 1px solid var(--color-border); color: var(--color-text-muted); background: #fff; cursor: pointer; font-size: 12px; }
.work-picker button[aria-pressed="true"] { border-color: var(--color-action); color: #fff; background: var(--color-action); }
.work-picker button span { font-size: 10px; opacity: .65; }
.work-picker button .work-picker-title-full { font-size: 12px; opacity: 1; }
.work-picker button .work-picker-title-short { display: none; }
.site-results-grid .result-work-card { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr); }
.site-results-grid .result-work-comparison { height: 305px; }
.site-results-grid .result-work-copy { display: flex; flex-direction: column; justify-content: center; padding: 24px 30px; }
.site-results-grid .result-work-foot { margin-top: 20px; }
.example-disclosure { margin: 12px 0 0; color: var(--color-text-muted); font-size: 11px; line-height: 1.4; }

/* Image comparisons */
.result-work-card { min-width: 0; border: 1px solid var(--color-border); background: #fff; }
.result-work-comparison { position: relative; height: 380px; overflow: hidden; background: #e8e9e9; touch-action: pan-y; }
.result-work-comparison img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 41%; }
.result-work-before { clip-path: inset(0 calc(100% - var(--position)) 0 0); }
.result-work-divider { position: absolute; z-index: 2; top: 0; bottom: 0; left: var(--position); width: 2px; background: #fff; transform: translateX(-50%); pointer-events: none; }
.result-work-divider i { position: absolute; top: 50%; left: 50%; width: 42px; height: 42px; display: grid; place-items: center; transform: translate(-50%, -50%); border-radius: 50%; color: var(--color-action); background: #fff; font-style: normal; font-size: 19px; box-shadow: 0 2px 9px #0002; }
.result-work-label { position: absolute; z-index: 2; top: 16px; padding: 9px 10px; color: #fff; background: #252b31e8; font-size: 11px; font-weight: 600; pointer-events: none; }
.result-work-label-before { left: 16px; }
.result-work-label-after { right: 16px; }
.result-work-comparison input[type="range"] { position: absolute; z-index: 3; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.result-work-copy { padding: 20px 23px 24px; }
.result-work-copy > span { color: var(--color-copper); font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; }
.result-work-copy h3 { margin: 9px 0 5px; font-size: 25px; font-weight: 600; letter-spacing: -.055em; line-height: 1.13; }
.result-work-copy p { min-height: 34px; margin: 0; color: var(--color-text-muted); font-size: 13px; line-height: 1.45; }
.result-work-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-top: 22px; font-size: 13px; }
.result-work-foot strong { white-space: nowrap; }
.result-work-foot button { padding: 0 0 4px; border: 0; border-bottom: 1px solid var(--color-copper); color: var(--color-copper); background: transparent; cursor: pointer; white-space: nowrap; font-size: 13px; }

/* Booking surface shares the same language as the site. */
html:not(.admin-view):not(.telegram-app) .app-main { width: 100%; max-width: none; margin: 0; padding: 0; }
html:not(.admin-view):not(.telegram-app) .client-shell { min-height: 0; display: block; }
html:not(.admin-view):not(.telegram-app) .client-editorial { display: none; }
html:not(.admin-view):not(.telegram-app) .client-workspace { width: min(100%, 1240px); min-height: 0; display: block; margin: 0 auto; padding: 18px clamp(20px, 4vw, 54px) 38px; background: #fff; }
.site-back-link { display: none; }
html.site-booking-focus .site-back-link { min-height: 32px; display: inline-flex; align-items: center; padding: 0; color: var(--color-copper); background: transparent; cursor: pointer; font-size: 12px; }
html.site-booking-focus .client-workspace { min-height: calc(100dvh - 62px); }
html:not(.admin-view) .web-notice { display: none !important; }
html:not(.admin-view):not(.telegram-app) .client-nav { height: auto; display: flex; gap: 24px; margin: 0 0 8px; border-bottom: 1px solid var(--color-border); }
html:not(.admin-view):not(.telegram-app) .client-nav-button[data-client-view="works"] { display: none; }
html:not(.admin-view) .client-nav-button, html:not(.admin-view) .client-nav-button:first-child, html:not(.admin-view) .client-nav-button:last-child {
  width: auto; min-height: 42px; padding: 0 0 8px; border: 0; border-bottom: 2px solid transparent;
  border-radius: 0; color: var(--color-text-muted); background: transparent; font-size: 14px; font-weight: 500;
}
html:not(.admin-view) .client-nav-button.active { color: var(--color-text); border-bottom-color: var(--color-copper); background: transparent; font-weight: 600; }
html:not(.admin-view):not(.telegram-app) #view-booking { margin-top: 0; }
html:not(.admin-view):not(.telegram-app) .calendar-card { border-top: 0; }
html:not(.admin-view):not(.telegram-app) .booking-step-services .step-title { padding-top: 14px; }
html:not(.admin-view):not(.telegram-app) .service-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 18px; margin-top: 7px; }
html:not(.admin-view) .service-photo, html:not(.admin-view) .summary-thumb { display: none; }
html:not(.admin-view) .service-card-with-photo { grid-template-columns: 1fr; gap: 0; }
html:not(.admin-view):not(.telegram-app) .service-card { min-height: 68px; gap: 0; padding: 9px 0; }
html:not(.admin-view):not(.telegram-app) .service-body h3 { font-size: 16px; font-weight: 600; letter-spacing: -.035em; }
html:not(.admin-view):not(.telegram-app) .service-meta { margin-top: 4px; color: var(--color-text-muted); font-size: 12px; }
html:not(.admin-view):not(.telegram-app) .booking-step-services .step-title h2 { font-family: var(--font-ui); font-size: 29px; font-weight: 600; letter-spacing: -.05em; }
html:not(.admin-view) .booking-layout { align-items: start; }
html:not(.admin-view) .calendar-card { border-color: var(--color-border); }
html:not(.admin-view) .time-grid > .empty-state { grid-column: 1 / -1; width: 100%; }
html:not(.admin-view) .primary-button, html:not(.admin-view) .secondary-button { border-radius: 3px; }
.works-panel { max-width: 800px; margin: 0 auto; }
.works-panel-heading { padding: 12px 0 27px; }
.works-panel-heading > span { color: var(--color-copper); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.works-panel-heading h2 { margin-top: 12px; font-size: clamp(32px, 6vw, 48px); }
.works-panel-heading p { max-width: 510px; color: var(--color-text-muted); font-size: 14px; line-height: 1.5; }
.client-works-grid { display: grid; gap: 10px; }
.client-works-grid .result-work-comparison { height: auto; aspect-ratio: 4 / 3; }

/* Master workspace */
.admin-view .admin-page-title, .admin-view .owner-today-title, .admin-view .admin-section-title, .admin-view .selected-work-date, .admin-view .upcoming-windows h2 {
  font-family: var(--font-ui); font-weight: 600; letter-spacing: -.055em;
}
.admin-view .admin-page-title, .admin-view .owner-today-title { font-size: clamp(31px, 6vw, 42px); }
.admin-view .owner-today-accent { background: var(--color-copper); }
.admin-view .tabs { grid-template-columns: repeat(5, minmax(0, 1fr)); border-top-color: var(--color-border); }
.admin-view .tab { font-size: 12px; }
.admin-view .tab.active::after { background: var(--color-copper); }
.admin-view .owner-nearest, .admin-view .owner-agenda-row, .admin-view .admin-booking-card, .admin-view .service-admin-row { border-color: var(--color-border); }
.works-admin-intro { margin: 18px 0 25px; color: var(--color-text-muted); font-size: 14px; line-height: 1.5; }
.master-works-empty { width: 100%; min-width: 0; max-width: 100%; overflow: hidden; padding: 27px 0 29px; border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.master-works-empty h2 { margin: 0 0 7px; font-size: 20px; font-weight: 600; letter-spacing: -.045em; }
.master-works-empty p { max-width: 570px; margin: 0 0 23px; color: var(--color-text-muted); font-size: 13px; line-height: 1.55; }
.master-example-strip { width: 100%; min-width: 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.master-example-strip figure { min-width: 0; margin: 0; }
.master-example-strip img { width: 100%; height: 195px; display: block; object-fit: cover; object-position: center 40%; }
.master-example-strip figcaption { display: flex; justify-content: space-between; gap: 9px; padding: 10px 0; font-size: 12px; font-weight: 600; }
.master-example-strip small { color: var(--color-text-muted); font-size: 10px; font-weight: 400; }
.work-admin-row { display: grid; grid-template-columns: 74px minmax(0,1fr) auto; gap: 14px; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--color-border); }
.work-admin-row img, .work-admin-placeholder { width: 74px; height: 90px; object-fit: cover; background: #f1f3f5; }
.work-admin-placeholder { display: grid; place-items: center; color: var(--color-text-muted); font-size: 10px; text-align: center; }
.work-admin-row h3 { margin: 0 0 5px; font-size: 15px; line-height: 1.3; }
.work-admin-row p { margin: 0; color: var(--color-text-muted); font-size: 12px; }
.work-admin-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.work-admin-actions button { min-height: 36px; padding: 0; border: 0; color: var(--color-copper); background: transparent; cursor: pointer; font-size: 12px; }
.work-admin-actions button:last-child { color: #a33b39; }
.work-editor-panel { margin-top: 28px; }
.work-editor { display: grid; gap: 20px; padding-bottom: 32px; }
.work-editor label:not(.checkbox-label) { display: grid; gap: 9px; color: var(--color-text); font-size: 13px; font-weight: 600; }
.work-editor input[type="text"], .work-editor select, .work-editor textarea { width: 100%; min-height: 48px; padding: 12px; border: 1px solid var(--color-border); border-radius: 3px; color: var(--color-text); background: #fff; font-size: 15px; }
.work-photo-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.work-editor .work-photo-field { position: relative; min-height: 225px; display: flex !important; flex-direction: column; justify-content: space-between; padding: 16px; border: 1px dashed var(--color-control-border); cursor: pointer; }
.work-photo-field > span { color: var(--color-copper); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.work-photo-field > strong { display: grid; place-items: center; flex: 1; color: var(--color-copper); font-size: 14px; font-weight: 600; text-align: center; }
.work-photo-field input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.work-photo-field:focus-within { outline: 2px solid var(--color-copper); outline-offset: 3px; }
.work-photo-field img { max-width: 100%; max-height: 160px; object-fit: cover; object-position: center; }
.work-photo-field img:not([hidden]) { position: absolute; inset: 36px 12px 37px; width: calc(100% - 24px); height: calc(100% - 73px); max-height: none; }
.work-photo-field:has(img:not([hidden])) > strong { visibility: hidden; }
.work-photo-field small { color: var(--color-text-muted); font-size: 11px; font-weight: 400; }
.work-upload-status { margin: -8px 0 0; color: var(--color-text-muted); font-size: 12px; }
.work-editor .form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.work-editor .form-actions button { min-height: 46px; padding: 0 16px; }

@media (min-width: 1024px) {
  .admin-view .tabs { grid-template-columns: 1fr; grid-template-rows: repeat(5,72px); background: #f8f9fb; }
  .admin-view .tab { font-size: 14px; }
  .admin-view .tab.active { background: #fff; }
  html:not(.admin-view):not(.telegram-app) .client-workspace { display: block; }
}

@media (max-width: 767px) {
  .site-topbar { height: 52px; padding: 0 18px; }
  .site-wordmark { font-size: 23px; }
  .site-topbar-location { font-size: 10px; text-align: right; }
  .site-intro { grid-template-columns: minmax(0, 1fr) minmax(110px, 34%); gap: 14px; padding: 20px 18px 23px; }
  .site-eyebrow { display: block; font-size: 10px; }
  .site-eyebrow span + span { display: none; }
  .site-intro h1 { margin: 14px 0 12px; font-size: clamp(32px, 8vw, 42px); line-height: 1.06; }
  .site-intro-copy > p { font-size: 12px; line-height: 1.35; }
  .site-intro-actions { margin-top: 18px; }
  .site-primary-link { min-height: 42px; gap: 15px; padding: 0 11px; font-size: 12px; }
  .site-intro-portrait { height: 244px; object-position: center 28%; }
  .site-results { padding: 18px 18px 24px; }
  .site-results-heading { grid-template-columns: 1fr; gap: 5px; margin-bottom: 13px; }
  .site-results-heading > span { grid-column: 1; }
  .site-results-heading h2 { font-size: 29px; }
  .site-results-heading p { font-size: 12px; }
  .site-results-grid .result-work-card { display: block; }
  .work-picker button { gap: 5px; padding: 0 10px; }
  .work-picker button .work-picker-title-full { display: none; }
  .work-picker button .work-picker-title-short { display: inline; font-size: 12px; opacity: 1; }
  .site-results-grid .result-work-comparison { height: auto; aspect-ratio: 4 / 3; }
  .site-results-grid .result-work-copy { display: block; padding: 13px 15px 15px; }
  .site-results-grid .result-work-copy h3 { margin: 5px 0 4px; font-size: 19px; }
  .site-results-grid .result-work-copy p { min-height: 0; font-size: 12px; }
  .site-results-grid .result-work-foot { margin-top: 10px; font-size: 12px; }
  .site-results-grid .result-work-foot button { font-size: 12px; }
  html:not(.admin-view):not(.telegram-app) .client-workspace { width: 100%; padding: 13px 18px 28px; }
  html.site-booking-focus .client-workspace { min-height: calc(100dvh - 52px); }
  html:not(.admin-view):not(.telegram-app) .client-nav { justify-content: flex-start; gap: 23px; }
  html:not(.admin-view):not(.telegram-app) .client-nav-button { font-size: 13px; }
  html:not(.admin-view):not(.telegram-app) .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 13px; }
  html:not(.admin-view):not(.telegram-app) .service-card { min-height: 76px; }
  html:not(.admin-view):not(.telegram-app) .service-body h3 { font-size: 14px; }
  html:not(.admin-view):not(.telegram-app) .service-meta { font-size: 11px; }
  html:not(.admin-view):not(.telegram-app) .booking-step-services .step-title h2 { font-size: 25px; }
  .client-works-grid .result-work-comparison { aspect-ratio: 4 / 5; }
  .admin-view .tab { min-height: 70px; font-size: 11px; }
  .admin-view .tabs { min-height: calc(70px + env(safe-area-inset-bottom)); }
  .admin-view .tab span { transform: translateY(-5px); }
  .admin-view .tab.active::after { bottom: 19px; }
  .work-admin-row { grid-template-columns: 60px minmax(0,1fr); }
  .work-admin-row img, .work-admin-placeholder { width: 60px; height: 74px; }
  .work-admin-actions { grid-column: 2; justify-content: flex-start; }
  .master-example-strip { display: flex; gap: 11px; overflow-x: auto; scrollbar-width: none; }
  .master-example-strip::-webkit-scrollbar { display: none; }
  .master-example-strip figure { flex: 0 0 142px; }
  .master-example-strip img { height: 166px; }
  .master-example-strip figcaption { display: block; line-height: 1.25; }
  .master-example-strip small { display: block; margin-top: 4px; }
}

@media (max-width: 767px) {
  .telegram-app .app-main { width: 100%; max-width: 430px; padding: max(17px, env(safe-area-inset-top)) 24px max(92px, calc(env(safe-area-inset-bottom) + 82px)); }
  .telegram-app .client-hero { min-height: 60px; align-items: center; }
  .telegram-app .hero-copy { padding: 0; text-align: center; }
  .telegram-app .hero-copy h1 { margin: 0; font-family: var(--font-ui); font-size: 21px; font-weight: 600; letter-spacing: -.055em; }
  .telegram-app .master-role { margin: 0; color: var(--color-text-muted); font-size: 11px; }
  .telegram-app .master-avatar, .telegram-app .hero-location, .telegram-app .master-tagline { display: none !important; }
  .telegram-app .client-nav { position: fixed; z-index: 15; right: 0; bottom: 0; left: 0; height: calc(67px + env(safe-area-inset-bottom)); display: grid !important; grid-template-columns: repeat(3,1fr); gap: 0; margin: 0; padding: 0 12px env(safe-area-inset-bottom); border-top: 1px solid var(--color-border); background: #fff; }
  .telegram-app .client-nav-button, .telegram-app .client-nav-button:first-child, .telegram-app .client-nav-button:last-child { width: 100%; min-height: 66px; padding: 6px 2px; border: 0; font-size: 12px; text-align: center; }
  .telegram-app .client-nav-button.active { border: 0; color: var(--color-copper); }
  .telegram-app .client-nav-button.active::after { position: absolute; bottom: 10px; left: 35%; width: 30%; height: 2px; background: var(--color-copper); content: ""; }
  .telegram-app .app-main[data-client-stage="datetime"], .telegram-app .app-main[data-client-stage="ready"] { padding-top: max(28px, env(safe-area-inset-top)); }
  .telegram-app .app-main[data-client-stage="datetime"] .client-nav, .telegram-app .app-main[data-client-stage="ready"] .client-nav { display: grid !important; }
  .telegram-app .app-main[data-client-stage="works"] .client-hero { display: none; }
  .telegram-app .works-panel-heading { padding-top: 25px; }
  .telegram-app .works-panel-heading h2 { font-size: 34px; }
  .telegram-app .result-work-copy h3 { font-size: 23px; }
  .telegram-app .result-work-comparison { aspect-ratio: 4 / 5; }
  .telegram-app .result-work-foot { align-items: flex-start; flex-direction: column; gap: 9px; }
  .telegram-app .service-card { min-height: 81px; }
  .telegram-app .service-body h3 { font-size: 17px; }
  .telegram-app .booking-step-services .step-title h2 { font-size: 31px; }
  .telegram-app .app-main[data-client-stage="datetime"] .booking-summary { display: none; }
  .telegram-app .app-main[data-client-stage="ready"] .booking-summary { bottom: calc(69px + env(safe-area-inset-bottom)); border-radius: 3px; box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  .site-landing *, .result-work-card * { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
