
/* ==================== RESET ==================== */
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html { scroll-behavior:smooth; -webkit-text-size-adjust:100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; border: none; outline: none; background: none; color: inherit; }
button { cursor: pointer; }

/* ==================== TYPE ==================== */
h1 { font-family: 'Playfair Display', Georgia, serif; font-size: 1.875rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
h2 { font-family: 'Playfair Display', Georgia, serif; font-size: 1.4rem; font-weight: 700; line-height: 1.25; }
h3 { font-size: 1rem; font-weight: 600; }
@media (min-width: 720px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.8rem; }
}

/* ==================== TOKENS ==================== */
:root {
  --primary: #1F2937;       /* overridden per-subapp */
  --accent:  #C2410C;       /* overridden per-subapp */
  --bg:      #FAFAF7;       /* overridden per-subapp */

  --text:       #1A1A1A;
  --text-soft:  #4B5563;
  --text-muted: #6B7280;
  --card-bg:    #FFFFFF;
  --border:     #E5E7EB;
  --border-light:#F3F4F6;
  --shadow-sm:  0 1px 2px rgba(0,0,0,.04);
  --shadow:     0 2px 8px rgba(0,0,0,.06);
  --shadow-md:  0 8px 24px rgba(0,0,0,.08);
  --radius-sm:  8px;
  --radius:     12px;
  --radius-lg:  18px;
  --max-width:  1180px;
}

/* ==================== LAYOUT ==================== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 720px) {
  .container { padding: 0 1.5rem; }
}

/* ==================== HEADER ==================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--border-light);
}
.site-header-inner {
  display: flex; align-items: center; gap: .75rem;
  height: 56px;
}
.site-logo {
  display: flex; align-items: center; gap: .5rem;
  font-weight: 700; font-size: 1rem; color: var(--primary);
}
.site-logo img { height: 32px; width: auto; }
.site-nav { margin-left: auto; display: flex; gap: .25rem; align-items: center; }
.site-nav a, .site-nav button {
  padding: .5rem .75rem; border-radius: var(--radius-sm);
  font-size: .875rem; color: var(--text-soft);
}
.site-nav a:hover, .site-nav button:hover { background: var(--border-light); color: var(--text); }
.site-nav a.active { color: var(--accent); font-weight: 600; }
.icon-btn {
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
}
.icon-btn:hover { background: var(--border-light); }

/* Mobile menu */
@media (max-width: 640px) {
  .site-nav .nav-link-text { display: none; }
}

/* ==================== HERO ==================== */
.hero {
  position: relative;
  padding: 2rem 0 1.5rem;
}
.hero h1 { color: var(--primary); }
.hero .lede {
  margin-top: .5rem; color: var(--text-soft); font-size: 1rem; max-width: 36ch;
}
@media (min-width: 720px) {
  .hero { padding: 3.5rem 0 2.5rem; }
  .hero .lede { font-size: 1.1rem; max-width: 50ch; }
}

/* ==================== SEARCH ==================== */
.search-bar {
  display: flex; align-items: center; gap: .5rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .25rem .25rem .25rem 1rem;
  box-shadow: var(--shadow-sm);
  margin-top: 1rem;
  max-width: 480px;
}
.search-bar input {
  flex: 1; padding: .625rem 0; font-size: .95rem;
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-bar button {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
}
.search-bar button:hover { background: var(--accent); }

/* ==================== PAGE CONTEXT BAR ====================
 * Below the site header on every guide page (home, listing, detail,
 * search): filter chip strip on top (primary nav — the same on every
 * page), breadcrumb below (secondary — current location within that
 * nav). Same markup, same styles, same active-state behaviour
 * everywhere. The bar is sticky on scroll so chips stay reachable. */
.page-context {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border-light);
  padding: .5rem 0 0;
}
.page-context-inner {
  display: flex; flex-direction: column;
  gap: .15rem;
}

/* Breadcrumb. Each segment is either a link (clickable) or current
 * (the last one, plain text, semibold). Separators are visual only.
 * Sits below the chip strip — slightly muted by default since the
 * chips are the primary nav. */
.crumbs {
  display: flex; flex-wrap: wrap;
  align-items: center; gap: .25rem .35rem;
  font-size: .78rem; color: var(--text-soft);
  padding: .15rem 0 .4rem;
}
.crumbs a {
  color: var(--text-soft);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: .25rem;
}
.crumbs a:hover { color: var(--accent); }
.crumbs .crumb-current {
  color: var(--text); font-weight: 600;
  display: inline-flex; align-items: center; gap: .25rem;
}
.crumbs .sep {
  color: var(--border);
  font-size: .8rem;
}

/* ==================== FILTER CHIPS ====================
 * Primary navigation. Sits at the top of the page-context bar. */
.chips {
  display: flex; gap: .4rem; overflow-x: auto;
  padding: .15rem 0 .35rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  padding: .3rem .7rem;
  border-radius: 999px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  font-size: .78rem; color: var(--text-soft);
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: .3rem;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.chip.active:hover { color: #fff; }
.chip-all {
  font-weight: 600;
}
.chip-icon { font-size: .85rem; }
/* Per-chip count badge — small, dim, follows the chip label.
 * Inverted to translucent white-on-primary when the chip is active. */
.chip-count {
  display: inline-block;
  font-size: .68rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: .15rem;
  font-variant-numeric: tabular-nums;
}
.chip.active .chip-count { color: rgba(255, 255, 255, .82); }

/* Time chip strip — sits inside the upcoming-events section header.
 * Smaller padding + tighter look since it's a secondary chip strip,
 * not the primary atmosphere navigation. */
.chips-time {
  padding: 0;
  flex-wrap: wrap;
  gap: .3rem;
}
.chip-time {
  padding: .25rem .55rem;
  font-size: .75rem;
}
/* Custom date chip wraps a form. The native date input is hidden
 * visually (width:0) but stays clickable via the surrounding label —
 * this is the standard "trigger date picker by clicking a custom
 * surface" pattern. The label's own padding owns the chip's hit area. */
.chip-time.chip-custom {
  cursor: pointer;
  position: relative;
}
.chip-time.chip-custom input[type="date"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.chip-time.chip-clear {
  padding: .2rem .5rem;
  font-weight: 600;
  color: var(--text-soft);
}
.chip-time.chip-clear:hover { color: var(--text); }

/* Header row hosting both an h2 and the time chip strip on the right.
 * Grows to wrap on narrow viewports. */
.events-section-header {
  display: flex; align-items: center; gap: .75rem;
  flex-wrap: wrap;
  padding: 0 1rem;
}
.events-section-header h2 { margin: 0; }
.events-section-header .chips-time {
  margin-left: auto;
}
@media (max-width: 640px) {
  .events-section-header .chips-time { margin-left: 0; width: 100%; }
}

/* ==================== SECTIONS ==================== */
.section { padding: 1.5rem 0; }
.section-title {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; margin-bottom: .85rem;
}
.section-title h2 { color: var(--primary); }
.section-title a { color: var(--accent); font-size: .85rem; font-weight: 600; }

/* ==================== CARDS ==================== */
.card-grid {
  display: grid; gap: .85rem;
  grid-template-columns: 1fr;
}
@media (min-width: 540px) { .card-grid { grid-template-columns: 1fr 1fr; gap: 1rem; } }
@media (min-width: 820px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1080px){ .card-grid { grid-template-columns: repeat(4, 1fr); } }

.card {
  display: flex; flex-direction: column;
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card-img {
  aspect-ratio: 16/11;
  background: linear-gradient(135deg, var(--border-light), var(--border));
  position: relative; overflow: hidden;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: .55rem .7rem .7rem; }
.card-title {
  font-weight: 600; font-size: .88rem; color: var(--text); margin-bottom: .12rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta { display: flex; gap: .35rem; align-items: center; font-size: .73rem; color: var(--text-muted); }
.card-meta .dot { color: var(--border); }

/* Proximity badge */
.badge-proximity {
  position: absolute; top: .55rem; left: .55rem;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(6px);
  border-radius: 999px;
  padding: .2rem .6rem;
  font-size: .72rem; font-weight: 600; color: var(--primary);
  display: inline-flex; align-items: center; gap: .25rem;
}
.badge-proximity.surrounding { color: var(--accent); }

/* Card actions overlay */
.card-actions {
  position: absolute; top: .5rem; right: .5rem;
  display: flex; gap: .35rem;
}
.card-actions button {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(6px);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text);
}
.card-actions button:hover { background: #fff; color: var(--accent); }
.card-actions button.fav-on { color: #DC2626; }

/* ==================== HORIZONTAL SCROLL ROW ==================== */
.h-scroll {
  display: flex; gap: .65rem; overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: .5rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.h-scroll::-webkit-scrollbar { display: none; }
.h-scroll > * {
  flex: 0 0 62%; scroll-snap-align: start;
}
@media (min-width: 540px) { .h-scroll > * { flex-basis: 34%; } }
@media (min-width: 820px) { .h-scroll > * { flex-basis: 22%; } }
@media (min-width: 1100px){ .h-scroll > * { flex-basis: 17%; } }

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .65rem 1.1rem;
  border-radius: 999px;
  font-size: .9rem; font-weight: 600;
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-block { width: 100%; justify-content: center; }

/* ==================== DETAIL — compact, no big hero ==================== */
.detail-top {
  padding: 1.25rem 0 .35rem;
}
/* The thumbnail next to / above the title — small enough that the user
   doesn't need to scroll to see the description and actions. */
.detail-title-row {
  display: flex; gap: 1rem; align-items: flex-start;
}
.detail-thumb {
  flex-shrink: 0;
  width: 84px; height: 84px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--border-light);
  box-shadow: var(--shadow-sm);
}
.detail-thumb img { width: 100%; height: 100%; object-fit: cover; }
.detail-title-row h1 {
  font-size: 1.55rem;
  line-height: 1.2;
  word-break: break-word;
}
@media (min-width: 720px) {
  .detail-thumb { width: 120px; height: 120px; }
  .detail-title-row h1 { font-size: 2rem; }
}

/* Action chip row sits right under the title — favorite, share, directions */
.detail-actions {
  display: flex; gap: .5rem; flex-wrap: wrap;
  margin-top: .85rem;
}
.detail-actions .chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .45rem .75rem;
  font-size: .85rem; font-weight: 500;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
}
.detail-actions .chip:hover { border-color: var(--accent); color: var(--accent); }
.detail-actions .chip.primary {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.detail-actions .chip.fav-on { background: #fef2f2; border-color: #fca5a5; color: #b91c1c; }
.detail-actions .chip.fav-on svg { fill: currentColor; }

.detail-body { padding: 0 0 2rem; }
.detail-meta { color: var(--text-muted); font-size: .85rem; margin-top: .35rem; }
.detail-prose { font-size: 1rem; color: var(--text); margin-top: 1rem; }
.detail-prose p + p { margin-top: .85rem; }

/* Optional gallery — collapsed thumbnail strip, never a hero */
.detail-gallery {
  display: flex; gap: .5rem; overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: .25rem;
  margin-top: 1rem;
}
.detail-gallery::-webkit-scrollbar { display: none; }
.detail-gallery > div {
  flex: 0 0 120px; aspect-ratio: 1/1;
  border-radius: var(--radius-sm);
  overflow: hidden; background: var(--border-light);
  scroll-snap-align: start;
}
.detail-gallery img { width: 100%; height: 100%; object-fit: cover; }

.history-block {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: var(--card-bg);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
}
.history-block h2 { font-size: 1.2rem; margin-bottom: .5rem; color: var(--primary); }

/* ==================== LANGUAGE SWITCHER ==================== */
.lang-switcher { position: relative; }
.lang-switcher > summary {
  list-style: none;
  padding: .5rem .65rem;
  border-radius: var(--radius-sm);
  font-size: .8rem; font-weight: 600;
  color: var(--text-soft);
  display: inline-flex; align-items: center; gap: .3rem;
  cursor: pointer;
}
.lang-switcher > summary::-webkit-details-marker { display: none; }
.lang-switcher > summary:hover { background: var(--border-light); color: var(--text); }
.lang-switcher[open] > summary { background: var(--border-light); color: var(--text); }
.lang-switcher .lang-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  width: 220px;
  max-height: 360px;
  overflow-y: auto;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  z-index: 80;
  padding: .25rem;
}
.lang-switcher .lang-menu a {
  display: flex; align-items: center; gap: .6rem;
  padding: .45rem .6rem;
  font-size: .85rem;
  color: var(--text);
  border-radius: var(--radius-sm);
}
.lang-switcher .lang-menu a:hover { background: var(--border-light); }
.lang-switcher .lang-menu a[aria-current="true"] {
  background: rgba(194, 65, 12, .08);
  color: var(--accent);
  font-weight: 600;
}
.lang-switcher .lang-code {
  display: inline-block; min-width: 2.2em;
  font-weight: 600; color: var(--text-muted);
  font-size: .75rem; letter-spacing: .04em;
}
.lang-switcher .lang-menu a[aria-current="true"] .lang-code { color: var(--accent); }
.lang-switcher .lang-name { flex: 1; }

/* Smaller on phones — just show the code */
@media (max-width: 640px) {
  .lang-switcher .lang-menu {
    width: 200px;
    /* Anchor to the right edge so it doesn't overflow the viewport */
    right: 0;
  }
}

.btn-sm { padding: .4rem .9rem !important; font-size: .85rem !important; }

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

/* ==================== ATMOSPHERE SECTIONS ==================== */
/* Atmosphere groupings on the home page. Each atmosphere is a labeled block
   with one or more groupings; each grouping has a horizontal scroller. */
.atmo-section {
  padding: 1.5rem 0;
  border-top: 1px solid var(--border-light);
}
.atmo-section:first-of-type { border-top: none; }
.atmo-header {
  display: flex; align-items: center; gap: .5rem;
  margin-bottom: .5rem;
  padding: 0 1rem;
}
.atmo-header .icon { font-size: 1.25rem; line-height: 1; }
.atmo-header h2 {
  font-size: 1.4rem;
  font-family: 'Playfair Display', serif;
  color: var(--text);
  margin: 0;
}
.atmo-grouping {
  margin-top: 1rem;
}
.atmo-grouping-title {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1rem;
  margin-bottom: .5rem;
  font-size: .9rem; font-weight: 600;
  color: var(--text-soft);
}
.atmo-grouping-title .icon { font-size: 1rem; margin-right: .35rem; }
.atmo-grouping-title a {
  font-size: .8rem; font-weight: 500;
  color: var(--accent);
}

/* ==================== EVENT CARDS ==================== */
/* Smaller, date-forward cards used in upcoming-events sections. */
.event-card {
  display: flex; gap: .65rem;
  padding: .55rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: transform .15s ease, border-color .15s ease;
}
.event-card:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}
.event-card .event-date {
  flex-shrink: 0;
  width: 46px;
  text-align: center;
  padding: .3rem .2rem;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
}
.event-card .event-date .day {
  font-size: 1.15rem; font-weight: 700; line-height: 1;
}
.event-card .event-date .month {
  font-size: .58rem; text-transform: uppercase;
  letter-spacing: .04em;
  margin-top: .12rem;
}
.event-card .event-info {
  flex: 1; min-width: 0;
}
.event-card .event-name {
  font-size: .85rem; font-weight: 600;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.event-card .event-meta {
  font-size: .7rem;
  color: var(--text-muted);
  margin-top: .12rem;
}

/* ==================== RESULT COUNT STRIP ==================== */
.result-count-strip {
  display: flex; align-items: center; justify-content: space-between;
  padding: .5rem 1rem;
  font-size: .85rem;
  color: var(--text-muted);
}

/* ==================== SEARCH OVERLAY ==================== */
#guides-search-overlay {
  position: fixed; inset: 0;
  z-index: 110;
  pointer-events: none;
  visibility: hidden;
}
#guides-search-overlay.open {
  pointer-events: auto;
  visibility: visible;
}
#guides-search-overlay-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.4);
  opacity: 0;
  transition: opacity .2s ease;
}
#guides-search-overlay.open #guides-search-overlay-backdrop { opacity: 1; }
#guides-search-overlay-body {
  position: absolute; top: 0; left: 0; right: 0;
  background: var(--bg);
  padding: .75rem 1rem;
  transform: translateY(-100%);
  transition: transform .25s ease;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
}
#guides-search-overlay.open #guides-search-overlay-body { transform: translateY(0); }

.guides-search-form {
  display: flex; align-items: center; gap: .5rem;
  max-width: 720px; margin: 0 auto;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .35rem .65rem;
}
.guides-search-form:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(194, 65, 12, .12);
}
.guides-search-icon {
  flex-shrink: 0;
  display: inline-flex; align-items: center;
  color: var(--text-muted);
}
.guides-search-form input {
  flex: 1;
  border: none; outline: none;
  background: transparent;
  font: inherit;
  padding: .5rem .25rem;
  color: var(--text);
}
.guides-search-form input::placeholder { color: var(--text-muted); }
.guides-search-close {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  background: transparent;
}
.guides-search-close:hover { background: var(--border-light); color: var(--text); }

/* ==================== PANEL SYSTEM ==================== */
#guides-panel {
  position: fixed; inset: 0;
  z-index: 100;
  pointer-events: none;
  visibility: hidden;
}
#guides-panel.open {
  pointer-events: auto;
  visibility: visible;
}
#guides-panel-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.45);
  opacity: 0;
  transition: opacity .25s ease;
}
#guides-panel.open #guides-panel-backdrop { opacity: 1; }

#guides-panel-body {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 100%;
  background: var(--bg);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateX(100%);
  transition: transform .3s ease;
  box-shadow: -8px 0 32px rgba(0,0,0,.18);
  display: flex; flex-direction: column;
}
@media (min-width: 768px) {
  #guides-panel-body {
    width: min(560px, 95vw);
  }
}
@media (min-width: 1100px) {
  #guides-panel-body {
    width: min(640px, 60vw);
  }
}
#guides-panel.open #guides-panel-body { transform: translateX(0); }

/* Close (back-arrow style) sits on the left so the gesture maps to "go back" */
#guides-panel-close {
  position: absolute; top: .75rem; left: .75rem;
  z-index: 5;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  color: var(--text);
}
#guides-panel-close:hover { background: #fff; transform: scale(1.05); }

#guides-panel-content { flex: 1; min-height: 100vh; }

/* When panel is open we lock the underlying body to prevent scroll bleed */
body.panel-open {
  overflow: hidden;
  /* Keep position so we don't lose the scroll position behind the panel */
}

/* Loading + error states */
.panel-loading {
  padding: 6rem 1rem;
  text-align: center;
  color: var(--text-muted);
}
.panel-spinner {
  width: 32px; height: 32px;
  margin: 0 auto;
  border: 3px solid var(--border-light);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.panel-error {
  padding: 4rem 1.25rem;
  text-align: center;
  color: var(--text-soft);
}
.panel-error a { color: var(--accent); font-weight: 600; }

/* When inside a panel, the body content needs top padding so it isn't
   covered by the close button. The panel's own scroll handles the rest. */
#guides-panel-content > [data-panel-title] > main {
  padding-top: 3.5rem;
}

/* ==================== FORMS ==================== */
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .35rem; color: var(--text-soft); }
.field input, .field textarea, .field select {
  width: 100%; padding: .7rem .85rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .95rem;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(194, 65, 12, .12);
}

.auth-card {
  max-width: 380px; margin: 2rem auto;
  padding: 1.5rem;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.auth-card h1 { font-size: 1.5rem; margin-bottom: .25rem; color: var(--primary); }
.auth-card .sub { color: var(--text-soft); margin-bottom: 1.25rem; font-size: .9rem; }

/* ==================== FOOTER ==================== */
.site-footer {
  margin-top: auto;
  padding: 2rem 0 3rem;
  background: var(--card-bg);
  border-top: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: .85rem;
}
.site-footer a { color: var(--text-soft); }
.site-footer a:hover { color: var(--accent); }
.site-footer-inner {
  display: flex; flex-direction: column; gap: 1rem;
  align-items: flex-start;
}
.site-footer-links { display: flex; gap: 1rem; flex-wrap: wrap; }
@media (min-width: 720px) {
  .site-footer-inner { flex-direction: row; justify-content: space-between; align-items: center; }
}

/* ==================== UTIL ==================== */
.empty {
  text-align: center; padding: 3rem 1rem;
  color: var(--text-muted);
}
.empty .emoji { font-size: 2.5rem; display: block; margin-bottom: .5rem; }

.skeleton { background: linear-gradient(90deg, #f3f4f6, #e5e7eb, #f3f4f6); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { 0%{background-position:0 0} 100%{background-position:-200% 0} }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; transition-duration: 0s !important; }
}
