/* ---------- Design tokens ---------- */
:root {
  --bg: #ffffff;
  --bg-soft: #f7f6f4;
  --bg-sink: #f1efec;
  --ink: #1b1a18;
  --ink-soft: #55524d;
  --ink-faint: #8a867f;
  --line: #e6e3de;
  --accent: #b08968;      /* warm taupe */
  --accent-ink: #8a6a4d;
  --danger: #b4443a;
  --ok: #3c7a53;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(20,18,15,.05), 0 8px 24px rgba(20,18,15,.06);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button {border: none; }

/* ---------- Internal pages (admin + auth): "Organic" skin, matching the landing.
   Scoped to body.admin/body.auth so the public gallery preview is untouched.
   Retuning the tokens re-skins every shared component (.btn, .card, inputs,
   tables, photo grid, …) at once. ---------- */
body.admin, body.auth {
  --bg: #fbf6ef;        /* card / surface */
  --bg-soft: #f0e8dd;   /* page ground */
  --bg-sink: #f5e7dd;
  --ink: #241d1e;
  --ink-soft: #4a3c3d;
  --ink-faint: #6b5658;
  --line: #e3d8c8;
  --accent: #c9737c;    /* dusty rose */
  --accent-ink: #ad5a63;
  --danger: #b4443a;
  --serif: "Archivo", system-ui, sans-serif;  /* display → bold sans, like the landing */
  --sans: "Figtree", system-ui, sans-serif;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(36,29,30,.05), 0 12px 32px rgba(36,29,30,.09);
  background: #f0e8dd;
}
/* Bolder Archivo headings + brand */
body.admin h1, body.admin h2, body.auth h1,
body.admin .admin-header .brand, body.admin .card h2 { font-weight: 700; letter-spacing: -.01em; }
/* Sticky header: warm translucent, not white */
body.admin .admin-header { background: color-mix(in srgb, #fbf6ef 82%, transparent); }
/* Rose focus ring on inputs */
body.admin input:focus, body.admin select:focus, body.admin textarea:focus,
body.auth input:focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, #c9737c 22%, transparent);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .4em;
  padding: .6rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  font: inherit; font-size: .92rem; font-weight: 500;
  text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s, transform .05s, color .15s;
  white-space: nowrap;
}
.btn:hover { background: var(--bg-soft); }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: .38rem .7rem; font-size: .82rem; }
.btn-lg { padding: .85rem 1.6rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(.94); }
.linklike { background: none; border: 0; color: var(--ink-soft); cursor: pointer; font: inherit; padding: 0; }
.linklike:hover { color: var(--ink); }
form.inline { display: inline; margin: 0; }

/* ---------- Auth ---------- */
body.auth { display: grid; place-items: center; min-height: 100vh; background: var(--bg-soft); }
.auth-main { width: 100%; max-width: 360px; padding: 1.5rem; }
.auth-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2rem; box-shadow: var(--shadow);
}
.auth-card h1 { font-family: var(--serif); font-weight: 500; margin: 0 0 1.25rem; font-size: 1.6rem; }

/* ---------- Forms ---------- */
.stack { display: flex; flex-direction: column; gap: 1rem; }
label { display: flex; flex-direction: column; gap: .35rem; font-size: .9rem; color: var(--ink-soft); }
label > span { font-weight: 500; color: var(--ink); }
input[type=text], input[type=password], input[type=url], input[type=date], input[type=email], select, textarea {
  font: inherit; font-size: .95rem;
  padding: .6rem .75rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--ink);
  width: 100%;
}
textarea { resize: vertical; min-height: 5.5rem; line-height: 1.5; }
textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(176,137,104,.15); }
select { appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-faint) 50%), linear-gradient(135deg, var(--ink-faint) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 2rem; }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(176,137,104,.15); }
small { color: var(--ink-faint); font-size: .8rem; }
small.warn { color: var(--danger); }
label.checkbox { flex-direction: row; align-items: center; gap: .55rem; }
label.checkbox input { width: auto; }
.error { background: #fbeceb; color: var(--danger); border: 1px solid #f0cfcc;
  padding: .65rem .85rem; border-radius: var(--radius-sm); font-size: .88rem; margin-bottom: 1rem; }

/* ---------- Admin shell ---------- */
.admin-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .9rem clamp(1rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: rgba(255,255,255,.85); backdrop-filter: blur(8px); z-index: 10;
}
.admin-header .brand { font-family: var(--serif); font-size: 1.15rem; text-decoration: none; letter-spacing: .01em; }
.admin-header nav { display: flex; align-items: center; gap: 1rem; }
.admin-header nav a { text-decoration: none; color: var(--ink-soft); font-size: .9rem; }
.admin-header nav a:hover { color: var(--ink); }
.admin-header nav a.btn { color: var(--ink); }
.admin-main { max-width: 1000px; margin: 0 auto; padding: clamp(1.25rem, 4vw, 2.5rem); }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.page-head.compact { margin-bottom: 1rem; align-items: center; }
.page-head h1 { font-family: var(--serif); font-weight: 500; font-size: 1.9rem; margin: 0; }
.page-head h2 { font-size: 1.1rem; margin: 0; }
.back { color: var(--ink-faint); text-decoration: none; font-size: .85rem; }
.back:hover { color: var(--ink); }

.flash { background: #eef5f0; border: 1px solid #cfe3d6; color: var(--ok);
  padding: .65rem .9rem; border-radius: var(--radius-sm); margin-bottom: 1.25rem; font-size: .9rem; }

.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow); margin-bottom: 1.5rem; }
.card h2 { font-family: var(--serif); font-weight: 500; margin: 0 0 1rem; font-size: 1.25rem; }
.form-narrow { max-width: 520px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
.grid-2 .card { margin-bottom: 0; }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table.galleries { width: 100%; border-collapse: collapse; font-size: .92rem; background: var(--bg); }
table.galleries th, table.galleries td { text-align: left; padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
table.galleries th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-faint); font-weight: 600; }
table.galleries tr:last-child td { border-bottom: 0; }
table.galleries a.strong { text-decoration: none; font-weight: 500; }
table.galleries a.strong:hover { color: var(--accent-ink); }
.row-actions { display: flex; gap: .4rem; justify-content: flex-end; }

.badge { display: inline-block; padding: .18rem .55rem; border-radius: 999px; font-size: .74rem; font-weight: 600; }
.badge-ok { background: #e7f2eb; color: var(--ok); }
.badge-danger { background: #fbeceb; color: var(--danger); }
.badge-muted { background: var(--bg-sink); color: var(--ink-faint); }

.empty { text-align: center; padding: 4rem 1rem; color: var(--ink-faint); }
.empty p { margin-bottom: 1.25rem; }
.muted { color: var(--ink-faint); }
.hint { font-size: .8rem; color: var(--ink-faint); }

/* ---------- Link bar ---------- */
.link-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.link-field { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.link-field .label { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-faint); }
.link-field code { font-size: .9rem; background: var(--bg-sink); padding: .35rem .55rem; border-radius: var(--radius-sm);
  overflow-x: auto; white-space: nowrap; }
.link-actions { display: flex; gap: .5rem; }
.head-status { align-self: center; }

/* ---------- Dropzone ---------- */
.dropzone { border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 1.75rem 1rem;
  text-align: center; cursor: pointer; color: var(--ink-faint); transition: border-color .15s, background .15s; gap: .3rem; }
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--bg-soft); color: var(--ink-soft); }
.dz-count { font-size: .85rem; color: var(--accent-ink); font-weight: 500; }

/* ---------- Admin photo grid ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .6rem; }
.photo-item { position: relative; margin: 0; border-radius: var(--radius-sm); overflow: hidden;
  aspect-ratio: 1; background: var(--bg-sink); cursor: grab; }
.photo-item.dragging { opacity: .4; }
.photo-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-del { position: absolute; top: 4px; right: 4px; margin: 0; }
.photo-del button { width: 26px; height: 26px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(20,18,15,.6); color: #fff; font-size: 1rem; line-height: 1; display: grid; place-items: center; }
.photo-del button:hover { background: var(--danger); }

/* ---------- Upload progress ---------- */
.upload-progress { display: flex; flex-direction: column; gap: .35rem; margin-top: .25rem; }
.upload-progress:empty { display: none; }
.up-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  font-size: .85rem; padding: .4rem .6rem; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--bg-soft); }
.up-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-state { flex: none; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.up-active { border-color: var(--accent); }
.up-active .up-state { color: var(--accent); }
.up-done { border-color: #cfe6d4; }
.up-done .up-state { color: #2e7d43; }
.up-fail { border-color: #f0cfcc; }
.up-fail .up-state { color: var(--danger); }
.up-summary { font-size: .85rem; color: var(--ink-soft); margin-top: .3rem; }

.danger-zone { border-color: #f0cfcc; }
.danger-zone h2 { color: var(--danger); }

/* ---------- Public: the lightbox table ----------
   Full-viewport, no-scroll stage. Columns of prints drift up/down at varied
   speeds behind a centered gallery "mount" card. Photos are decorative and
   non-interactive. The color scheme is per-gallery: light (default) paints the
   gaps + card white; .theme-dark inverts to a warm near-black. */
html, body.public { height: 100%; }
body.public {
  --drift-gap: 12px;
  /* Light theme (default): "Organic" cream ground + cream mount, matching the landing */
  --stage-bg: #f0e8dd;
  --card-bg: #fbf6ef;
  --card-ink: #241d1e;
  --card-soft: #4a3c3d;
  --card-faint: #6b5658;
  --accent-text: #8a3f49;
  --rule: transparent;      /* no matted inset rule — rounded, ruleless like the landing */
  --frame-bg: #f5e7dd;
  --img-filter: none;
  --scrim: transparent;
  --card-shadow: 0 28px 70px color-mix(in srgb, #241d1e 22%, transparent);
  --cta-bg: #c9737c;
  --cta-ink: #fdf7f6;
  --cta-hover: #ad5a63;
  --serif: "Archivo", system-ui, sans-serif;   /* display → bold sans, like the landing */
  --sans: "Figtree", system-ui, sans-serif;

  height: 100dvh; overflow: hidden; overscroll-behavior: none;
  background: var(--stage-bg); color: var(--card-ink);
}
body.public.theme-dark {
  /* Dark theme: warm near-black ground, same rose accent */
  --stage-bg: #211a1b;
  --card-bg: #2a2122;
  --card-ink: #f5ece9;
  --card-soft: #d7c7c4;
  --card-faint: #a9989a;
  --accent-text: #e0949c;
  --rule: transparent;
  --frame-bg: #362b2c;
  --img-filter: saturate(.96) brightness(.85);
  --scrim: radial-gradient(120% 90% at 50% 50%, rgba(20,15,16,.20) 0%, rgba(20,15,16,.48) 45%, rgba(20,15,16,.78) 100%);
  --card-shadow: 0 28px 70px rgba(0,0,0,.5);
  --cta-bg: #c9737c;
  --cta-ink: #fdf7f6;
  --cta-hover: #ad5a63;
}
.stage { position: fixed; inset: 0; overflow: hidden; background: var(--stage-bg); }

/* Drifting columns */
.drift { position: absolute; inset: 0; display: flex; gap: var(--drift-gap);
  padding: var(--drift-gap); pointer-events: none; }
.drift-col { position: relative; flex: 1 1 0; overflow: hidden; }
/* Reveal 2 → 5 columns responsively; never fewer than 2. */
.drift-col { display: none; }
.drift-col:nth-child(1), .drift-col:nth-child(2) { display: block; }
@media (min-width: 480px)  { .drift-col:nth-child(3) { display: block; } }
@media (min-width: 760px)  { .drift-col:nth-child(4) { display: block; } }
@media (min-width: 1080px) { .drift-col:nth-child(5) { display: block; } }

/* No will-change: on iOS a tall (multi-viewport) promoted layer exhausts GPU
   memory and Safari blanks it out. The fixed-aspect frames below keep each
   track short and predictable so WebKit never tiles it. */
.drift-track { position: absolute; top: 0; left: 0; width: 100%;
  animation: drift-up var(--dur, 160s) linear var(--delay, 0s) infinite; }
.drift-col--down .drift-track { animation-name: drift-down; }
/* Content is duplicated, so translating by half its height loops seamlessly.
   Each frame owns its trailing gap (margin-bottom), so half the height is
   exactly one copy — no seam jump. */
@keyframes drift-up   { from { transform: translateY(0); }      to { transform: translateY(-50%); } }
@keyframes drift-down { from { transform: translateY(-50%); }   to { transform: translateY(0); } }

/* Fixed aspect ratio + object-fit: cover means the column height is known
   before the images decode. That kills layout shift (the "only some portions
   show" bug) and keeps the animated layer small enough for iOS. */
.frame { margin-bottom: var(--drift-gap); border-radius: 6px; overflow: hidden;
  background: var(--frame-bg); box-shadow: 0 6px 20px rgba(0,0,0,.22);
  aspect-ratio: 3 / 4; }
.frame img { width: 100%; height: 100%; object-fit: cover; display: block;
  filter: var(--img-filter); -webkit-user-drag: none; user-select: none; }

/* Focusing scrim: eases the photos toward the gap color so the mount reads cleanly */
.stage-scrim { position: absolute; inset: 0; pointer-events: none; background: var(--scrim); }

/* Centered gallery mount card */
.mount-wrap { position: absolute; inset: 0; display: grid; place-items: center;
  padding: clamp(1rem, 4vw, 2rem); pointer-events: none; }
.mount { position: relative; pointer-events: auto; text-align: center;
  width: min(90vw, 430px); background: var(--card-bg); color: var(--card-ink);
  padding: clamp(1.6rem, 4.5vw, 2.4rem) clamp(1.5rem, 5vw, 2.75rem);
  border-radius: 28px; box-shadow: var(--card-shadow);
  animation: mount-in .9s cubic-bezier(.16,.8,.24,1) both; }
/* Matted inset rule — the "print mount" signature */
.mount::before { content: ""; position: absolute; inset: 10px;
  border: 1px solid var(--rule); pointer-events: none; }
@keyframes mount-in { from { opacity: 0; transform: translateY(10px) scale(.985); }
  to { opacity: 1; transform: none; } }

.eyebrow { text-transform: uppercase; letter-spacing: .32em; font-size: .68rem;
  font-weight: 600; color: var(--accent-text); margin: 0 0 1.1rem; }
.mount-title { font-family: var(--serif); font-weight: 700; line-height: 1.06;
  font-size: clamp(1.9rem, 6.5vw, 2.9rem); letter-spacing: -.015em; margin: 0 0 1.9rem; }
.mount-lead { color: var(--card-soft); font-size: .95rem; line-height: 1.6;
  max-width: min(30ch, 100%); margin: 1rem auto 1.9rem; }
.cta { display: inline-block; background: var(--cta-bg); color: var(--cta-ink); text-decoration: none;
  font-size: .85rem; font-weight: 500; letter-spacing: .01em; padding: .6rem 1.25rem;
  border-radius: 999px; transition: background .18s, transform .05s; }
.cta:hover { background: var(--cta-hover); }
.cta:active { transform: translateY(1px); }
.cta:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }
.mount-credit { font-family: var(--serif); font-style: italic; color: var(--card-faint);
  font-size: .82rem; margin: 1.75rem 0 0; }

/* Tighter card on phones — narrower, less padding, smaller inner gaps. */
@media (max-width: 560px) {
  .mount { width: min(84vw, 340px); padding: 1.1rem 1.15rem; }
  .mount::before { inset: 7px; }
  .mount-title { font-size: clamp(1.5rem, 6vw, 1.9rem); margin: 0 0 1.15rem; }
  .mount-lead { margin: .6rem auto 1.15rem; }
  .mount-credit { margin: 1.1rem 0 0; }
}

/* "Записаться на фотосессию" card with contact circles, pinned to the bottom */
.social { position: absolute; left: 0; right: 0; bottom: clamp(1rem, 4vh, 2rem);
  z-index: 3; display: flex; justify-content: center; padding: 0 1rem; pointer-events: none; }
.social-card { pointer-events: auto; position: relative; text-align: center;
  background: var(--card-bg); color: var(--card-ink); box-shadow: var(--card-shadow);
  padding: 1.15rem 1.6rem 1.3rem; max-width: min(92vw, 430px); border-radius: 28px;
  animation: mount-in .9s cubic-bezier(.16,.8,.24,1) both; }
/* Matted inset rule, echoing the gallery mount */
.social-card::before { content: ""; position: absolute; inset: 7px;
  border: 1px solid var(--rule); pointer-events: none; }
.social-title { font-family: var(--serif); font-weight: 700; font-size: 1.05rem;
  letter-spacing: -.005em; margin: 0 0 .85rem; color: var(--card-ink); }
.social-row { display: flex; justify-content: center; flex-wrap: wrap; gap: .7rem; }
.social-link { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  color: var(--card-ink); background: var(--frame-bg);
  transition: transform .14s, background .2s, color .2s; }
.social-link svg { width: 21px; height: 21px; display: block; }
.social-link:hover { transform: translateY(-3px); background: var(--cta-bg); color: var(--cta-ink); }
.social-link:active { transform: translateY(-1px); }
.social-link:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .drift-track { animation: none !important; }
  .mount, .social-card { animation: none; }
}

/* ---------- Expired ---------- */
body .expired { min-height: 100vh; display: grid; place-items: center; background: var(--bg-soft); padding: 1.5rem; }
.expired-card { max-width: 460px; text-align: center; background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 3rem 2.5rem; box-shadow: var(--shadow); }
.expired-mark { font-size: 2rem; color: var(--accent); margin-bottom: .5rem; }
.expired-card h1 { font-family: var(--serif); font-weight: 500; font-size: 1.7rem; margin: 0 0 .75rem; }
.expired-card p { color: var(--ink-soft); margin: .4rem 0; }
.expired-card .credit { margin-top: 2rem; font-family: var(--serif); font-style: italic; color: var(--ink-faint); }

/* ==========================================================================
   Public landing page — "Organic" design (imported design 3a): cream ground,
   rose accent, Archivo / Figtree type, pill actions, blurred color blobs.
   ========================================================================== */
body.site {
  background: #f0e8dd; color: #241d1e;
  font-family: "Figtree", system-ui, sans-serif;
}
body.site h1, body.site h2, body.site h3, body.site h4 {
  font-family: "Archivo", system-ui, sans-serif; font-weight: 700; letter-spacing: -.02em; margin: 0;
}
.o-amt, .o-offer-txt, .o-foot-name { font-weight: 700; }
.o-name { font-weight: 800; }
/* One rounded card holds the whole page. It is the stacking context and the
   clip boundary: blur blobs (z-index:-1) bleed freely across sections *inside*
   it, sitting behind all content, and are softly cut only at the card's edge. */
.o-shell { max-width: 1080px; margin: clamp(14px, 3vw, 40px) auto; padding: 0 clamp(20px, 5vw, 64px);
  position: relative; isolation: isolate; overflow: hidden;
  background: #fbf6ef; border-radius: 28px; }

/* Shared organic bits */
.o-lab { font-family: "Figtree", system-ui, sans-serif; font-weight: 700; font-size: 11.5px;
  letter-spacing: .14em; text-transform: uppercase; color: #6b5658; }
.o-blur { position: absolute; z-index: -1; border-radius: 999px; filter: blur(64px); pointer-events: none; }
.o-frost { background: color-mix(in srgb, #fdf7f6 62%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid color-mix(in srgb, #c9737c 38%, transparent); }
.o-cta { display: inline-flex; align-items: center; gap: 9px; font-family: "Figtree", system-ui, sans-serif;
  font-weight: 700; font-size: 15px; padding: 15px 26px; border-radius: 999px;
  background: #c9737c; color: #fdf7f6; text-decoration: none; transition: background .18s, transform .18s; }
.o-cta:hover { background: #ad5a63; transform: translateY(-1px); }
.o-cta svg { display: block; }
.o-soc { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px;
  border-radius: 999px; background: #f5e7dd; color: #6b5658; text-decoration: none;
  transition: background .18s, color .18s; }
.o-soc:hover { background: #c9737c; color: #fdf7f6; }
/* "Save contact" (vCard) circle — only useful on a phone, so hide it on desktop.
   The contact circle is the one carrying the download attribute. */
@media (min-width: 721px) {
  .o-soc[download], .social-link[download] { display: none; }
}

/* Hero */
.o-hero { position: relative; padding: clamp(2rem, 6vw, 64px) 0 clamp(1.5rem, 4vw, 40px); }
.o-hero-in { position: relative; z-index: 1; }
.o-hero-lab { margin-bottom: 22px; }
.o-name { font-size: clamp(40px, 8vw, 70px); line-height: 1.04; margin: 0 0 24px; max-width: 20ch; }
.o-bio { font-size: clamp(17px, 2.4vw, 19px); line-height: 1.7; max-width: 44ch; margin: 0 0 32px;
  color: #4a3c3d; text-wrap: pretty; }
.o-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.o-socs { display: flex; gap: 10px; }

.o-heroimg { margin: 0 0 clamp(1.5rem, 4vw, 56px); border-radius: 28px; overflow: hidden;
  height: clamp(220px, 34vw, 340px); }
.o-heroimg img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Section headers */
.o-sec { margin-bottom: clamp(1.5rem, 4vw, 3rem); }
.o-sechd { display: flex; align-items: baseline; gap: 18px; margin-bottom: 26px; flex-wrap: wrap; }
.o-sechd h2 { font-size: clamp(30px, 5vw, 38px); }

/* Pricing rows */
.o-rows { display: flex; flex-direction: column; gap: 16px; }
.o-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 28px; align-items: center;
  background: #f5e7dd; border-radius: 28px; padding: 24px 30px; transition: transform .2s, box-shadow .2s; }
.o-row:hover { transform: translateY(-2px); box-shadow: 0 12px 32px color-mix(in srgb, #2b2224 14%, transparent); }
.o-row h3 { font-size: clamp(22px, 3.2vw, 27px); margin: 0 0 8px; }
.o-sub { color: #6b5658; }
.o-circles { display: flex; }
.o-circle { width: 112px; height: 112px; border-radius: 999px; flex: none;
  background: #e9d8cb no-repeat center / cover; }
.o-circle-2 { margin-left: 10px; }
.o-price { display: flex; align-items: baseline; gap: 8px; }
.o-amt { font-family: "Archivo", system-ui, sans-serif; font-size: clamp(36px, 5vw, 46px); line-height: 1; }
.o-per { color: #6b5658; }

/* Delivery / Included cards */
.o-info { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 28px; }
.o-infocard { border-radius: 28px; border: 1px solid color-mix(in srgb, #241d1e 12%, transparent); padding: 22px 26px; }
.o-infocard .o-lab { margin-bottom: 8px; }
.o-infotext { font-size: 16px; line-height: 1.6; color: #4a3c3d; }

/* Special offer bar */
.o-offerwrap { position: relative; margin: 36px 0; padding: 36px 0 56px; }
.o-frost { position: relative; display: flex; align-items: center; justify-content: space-between;
  gap: 32px; border-radius: 999px; padding: 20px 22px 20px 34px; }
.o-offer-l { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.o-offer-tag { color: #8a3f49; }
.o-offer-txt { font-family: "Archivo", system-ui, sans-serif; font-size: clamp(19px, 2.6vw, 23px); line-height: 1.2; }

/* Recent frames — masonry, full color */
.o-gallery { column-width: 260px; column-gap: 16px; }
@media (max-width: 560px) {
  .o-gallery { column-count: 2; column-width: auto; column-gap: 10px; }
  .o-tile { margin-bottom: 10px; }
}
.o-tile { display: block; break-inside: avoid; border-radius: 28px; overflow: hidden;
  margin-bottom: 16px; background: #f5e7dd; cursor: zoom-in; }
.o-tile img { width: 100%; height: auto; display: block; transition: transform .35s ease; }
.o-tile:hover img { transform: scale(1.03); }

/* Footer */
.o-foot { display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  margin-top: 28px; padding: 26px 0 clamp(2rem, 5vw, 64px);
  border-top: 1px solid color-mix(in srgb, #241d1e 12%, transparent); }
.o-foot-name { font-family: "Archivo", system-ui, sans-serif; font-size: 20px; }
.o-foot-loc { margin-right: auto; }

@media (max-width: 720px) {
  .o-row { grid-template-columns: 1fr; gap: 16px; }
  .o-circle { width: 84px; height: 84px; }
  .o-info { grid-template-columns: 1fr; }
  .o-frost { flex-direction: column; align-items: flex-start; border-radius: 28px; }
  .o-offerwrap .o-cta { width: 100%; justify-content: center; }
  .o-foot-loc { margin-right: 0; width: 100%; }
}

/* Booking modal */
.o-modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center;
  justify-content: center; padding: 28px; overflow-y: auto; height: 100vh; height: 100dvh; }
.o-modal[hidden] { display: none; }
.o-modal-backdrop { position: fixed; inset: 0; height: 100vh; height: 100dvh;
  background: color-mix(in srgb, #241d1e 40%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.bk-backcal { display: none; } /* mobile-only "change date" control */
.o-modal-card { display: flex; flex-direction: column; position: relative; width: 100%; max-width: 840px; margin: auto; background: #fbf6ef;
  border-radius: 28px; box-shadow: 0 28px 70px color-mix(in srgb, #241d1e 30%, transparent); overflow: hidden; }
.o-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 28px 32px 20px; }
.o-modal-head h3 { font-family: "Archivo", system-ui, sans-serif; font-weight: 700; font-size: 28px;
  line-height: 1.15; margin: 4px 0 0; color: #241d1e; }
.o-modal-x { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border: 0; border-radius: 999px; background: #f5e7dd; color: #4a3c3d; cursor: pointer; }
.o-modal-x:hover { background: #ecdac9; }
.o-modal-body { padding: 4px 32px 24px; }
.o-modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 32px; background: #f5e7dd; }
.o-modal-foot.bk-foot-end { justify-content: flex-end; }
.o-modal-foot > div:first-child { min-width: 0; } /* let the summary ellipsize, not grow the footer */
.o-modal-foot .o-cta { flex: none; }
.bk-step {display: flex; flex-direction: column; justify-content: space-between; flex: 1;}
.bk-step[hidden] { display: none; } /* keep the flex layout, but still honour the hidden attribute */
.bk-summary { font-family: "Archivo", system-ui, sans-serif; font-weight: 700; font-size: 19px; color: #241d1e;
  margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.bk-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; }
.bk-monthnav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.bk-molabel { font-family: "Archivo", system-ui, sans-serif; font-weight: 700; font-size: 16px; }
.bk-mo { width: 34px; height: 34px; border: 0; border-radius: 999px; background: #f5e7dd; color: #4a3c3d;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.bk-mo:hover:not(:disabled) { background: #ecdac9; }
.bk-mo:disabled { opacity: .35; cursor: default; }
.bk-week, .bk-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.bk-week { margin-bottom: 6px; }
.bk-wd { text-align: center; font-size: 10.5px; }
.bk-day { height: 44px; border: 0; border-radius: 999px; background: transparent; color: #241d1e;
  font: 600 15px "Figtree", system-ui, sans-serif; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.bk-blank { visibility: hidden; }
.bk-avail { background: #f5e7dd; }
.bk-avail:hover { background: #ecdac9; }
.bk-golden { box-shadow: inset 0 0 0 2px #ffd83d; }
.bk-booked { color: color-mix(in srgb, #241d1e 35%, transparent); background: transparent; cursor: default;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #241d1e 14%, transparent); text-decoration: line-through; }
.bk-sel { background: #c9737c !important; color: #fdf7f6 !important; box-shadow: none !important; }
.bk-legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 18px; }
.bk-legend span { display: flex; align-items: center; gap: 8px; font: 700 11px "Figtree", system-ui;
  letter-spacing: .08em; text-transform: uppercase; color: #6b5658; }
.bk-lg { width: 14px; height: 14px; border-radius: 999px; }
.bk-lg-golden { background: #fff3c9; box-shadow: inset 0 0 0 1px #ffd83d; }
.bk-lg-avail { background: #f5e7dd; }
.bk-lg-booked { box-shadow: inset 0 0 0 1px color-mix(in srgb, #241d1e 18%, transparent); }

.bk-slotcol { border-left: 1px solid color-mix(in srgb, #241d1e 12%, transparent); padding-left: 26px; }
.bk-slots { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; margin-top: 12px; padding-right: 6px; }
.bk-slots-empty, .bk-loading { color: #6b5658; font-size: 14px; padding: 8px 0; }
.bk-rangehint { font-size: 12px; color: #6b5658; margin: 4px 0 0; }
.bk-slot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 16px;
  border: 0; border-radius: 999px; background: #f5e7dd; color: #241d1e; font: 600 15px "Figtree", system-ui; cursor: pointer; }
.bk-slot:hover { background: #ecdac9; }
.bk-slot-golden { background: #fff3c9; box-shadow: inset 0 0 0 1px #ffd83d; }
.bk-slot-off { opacity: .5; cursor: default; text-decoration: line-through; }
.bk-slot-sel, .bk-slot-sel:hover { background: #c9737c; color: #fdf7f6; }
.bk-slot-note { font: 700 10.5px "Figtree", system-ui; letter-spacing: .12em; text-transform: uppercase; color: #8a3f49; }
.bk-slot-sel .bk-slot-note { color: #fdf7f6; }

.bk-grid2 { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 32px; }
.bk-fields { display: flex; flex-direction: column; gap: 18px; }
.bk-input { width: 100%; box-sizing: border-box; border: 1px solid color-mix(in srgb, #241d1e 14%, transparent);
  border-radius: 999px; background: #fbf6ef; padding: 15px 20px; font: 16px "Figtree", system-ui; color: #241d1e; }
.bk-input:focus { outline: none; border-color: #c9737c; }
.bk-note { font-size: 14px; line-height: 1.6; color: #6b5658; margin: 0; }
.bk-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.bk-recap { border-left: 1px solid color-mix(in srgb, #241d1e 12%, transparent); padding-left: 26px;
  display: flex; flex-direction: column; gap: 16px; font-size: 15px; color: #241d1e; }
.bk-secondary { display: inline-flex; align-items: center; gap: 9px; border: 1px solid color-mix(in srgb, #241d1e 18%, transparent);
  border-radius: 999px; padding: 14px 24px; background: transparent; color: #4a3c3d; cursor: pointer; font: 700 15px "Figtree", system-ui; }
.bk-err { margin: 0 32px 4px; padding: 12px 16px; border-radius: 16px; background: #fbe6e4; color: #a3372d; font-size: 14px; }
.bk-done { display: flex; align-items: center; gap: 16px; background: #f5e7dd; border-radius: 28px; padding: 26px 28px; margin-top: 4px; }
.bk-check { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px;
  border-radius: 999px; background: #ffd83d; color: #241d1e; }
.bk-done-title { font-family: "Archivo", system-ui, sans-serif; font-weight: 700; font-size: 22px; margin: 0 0 4px; }
.bk-done-text { margin: 0; font-size: 15px; line-height: 1.6; color: #4a3c3d; }
.o-row-book { cursor: pointer; }

@media (max-width: 720px) {
  /* Full-bleed sheet that covers the whole screen, including the notch and
     home-indicator areas (needs viewport-fit=cover on the page). */
  .o-modal { padding: 0; align-items: stretch; }
  .o-modal-card { max-width: none; border-radius: 0; min-height: 100vh; min-height: 100dvh; }
  /* Keep the header/footer controls clear of the notch + home indicator. */
  .o-modal-head { padding-top: max(28px, calc(env(safe-area-inset-top) + 14px)); }
  .o-modal-foot { flex-wrap: wrap; padding-bottom: max(20px, calc(env(safe-area-inset-bottom) + 14px)); }
  .bk-grid, .bk-grid2 { grid-template-columns: 1fr; }
  .bk-recap { border-left: 0; padding-left: 0; padding-top: 18px;
    border-top: 1px solid color-mix(in srgb, #241d1e 12%, transparent); }

  /* Split step 1 into two screens: pick a date, then pick a time. */
  .o-modal-card[data-mview="date"] .bk-slotcol,
  .o-modal-card[data-mview="date"] .o-modal-foot { display: none; }
  .o-modal-card[data-mview="time"] .bk-cal { display: none; }
  .o-modal-card[data-mview="time"] .bk-backcal {
    display: inline-flex; align-items: center; gap: 7px; align-self: flex-start;
    margin-bottom: 14px; padding: 8px 14px 8px 10px; border: 0; border-radius: 999px;
    background: #f5e7dd; color: #4a3c3d; font: 700 13px "Figtree", system-ui; cursor: pointer;
  }
  .bk-slotcol { border-left: 0; padding-left: 0; }
}

/* Fullscreen lightbox (behavior lives in app.js) */
.lightbox { position: fixed; inset: 0; z-index: 50; display: flex;
  align-items: center; justify-content: center; padding: 2rem;
  background: rgba(12, 11, 10, .94); cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lb-img { max-width: 92vw; max-height: 88vh; width: auto; height: auto;
  object-fit: contain; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); cursor: default; }
.lb-close { position: fixed; top: 1rem; right: 1.25rem; width: 44px; height: 44px;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff;
  font-size: 1.6rem; line-height: 1; cursor: pointer; }
.lb-close:hover { background: rgba(255, 255, 255, .24); }

/* ---------- Admin: feature-on-main-page star toggle ---------- */
.photo-feature { position: absolute; top: 4px; left: 4px; margin: 0; cursor: pointer; }
.photo-feature input { position: absolute; opacity: 0; width: 0; height: 0; }
.photo-feature .star { display: grid; place-items: center; width: 26px; height: 26px;
  border-radius: 50%; background: rgba(20, 18, 15, .55); color: #fff; font-size: 15px;
  line-height: 1; transition: background .15s, color .15s; }
.photo-feature:hover .star { background: rgba(20, 18, 15, .8); }
.photo-feature input:checked + .star { background: #f5c451; color: #1b1a18; }
.photo-feature input:focus-visible + .star { outline: 2px solid #fff; outline-offset: 1px; }
.photo-item.is-featured { outline: 2px solid #f5c451; outline-offset: -2px; }

/* ---------- Admin: portrait field on the landing editor ---------- */
.portrait-field { display: flex; flex-direction: column; gap: .5rem; }
.portrait-field .field-label { font-weight: 500; color: var(--ink); font-size: .9rem; }
.portrait-preview { width: 150px; height: 188px; object-fit: cover; filter: grayscale(1);
  border-radius: var(--radius-sm); border: 1px solid var(--line); }
.pricing-fields { border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 1rem 1.1rem 1.15rem; margin: 0; display: flex; flex-direction: column; gap: 1rem; }
.pricing-fields legend { font-size: .8rem; font-weight: 600; color: var(--ink-soft); padding: 0 .4rem; }
.pricing-fields .grid-2 { gap: 1rem; }
.pricing-photos { display: flex; gap: 1rem; }
.pricing-photos .pp { flex: 1; }
.pricing-photos input[type=file] { font-size: .82rem; max-width: 100%; }
.pp-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 50%;
  border: 1px solid var(--line); margin-bottom: .4rem; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
