/* Öffentlicher Hafen- und Schiffsführer auf weiffenbach.com – Glas-Design wie der private Bereich (hell nach Systemeinstellung) */
:root {
  color-scheme: dark;
  --page: #0a0a0a;
  --glass: rgba(255, 255, 255, .05);
  --glass-border: rgba(255, 255, 255, .1);
  --surface-solid: #161616;
  --ink: #f2f2f2;
  --ink-2: rgba(255, 255, 255, .64);
  --muted: rgba(255, 255, 255, .42);
  --accent: #7fb2ec;
  --chip: rgba(255, 255, 255, .08);
  --line: rgba(255, 255, 255, .15);
  --land: #1c1f23;
  --land-line: #353b43;
  --ocean: #0c141d;
  --veil: linear-gradient(180deg, rgba(10, 10, 10, .55) 0%, rgba(10, 10, 10, .84) 45%, rgba(10, 10, 10, .93) 100%);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --page: #eef1f4;
    --glass: rgba(255, 255, 255, .6);
    --glass-border: rgba(255, 255, 255, .8);
    --surface-solid: #ffffff;
    --ink: #0b0b0b;
    --ink-2: #4a4a48;
    --muted: #6f6d68;
    --accent: #1f6fc9;
    --chip: rgba(11, 29, 48, .06);
    --line: rgba(11, 11, 11, .12);
    --land: #f7f6f2;
    --land-line: #cfd4d9;
    --ocean: #dfe8f1;
    --veil: linear-gradient(180deg, rgba(246, 248, 250, .4) 0%, rgba(246, 248, 250, .8) 40%, rgba(246, 248, 250, .92) 100%);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--page); color: var(--ink); font: 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: var(--veil), radial-gradient(90% 60% at 20% 0%, rgba(127, 178, 236, .35) 0%, transparent 60%), radial-gradient(120% 80% at 50% 0%, #1c4570 0%, #0e2742 45%, #07131f 100%);
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
[hidden] { display: none !important; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

/* Kopf */
.top-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--chip); font-size: 20px; }
.brand-title { display: block; font-size: 15px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.brand-sub { display: block; font-size: 13px; color: var(--ink-2); }
.top-nav { display: flex; gap: 8px; flex-wrap: wrap; }
.top-nav a { text-decoration: none; font-size: 14px; padding: 7px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--chip); }
.top-nav a:hover { background: var(--glass); }

/* Kopfbereich je Seite */
.hero { padding: 36px 0 24px; }
.kicker { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2); }
.hero h1 { font-size: clamp(32px, 6vw, 56px); font-weight: 600; line-height: 1.1; margin-top: 8px; letter-spacing: -.01em; }
.lead { margin-top: 12px; font-size: 18px; color: var(--ink-2); max-width: 720px; }
.crumbs { padding-top: 8px; font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--ink-2); text-decoration: none; }

/* Glaskarten */
.card {
  display: block; background: var(--glass); border: 1px solid var(--glass-border); border-radius: 16px; padding: 20px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); margin-bottom: 16px; text-decoration: none; min-width: 0;
}
.card h2 { font-size: 14px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; }
.card h2.sub { margin-top: 18px; }
a.card:hover { border-color: var(--line); background: var(--chip); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-2 > .card { margin-bottom: 0; }
.grid-2 + .card, .grid-2 + section { margin-top: 16px; }
@media (max-width: 820px) { .grid-2 { grid-template-columns: 1fr; } }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-top: 24px; }
.kpi { margin: 0; padding: 16px 18px; }
.kpi b { display: block; font-size: 32px; font-weight: 600; line-height: 1.1; }
.kpi span { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
@media (max-width: 640px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

#map { height: min(60vh, 540px); min-height: 340px; border-radius: 12px; background: var(--ocean); border: 1px solid var(--glass-border); }
.leaflet-container { font: inherit; background: var(--ocean); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface-solid); color: var(--ink); }
.leaflet-popup-content a { font-weight: 600; }
.leaflet-bar a { background: var(--surface-solid); color: var(--ink); }
.leaflet-control-attribution { background: transparent !important; color: var(--muted); }

/* Hafen- und Schiffskarten */
.continent { margin-bottom: 28px; }
.continent > h2 { font-size: 14px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 12px; }
.continent > h2 small { color: var(--muted); font-weight: 400; margin-left: 6px; }
.port-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.port-card { margin: 0; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.pc-name { font-weight: 600; font-size: 16px; }
.pc-country { font-size: 13px; color: var(--ink-2); }
.pc-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; font-size: 12px; color: var(--muted); }
.badge { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 999px; background: var(--chip); color: var(--ink); }
.ship-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.ship-card { margin: 0; padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.ship-card img, .ship-ph { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: grid; place-items: center; font-size: 40px; background: var(--chip); }
.sc-body { padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 2px; }
.sc-name { font-weight: 600; }
.sc-meta { font-size: 13px; color: var(--ink-2); }
.stars { color: #f0b429; letter-spacing: 2px; }
.verdict .stars { font-size: 22px; }
.ship-photo { padding: 0; overflow: hidden; }
.ship-photo img { display: block; width: 100%; max-height: 520px; object-fit: cover; }
.ship-photo figcaption { font-size: 12px; color: var(--muted); padding: 8px 14px; }
.ship-photo { margin: 0 0 16px; }

/* Fakten, Einträge, Links */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 16px; margin: 0; }
.facts dt { font-size: 12px; color: var(--ink-2); }
.facts dd { margin: 2px 0 0; font-weight: 600; }
.links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.links a { color: var(--accent); text-decoration: none; }
.links a:hover { text-decoration: underline; }
.muted { color: var(--muted); font-size: 14px; }
.entries { display: grid; gap: 12px; }
.entry { padding: 14px 16px; border-radius: 12px; background: var(--chip); }
.entry h3 { font-size: 17px; margin: 2px 0 4px; }
.entry p { color: var(--ink-2); margin-top: 4px; }
.entry-meta { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted) !important; margin: 0 !important; }
.tip { padding: 8px 12px; border-radius: 10px; background: var(--glass); color: var(--ink) !important; }
.tip b { margin-right: 4px; }
.tips { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.tip-card { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 12px; background: var(--chip); text-decoration: none; }
.tip-card:hover { background: var(--glass); }
.tc-title { color: var(--ink-2); font-size: 14px; }
.prose p + p { margin-top: 12px; }
.search { margin-top: 20px; width: min(420px, 100%); padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--chip); color: var(--ink); font: inherit; }
.search:focus { outline: none; box-shadow: 0 0 0 2px var(--line); }

.foot { padding-top: 24px; padding-bottom: 40px; font-size: 13px; color: var(--muted); }
.foot p + p { margin-top: 6px; }
.foot a { color: var(--ink-2); }

/* Hafenseite: Klima, Karte, Häfen in der Nähe */
.climate { display: grid; gap: 2px; overflow-x: auto; font-variant-numeric: tabular-nums; }
.cl-row { display: grid; grid-template-columns: minmax(118px, 1.6fr) repeat(12, minmax(38px, 1fr)); gap: 2px; min-width: 620px; }
.cl-row > span { padding: 6px 4px; text-align: center; border-radius: 6px; background: var(--chip); font-size: 14px; }
.cl-row > span:first-child { text-align: left; background: none; color: var(--ink-2); font-size: 13px; padding-left: 0; }
.cl-head > span { background: none; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.cl-hi { font-weight: 600; }
.cl-note { margin-top: 10px; font-size: 12px; }
#map.map-small { height: 320px; min-height: 260px; }
.near { display: grid; gap: 8px; margin-bottom: 10px; }
.near-item { display: flex; flex-direction: column; padding: 10px 14px; border-radius: 12px; background: var(--chip); text-decoration: none; }
.near-item:hover { background: var(--glass); }
.leaflet-tooltip { background: var(--surface-solid); color: var(--ink); border: 1px solid var(--line); font-weight: 600; }
.leaflet-tooltip-top::before { border-top-color: var(--surface-solid); }
.sights { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.sight { display: flex; flex-direction: column; padding: 10px 14px; border-radius: 12px; background: var(--chip); text-decoration: none; }
.sight:hover { background: var(--glass); }

/* Filterzeile (Suche + Monat, Schiffsauswahl) */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.filters .search { margin-top: 0; }
select.search { width: auto; min-width: min(260px, 100%); appearance: auto; cursor: pointer; }

/* Reisezeit je Monat (aus dem Klima berechnet) */
.rz { display: inline-block; border-radius: 6px; font-size: 12px; font-weight: 600; padding: 2px 6px; }
.cl-rz > .rz { padding: 6px 2px; font-size: 12px; }
.rz-kalt { background: rgba(120, 140, 170, .35); }
.rz-kuehl { background: rgba(110, 170, 230, .32); }
.rz-gut { background: rgba(60, 180, 110, .40); }
.rz-warm { background: rgba(240, 180, 40, .40); }
.rz-heiss { background: rgba(235, 90, 60, .42); }
.rz-nass { background: rgba(130, 110, 200, .38); }
.rz-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; font-size: 12px; color: var(--ink-2); margin-top: 12px; }
.rz-legend .rz { margin-right: 4px; }

/* Schiffsvergleich */
.cmp-card { overflow-x: auto; }
.cmp { width: 100%; border-collapse: collapse; min-width: 480px; }
.cmp th, .cmp td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.cmp thead th { border-bottom: 0; }
.cmp thead a { display: flex; flex-direction: column; gap: 8px; text-decoration: none; }
.cmp thead img, .cmp thead .ship-ph { width: 100%; max-width: 320px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; }
.cmp tbody th { font-weight: 400; color: var(--ink-2); font-size: 14px; width: 28%; }
.cmp td.win { font-weight: 700; }

/* Hafenfoto */
.port-photo img { max-height: 460px; }
.print-btn { font: inherit; font-size: 14px; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--chip); color: var(--ink); cursor: pointer; }
.print-btn:hover { background: var(--glass); }

/* Druckansicht „Landgang-Spickzettel“: schwarz auf weiß, ohne Navigation und Effekte, kompakt */
@media print {
  :root { --ink: #000; --ink-2: #333; --muted: #555; --chip: #f2f2f2; --glass: #fff; --glass-border: #ccc; --line: #ccc; --accent: #000; --ocean: #e8eef4; --land: #fff; --land-line: #999; }
  @page { margin: 12mm; }
  body { background: #fff !important; color: #000; font-size: 11pt; }
  body::before, .top-bar, .top-nav, .crumbs, .no-print, .foot p:first-child, .search, .filters, .leaflet-control-container { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .hero { padding: 0 0 8px; }
  .hero h1 { font-size: 24pt; }
  .lead { font-size: 11pt; }
  .card { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; box-shadow: none; border: 1px solid #ccc; padding: 10px 12px; margin-bottom: 8px; break-inside: avoid; }
  .grid-2 { grid-template-columns: 1fr 1fr; gap: 8px; }
  .card h2 { font-size: 10pt; margin-bottom: 6px; }
  .port-photo img { max-height: 55mm; }
  .sights { grid-template-columns: 1fr 1fr; gap: 4px; }
  .sight, .near-item, .entry { padding: 4px 8px; }
  .climate { overflow: visible; }
  .cl-row { min-width: 0; }
  .cl-row > span { padding: 2px; font-size: 8.5pt; }
  #map.map-small { height: 60mm; min-height: 0; }
  a { color: #000; text-decoration: none; }
  .links a::after { content: ""; }
  .foot { padding: 6px 0 0; font-size: 8pt; }
}
.find-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.find-list .badge { margin-left: 6px; font-weight: 400; vertical-align: 2px; }
