/* ============================================================
   Cuptory — base styles
   Design system: DESIGN.md (Warm Editorial Minimalism, v3 2026-09-29)
   Fonts: Fraunces (display) + Plus Jakarta Sans (body), self-hosted (static/fonts.css)
   ============================================================ */

:root {
  /* Light mode — default */
  --bg:           #F7F5F2;
  --surface:      #FFFFFF;
  --text:         #1C1208;
  --text-muted:   #74685E;   /* 4.97:1 on --bg (was #9B8E83, 2.9:1) */
  --accent:       #B89C84;
  --star-fill:    #F7D774;   /* pastel yellow */
  --star-stroke:  #D4AE3A;
  --control-off:  #928579;   /* empty star, track, unselected stop: 3.3:1 on --bg (WCAG 1.4.11) */
  --star-on:      #B07A12;   /* filled star: 3.4:1 on --bg, 3.7:1 on white */
  --focus:        #1C1208;   /* keyboard focus ring: 16.9:1 on --bg (the accent is only 2.4:1) */
  --accent-light: #EDE0D1;
  --accent-dark:  #8A7060;
  --border:       #EAE4DE;
  --dock-bg:      rgba(255,255,255,0.93);
  --ink-strong:   #6F5A47;
  --danger:       #B3402A;
  --ok:           #4C7A45;
  --side:         #EFEBE5;   /* tint beside the centered column on wide screens */

  /* Layout */
  --radius:       10px;
  --radius-chip:  18px;
  --nav-height:   60px;
  --max-w:        680px;

  /* Typography */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Plus Jakarta Sans', system-ui, sans-serif;
}

[data-theme="dark"] {
  --bg:           #1A1209;
  --surface:      #241C10;
  --text:         #F0E6D3;
  --text-muted:   #AA9A8A;
  --accent:       #B89C84;
  --accent-light: #3A2E22;
  --accent-dark:  #8A7060;
  --border:       #3A2F1E;
  --control-off:  #7D6E5C;   /* 3.4:1 on --surface */
  --star-on:      #D79A3C;   /* 6.9:1 on --surface */
  --focus:        #F0E6D3;
  --dock-bg:      rgba(26,18,9,0.93);
  --ink-strong:   #D9C4AE;
  --danger:       #E0775F;
  --ok:           #8DBB82;
  --side:         #0F0A05;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html { font-size: 16px; height: var(--app-h, 100dvh); overflow: hidden; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  height: var(--app-h, 100dvh);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  overscroll-behavior-y: contain;
}

a { color: var(--accent); text-decoration: none; }
a { -webkit-tap-highlight-color: transparent; transition: opacity 0.12s; }
a:active { opacity: 0.55; }

/* Header */
.site-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.25rem 24px;          /* same side air as the app's brand bar */
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
  white-space: nowrap;
}

/* Brand: the Cuptory symbol and wordmark, drawn in the text colour (partials/_brand_macros.html) */
.brand-lockup { display: inline-flex; align-items: center; gap: 10px; color: inherit; }
.brand-symbol { height: 18px; width: auto; flex-shrink: 0; }
.brand-wordmark { height: 11px; width: auto; flex-shrink: 0; }
.brand-lockup--stacked { flex-direction: column; gap: 14px; }
.brand-lockup--stacked .brand-symbol { height: 34px; }
.brand-lockup--stacked .brand-wordmark { height: 15px; }

/* Brand bar above every tab of the app shell (index.html): a running head, wordmark on the
   left margin and the cup on the right, both at cap height (docs/designs/app-header-h3.md).
   The cup is 1px taller than the 11px caps because its round bottom reads smaller. */
.app-brand {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 52px;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;               /* a little more air than the 16px content edge */
  color: var(--text);
}
.app-brand .brand-wordmark,
.site-header .brand-wordmark { height: 13px; }
.app-brand .brand-symbol,
.site-header .brand-symbol { height: 14px; }
.site-header-cup { margin-left: auto; color: var(--text); }
.site-header form ~ .site-header-cup { display: none; }   /* the map's city search needs the room */
.site-header .city-form-small { flex: 1; min-width: 0; }
.site-header .city-form-small input { min-width: 0; }
[data-theme="dark"] .app-brand .brand-symbol,
[data-theme="dark"] .site-header-cup { color: var(--accent); }   /* caramel cup on dark */

.site-main {
  flex: 1;
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Hero / home */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 4rem 1rem;
  gap: 1rem;
}

.hero h1 { font-size: 2rem; line-height: 1.2; }
.tagline { color: var(--text-muted); }

/* City search forms */
.city-form, .city-form-small {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  max-width: 440px;
}

.city-form-small { max-width: 320px; }

.city-form input, .city-form-small input {
  flex: 1;
  padding: 0.6rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
}

.city-form input:focus, .city-form-small input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* Buttons */
button, .btn-submit {
  padding: 0.6rem 1.2rem;
  background: var(--accent);
  color: #1a1209;
  border: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

/* The Log screens own their button states; the generic brown hover repainted links, chips and Save (1.5:1 text). :where keeps the specificity unchanged. */
button:where(:not(.log-screen button, .log-success button)):hover, .btn-submit:hover {
  background: var(--accent-dark);
}

/* Home full-viewport map */
.home-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  padding: 0;
  margin: 0;
  min-height: 0;
}

#home-map {
  flex: 1;
  width: 100%;
  min-height: 0;
}

/* Map page */
.map-page { display: flex; flex-direction: column; gap: 1.5rem; }
#map { width: 100%; height: 60dvh; min-height: 300px; border-radius: var(--radius); }
.map-empty { color: var(--text-muted); text-align: center; padding: 3rem 0; }

/* Venue list */
.venue-list { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }

.venue-card a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
}

.venue-card a:hover { border-color: var(--accent); text-decoration: none; }
.venue-name { font-weight: 500; }
.venue-vibe { color: var(--text-muted); font-size: 0.85rem; }

/* Venue detail */
.venue-detail { display: flex; flex-direction: column; gap: 1.5rem; }
.venue-header h1 { font-size: 1.6rem; }
.venue-city { color: var(--text-muted); }
.venue-map { width: 100%; height: 220px; border-radius: var(--radius); }

.venue-info { display: flex; flex-direction: column; gap: 0.75rem; }

.info-row {
  display: flex;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.info-label { color: var(--text-muted); width: 120px; flex-shrink: 0; }
.info-value { color: var(--text); }

.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field label { font-size: 0.85rem; color: var(--text-muted); }

.field input, .field select, .field textarea {
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  width: 100%;
}

.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* ============================================================
   Home screen — diary-first layout
   ============================================================ */

.home-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  padding: 0;
  overflow: hidden;
}

#main-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
}

/* Log screen fills #main-content exactly — no internal scroll, no padding bleed. */
#main-content:has(.log-screen) {
  overflow: hidden;
}

/* ============================================================
   Diary feed
   ============================================================ */

.diary-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 3rem 1rem;
  text-align: center;
}

.diary-empty-icon { font-size: 2rem; opacity: 0.35; }
.diary-empty-text { color: var(--text-muted); line-height: 1.5; font-size: 0.95rem; }

.diary-list { list-style: none; display: flex; flex-direction: column; }

.diary-date-header {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  font-style: italic;
  color: var(--text);
  padding: 1.25rem 0 0.35rem;
}

.diary-entry {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.6rem 0;
}

.diary-entry-day {
  flex: 0 0 1.75rem;
  width: 1.75rem;
  height: 1.75rem;
  color: var(--text-muted);
}
.diary-entry-day svg { display: block; width: 100%; height: 100%; }

.diary-entry-main {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.diary-entry-coffee { font-weight: 600; font-size: 0.95rem; }

.diary-entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.6rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.diary-entry-brew, .diary-entry-origin, .diary-entry-venue { display: inline-flex; align-items: center; gap: 0.3rem; }
.diary-ico { flex: none; width: 0.9em; height: 0.9em; opacity: 0.75; }
.diary-entry-venue .diary-ico { width: 1.2em; height: 1.2em; }
.diary-entry-venue { font-size: 0.72rem; color: var(--text-muted); opacity: 0.8; }
.diary-entry-venue a { color: inherit; text-decoration: none; }

.diary-entry-rating {
  flex: 0 0 auto;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  padding-top: 0.1rem;
}

.diary-entry-notes {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.15rem;
}

/* A row is one tap target: the title link stretches over it (see .diary-entry-link). */
.diary-wrap { min-width: 0; }
.diary-wrap + .diary-wrap .diary-entry { border-top: 0.5px solid var(--border); }
.diary-entry { position: relative; background: var(--bg); transition: background 0.15s; }
@media (hover: hover) { .diary-entry:hover { background: var(--surface); } }
.diary-entry .log-fchips { margin-top: 3px; }


.diary-load-more {
  padding: 1.25rem 0 0.5rem;
  display: flex;
  justify-content: center;
}

.btn-load-more {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.4rem 1.75rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.85rem;
}

.btn-load-more:hover { border-color: var(--accent); color: var(--text); background: transparent; }

/* ============================================================
   Map partial (HTMX-swapped into #main-content)
   ============================================================ */

.map-wrap { display: flex; flex-direction: column; flex: 1; }
.map-canvas { flex: 1; display: flex; flex-direction: column; }

.filter-city-input {
  font: inherit;
  font-size: 0.75rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--bg, var(--surface));
  color: var(--text);
}
.filter-city-input:focus { outline: none; border-color: var(--accent); }

.map-partial {
  position: relative;
  z-index: 0; /* keep Leaflet panes below the filter panel */
  width: 100%;
  flex: 1;
  min-height: 300px;
  border-radius: var(--radius);
}

/* ============================================================
   Bottom tab bar
   ============================================================ */

.bottom-nav {
  display: flex;
  background: rgba(247, 245, 242, 0.93);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

[data-theme="dark"] .bottom-nav {
  background: rgba(26, 18, 9, 0.93);
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.55rem 0.5rem calc(0.6rem + env(safe-area-inset-bottom, 0px));
  background: transparent;
  border: none;
  color: color-mix(in srgb, var(--text) 78%, var(--bg));   /* dark, thin-line icons to match the logo */
  font-size: 0.68rem;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item:hover:not([disabled]) { background: transparent; color: var(--text); text-decoration: none; }

.bottom-nav-icon {
  font-size: 1.25rem;
  line-height: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 12px;
  padding: 0.2rem 0.6rem;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.25s ease, color 0.25s ease;
}

.bottom-nav-item--active .bottom-nav-icon {
  color: var(--text);
}

/* Active tab: full text colour and a small amber dot; the icon keeps its size */
.bottom-nav-icon svg { width: 24.2px; height: 24.2px; }
.bottom-nav-item--active::after {
  content: ""; width: 3px; height: 3px; border-radius: 50%; background: #D79A3C;
}
.bottom-nav-item[disabled] { opacity: 0.3; cursor: not-allowed; }

/* ============================================================
   Wide screens: from 600px the app is a centered 480px column (the nav and Save bar follow it)
   ============================================================ */

@media (min-width: 600px) {
  body {
    background: linear-gradient(90deg, var(--side) calc(50% - 240px), var(--bg) calc(50% - 240px),
                                      var(--bg) calc(50% + 240px), var(--side) calc(50% + 240px));
  }
  #main-content, .app-brand { max-width: 480px; }
  .bottom-nav { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 0 calc(50% - 240px); }
  [data-theme="dark"] .bottom-nav { background: transparent; }
}

/* ============================================================
   Login page
   ============================================================ */

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 1.5rem;
}

.login-card {
  width: 100%;
  max-width: 360px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.login-logo {
  color: var(--text);
  margin: 0.25rem 0 0.6rem;
}

.login-tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.login-error {
  width: 100%;
  background: #3d1515;
  border: 1px solid #7a2020;
  color: #f0b0b0;
  border-radius: var(--radius);
  padding: 0.6rem 0.85rem;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.login-notice {
  width: 100%;
  background: #17301d;
  border: 1px solid #2f6b3d;
  color: #b5e3c0;
  border-radius: var(--radius);
  padding: 0.6rem 0.85rem;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.login-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.login-form .field { display: flex; flex-direction: column; gap: 0.3rem; }
.login-form label { font-size: 0.8rem; color: var(--text-muted); }
.login-form input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.95rem;
  padding: 0.55rem 0.75rem;
  width: 100%;
  font-family: inherit;
}
.login-form input:focus {
  outline: none;
  border-color: var(--accent);
}

.btn-login {
  margin-top: 0.4rem;
  width: 100%;
  background: var(--accent);
  color: #1a1209;
  border: none;
  border-radius: var(--radius);
  padding: 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-login:hover { background: var(--accent-dark); }

.login-or { margin-top: 0.9rem; font-size: 0.8rem; color: var(--text-muted); text-align: center; }
.btn-google {
  display: block;
  margin-top: 0.5rem;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
}
.btn-google:hover { border-color: var(--accent); }

.login-form .field-hint { font-size: 0.75rem; color: var(--text-muted); }

.login-heading { font-size: 1.15rem; font-weight: 600; color: var(--text); margin: 0.25rem 0 0.5rem; }
.login-note { width: 100%; font-size: 0.9rem; line-height: 1.5; color: var(--text); text-align: center; }
.login-note-muted { font-size: 0.8rem; color: var(--text-muted); }
.login-alt { margin-top: 0.9rem; font-size: 0.85rem; color: var(--text-muted); text-align: center; }
.login-alt a { color: var(--accent); }
.login-alt-tight { margin-top: 0.4rem; }

/* ============================================================
   Profile partial
   ============================================================ */

.profile-partial {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem;
  gap: 0.5rem;
}

.profile-avatar {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: var(--accent);
  color: #1a1209;
  font-size: 1.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.25rem;
}

.profile-email {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.profile-stats {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.profile-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.profile-stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}

.profile-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
}

.btn-logout {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius);
  padding: 0.5rem 1.5rem;
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.btn-logout:hover { border-color: var(--accent); color: var(--text); text-decoration: none; }

/* ============================================================
   Notebook tab — Moleskine aesthetic
   ============================================================ */

.notebook-tab {
  display: flex;
  min-height: 100%;
}

.notebook-body {
  flex: 1;
  padding: 1.5rem 1.25rem 2rem 1.25rem;
  overflow-y: auto;
}

.notebook-stats {
  margin-bottom: 1.5rem;
}

.notebook-stat-primary {
  display: block;
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text);
  line-height: 1.2;
}

.notebook-stat-secondary {
  display: block;
  font-size: 0.625rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 0.25rem;
}

.notebook-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.notebook-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  overflow: hidden;
  transition: border-color 0.2s;
}

.notebook-card:hover {
  border-color: var(--accent);
  text-decoration: none;
  color: var(--text);
}

.notebook-card-photo {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

.notebook-card-initial {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
}

.notebook-card-inner {
  padding: 0.5rem 0.6rem 0.6rem;
}

.notebook-card-name {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.2;
  margin-bottom: 0.2rem;
}

.notebook-card-city {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.notebook-card-vibe {
  font-size: 0.65rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
}

.notebook-card-count {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}

.notebook-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.notebook-empty-sub {
  font-size: 0.75rem;
  margin-top: 0.4rem;
}

/* Explore tab — masonry photo cards */
.explore-tab { padding: 0.75rem; }

/* Two columns filled row by row (1 2 / 3 4 / ...), so reading order is nearest-first across the grid.
   (CSS `columns` fills the whole first column before the second, which split the order.) */
.explore-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.explore-card {
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  position: relative;
  box-shadow: 0 2px 8px rgba(28, 18, 8, 0.08);
}

.explore-card[hidden] { display: none; }   /* the city filter sets [hidden]; display:flex above would override it */

/* One crop for every photo: rows line up and the space is reserved before the image loads. */
.explore-card-photo {
  width: 100%;
  display: block;
  aspect-ratio: 3/4;
  object-fit: cover;
}

.explore-card-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

.explore-card-meta {
  flex: 1;
  padding: 0.5rem 0.6rem 0.6rem;
  background: var(--surface);
}

.explore-card-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 0.6875rem;    /* 11px */
  line-height: 1.2;
}

.explore-card-city {
  font-size: 0.5625rem;    /* 9px */
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.explore-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

/* Explore header — filter chip + map toggle */
.explore-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -0.25rem 0 0.6rem;
}

/* Explore canvas — positions the filter overlay relative to the grid */
.explore-canvas {
  position: relative;
}

.explore-header { gap: 0.5rem; }
.explore-search { flex: 1; min-width: 0; position: relative; }
.explore-search-input { width: 100%; box-sizing: border-box; padding-left: 1.9rem; }
.explore-search-input::-webkit-search-decoration { -webkit-appearance: none; }   /* Safari draws its own magnifier otherwise */
.explore-search-icon {
  position: absolute;
  left: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.explore-chip {
  font-size: 0.625rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 500;
  padding: 0.2rem 0.55rem;
  border-radius: 18px;
  border: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
  background: var(--surface);
  color: var(--text-muted);
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.explore-chip--active {
  background: var(--accent-light);
  color: var(--accent);
}

.explore-map-toggle {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.625rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 500;
  padding: 0.2rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.explore-map-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* Explore — filter overlay panel (drops down over the grid canvas) */
.explore-filter-panel {
  position: absolute;
  top: 0;
  left: -0.75rem;
  right: -0.75rem;
  z-index: 20;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 28px rgba(28, 18, 8, 0.13);
  border-radius: 0 0 12px 12px;
  padding: 0.75rem;
  /* Hidden: visibility fires after fade-out completes (0.22s delay) */
  visibility: hidden;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: visibility 0s 0.22s, opacity 0.22s ease, transform 0.22s ease;
}

.explore-filter-panel--open {
  /* Visible: visibility is instant (no delay) so content appears before fade */
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  transition: visibility 0s, opacity 0.22s ease, transform 0.22s ease;
}

.filter-panel-actions {
  display: flex;
  justify-content: center;
  padding-top: 0.65rem;
  margin-top: 0.15rem;
  border-top: 1px solid var(--border);
}

.filter-panel-done {
  background: var(--accent);
  color: #1a1209;
  border: none;
  border-radius: 18px;
  min-height: 2.5rem;
  padding: 0.3rem 2rem;
  font-size: 0.8125rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.filter-panel-done:hover { background: var(--accent-dark); }

.filter-category {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}

.filter-category:last-child { border-bottom: none; }

.filter-category-label {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.filter-category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Panel chips follow the Log form's chips: 36px high, 44px touch area, dark fill when on. */
.explore-filter-panel .explore-chip {
  position: relative;
  min-height: 2.25rem;
  padding: 0.375rem 0.8rem;
  font-size: 0.8125rem;
  border: 0.5px solid var(--border);
}
.explore-filter-panel .explore-chip::after { content: ""; position: absolute; inset: -4px -2px; }
.explore-filter-panel .explore-chip:hover { color: var(--text); }
.explore-filter-panel .explore-chip--active { background: var(--text); color: var(--bg); border-color: var(--text); }
.explore-filter-panel .explore-chip--active:hover { color: var(--bg); }
[data-theme="dark"] .explore-filter-panel .explore-chip--active { background: var(--accent); color: #1A1209; border-color: var(--accent); }

/* "Filter by" shows a dot while a filter is on, even with the panel closed. */
#explore-filter-expand[data-filtered="true"]::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ============================================================
   Log screen: quick form, inline flavor wheel, pinned Save bar
   (docs/designs/log-tab-mockups/log-a-quick-wheel.html)
   ============================================================ */

.log-screen {
  margin: -1rem;                     /* escape #main-content padding */
  flex: 1;
  position: relative;
  overflow: hidden;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.log-form {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.log-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 16px 84px;   /* room to scroll the last field clear of the floating photo button */
  display: flex;
  flex-direction: column;
  gap: 14px;
  -webkit-overflow-scrolling: touch;
}

.log-sec { display: flex; flex-direction: column; }
.log-grow { flex: 1; }

.log-label {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.log-aux { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 0.75rem; }

.log-link {
  background: none;
  border: 0;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-strong);
  min-height: 44px;
  padding: 0 2px;
  cursor: pointer;
}
.log-label .log-link { min-height: 0; position: relative; }
.log-label .log-link::after { content: ""; position: absolute; inset: -15px -6px; }   /* 45px tap area, compact look */
.log-link[hidden] { display: none; }

.log-field {
  width: 100%;
  min-height: 44px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;                   /* 16px stops iOS zooming the page on focus */
  outline: none;
}
.log-field:focus { border-color: var(--focus); outline: 2px solid var(--focus); outline-offset: 1px; }
.log-field::placeholder { color: var(--text-muted); }
textarea.log-field { resize: vertical; min-height: 72px; }
.log-fl { display: block; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 4px; }

/* Venue header */
.log-venue-header {
  flex-shrink: 0;
  padding: 16px 0 14px;
  border-bottom: 0.5px solid var(--border);
}
.log-venue { display: flex; align-items: center; gap: 10px; }
.log-venue-pin {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: var(--ok);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent);
}
.log-venue-name { font-family: var(--font-display); font-weight: 700; font-size: 1.3125rem; line-height: 1.15; }
.log-venue-sub { font-size: 0.75rem; color: var(--text-muted); }
.log-venue-change {
  margin-left: auto;
  background: none; border: 0; font-family: inherit;
  font-size: 0.75rem; font-weight: 600; color: var(--ink-strong);
  padding: 10px 4px; min-height: 44px; cursor: pointer;
}
/* No café detected: pin, a shorter picker, and the "At home?" switch on one row */
.log-venue-search { display: flex; align-items: center; gap: 10px; }
.log-venue-search-pin { flex-shrink: 0; color: var(--ink-strong); }
.log-venue-search .log-combo { flex: 1; min-width: 0; }
.log-home-toggle {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
  min-height: 44px; cursor: pointer;
  font-size: 0.8125rem; font-weight: 600; color: var(--ink-strong);
}
/* Journal "Filter by": the first month's heading and Explore's chip share a row, chip at the right edge.
   The panel opens in the flow under the row, full width. */
.diary-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0 12px; }
.diary-head .diary-head-label { padding-bottom: 0.35rem; }
.diary-filter-chip {
  margin: 0 0 0.3rem auto; flex-shrink: 0;
  box-sizing: border-box; height: 2rem; padding: 0 0.8rem;
  display: inline-flex; align-items: center;
  font-size: 0.75rem; border: 1px solid var(--border); border-radius: 18px; box-shadow: none;
}
.diary-filter-chip[data-filtered="true"] { border-color: var(--accent); }
.diary-filter-chip.explore-chip--active { background: var(--accent-light); color: var(--accent); border-color: var(--accent); }
.diary-filter-panel {
  position: static; display: none; flex: 0 0 100%;
  margin-bottom: 0.4rem; border: 1px solid var(--border); border-radius: 12px; box-shadow: none;
  visibility: visible; opacity: 1; transform: none; pointer-events: auto;
}
.diary-filter-panel.explore-filter-panel--open { display: block; }
.log-home-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.log-home-track {
  position: relative; width: 38px; height: 22px; border-radius: 11px;
  background: var(--control-off); transition: background 0.15s;
}
.log-home-track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--surface); transition: transform 0.15s;
}
.log-home-input:checked + .log-home-track { background: var(--ok); }
.log-home-input:checked + .log-home-track::after { transform: translateX(16px); }
.log-home-input:focus-visible + .log-home-track { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .log-home-track, .log-home-track::after { transition: none; }
}

/* Rating */
.log-stars {
  display: flex;
  justify-content: space-between;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;           /* horizontal drag is ours, vertical still scrolls */
  cursor: pointer;
}
.log-stars:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 6px; }
.log-star {
  font-size: 2.875rem;
  line-height: 1;
  padding: 2px;
  color: var(--control-off);                /* empty star: flat fill, no outline */
  pointer-events: none;
}
.log-star--full { color: var(--star-on); }
.log-stars-word { text-align: center; margin-top: 4px; min-height: 22px; }
.log-stars-value { font-family: var(--font-display); font-style: italic; font-size: 0.9375rem; color: var(--text-muted); }

/* Chips */
.log-chips-row { display: flex; flex-wrap: wrap; gap: 6px; }
.log-chips--scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
  margin: 0 -16px;
  padding: 2px 16px 6px;
  scrollbar-width: none;
}
.log-chips--scroll::-webkit-scrollbar { display: none; }
.log-chips--more { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); }
.log-chip {
  position: relative;
  min-height: 36px;
  padding: 6px 13px;
  border-radius: var(--radius-chip);
  background: var(--surface);
  border: 0.5px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.log-chip--icon { display: inline-flex; align-items: center; padding: 6px 11px; }
.log-chip::after { content: ""; position: absolute; inset: -4px -2px; }   /* 44px hit area, compact look */
.log-chip:hover { color: var(--text); }
.log-chip--active { background: var(--text); color: var(--bg); border-color: var(--text); }
.log-chip--active:hover { color: var(--bg); }
[data-theme="dark"] .log-chip--active { background: var(--accent); color: #1A1209; border-color: var(--accent); }

/* Flavor wheel card */
.log-wheel-card {
  background: var(--surface);
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 5px 14px rgba(0, 0, 0, 0.07);
  padding: 14px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.log-card-hint { font-size: 0.75rem; color: var(--text-muted); padding: 0 4px; margin-top: -6px; }
.log-wheel-card--down { align-items: flex-start; }
.log-drawer .log-wheel-card { background: none; box-shadow: none; padding: 0; }   /* the drawer is the container: no card in a card */
.log-crumbs {
  display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; align-items: center;
  font-size: 0.75rem; color: var(--text-muted); min-height: 20px;
}
.log-crumbs b { color: var(--text); }
.log-crumbs .log-link { min-height: 0; }
.log-wheel { position: relative; width: 100%; max-width: 340px; margin: 0 auto; aspect-ratio: 1; }
.log-wheel svg { width: 100%; height: 100%; display: block; overflow: visible; }
.log-wheel svg *:focus { outline: none; }
.log-arc { cursor: pointer; stroke: var(--bg); stroke-width: 2; transition: filter 0.15s; }
.log-arc:hover { filter: brightness(1.07); }
.log-arc:focus-visible { outline: none; stroke: var(--text); stroke-width: 3; }
.log-arc--sel { stroke: var(--text); stroke-width: 3; }
.log-arc-label { pointer-events: none; font-size: 11px; font-weight: 600; font-family: var(--font-body); }
.log-ring-done { stroke: var(--bg); stroke-width: 1.5; cursor: pointer; }
.log-hub { cursor: pointer; fill: var(--surface); stroke: var(--border); }
.log-hub:focus-visible { stroke: var(--focus); stroke-width: 2; outline: none; }
.log-hub-t { font-family: var(--font-display); font-size: 13px; font-weight: 600; fill: var(--text); pointer-events: none; }
.log-hub-s { font-size: 10px; fill: var(--text-muted); pointer-events: none; }
.log-badge { pointer-events: none; }
.log-wheel-fade { animation: logWheelFade 0.18s cubic-bezier(0.16, 1, 0.3, 1); transform-origin: center; }
@keyframes logWheelFade { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: none; } }
.log-wheel-add { display: flex; justify-content: center; margin-top: 4px; min-height: 0; }
.log-wheel-add button {
  min-height: 44px; padding: 8px 16px; border-radius: 22px;
  border: 0.5px solid var(--accent); background: none; font-family: inherit;
  font-size: 0.8125rem; font-weight: 600; color: var(--ink-strong); cursor: pointer;
}
.log-wheel-add button.on { background: var(--text); color: var(--bg); border-color: var(--text); }

.log-picks { display: flex; flex-wrap: wrap; gap: 6px; min-height: 36px; }
.log-pick {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 6px 5px 11px; min-height: 36px; border-radius: 18px;
  font-size: 0.8125rem; font-weight: 600;
  color: var(--pc-ink, #fff); background: var(--pc);
  animation: logPop 0.18s ease-out;
}
.log-pick button {
  position: relative; width: 26px; height: 26px; border-radius: 50%; border: 0;
  background: rgba(0, 0, 0, 0.14); color: inherit; font-size: 0.8125rem; line-height: 1; cursor: pointer;
}
.log-pick button::after { content: ""; position: absolute; inset: -9px; }
/* How typical the picks are for the origin: one quiet line under the picks, empty (and flat) until there are 2 notes. */
.log-closeness {
  margin: 8px 0 0; padding: 8px 12px; border-radius: var(--radius);
  background: var(--accent-light); color: var(--text);
  font-size: 0.8125rem; line-height: 1.4;
}
.log-closeness:empty { margin: 0; padding: 0; background: none; }
.log-closeness[data-label="different"] { background: transparent; color: var(--text-muted); padding-left: 0; padding-right: 0; }
.log-origin-more { margin-top: 8px; }
.log-picks-empty { font-size: 0.8125rem; color: var(--text-muted); font-style: italic; font-family: var(--font-display); align-self: center; }
@keyframes logPop { from { transform: scale(0.85); opacity: 0; } to { transform: none; opacity: 1; } }
.log-recent { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 0 12px 4px; align-items: center; }
.log-recent::-webkit-scrollbar { display: none; }
.log-recent-label { font-size: 0.6875rem; color: var(--text-muted); flex-shrink: 0; }
.log-rchip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 5px 12px;
  border-radius: 18px; background: var(--surface); border: 0.5px dashed var(--accent);
  font-family: inherit; font-size: 0.8125rem; color: var(--text); white-space: nowrap; flex-shrink: 0; cursor: pointer;
}
.log-rchip i { width: 9px; height: 9px; border-radius: 50%; background: var(--pc); }
.log-rchip--done { opacity: 0.4; pointer-events: none; }

/* Details drawer: the <details> is the card, so the open body sits inside the same container as its button */
.log-details {
  background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius);
}
.log-details > summary { list-style: none; }
.log-details > summary::-webkit-details-marker { display: none; }
.log-drawer-btn {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; min-height: 48px; padding: 0 14px; cursor: pointer;
  border-radius: var(--radius);
  font-weight: 600; font-size: 0.875rem;
}
.log-drawer-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.log-drawer-btn > span { display: flex; align-items: baseline; gap: 8px; min-width: 0; flex: 1; white-space: nowrap; }
.log-sum { font-weight: 400; font-size: 0.75rem; color: var(--text-muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.log-sum--set { color: var(--text); }
.log-deeper { display: flex; flex-direction: column; gap: 8px; }
.log-drawer-btn svg { flex-shrink: 0; margin-left: 8px; width: 16px; height: 16px; transition: transform 0.2s; stroke: currentColor; fill: none; stroke-width: 2; }
.log-details[open] .log-drawer-btn svg { transform: rotate(180deg); }
.log-details[open] > .log-drawer { animation: log-drawer-in 220ms cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes log-drawer-in { from { opacity: 0; transform: translateY(-6px); } }
.log-drawer { display: flex; flex-direction: column; gap: 14px; padding: 4px 14px 16px; }
.log-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.log-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.log-recipe {
  display: flex; flex-direction: column; gap: 10px;   /* the drawer is the container: no card in a card */
}
.log-recipe[hidden] { display: none; }
.log-recipe-h { display: flex; align-items: center; font-size: 0.75rem; font-weight: 600; }
.log-recipe-h .log-link { margin-left: auto; }
.log-ratio { display: flex; align-items: center; gap: 10px; font-size: 0.8125rem; color: var(--text-muted); }
.log-ratio b { font-family: var(--font-display); font-size: 1.25rem; color: var(--text); }

/* Number stepper: one row, scroll / drag / arrows / type */
.pk {
  position: relative; height: 50px; border-radius: var(--radius);
  background: var(--surface); border: 0.5px solid var(--border);
  touch-action: pan-x; cursor: ns-resize; user-select: none; -webkit-user-select: none;
}
.pk:focus-within { border-color: var(--focus); box-shadow: 0 0 0 1.5px var(--focus); }
.pk-in {
  width: 100%; height: 100%; border: 0; background: transparent; text-align: center;
  font-family: var(--font-body); font-size: 1rem; color: var(--text); outline: none;
  padding: 0 46px 0 22px; pointer-events: none; border-radius: var(--radius); cursor: inherit;
}
.pk.typing .pk-in { pointer-events: auto; cursor: text; user-select: text; -webkit-user-select: text; }
.pk-unit { position: absolute; left: 9px; top: 0; line-height: 50px; font-size: 0.75rem; color: var(--text-muted); pointer-events: none; }
.pk-ar { position: absolute; right: 0; top: 0; bottom: 0; width: 44px; display: flex; flex-direction: column; }
.pk-ar button {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 0; min-height: 0; background: none; border: 0; color: var(--text-muted); cursor: pointer; touch-action: none;
}
.pk-ar button:hover { background: none; color: var(--text); }
.pk-ar button:active { color: var(--text); }
.pk-ar button:first-child { border-radius: 0 8px 0 0; }
.pk-ar button:last-child { border-radius: 0 0 8px 0; }
.pk-ar svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* 1-5 choices: preparation stars and the taste structure */
.log-scale-row { display: flex; flex-direction: column; gap: 4px; }
.log-scale-label { font-size: 0.75rem; color: var(--text); }
.log-scale { display: flex; gap: 6px; }
.log-scale-btn {
  flex: 1; min-height: 44px; border-radius: var(--radius); border: 0.5px solid var(--border);
  background: var(--surface); font-family: inherit; font-size: 0.875rem; color: var(--text-muted); cursor: pointer;
}
.log-scale-btn[aria-checked="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
[data-theme="dark"] .log-scale-btn[aria-checked="true"] { background: var(--accent); color: #1A1209; border-color: var(--accent); }
.log-scale--stars .log-scale-btn { font-size: 1.375rem; border: 0; background: none; color: var(--control-off); }
.log-scale--stars .log-scale-btn.on { color: var(--star-on); }
.log-taste-structure { display: flex; flex-direction: column; gap: 10px; }
.log-sliders { --stop: 44px; display: flex; justify-content: center; gap: 28px; }   /* one stop = one 44px target */
.log-slider-axis {
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end;
  padding: 12px 0 calc(1.25rem + 10px); font-size: 0.75rem; color: var(--text-muted);
}
.log-scale-row--vert { align-items: center; flex-direction: column-reverse; }
.log-scale--vert { flex-direction: column-reverse; gap: 0; position: relative; }
.log-scale--vert::before, .log-scale--vert::after { pointer-events: none; }   /* the track and fill lines must not swallow taps meant for a stop */
.log-scale--vert::before {
  content: ""; position: absolute; left: 50%; top: calc(var(--stop) / 2); bottom: calc(var(--stop) / 2); width: 2px; margin-left: -1px;
  background: var(--control-off); border-radius: 1px;
}
.log-scale--vert::after {
  content: ""; position: absolute; left: 50%; bottom: calc(var(--stop) / 2); width: 2px; margin-left: -1px; border-radius: 1px;
  height: calc(var(--stop) * 4); background: var(--text);   /* full height, scaled to the chosen stop: transform, not layout */
  transform-origin: bottom; transform: scaleY(max(0, calc((var(--v, 0) - 1) / 4))); transition: transform 0.2s;
}
[data-theme="dark"] .log-scale--vert::after { background: var(--accent); }
.log-scale--vert .log-scale-btn {
  position: relative; flex: none; width: 44px; height: var(--stop); min-height: 0; padding: 0; border: 0; background: none;
  font-size: 0; color: transparent; border-radius: 0;
}
.log-scale--vert .log-scale-btn::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px;
  border-radius: 50%; background: var(--surface); border: 1.5px solid var(--control-off); box-sizing: border-box;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
}
.log-scale--vert .log-scale-btn[aria-checked="true"] { background: none; }
.log-scale--vert .log-scale-btn[aria-checked="true"]::after { transform: scale(1.9); background: var(--text); border-color: var(--text); }
[data-theme="dark"] .log-scale--vert .log-scale-btn[aria-checked="true"] { background: none; }
[data-theme="dark"] .log-scale--vert .log-scale-btn[aria-checked="true"]::after { background: var(--accent); border-color: var(--accent); }
.log-scale--vert .log-scale-btn:focus-visible::after { outline: 2px solid var(--focus); outline-offset: 3px; }
.log-scale-row--vert .log-scale-label { margin-top: 4px; }

/* Pinned Save bar */
.log-savebar {
  flex-shrink: 0;
  padding: 10px 16px 12px;
  background: linear-gradient(to top, var(--bg) 70%, transparent);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.log-save-err {
  font-size: 0.75rem; color: var(--danger); padding: 8px 12px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
}
.log-save-err[hidden] { display: none; }
.log-save-retry {
  position: relative; margin-left: 8px; min-height: 36px; padding: 0 12px; border-radius: var(--radius-chip);
  border: 1px solid var(--danger); background: transparent; color: var(--danger);
  font-family: inherit; font-size: 0.8125rem; font-weight: 600; cursor: pointer;
}
.log-save-retry::after { content: ""; position: absolute; inset: -4px -2px; }
.log-save-btn {
  min-height: 52px; width: 100%; border: 0; border-radius: 15px;
  background: var(--text); color: var(--bg);
  font-family: inherit; font-size: 0.9375rem; font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.09); cursor: pointer; transition: opacity 0.15s;
}
[data-theme="dark"] .log-save-btn { background: var(--accent); color: #1A1209; }
.log-save-btn[aria-disabled="true"], .log-save-btn:disabled { opacity: 0.45; box-shadow: none; }
.log-save-btn:disabled { cursor: progress; }

/* Success card */
.log-success {
  flex: 1; min-height: 0; overflow-y: auto; background: var(--bg);
  display: flex; flex-direction: column; padding: 56px 24px 24px; gap: 14px;
}
.log-ok { font-size: 0.625rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ok); font-weight: 600; }
.log-success-title { font-family: var(--font-display); font-weight: 700; font-size: 1.75rem; line-height: 1.1; }
.log-scard {
  background: var(--surface); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 5px 14px rgba(0, 0, 0, 0.07);
}
.log-scard-stars { color: var(--star-on); letter-spacing: 0.06em; font-size: 1.125rem; }
.log-scard-name { font-family: var(--font-display); font-weight: 600; font-size: 1.1875rem; line-height: 1.2; }
.log-scard-meta { font-size: 0.75rem; color: var(--text-muted); }
.log-s-links { display: flex; justify-content: center; }
.log-fchips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 3px; min-width: 0; max-width: 100%; }
.log-fchip {
  display: inline-flex; align-items: center; gap: 5px; min-height: 20px; padding: 1px 8px; border-radius: 12px;
  background: var(--surface); border: 0.5px solid var(--border); font-size: 0.75rem; color: var(--text-muted);
  max-width: 100%; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.log-fchip i { width: 8px; height: 8px; border-radius: 50%; background: var(--pc); flex-shrink: 0; }
.log-fchip--more { background: none; border-style: dashed; }

.log-toast {
  position: absolute; left: 50%; bottom: 120px; transform: translate(-50%, 10px);
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px;
  font-size: 0.8125rem; opacity: 0; pointer-events: none; transition: 0.2s; z-index: 30; max-width: 90%; text-align: center;
}
.log-toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  .log-wheel-fade, .log-pick, .log-details[open] > .log-drawer { animation: none; }
  .log-chip, .log-save-btn, .log-toast, .log-drawer-btn svg, .log-scale--vert::after, .log-scale--vert .log-scale-btn::after { transition: none; }
}

/* Venue picker + coffee combobox (shared with Explore: .log-combo*) */

.log-combo {
  position: relative;
}

.log-combo-input {
  width: 100%;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem; /* >=16px stops iOS zooming the page on focus */
  font-family: inherit;
  cursor: pointer;
}

/* Smaller text in the Log venue search so more of the name fits next to the At-home switch.
   The field is inputmode="none" (no keyboard), so the iOS focus-zoom rule above doesn't apply. */
.log-venue-search .log-combo-input { font-size: 0.875rem; }

.log-combo-input:focus {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

ul.log-combo-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 10;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  max-height: 11rem;
  overflow-y: auto;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
  font-size: 0.875rem;
  color: var(--text);
}

ul.log-combo-list[hidden] { display: none; }

.log-combo-list li {
  padding: 0.6rem 0.75rem;
  cursor: pointer;
}

.log-combo-list .log-combo-option--active {
  background: var(--accent);
  color: var(--bg, #fff);
}

.log-combo-empty {
  color: var(--text-muted);
  cursor: default;
}

.log-combo-custom { font-style: italic; }

/* Venue skeleton loading state */
.log-venue-skeleton {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.log-venue-skeleton-line {
  background: var(--border);
  border-radius: 4px;
  animation: logSkeletonPulse 1.4s ease-in-out infinite;
}

.log-venue-skeleton-line--name { height: 14px; width: 55%; }
.log-venue-skeleton-line--sub  { height: 9px;  width: 38%; }

@keyframes logSkeletonPulse {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 1; }
}

/* Language switcher (login + notebook) */
.lang-switch {
  margin: 1.5rem 0 0;
  text-align: center;
  font-size: 0.8125rem;
  opacity: 0.7;
}
.lang-switch a { color: inherit; font-weight: 600; text-decoration: none; }

/* Explore header: Filter by, Search and Map share one height, text size, border and pill shape. */
.explore-header { --ctl-h: 2.25rem; }
.explore-header .explore-chip,
.explore-header .explore-map-toggle,
.explore-header .explore-search-input {
  box-sizing: border-box;
  height: var(--ctl-h);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: none;
}
.explore-header .explore-chip,
.explore-header .explore-map-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex-shrink: 0;
  padding: 0 0.9rem;
  color: var(--text-muted);
}
.explore-header .explore-search-input { padding: 0 0.8rem 0 1.9rem; color: var(--text); }
.explore-header .explore-chip--active,
.explore-header .explore-map-toggle:hover { border-color: var(--accent); }
.explore-header .explore-chip--active { background: var(--accent-light); color: var(--accent); }
.explore-header .explore-map-toggle:hover { color: var(--accent); }

/* Explore: location placeholder, banners, "Show more" */
.explore-locating {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.explore-banner {
  margin: 0 0 0.6rem;
  padding: 0.5rem 0.7rem;
  background: var(--accent-light);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.75rem;
  line-height: 1.4;
}

.explore-banner-btn {
  margin-left: 0.35rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-dark);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.explore-banner-btn:active { opacity: 0.55; }

.explore-more { display: flex; justify-content: center; padding: 0.5rem 0 1rem; }
.explore-more:empty { display: none; }

.explore-more-btn {
  padding: 0.6rem 1.4rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
  font: 600 0.8125rem 'Plus Jakarta Sans', sans-serif;
  cursor: pointer;
}
.explore-more-btn[disabled] { opacity: 0.5; cursor: progress; }


/* ============================================================
   Notebook taste wheel (display only) and Log edit mode
   ============================================================ */
/* Notebook taste profile: minimalist radars (flavors, brew methods, origins) in a swipeable carousel */
.sw-tabs { display: flex; justify-content: center; gap: 4px; padding: 2px 0 4px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.sw-tabs::-webkit-scrollbar { display: none; }
/* Flat underline tabs: no radius, and no hover/press fill (the global button hover would paint them dark and stick after a tap). */
.sw-tab, .sw-tab:hover, .sw-tab:active { min-height: 36px; padding: 0 14px; border: 0; border-radius: 0; background: none; box-shadow: none; font: inherit; font-size: 0.8125rem; font-weight: 500; color: var(--text-muted); cursor: pointer; transition: color 0.15s; position: relative; }
.sw-tab::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 2px; background: transparent; transition: background 0.15s; }
.sw-tab.is-active, .sw-tab.is-active:hover { color: var(--ink-strong); font-weight: 600; }
.sw-tab.is-active::after { background: var(--accent); }
.sw-tab:hover { color: var(--text); }
.sw-tab:focus-visible { outline: 1.5px solid var(--text-muted); outline-offset: -3px; }
.sw-track { display: flex; align-items: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; max-width: 100%; margin-bottom: 0.75rem; }
.sw-track::-webkit-scrollbar { display: none; }
.sw-track + .sw-tabs { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 0.5px solid var(--border); }   /* hairline between the radars and the sections below */
.sw-panel { flex: 0 0 100%; min-width: 0; scroll-snap-align: center; scroll-snap-stop: always; }
.sw-track.is-settled > .sw-panel:not(.is-on) { height: 0; overflow: hidden; visibility: hidden; }
.rd { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px 0 10px; }
.rd svg { width: min(300px, 100%); height: auto; display: block; }
.rd-ring, .rd-axis { fill: none; stroke: var(--border); stroke-width: 0.5; }
.rd-shape { fill: var(--accent); fill-opacity: 0.18; stroke: var(--accent); stroke-width: 1.25; stroke-linejoin: round; }
.rd-dot { fill: var(--accent); }
.rd-label { font-size: 9px; fill: var(--text-muted); }
.rd-lbl { font-size: 0.75rem; color: var(--text-muted); text-align: center; text-wrap: balance; }
.rd-favs { display: flex; flex-wrap: wrap; gap: 2px 10px; justify-content: center; align-items: center; font-size: 0.8125rem; color: var(--text); }
.rd-fav i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }


.log-edit-tag { font-size: 0.625rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; color: var(--ink-strong); padding-top: 14px; }


/* ============================================================
   Log form: photos (private, up to 3)
   ============================================================ */
.log-photo-row { display: flex; flex-wrap: wrap; gap: 8px; }
.log-photo { position: relative; overflow: hidden; width: 76px; height: 76px; border-radius: 10px; flex: none; background: var(--accent-light); }
.log-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.log-photo-x {
  position: absolute; top: 3px; right: 3px; width: 28px; height: 28px; border-radius: 50%; border: 0;
  background: rgba(28, 18, 8, 0.72); color: #fff; font-size: 1.125rem; line-height: 1; cursor: pointer;
}
.log-fab-wrap { position: absolute; right: 16px; bottom: 88px; z-index: 5; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.log-fab {
  width: 52px; height: 52px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: var(--text); color: var(--bg); box-shadow: 0 2px 10px rgba(28, 18, 8, 0.28);
}
.log-fab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.log-fab[hidden] { display: none; }
.log-fab:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.log-fab-menu { display: flex; flex-direction: column; background: var(--surface); border: 0.5px solid var(--border); border-radius: 12px; box-shadow: 0 4px 16px rgba(28, 18, 8, 0.18); overflow: hidden; }
.log-fab-menu[hidden] { display: none; }
.log-fab-opt { min-height: 46px; padding: 0 18px; border: 0; background: none; color: var(--text); font: 600 0.875rem 'Plus Jakarta Sans', sans-serif; text-align: left; cursor: pointer; white-space: nowrap; }
.log-fab-opt + .log-fab-opt { border-top: 0.5px solid var(--border); }
.log-photos-count { color: var(--text-muted); font-weight: 500; margin-left: 4px; }
.log-photo-hint, .log-photo-note { font-size: 0.75rem; color: var(--text-muted); margin: 2px 0 0; }
.log-photo-note { text-align: center; }

/* Diary rows open the cup page: the title link stretches over the whole row (the café link stays on top). */
.diary-entry-link { color: inherit; text-decoration: none; }
.diary-entry-link::after { content: ""; position: absolute; inset: 0; }
.diary-entry-link:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.diary-entry-venue a { position: relative; z-index: 1; }

/* ============================================================
   Cup page: one cup as a memory
   ============================================================ */
.cup { display: flex; flex-direction: column; gap: 22px; padding-bottom: 24px; }
.cup-hero {
  position: relative; height: 200px; margin: -1rem -1rem 0; background: var(--wash);
  border-radius: 0 0 var(--card-feature, 16px) var(--card-feature, 16px); overflow: hidden;
}
.cup-hero--photo { height: 260px; background: var(--accent-light); }
.cup-hero-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cup-back {
  position: absolute; top: 12px; left: 12px; width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--dock-bg); color: var(--text); box-shadow: 0 1px 4px rgba(28, 18, 8, 0.18);
}
.cup-back svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cup-head { display: flex; flex-direction: column; gap: 4px; }
.cup-date { margin: 0; font-size: 0.75rem; letter-spacing: 0.04em; color: var(--text-muted); }
.cup-title { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 1.75rem; line-height: 1.15; color: var(--text); text-wrap: balance; }
.cup-meta { margin: 0; font-size: 0.875rem; color: var(--text-muted); }
.cup-venue { margin: 2px 0 0; font-size: 0.875rem; font-weight: 600; color: var(--text); }
.cup-venue a { color: inherit; text-decoration: none; }
.cup-venue span { font-weight: 400; color: var(--text-muted); }
.cup-sec { display: flex; flex-direction: column; gap: 10px; }
.cup-h { margin: 0; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; color: var(--text-muted); }
.cup-felt-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.cup-rating { font-size: 1.5rem; letter-spacing: 3px; color: var(--star-on); }
.cup-feel { margin: 0; font-family: var(--font-display); font-style: italic; font-size: 1.1875rem; color: var(--ink-strong, var(--text)); }
.cup-quiet { margin: 0; font-size: 0.875rem; color: var(--text-muted); }
.cup-meters { margin: 4px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cup-meter dt { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 6px; }
.cup-meter dd { margin: 0; }
.cup-meter dd span { display: flex; gap: 3px; }
.cup-meter i { flex: 1; height: 6px; border-radius: 3px; background: var(--border); }
.cup-meter i.on { background: var(--accent); }
.cup-note {
  position: relative; margin: 0; padding: 22px 0 0;
  font-family: var(--font-display); font-style: italic; font-size: 1.0625rem; line-height: 1.5; color: var(--text); white-space: pre-wrap;
}
.cup-note::before { content: "\201C"; position: absolute; top: -6px; left: -2px; font-size: 2.75rem; line-height: 1; color: var(--accent); }
.cup-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cup-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; background: var(--accent-light); }
.cup-photo-empty {
  display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 10px; width: 100%;
  border: 1px dashed var(--control-off); background: var(--surface); color: var(--text-muted);
  font: 600 0.875rem 'Plus Jakarta Sans', sans-serif; cursor: pointer; text-align: left;
}
.cup-photo-empty svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; flex: none; }
.cup-recipe { margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cup-recipe > div { background: var(--surface); border: 0.5px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.cup-recipe dt { font-size: 0.6875rem; color: var(--text-muted); }
.cup-recipe dd { margin: 2px 0 0; font-family: var(--font-display); font-weight: 600; font-size: 1.125rem; color: var(--text); }
.cup-recipe small { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 500; font-size: 0.6875rem; color: var(--text-muted); margin-left: 2px; }
.cup-prep { margin: 0; font-size: 0.8125rem; color: var(--text-muted); }
.cup-prep b { color: var(--star-on); letter-spacing: 2px; margin-left: 4px; }
.cup-insights { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cup-ins { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; background: var(--surface); border: 0.5px solid var(--border); font-size: 0.875rem; color: var(--text); }
.cup-ins span { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.cup-actions { display: flex; gap: 10px; }
.cup-btn {
  flex: 1; min-height: 44px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: 600 0.875rem 'Plus Jakarta Sans', sans-serif; cursor: pointer;
}
.cup-btn--danger { color: #9A3B2E; }
.cup-btn--danger.is-armed { background: #9A3B2E; border-color: #9A3B2E; color: #fff; }
.cup-btn[disabled] { opacity: 0.5; cursor: progress; }

/* ============================================================
   Venue page: an infographic more than a listing
   ============================================================ */
.venue { display: flex; flex-direction: column; gap: 26px; padding-bottom: 8px; }
.venue-hero { margin: -1rem -1rem 0; }
.venue-photos {
  display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 0 1rem; scroll-padding: 0 1rem;
}
.venue-photos::-webkit-scrollbar { display: none; }
.venue-photos img { flex: none; width: 64%; aspect-ratio: 9 / 16; max-height: 70vh; object-fit: cover; border-radius: 16px; scroll-snap-align: start; background: var(--accent-light); }
.venue-photos img:only-child { width: 100%; aspect-ratio: 4 / 5; }
.venue-initial {
  height: 140px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent-light), var(--accent)); border-radius: 0 0 16px 16px;
}
.venue-initial span { font-family: var(--font-display); font-weight: 600; font-size: 3.5rem; color: var(--surface); }
.venue-head { display: flex; flex-direction: column; gap: 4px; }
.venue-title { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 1.75rem; line-height: 1.15; text-wrap: balance; }
.venue-sub { margin: 0; font-size: 0.875rem; color: var(--text-muted); }
.venue-summary { margin: 6px 0 0; font-family: var(--font-display); font-style: italic; font-size: 1.0625rem; color: var(--ink-strong, var(--text)); text-wrap: balance; }
.venue-sec { display: flex; flex-direction: column; gap: 10px; }
.venue-h { margin: 0; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; color: var(--text-muted); }
.venue-h-note { text-transform: none; letter-spacing: 0; font-weight: 500; margin-left: 6px; }
.venue-quiet, .venue-fine { margin: 0; font-size: 0.875rem; color: var(--text-muted); }
.venue-fine { font-size: 0.75rem; }
.venue-label { margin: 4px 0 0; font-size: 0.75rem; font-weight: 600; color: var(--text-muted); }

.venue-rating-body { display: flex; align-items: center; gap: 22px; }
.venue-avg { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; flex: none; }
.venue-avg b { font-family: var(--font-display); font-weight: 600; font-size: 2.75rem; line-height: 1; }
.venue-avg span { color: var(--star-on); letter-spacing: 2px; font-size: 0.9375rem; }
.venue-avg small { font-size: 0.75rem; color: var(--text-muted); }
.venue-hist, .venue-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 0; }
.venue-hist li { display: flex; align-items: center; gap: 8px; font-size: 0.6875rem; color: var(--text-muted); }
.venue-hist span { width: 10px; text-align: right; }
.venue-hist i, .venue-bars i { flex: 1; height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; display: block; }
.venue-hist u, .venue-bars u { display: block; height: 100%; border-radius: 3px; background: var(--accent); text-decoration: none; }

.venue-good { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; counter-reset: good; }
.venue-good li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 0.5px solid var(--border); counter-increment: good; }
.venue-good li:first-child { border-top: 0; }
.venue-good-name { font-weight: 600; font-size: 0.9375rem; }
.venue-good-name::before { content: counter(good); font-family: var(--font-display); color: var(--accent); margin-right: 10px; }
.venue-good-meta { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; }
.venue-good-meta b { color: var(--text); }

.venue-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.venue-chips li { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 12px; border-radius: 16px; background: var(--surface); border: 0.5px solid var(--border); font-size: 0.8125rem; }
.venue-chips--quiet li { background: none; color: var(--text-muted); }
.venue-chips small { font-size: 0.6875rem; color: var(--text-muted); }

.venue-bars li { display: flex; align-items: center; gap: 10px; font-size: 0.8125rem; }
.venue-bars span { width: 96px; flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.venue-bars b { width: 36px; text-align: right; font-weight: 600; font-size: 0.75rem; color: var(--text-muted); }

.venue-stack { display: flex; height: 14px; border-radius: 7px; overflow: hidden; gap: 2px; }
.venue-stack i { display: block; height: 100%; min-width: 4px; }
.venue-flavors { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.venue-flavors li { display: flex; align-items: baseline; gap: 8px; font-size: 0.8125rem; flex-wrap: wrap; }
.venue-flavors i { width: 8px; height: 8px; border-radius: 50%; flex: none; align-self: center; }
.venue-flavors b { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; }
.venue-flavors small { color: var(--text-muted); font-size: 0.75rem; }

.venue-cups { list-style: none; margin: 0; padding: 0; }
.venue-cups a { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 10px 0; border-top: 0.5px solid var(--border); color: inherit; text-decoration: none; font-size: 0.9375rem; }
.venue-cups li:first-child a { border-top: 0; }
.venue-cups small { color: var(--text-muted); font-size: 0.75rem; white-space: nowrap; }
.venue-mine-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.venue-mine-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; background: var(--accent-light); }

.venue-links { flex-direction: row; flex-wrap: wrap; gap: 6px 18px; font-size: 0.8125rem; }
.venue-links a { color: var(--text-muted); text-decoration: none; }

.venue-cta-bar { position: sticky; bottom: 0; margin: 0 -1rem -1rem; padding: 12px 1rem 14px; background: linear-gradient(to top, var(--bg) 70%, transparent); }
.venue-cta {
  display: flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 24px; text-decoration: none;
  background: var(--text); color: var(--bg); font: 600 0.9375rem 'Plus Jakarta Sans', sans-serif;
}
.venue-cta:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.log-photos[hidden] { display: none; }

.notebook-body, .notebook-tab { min-width: 0; max-width: 100%; overflow-x: clip; }
