:root {
  color-scheme: dark light;
  --page: var(--tg-theme-bg-color, #111210);
  --ink: var(--tg-theme-text-color, #f4f0e9);
  --muted: var(--tg-theme-hint-color, #a7a196);
  --panel: var(--tg-theme-secondary-bg-color, #1b1c19);
  --panel-2: #22231f;
  --line: color-mix(in srgb, var(--ink) 12%, transparent);
  --accent: #c89a5b;
  --accent-strong: #e2b87c;
  --accent-ink: #19140d;
  --success: #8fc49c;
  --danger: #f08d7e;
  --page-width: 480px;
}
* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--page); scroll-behavior: smooth; }
body {
  min-width: 320px; margin: 0; background: var(--page); color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px; line-height: 1.48; -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; }
button { color: inherit; }
a { color: inherit; }
.app-shell { position: relative; width: min(100%, var(--page-width)); min-height: 100dvh; margin: 0 auto; padding: 0 18px calc(116px + env(safe-area-inset-bottom)); overflow: clip; }
.app-header {
  position: sticky; z-index: 10; top: 0; display: flex; align-items: center; gap: 12px;
  min-height: 68px; padding: max(10px, env(safe-area-inset-top)) 0 10px;
  background: color-mix(in srgb, var(--page) 91%, transparent); backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.back-button { display: grid; flex: 0 0 42px; width: 42px; height: 42px; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--panel); cursor: pointer; }
.back-button[hidden] { display: none; }
.back-button svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.brand { display: flex; min-width: 0; align-items: center; gap: 9px; text-decoration: none; }
.brand-mark { display: grid; width: 39px; height: 39px; flex: 0 0 39px; place-items: center; border: 1px solid color-mix(in srgb, var(--accent) 52%, transparent); border-radius: 13px; color: var(--accent-strong); }
.brand-mark svg { width: 28px; }
.brand-copy { display: grid; gap: 0; min-width: 0; }
.brand-copy strong { overflow: hidden; font-family: Georgia, "Times New Roman", serif; font-size: 15px; font-weight: 600; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }
.brand-copy small { color: var(--muted); font-size: 11px; letter-spacing: .18em; }
.header-demo { margin-left: auto; color: var(--accent-strong); font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.screen-frame { min-height: 60vh; animation: screen-in .25s ease both; }
@keyframes screen-in { from { opacity: .55; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
.demo-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0 18px; padding: 11px 13px; border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent); border-radius: 14px; background: color-mix(in srgb, var(--accent) 8%, var(--panel)); color: var(--muted); font-size: 12px; line-height: 1.4; }
.demo-banner strong { color: var(--ink); font-weight: 650; }
.demo-banner a { flex: 0 0 auto; color: var(--accent-strong); font-size: 12px; font-weight: 700; text-decoration: none; }
.demo-banner.compact { margin-top: 10px; }
.hero { display: grid; gap: 18px; padding: 13px 0 22px; }
.eyebrow, .section-kicker { color: var(--accent-strong); font-size: 12px; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; }
.hero h1 { max-width: 390px; margin: 9px 0 10px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(34px, 10vw, 45px); font-weight: 500; letter-spacing: -.055em; line-height: .99; }
.hero h1 em { color: var(--accent-strong); font-style: normal; }
.hero-copy { max-width: 350px; margin: 0; color: var(--muted); font-size: 14px; }
.hero-actions { display: flex; align-items: center; gap: 12px; margin-top: 20px; }
.text-link { color: var(--ink); font-size: 12px; font-weight: 650; text-decoration-color: color-mix(in srgb, var(--accent) 60%, transparent); text-underline-offset: 4px; }
.primary-button, .secondary-button, .quiet-button, .danger-button {
  display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 10px;
  padding: 0 18px; border: 0; border-radius: 14px; font-size: 13px; font-weight: 750; cursor: pointer;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}
.primary-button { background: var(--accent); color: var(--accent-ink); }
.primary-button:hover { background: var(--accent-strong); transform: translateY(-1px); }
.primary-button:disabled { opacity: .48; cursor: not-allowed; transform: none; }
.secondary-button { border: 1px solid var(--line); background: var(--panel); }
.quiet-button { min-height: 42px; padding: 0 13px; border: 1px solid var(--line); background: transparent; font-size: 12px; }
.danger-button { min-height: 40px; padding: 0 13px; background: color-mix(in srgb, var(--danger) 12%, var(--panel)); color: var(--danger); font-size: 13px; }
.button-arrow { font-size: 18px; line-height: 1; }
.hero-media { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: radial-gradient(ellipse at 70% 20%, #705841 0, transparent 37%), linear-gradient(135deg, #3b3932, #171816 58%, #27241f); }
.hero-media::after { position: absolute; z-index: 2; inset: 45% 0 0; background: linear-gradient(transparent, rgba(9, 10, 9, .78)); content: ""; pointer-events: none; }
.media-mark { position: absolute; z-index: 0; inset: 0; display: grid; place-items: center; color: color-mix(in srgb, var(--accent-strong) 72%, transparent); font-family: Georgia, serif; font-size: clamp(52px, 20vw, 98px); }
.media img { position: absolute; z-index: 1; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.media img[hidden], .mini-portrait img[hidden] { display: none; }
.hero-media .media-mark { align-items: end; justify-items: start; padding: 7% 9% 12%; }
.hero-caption { position: absolute; z-index: 3; right: 15px; bottom: 13px; left: 15px; display: flex; align-items: end; justify-content: space-between; gap: 10px; }
.hero-caption strong { font-family: Georgia, serif; font-size: 19px; font-weight: 500; }
.hero-caption span { color: rgba(255,255,255,.74); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.hero-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 14px 0 6px; }
.hero-point { padding: 10px 9px; border-top: 1px solid var(--line); }
.hero-point strong { display: block; color: var(--ink); font-family: Georgia, serif; font-size: 16px; font-weight: 500; }
.hero-point span { color: var(--muted); font-size: 11px; }
.content-section { padding: 27px 0 9px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.section-heading h2, .page-heading h1 { margin: 3px 0 0; font-family: Georgia, "Times New Roman", serif; font-size: 26px; font-weight: 500; letter-spacing: -.035em; line-height: 1.05; }
.section-heading p { max-width: 180px; margin: 0; color: var(--muted); font-size: 12px; text-align: right; }
.reason-grid { display: grid; gap: 9px; }
.reason-card { display: grid; grid-template-columns: 38px 1fr; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.reason-num { color: var(--accent-strong); font-size: 12px; letter-spacing: .1em; }
.reason-card h3 { margin: 0 0 4px; font-size: 13px; font-weight: 700; }
.reason-card p { margin: 0; color: var(--muted); font-size: 13px; }
.barber-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.barber-tile { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--panel); }
.barber-tile .media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: radial-gradient(ellipse at 50% 20%, #74614d, transparent 54%), linear-gradient(160deg, #34312b, #191a18); }
.barber-tile:nth-child(2) .media { background: radial-gradient(ellipse at 60% 15%, #655249, transparent 54%), linear-gradient(160deg, #322d2c, #171817); }
.barber-tile:nth-child(3) .media { background: radial-gradient(ellipse at 45% 22%, #5b614f, transparent 54%), linear-gradient(160deg, #30332b, #171817); }
.barber-tile .media-mark { font-size: 50px; }
.barber-info { padding: 10px 9px 12px; }
.barber-info h3 { margin: 0 0 2px; font-size: 13px; }
.barber-info p { min-height: 30px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.barber-meta { display: flex; flex-wrap: wrap; gap: 4px 7px; margin-top: 8px; color: var(--muted); font-size: 11px; }
.barber-meta b { color: var(--accent-strong); font-weight: 650; }
.gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.work-card { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--panel); }
.work-card .media { position: relative; aspect-ratio: 1; overflow: hidden; background: radial-gradient(ellipse at 20% 25%, #775d43, transparent 46%), linear-gradient(140deg, #34302a, #1a1b19 68%); }
.work-card:nth-child(2n) .media { background: radial-gradient(ellipse at 75% 35%, #5b5f51, transparent 45%), linear-gradient(140deg, #30332e, #181917 68%); }
.work-card:nth-child(3n) .media { background: radial-gradient(ellipse at 50% 20%, #725050, transparent 43%), linear-gradient(140deg, #36302c, #181917 68%); }
.work-card .media-mark { color: rgba(230, 194, 142, .62); font-family: ui-sans-serif, system-ui, sans-serif; font-size: 13px; letter-spacing: .16em; }
.work-info { padding: 9px 10px 11px; }
.work-info strong { display: block; font-size: 13px; }
.work-info span { color: var(--muted); font-size: 11px; }
.place-card { display: grid; gap: 16px; padding: 17px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 9%, var(--panel)), var(--panel)); }
.place-card h3 { margin: 4px 0 6px; font-family: Georgia, serif; font-size: 20px; font-weight: 500; }
.place-card p { margin: 0; color: var(--muted); font-size: 13px; }
.hours-list { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; }
.hours-list span:nth-child(2n) { color: var(--muted); }
.footer-note { padding: 24px 0 5px; color: var(--muted); font-size: 11px; text-align: center; }
.footer-note a { color: var(--accent-strong); text-decoration: none; }
.page-heading { padding: 22px 0 15px; }
.page-heading .eyebrow { display: block; margin-bottom: 7px; }
.page-heading h1 { font-size: 30px; }
.page-heading p { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.progress { display: flex; gap: 5px; margin: 0 0 20px; }
.progress span { height: 3px; flex: 1; border-radius: 3px; background: var(--line); }
.progress span.active { background: var(--accent); }
.selection-list { display: grid; gap: 9px; }
.choice-card { position: relative; display: grid; width: 100%; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 11px; min-height: 86px; padding: 11px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); text-align: left; cursor: pointer; }
.choice-card.selected { border-color: color-mix(in srgb, var(--accent) 72%, var(--line)); background: color-mix(in srgb, var(--accent) 9%, var(--panel)); }
.choice-card:disabled { opacity: .46; cursor: not-allowed; }
.choice-icon { display: grid; width: 46px; height: 52px; place-items: center; border-radius: 12px; background: linear-gradient(145deg, #3b3329, #21221e); color: var(--accent-strong); font-family: Georgia, serif; font-size: 22px; }
.choice-copy { min-width: 0; }
.choice-copy strong { display: block; font-size: 12px; font-weight: 700; }
.choice-copy small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.choice-meta { display: grid; justify-items: end; gap: 5px; white-space: nowrap; }
.choice-meta b { font-size: 13px; }
.choice-meta small { color: var(--muted); font-size: 11px; }
.checkmark { display: grid; width: 20px; height: 20px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: transparent; font-size: 13px; }
.selected .checkmark { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.total-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 13px; padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: color-mix(in srgb, var(--panel) 78%, transparent); }
.total-card span { color: var(--muted); font-size: 12px; }
.total-card strong { display: block; font-size: 13px; }
.total-card .total-value { color: var(--accent-strong); text-align: right; }
.helper-note { margin: 12px 2px 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.barber-choice { grid-template-columns: 54px minmax(0, 1fr) auto; min-height: 91px; }
.barber-choice .mini-portrait { position: relative; width: 54px; height: 65px; overflow: hidden; border-radius: 11px; background: radial-gradient(ellipse at 50% 24%, #74614d, transparent 60%), linear-gradient(160deg, #34312b, #191a18); }
.barber-choice .mini-portrait .media-mark { font-size: 28px; }
.barber-choice .mini-portrait img { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.any-choice { grid-template-columns: 54px minmax(0, 1fr) auto; }
.any-symbol { display: grid; width: 54px; height: 54px; place-items: center; border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent); border-radius: 50%; color: var(--accent-strong); font-size: 23px; }
.warning-card { margin: 10px 0; padding: 12px 13px; border: 1px solid color-mix(in srgb, var(--danger) 32%, transparent); border-radius: 13px; background: color-mix(in srgb, var(--danger) 8%, var(--panel)); color: var(--muted); font-size: 13px; }
.warning-card strong { color: var(--ink); }
.date-strip { display: flex; gap: 7px; overflow-x: auto; margin: 0 -18px 15px; padding: 2px 18px 9px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.date-choice { display: grid; min-width: 54px; min-height: 66px; flex: 0 0 54px; place-items: center; gap: 0; padding: 8px 4px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); cursor: pointer; }
.date-choice span { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.date-choice strong { font-size: 16px; }
.date-choice.selected { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 13%, var(--panel)); }
.date-choice:disabled { opacity: .34; cursor: not-allowed; }
.slots-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 18px 0 10px; }
.slots-heading h2 { margin: 0; font-size: 13px; }
.slots-heading span { color: var(--muted); font-size: 12px; }
.slot-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.slot { min-height: 44px; padding: 0 4px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); font-size: 13px; cursor: pointer; }
.slot.selected { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); font-weight: 750; }
.slot:disabled { opacity: .32; cursor: not-allowed; text-decoration: line-through; }
.empty-inline { grid-column: 1 / -1; padding: 18px 10px; border: 1px dashed var(--line); border-radius: 13px; color: var(--muted); font-size: 13px; text-align: center; }
.contact-form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 700; }
.field input, .field textarea { width: 100%; min-height: 48px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 12px; outline: none; background: var(--panel); color: var(--ink); }
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .75; }
.field small, .form-privacy { color: var(--muted); font-size: 11px; line-height: 1.45; }
.reminder-row { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); font-size: 13px; }
.reminder-row input { width: 18px; height: 18px; accent-color: var(--accent); }
.summary-card { display: grid; gap: 0; margin: 16px 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.summary-head { display: flex; align-items: center; justify-content: space-between; padding: 13px; border-bottom: 1px solid var(--line); }
.summary-head strong { font-size: 12px; }
.summary-head span { color: var(--accent-strong); font-size: 13px; font-weight: 700; }
.summary-row { display: flex; align-items: start; justify-content: space-between; gap: 14px; padding: 10px 13px; border-bottom: 1px solid var(--line); font-size: 12px; }
.summary-row:last-child { border-bottom: 0; }
.summary-row span { color: var(--muted); }
.summary-row strong { max-width: 65%; font-size: 12px; font-weight: 650; text-align: right; }
.form-error { min-height: 16px; color: var(--danger); font-size: 12px; }
.success-panel { padding: 18px 0 4px; }
.success-mark { display: grid; width: 54px; height: 54px; place-items: center; margin-bottom: 16px; border: 1px solid color-mix(in srgb, var(--success) 55%, transparent); border-radius: 50%; background: color-mix(in srgb, var(--success) 11%, var(--panel)); color: var(--success); font-size: 23px; }
.success-panel h1 { margin: 5px 0 9px; font-family: Georgia, serif; font-size: 34px; font-weight: 500; line-height: 1; letter-spacing: -.04em; }
.success-panel > p { max-width: 360px; color: var(--muted); font-size: 12px; }
.demo-disclaimer { margin: 16px 0; padding: 12px 13px; border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent); border-radius: 13px; background: color-mix(in srgb, var(--accent) 8%, var(--panel)); font-size: 13px; line-height: 1.5; }
.action-stack { display: grid; gap: 9px; margin: 16px 0; }
.bookings-list { display: grid; gap: 10px; }
.booking-card { padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.booking-card-top { display: flex; justify-content: space-between; gap: 10px; }
.booking-card h3 { margin: 0; font-size: 13px; }
.booking-code { color: var(--accent-strong); font-size: 11px; font-weight: 700; }
.booking-card p { margin: 8px 0 12px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.empty-state { padding: 26px 17px; border: 1px dashed var(--line); border-radius: 17px; text-align: center; }
.empty-state .empty-icon { color: var(--accent-strong); font-size: 28px; }
.empty-state h2 { margin: 6px 0; font-family: Georgia, serif; font-size: 21px; font-weight: 500; }
.empty-state p { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.bottom-action { position: fixed; z-index: 9; right: 0; bottom: 0; left: 0; width: min(100%, var(--page-width)); margin: 0 auto; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: color-mix(in srgb, var(--page) 92%, transparent); backdrop-filter: blur(20px); }
.bottom-action[hidden] { display: none; }
.action-button { width: 100%; min-height: 50px; }
.action-button .button-arrow { margin-left: auto; }
.toast { position: fixed; z-index: 30; right: 18px; bottom: calc(84px + env(safe-area-inset-bottom)); left: 18px; max-width: 444px; margin: 0 auto; padding: 11px 14px; transform: translateY(8px); border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: 0 10px 34px rgba(0,0,0,.2); color: var(--ink); font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; }
.confirm-overlay { position: fixed; z-index: 40; inset: 0; display: grid; place-items: center; padding: 22px; background: rgba(0,0,0,.68); backdrop-filter: blur(7px); }
.confirm-overlay[hidden] { display: none; }
.confirm-card { width: min(100%, 420px); padding: 21px; border: 1px solid var(--line); border-radius: 20px; background: var(--page); box-shadow: 0 24px 80px rgba(0,0,0,.38); }
.confirm-card h2 { margin: 7px 0 8px; font-family: Georgia, "Times New Roman", serif; font-size: 25px; font-weight: 500; }
.confirm-card p { margin: 0; color: var(--muted); font-size: 12px; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 19px; }
.confirm-actions button { min-width: 0; padding: 0 9px; }

.toast.visible { transform: translateY(0); opacity: 1; }
[hidden] { display: none !important; }
@media (min-width: 560px) {
  body { background: #0a0b09; }
  .app-shell { border-right: 1px solid var(--line); border-left: 1px solid var(--line); box-shadow: 0 0 70px rgba(0,0,0,.18); }
  .app-header { margin: 0 -18px; padding-right: 18px; padding-left: 18px; }
  .demo-banner { font-size: 13px; }
  .hero { padding-top: 22px; }
  .reason-grid { grid-template-columns: repeat(3, 1fr); }
  .reason-card { grid-template-columns: 1fr; min-height: 130px; }
  .reason-card h3 { margin-top: 5px; }
}
@media (max-width: 360px) {
  .app-shell { padding-right: 14px; padding-left: 14px; }
  .demo-banner { align-items: start; flex-direction: column; gap: 6px; }
  .choice-card { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 8px; padding: 9px; }
  .choice-icon { width: 40px; height: 46px; }
  .choice-meta b { font-size: 12px; }
  .date-strip { margin-right: -14px; margin-left: -14px; padding-right: 14px; padding-left: 14px; }
  .slot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}


