@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600&family=IBM+Plex+Mono:wght@400;500&family=Caprasimo&family=Figtree:wght@400;500;600;700&family=Damion&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,400,0,0&display=swap');

/* Pine — the current default brand identity. Wordmark-only (no icon),
   set in Damion; everything else converges on Fraunces for headings and
   trip names, Figtree for body text. */
:root {
  color-scheme: light;

  --ink-900: #FFFFFF;
  --ink-800: #F2F0EB;
  --ink-700: #F2F0EB;
  --ink-600: #F2F0EB;
  --line: #1F4742;
  --parchment: #1A1A1A;
  --muted: #9A7060;
  --brass: #1F4742;
  --brass-bright: color-mix(in srgb, #1F4742 75%, white 25%);
  --teal: #C9A190;
  --rust: #9A7060;
  --radius: 10px;

  --marker-blue: #6287CE;
  --marker-orange: #D39735;
  --marker-coral: #E37264;
  --marker-purple: #DA99B9;
  --marker-green: #4CA865;

  --font-display: 'Fraunces', Georgia, serif;
  --font-heading: 'Fraunces', Georgia, serif;
  --font-body: 'Figtree', -apple-system, 'Segoe UI', sans-serif;
  --font-wordmark: 'Damion', cursive;
}

html.theme-pine-dark {
  color-scheme: dark;
  --ink-900: #1A1A1A;
  --ink-800: color-mix(in srgb, #1A1A1A 85%, #F2F0EB 15%);
  --ink-700: color-mix(in srgb, #1A1A1A 78%, #F2F0EB 22%);
  --ink-600: color-mix(in srgb, #1A1A1A 70%, #F2F0EB 30%);
  --line: #EBDDC5;
  --parchment: #FFFFFF;
  --muted: #C9A190;
  --brass: #6B8A82;
  --brass-bright: color-mix(in srgb, #6B8A82 75%, white 25%);
  --teal: #C9A190;
  --rust: #9A7060;
}

* { box-sizing: border-box; }
/* The browser's own [hidden]{display:none} rule loses to any author rule
   setting display on the same element (e.g. .btn's inline-flex) since
   they tie on specificity and author styles win ties. This one rule fixes
   that everywhere, rather than needing a per-class override each time a
   hideable element happens to also have its own display declaration. */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  background: var(--ink-900);
  color: var(--parchment);
  font-family: var(--font-body);
  line-height: 1.55;
}

h1, h2, h3, .display {
  font-family: var(--font-heading);
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--parchment);
  margin: 0 0 0.4em;
}
.trip-name { font-family: var(--font-display); }

.mono { font-family: 'IBM Plex Mono', monospace; letter-spacing: 0.02em; }

a { color: var(--brass-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--brass-bright);
  outline-offset: 2px;
}

.shell { max-width: 980px; margin: 0 auto; padding: 0 20px 80px; overflow-wrap: break-word; }

/* --- Top nav --- */
.topnav {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--ink-900) 78%, transparent);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  position: sticky; top: 0; z-index: 1200;
}
.topnav-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--parchment);
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand .mark { color: var(--brass); display: flex; align-items: center; }
.brand .mark img { width: 36px; height: 36px; display: block; }
.brand-lg { font-size: 30px; gap: 12px; }
.brand-lg .mark img { width: 45px; height: 45px; }
.brand-stacked { flex-direction: column; font-size: 36px; gap: 10px; }
.brand-stacked .mark img { width: 54px; height: 54px; }
.wordmark-only { font-family: var(--font-wordmark); font-size: 1.5em; line-height: 1; color: var(--line); }

.wordmark-inline { font-family: var(--font-wordmark); font-size: 1.05em; }

.md-toolbar { display: flex; gap: 6px; margin-bottom: 6px; }
.md-tool-btn {
  width: 34px; height: 30px; border-radius: 7px; border: 1px solid var(--line); background: var(--ink-800);
  color: var(--parchment); font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.md-tool-btn:hover { background: var(--ink-700); border-color: var(--brass); }
.md-tool-btn:active { transform: translateY(1px); }

.status-badge {
  display: inline-block; font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 999px;
  white-space: nowrap; border: 1px solid transparent;
}
.status-submitted { background: var(--ink-700); color: var(--muted); border-color: var(--line); }
.status-pending { background: color-mix(in srgb, var(--rust) 16%, var(--ink-800)); color: var(--rust); border-color: var(--rust); }
.status-in_review { background: color-mix(in srgb, var(--teal) 18%, var(--ink-800)); color: var(--teal); border-color: var(--teal); }
.status-implementing { background: color-mix(in srgb, var(--brass) 20%, var(--ink-800)); color: var(--brass); border-color: var(--brass); }
.status-implemented { background: var(--brass); color: var(--ink-900); border-color: var(--brass); }
.vault-card.is-implemented { opacity: 0.6; }

.colorway { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; margin-top: 16px; }
.colorway-swatch { display: flex; flex-direction: column; gap: 6px; }
.colorway-chip { display: block; width: 100%; height: 64px; border-radius: 10px; border: 1px solid var(--line); }
.colorway-hex { font-size: 13px; color: var(--parchment); }
.colorway-label { font-size: 12.5px; color: var(--muted); }

.hamburger-btn {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--ink-800); border: 1px solid var(--line);
  color: var(--parchment); cursor: pointer; padding: 0;
  transition: border-color .15s;
}
.hamburger-btn:hover { border-color: var(--brass); }
.hamburger-btn svg { width: 18px; height: 18px; }

.nav-drawer-overlay {
  position: fixed; inset: 0; background: rgba(3,9,12,0.55);
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
  z-index: 1250;
}
.nav-drawer-overlay.open { opacity: 1; pointer-events: auto; }

.nav-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(320px, 84vw);
  background: var(--ink-800); border-left: 1px solid var(--line);
  transform: translateX(100%); transition: transform .3s cubic-bezier(.32,.72,0,1);
  z-index: 1251; display: flex; flex-direction: column;
  box-shadow: -10px 0 34px rgba(0,0,0,.35);
}
.nav-drawer.open { transform: translateX(0); }
.nav-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 18px; border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.nav-drawer-greeting { font-family: var(--font-display); font-size: 17px; }
.nav-drawer-close {
  width: 34px; height: 34px; border-radius: 50%; padding: 0;
  background: transparent; border: 1px solid var(--line); color: var(--parchment);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.nav-drawer-close:hover { border-color: var(--brass); }
.nav-drawer-close svg { width: 15px; height: 15px; }

.nav-drawer-links { display: flex; flex-direction: column; padding: 10px 12px; flex: 1; gap: 2px; }
.nav-drawer-links a {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 12px; border-radius: 10px;
  color: var(--parchment); font-size: 15.5px; font-weight: 500;
}
.nav-drawer-links a:hover { background: var(--ink-700); text-decoration: none; }
.nav-drawer-links .icon { font-size: 18px; width: 22px; text-align: center; flex-shrink: 0; color: var(--brass); }
.nav-drawer-links .icon.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal; font-style: normal;
  font-size: 20px; line-height: 1; letter-spacing: normal; text-transform: none;
  display: inline-block; white-space: nowrap; word-wrap: normal; direction: ltr;
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20;
  vertical-align: -4px;
}
.anleitung-icon {
  font-family: 'Material Symbols Outlined';
  font-weight: normal; font-style: normal;
  font-size: 19px; line-height: 1; letter-spacing: normal; text-transform: none;
  display: inline-block; white-space: nowrap; word-wrap: normal; direction: ltr;
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20;
  vertical-align: -4px; margin-right: 4px; color: var(--brass);
}

.nav-drawer-foot { padding: 14px 12px 20px; border-top: 1px solid var(--line); flex-shrink: 0; display: flex; flex-direction: column; gap: 8px; }
.nav-drawer-foot form { width: 100%; }
.nav-drawer-foot .btn { width: 100%; justify-content: center; }

.theme-picker { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.theme-picker-option {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); color: var(--parchment); font-size: 14px;
}
.theme-picker-option:hover { background: var(--ink-700); text-decoration: none; }
.theme-picker-option.active { border-color: var(--brass); background: color-mix(in srgb, var(--brass) 14%, var(--ink-800)); }
.theme-picker-swatch { width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; border: 1px solid rgba(255,255,255,.25); }
.theme-swatch-pine { background: linear-gradient(135deg, #FFFFFF 50%, #1F4742 50%); }
.theme-swatch-pine-dark { background: linear-gradient(135deg, #2A2724 50%, #6B8A82 50%); }

body.nav-drawer-locked { overflow: hidden; }

/* --- Upload preview + progress --- */
.upload-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.upload-preview-item {
  position: relative; width: 72px; height: 72px; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--line); background: var(--ink-700);
  display: flex; align-items: center; justify-content: center; font-size: 24px;
}
.upload-preview-item img, .upload-preview-item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.upload-preview-badge {
  position: absolute; bottom: 3px; right: 3px; background: rgba(0,0,0,.6); color: #fff;
  font-size: 10px; padding: 1px 4px; border-radius: 4px; line-height: 1.4;
}
.upload-progress-wrap { display: none; margin-top: 14px; }
.upload-progress-wrap.active { display: block; }
.upload-progress-bar { height: 8px; border-radius: 999px; background: var(--ink-700); overflow: hidden; }
.upload-progress-fill { height: 100%; width: 0%; background: var(--brass); transition: width .15s ease; }
.upload-progress-label { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.draft-restored-notice {
  background: color-mix(in srgb, var(--brass) 14%, transparent); border: 1px solid var(--brass);
  border-radius: 8px; padding: 9px 12px; font-size: 13px; color: var(--parchment); margin-bottom: 14px;
}

/* --- Comments trigger + modal --- */
.comments-trigger {
  display: flex; align-items: center; background: transparent; border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 14px; margin-top: 14px; cursor: pointer;
  color: var(--parchment); font: inherit; font-size: 13.5px;
}
.comments-trigger:hover { border-color: var(--brass); }
.comments-modal-head { margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.comments-modal-head .entry-date { display: block; font-size: 12px; }

/* --- Select mode: batch delete + tap-to-order --- */
.select-mode-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.select-mode-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.select-mode-actions[hidden] { display: none; }
.select-mode-count { font-size: 13px; color: var(--muted); }
.masonry-grid.select-active .media-controls { display: none; }
.masonry-grid.select-active figure { cursor: pointer; }
.select-badge {
  position: absolute; top: 8px; left: 8px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--ink-900); border: 2px solid var(--line); color: var(--parchment);
  font-size: 13px; font-weight: 700; display: none; align-items: center; justify-content: center; z-index: 2;
}
.masonry-grid.select-active .select-badge { display: flex; }
.masonry-grid figure.selected .select-badge { background: var(--brass); border-color: var(--brass); color: #fff; }
.masonry-grid figure.selected { outline: 3px solid var(--brass); outline-offset: -3px; }
.masonry-grid figure { transition: transform .18s ease; }

/* --- Buttons & forms --- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-size: 14px; font-weight: 600;
  padding: 10px 16px; border-radius: 8px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none;
}
.btn-primary { background: var(--brass); color: var(--ink-900); }
.btn-primary:hover { background: var(--brass-bright); text-decoration: none; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--parchment); }
.btn-ghost:hover { border-color: var(--brass); text-decoration: none; }
.btn-danger { background: transparent; border-color: var(--rust); color: var(--rust); }
.btn-danger:hover { background: var(--rust); color: var(--ink-900); text-decoration: none; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; }

label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
input[type=text], input[type=password], input[type=date], textarea, select {
  width: 100%; padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--ink-800); color: var(--parchment);
  font: inherit; font-size: 15px;
}
input:focus, textarea:focus, select:focus { border-color: var(--brass); }
textarea { resize: vertical; min-height: 110px; }
input[type=file] { color: var(--muted); font-size: 13px; }
.field-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.error-box {
  background: rgba(193,84,58,0.12); border: 1px solid var(--rust); color: var(--parchment);
  padding: 10px 14px; border-radius: 8px; font-size: 14px; margin: 14px 0;
}
.success-box {
  background: rgba(82,168,159,0.12); border: 1px solid var(--teal); color: var(--parchment);
  padding: 10px 14px; border-radius: 8px; font-size: 14px; margin: 14px 0;
}

/* --- Auth pages --- */
.auth-wrap { max-width: 380px; margin: 12vh auto 0; padding: 0 20px; }
.auth-card {
  background: var(--ink-800); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px;
}

/* Login page hero photo — mobile gets a smaller image, larger screens step
   up to the bigger one, so phones aren't pulling a desktop-sized file. */
body.login-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: linear-gradient(180deg, rgba(10,12,15,0.25) 0%, rgba(10,12,15,0.55) 55%, rgba(10,12,15,0.88) 100%), url('/img/login-hero-mobile.jpg');
  background-size: cover;
  background-position: center;
}
@media (min-width: 700px) {
  body.login-hero {
    background-image: linear-gradient(180deg, rgba(10,12,15,0.2) 0%, rgba(10,12,15,0.5) 55%, rgba(10,12,15,0.85) 100%), url('/img/login-hero.jpg');
  }
}
body.login-hero .auth-wrap { margin: 0 auto; }
body.login-hero .btn-ghost {
  background: rgba(10,12,15,0.55); border-color: rgba(255,255,255,0.35); color: #fff; backdrop-filter: blur(4px);
}
body.login-hero .btn-ghost:hover { border-color: #fff; }

/* --- Dashboard / trip cards (boarding-pass motif) --- */
.dash-header { display: flex; align-items: baseline; justify-content: space-between; margin: 40px 0 20px; }
.trip-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px;
}
.ticket {
  position: relative;
  background: var(--ink-800);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.ticket:hover { border-color: var(--brass); transform: translateY(-2px); }
.ticket-new-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: var(--brass); color: var(--ink-900); font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px; box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.ticket-cover { height: 130px; background: var(--ink-700) center/cover no-repeat; position: relative; }
.ticket-body { padding: 16px 18px 18px; flex: 1; display: flex; flex-direction: column; }
.ticket-route { font-size: 12px; color: var(--brass-bright); margin-bottom: 4px; }
.ticket-title { font-size: 20px; margin: 0 0 4px; }
.ticket-sub { font-size: 13px; color: var(--muted); flex: 1; }
.ticket-stub {
  border-top: 1px dashed var(--line);
  margin-top: 14px; padding-top: 12px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px;
}
.stamp {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; border: 1px solid currentColor;
}
.stamp-planned { color: var(--brass-bright); }
.stamp-live { color: var(--teal); }
.stamp-past { color: var(--muted); }
.empty-state {
  border: 1px dashed var(--line); border-radius: var(--radius); padding: 48px 24px;
  text-align: center; color: var(--muted);
}

/* --- Trip detail --- */
.trip-hero { padding: 36px 0 0; }
.trip-hero.has-cover {
  padding: 60px 24px 28px; margin: 0 -20px 20px; border-radius: 0 0 var(--radius) var(--radius);
  background-size: cover; background-position: center;
  position: relative;
}
.trip-hero.has-cover::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(180deg, rgba(10,12,15,0.15) 0%, rgba(10,12,15,0.55) 70%, rgba(10,12,15,0.85) 100%);
}
.trip-hero.has-cover > * { position: relative; z-index: 1; }
.trip-hero.has-cover h1, .trip-hero.has-cover .ticket-route { color: #fff; }
.trip-hero.has-cover p, .trip-hero.has-cover .trip-dates { color: #E8E4D8; }
.trip-hero.has-cover .btn-ghost { background: rgba(10,12,15,0.55); border-color: rgba(255,255,255,0.35); color: #fff; }
.trip-hero.has-cover > .editor-stack-overlay { position: absolute; z-index: 2; }
.trip-hero .ticket-route { font-size: 13px; }
.trip-hero h1 { font-size: clamp(28px, 5vw, 40px); }
.trip-dates { color: var(--muted); font-size: 14px; margin-bottom: 4px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 26px 0 26px; overflow-x: auto; }
.tab {
  padding: 10px 16px; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.tab.active { color: var(--parchment); border-color: var(--brass); }
.tab:hover { color: var(--parchment); text-decoration: none; }

/* --- Itinerary: day cards, location chips, planning map --- */
.itin-day { background: var(--ink-800); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px 12px; margin-bottom: 14px; }
.itin-day.is-drive { border-left: 3px solid var(--brass); }
.itin-day > summary { cursor: pointer; list-style: none; }
.itin-day > summary::-webkit-details-marker { display: none; }
.itin-day-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.itin-day-head h3 { margin: 0; font-size: 17px; display: inline; }
.itin-day-head .date { font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.itin-today-badge {
  display: inline-block; background: var(--brass); color: #fff; font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; vertical-align: middle; margin-left: 4px;
}
.itin-day-body { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.itin-day .meta { font-size: 13px; color: var(--muted); }
.itin-notes { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.itin-note-bubble {
  background: color-mix(in srgb, var(--note-color, var(--brass)) 16%, var(--ink-800));
  border: 1px solid var(--note-color, var(--line)); border-radius: 10px; padding: 10px 12px;
}
.itin-note-view { display: flex; align-items: flex-start; gap: 10px; }
.itin-note-view[hidden] { display: none; }
.itin-note-text { flex: 1; font-size: 13.5px; overflow-wrap: break-word; word-break: break-word; white-space: pre-wrap; }
.itin-note-actions { display: flex; gap: 2px; flex-shrink: 0; }
.itin-note-edit-btn, .itin-note-delete-btn {
  width: 22px; height: 22px; border-radius: 50%; background: transparent; border: none; color: var(--muted);
  font-size: 12px; cursor: pointer; line-height: 1; padding: 0; flex-shrink: 0;
}
.itin-note-edit-btn:hover { color: var(--brass-bright); }
.itin-note-delete-btn:hover { color: var(--rust); }
.itin-note-edit-form input[type=text] { margin-top: 0; }
.itin-color-swatches { display: flex; gap: 8px; margin-top: 8px; }
.itin-swatch {
  width: 22px; height: 22px; border-radius: 50%; background: var(--swatch-color); border: 2px solid transparent;
  cursor: pointer; padding: 0; box-shadow: 0 0 0 1px var(--line);
}
.itin-swatch.selected { border-color: var(--ink-900); box-shadow: 0 0 0 2px var(--swatch-color); }
.itin-note-add-row { display: flex; gap: 8px; margin-top: 10px; }
.itin-note-add-row input[type=text] { flex: 1; }
.itin-note-add .itin-color-swatches { margin-top: 8px; }

.weather-emoji-options { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.weather-emoji-btn {
  width: 34px; height: 34px; border-radius: 8px; background: var(--ink-800); border: 2px solid transparent;
  cursor: pointer; padding: 0; font-size: 17px; line-height: 1; box-shadow: 0 0 0 1px var(--line);
}
.weather-emoji-btn.selected { border-color: var(--brass); background: color-mix(in srgb, var(--brass) 14%, var(--ink-800)); }
.entry-weather { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); margin: 4px 0 12px; }
.entry-weather .weather-emoji { font-size: 18px; }
.itin-day-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.itin-chip {
  display: inline-flex; align-items: center; gap: 2px; font-size: 12.5px; padding: 3px 6px 3px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--chip-color) 18%, var(--ink-800)); border: 1px solid var(--chip-color); color: var(--parchment);
}
.itin-chip-zoom { background: none; border: none; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; }
.itin-chip-edit {
  margin-left: 3px; width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--muted); text-decoration: none; flex-shrink: 0;
}
.itin-chip-edit:hover { color: var(--brass-bright); text-decoration: none; background: color-mix(in srgb, var(--chip-color) 30%, transparent); }
.itin-chip-badge {
  display: none; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%;
  background: var(--ink-900); border: 1px solid var(--chip-color); font-size: 10px; font-weight: 700; flex-shrink: 0;
}
.itin-day-chips.select-active .itin-chip-edit { display: none; } /* avoid accidental navigation while reordering */
.itin-day-chips.select-active .itin-chip-badge { display: inline-flex; }
.itin-day-chips.select-active .itin-chip-zoom { cursor: pointer; }
.itin-chip.selected { outline: 2px solid var(--chip-color); outline-offset: 1px; }
.itin-chip.selected .itin-chip-badge { background: var(--chip-color); color: var(--ink-900); }
.itinerary-planning-map { height: 58vh; min-height: 440px; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; }
.itin-layer-toggles { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 13.5px; }
.itin-layer-toggles label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.itin-layer-toggles input { width: auto; accent-color: var(--brass); }
.itinerary-empty { text-align: center; padding: 40px 20px; }
.itin-category-group { background: var(--ink-800); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 14px; }
.itin-category-group > summary { cursor: pointer; font-weight: 600; font-size: 15px; }
.itin-category-count { font-weight: 400; color: var(--muted); font-size: 12.5px; }
.itin-category-group-body { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.itin-category-group-body .new-entry:last-child { margin-bottom: 0; }
.region-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.region-chip { background: var(--ink-700); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 12.5px; color: var(--muted); }
.vault-type-badge { display: inline-block; background: var(--ink-700); border-radius: 999px; padding: 3px 11px; font-size: 12px; color: var(--brass-bright); font-weight: 600; margin-bottom: 8px; }
.vault-meta-line { font-size: 13.5px; color: var(--muted); margin: -4px 0 10px; font-family: 'IBM Plex Mono', monospace; letter-spacing: 0.02em; }

.upload-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 10px 0 22px; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.photo-grid figure { margin: 0; position: relative; border-radius: 8px; overflow: hidden; background: var(--ink-800); }
.photo-grid img { width: 100%; height: 160px; object-fit: cover; display: block; }
.photo-grid video { width: 100%; height: 160px; object-fit: cover; display: block; background: #000; }
.photo-del {
  position: absolute; top: 6px; right: 6px; background: rgba(15,23,28,0.75);
  border: 1px solid var(--line); color: var(--parchment); border-radius: 6px; font-size: 11px;
  padding: 3px 7px; cursor: pointer;
}
.photo-del:hover { border-color: var(--rust); color: var(--rust); }

.entry { border-left: 2px solid var(--line); padding-left: 20px; margin-bottom: 34px; position: relative; }
.entry::before {
  content: ''; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--brass);
}

/* --- Vault cards --- */
.vault-card { background: var(--ink-800); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; }
.vault-card h3 { margin: 0 0 8px; font-size: 17px; overflow-wrap: break-word; word-break: break-word; }
.vault-attachments { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.vault-attachment { position: relative; }
.vault-attachment img { width: 90px; height: 90px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; }
.vault-file-link {
  display: flex; align-items: center; gap: 6px; background: var(--ink-700); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 12px; font-size: 13px; max-width: 220px; text-decoration: none; color: var(--parchment);
}
.vault-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.vault-attachment form { position: absolute; top: -6px; right: -6px; }
.vault-attachment button {
  width: 20px; height: 20px; border-radius: 50%; background: var(--ink-900); border: 1px solid var(--line);
  color: var(--muted); font-size: 13px; cursor: pointer; line-height: 1; padding: 0;
}
.vault-attachment button:hover { border-color: var(--rust); color: var(--rust); }

/* --- Checklist --- */
.checklist-topic { background: var(--ink-800); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px 16px; margin-bottom: 16px; }
.checklist-topic-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; cursor: pointer; list-style: none; }
.checklist-topic-head h3 { margin: 0; font-size: 16px; display: inline; }
.checklist-topic-title-wrap { flex: 1; min-width: 0; }
.checklist-topic-title-input { font-size: 16px; font-weight: 600; padding: 4px 8px; margin: 0; }
.checklist-topic-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.checklist-topic-actions form { display: inline-flex; }
.checklist-item { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.checklist-item:last-of-type { border-bottom: none; }
.checklist-item input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--brass); flex-shrink: 0; cursor: pointer; }
.checklist-item-text { flex: 1; font-size: 14.5px; overflow-wrap: break-word; word-break: break-word; }
.checklist-item.is-checked .checklist-item-text { color: var(--muted); text-decoration: line-through; }
.checklist-item-delete-btn {
  background: none; border: none; color: var(--muted); font-size: 16px; cursor: pointer; padding: 0 4px; line-height: 1; flex-shrink: 0;
}
.checklist-item-delete-btn:hover { color: var(--rust); }
.checklist-add-item { display: flex; gap: 8px; margin-top: 10px; }
.checklist-add-item input[type=text] { flex: 1; }

.entry-date { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--brass-bright); }
.entry h3 { margin-top: 4px; }
.entry-body { color: var(--parchment); font-size: 15px; overflow-wrap: break-word; word-break: break-word; }
.entry-body p { margin: 0 0 10px; }
.entry-photos { margin-top: 12px; }
.entry-photos figure { position: relative; margin: 0; border-radius: 6px; overflow: hidden; cursor: pointer; }
.entry-foot { margin-top: 10px; }

details.new-entry { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 30px; }
details.new-entry summary { cursor: pointer; font-weight: 600; color: var(--brass-bright); list-style: none; }
details.new-entry summary::-webkit-details-marker { display: none; }
details.new-entry summary::before { content: '+ '; }
details.new-entry[open] summary::before { content: '– '; }

.member-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.member-row:last-child { border-bottom: none; }
.role-tag { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--muted); text-transform: uppercase; }
.add-member-form { display: flex; gap: 10px; align-items: flex-end; margin-top: 18px; flex-wrap: wrap; }
.add-member-form > div { flex: 1; min-width: 160px; }

.danger-zone { margin-top: 50px; padding-top: 20px; border-top: 1px solid var(--line); }

table.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 16px; }
table.admin-table th, table.admin-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
table.admin-table th { color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }

.credential-box {
  background: var(--ink-700); border: 1px solid var(--brass); border-radius: 8px;
  padding: 14px 18px; margin: 18px 0; font-family: 'IBM Plex Mono', monospace; font-size: 13.5px;
}

.card-block { background: var(--ink-800); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 18px 0 26px; }
.center-note { text-align: center; color: var(--muted); margin-top: 80px; }

/* --- Auth pages: colorful atmospheric shapes instead of a flat background --- */
.auth-blobs { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(80px); }
.blob-1 { width: 46vw; height: 46vw; max-width: 560px; max-height: 560px; background: var(--brass); opacity: 0.5; top: -14vw; left: -12vw; }
.blob-2 { width: 40vw; height: 40vw; max-width: 480px; max-height: 480px; background: var(--teal); opacity: 0.45; bottom: -16vw; right: -10vw; }
.blob-3 { width: 32vw; height: 32vw; max-width: 380px; max-height: 380px; background: var(--brass-bright); opacity: 0.35; top: 38%; left: 62%; }
.auth-wrap, .auth-page-content { position: relative; z-index: 1; }
.auth-card { box-shadow: 0 30px 60px -20px rgba(0,0,0,0.35); }

/* --- Masonry media grid (Photos tab + entry photos) --- */
.masonry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  grid-auto-rows: 110px;
  grid-auto-flow: dense; /* backfills gaps with later, smaller tiles instead of leaving holes */
  gap: 3px;
}
.masonry-grid figure {
  margin: 0 -6px -6px 0; /* slight overlap into the next tile */
  position: relative; border-radius: 10px; overflow: hidden; background: var(--ink-800);
  border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35);
  cursor: pointer; grid-row: span 2; z-index: 1;
}
.masonry-grid figure:hover { z-index: 2; }
/* Portrait: default (span 1 col) is already the "sm" size */
.masonry-grid figure.is-portrait.size-md { grid-row: span 3; }
.masonry-grid figure.is-portrait.size-lg { grid-column: span 2; grid-row: span 3; }
/* Landscape: sm is short + wide instead of a cropped square */
.masonry-grid figure.is-landscape.size-sm { grid-column: span 2; grid-row: span 1; }
.masonry-grid figure.is-landscape.size-md { grid-column: span 2; grid-row: span 2; }
.masonry-grid figure.is-landscape.size-lg { grid-column: span 3; grid-row: span 2; }
.masonry-grid img, .masonry-grid video { width: 100%; height: 100%; object-fit: cover; display: block; }
.masonry-grid figure.masonry-solo { justify-self: center; }
@media (max-width: 600px) {
  .masonry-grid { grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)); }
  .masonry-grid figure.is-portrait.size-lg,
  .masonry-grid figure.is-landscape.size-lg { grid-column: span 2; }
}

/* True masonry via CSS Grid with a fine row unit (JS computes exact
   grid-row/grid-column spans per photo from its real aspect ratio) —
   landscape photos span 2 columns, portraits stay to 1 and get a capped
   height so one tall photo can't dominate the grid. */
.masonry-grid.masonry-flow {
  display: grid;
  grid-template-columns: repeat(var(--mcols, 3), 1fr);
  grid-auto-rows: 8px;
  grid-auto-flow: dense;
  gap: 6px;
}
.masonry-flow figure { width: 100%; height: 100%; margin: 0; }
.masonry-flow img, .masonry-flow video { width: 100%; height: 100%; object-fit: cover; }

.media-controls {
  position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s;
}
figure:hover .media-controls, figure:focus-within .media-controls { opacity: 1; }
.media-controls form { display: inline; }
.media-controls button {
  background: rgba(10,12,15,0.8); border: 1px solid var(--line); color: var(--parchment); border-radius: 6px;
  font-size: 11px; padding: 4px 7px; cursor: pointer; line-height: 1;
}
.media-controls button:hover { border-color: var(--rust); color: var(--rust); }

/* --- Lightbox popup --- */
.lightbox-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.92); z-index: 9999;
  display: none; align-items: center; justify-content: center;
}
.lightbox-overlay.open { display: flex; }
.lb-stage { max-width: 97vw; max-height: 92vh; display: flex; align-items: center; justify-content: center; }
.lb-stage img, .lb-stage video { max-width: 97vw; max-height: 92vh; border-radius: 6px; object-fit: contain; }
.lb-close, .lb-prev, .lb-next {
  position: absolute; background: rgba(20,24,29,0.7); border: 1px solid var(--line); color: #fff;
  border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.lb-close { top: 16px; right: 16px; width: 44px; height: 44px; font-size: 26px; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 30px; }
.lb-prev { left: 10px; }
.lb-next { right: 10px; }
.lb-counter { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: var(--muted); font-size: 13px; }
@media (max-width: 600px) {
  .lb-prev, .lb-next { width: 44px; height: 44px; font-size: 24px; }
  .lb-close { width: 40px; height: 40px; font-size: 22px; }
}

/* --- Trip map tab (full-size, replaces the old popup preview) --- */
.trip-map-full {
  height: 62vh; min-height: 380px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); z-index: 1; position: relative;
}
@media (max-width: 600px) { .trip-map-full { height: 68vh; } }
.map-emoji-pin {
  display: flex; align-items: center; justify-content: center; width: 32px; height: 32px;
  background: #fff; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  box-shadow: 0 2px 6px rgba(0,0,0,0.4); border: 2px solid #fff;
}
.map-emoji-pin-inner { display: block; transform: rotate(45deg); font-size: 18px; line-height: 1; }

.map-pin {
  display: flex; align-items: center; justify-content: center; width: 26px; height: 26px;
  background: var(--brass); border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  box-shadow: 0 2px 6px rgba(0,0,0,0.4); border: 2px solid #fff;
}
.map-pin-dot { display: block; width: 8px; height: 8px; background: #fff; border-radius: 50%; transform: rotate(45deg); }

/* --- Draft badge & journal sort --- */
.draft-badge {
  display: inline-block; font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--rust); border: 1px solid var(--rust); border-radius: 999px; padding: 2px 9px; margin-left: 8px;
}
.journal-sort { display: flex; gap: 6px; align-items: center; margin-bottom: 18px; font-size: 13px; color: var(--muted); }
.journal-sort a { color: var(--muted); }
.journal-sort a.active { color: var(--brass-bright); font-weight: 600; }

.dash-section { margin: 30px 0 14px; }
.dash-section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px; cursor: pointer; list-style: none; }
.dash-section-head h2 { margin: 0; font-size: 19px; }
.dash-sort { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); }
.dash-sort a { color: var(--muted); }
.dash-sort a.active { color: var(--brass-bright); font-weight: 600; }
.dash-section .trip-grid { margin-top: 14px; }

/* --- Reactions --- */
.reaction-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.reaction-like-wrap { position: relative; }
.reaction-like-btn {
  background: var(--ink-800); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px;
  font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--parchment);
}
.reaction-like-btn.mine { border-color: var(--brass); background: color-mix(in srgb, var(--brass) 16%, var(--ink-800)); }
.reaction-picker, .comment-reaction-picker {
  position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 20;
  display: flex; flex-wrap: wrap; gap: 4px; width: 228px; background: var(--ink-800); border: 1px solid var(--line); border-radius: 22px;
  padding: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.reaction-picker[hidden], .comment-reaction-picker[hidden] { display: none; }
.reaction-picker-emoji {
  width: 36px; height: 36px; border-radius: 50%; background: transparent; border: none; font-size: 18px;
  cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform .1s ease;
}
/* Zigzag: the 6th emoji starts row two, shifted half a button-width right so
   it staggers between the gaps of row one instead of stacking directly
   underneath -- easier to land a tap on the one you actually want. */
.reaction-picker-emoji:nth-child(6) { margin-left: 20px; }
.reaction-picker-emoji:hover { transform: scale(1.2); background: var(--ink-700); }
.reaction-picker-emoji.selected { background: color-mix(in srgb, var(--brass) 22%, var(--ink-800)); }
.reaction-summary {
  display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end;
  background: none; border: none; padding: 0; font: inherit; cursor: default;
}
.reaction-summary:has(.reaction-summary-badge) { cursor: pointer; }
.reaction-summary-badge {
  background: var(--ink-800); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px;
  font-size: 13px; color: var(--parchment);
}

.reactions-modal-group { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.reactions-modal-group:last-child { border-bottom: none; }
.reactions-modal-emoji { font-size: 15px; width: 44px; flex-shrink: 0; }
.reactions-modal-avatars { display: flex; flex-wrap: wrap; gap: 8px; }

/* --- Comments --- */
.comments { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.comment { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.comment:last-child { border-bottom: none; }
.comment-avatar-col { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 60px; flex-shrink: 0; text-align: center; }
.comment-author-name { font-weight: 600; font-size: 11px; line-height: 1.25; word-break: break-word; }
.comment-main { flex: 1; min-width: 0; }
.comment-time { font-size: 11.5px; color: var(--muted); margin-bottom: 2px; }
.comment-body { color: var(--parchment); overflow-wrap: break-word; word-break: break-word; }
.comment-actions { margin-top: 4px; display: flex; gap: 10px; }
.comment-actions button, .comment-actions summary { background: none; border: none; color: var(--muted); font-size: 12px; cursor: pointer; padding: 0; }
.comment-actions summary { display: inline; list-style: none; }
.comment-actions summary::-webkit-details-marker { display: none; }

.comment-reaction-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.comment-reaction-wrap { position: relative; }
.comment-reaction-trigger {
  background: none; border: 1px solid var(--line); border-radius: 999px; width: 26px; height: 26px;
  font-size: 13px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--muted);
}
.comment-reaction-trigger.mine { border-color: var(--brass); background: color-mix(in srgb, var(--brass) 16%, var(--ink-800)); }
.comment-reaction-badge { padding: 2px 8px; font-size: 11.5px; }
.comment-form { display: flex; gap: 8px; margin-top: 12px; }
.comment-form input[type=text] { flex: 1; }

@media (max-width: 600px) {
  .itinerary-planning-map { height: 50vh; min-height: 340px; }
}

/* --- Modal popup (used for editing a journal entry without page scroll) --- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.75); z-index: 1300;
  display: none; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 30px 16px;
}
.modal-overlay.modal-open { display: flex; }
.modal-card {
  background: var(--ink-800); border: 1px solid var(--line); border-radius: 14px; padding: 24px;
  max-width: 560px; width: 100%; margin: auto; position: relative;
}
.modal-close-btn {
  position: absolute; top: 10px; right: 12px; background: none; border: none; color: var(--muted);
  font-size: 26px; cursor: pointer; line-height: 1; padding: 6px;
}
.modal-close-btn:hover { color: var(--rust); }
@media (max-width: 600px) {
  .modal-overlay { padding: 0; align-items: stretch; }
  .modal-card { max-width: none; min-height: 100%; border-radius: 0; border: none; }
}

/* --- Location picker (click-to-place map instead of typing coordinates) --- */
.location-picker-map { height: 340px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); z-index: 1; position: relative; margin-bottom: 8px; cursor: crosshair; }
.location-picker-map.is-locked { cursor: default; }
.location-edit-toggle.is-unlocked { border-color: var(--rust); color: var(--rust); }
.marker-emoji-input { flex: 0 0 46px; width: 46px; text-align: center; font-size: 19px; padding: 0 2px; }
.emoji-quick-pick { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.emoji-quick-pick button {
  background: var(--ink-700); border: 1px solid var(--line); border-radius: 8px; font-size: 18px;
  padding: 5px 9px; cursor: pointer; line-height: 1;
}
.emoji-quick-pick button.selected { border-color: var(--brass); background: var(--ink-600); }
@media (max-width: 600px) {
  .location-picker-map { height: 420px; }
}

/* --- Avatars --- */
.avatar-img { border-radius: 50%; object-fit: cover; display: inline-block; flex-shrink: 0; border: 1px solid var(--line); }
.avatar-fallback {
  border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  background: var(--brass); color: var(--ink-900); font-weight: 700; font-family: var(--font-display);
}
.avatar-current { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }

/* --- Editor avatar stack (trip page) --- */
.editor-stack { display: flex; align-items: center; }
.editor-stack .avatar-img, .editor-stack .avatar-fallback { border: 2px solid var(--ink-800); margin-left: -8px; }
.editor-stack .avatar-img:first-child, .editor-stack .avatar-fallback:first-child { margin-left: 0; }
.editor-stack.on-cover .avatar-img, .editor-stack.on-cover .avatar-fallback { border-color: #fff; }
.editor-stack-overlay { position: absolute; bottom: 14px; right: 16px; z-index: 1; }

/* --- Comment author avatar --- */

/* --- Tag picker (type-to-search people, add as chips) --- */
.tag-picker { position: relative; }
.location-search { position: relative; }
.tag-picker-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.tag-chip {
  display: inline-flex; align-items: center; gap: 6px; background: var(--ink-700); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px 6px 3px 3px; font-size: 13.5px;
}
.tag-chip button {
  background: none; border: none; color: var(--muted); cursor: pointer; font-size: 15px; padding: 0 2px; line-height: 1;
}
.tag-chip button:hover { color: var(--rust); }
.tag-picker-suggestions {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 20; margin-top: 4px;
  background: var(--ink-700); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; display: none;
  max-height: 220px; overflow-y: auto;
}
.tag-picker-suggestions.open { display: block; }
.tag-picker-suggestion {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer; font-size: 14px;
}
.tag-picker-suggestion:hover, .tag-picker-suggestion.active { background: var(--ink-600); }
.tag-picker-empty { padding: 10px 12px; font-size: 13px; color: var(--muted); }
