:root {
  --surface: #f5f0e8;
  --surface-elevated: #fbf8f2;
  --ink: #241f1a;
  --ink-muted: #6b6255;
  --line: #e2d9c8;
  --accent: #c1622d;
  --accent-hover: #a84f21;
  --accent-foreground: #fbf3ea;
  --secondary: #2b4436;
  --secondary-foreground: #f1efe6;
  --gold: #b5872a;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: #1c1712;
    --surface-elevated: #26201a;
    --ink: #f1ece2;
    --ink-muted: #ac9f8c;
    --line: #3a3126;
    --accent: #dd7f47;
    --accent-hover: #e89561;
    --accent-foreground: #221507;
    --secondary: #4c7360;
    --secondary-foreground: #eef5ef;
    --gold: #d3ab52;
  }
}

html[lang="hy"] {
  --font-body: "Noto Sans Armenian", "Noto Sans", sans-serif;
  --font-display: "Noto Serif Armenian", "Noto Serif", serif;
}
html[lang="ru"],
html[lang="en"] {
  --font-body: "Noto Sans", sans-serif;
  --font-display: "Noto Serif", serif;
}

* { box-sizing: border-box; }
html { color-scheme: light dark; }
body {
  position: relative;
  margin: 0;
  overflow-x: hidden;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.03 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  body::before { opacity: 0.6; mix-blend-mode: overlay; }
}
.nav, .brand-rule, main, .footer { position: relative; z-index: 1; }

.brand-rule {
  height: 4px;
  background: linear-gradient(90deg, var(--secondary) 0%, var(--gold) 50%, var(--accent) 100%);
}

img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; }
p { margin: 0; }

.container {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}
@media (min-width: 640px) {
  .container { padding: 0 2rem; }
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(6px);
}
.nav-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}
@media (min-width: 640px) { .nav-inner { padding: 1rem 2rem; flex-wrap: nowrap; } }
.brand {
  order: 1;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
}

/* Intent toggle: the single "I'm looking" / "I'm offering" choice, shown in
   the nav on every page and (larger) as the hero's primary CTA. Both options
   always share the same pill styling — only `.active` differs — on purpose,
   so there's no per-breakpoint style split to fall out of sync. */
.intent-toggle {
  order: 3;
  flex-basis: 100%;
  display: flex;
  gap: 0.25rem;
  font-size: 0.65rem;
  font-weight: 600;
}
.intent-toggle a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 0.5rem 0.25rem;
  color: var(--ink-muted);
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}
.intent-toggle a:hover { border-color: var(--accent); color: var(--ink); }
.intent-toggle a.active {
  border-color: transparent;
  background: var(--secondary);
  color: var(--secondary-foreground);
}
@media (min-width: 640px) {
  .intent-toggle { order: 2; flex-basis: auto; flex: none; gap: 0.625rem; font-size: 0.8125rem; }
  .intent-toggle a { flex: none; padding: 0.5rem 1.1rem; }
}

/* .intent-toggle-lg (the hero's larger CTA variant) needs its own tighter
   mobile sizing — with 3 buttons, its original padding/font-size (restored
   below at >=640px) badly overflows a ~360-390px phone width. */
.intent-toggle-lg { font-size: 0.65rem; gap: 0.25rem; }
.intent-toggle-lg a { padding: 0.6rem 0.3rem; }
@media (min-width: 640px) {
  .intent-toggle-lg { font-size: 1rem; gap: 0.75rem; }
  .intent-toggle-lg a { padding: 0.9rem 1.75rem; }
}
.hero-intent-toggle {
  margin-top: 0.5rem;
  animation: hero-rise 0.8s 0.24s cubic-bezier(.2,.7,.3,1) both;
}
@media (prefers-reduced-motion: reduce) { .hero-intent-toggle { animation: none; } }
/* The hero's own background is a fixed dark gradient in both themes (it does
   not follow --surface), so anything drawn on it needs a foreground token
   that stays light in both themes too — --secondary-foreground fits, since
   it's already defined to stay light against --secondary in light AND dark
   mode. Using --surface here (as earlier versions did) breaks in dark mode:
   --surface itself flips to near-black, making text invisible against the
   hero's still-dark background. */
.hero-intent-toggle a {
  border-color: color-mix(in srgb, var(--secondary-foreground) 40%, transparent);
  color: var(--secondary-foreground);
  background: color-mix(in srgb, var(--secondary-foreground) 10%, transparent);
  backdrop-filter: blur(4px);
}
.hero-intent-toggle a:hover {
  border-color: color-mix(in srgb, var(--secondary-foreground) 70%, transparent);
  color: var(--secondary-foreground);
  background: color-mix(in srgb, var(--secondary-foreground) 18%, transparent);
}
.hero-intent-toggle a.active {
  border-color: transparent;
  background: var(--accent);
  color: var(--accent-foreground);
}

.locale-switcher {
  order: 2;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-elevated);
  padding: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
}
@media (min-width: 640px) { .locale-switcher { order: 3; } }
.locale-switcher a {
  border-radius: 999px;
  padding: 0.35rem 0.6rem;
  color: var(--ink-muted);
}
.locale-switcher a.active {
  background: var(--accent);
  color: var(--accent-foreground);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}
.btn-accent { background: var(--accent); color: var(--accent-foreground); }
.btn-accent:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--secondary); color: var(--secondary-foreground); }
.btn-secondary:hover { opacity: 0.92; }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { opacity: 0.9; }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-muted);
}
.btn-ghost:hover { color: var(--ink); }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.75rem; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  color: var(--secondary-foreground);
  background: linear-gradient(170deg, #2b4436 0%, #22361e 45%, #1a1511 100%);
}
@media (prefers-color-scheme: dark) {
  .hero { background: linear-gradient(170deg, #223326 0%, #1a2518 45%, #0f0c09 100%); }
}
.hero-backdrop {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.skyline {
  position: absolute;
  right: -4%;
  bottom: 0;
  width: min(68%, 56rem);
  height: 78%;
  opacity: 0.9;
}
@media (max-width: 639px) { .skyline { width: 92%; opacity: 0.55; right: -10%; } }
.skyline-peak-back { fill: color-mix(in srgb, var(--secondary-foreground) 14%, transparent); }
.skyline-peak-front { fill: color-mix(in srgb, var(--secondary-foreground) 22%, transparent); }
.skyline-towers rect { fill: color-mix(in srgb, var(--ink) 55%, var(--secondary) 45%); stroke: color-mix(in srgb, var(--secondary-foreground) 10%, transparent); stroke-width: 1; }
.skyline-windows rect { fill: color-mix(in srgb, var(--ink) 70%, black 30%); }
.skyline-windows rect.lit { fill: var(--gold); opacity: 0.9; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(20, 16, 12, 0.92) 0%, rgba(20, 16, 12, 0.72) 32%, rgba(20, 16, 12, 0.15) 60%, rgba(20, 16, 12, 0.35) 100%);
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 72rem;
  margin: 0 auto;
  padding: 7rem 1.25rem 5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
@media (min-width: 640px) { .hero-content { padding: 10rem 2rem 7rem; } }
.eyebrow {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  color: var(--ink);
  padding: 0.4rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  animation: hero-rise 0.7s cubic-bezier(.2,.7,.3,1) both;
}
.eyebrow-mark {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--accent);
}
.hero-title {
  max-width: 40rem;
  font-size: 2.25rem;
  font-weight: 600;
  line-height: 1.15;
  animation: hero-rise 0.8s 0.08s cubic-bezier(.2,.7,.3,1) both;
}
@media (min-width: 640px) { .hero-title { font-size: 3.75rem; } }
.hero-subtitle {
  max-width: 34rem;
  font-size: 1rem;
  color: color-mix(in srgb, var(--secondary-foreground) 90%, transparent);
  animation: hero-rise 0.8s 0.16s cubic-bezier(.2,.7,.3,1) both;
}
@media (min-width: 640px) { .hero-subtitle { font-size: 1.125rem; } }

@keyframes hero-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .eyebrow, .hero-title, .hero-subtitle { animation: none; }
}

/* About section */
.about-section {
  max-width: 72rem;
  margin: 0 auto;
  padding: 4rem 1.25rem;
  display: grid;
  gap: 2.5rem;
}
.about-section > * { min-width: 0; }
@media (min-width: 640px) { .about-section { padding: 4rem 2rem; } }
@media (min-width: 1024px) {
  .about-section { grid-template-columns: 1.1fr 0.9fr; gap: 4rem; padding: 6rem 2rem; }
}
.section-title { font-size: 1.5rem; font-weight: 600; }
@media (min-width: 640px) { .section-title { font-size: 1.875rem; } }
.body-text { font-size: 1rem; line-height: 1.6; color: var(--ink-muted); }

.facts-title {
  margin-top: 2rem;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.facts-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.fact-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
  border-radius: 0.75rem;
  border: 1px solid var(--line);
  background: var(--surface-elevated);
  padding: 1rem;
  font-size: 0.875rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.fact-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.fact-card span { min-width: 0; overflow-wrap: break-word; }
.fact-card svg { flex-shrink: 0; margin-top: 0.15rem; color: var(--accent); }

/* Stat panel (about-section visual counterpart) */
.stat-panel {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  border: 1px solid var(--line);
  background: linear-gradient(165deg, var(--secondary) 0%, color-mix(in srgb, var(--secondary) 80%, black) 100%);
  color: var(--secondary-foreground);
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 320px;
}
.stat-panel-mark {
  position: absolute;
  right: -1.5rem;
  top: -1.5rem;
  width: 9rem;
  height: 9rem;
  opacity: 0.12;
}
.stat-panel-mark circle { fill: none; stroke: var(--secondary-foreground); stroke-width: 1.5; }
.stat-panel-mark path { stroke: var(--secondary-foreground); stroke-width: 1.5; }
.stat-figure {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 600;
  line-height: 1;
  color: var(--gold);
}
.stat-figure-sm svg { width: 2rem; height: 2rem; color: var(--gold); }
.stat-dash { color: color-mix(in srgb, var(--secondary-foreground) 60%, transparent); margin: 0 0.1em; }
.stat-label {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: color-mix(in srgb, var(--secondary-foreground) 85%, transparent);
}
.stat-divider { width: 2.5rem; height: 1px; background: color-mix(in srgb, var(--secondary-foreground) 30%, transparent); margin: 1.5rem 0; }

/* Market band */
.market-band { position: relative; overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--secondary); color: var(--secondary-foreground); }
.market-band::after {
  content: "֏";
  position: absolute;
  right: -0.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: 16rem;
  line-height: 1;
  color: color-mix(in srgb, var(--secondary-foreground) 6%, transparent);
  pointer-events: none;
  user-select: none;
}
.market-inner { position: relative; max-width: 72rem; margin: 0 auto; padding: 3.5rem 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; }
@media (min-width: 640px) { .market-inner { padding: 3.5rem 2rem; } }
.market-inner .body-text { max-width: 42rem; color: color-mix(in srgb, var(--secondary-foreground) 85%, transparent); }

/* Footer */
.footer { margin-top: auto; border-top: 1px solid var(--line); background: var(--surface-elevated); }
.footer-inner { max-width: 72rem; margin: 0 auto; padding: 2rem 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; font-size: 0.75rem; color: var(--ink-muted); }
@media (min-width: 640px) { .footer-inner { padding: 2rem; } }
.footer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; }
.footer-top .brand { font-size: 1rem; }
.footer-links { display: flex; align-items: center; gap: 1rem; }
.footer-links a:hover { color: var(--ink); }
.footer-tagline { font-style: italic; color: var(--ink-muted); }
.footer-credit { color: var(--ink-muted); }
.footer-credit a { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 0.15em; }
.footer-credit a:hover { color: var(--ink); text-decoration-color: var(--accent); }

/* Listings page */
.page-header { max-width: 72rem; margin: 0 auto; padding: 2.5rem 1.25rem 0; }
.page-header-centered { text-align: center; }
@media (min-width: 640px) { .page-header { padding: 3.5rem 2rem 0; } }
.page-title { font-size: 1.875rem; font-weight: 600; }
@media (min-width: 640px) { .page-title { font-size: 2.25rem; } }

.filter-form {
  max-width: 72rem;
  margin: 2rem auto 0;
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: var(--surface-elevated);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (min-width: 640px) { .filter-form { margin: 2rem auto 0; grid-template-columns: repeat(3, 1fr); padding: 1rem 1.5rem; } }
@media (min-width: 1024px) { .filter-form { grid-template-columns: repeat(8, 1fr); } }
.field { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.75rem; font-weight: 500; color: var(--ink-muted); }
.field input, .field select {
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-family: inherit;
}
.field input:focus, .field select:focus, textarea:focus { outline: none; border-color: var(--accent); }
.filter-actions { grid-column: span 2; display: flex; align-items: flex-end; gap: 0.5rem; }
@media (min-width: 640px) { .filter-actions { grid-column: span 3; } }
@media (min-width: 1024px) { .filter-actions { grid-column: span 8; } }

.listings-grid {
  max-width: 72rem;
  margin: 2.5rem auto 3rem;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 640px) { .listings-grid { padding: 0 2rem; grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .listings-grid { grid-template-columns: repeat(3, 1fr); } }
.empty-state { text-align: center; color: var(--ink-muted); margin: 4rem 0; }

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: var(--surface-elevated);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 16px 30px rgba(20, 16, 12, 0.08); }
.card-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--line); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.card:hover .card-media img { transform: scale(1.05); }
.listing-placeholder { display: block; width: 100%; height: 100%; }
.lp-sky { fill: color-mix(in srgb, var(--surface-elevated) 55%, var(--line) 45%); }
.lp-peak-back { fill: color-mix(in srgb, var(--secondary) 22%, transparent); }
.lp-snow { fill: color-mix(in srgb, var(--secondary-foreground) 80%, transparent); }
.lp-peak-front { fill: color-mix(in srgb, var(--secondary) 32%, transparent); }
.lp-towers rect { fill: color-mix(in srgb, var(--ink-muted) 55%, var(--secondary) 45%); }
.lp-windows rect { fill: var(--surface-elevated); opacity: 0.35; }
.lp-windows rect.lit { fill: var(--gold); opacity: 0.9; }
.lp-ground { fill: color-mix(in srgb, var(--line) 70%, var(--ink-muted) 30%); }
.badge {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge-rent { background: var(--secondary); color: var(--secondary-foreground); }
.badge-sale { background: var(--accent); color: var(--accent-foreground); }
.card-body { display: flex; flex-direction: column; gap: 0.4rem; padding: 1rem; flex: 1; }
.card-price { font-family: var(--font-display); font-size: 1.125rem; font-weight: 600; }
.card-price small { font-weight: 400; color: var(--ink-muted); }
.card-title {
  font-size: 0.875rem;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta { margin-top: auto; display: flex; gap: 0.5rem; font-size: 0.75rem; color: var(--ink-muted); }

/* Detail page */
.detail-back { font-size: 0.875rem; font-weight: 500; color: var(--ink-muted); }
.detail-back:hover { color: var(--ink); }
.detail-layout {
  max-width: 72rem;
  margin: 1.5rem auto 3rem;
  padding: 0 1.25rem;
  display: grid;
  align-items: start;
  gap: 2.5rem;
}
.detail-layout > * { min-width: 0; }
@media (min-width: 640px) { .detail-layout { padding: 0 2rem; } }
@media (min-width: 1024px) { .detail-layout { grid-template-columns: 1.4fr 1fr; } }

.gallery-main { position: relative; aspect-ratio: 4 / 3; width: 100%; overflow: hidden; border-radius: 1rem; background: var(--line); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.filmstrip { margin-top: 0.75rem; display: flex; gap: 0.5rem; overflow-x: auto; }
.filmstrip a { position: relative; height: 4rem; width: 5rem; flex-shrink: 0; overflow: hidden; border-radius: 0.5rem; border: 2px solid transparent; }
.filmstrip a.active { border-color: var(--accent); }
.filmstrip img { width: 100%; height: 100%; object-fit: cover; }

.detail-panel { border-radius: 1rem; border: 1px solid var(--line); background: var(--surface-elevated); padding: 1.25rem; }
.detail-panel + .detail-panel { margin-top: 1.5rem; }
.detail-title { font-size: 1.5rem; font-weight: 600; margin-top: 0.75rem; }
@media (min-width: 640px) { .detail-title { font-size: 1.875rem; } }
.detail-price { font-family: var(--font-display); font-size: 1.875rem; font-weight: 600; color: var(--accent); margin-top: 0.5rem; }
.detail-price small { font-size: 1rem; font-weight: 400; color: var(--ink-muted); }
.detail-desc { font-size: 0.875rem; line-height: 1.6; color: var(--ink-muted); margin: 1rem 0; }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem 1rem; margin-top: 0.75rem; font-size: 0.875rem; }
.detail-grid dt { color: var(--ink-muted); }
.detail-grid dd { margin: 0; font-weight: 500; }
.contact-actions { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
@media (min-width: 640px) { .contact-actions { flex-direction: row; } }
.contact-actions .btn { flex: 1; }

/* Forms */
.form-panel {
  max-width: 48rem;
  margin: 2rem auto 3rem;
  padding: 0 1.25rem;
}
@media (min-width: 640px) { .form-panel { padding: 0 2rem; } }
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: var(--surface-elevated);
  padding: 1.5rem;
  margin-top: 2rem;
}
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; padding: 2rem; } }
.form-grid .field.full { grid-column: 1 / -1; }
.form-section-title {
  grid-column: 1 / -1;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.form-grid > .form-section-title:first-of-type { padding-top: 0; border-top: none; }
.field-hint { margin-top: 0.3rem; font-size: 0.75rem; font-weight: 400; color: var(--ink-muted); }
textarea { border-radius: 0.5rem; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 0.5rem 0.75rem; font-size: 0.875rem; font-family: inherit; resize: vertical; }
.checkbox-field { display: flex; align-items: center; gap: 0.5rem; align-self: end; font-size: 0.875rem; }
input[type="file"] {
  border-radius: 0.5rem;
  border: 1px dashed var(--line);
  background: var(--surface);
  color: var(--ink-muted);
  padding: 0.6rem 0.75rem;
  font-size: 0.8125rem;
  font-family: inherit;
  cursor: pointer;
}
input[type="file"]::file-selector-button {
  margin-right: 0.75rem;
  border: none;
  border-radius: 999px;
  background: var(--secondary);
  color: var(--secondary-foreground);
  padding: 0.45rem 0.9rem;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
input[type="file"]::file-selector-button:hover { opacity: 0.9; }
.error-text { grid-column: 1 / -1; color: var(--accent); font-size: 0.875rem; font-weight: 500; }
.success-panel { border-radius: 1rem; border: 1px solid var(--line); background: var(--surface-elevated); padding: 2rem; text-align: center; margin-top: 2rem; }
.success-panel h2 { color: var(--accent); font-size: 1.5rem; }
.success-panel p { margin-top: 0.5rem; color: var(--ink-muted); }

/* Admin */
.admin-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; }
.admin-login-wrap { max-width: 24rem; margin: 0 auto; padding: 4rem 1.25rem; }
.admin-login-panel { display: flex; flex-direction: column; gap: 1rem; border-radius: 1rem; border: 1px solid var(--line); background: var(--surface-elevated); padding: 1.5rem; margin-top: 1.5rem; }
.admin-section { margin-top: 2rem; }
.admin-section h2 { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.75rem; }
.admin-row-list { display: flex; flex-direction: column; gap: 0.5rem; }
.admin-row { display: flex; align-items: center; gap: 1rem; border-radius: 0.75rem; border: 1px solid var(--line); background: var(--surface-elevated); padding: 0.75rem; }
.admin-row-thumb { position: relative; height: 3.5rem; width: 5rem; flex-shrink: 0; overflow: hidden; border-radius: 0.5rem; background: var(--line); }
.admin-row-thumb img { width: 100%; height: 100%; object-fit: cover; }
.admin-row-info { min-width: 0; flex: 1; }
.admin-row-info p:first-child { font-size: 0.875rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-row-info p:last-child { font-size: 0.75rem; color: var(--ink-muted); }
.admin-row-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; flex-shrink: 0; }
.admin-flash { margin-bottom: 1.5rem; padding: 0.75rem 1rem; border-radius: 0.75rem; border: 1px solid var(--line); background: var(--surface-elevated); font-size: 0.875rem; font-weight: 500; }
.admin-row { flex-wrap: wrap; }
@media (min-width: 640px) { .admin-row { flex-wrap: nowrap; } .admin-row-actions { flex-wrap: nowrap; } }
.admin-photo-grid { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
@media (min-width: 640px) { .admin-photo-grid { grid-template-columns: repeat(4, 1fr); } }
.admin-photo { display: flex; flex-direction: column; gap: 0.4rem; cursor: pointer; }
.admin-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 0.5rem; border: 1px solid var(--line); }
.admin-photo:has(input:checked) img { opacity: 0.35; }
.admin-photo .checkbox-field { align-self: start; }
