/* =============================================================================
   Smart Place QR — mobile-first stylesheet
   ============================================================================= */

:root {
  --primary: #0f4c5c;
  --primary-dark: #0a3642;
  --primary-soft: #e3eef0;
  --accent: #e36414;
  --bg: #f6f4ef;
  --surface: #ffffff;
  --text: #1d2a30;
  --muted: #5b6b73;
  --border: #e4e0d8;
  --success: #1f7a4d;
  --success-soft: #e4f4ea;
  --warning: #8a5a00;
  --warning-soft: #fff4d6;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 30, 40, .06), 0 4px 16px rgba(20, 30, 40, .06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.container--narrow { max-width: 560px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; }

.icon { width: 1.15em; height: 1.15em; flex-shrink: 0; vertical-align: -0.2em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.empty { color: var(--muted); text-align: center; padding: 32px 0; }

/* --- Header / footer ------------------------------------------------------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); text-decoration: none; }
.brand__mark { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--primary); color: #fff; }
.brand__mark .icon { width: 18px; height: 18px; }
.site-footer { padding: 32px 0 calc(32px + env(safe-area-inset-bottom)); color: var(--muted); font-size: .9rem; text-align: center; }

/* --- Buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 16px; border-radius: var(--radius-sm);
  border: 1.5px solid transparent; font: inherit; font-weight: 600; font-size: .95rem;
  text-decoration: none; cursor: pointer; line-height: 1.2; text-align: center;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn--lg { min-height: 50px; padding: 12px 20px; font-size: 1rem; }
.btn--sm { min-height: 34px; padding: 6px 12px; font-size: .85rem; }
.btn--block { width: 100%; }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-dark); color: #fff; }
.btn--outline { background: var(--surface); color: var(--primary); border-color: var(--primary); }
.btn--outline:hover { background: var(--primary-soft); }
.btn--ghost { background: transparent; color: var(--primary); }
.btn--ghost:hover { background: var(--primary-soft); }
.btn--light { background: #fff; color: var(--primary); }
.btn--light:hover { background: var(--primary-soft); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { background: #8f1c13; color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--primary); cursor: pointer; text-decoration: underline; }
.inline-form { display: inline; margin: 0; }
.danger { color: var(--danger) !important; }

/* --- Chips / badges -------------------------------------------------------- */
.chip {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem;
  font-weight: 600; background: var(--primary-soft); color: var(--primary);
}
.chip--on-dark { background: rgba(255, 255, 255, .92); color: var(--primary); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; margin-bottom: 8px; scrollbar-width: none; }
.chip--filter { text-decoration: none; white-space: nowrap; padding: 7px 14px; font-size: .85rem; background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.chip--filter.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.badge--published { background: var(--success-soft); color: var(--success); }
.badge--draft { background: var(--warning-soft); color: var(--warning); }
.badge--archived { background: #eceae6; color: var(--muted); }

/* --- Home ------------------------------------------------------------------ */
.home-hero {
  background: linear-gradient(150deg, var(--primary) 0%, #155e6e 60%, #1b7285 100%);
  color: #fff; padding: 48px 0 56px;
}
.home-hero h1 { font-size: clamp(1.9rem, 6vw, 3rem); max-width: 18ch; }
.home-hero .lead { color: rgba(255, 255, 255, .88); max-width: 56ch; }
.eyebrow { text-transform: uppercase; font-size: .78rem; font-weight: 700; opacity: .8; margin-bottom: 8px; }
.lead { font-size: 1.1rem; }
.section { padding: 36px 0; }
.section-title { font-size: 1.5rem; }

.search { display: flex; gap: 8px; margin-bottom: 12px; }
.search input { flex: 1; }

.place-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
.place-card {
  display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); color: var(--text); text-decoration: none;
  transition: transform .15s;
}
.place-card:hover { transform: translateY(-2px); color: var(--text); }
.place-card__media { aspect-ratio: 16 / 10; background: var(--primary-soft); }
.place-card__media img { width: 100%; height: 100%; object-fit: cover; }
.place-card__placeholder { height: 100%; display: grid; place-items: center; font-size: 2.5rem; font-weight: 700; color: var(--primary); opacity: .5; }
.place-card__body { padding: 14px 16px 16px; }
.place-card__title { font-size: 1.1rem; margin: 8px 0 4px; }
.place-card__meta { color: var(--muted); font-size: .88rem; margin: 0; }
.place-grid--compact .place-card { flex-direction: row; }
.place-grid--compact .place-card__media { width: 96px; flex-shrink: 0; aspect-ratio: auto; min-height: 88px; }
.place-grid--compact .place-card__body { padding: 10px 14px; }
.place-grid--compact .place-card__title { font-size: 1rem; margin-top: 6px; }

.pagination { display: flex; justify-content: center; align-items: center; gap: 12px; padding: 24px 0 0; }
.pagination__info { color: var(--muted); font-size: .9rem; }

/* --- Place page ------------------------------------------------------------ */
.hero { position: relative; background: var(--primary); color: #fff; min-height: 300px; display: flex; align-items: flex-end; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__overlay {
  position: relative; width: 100%; padding: 96px 0 22px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .35) 45%, rgba(0, 0, 0, .78) 100%);
}
.hero--plain { min-height: 0; background: linear-gradient(150deg, var(--primary), #1b7285); }
.hero--plain .hero__overlay { background: none; padding-top: 40px; }
.hero__title { font-size: clamp(1.8rem, 7vw, 2.8rem); margin: 10px 0 6px; text-shadow: 0 1px 12px rgba(0, 0, 0, .3); }
.hero__location { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 1rem; opacity: .95; }

.place__intro { font-size: 1.12rem; margin: 20px 0 0; color: #33434a; }

.action-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 20px 0 8px; }
.action-bar > :first-child:nth-last-child(odd) { grid-column: 1 / -1; }
.action-bar > :first-child:only-child { grid-column: 1 / -1; }

.facts { display: grid; gap: 12px; margin-top: 20px; }
.fact { display: flex; gap: 14px; background: var(--surface); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.fact__icon { width: 42px; height: 42px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; flex-shrink: 0; }
.fact__label { font-size: .8rem; text-transform: uppercase; color: var(--muted); margin: 0 0 2px; }
.fact p { margin: 0; font-weight: 500; }

.block { background: var(--surface); border-radius: var(--radius); padding: 20px 18px; margin-top: 16px; box-shadow: var(--shadow); }
.block__title { font-size: 1.25rem; padding-bottom: 10px; margin-bottom: 14px; border-bottom: 2px solid var(--primary-soft); }
.block__subtitle { font-size: 1rem; margin: 18px 0 8px; }
.block__subtitle:first-of-type { margin-top: 0; }
.prose p:last-child { margin-bottom: 0; }
.prose { overflow-wrap: anywhere; }

.tick-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.tick-list li { display: flex; gap: 8px; align-items: flex-start; }
.tick-list .icon { color: var(--success); margin-top: .2em; }
.bullet-list { margin: 0; padding-left: 1.2em; }
.bullet-list li + li { margin-top: 4px; }
.callout { display: flex; gap: 12px; margin-top: 18px; padding: 14px; border-radius: var(--radius-sm); background: var(--warning-soft); color: #5c3d00; }
.callout > .icon { margin-top: 3px; width: 22px; height: 22px; }
.callout__title { font-size: 1rem; margin: 0 0 4px; }
.callout p:last-child { margin: 0; }

.address { font-style: normal; margin-bottom: 14px; }

.gallery { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gallery__item { display: block; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 1; background: var(--primary-soft); }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.gallery__item:hover img { transform: scale(1.03); }
.gallery__caption { font-size: .82rem; color: var(--muted); margin: 4px 2px 0; }

.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list a { display: flex; align-items: center; gap: 12px; padding: 12px 0; text-decoration: none; font-weight: 500; overflow-wrap: anywhere; }
.contact-list li + li a { border-top: 1px solid var(--border); }
.contact-list .icon { width: 20px; height: 20px; }
.social { display: flex; gap: 10px; margin-top: 12px; }
.social__link { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: var(--primary-soft); color: var(--primary); }
.social__link:hover { background: var(--primary); color: #fff; }

.share-row { display: grid; grid-template-columns: 1fr; gap: 10px; }
.share-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: var(--radius-sm);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  background: var(--surface); color: var(--text); border: 1.5px solid var(--border);
}
.share-btn--whatsapp { background: #1f8f4e; border-color: #1f8f4e; color: #fff; }
.share-btn--facebook { background: #1a5fd0; border-color: #1a5fd0; color: #fff; }
.share-btn--whatsapp:hover, .share-btn--facebook:hover { color: #fff; filter: brightness(.92); }

.preview-bar { background: var(--warning-soft); color: #5c3d00; border-bottom: 1px solid #f0d58a; font-size: .9rem; }
.preview-bar__inner { display: flex; justify-content: space-between; gap: 12px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }

.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100%; height: 100%; }
.lightbox::backdrop { background: rgba(0, 0, 0, .9); }
.lightbox[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.lightbox__img { max-width: 96vw; max-height: 82vh; object-fit: contain; border-radius: 6px; }
.lightbox__caption { color: #fff; margin: 10px 16px 0; text-align: center; }
.lightbox__close { position: fixed; top: 12px; right: 12px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .15); color: #fff; cursor: pointer; display: grid; place-items: center; }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: #1d2a30; color: #fff; padding: 10px 18px; border-radius: 999px; font-size: .9rem; z-index: 1000;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .25);
}

.error-page { text-align: center; padding: 72px 0; }
.error-page__icon { width: 72px; height: 72px; margin: 0 auto 20px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; }
.error-page__icon .icon { width: 32px; height: 32px; }

/* --- Forms ----------------------------------------------------------------- */
input[type=text], input[type=search], input[type=email], input[type=url], input[type=number],
input[type=password], input[type=tel], select, textarea {
  width: 100%; font: inherit; font-size: 16px; /* 16px stops iOS zoom-on-focus */
  padding: 10px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); min-height: 44px;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--primary-soft); }
input[type=file] { font: inherit; font-size: .9rem; max-width: 100%; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.field .help { font-size: .82rem; color: var(--muted); margin: 6px 0 0; }
.field .error { font-size: .85rem; color: var(--danger); margin: 6px 0 0; font-weight: 500; }
.field--error input, .field--error select, .field--error textarea { border-color: var(--danger); }
.req { color: var(--danger); }
.check { display: flex; gap: 8px; align-items: center; font-size: .9rem; }

/* --- Dashboard ------------------------------------------------------------- */
.dash { background: #f3f4f2; }
.dash-nav { display: flex; align-items: center; gap: 4px 16px; flex-wrap: wrap; font-size: .92rem; }
.dash-nav a { text-decoration: none; color: var(--muted); font-weight: 600; padding: 6px 0; }
.dash-nav a[aria-current=page] { color: var(--primary); box-shadow: inset 0 -2px 0 var(--primary); }
.dash-nav .linklike { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .92rem; }
.dash-main { padding-top: 24px; padding-bottom: 96px; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.page-head h1 { font-size: 1.6rem; margin: 0 0 4px; }
.page-head p { margin: 0; overflow-wrap: anywhere; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.card--narrow { max-width: 640px; margin-left: auto; margin-right: auto; }
.card__title { font-size: 1.1rem; font-weight: 700; margin-bottom: 14px; padding: 0; }
.card h1 { font-size: 1.5rem; }

.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: .95rem; }
.alert--success { background: var(--success-soft); color: #14532d; }
.alert--error { background: var(--danger-soft); color: #7a1a12; }
.alert--warning { background: var(--warning-soft); color: #5c3d00; }
.alert--info { background: var(--primary-soft); color: var(--primary-dark); }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; text-decoration: none; color: var(--text); display: flex; flex-direction: column; }
.stat:hover { border-color: var(--primary); color: var(--text); }
.stat__num { font-size: 2rem; font-weight: 800; color: var(--primary); line-height: 1.1; }
.stat__label { color: var(--muted); font-size: .9rem; }

.recent { list-style: none; margin: 0; padding: 0; }
.recent__item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; }
.recent__item + .recent__item { border-top: 1px solid var(--border); }
.recent__name { font-weight: 600; display: block; text-decoration: none; }
.recent__item .muted { font-size: .85rem; }
.recent__actions { display: flex; align-items: center; gap: 8px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.toolbar input { flex: 1 1 220px; }
.toolbar select { flex: 0 1 180px; }

/* Tables collapse into cards on phones */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table thead { display: none; }
.table tr { display: grid; grid-template-columns: 56px 1fr; gap: 4px 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.table tr:last-child { border-bottom: 0; }
.table td { padding: 0; }
.table td[data-label] { grid-column: 2; }
.table td[data-label="Category"]::before, .table td[data-label="Created"]::before { content: attr(data-label) ": "; color: var(--muted); }
.table__thumb { grid-row: span 4; }
.table__thumb img, .thumb-placeholder { width: 56px; height: 42px; object-fit: cover; border-radius: 6px; }
.thumb-placeholder { display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.table__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 14px; padding-top: 8px !important; }
.table__actions a, .table__actions .linklike { font-weight: 600; font-size: .9rem; text-decoration: none; }

.form-grid { display: grid; grid-template-columns: 1fr; gap: 0 16px; }
.form-section { border: 1px solid var(--border); }
.form-section legend { float: left; width: 100%; }
.form-section legend + * { clear: both; }
.form-preview { max-width: 220px; border-radius: var(--radius-sm); margin-top: 4px; }
.form-actions { position: sticky; bottom: 0; z-index: 10; margin: 0 -16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(243, 244, 242, .96); border-top: 1px solid var(--border); }
.form-actions__inner { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.form-actions .btn { flex: 1 1 auto; }

.gallery-edit { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 16px; }
.gallery-edit__item { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; }
.gallery-edit__item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; margin-bottom: 10px; }
.gallery-edit__item .field { margin-bottom: 10px; }

.auth { min-height: 70vh; display: grid; place-items: center; padding: 32px 16px; }
.auth__card { width: 100%; max-width: 400px; }
.auth__card h1 { font-size: 1.4rem; margin-bottom: 20px; }

/* QR management */
.qr-card { display: grid; gap: 24px; }
.qr-card__image { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; justify-self: center; }
.qr-card__image img { width: 280px; height: 280px; image-rendering: pixelated; }
.qr-card__info h1 { font-size: 1.6rem; }
.qr-card__info .muted { margin: 0; }
.label { font-size: .85rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.copy-field { display: flex; gap: 8px; margin-bottom: 16px; }
.copy-field input { flex: 1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9rem; }
.btn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-grid .btn:first-child { grid-column: 1 / -1; }
.qr-card__footer { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0 8px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; overflow-wrap: anywhere; }

/* --- Printable QR poster --------------------------------------------------- */
.print-page { background: #e9e9e6; }
.print-toolbar { display: flex; justify-content: space-between; padding: 12px 16px; background: #fff; border-bottom: 1px solid var(--border); }
.poster {
  background: #fff; color: #111; text-align: center; margin: 24px auto; padding: 40px 32px;
  width: min(100% - 32px, 148mm); border: 2px solid #111; border-radius: 18px;
}
.poster__site { text-transform: uppercase; font-size: .8rem; font-weight: 700; color: #444; margin: 0 0 16px; }
.poster__qr { width: 80%; max-width: 110mm; margin: 0 auto; image-rendering: pixelated; }
.poster__name { font-size: clamp(1.6rem, 6vw, 2.4rem); text-transform: uppercase; margin: 18px 0 6px; }
.poster__cta { font-size: 1.4rem; font-weight: 700; margin: 0 0 8px; }
.poster__hint { font-size: 1rem; color: #333; margin: 0 0 18px; }
.poster__url { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; color: #555; margin: 0; word-break: break-all; }

@media print {
  @page { size: A4 portrait; margin: 12mm; }
  .no-print, .site-header, .site-footer, .dash-nav, .toast { display: none !important; }
  .print-page { background: #fff; }
  .poster { margin: 0 auto; width: 100%; max-width: 170mm; border-width: 2px; page-break-inside: avoid; }
  .poster__qr { width: 120mm; max-width: 120mm; }
  .poster__name { font-size: 28pt; }
  .poster__cta { font-size: 20pt; }
  .poster__hint { font-size: 13pt; }
}

/* =============================================================================
   Larger screens
   ============================================================================= */
@media (min-width: 560px) {
  .place-grid { grid-template-columns: 1fr 1fr; }
  .share-row { grid-template-columns: repeat(3, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .action-bar { display: flex; flex-wrap: wrap; }
  .facts { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .gallery-edit { grid-template-columns: 1fr 1fr; }
  .form-actions .btn { flex: 0 0 auto; }
}

@media (min-width: 800px) {
  .place-grid { grid-template-columns: repeat(3, 1fr); }
  .place-grid--compact { grid-template-columns: 1fr 1fr; }
  .hero { min-height: 440px; }
  .hero__overlay { padding-bottom: 32px; }
  .block { padding: 28px 32px; }
  .tick-list { grid-template-columns: repeat(3, 1fr); }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .span-2 { grid-column: 1 / -1; }
  .gallery-edit { grid-template-columns: repeat(3, 1fr); }
  .qr-card { grid-template-columns: auto 1fr; align-items: start; }
  .qr-card__image img { width: 320px; height: 320px; }
  .home-hero { padding: 80px 0 88px; }

  .table thead { display: table-header-group; }
  .table tr { display: table-row; padding: 0; }
  .table th { text-align: left; font-size: .8rem; text-transform: uppercase; color: var(--muted); padding: 12px 14px; background: #fafaf8; border-bottom: 1px solid var(--border); }
  .table td { display: table-cell; padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
  .table tr:last-child td { border-bottom: 0; }
  .table td[data-label]::before { content: none !important; }
  .table__actions { display: table-cell !important; white-space: nowrap; }
  .table__actions > * + * { margin-left: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* Photo credits (required for Creative Commons photos) */
.hero__credit { position: absolute; top: 8px; right: 8px; margin: 0; max-width: 70%; font-size: .68rem; line-height: 1.3; padding: 3px 8px; border-radius: 6px; background: rgba(0, 0, 0, .45); color: rgba(255, 255, 255, .9); text-align: right; }
.hero__credit a { color: inherit; }
.gallery__credit { font-size: .7rem; color: var(--muted); margin: 2px 2px 0; line-height: 1.3; overflow-wrap: anywhere; }
.gallery__credit a { color: inherit; }
