:root {
  color-scheme: light;
  --cream: #fff7eb;
  --paper: #fffdf8;
  --green: #2f6a3a;
  --green-dark: #214f2b;
  --mint: #dcebdc;
  --brown: #7a5b42;
  --ink: #243128;
  --muted: #68736b;
  --line: #e8dfd2;
  --shadow: 0 18px 46px rgba(58, 44, 31, .14);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--cream); color: var(--ink); }
body { min-height: 100dvh; }
button, input, select { font: inherit; }
button { cursor: pointer; }

.app-header {
  height: 76px;
  padding: max(10px, env(safe-area-inset-top)) clamp(16px, 3vw, 36px) 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  background: rgba(255, 247, 235, .92);
  border-bottom: 1px solid rgba(122, 91, 66, .12);
  backdrop-filter: blur(14px);
}

.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand img { width: 48px; height: 54px; object-fit: contain; }
.brand span { display: grid; }
.brand strong { color: var(--green); font-size: 18px; letter-spacing: -.02em; }
.brand small { color: var(--muted); font-size: 11px; }
.header-actions { display: flex; align-items: center; gap: 8px; }

main { padding-top: 76px; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(360px, .75fr); }
.map-section { position: relative; min-height: calc(100dvh - 76px); }
#map { position: absolute; inset: 0; background: #e9e3d7; }
.map-actions { position: absolute; right: 18px; bottom: 28px; z-index: 500; display: flex; align-items: center; gap: 10px; }
.round-button { width: 48px; height: 48px; border: 0; border-radius: 16px; color: white; background: var(--green); box-shadow: var(--shadow); font-size: 25px; }
.speed-display { min-width: 68px; padding: 7px 10px 6px; border: 1px solid rgba(255,255,255,.7); border-radius: 14px; background: rgba(28,35,31,.88); color: #fff; box-shadow: var(--shadow); text-align: center; backdrop-filter: blur(10px); }
.speed-display[hidden] { display: none; }
.speed-display strong { display: block; font-size: 21px; line-height: 1; font-variant-numeric: tabular-nums; }
.speed-display span { display: block; margin-top: 2px; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.charging-toggle { background: rgba(255,253,248,.96); color: #5d7469; border-color: rgba(70,94,83,.2); transition: transform .18s ease, background .18s ease, box-shadow .18s ease; }
.charging-toggle.is-active { background: #526d60; color: #fff; box-shadow: 0 3px 12px rgba(40,65,53,.24); }
.charging-toggle.is-loading span { display: inline-block; animation: charging-button-pulse .8s ease-in-out infinite alternate; }
.charging-station-marker { display: grid; place-items: center; box-sizing: border-box; border: 1px solid rgba(255,255,255,.9); border-radius: 50%; background: rgba(82,109,96,.76); color: rgba(255,255,255,.96); box-shadow: 0 1px 4px rgba(30,48,40,.2); font-size: 12px; font-weight: 800; opacity: .82; transition: opacity .15s ease, transform .15s ease; }
.charging-station-marker:hover { opacity: 1; transform: scale(1.12); }
.charging-station-marker span { transform: translateY(-.5px); }
.charging-popup-operator, .charging-popup-details, .charging-source { display: block; }
.charging-popup-operator { margin-top: 3px; color: var(--muted); }
.charging-popup-details { margin-top: 8px; font-weight: 800; color: #125f9d; }
.charging-source { margin-top: 9px; color: var(--muted); }
@keyframes charging-button-pulse { from { opacity: .35; transform: scale(.85); } to { opacity: 1; transform: scale(1.08); } }
.map-status { position: absolute; left: 50%; top: 18px; z-index: 500; transform: translateX(-50%); background: rgba(255,253,248,.92); border: 1px solid var(--line); border-radius: 999px; padding: 8px 13px; font-size: 12px; box-shadow: 0 5px 18px rgba(50,43,34,.1); }

.content-panel { max-height: calc(100dvh - 76px); overflow: auto; padding: clamp(26px, 4vw, 50px) clamp(20px, 3.2vw, 46px); background: var(--paper); border-left: 1px solid var(--line); }
.intro h1 { margin: 4px 0 12px; max-width: 12ch; font-family: Georgia, "Times New Roman", serif; font-size: clamp(32px, 3.4vw, 50px); line-height: .98; letter-spacing: -.035em; color: var(--green-dark); }
.intro > p:last-child { max-width: 45ch; line-height: 1.55; color: var(--muted); }
.eyebrow { margin: 0; color: var(--brown); font-size: 11px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }

.search-field { margin: 24px 0 20px; height: 48px; display: flex; align-items: center; gap: 9px; padding: 0 14px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.search-field:focus-within { outline: 3px solid rgba(47, 106, 58, .16); border-color: var(--green); }
.search-field input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; }
.list-heading { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; color: var(--muted); font-size: 12px; }
.list-heading strong { color: var(--ink); font-size: 14px; }

.venue-list { display: grid; gap: 6px; }
.venue-card { display: flex; min-height: 74px; align-items: stretch; background: white; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; }
.venue-card:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(70, 52, 36, .09); }
.venue-main { min-width: 0; flex: 1; display: flex; align-items: center; gap: 10px; text-align: left; padding: 9px 12px; border: 0; background: transparent; color: inherit; }
.venue-pin { color: var(--green); font-size: 13px; }
.venue-copy { min-width: 0; display: grid; gap: 1px; }
.venue-copy strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.venue-copy small { color: var(--muted); font-size: 11px; line-height: 1.25; }
.venue-personal-meta { display: block; font-size: 12px; font-weight: 800; line-height: 1.25; color: var(--brown); }
.venue-personal-meta[hidden] { display: none !important; }
.venue-personal-meta.is-own-rating { color: #9a6816; }
.venue-personal-meta.is-recommendation { color: var(--green); }
.venue-personal-meta.is-nearby-unrated { color: #6f655f; }
.venue-card.has-own-rating { border-color: rgba(190, 132, 35, .55); }
.venue-card.has-recommendation { border-color: rgba(47, 106, 58, .34); }
.venue-card-actions { display: flex; align-items: stretch; border-left: 1px solid var(--line); }
.landing-button, .copy-link-button, .rate-button, .staff-edit-button { border: 0; border-left: 1px solid var(--line); padding: 0 13px; background: #fffaf3; color: var(--brown); font-size: 14px; font-weight: 850; cursor: pointer; }
.staff-edit-button { color: var(--green-dark); background: #f2f8f0; }
.staff-edit-button[hidden] { display: none; }
.venue-card-actions > :first-child { border-left: 0; }
.landing-button:hover, .copy-link-button:hover { background: #f7eee4; }
.rate-button { background: #f7fbf6; color: var(--green); font-size: 12px; line-height: 1.15; white-space: pre-line; }

.secondary-button, .primary-button { border-radius: 12px; font-weight: 800; }
.secondary-button { padding: 9px 14px; border: 1px solid rgba(47,106,58,.28); background: transparent; color: var(--green); }
.primary-button { width: 100%; padding: 13px 18px; border: 0; background: var(--green); color: white; }
.primary-button:disabled { opacity: .55; cursor: wait; }

.dialog { width: min(92vw, 480px); border: 0; border-radius: 24px; padding: 0; color: var(--ink); background: var(--paper); box-shadow: var(--shadow); }
.dialog::backdrop { background: rgba(27, 38, 30, .56); backdrop-filter: blur(5px); }
.dialog form { position: relative; padding: 28px; }
.dialog h2 { margin: 7px 34px 22px 0; font-family: Georgia, "Times New Roman", serif; font-size: 28px; color: var(--green-dark); }
.compact-dialog p:not(.eyebrow, .form-message) { color: var(--muted); line-height: 1.5; }
.close-button { position: absolute; top: 15px; right: 17px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--cream); color: var(--ink); font-size: 24px; }
.field-label, .star-field legend { display: block; margin: 18px 0 8px; font-size: 13px; font-weight: 800; }
.dialog select, .dialog input, .dialog textarea { width: 100%; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--ink); font: inherit; }
.dialog select, .dialog input { height: 48px; }
.dialog textarea { min-height: 84px; padding-top: 11px; resize: vertical; }
.star-field { border: 0; padding: 0; margin: 0 0 18px; }
.stars { display: flex; gap: 4px; }
.stars button { flex: 1; border: 0; padding: 4px 0; background: transparent; color: #d8d3c8; font-size: 38px; line-height: 1; }
.stars button.active { color: #d59a28; }
.form-message { min-height: 20px; margin: 6px 0 10px; color: var(--brown); font-size: 13px; }
.form-message.error { color: #a4372e; }
.form-message.success { color: var(--green-dark); font-weight: 750; }
.auth-method-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--cream); }
.auth-method-tab { min-height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-weight: 800; }
.auth-method-tab.active { background: white; color: var(--green-dark); box-shadow: 0 2px 8px rgba(48, 38, 27, .1); }
.auth-text-button { display: block; margin: 8px 0 0 auto; padding: 2px 0; border: 0; background: transparent; color: var(--green); font-size: 13px; font-weight: 800; }
.auth-secondary-action { width: 100%; margin-top: 10px; }
.privacy-note { margin: 10px 0 0; text-align: center; color: var(--muted); font-size: 11px; }
.dialog-content { position: relative; padding: 28px; }
.ratings-dialog { width: min(94vw, 620px); }
.ratings-dialog h2 { margin-bottom: 8px; }
.management-dialog { width: min(95vw, 760px); }
.management-role { margin: -2px 0 18px; color: var(--muted); font-size: 13px; }
.management-add-button { margin-bottom: 12px; }
.management-search { position: static; margin-bottom: 12px; }
.management-list { display: grid; gap: 10px; max-height: min(55vh, 560px); overflow: auto; padding-right: 3px; }
.management-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.management-card.inactive { opacity: .62; background: #f5f2ed; }
.management-card > div { min-width: 0; display: grid; gap: 4px; }
.management-card strong, .management-card span, .management-card small { display: block; }
.management-card span { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.management-card .management-category { color: var(--green-dark); font-size: 12px; font-weight: 800; }
.management-card small { color: #876b4e; }
.management-card .secondary-button { flex: 0 0 auto; }
.management-checkbox { display: flex; align-items: center; gap: 9px; margin: 16px 0; font-weight: 700; }
.management-checkbox input { width: 20px; height: 20px; }
.map-add-venue { color: var(--green-dark); font-size: 24px; font-weight: 700; }
.map-add-venue.active { color: white; background: var(--green); box-shadow: 0 0 0 4px rgba(47, 106, 58, .2); }
#map.quick-add-active, #map.quick-add-active .leaflet-interactive { cursor: crosshair; }
.quick-venue-dialog { width: min(94vw, 480px); }
.quick-venue-coordinates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; }
.quick-venue-coordinates span { display: grid; gap: 3px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); font-size: 11px; }
.quick-venue-coordinates strong { color: var(--ink); font-size: 13px; overflow-wrap: anywhere; }
.venue-edit-dialog { width: min(96vw, 820px); max-height: 94dvh; overflow-y: auto; }
.venue-edit-dialog form { padding: 26px; }
.venue-edit-dialog h2 { margin-bottom: 12px; }
.venue-edit-section { margin-top: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.venue-edit-section h3 { margin: 0 0 2px; color: var(--green-dark); font-size: 14px; }
.venue-edit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.venue-edit-field { min-width: 0; display: block; }
.venue-edit-field > span { display: block; margin: 13px 0 7px; color: var(--ink); font-size: 12px; font-weight: 800; }
.venue-edit-field-wide { grid-column: 1 / -1; }
.venue-edit-dialog textarea { min-height: 68px; }
.venue-edit-help { margin: 10px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.venue-edit-link { display: inline-block; margin-top: 11px; color: var(--green); font-size: 12px; font-weight: 800; }
.venue-source-details { margin: 14px 0; padding: 13px 15px; border: 1px dashed var(--line); border-radius: 14px; background: #faf8f3; }
.venue-source-details summary { cursor: pointer; color: var(--brown); font-size: 12px; font-weight: 800; }
.venue-source-details dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 14px; margin: 13px 0 0; }
.venue-source-details dl div { min-width: 0; }
.venue-source-details dt { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.venue-source-details dd { margin: 3px 0 0; overflow-wrap: anywhere; font-size: 12px; }
.import-dialog { width: min(94vw, 620px); }
.dialog .embedded-form { padding: 0; }
.import-preview { margin-top: 18px; padding-top: 18px !important; border-top: 1px solid var(--line); }
.import-match { display: grid; gap: 5px; margin-bottom: 14px; padding: 13px; border-radius: 14px; font-size: 12px; }
.import-match.existing { color: #6a4d22; border: 1px solid #edd39e; background: #fff7e8; }
.import-match.new { color: var(--green-dark); border: 1px solid #cde0ca; background: #f2f8f0; }
.import-match strong, .import-match span { display: block; }
.source-note { margin: 14px 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.taste-profile { margin: 13px 0 20px; padding: 15px; border-radius: 16px; background: linear-gradient(135deg, #edf6eb, #f8f2e8); border: 1px solid #d8e8d5; }
.taste-profile strong { display: block; color: var(--green-dark); font-family: Georgia, "Times New Roman", serif; font-size: 19px; }
.taste-profile p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.profile-metrics { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.profile-metrics span { padding: 5px 8px; border-radius: 999px; color: var(--green-dark); background: rgba(255,255,255,.72); font-size: 10px; font-weight: 800; }
.recommendation-section { margin-bottom: 22px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.section-heading h3, .history-heading { margin: 0 0 10px; color: var(--green-dark); font-size: 14px; }
.section-heading span { color: var(--muted); font-size: 10px; }
.recommendation-list { display: grid; gap: 9px; }
.recommendation-card { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; padding: 14px; text-align: left; border: 1px solid #d8e8d5; border-radius: 15px; background: #f8fbf7; color: inherit; }
.recommendation-card strong { color: var(--green-dark); }
.recommendation-card .recommendation-drink { color: var(--muted); font-size: 12px; }
.recommendation-card .match-value { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--green); font-family: Georgia, "Times New Roman", serif; font-size: 22px; font-weight: 800; }
.recommendation-card small { grid-column: 1 / -1; color: var(--brown); font-size: 10px; }
.no-recommendations { margin: 0; padding: 15px; border: 1px dashed var(--line); border-radius: 15px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.history-heading { margin-top: 4px; }
.my-ratings-list { display: grid; gap: 10px; max-height: min(60vh, 560px); overflow: auto; padding: 4px 2px 2px; }
.my-rating-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 14px; padding: 15px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.my-rating-card strong { color: var(--green-dark); }
.my-rating-card .drink-name { color: var(--muted); font-size: 13px; }
.my-rating-card .rating-stars { grid-row: 1 / span 2; grid-column: 2; color: #d59a28; white-space: nowrap; letter-spacing: 1px; }
.my-rating-card time { grid-column: 1 / -1; color: var(--muted); font-size: 11px; }
.empty-ratings { padding: 25px; border: 1px dashed var(--line); border-radius: 15px; text-align: center; color: var(--muted); }
.consumption-dialog { width: min(94vw, 560px); }
.consumption-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 20px; }
.consumption-summary > div { padding: 14px; text-align: center; border: 1px solid #d8e8d5; border-radius: 16px; background: #f5faf3; }
.consumption-summary strong, .consumption-summary span { display: block; }
.consumption-summary strong { color: var(--green-dark); font-family: Georgia, "Times New Roman", serif; font-size: 28px; }
.consumption-summary span { margin-top: 2px; color: var(--muted); font-size: 11px; font-weight: 800; }
.consumption-additions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 4px; }
.consumption-additions label { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; border: 1px solid var(--line); border-radius: 13px; background: white; color: var(--green-dark); font-weight: 800; cursor: pointer; }
.consumption-additions input { width: 20px; height: 20px; accent-color: var(--green); }
.consumption-history { margin-top: 24px; }
.consumption-history h3 { margin: 0 0 10px; color: var(--green-dark); font-size: 14px; }
.consumption-list { display: grid; gap: 9px; max-height: min(38vh, 360px); overflow: auto; }
.consumption-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.consumption-card strong { color: var(--green-dark); }
.consumption-card span, .consumption-card time { color: var(--muted); font-size: 11px; }
.consumption-card .consumption-detail { grid-column: 1; color: var(--brown); }
.consumption-card time { grid-column: 1; }
.consumption-card .consumption-actions { grid-column: 2; grid-row: 1 / span 3; align-self: center; display: flex; gap: 4px; }
.diary-icon-button { width: 32px; height: 32px; display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; }
.diary-icon-button:hover, .diary-icon-button:focus-visible { background: #f5eee8; color: var(--brown); }
.diary-icon-button.is-delete:hover, .diary-icon-button.is-delete:focus-visible { background: #fff0ee; color: #9d2f27; }
.diary-icon-button svg { width: 17px; height: 17px; fill: currentColor; }
.consumption-form-actions { display: flex; gap: 8px; align-items: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.coffee-buddy-map-icon { overflow: visible !important; }
.marker-wrapper { position: relative; width: var(--marker-size); height: var(--marker-size); display: flex; flex-direction: column; align-items: center; font-family: Inter, system-ui, sans-serif; transition: transform .2s ease; }
.marker-wrapper:hover { transform: scale(1.08); }
.marker-image { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 8px; background: rgba(255,247,235,.92); box-shadow: 0 3px 10px rgba(0,0,0,.25); }
.recommended-marker .marker-image { outline: 2px solid var(--green); outline-offset: 1px; box-shadow: 0 4px 14px rgba(47,106,58,.42); }
.rated-marker .marker-image { outline: 3px solid #d59a28; outline-offset: 2px; box-shadow: 0 4px 16px rgba(213,154,40,.5); }
.marker-label { position: absolute; top: calc(100% + 6px); left: 50%; z-index: 2; display: flex; flex-direction: column; align-items: center; transform: translateX(-50%); max-width: 200px; padding: 6px 8px; border-radius: 10px; background: rgba(255,247,235,.92); color: var(--green-dark); box-shadow: 0 3px 10px rgba(0,0,0,.18); backdrop-filter: blur(2px); font-size: 11px; line-height: 1.2; text-align: center; white-space: nowrap; pointer-events: none; }
.marker-label strong { overflow: hidden; max-width: 184px; text-overflow: ellipsis; }
.marker-label small { margin-top: 2px; color: var(--brown); font-size: 9px; font-weight: 700; }
.neutral-marker .marker-label { display: none; }
#map.show-neutral-labels .neutral-marker .marker-label { display: flex; }
.recommended-marker .marker-label { border: 1px solid #bcd8bd; }
.rated-marker .marker-label { border: 2px solid #d59a28; background: rgba(255,250,235,.96); }
.rated-marker .marker-label .own-rating-label { color: #9a6817; letter-spacing: .2px; }
.popup-title { display: block; max-width: 240px; color: var(--green-dark); font-weight: 800; line-height: 1.35; }
.popup-address { display: block; max-width: 240px; margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.popup-own-rating { display: block; margin: 8px 0 6px; padding: 7px 9px; border: 1px solid #e8c77e; border-radius: 9px; background: #fff8e6; color: #8a5c0f; line-height: 1.45; }
.popup-own-rating strong { color: #704907; }
.popup-recommendation { display: block; margin: 7px 0 10px; color: var(--green-dark); line-height: 1.4; }
.popup-recommendation small { color: var(--muted); }
.popup-actions { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; margin-top: 12px; }
.popup-rate { display: block; min-width: 116px; margin: 0 auto; }
.popup-edit { min-width: 116px; border: 1px solid #bfd2bf; border-radius: 9px; padding: 7px 10px; background: #f2f8f0; color: var(--green-dark); font-size: 11px; font-weight: 800; cursor: pointer; }
.popup-map-link { display: block; color: var(--green); font-size: 11px; font-weight: 700; text-align: center; text-decoration: underline; text-underline-offset: 2px; }
.leaflet-popup-content-wrapper { border-radius: 14px; }

@media (max-width: 820px) {
  .app-header { height: 68px; }
  .brand small { display: none; }
  .header-actions { gap: 5px; }
  .header-actions .secondary-button { padding: 8px 9px; font-size: 11px; }
  main { padding-top: 68px; min-height: 100dvh; display: block; }
  .map-section { min-height: 74dvh; height: 74dvh; }
  .content-panel { max-height: none; overflow: visible; border-left: 0; border-top: 1px solid var(--line); padding: 16px 14px calc(30px + env(safe-area-inset-bottom)); }
  .list-heading { margin: 0 4px 10px; }
  .venue-list { gap: 5px; }
  .venue-main { padding: 8px 10px; }
  .venue-card-actions .copy-link-button { display: none; }
  .map-search-control { right: 12px; top: 12px; }
  .map-actions { right: 12px; bottom: 18px; }
  .map-status { top: 12px; }
  .map-status { max-width: calc(100% - 100px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
/* v0.3.8 Mobile First */
.map-search-control { position: absolute; right: 18px; top: 18px; z-index: 700; display: flex; flex-direction: row-reverse; align-items: center; gap: 8px; }
.search-toggle { background: var(--paper); color: var(--green); border: 1px solid var(--line); font-size: 24px; }
.map-search-field { width: min(360px, calc(100vw - 36px)); height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 7px 0 15px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,253,248,.97); box-shadow: var(--shadow); backdrop-filter: blur(12px); }
.map-search-field[hidden] { display: none; }
.map-search-field input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); }
.map-search-field button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--cream); color: var(--ink); font-size: 21px; }


/* v0.3.10 Live Location */
#locate-button { position: relative; transition: transform .18s ease, background .18s ease, box-shadow .18s ease; }
#locate-button.is-following { background: #2b74c8; box-shadow: 0 0 0 5px rgba(43,116,200,.18), var(--shadow); }
#locate-button.is-following::after { content: ""; position: absolute; inset: -7px; border: 2px solid rgba(43,116,200,.45); border-radius: 21px; animation: coffee-buddy-location-pulse 1.8s ease-out infinite; pointer-events: none; }
.buddy-live-location-icon { background: transparent; border: 0; }
.buddy-live-location-icon img { display: block; width: 80px; height: 80px; object-fit: contain; user-select: none; pointer-events: none; transform-origin: 50% 50%; transition: transform .45s ease-out; filter: drop-shadow(0 3px 6px rgba(56,37,22,.35)); }
.coffee-buddy-compass-control { clear: none !important; margin-left: 6px !important; margin-bottom: 10px !important; }
.coffee-buddy-compass-control[hidden] { display: none !important; }
.coffee-buddy-compass-button { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 7px; background: rgba(255,255,255,.96); color: var(--ink); box-shadow: 0 1px 5px rgba(0,0,0,.35); cursor: pointer; }
.coffee-buddy-compass-button:hover, .coffee-buddy-compass-button:focus-visible { background: #f4f4f4; }
.coffee-buddy-compass-needle { position: relative; width: 22px; height: 22px; display: block; transition: transform .18s linear; }
.coffee-buddy-compass-needle b { position: absolute; top: -2px; left: 50%; transform: translateX(-50%); color: #b52d27; font-size: 10px; line-height: 1; }
.coffee-buddy-compass-needle i { position: absolute; left: 50%; top: 7px; width: 0; height: 0; transform: translateX(-50%); border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 12px solid #b52d27; }
.buddy-trail-icon { background: transparent; border: 0; pointer-events: none; }
.buddy-trail-icon span { display: block; width: 100%; height: 100%; line-height: 1; text-align: center; user-select: none; pointer-events: none; transform-origin: 50% 50%; }
.buddy-trail-paw span { color: #6f492d; font-size: 17px; opacity: .76; filter: grayscale(1) sepia(.72) saturate(1.5) drop-shadow(0 1px 1px rgba(255,255,255,.7)); }
.buddy-trail-poop span { font-size: 23px; filter: drop-shadow(0 1px 2px rgba(56,37,22,.35)); }
@keyframes coffee-buddy-location-pulse { 0% { transform: scale(.8); opacity: .8; } 100% { transform: scale(1.35); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #locate-button.is-following::after { animation: none; } .buddy-live-location-icon img, .coffee-buddy-compass-needle { transition: none; } }


/* v0.3.10.8 Native Map UI – Phase 1 */
.app-header {
  height: auto;
  min-height: 0;
  padding: 0;
  position: fixed;
  inset: 0;
  z-index: 900;
  background: transparent;
  border: 0;
  backdrop-filter: none;
  pointer-events: none;
}
.app-header .brand { display: none; }
.header-actions {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  display: flex;
  justify-content: flex-end;
  max-width: calc(100vw - 120px);
  gap: 6px;
  pointer-events: auto;
}
.header-actions .secondary-button {
  min-height: 42px;
  padding: 8px 11px;
  border-color: rgba(47,106,58,.2);
  background: rgba(255,253,248,.91);
  box-shadow: 0 5px 18px rgba(50,43,34,.12);
  backdrop-filter: blur(12px);
}
main { padding-top: 0; min-height: 100dvh; }
.map-section { min-height: 100dvh; }
.content-panel { max-height: 100dvh; }
.map-search-control {
  top: calc(66px + env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
}
.map-status { top: calc(70px + env(safe-area-inset-top)); }
@media (max-width: 820px) {
  .app-header { height: auto; }
  main { padding-top: 0; min-height: 100dvh; }
  .map-section { min-height: 82dvh; height: 82dvh; }
  .content-panel { max-height: none; }
  .header-actions {
    top: calc(9px + env(safe-area-inset-top));
    right: max(9px, env(safe-area-inset-right));
    max-width: calc(100vw - 100px);
  }
  .header-actions .secondary-button { min-height: 40px; padding: 7px 9px; font-size: 11px; }
  .map-search-control { top: calc(58px + env(safe-area-inset-top)); right: max(10px, env(safe-area-inset-right)); }
  .map-status { top: calc(112px + env(safe-area-inset-top)); max-width: calc(100% - 28px); }
}

/* v0.4.0 Native UI – Floating Toolbar */
.app-header { display: none !important; }
.floating-toolbar {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.toolbar-button {
  position: relative;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(47,106,58,.18);
  border-radius: 17px;
  background: rgba(255,253,248,.93);
  color: var(--green-dark);
  box-shadow: 0 8px 24px rgba(50,43,34,.15);
  backdrop-filter: blur(14px);
  font-size: 23px;
  line-height: 1;
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}
.toolbar-button:hover { transform: translateY(-1px); background: #fffdf8; box-shadow: 0 10px 28px rgba(50,43,34,.19); }
.toolbar-button:focus-visible { outline: 3px solid rgba(47,106,58,.24); outline-offset: 2px; }
.toolbar-button[hidden] { display: none !important; }
.toolbar-badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; border: 2px solid #fffaf2; border-radius: 999px; background: #b94736; color: white; font-size: 10px; font-weight: 900; line-height: 14px; text-align: center; }
.toolbar-badge[hidden] { display: none; }
.toolbar-button.is-loading span { animation: weather-spin 1s linear infinite; }
@keyframes weather-spin { to { transform: rotate(360deg); } }
.weather-toggle.is-active { background: #fff7d9; border-color: rgba(180,132,33,.35); color: #72551d; }
.weather-panel {
  position: fixed;
  top: calc(184px + env(safe-area-inset-top));
  right: calc(max(12px, env(safe-area-inset-right)) + 62px);
  z-index: 1110;
  left: 106px;
  right: auto;
  width: min(302px, calc(100vw - 180px));
  padding: 17px;
  border: 1px solid rgba(47,106,58,.18);
  border-radius: 20px;
  background: rgba(255,253,248,.98);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  color: var(--ink);
}
.weather-panel[hidden] { display: none; }
.weather-close { position: absolute; top: 8px; right: 9px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--cream); color: var(--ink); font-size: 22px; cursor: pointer; }
.weather-eyebrow { margin: 0 36px 12px 0; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.weather-content > strong { display: block; padding: 10px 0; color: var(--green-dark); }
.weather-content > p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.weather-now { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.weather-now span { font-size: 32px; }
.weather-now strong { font-size: 25px; color: var(--green-dark); }
.weather-verdict { display: flex; align-items: center; gap: 11px; padding: 12px; border-radius: 14px; background: #edf5ea; }
.weather-verdict > span { font-size: 25px; }
.weather-verdict strong, .weather-verdict small { display: block; }
.weather-verdict strong { color: var(--green-dark); font-size: 15px; }
.weather-verdict small { margin-top: 2px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.weather-covered { background: #fff5d9; }
.weather-indoor { background: #f5e8e4; }
.weather-facts { display: grid; gap: 0; margin: 12px 0 8px; }
.weather-facts div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.weather-facts dt { color: var(--muted); font-size: 12px; }
.weather-facts dd { margin: 0; text-align: right; font-size: 12px; font-weight: 800; }
.weather-note { margin: 10px 0 6px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.weather-source { color: var(--green-dark); font-size: 10px; font-weight: 700; }
.knowledge-toggle { color: #795d2f; }
.knowledge-dialog {
  width: min(760px, calc(100vw - 28px));
  height: min(820px, calc(100dvh - 28px));
  max-width: none;
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(47,106,58,.18);
  border-radius: 28px;
  background: #fffdf8;
  box-shadow: 0 28px 80px rgba(35,31,25,.32);
  color: var(--ink);
}
.knowledge-dialog::backdrop { background: rgba(35,31,25,.55); backdrop-filter: blur(5px); }
.knowledge-shell { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; }
.knowledge-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 24px 70px 12px 28px; }
.knowledge-eyebrow, .knowledge-category { margin: 0; color: var(--green); font-size: 11px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.knowledge-progress { color: var(--muted); font-size: 12px; font-weight: 800; white-space: nowrap; }
.knowledge-close { position: absolute; top: 15px; right: 16px; z-index: 1; width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--cream); color: var(--ink); font-size: 27px; cursor: pointer; }
.knowledge-content { overflow-y: auto; padding: 8px 9% 24px; overscroll-behavior: contain; }
.knowledge-icon { margin: 10px 0 14px; font-size: clamp(48px, 9vw, 76px); line-height: 1; }
.knowledge-content h2 { max-width: 650px; margin: 8px 0 16px; color: var(--green-dark); font-size: clamp(27px, 5vw, 43px); line-height: 1.08; letter-spacing: -.025em; }
.knowledge-intro { max-width: 650px; margin: 0 0 22px; color: var(--ink); font-size: clamp(16px, 2.4vw, 19px); line-height: 1.55; }
.knowledge-content ul { display: grid; gap: 12px; max-width: 650px; margin: 0; padding: 0; list-style: none; }
.knowledge-content li { position: relative; padding: 14px 16px 14px 43px; border: 1px solid var(--line); border-radius: 15px; background: #fffaf1; font-size: 14px; line-height: 1.5; }
.knowledge-content li::before { content: "✓"; position: absolute; left: 16px; top: 14px; color: var(--green); font-weight: 900; }
.knowledge-takeaway { max-width: 650px; margin-top: 20px; padding: 18px; border-radius: 17px; background: #eaf3e8; }
.knowledge-takeaway span, .knowledge-takeaway strong { display: block; }
.knowledge-takeaway span { margin-bottom: 5px; color: var(--green); font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.knowledge-takeaway strong { color: var(--green-dark); font-size: 15px; line-height: 1.45; }
.knowledge-footer { display: flex; justify-content: space-between; gap: 12px; padding: 16px 28px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255,253,248,.96); }
.knowledge-footer button { min-height: 46px; padding: 11px 17px; border-radius: 13px; font-weight: 850; cursor: pointer; }
.knowledge-secondary { border: 1px solid var(--line); background: white; color: var(--green-dark); }
.knowledge-secondary:disabled { opacity: .38; cursor: default; }
.knowledge-primary { border: 0; background: var(--green); color: white; }
.profile-status-dot {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 12px;
  height: 12px;
  border: 2px solid #fffdf8;
  border-radius: 50%;
  background: #9a9f9b;
}
.profile-button.is-authenticated .profile-status-dot { background: #35a854; }
.profile-menu {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top));
  right: calc(max(12px, env(safe-area-inset-right)) + 62px);
  z-index: 1110;
  width: min(260px, calc(100vw - 92px));
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255,253,248,.97);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}
.profile-menu[hidden] { display: none; }
.profile-menu strong, .profile-menu span { display: block; }
.profile-menu strong { color: var(--green-dark); font-size: 15px; }
.profile-menu span { margin: 4px 0 12px; overflow-wrap: anywhere; color: var(--muted); font-size: 11px; line-height: 1.4; }
.profile-menu button { width: 100%; min-height: 40px; border: 0; border-radius: 11px; background: var(--green); color: white; font-weight: 800; }
.friends-dialog { width: min(94vw, 680px); max-height: min(88dvh, 820px); }
.friends-dialog .dialog-content { overflow-y: auto; max-height: min(88dvh, 820px); }
.friends-dialog h2 { margin-bottom: 20px; }
.friends-dialog h3 { margin: 22px 0 10px; color: var(--green-dark); font-size: 16px; }
.friends-profile, .friends-invite { padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: #fffdfa; }
.friends-profile h3, .friends-invite h3 { margin-top: 0; }
.friends-inline-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.friends-inline-form input { min-width: 0; }
.friends-inline-form button { min-height: 48px; padding: 0 15px; border: 0; border-radius: 12px; font-weight: 800; }
.friends-list { display: grid; gap: 8px; }
.friend-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.friend-identity { display: flex; align-items: center; min-width: 0; gap: 10px; }
.user-avatar, .account-avatar { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; overflow: hidden; border-radius: 50%; background: #edf2e9; color: var(--green-dark); }
.user-avatar { width: 42px; height: 42px; font-size: 20px; }
.user-avatar-large { width: 82px; height: 82px; font-size: 34px; }
.user-avatar img, .account-avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-avatar { width: 32px; height: 32px; font-size: 18px; }
.avatar-stack { position: relative; flex: 0 0 auto; padding-top: 12px; }
.avatar-decoration { position: absolute; z-index: 2; top: 0; left: 50%; transform: translateX(-50%); pointer-events: none; }
.avatar-editor-row { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.avatar-editor-row p { margin: 4px 0 10px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.avatar-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.avatar-upload-label { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 0 12px; cursor: pointer; }
.text-button { border: 0; background: transparent; color: #8c3e35; font-size: 11px; font-weight: 800; }
.avatar-crop-dialog { width: min(94vw, 560px); }
.avatar-crop-dialog canvas { display: block; width: min(100%, 420px); height: auto; margin: 0 auto 16px; border-radius: 50%; background: #eee; touch-action: none; }
.avatar-crop-dialog input[type="range"] { width: 100%; margin: 2px 0 12px; }
.friend-row strong, .friend-row span { display: block; }
.friend-row strong { color: var(--green-dark); }
.friend-row span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.friend-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.friend-actions button { min-height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--green-dark); font-size: 11px; font-weight: 800; }
.friend-actions .friend-primary { border-color: var(--green); background: var(--green); color: white; }
.friends-empty { margin: 0; padding: 13px; border-radius: 13px; background: #f5f2ec; color: var(--muted); font-size: 12px; }
.friends-coming-soon { display: grid; gap: 5px; margin-top: 22px; padding: 16px; border-radius: 16px; background: linear-gradient(135deg, #edf6eb, #f8f2e8); color: var(--green-dark); }
.friends-coming-soon span { color: var(--muted); font-size: 12px; line-height: 1.45; }
.map-search-control {
  top: calc(12px + env(safe-area-inset-top));
  right: calc(max(12px, env(safe-area-inset-right)) + 62px);
  z-index: 1090;
  display: block;
}
.map-search-field { width: min(360px, calc(100vw - 92px)); }
.buddy-card { width: min(390px, calc(100% - 94px)); }
@media (max-width: 820px) {
  .floating-toolbar { top: calc(9px + env(safe-area-inset-top)); right: max(9px, env(safe-area-inset-right)); gap: 8px; }
  .toolbar-button { width: 46px; height: 46px; border-radius: 15px; font-size: 21px; }
  .weather-panel {
    top: calc(169px + env(safe-area-inset-top));
    left: 85px;
    right: calc(max(9px, env(safe-area-inset-right)) + 56px);
    width: auto;
  }
  .profile-menu { top: calc(9px + env(safe-area-inset-top)); right: calc(max(9px, env(safe-area-inset-right)) + 56px); }
  .map-search-control { top: calc(9px + env(safe-area-inset-top)); right: calc(max(9px, env(safe-area-inset-right)) + 56px); }
  .buddy-card { width: calc(100% - 68px); }
}

@media (max-width: 430px) {
  .weather-panel { left: 79px; }
  .knowledge-dialog { width: calc(100vw - 16px); height: calc(100dvh - 16px); border-radius: 24px; }
  .friends-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 24px; }
  .friends-dialog .dialog-content { max-height: calc(100dvh - 16px); padding: 22px 18px; }
  .friends-inline-form { grid-template-columns: 1fr; }
  .friend-row { align-items: flex-start; flex-direction: column; }
  .knowledge-header { padding: 20px 60px 8px 20px; }
  .knowledge-content { padding: 5px 20px 20px; }
  .knowledge-content li { padding: 12px 13px 12px 38px; }
  .knowledge-content li::before { left: 13px; top: 12px; }
  .knowledge-footer { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .knowledge-footer button { padding: 10px 12px; font-size: 12px; }
}


/* v0.4.1 iPhone edge-to-edge map */
html, body { width: 100%; min-height: 100%; background: #e9e3d7; }
body { min-height: 100svh; min-height: 100dvh; padding: 0 !important; }
main, .map-section, #map { min-height: 100svh; min-height: 100dvh; }
#map { inset: 0; }
@media (display-mode: standalone) {
  html, body, main, .map-section, #map { min-height: 100dvh; }
}


/* v0.4.2 – mehr sichtbare Empfehlungsliste auf Mobilgeräten */
@media (max-width: 820px) {
  main { min-height: 100dvh; }
  .map-section {
    height: 64dvh;
    min-height: 64dvh;
  }
  #map {
    height: 100%;
    min-height: 0;
  }
  .content-panel {
    min-height: 36dvh;
    padding-top: 14px;
  }
}

/* v0.4.3 – ruhigeres Buddy-Verhalten und vorbereitetes Bottom Sheet */
.bottom-sheet-handle {
  display: none;
}

@media (max-width: 820px) {
  .map-section {
    height: 78dvh;
    min-height: 78dvh;
  }

  .content-panel {
    position: relative;
    min-height: 22dvh;
    padding-top: 10px;
    border-top: 1px solid rgba(122, 91, 66, .14);
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -12px 34px rgba(58, 44, 31, .14);
  }

  .bottom-sheet-handle {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 18px;
    margin: -3px 0 4px;
    user-select: none;
    touch-action: none;
  }

  .bottom-sheet-handle span {
    width: 44px;
    height: 5px;
    border-radius: 999px;
    background: rgba(104, 115, 107, .42);
  }
}


/* Coffee Domain v1 – PWA Admin */
.coffee-structure { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.coffee-structure-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.coffee-structure-heading h3 { margin: 2px 0 0; }
.coffee-structure-help { margin: 8px 0 12px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.coffee-points-list { display:grid; gap:9px; max-height:240px; overflow:auto; }
.coffee-point-card { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px; border:1px solid var(--line); border-radius:14px; background:#fff; }
.coffee-point-card.inactive { opacity:.6; }
.coffee-point-card > div { display:grid; gap:4px; min-width:0; }
.coffee-point-card span { color:var(--muted); font-size:12px; overflow-wrap:anywhere; }
.coffee-service-field { margin:16px 0 6px; padding:12px 14px; border:1px solid var(--line); border-radius:14px; }
.coffee-service-field legend { padding:0 5px; font-weight:800; }
.coffee-service-field .management-checkbox { margin:8px 0; }

.pwa-admin-overview { margin: 14px 0 22px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.72); }
.pwa-admin-overview-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pwa-admin-overview-heading h3, .management-list-heading { margin: 0; }
.pwa-admin-refresh { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--green-dark); font-size: 20px; cursor: pointer; }
.pwa-admin-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 12px; }
.pwa-admin-kpis article { display: grid; gap: 5px; min-width: 0; padding: 12px; border-radius: 14px; background: #fff; }
.pwa-admin-kpis span { color: var(--muted); font-size: 12px; }
.pwa-admin-kpis strong { color: var(--green-dark); font-size: 20px; overflow-wrap: anywhere; }
.pwa-admin-progress { height: 8px; margin-top: 12px; overflow: hidden; border-radius: 999px; background: rgba(104,115,107,.16); }
.pwa-admin-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--green); transition: width .25s ease; }
.pwa-admin-quality { margin-top: 10px; color: var(--muted); font-size: 13px; }
.pwa-admin-quality summary { cursor: pointer; font-weight: 800; color: var(--green-dark); }
.pwa-admin-quality dl { display: grid; gap: 7px; margin: 10px 0 0; }
.pwa-admin-quality dl div { display: flex; justify-content: space-between; gap: 12px; }
.pwa-admin-quality dt, .pwa-admin-quality dd { margin: 0; }
.pwa-admin-quality dd { color: var(--green-dark); font-weight: 800; }

.venue-audit-dialog {
  width: min(760px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  overflow: hidden;
}
.venue-audit-dialog .dialog-content {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  max-height: calc(100dvh - 24px);
  overflow-x: hidden;
  overflow-y: auto;
}
.venue-audit-toolbar { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.venue-audit-toolbar label { font-weight: 800; }
.venue-audit-toolbar select { min-width: min(100%, 330px); }
.venue-audit-list { display: grid; gap: 12px; margin-top: 14px; }
.venue-audit-card { border: 1px solid rgba(44, 82, 65, .18); border-radius: 14px; padding: 12px; background: #fff; }
.venue-audit-card-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.venue-audit-card-heading > div { min-width: 0; display: grid; gap: 3px; }
.venue-audit-card-actions { display: flex !important; grid-auto-flow: column; grid-template-columns: none !important; align-items: center; justify-content: flex-end; gap: 8px !important; flex-wrap: wrap; min-width: min(100%, 520px) !important; }
.venue-audit-card-actions button { width: auto; white-space: nowrap; }
.venue-audit-card-actions .danger-button { width: auto; padding: 10px 14px; }
.venue-audit-card-heading span { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.venue-audit-results { display: grid; gap: 8px; margin-top: 10px; color: var(--muted); font-size: 13px; }
.venue-audit-results:empty { display: none; }
.venue-audit-match { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 9px; padding: 9px; border-radius: 10px; background: var(--cream, #fff7eb); cursor: pointer; }
.venue-audit-match span { display: grid; gap: 2px; }
.venue-audit-match small { color: var(--muted); }
.venue-audit-controls { display: grid; gap: 9px; padding-top: 4px; }
@media (max-width: 560px) {
  .venue-audit-dialog { border-radius: 18px; }
  .venue-audit-dialog .dialog-content { padding: 22px 18px; }
  .venue-audit-dialog h2 { font-size: 25px; }
  .venue-audit-toolbar { align-items: stretch; flex-direction: column; }
  .venue-audit-toolbar select,
  .venue-audit-toolbar button { width: 100%; min-width: 0; }
  .venue-audit-card-heading { align-items: stretch; flex-direction: column; }
  .venue-audit-card-actions { display: grid !important; grid-auto-flow: row; grid-template-columns: 1fr !important; min-width: 0 !important; }
  .venue-audit-card-actions button,
  .venue-audit-card-actions .danger-button { width: 100%; }
}
.admin-data-routines { display: grid; gap: 9px; margin: 16px 0; padding-top: 15px; border-top: 1px solid var(--line); }
.admin-data-routines-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.admin-data-routines-heading h4 { margin: 2px 0 0; color: var(--green-dark); }
.admin-routines-badge { padding: 6px 9px; border-radius: 999px; background: #a84235; color: #fff; font-size: 12px; white-space: nowrap; }
.admin-routines-badge.is-clear { background: var(--green); }
.admin-routine-card { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.admin-routine-card > div { display: grid; gap: 4px; }
.admin-routine-card span, .admin-routine-card small { color: var(--muted); line-height: 1.4; }
.admin-routine-card span { font-size: 13px; font-weight: 800; }
.admin-routine-card small { font-size: 11px; }
.admin-routine-card .secondary-button { width: 100%; }
.admin-routine-card.is-due { border-color: #d7a79f; background: #fff8f6; }
.admin-routine-card.is-clear { border-color: #bfd2c1; background: #f6faf6; }
.admin-routine-card.is-planned { border-style: dashed; background: #faf8f4; }
.management-list-heading { margin-bottom: 12px; }

/* 0.8.0 – kontrollierte Kandidatenpipeline */
.candidate-pipeline { margin: 0 0 22px; padding: 16px; border: 1px solid #d9cbbd; border-radius: 18px; background: #fffaf2; }
.candidate-pipeline-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.candidate-pipeline-heading h3 { margin: 2px 0 0; }
.candidate-pipeline > p { color: var(--muted); font-size: 13px; line-height: 1.45; }
.candidate-count { min-width: 42px; padding: 7px 10px; border-radius: 999px; background: var(--green-dark); color: #fff; text-align: center; }
.candidate-import-form { display: grid; gap: 9px; margin-top: 16px; padding-top: 15px; border-top: 1px solid var(--line); }
.candidate-import-form input[type="file"] { width: 100%; padding: 10px; border: 1px dashed #bca892; border-radius: 12px; background: #fff; }
.candidate-overpass-form { display: grid; gap: 10px; margin-top: 16px; padding: 14px; border: 1px solid #c8d6c9; border-radius: 15px; background: #f5f9f4; }
.candidate-overpass-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.candidate-overpass-heading > div { display: grid; gap: 2px; }
.candidate-overpass-heading strong { color: var(--green-dark); }
.candidate-overpass-heading small, .candidate-overpass-hint { color: var(--muted); font-size: 11px; line-height: 1.4; }
.candidate-overpass-heading > span { font-size: 24px; }
.candidate-overpass-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.candidate-overpass-types { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; margin: 2px 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.candidate-overpass-types legend { padding: 0 5px; color: var(--muted); font-size: 12px; font-weight: 800; }
.candidate-overpass-types label { display: flex; align-items: center; min-width: 0; min-height: 44px; gap: 10px; padding: 8px 10px; border: 1px solid #d8e2d8; border-radius: 10px; color: var(--green-dark); font-size: 13px; font-weight: 700; line-height: 1.2; cursor: pointer; }
.candidate-overpass-types label:hover { background: #f4f8f4; border-color: #b9cfba; }
.candidate-overpass-types input[type="checkbox"] { flex: 0 0 22px; width: 22px; height: 22px; min-height: 0; margin: 0; padding: 0; accent-color: var(--green); }
.candidate-overpass-types input[type="checkbox"]:checked + span { font-weight: 850; }
.candidate-overpass-types span { min-width: 0; overflow-wrap: anywhere; }
#candidate-overpass-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; }
#candidate-overpass-button.is-loading::before { content: ""; width: 14px; height: 14px; flex: 0 0 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: candidate-button-spin .75s linear infinite; }
.candidate-overpass-message { min-height: 18px; margin: -1px 0 0; }
.secondary-button:disabled, .candidate-reject-button:disabled { opacity: .55; cursor: wait; }
@keyframes candidate-button-spin { to { transform: rotate(360deg); } }
.candidate-template-link { display: inline-block; margin-top: 10px; color: var(--green-dark); font-size: 13px; font-weight: 800; }
.candidate-review-dialog { width: min(96vw, 860px); }
.candidate-review-toolbar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; margin: 14px 0; }
.candidate-review-toolbar label { color: var(--muted); font-size: 13px; font-weight: 800; }
.candidate-review-list { display: grid; gap: 14px; max-height: min(72vh, 720px); overflow: auto; padding-right: 3px; }
.candidate-empty { padding: 24px; border: 1px dashed var(--line); border-radius: 16px; color: var(--muted); text-align: center; }
.candidate-card { padding: 15px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 5px 18px rgba(74, 53, 37, .06); }
.candidate-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.candidate-card > header > div { display: grid; gap: 3px; min-width: 0; }
.candidate-card > header small { color: var(--muted); overflow-wrap: anywhere; }
.candidate-card > header > strong { color: var(--green-dark); font-size: 12px; white-space: nowrap; }
.candidate-source { width: fit-content; padding: 4px 8px; border-radius: 999px; background: #eef3ee; color: var(--green-dark); font-size: 12px; font-weight: 900; }
.candidate-form { display: grid; gap: 11px; }
.candidate-field { display: grid; gap: 5px; min-width: 0; }
.candidate-field > span { color: var(--muted); font-size: 12px; font-weight: 800; }
.candidate-field input, .candidate-field textarea, .candidate-field select { width: 100%; }
.candidate-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.candidate-grid-location { grid-template-columns: .6fr 1fr 1fr; }
.candidate-source-meta { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.candidate-source-meta a { color: var(--green-dark); font-weight: 800; }
.candidate-verification { display: grid; gap: 4px; padding: 11px 12px; border: 1px solid #cbd9cc; border-radius: 12px; background: #f4f8f4; }
.candidate-verification small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.candidate-place-id { color: #9d2f27; font-size: 12px; overflow-wrap: anywhere; }
.candidate-place-id.is-confirmed { color: var(--green-dark); }
.candidate-google-button { width: 100%; margin: 5px 0; }
.candidate-google-results { display: grid; gap: 7px; }
.candidate-google-results:empty { display: none; }
.candidate-google-match { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; min-height: 70px; gap: 11px; padding: 12px; border: 1px solid #ddd1c2; border-radius: 10px; background: #fffaf2; cursor: pointer; }
.candidate-google-match:hover { border-color: #b99f82; background: #fff7eb; }
.candidate-google-match:focus-within { outline: 3px solid rgba(47, 106, 58, .18); outline-offset: 2px; }
.candidate-google-match input[type="radio"] { display: block; flex: 0 0 26px; width: 26px; height: 26px; min-height: 0; margin: 0; padding: 0; accent-color: var(--green); cursor: pointer; }
.candidate-google-match:has(input:checked) { border-color: var(--green); background: #f1f8f0; box-shadow: inset 0 0 0 1px rgba(47, 106, 58, .16); }
.candidate-google-match span { display: grid; gap: 2px; min-width: 0; }
.candidate-google-match strong, .candidate-google-match small { overflow-wrap: anywhere; }
.candidate-google-match strong { color: var(--green-dark); font-size: 13px; }
.candidate-maps-link { width: fit-content; color: var(--green-dark); font-size: 13px; font-weight: 900; text-decoration: none; }
.candidate-maps-link:hover { text-decoration: underline; }
.candidate-actions { display: grid; grid-template-columns: 1.1fr 1fr .8fr; gap: 8px; }
.candidate-actions button { width: 100%; }
.candidate-reject-button { border: 1px solid #d9aaa5; border-radius: 12px; padding: 11px 13px; background: #fff; color: #9d2f27; font: inherit; font-weight: 800; cursor: pointer; }
.candidate-reject-button:hover { background: #fff4f2; }
.candidate-card-message { margin: 0; }

@media (max-width: 620px) {
  .candidate-review-toolbar { grid-template-columns: 1fr; }
  .candidate-grid, .candidate-grid-location { grid-template-columns: 1fr; }
  .candidate-overpass-types { grid-template-columns: 1fr; }
  .candidate-actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  #candidate-overpass-button.is-loading::before { animation: none; }
}

/* v0.7.1 – vollständiger Bewertungsfluss */
.rating-form-actions { display: grid; gap: 10px; margin-top: 12px; }
.danger-button { width: 100%; border: 1px solid #b5463c; border-radius: 12px; padding: 12px 16px; background: #fff; color: #9d2f27; font: inherit; font-weight: 800; cursor: pointer; }
.danger-button:hover { background: #fff4f2; }
.my-rating-card .rating-context { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.my-rating-card .rating-actions { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.my-rating-card .rating-actions button { border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; background: white; color: var(--green-dark); font-weight: 800; cursor: pointer; }
.my-rating-card .rating-actions .delete-inline { color: #9d2f27; border-color: #dfb4af; }

.pwa-admin-users {
  margin-top: .8rem;
  border-top: 1px solid rgba(83, 67, 46, .14);
  padding-top: .7rem;
}

.pwa-admin-users summary {
  cursor: pointer;
  font-weight: 700;
}

.admin-users-list {
  display: grid;
  gap: .55rem;
  margin-top: .65rem;
}

.admin-user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .75rem;
  padding: .7rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(83, 67, 46, .1);
}

.admin-user-row div {
  min-width: 0;
  display: grid;
  gap: .2rem;
}

.admin-user-row strong,
.admin-user-row span {
  overflow-wrap: anywhere;
}

.admin-user-row span {
  color: var(--muted);
  font-size: .78rem;
}

.admin-user-row select {
  min-width: 7.5rem;
}

@media (max-width: 520px) {
  .admin-user-row {
    grid-template-columns: 1fr;
  }

  .admin-user-row select {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .venue-edit-dialog { width: 100vw; max-width: none; max-height: 100dvh; margin: 0; border-radius: 0; }
  .venue-edit-dialog form { padding: 22px 15px calc(24px + env(safe-area-inset-bottom)); }
  .venue-edit-section { padding: 13px; }
  .venue-edit-grid, .venue-source-details dl { grid-template-columns: minmax(0, 1fr); }
  .venue-edit-field-wide { grid-column: auto; }
  .management-card { align-items: flex-start; gap: 9px; padding: 11px; }
  .management-card .secondary-button { padding: 8px 10px; }
  .quick-venue-coordinates { grid-template-columns: 1fr; }
}
