/* UNNIBO shared components (DESIGN.md §15). Requires tokens.css + base.css.
   Rules: 1px borders, radius 12–16 for surfaces, no offset shadows, teal for structure,
   yellow only for the chosen action and top scores. Every colour comes from a semantic token. */

/* ───────── SiteHeader ───────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--color-background);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-standard) var(--ease), background-color var(--dur-major) var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--color-border); }
.site-header__inner { display: flex; align-items: center; gap: var(--space-4); height: var(--header-h); }
.brand { display: inline-flex; align-items: baseline; gap: var(--space-2); min-height: 44px; align-items: center; flex: none; }
.brand__word { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; color: var(--color-brand-primary); }
.brand__sub { font-size: var(--text-small); color: var(--color-text-secondary); }
.site-nav { display: none; align-items: center; gap: var(--space-1); margin-inline: auto; }
.site-nav a {
  position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-3);
  color: var(--color-text-secondary); font-size: var(--text-small); font-weight: var(--weight-medium); border-radius: var(--radius-sm);
  transition: color var(--dur-hover) var(--ease);
}
.site-nav a:hover { color: var(--color-text-primary); }
.site-nav a[aria-current] { color: var(--color-text-primary); font-weight: var(--weight-semibold); }
.site-nav a[aria-current]::after { content: ""; position: absolute; left: var(--space-3); right: var(--space-3); bottom: 6px; height: 2px; border-radius: 2px; background: var(--color-brand-primary); }
.header-tools { display: flex; align-items: center; gap: var(--space-2); margin-left: auto; }
.header-tools .prefs, .header-tools .btn { display: none; }
@media (min-width: 1024px) {
  .site-nav { display: flex; }
  .header-tools { margin-left: 0; }
  .header-tools .prefs { display: flex; }
  .header-tools .menu-toggle { display: none; }
}
@media (min-width: 1280px) { .header-tools .btn { display: inline-flex; } }

/* ───────── MobileNavigation (sheet) ───────── */
.mobile-nav { position: fixed; inset: var(--header-h) 0 auto 0; z-index: 99; max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
  padding: var(--space-2) var(--page-padding) var(--space-6); background: var(--color-surface); border-bottom: var(--border); box-shadow: var(--shadow-overlay); }
.mobile-nav nav { display: grid; }
.mobile-nav nav a { display: flex; align-items: center; justify-content: space-between; min-height: 52px; border-bottom: var(--border); font-size: var(--text-body-l); font-weight: var(--weight-semibold); }
.mobile-nav nav a::after { content: "→"; color: var(--color-text-muted); }
.mobile-nav .prefs { margin-top: var(--space-5); }
.mobile-nav .btn { width: 100%; margin-top: var(--space-5); }
@media (min-width: 1024px) { .mobile-nav { display: none !important; } }

/* ───────── Preference controls ───────── */
.prefs { display: flex; align-items: center; gap: var(--space-2); }
.prefs--labelled { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: var(--space-3) var(--space-4); }
.prefs__label { font-size: var(--text-small); color: var(--color-text-secondary); }
.seg { display: inline-flex; padding: 3px; gap: 2px; border: var(--border); border-radius: var(--radius-pill); background: var(--color-surface); }
.seg button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 40px; min-height: 36px; padding: 0 10px;
  border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--color-text-secondary); font-size: var(--text-small); font-weight: var(--weight-semibold);
  transition: background-color var(--dur-hover) var(--ease), color var(--dur-hover) var(--ease);
}
.seg button:hover { color: var(--color-text-primary); }
.seg button[aria-checked="true"] { background: var(--color-brand-primary); color: var(--color-on-brand-primary); }
.seg button:focus-visible { border-radius: var(--radius-pill); }
.seg svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.prefs--labelled .seg { justify-self: start; }
.prefs--labelled .seg button { min-height: 44px; min-width: 48px; }

/* ───────── Buttons ───────── */
.btn {
  --bg: var(--color-brand-primary); --fg: var(--color-on-brand-primary); --bd: var(--bg); --bg-h: var(--color-brand-primary-hover);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--control-h); padding: 0 var(--space-5); border: 1px solid var(--bd); border-radius: var(--radius-md);
  background: var(--bg); color: var(--fg); font-weight: var(--weight-semibold); font-size: var(--text-body); line-height: 1.2; text-align: center;
  transition: background-color var(--dur-hover) var(--ease), border-color var(--dur-hover) var(--ease), color var(--dur-hover) var(--ease);
}
.btn:hover { background: var(--bg-h); border-color: var(--bg-h); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn--accent { --bg: var(--color-brand-yellow); --fg: var(--color-on-brand-yellow); --bg-h: var(--color-brand-yellow-hover); }
.btn--secondary { --bg: var(--color-surface); --fg: var(--color-text-primary); --bd: var(--color-border-strong); --bg-h: var(--color-surface-muted); }
.btn--secondary:hover { border-color: var(--color-text-secondary); }
.btn--ghost { --bg: transparent; --fg: var(--color-link); --bd: transparent; --bg-h: var(--color-brand-primary-soft); }
.btn--sm { min-height: var(--control-h-sm); padding: 0 var(--space-4); font-size: var(--text-small); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: var(--radius-md); background: transparent; color: var(--color-text-primary);
  transition: background-color var(--dur-hover) var(--ease); }
.icon-btn:hover { background: var(--color-surface-muted); }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.link { color: var(--color-link); font-weight: var(--weight-semibold); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em; }
.link:hover { text-decoration-thickness: 2px; }

/* ───────── SearchBar ───────── */
.search { position: relative; display: flex; align-items: center; gap: var(--space-2); min-height: 52px; padding: 0 var(--space-2) 0 var(--space-4);
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); background: var(--color-surface);
  transition: border-color var(--dur-hover) var(--ease), box-shadow var(--dur-hover) var(--ease); }
.search:hover { border-color: var(--color-text-muted); }
.search:focus-within { border-color: var(--color-brand-primary); box-shadow: 0 0 0 3px var(--color-brand-primary-soft); }
.search > svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--color-text-secondary); stroke-width: 1.8; stroke-linecap: round; }
.search input { flex: 1; min-width: 0; min-height: 48px; border: 0; background: transparent; font-size: var(--text-body); outline: none; }
.search input::placeholder { color: var(--color-text-muted-strong); }
.search input::-webkit-search-cancel-button { display: none; }
.search .icon-btn { width: 40px; height: 40px; }

/* ───────── FilterChip / FilterPanel ───────── */
.chip-row { display: flex; gap: var(--space-2); overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--page-padding)); padding: 2px var(--page-padding); scroll-snap-type: x proximity; }
.chip-row::-webkit-scrollbar { display: none; }
@media (min-width: 1024px) { .chip-row { flex-wrap: wrap; margin-inline: 0; padding-inline: 0; overflow: visible; } }
.chip { display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 40px; padding: 0 var(--space-4); scroll-snap-align: start;
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-pill); background: var(--color-surface); color: var(--color-text-primary);
  font-size: var(--text-small); font-weight: var(--weight-medium); white-space: nowrap;
  transition: background-color var(--dur-hover) var(--ease), border-color var(--dur-hover) var(--ease), color var(--dur-hover) var(--ease); }
.chip:hover { border-color: var(--color-text-secondary); }
.chip[aria-pressed="true"] { background: var(--color-brand-primary); border-color: var(--color-brand-primary); color: var(--color-on-brand-primary); }
.chip__count { color: var(--color-text-muted-strong); font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] .chip__count { color: inherit; opacity: 0.8; }
@media (max-width: 639px) { .chip { min-height: 44px; } }
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.filter-bar__label { font-size: var(--text-small); color: var(--color-text-secondary); }
.select { min-height: var(--control-h-sm); padding: 0 36px 0 var(--space-3); border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); background: var(--color-surface) no-repeat right 12px center / 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%238A8F98' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  appearance: none; font-size: var(--text-small); }

/* ───────── Score badge ───────── */
.score { display: inline-flex; align-items: baseline; gap: 1px; flex: none; padding: 3px 8px; border-radius: var(--radius-sm); background: var(--color-surface-muted);
  color: var(--color-text-primary); font-weight: var(--weight-bold); font-size: var(--text-small); font-variant-numeric: lining-nums tabular-nums; }
.score small { font-weight: var(--weight-medium); color: var(--color-text-secondary); font-size: var(--text-caption); }
.score--top { background: var(--color-brand-yellow-soft); color: var(--color-text-primary); box-shadow: inset 0 0 0 1px var(--color-brand-yellow); }
.score--top small { color: var(--color-text-secondary); }
.score--strong.score--top { background: var(--color-brand-yellow); color: var(--color-on-brand-yellow); box-shadow: none; }
.score--strong.score--top small { color: var(--color-on-brand-yellow); opacity: 0.75; }

/* ───────── DishCard ───────── */
.dish-card { position: relative; display: grid; gap: var(--space-2); align-content: start; padding: var(--space-5) 0; border-top: 1px solid var(--color-border); }
.dish-card:hover .dish-card__name { color: var(--color-link); }
.dish-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.dish-card__name { transition: color var(--dur-hover) var(--ease); font-family: var(--font-ui); font-size: var(--text-h4); line-height: 1.35; font-weight: var(--weight-semibold); }
.dish-card__where { display: flex; flex-wrap: wrap; gap: 2px var(--space-2); font-size: var(--text-small); color: var(--color-text-secondary); }
.dish-card__where b { color: var(--color-text-primary); font-weight: var(--weight-medium); }
.dish-card__note { font-size: var(--text-small); line-height: 1.6; color: var(--color-text-secondary); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dish-card__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); font-size: var(--text-caption); color: var(--color-text-muted-strong); }
.dish-card__photo { margin: 0 0 var(--space-2); aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius-md); }
.dish-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.dish-card a.stretch::after { content: ""; position: absolute; inset: 0; }
.type-tag { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: var(--radius-pill); background: var(--color-brand-primary-soft); color: var(--color-link); font-size: var(--text-caption); font-weight: var(--weight-semibold); }

/* ───────── RestaurantCard ───────── */
.restaurant-card { position: relative; display: grid; gap: var(--space-3); align-content: start; }
.restaurant-card__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius-lg); background: var(--color-surface-muted); }
.restaurant-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-major) var(--ease); }
.restaurant-card:hover .restaurant-card__media img { transform: scale(1.03); }
.restaurant-card__name { font-size: var(--text-h4); line-height: 1.35; font-family: var(--font-ui); font-weight: var(--weight-semibold); }
.restaurant-card__meta { font-size: var(--text-small); color: var(--color-text-secondary); }
.restaurant-card a.stretch::after { content: ""; position: absolute; inset: 0; }

/* ───────── Photo (with honest captions) ───────── */
.photo { margin: 0; display: grid; gap: var(--space-2); }
.photo__frame { position: relative; overflow: hidden; border-radius: var(--radius-lg); background: var(--color-surface-muted); }
.photo__frame img { width: 100%; height: 100%; object-fit: cover; }
.photo figcaption, .photo__caption { display: block; font-size: var(--text-caption); line-height: 1.5; color: var(--color-text-secondary); }
.photo__caption::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: var(--space-2); border-radius: 50%; background: var(--dot, var(--color-text-muted)); vertical-align: 0.05em; }
.photo--dish .photo__caption { --dot: var(--color-success); }
.photo--restaurant .photo__caption { --dot: var(--color-text-muted); }
.photo--missing .photo__frame { display: grid; place-content: center; justify-items: center; gap: var(--space-2); padding: var(--space-6); border: 1px dashed var(--color-border-strong); background: var(--color-surface-muted); color: var(--color-text-secondary); text-align: center; font-size: var(--text-small); }
.photo--missing svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.photo-status { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-3) var(--space-4); border: 1px dashed var(--color-border-strong); border-radius: var(--radius-md); color: var(--color-text-secondary); font-size: var(--text-small); }
.photo-status svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; }

/* ───────── SectionHeading ───────── */
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-4) var(--space-6); margin-bottom: var(--space-6); }
.section-head__text { display: grid; gap: var(--space-2); max-width: 46rem; }
.section-head__kicker { font-size: var(--text-small); font-weight: var(--weight-semibold); color: var(--color-link); }
.section-head__desc { color: var(--color-text-secondary); font-size: var(--text-body); }

/* ───────── AuthorNote (EditorialFeature quote) ───────── */
.author-note { margin: 0; padding: var(--space-1) 0 var(--space-1) var(--space-4); border-left: 3px solid var(--color-brand-primary); }
.author-note p { font-size: var(--text-body-l); line-height: 1.7; color: var(--color-text-primary); }
.author-note footer { margin-top: var(--space-2); font-size: var(--text-caption); color: var(--color-text-secondary); }
.author-note--small p { font-size: var(--text-body); }

/* ───────── InformationRow ───────── */
.info-rows { display: grid; margin: 0; }
.info-row { display: grid; grid-template-columns: minmax(6.5rem, auto) 1fr; gap: var(--space-4); padding: var(--space-3) 0; border-bottom: var(--border); }
.info-row dt { font-size: var(--text-small); color: var(--color-text-secondary); }
.info-row dd { margin: 0; font-size: var(--text-small); }

/* ───────── Pending field (explicitly not provided) ───────── */
.pending { display: inline-flex; align-items: center; gap: var(--space-2); padding: 2px 10px; border: 1px dashed var(--color-border-strong); border-radius: var(--radius-sm); color: var(--color-text-secondary); font-size: var(--text-small); }
.pending::before { content: "○"; font-size: 10px; }

/* ───────── Notice (preview / prototype / source) ───────── */
.notice { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--color-surface-muted); color: var(--color-text-secondary); font-size: var(--text-small); }
.notice b { color: var(--color-text-primary); }
.notice--warning { background: var(--color-warning-soft); color: var(--color-text-primary); }
.badge { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: var(--radius-pill); background: var(--color-brand-yellow-soft); color: var(--color-text-primary); font-size: var(--text-caption); font-weight: var(--weight-semibold); }

/* ───────── Places (location discovery) ───────── */
.place-list { display: grid; align-content: start; gap: 0; border-top: 1px solid var(--color-border); margin: 0; padding: 0; list-style: none; }
.place { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 2px var(--space-3); align-items: center; min-height: 56px; padding: var(--space-3) var(--space-3); border: 0; border-bottom: 1px solid var(--color-border); border-radius: 0; background: transparent; text-align: left; transition: background-color var(--dur-hover) var(--ease); }
.place:hover { background: var(--color-surface); }
.place[aria-pressed="true"] { background: var(--color-surface); box-shadow: inset 3px 0 0 var(--color-brand-primary); }
.place__name { font-weight: var(--weight-semibold); }
.place__count { font-size: var(--text-small); color: var(--color-text-secondary); font-variant-numeric: tabular-nums; }
.place__top { grid-column: 1 / -1; font-size: var(--text-small); color: var(--color-text-secondary); }

/* ───────── MapPreview (real map container) ───────── */
.map-preview { position: relative; min-height: 360px; overflow: hidden; border: var(--border); border-radius: var(--radius-lg); background: var(--color-surface-muted); }
.map-preview__canvas { position: absolute; inset: 0; }
.map-preview__label { position: absolute; z-index: 2; left: var(--space-3); top: var(--space-3); display: inline-flex; align-items: center; gap: var(--space-2); padding: 4px 10px; border-radius: var(--radius-pill); background: var(--color-surface); border: var(--border); font-size: var(--text-caption); font-weight: var(--weight-semibold); }
.map-preview__label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--color-success); }
.map-preview__state { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: var(--space-2); padding: var(--space-6); text-align: center; color: var(--color-text-secondary); font-size: var(--text-small); }
.map-preview__state b { color: var(--color-text-primary); font-size: var(--text-body); }
.map-pin { padding: 3px 8px; border-radius: var(--radius-pill); background: var(--color-surface); color: var(--color-text-primary); border: 1px solid var(--color-border-strong); font: 600 12px/1.4 var(--font-ui); white-space: nowrap; box-shadow: var(--shadow-hover); }
.map-pin.is-active { background: var(--color-brand-primary); color: var(--color-on-brand-primary); border-color: var(--color-brand-primary); }
.map-pin--dot { width: 16px; height: 16px; padding: 0; border: 2px solid var(--color-surface); background: var(--color-brand-primary); cursor: pointer; }
.map-pin--dot span { display: none; }
.map-pin--dot:hover, .map-pin--dot.is-active { width: auto; height: auto; padding: 3px 8px; border-color: var(--color-brand-primary); position: relative; z-index: 5; }
.map-pin--dot:hover span, .map-pin--dot.is-active span { display: inline; }

/* ───────── FormField ───────── */
.field { display: grid; gap: var(--space-2); }
.field__label { font-size: var(--text-small); font-weight: var(--weight-semibold); }
.field__label .req { color: var(--color-error); margin-left: 2px; }
.field__hint { font-size: var(--text-small); color: var(--color-text-secondary); }
.field__error { font-size: var(--text-small); color: var(--color-error); font-weight: var(--weight-medium); }
.input, .textarea { width: 100%; min-height: var(--control-h); padding: 0 var(--space-4); border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); background: var(--color-surface); font-size: var(--text-body);
  transition: border-color var(--dur-hover) var(--ease), box-shadow var(--dur-hover) var(--ease); }
.textarea { min-height: 120px; padding-block: var(--space-3); resize: vertical; line-height: 1.6; }
.input::placeholder, .textarea::placeholder { color: var(--color-text-muted-strong); }
.input:focus-visible, .textarea:focus-visible { outline: none; border-color: var(--color-brand-primary); box-shadow: 0 0 0 3px var(--color-brand-primary-soft); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--color-error); }

/* ───────── Dialog / Sheet ───────── */
.dialog { width: min(100% - 32px, 560px); max-height: min(90dvh, 720px); padding: 0; border: var(--border); border-radius: var(--radius-xl); background: var(--color-surface); color: var(--color-text-primary); box-shadow: var(--shadow-overlay); }
.dialog::backdrop { background: var(--color-overlay); }
.dialog__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-4) var(--space-5); border-bottom: var(--border); }
.dialog__body { padding: var(--space-5); display: grid; gap: var(--space-4); }
@media (max-width: 639px) { .dialog--sheet { width: 100%; max-width: none; margin: auto 0 0; border-radius: var(--radius-xl) var(--radius-xl) 0 0; } }

/* ───────── EmptyState / LoadingSkeleton ───────── */
.empty-state { display: grid; justify-items: center; gap: var(--space-3); padding: var(--space-9) var(--space-5); border: 1px dashed var(--color-border-strong); border-radius: var(--radius-lg); text-align: center; }
.empty-state svg { width: 48px; height: 48px; fill: none; stroke: var(--color-text-muted); stroke-width: 1.5; }
.empty-state p { color: var(--color-text-secondary); }
.skeleton { display: grid; gap: var(--space-3); padding: var(--space-5); border: var(--border); border-radius: var(--radius-lg); background: var(--color-surface); }
.skeleton i { display: block; height: 14px; border-radius: 6px; background: var(--color-surface-muted); animation: pulse 1.6s ease-in-out infinite; }
.skeleton i:first-child { height: 22px; width: 60%; }
.skeleton i:nth-child(3) { width: 80%; }
@keyframes pulse { 50% { opacity: 0.5; } }
@media (prefers-reduced-motion: reduce) { .skeleton i { animation: none; } .dish-card:hover, .restaurant-card:hover .restaurant-card__media img { transform: none; } }

/* ───────── SiteFooter ───────── */
.site-footer { padding-block: var(--space-9) var(--space-6); background: var(--color-footer); color: var(--color-on-footer); }
.site-footer a { color: var(--color-on-footer); }
.site-footer__grid { display: grid; gap: var(--space-8); }
.site-footer__brand { display: grid; gap: var(--space-3); max-width: 28rem; }
.site-footer__brand .brand__word { color: var(--color-on-footer); }
.site-footer__brand p { color: var(--color-on-footer-secondary); font-size: var(--text-small); }
.site-footer__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6); }
.site-footer__col { display: grid; align-content: start; gap: var(--space-1); }
.site-footer__col h2 { margin-bottom: var(--space-2); font-family: var(--font-ui); font-size: var(--text-small); font-weight: var(--weight-semibold); color: var(--color-on-footer-secondary); }
.site-footer__col a, .site-footer__col span { display: flex; align-items: center; min-height: 36px; font-size: var(--text-small); }
.site-footer__col a:hover { text-decoration: underline; text-underline-offset: 0.25em; }
.site-footer .pending { border-color: var(--color-on-footer-secondary); color: var(--color-on-footer-secondary); }
.site-footer__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-8); padding-top: var(--space-5); border-top: 1px solid rgba(255, 255, 255, 0.16); color: var(--color-on-footer-secondary); font-size: var(--text-small); }
.site-footer :focus-visible { outline-color: var(--color-brand-yellow); }
@media (min-width: 1024px) { .site-footer__grid { grid-template-columns: 1.2fr 2fr; } .site-footer__cols { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ───────── CategoryCard (typographic: no unverified photos) ───────── */
.category-grid { display: grid; gap: var(--space-3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .category-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); } }
.category-card { position: relative; display: grid; align-content: start; gap: var(--space-2); min-height: 132px; padding: var(--space-4) var(--space-5); border: var(--border); border-radius: var(--radius-lg); background: var(--color-surface);
  transition: border-color var(--dur-hover) var(--ease), transform var(--dur-hover) var(--ease), box-shadow var(--dur-hover) var(--ease); }
.category-card:hover { border-color: var(--color-border-strong); transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.category-card__top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-2); }
.category-card__name { font-family: var(--font-display); font-size: var(--text-h4); font-weight: var(--weight-bold); line-height: 1.3; }
.category-card__count { font-size: var(--text-small); color: var(--color-text-secondary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.category-card__examples { font-size: var(--text-small); color: var(--color-text-secondary); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.category-card a.stretch::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-lg); }

/* ───────── FeaturedRestaurantCard ───────── */
.featured-grid { display: grid; gap: var(--space-6); }
@media (min-width: 768px) { .featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .featured-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.featured-card { position: relative; display: grid; align-content: start; gap: var(--space-3); }
.featured-card__media { aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--radius-lg); background: var(--color-surface-muted); }
.featured-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-major) var(--ease); }
.featured-card:hover .featured-card__media img { transform: scale(1.03); }
.featured-card__media--empty { display: grid; place-content: center; justify-items: center; gap: var(--space-2); color: var(--color-text-secondary); font-size: var(--text-small); border: 1px dashed var(--color-border-strong); }
.featured-card__media--empty svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.featured-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.featured-card__name { font-family: var(--font-ui); font-size: var(--text-h4); line-height: 1.35; font-weight: var(--weight-semibold); }
.featured-card__meta { font-size: var(--text-small); color: var(--color-text-secondary); }
.featured-card__dish { font-size: var(--text-small); }
.featured-card__dish b { font-weight: var(--weight-semibold); }
.featured-card__quote { font-size: var(--text-small); color: var(--color-text-secondary); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.featured-card a.stretch::after { content: ""; position: absolute; inset: 0; }
.featured-card:focus-within .featured-card__name { text-decoration: underline; text-underline-offset: 0.2em; }

/* ───────── EditorialFeature ───────── */
.editorial { display: grid; gap: var(--space-7); }
.editorial__body { display: grid; align-content: start; gap: var(--space-5); }
.editorial__dishes .info-row { grid-template-columns: 1fr auto; align-items: center; }
.editorial__dishes dt { color: var(--color-text-primary); font-size: var(--text-body); }
@media (min-width: 1024px) { .editorial { grid-template-columns: 7fr 5fr; align-items: start; } .editorial .photo { position: sticky; top: calc(var(--header-h) + var(--space-5)); } }

/* ───────── RestaurantGallery + lightbox ───────── */
.gallery { display: grid; gap: var(--space-2); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery__item { position: relative; padding: 0; border: 0; overflow: hidden; border-radius: var(--radius-md); background: var(--color-surface-muted); aspect-ratio: 1; cursor: zoom-in; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-major) var(--ease); }
.gallery__item:hover img { transform: scale(1.03); }
.gallery__item:first-child { grid-column: 1 / -1; aspect-ratio: 3 / 2; }
.gallery__more { position: absolute; inset: 0; display: grid; place-items: center; background: var(--color-overlay); color: #fff; font-weight: var(--weight-semibold); }
@media (min-width: 768px) {
  .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 1fr; }
  .gallery__item { aspect-ratio: auto; min-height: 140px; }
  .gallery__item:first-child { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
  .gallery--single { grid-template-columns: 1fr; } .gallery--single .gallery__item:first-child { aspect-ratio: 3 / 2; grid-row: auto; }
}
.gallery-empty { display: grid; place-content: center; justify-items: center; gap: var(--space-2); min-height: 200px; padding: var(--space-6); border: 1px dashed var(--color-border-strong); border-radius: var(--radius-lg); color: var(--color-text-secondary); font-size: var(--text-small); text-align: center; }
.gallery-empty svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.lightbox { width: min(100vw - 24px, 1100px); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: var(--radius-lg); background: #0b0d0d; color: #fff; }
.lightbox::backdrop { background: rgba(0, 0, 0, 0.82); }
.lightbox__frame { display: grid; place-items: center; height: min(78dvh, 820px); }
.lightbox__frame img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) var(--space-4); font-size: var(--text-small); color: #d7dbd9; }
.lightbox__nav { display: flex; gap: var(--space-2); }
.lightbox .icon-btn { color: #fff; }
.lightbox .icon-btn:hover { background: rgba(255, 255, 255, 0.12); }
.lightbox :focus-visible { outline-color: var(--color-brand-yellow); }

/* ───────── FilterPanel (sidebar ≥1024, sheet below) ───────── */
.filter-panel { display: grid; gap: var(--space-5); align-content: start; }
.filter-group { display: grid; gap: var(--space-2); margin: 0; padding: 0; border: 0; min-width: 0; }
.filter-group legend { padding: 0; margin-bottom: var(--space-2); font-size: var(--text-small); font-weight: var(--weight-semibold); }
.filter-group .hint { font-size: var(--text-caption); color: var(--color-text-secondary); margin-top: calc(-1 * var(--space-1)); }
.filter-group__options { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.filter-toggle { display: inline-flex; }
.filter-sheet .dialog__body { max-height: 70dvh; overflow-y: auto; }
.filter-sheet__foot { display: flex; gap: var(--space-3); justify-content: space-between; padding: var(--space-4) var(--space-5); border-top: var(--border); }
@media (min-width: 1024px) { .filter-toggle { display: none; } }

/* ───────── Additions 2026-10-11 (DESIGN.md §32) ───────── */

/* ColloquialLabel — the guide author's own word (夯 / 人上人 / NPC) beside a score; never derived from the score. */
.score-group { display: inline-flex; align-items: center; gap: var(--space-2); flex: none; }
.slang { display: inline-flex; align-items: baseline; gap: 6px; min-height: 24px; padding: 2px 9px; border: 1px solid transparent; border-radius: var(--radius-pill);
  font-family: var(--font-display); font-size: var(--text-small); font-weight: var(--weight-bold); line-height: 1.4; white-space: nowrap; cursor: help; }
.slang__en { font-family: var(--font-ui); font-size: var(--text-caption); font-weight: var(--weight-medium); opacity: 0.85; }
.slang--hang { background: var(--color-brand-primary); color: var(--color-on-brand-primary); }
.slang--above { background: var(--color-brand-primary-soft); color: var(--color-link); border-color: var(--color-brand-primary-soft); }
.slang--npc { background: transparent; color: var(--color-text-muted-strong); border: 1px dashed var(--color-border-strong); font-family: var(--font-ui); letter-spacing: 0.04em; }

/* Radio segmented control (forms) — same look as .seg buttons, native radios for accessibility. */
.seg--radio label { position: relative; display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--space-4); border-radius: var(--radius-pill);
  color: var(--color-text-secondary); font-size: var(--text-small); font-weight: var(--weight-semibold); cursor: pointer; transition: background-color var(--dur-hover) var(--ease), color var(--dur-hover) var(--ease); }
.seg--radio input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg--radio label:has(input:checked) { background: var(--color-brand-primary); color: var(--color-on-brand-primary); }
.seg--radio label:has(input:focus-visible) { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.field--choice { border: 0; margin: 0; padding: 0; min-width: 0; }
.field--choice legend { margin-bottom: var(--space-2); padding: 0; }
.check { display: flex; align-items: flex-start; gap: var(--space-3); min-height: 44px; font-size: var(--text-small); cursor: pointer; }
.check input { flex: none; width: 20px; height: 20px; margin-top: 1px; accent-color: var(--color-brand-primary); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.steps { margin: 0; padding-left: 1.25em; display: grid; gap: var(--space-1); color: var(--color-text-secondary); }
.form-status[data-tone="ok"] { background: var(--color-brand-primary-soft); }
.form-status[data-tone="error"] { background: var(--color-error-soft); }

/* CampusCard — the primary classification (校内 / 校外) as a quick-discovery entry. */
.campus-grid { display: grid; gap: var(--space-5); }
@media (min-width: 768px) { .campus-grid { grid-template-columns: 1fr 1fr; } }
.campus-card { display: grid; align-content: start; gap: var(--space-4); padding: var(--space-6); border: var(--border); border-radius: var(--radius-xl); background: var(--color-surface); }
.campus-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }
.campus-card__name { font-family: var(--font-display); font-size: var(--text-h2); font-weight: var(--weight-bold); line-height: 1.2; }
.campus-card__count { font-size: var(--text-small); color: var(--color-text-secondary); font-variant-numeric: tabular-nums; }
.campus-card__places { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.campus-card__places .chip { min-height: 40px; }
.campus-card__note { font-size: var(--text-small); color: var(--color-text-secondary); }

/* Footer owner column + Profile (About page). */
.site-footer__owner { display: grid; gap: var(--space-1); }
.profile { display: grid; gap: var(--space-5); padding: var(--space-6); border: var(--border); border-radius: var(--radius-xl); background: var(--color-surface); align-content: start; }
.profile__mark { display: grid; place-content: center; width: 64px; height: 64px; border-radius: var(--radius-pill); background: var(--color-brand-primary); color: var(--color-on-brand-primary);
  font-family: var(--font-display); font-size: var(--text-h3); font-weight: var(--weight-bold); }
.profile__name { font-family: var(--font-display); font-size: var(--text-h2); font-weight: var(--weight-bold); line-height: 1.25; overflow-wrap: anywhere; }
.profile__intro { font-size: var(--text-body-l); line-height: 1.7; }
.profile__links { display: flex; flex-wrap: wrap; gap: var(--space-3); }
