:root {
  /* Neutral-warme Graustufen statt brauner Töne: das Gold bleibt so die
     einzige Farbe im Bild und wirkt als Akzent, nicht als Grundton. */
  --bg: #0d0c0b;
  --surface: #141311;
  --surface-2: #1b1917;
  --surface-3: #24211d;
  --line: #2e2a25;
  --line-soft: #201d1a;

  --gold: #c9a227;
  --gold-soft: #e6cd95;
  --gold-dim: #7d6829;
  --copper: #b5764a;

  --text: #f4f0e8;
  --text-2: #bcb3a5;
  --muted: #877e72;
  --danger: #c9645a;

  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --radius: 14px;
  --radius-sm: 9px;
  --sidebar: 380px;
  --topbar-h: 108px;

  --shadow: 0 18px 48px rgba(0, 0, 0, .55);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overscroll-behavior-y: none;
}

/* App-Shell: die Seite selbst scrollt nie, nur Liste und Detailspalte
   scrollen intern. Die Höhe kommt aus Flexbox statt aus einer fest
   verdrahteten Topbar-Höhe, damit umbrechende Chips nichts verschieben. */
body {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
  /* Sehr zurückhaltend gehalten: stärkere Verläufe erzeugten sichtbare
     braune Flecken hinter den Karten. */
  background:
    radial-gradient(1200px 680px at 80% -15%, rgba(201, 162, 39, .045), transparent 60%),
    radial-gradient(820px 560px at 5% 110%, rgba(181, 118, 74, .03), transparent 58%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }

/* Die Listenkarten sind Links. Ohne diesen Reset schlagen die Browser-
   Standardfarben durch – Blau für neu, Violett für besucht – und die
   Whiskynamen bekommen Unterstreichungen. */
a { color: inherit; text-decoration: none; }
a:visited { color: inherit; }

/* iOS zoomt bei Inputs unter 16px automatisch rein */
input, select, textarea { font-size: 16px; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 99px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Topbar ---------- */

.topbar {
  position: relative;
  flex: 0 0 auto;
  z-index: 40;
  padding: max(10px, env(safe-area-inset-top)) 14px 10px;
  background: linear-gradient(180deg, rgba(14, 12, 10, .97) 72%, rgba(14, 12, 10, .82));
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.brand h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 25px;
  letter-spacing: .035em;
  margin: 0;
  background: linear-gradient(100deg, var(--gold-soft), var(--gold) 55%, var(--copper));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand .count {
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
}

.search svg {
  position: absolute;
  left: 13px;
  width: 17px;
  height: 17px;
  color: var(--muted);
  pointer-events: none;
}

.search input {
  width: 100%;
  height: 46px;
  padding: 0 42px 0 39px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  outline: none;
  transition: border-color .16s, background .16s;
}

.search input:focus {
  border-color: var(--gold-dim);
  background: var(--surface-3);
}

.search input::placeholder { color: var(--muted); }

.search .clear {
  position: absolute;
  right: 6px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--muted);
  font-size: 19px;
  line-height: 1;
  display: none;
}

.search.has-value .clear { display: block; }

/* ---------- Filter-Chips ---------- */

.chipbar {
  display: flex;
  gap: 7px;
  margin-top: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}

.chipbar::-webkit-scrollbar { display: none; }

.chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 13px;
  white-space: nowrap;
  transition: border-color .16s, color .16s, background .16s;
}

.chip:active { transform: scale(.97); }

.chip.active {
  border-color: var(--gold-dim);
  background: rgba(201, 162, 39, .13);
  color: var(--gold-soft);
}

.chip .badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--gold);
  color: #1a1408;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* ---------- Layout ---------- */

.layout {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
}

/* ---------- Liste ---------- */

.list {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 14px calc(96px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 15px;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  background: var(--surface);
  text-align: left;
  width: 100%;
  color: var(--text);
  transition: border-color .16s, background .16s;
}

/* Auswahl wird über eine Akzentkante markiert statt über eine Farbfläche –
   das bleibt ruhig, auch wenn viele Karten untereinander stehen. */
.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: transparent;
  transition: background .16s;
}

.card:active { background: var(--surface-2); }

.card.selected {
  border-color: var(--line);
  background: var(--surface-2);
}

.card.selected::before { background: var(--gold); }

.card-main { min-width: 0; }

.card-name {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: .005em;
  color: var(--text);
  /* Zwei Zeilen, damit "Ardbeg Traigh Bhan 19 Batch 5" nicht abgeschnitten wird */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-sub {
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-tags {
  display: flex;
  gap: 5px;
  margin-top: 7px;
  flex-wrap: wrap;
}

/* Tags tragen Nebeninformation. Sie sind bewusst flächenlos und nur durch
   eine feine Kontur getrennt, damit sie nicht mit der Bewertung konkurrieren. */
.tag {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .11em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  white-space: nowrap;
}

/* Nur der Status ist eingefärbt – ein Signal pro Karte reicht. */
.tag.status-open     { border-color: rgba(201, 162, 39, .42); color: var(--gold-soft); }
.tag.status-sealed   { border-color: rgba(150, 168, 132, .32); color: #a8bb92; }
.tag.status-empty    { border-color: var(--line-soft); color: #6f665b; }
.tag.status-wishlist { border-color: rgba(181, 118, 74, .42); color: #d09a72; }

/* Rating-Medaillon */
.score {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid rgba(201, 162, 39, .3);
  background: radial-gradient(circle at 50% 40%, rgba(201, 162, 39, .12), transparent 70%);
  font-variant-numeric: tabular-nums;
}

.score b {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  color: var(--gold-soft);
}

.score.unrated {
  border-color: var(--line);
  border-style: dashed;
  background: none;
}

.score.unrated b { color: #6f665b; font-size: 17px; }

.empty {
  padding: 64px 24px;
  text-align: center;
  color: var(--muted);
}

.empty h2 {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 600;
  color: var(--text-2);
  margin: 0 0 6px;
}

/* ---------- Detail ---------- */

.detail {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--bg);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform .26s cubic-bezier(.32, .72, 0, 1);
  visibility: hidden;
  overscroll-behavior: contain;
}

.detail.open {
  transform: translateX(0);
  visibility: visible;
}

.detail-inner {
  padding: max(12px, env(safe-area-inset-top)) 16px calc(40px + env(safe-area-inset-bottom));
  max-width: 760px;
  margin: 0 auto;
}

.detail-bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 -16px 14px;
  padding: 8px 10px;
  background: rgba(14, 12, 10, .95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}

.iconbtn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  color: var(--text-2);
  transition: background .16s, color .16s;
}

.iconbtn:active { background: var(--surface-3); }
.iconbtn svg { width: 21px; height: 21px; }
.iconbtn.danger { color: var(--danger); }
.spacer { flex: 1; }

.btn {
  height: 42px;
  padding: 0 18px;
  border-radius: 11px;
  background: var(--surface-3);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--line);
  transition: transform .1s, filter .16s;
}

.btn:active { transform: scale(.97); }

.btn.primary {
  background: linear-gradient(160deg, var(--gold-soft), var(--gold));
  color: #191305;
  border-color: transparent;
  font-weight: 600;
}

.btn.ghost { background: transparent; }

.detail-title {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: .01em;
  margin: 0 0 4px;
}

.detail-sub {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 16px;
}

.hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  background: linear-gradient(150deg, rgba(201, 162, 39, .09), var(--surface));
  margin-bottom: 18px;
}

.hero .score { width: 72px; height: 72px; flex: 0 0 auto; }
.hero .score b { font-size: 29px; }

.hero-meta { display: flex; flex-wrap: wrap; gap: 6px; }

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
}

.fact { background: var(--surface); padding: 12px 14px; }

.fact dt {
  font-size: 10.5px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3px;
}

/* Stammdaten sind Tabellenwerte, keine Überschriften – serif wirkte hier
   zu gewichtig und brach lange Fassangaben unschön um. */
.fact dd {
  margin: 0;
  font-size: 15.5px;
  font-weight: 500;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.fact { transition: background .14s; }
.fact:hover { background: var(--surface-2); }

.note { margin-bottom: 18px; }

.note h3 {
  font-size: 11px;
  letter-spacing: .19em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.note h3::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}

.note p {
  margin: 0;
  color: var(--text-2);
  white-space: pre-wrap;
  font-size: 15px;
  line-height: 1.68;
}

/* ---------- Formular ---------- */

.form { display: flex; flex-direction: column; gap: 14px; }

.form fieldset {
  border: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.form legend {
  font-size: 11px;
  letter-spacing: .19em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
  padding: 0;
}

.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field.wide { grid-column: 1 / -1; }

.field label {
  font-size: 11px;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-2);
  outline: none;
  transition: border-color .16s, background .16s;
}

.field textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.6;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--gold-dim);
  background: var(--surface-3);
}

.form-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 10px;
  padding: 12px 0 max(12px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, var(--bg) 26%);
}

.form-actions .btn { flex: 1; }

/* ---------- FAB ---------- */

.fab {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 50;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, var(--gold-soft), var(--gold));
  color: #191305;
  box-shadow: 0 10px 30px rgba(201, 162, 39, .3);
  transition: transform .12s;
}

.fab:active { transform: scale(.92); }
.fab svg { width: 26px; height: 26px; }

/* ---------- Bottom Sheet ---------- */

.scrim {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(0, 0, 0, .6);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s, visibility .22s;
}

.scrim.open { opacity: 1; visibility: visible; }

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  max-height: 82dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px 16px calc(20px + env(safe-area-inset-bottom));
  border-radius: 20px 20px 0 0;
  border-top: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  transform: translateY(101%);
  transition: transform .27s cubic-bezier(.32, .72, 0, 1);
}

.sheet.open { transform: translateY(0); }

.sheet::before {
  content: "";
  display: block;
  width: 38px;
  height: 4px;
  margin: 4px auto 14px;
  border-radius: 99px;
  background: var(--line);
}

.sheet h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 12px;
}

.sheet-group { margin-bottom: 20px; }

.sheet-group > h3 {
  font-size: 11px;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 9px;
}

.opt {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  text-align: left;
  color: var(--text-2);
}

.opt:active { background: var(--surface-2); }
.opt.on { color: var(--gold-soft); background: rgba(201, 162, 39, .09); }

.opt .box {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 5px;
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  color: #191305;
}

.opt.on .box { background: var(--gold); border-color: var(--gold); }
.opt .box svg { width: 13px; height: 13px; opacity: 0; }
.opt.on .box svg { opacity: 1; }
.opt .label { flex: 1; min-width: 0; }
.opt .n { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.slider-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 12px;
}

.slider-row input[type="range"] {
  flex: 1;
  min-height: 0;
  padding: 0;
  accent-color: var(--gold);
  background: none;
  border: none;
}

.slider-row output {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  color: var(--gold-soft);
  min-width: 46px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.sheet-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 10px;
  padding: 10px 0 0;
  background: linear-gradient(180deg, transparent, var(--surface) 30%);
}

.sheet-actions .btn { flex: 1; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(84px + env(safe-area-inset-bottom));
  z-index: 90;
  transform: translate(-50%, 14px);
  padding: 11px 20px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--surface-3);
  font-size: 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s, transform .2s, visibility .2s;
}

.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.toast.error { border-color: var(--danger); color: #ecb3ac; }

/* ---------- Desktop ---------- */

@media (min-width: 940px) {
  body { font-size: 15px; }

  .topbar {
    display: grid;
    grid-template-columns: var(--sidebar) 1fr;
    align-items: center;
    gap: 24px;
    padding: 14px 26px;
  }

  .brand { margin-bottom: 0; }
  .brand h1 { font-size: 29px; }
  .chipbar { grid-column: 1 / -1; margin-top: 12px; }

  /* Volle Bildschirmbreite: die Liste wächst mit, bleibt aber lesbar begrenzt */
  .layout { grid-template-columns: clamp(320px, 26vw, 460px) 1fr; }

  .list {
    border-right: 1px solid var(--line-soft);
    padding-bottom: 24px;
  }

  .detail {
    position: static;
    transform: none;
    visibility: visible;
    background: transparent;
    min-height: 0;
    height: 100%;
  }

  .detail-bar {
    margin: 0 0 16px;
    padding: 8px 0;
    background: transparent;
    backdrop-filter: none;
    border: none;
  }

  .detail-inner { padding: 22px clamp(24px, 3vw, 56px) 60px; max-width: 1180px; }
  .back-btn { display: none; }
  .fab { right: 26px; bottom: 26px; }
  .facts { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

  .card:hover { border-color: var(--line); }
  .chip:hover { border-color: var(--gold-dim); }
  .iconbtn:hover { background: var(--surface-3); color: var(--text); }
  .opt:hover { background: var(--surface-2); }
  .btn:hover { filter: brightness(1.12); }

  .sheet {
    left: 50%;
    bottom: auto;
    top: 50%;
    width: min(460px, 92vw);
    max-height: 80dvh;
    border-radius: 18px;
    border: 1px solid var(--line);
    transform: translate(-50%, -46%);
    opacity: 0;
    transition: opacity .2s, transform .2s;
  }

  .sheet.open { transform: translate(-50%, -50%); opacity: 1; }
  .sheet::before { display: none; }
}

/* ---------- Topbar-Zeile mit Kartenknopf ---------- */

.topbar-row { display: flex; gap: 8px; align-items: center; }
.topbar-row .search { flex: 1; min-width: 0; }

.map-btn {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

/* ---------- Karten-Thumbnail in der Liste ---------- */

.card { grid-template-columns: auto 1fr auto; }
.card:not(:has(.card-thumb)) { grid-template-columns: 1fr auto; }

.card-thumb {
  width: 44px;
  height: 56px;
  object-fit: cover;
  border-radius: 7px;
  background: var(--surface-3);
  flex: 0 0 auto;
}

.tag-count { background: rgba(201, 162, 39, .12); color: var(--gold-soft); }

/* ---------- Foto im Detail ---------- */

.photo {
  position: relative;
  margin: 0 0 16px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: var(--surface-2);
}

.photo img { display: block; width: 100%; max-height: 46dvh; object-fit: contain; }

.photo-del {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .62);
  color: #eab8b0;
  backdrop-filter: blur(6px);
}

.photo-del svg { width: 18px; height: 18px; }

/* ---------- Abschnitte & Verkostungen ---------- */

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 26px 0 12px;
}

.section-head h3 {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 600;
  margin: 0;
}

.btn.sm { height: 36px; padding: 0 13px; font-size: 13px; }
.btn.sm svg { width: 15px; height: 15px; margin-right: 5px; vertical-align: -2px; }

.btn.icon-only {
  width: 46px;
  padding: 0;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.btn.icon-only svg { width: 19px; height: 19px; }

.iconbtn.sm { width: 34px; height: 34px; }
.iconbtn.sm svg { width: 17px; height: 17px; }

.tastings { display: flex; flex-direction: column; gap: 12px; }

.tasting {
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
}

.tasting-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.tasting-head > div:first-child { flex: 1; min-width: 0; }

.tasting-date {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
}

.tasting-place {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
}

.tasting-place svg { width: 13px; height: 13px; flex: 0 0 auto; }

.score.score-sm { width: 42px; height: 42px; }
.score.score-sm b { font-size: 17px; }

.tn + .tn { margin-top: 9px; }

.tn h4 {
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 2px;
}

.tn p {
  margin: 0;
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.62;
  white-space: pre-wrap;
}

.tasting-empty { margin: 0; color: var(--muted); font-size: 14px; }

.empty.sm { padding: 22px 16px; text-align: left; }
.empty.sm p { margin: 0; font-size: 14px; }

.hint {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
}

/* ---------- Ortseingabe ---------- */

.place-row { display: flex; gap: 8px; }
.place-row input { flex: 1; min-width: 0; }

.place-status {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 6px;
}

.place-status svg { width: 13px; height: 13px; color: var(--gold); }

.linkbtn {
  color: var(--gold-soft);
  text-decoration: underline;
  font-size: 12.5px;
  padding: 0;
}

.place-results {
  margin-top: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-2);
  overflow: hidden;
}

.place-hint { padding: 11px 13px; font-size: 13px; color: var(--muted); }

.place-hit {
  display: block;
  width: 100%;
  padding: 10px 13px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
}

.place-hit:last-child { border-bottom: none; }
.place-hit:active { background: var(--surface-3); }
.place-hit b { display: block; font-size: 14px; font-weight: 600; }

.place-hit span {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Karte ---------- */

.segmented {
  display: flex;
  padding: 3px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.segmented button {
  padding: 7px 15px;
  border-radius: 99px;
  font-size: 13px;
  color: var(--text-2);
  white-space: nowrap;
}

.segmented button.on {
  background: linear-gradient(160deg, var(--gold-soft), var(--gold));
  color: #191305;
  font-weight: 600;
}

.map-canvas {
  height: min(66dvh, 560px);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.map-legend {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--muted);
}

.pin {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-body);
  border: 2px solid rgba(0, 0, 0, .45);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .45);
}

.pin-distillery { background: linear-gradient(160deg, var(--gold-soft), var(--gold)); color: #191305; }
.pin-tasting { background: linear-gradient(160deg, #d99a68, var(--copper)); color: #1a0e06; }

/* Leaflet-Popups an die dunkle Oberfläche anpassen */
.leaflet-container { background: #10100f; font-family: var(--font-body); }
.leaflet-popup-content-wrapper,
.leaflet-popup-tip { background: var(--surface-3); color: var(--text); box-shadow: var(--shadow); }
.leaflet-popup-content-wrapper { border-radius: var(--radius-sm); border: 1px solid var(--line); }
.leaflet-popup-content { margin: 12px 14px; }
.leaflet-container a.leaflet-popup-close-button { color: var(--muted); }
.leaflet-control-attribution { background: rgba(0, 0, 0, .6) !important; color: var(--muted); }
.leaflet-control-attribution a { color: var(--text-2); }
.leaflet-bar a { background: var(--surface-3); color: var(--text); border-color: var(--line); }
.leaflet-bar a:hover { background: var(--surface-2); }

.pop h4 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  margin: 0 0 2px;
}

.pop-sub { font-size: 11.5px; color: var(--muted); margin-bottom: 6px; }
.pop-note { margin: 0 0 8px; font-size: 12.5px; color: var(--text-2); }

.pop-stats {
  display: flex;
  gap: 10px;
  font-size: 11px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--gold);
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
}

.pop-list { list-style: none; margin: 7px 0 0; padding: 0; }

.pop-list li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 3px 0;
  font-size: 13px;
}

.pop-list a { color: var(--text) !important; text-decoration: none; flex: 1; min-width: 0; }
.pop-list a:hover { color: var(--gold-soft) !important; }
.pop-date { font-size: 11px; color: var(--muted); }
.pop-list b { color: var(--gold-soft); font-variant-numeric: tabular-nums; }
.pop-more { font-size: 11.5px; color: var(--muted); margin-top: 6px; }

.pop-btn {
  margin-top: 9px;
  width: 100%;
  padding: 8px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--gold-soft);
  font-size: 12.5px;
}

@media (min-width: 940px) {
  .topbar-row { grid-row: 1; grid-column: 2; }
  .map-canvas { height: min(72dvh, 680px); }
}

/* ---------- Direkt bearbeitbare Felder ---------- */

/* Sieht aus wie Text, verhält sich wie ein Eingabefeld. Die Andeutung ist
   bewusst leise: eine feine gepunktete Linie, die erst bei Berührung Farbe
   annimmt. Es gibt keinen Bearbeiten-Modus. */
.ed {
  font: inherit;
  color: inherit;
  text-align: left;
  padding: 1px 3px;
  margin: -1px -3px;
  border-radius: 5px;
  border-bottom: 1px dotted var(--line);
  max-width: 100%;
  transition: background .14s, border-color .14s, color .14s;
}

.ed:hover,
.ed:focus-visible {
  background: var(--surface-2);
  border-bottom-color: var(--gold-dim);
  outline: none;
}

.ed-empty { color: var(--muted); font-style: italic; }
.ed-empty:hover { color: var(--text-2); }

.ed-title {
  display: block;
  width: 100%;
  font-family: var(--font-display);
  font-size: inherit;
  font-weight: 600;
  line-height: 1.12;
  border-bottom-color: transparent;
}

.ed-title:hover { border-bottom-color: var(--gold-dim); }

.ed-sub {
  font-size: 12.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ed-block {
  display: block;
  width: 100%;
  margin: 0;
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.62;
  white-space: pre-wrap;
}

.ed-block:hover { background: var(--surface-2); border-color: var(--line-soft); }

.ed-date {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  border-bottom-color: transparent;
}

.ed-date:hover { border-bottom-color: var(--gold-dim); }

/* Der Tag bringt seine eigene Kontur mit, deshalb keine zweite Linie */
.ed-tag { border-bottom: none; padding: 3px 9px; margin: 0; }
.ed-tag:hover { background: var(--surface-3); }

/* Die Bewertung im Verkostungskopf ist selbst das Medaillon */
.ed-score {
  border-bottom: none;
  padding: 0;
  margin: 0;
  flex: 0 0 auto;
}

.ed-score:hover { background: var(--surface-3); }

/* In der Faktentabelle macht die Zelle selbst die Bearbeitbarkeit deutlich,
   eine Linie pro Wert wäre zu viel Rauschen. */
.facts dd .ed {
  display: block;
  width: 100%;
  border-bottom-color: transparent;
}

.fact:hover .ed { border-bottom-color: var(--line); }
.facts dd .ed:hover { border-bottom-color: var(--gold-dim); }

/* Muss die runde Form des Medaillons behalten */
.ed-score { border-radius: 50%; }

/* Das eingeblendete Eingabefeld übernimmt die Maße der Anzeige, damit beim
   Umschalten nichts springt. */
.ed-input {
  font: inherit;
  color: var(--text);
  width: 100%;
  padding: 6px 9px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gold-dim);
  background: var(--surface-3);
  outline: none;
}

.ed-input-title {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
}

.ed-input-area {
  resize: none;
  overflow: hidden;
  line-height: 1.62;
  font-size: 15px;
}

.iconbtn.xs { width: 26px; height: 26px; border-radius: 7px; }
.iconbtn.xs svg { width: 14px; height: 14px; }
.iconbtn.xs.on { color: var(--gold); }

.tasting-when { flex: 1; min-width: 0; }

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
