:root{
  --ink:#16324F;
  --ink-soft:#3F5A75;
  --paper:#FBF7EF;
  --paper-dim:#F1EAD9;
  --line: rgba(22,50,79,0.14);

  --c-beach:#1F8A82;      /* ruhige Strände - turquoise */
  --c-club:#D94F7C;       /* beach clubs - bougainvillea */
  --c-sunset:#DB9A34;     /* sunset - gold */
  --c-food:#C1502E;       /* restaurants - terracotta */
  --c-brunch:#8C5FA8;     /* brunch - fig */
  --c-night:#2B2140;      /* nightlife - indigo */

  --radius: 14px;
  --shadow: 0 6px 24px rgba(22,50,79,0.10);
}

*{box-sizing:border-box;}
html,body{margin:0;padding:0;height:100%;}
body{
  background:var(--paper);
  color:var(--ink);
  font-family:'Inter',sans-serif;
  -webkit-font-smoothing:antialiased;
  overflow:hidden;
}
.mono{font-family:'IBM Plex Mono',monospace;}

a{color:inherit;}

/* ---------- App shell ---------- */
#app{
  display:flex;
  flex-direction:column;
  height:100vh;
  height:100dvh;
}

header.top{
  padding:14px 16px 10px;
  background:linear-gradient(180deg, var(--paper) 0%, var(--paper) 70%, transparent 100%);
  z-index:20;
  border-bottom:1px solid var(--line);
}
.brand{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:8px;
}
.brand h1{
  font-family:'Fraunces', serif;
  font-weight:700;
  font-size:22px;
  letter-spacing:0.02em;
  margin:0;
  min-width:0;
}
.brand .dates{
  font-family:'IBM Plex Mono',monospace;
  font-size:11px;
  color:var(--ink-soft);
  text-align:right;
  line-height:1.3;
  flex-shrink:0;
  white-space:nowrap;
}

nav.tabs{
  display:flex;
  gap:6px;
  margin-top:12px;
}
nav.tabs button{
  flex:1;
  border:1px solid var(--line);
  background:transparent;
  color:var(--ink);
  font-family:'Inter',sans-serif;
  font-weight:600;
  font-size:13px;
  padding:9px 6px;
  border-radius:999px;
  cursor:pointer;
  transition:background .15s ease, color .15s ease;
}
nav.tabs button.active{
  background:var(--ink);
  color:var(--paper);
  border-color:var(--ink);
}

/* ---------- Sun-arc category filter (signature element) ---------- */
.arc-wrap{
  margin-top:12px;
  position:relative;
}
.arc-wrap.hidden{ display:none; }
.arc-label{
  font-family:'IBM Plex Mono',monospace;
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:0.08em;
  color:var(--ink-soft);
  margin-bottom:4px;
  display:flex;
  justify-content:space-between;
}
.arc{
  display:flex;
  gap:4px;
  overflow-x:auto;
  padding-bottom:4px;
  scrollbar-width:none;
}
.arc::-webkit-scrollbar{display:none;}
.chip{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:6px;
  padding:7px 12px;
  border-radius:999px;
  border:1.5px solid var(--chip-color, var(--line));
  background:#fff;
  font-size:12.5px;
  font-weight:600;
  color:var(--ink);
  cursor:pointer;
  white-space:nowrap;
  opacity:0.55;
  transition:opacity .15s ease, transform .1s ease;
}
.chip .dot{width:8px;height:8px;border-radius:50%;background:var(--chip-color);flex:0 0 auto;}
.chip.active{opacity:1; background:var(--chip-color); color:#fff; border-color:var(--chip-color);}
.chip.active .dot{background:#fff;}
.chip:active{transform:scale(0.97);}

/* ---------- Map + list view ---------- */
#view-explore{
  flex:1;
  display:none;
  flex-direction:column;
  min-height:0;
}
#view-explore.active{display:flex;}
#map{
  flex:0 0 42%;
  min-height:190px;
  position:relative;
  z-index:0;
}
.leaflet-popup-content-wrapper{border-radius:10px;font-family:'Inter',sans-serif;}

#list{
  flex:1;
  overflow-y:auto;
  padding:10px 12px 100px;
  -webkit-overflow-scrolling:touch;
}
.card{
  background:#fff;
  border:1px solid var(--line);
  border-left:4px solid var(--card-color, var(--ink));
  border-radius:var(--radius);
  padding:12px 14px;
  margin-bottom:9px;
  cursor:pointer;
  box-shadow:var(--shadow);
}
.card-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
}
.card h3{
  font-family:'Fraunces', serif;
  font-weight:600;
  font-size:16.5px;
  margin:0 0 3px;
}
.card .place{
  font-size:12px;
  color:var(--ink-soft);
}
.rating{
  font-family:'IBM Plex Mono',monospace;
  font-size:12px;
  font-weight:500;
  white-space:nowrap;
  color:var(--ink);
}
.card .note{
  font-size:13px;
  color:var(--ink-soft);
  margin-top:7px;
  line-height:1.4;
}
.tag-row{
  display:flex;
  gap:6px;
  margin-top:8px;
  flex-wrap:wrap;
}
.tag{
  font-size:10.5px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:0.03em;
  padding:3px 8px;
  border-radius:999px;
  background:var(--paper-dim);
  color:var(--ink-soft);
}
.tag.event{
  background:var(--c-night);
  color:#fff;
}

/* ---------- Detail sheet ---------- */
#sheet-overlay{
  position:fixed; inset:0;
  background:rgba(22,50,79,0.35);
  display:none;
  z-index:50;
}
#sheet{
  position:fixed;
  left:0; right:0; bottom:0;
  background:var(--paper);
  border-radius:20px 20px 0 0;
  box-shadow:0 -10px 40px rgba(0,0,0,0.25);
  max-height:78vh;
  overflow-y:auto;
  padding:20px 20px 28px;
  transform:translateY(100%);
  transition:transform .25s ease;
  z-index:51;
}
#sheet.open{transform:translateY(0);}
#sheet-overlay.open{display:block;}
.sheet-handle{
  width:36px;height:4px;background:var(--line);border-radius:2px;
  margin:0 auto 14px;
}
.sheet-cat{
  display:inline-flex;align-items:center;gap:6px;
  font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:0.06em;
  color:#fff;padding:4px 10px;border-radius:999px;
  background:var(--cat-color, var(--ink));
  margin:0 6px 10px 0;
}
#sheet h2{
  font-family:'Fraunces', serif;
  font-size:24px;
  margin:0 0 4px;
}
#sheet .addr{color:var(--ink-soft);font-size:13.5px;margin-bottom:14px;}
#sheet .desc{font-size:14.5px;line-height:1.55;margin-bottom:16px;}
.info-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-bottom:16px;
}
.info-btn{
  display:flex;flex-direction:column;gap:2px;
  border:1px solid var(--line);
  border-radius:10px;
  padding:10px 12px;
  text-decoration:none;
  color:var(--ink);
  background:#fff;
}
.info-btn .k{font-size:10px;text-transform:uppercase;letter-spacing:0.05em;color:var(--ink-soft);}
.info-btn .v{font-family:'IBM Plex Mono',monospace;font-size:13px;font-weight:500;}

/* ---------- Plan view ---------- */
#view-plan{
  flex:1;
  overflow-y:auto;
  padding:14px 14px 100px;
  display:none;
}
#view-plan.active{display:block;}
.day-block{
  margin-bottom:26px;
}
.day-head{
  display:flex;
  align-items:baseline;
  gap:10px;
  margin-bottom:10px;
  padding-bottom:8px;
  border-bottom:2px solid var(--ink);
}
.day-head .d{
  font-family:'Fraunces', serif;
  font-weight:700;
  font-size:20px;
}
.day-head .date{
  font-family:'IBM Plex Mono',monospace;
  font-size:12px;
  color:var(--ink-soft);
}
.slot{
  display:flex;
  gap:12px;
  padding:10px 0;
  border-bottom:1px dashed var(--line);
}
.slot:last-child{border-bottom:none;}
.slot .time{
  flex:0 0 64px;
  font-family:'IBM Plex Mono',monospace;
  font-size:11px;
  color:var(--ink-soft);
  padding-top:2px;
}
.slot .body{flex:1;}
.slot .body .label{
  font-size:10px;text-transform:uppercase;letter-spacing:0.05em;
  color:var(--slot-color, var(--ink-soft));
  font-weight:700;
  margin-bottom:2px;
}
.slot .body h4{
  font-family:'Fraunces', serif;
  font-size:16px;
  margin:0 0 3px;
}
.slot .body p{
  font-size:13px;
  color:var(--ink-soft);
  margin:0;
  line-height:1.45;
}
.slot.highlight{
  background:var(--paper-dim);
  border-radius:12px;
  padding:12px 12px;
  border-bottom:none;
  margin:4px 0;
}
.slot.highlight .badge{
  display:inline-block;
  font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:0.05em;
  background:var(--c-night); color:#fff;
  padding:3px 9px;border-radius:999px;
  margin-bottom:6px;
}

footer.credit{
  text-align:center;
  font-family:'IBM Plex Mono',monospace;
  font-size:10.5px;
  color:var(--ink-soft);
  padding:18px 0 6px;
}

/* =========================================================
   DESKTOP / TABLET (≥ 860px)
   App-Shell wird zu einer zentrierten, gerahmten Karte;
   Karte + Liste stehen nebeneinander; Plan-Ansicht als Grid.
   ========================================================= */
@media (min-width: 860px){
  body{
    overflow:auto;
    background:var(--paper-dim);
    display:flex;
    justify-content:center;
    padding:28px 16px;
    min-height:100vh;
  }
  #app{
    width:100%;
    max-width:1180px;
    height:calc(100vh - 56px);
    height:calc(100dvh - 56px);
    min-height:640px;
    border-radius:22px;
    overflow:hidden;
    box-shadow:0 24px 70px rgba(22,50,79,0.18);
    border:1px solid var(--line);
  }
  header.top{ padding:20px 28px 14px; }
  nav.tabs{ max-width:360px; margin-left:auto; }
  #view-explore.active{ flex-direction:row; }
  #map{ flex:0 0 44%; min-height:unset; }
  #list{ padding:14px 20px 40px; }
  #list, #view-plan{
    scrollbar-width:thin;
  }
  #view-plan.active{
    display:grid;
    grid-template-columns:1fr 1fr;
    align-content:start;
    gap:6px 32px;
    padding:20px 28px 60px;
  }
  #view-plan.active footer.credit{
    grid-column:1 / -1;
  }
  #sheet{
    left:50%;
    right:auto;
    bottom:28px;
    width:100%;
    max-width:460px;
    border-radius:20px;
    transform:translate(-50%, 120%);
  }
  #sheet.open{ transform:translate(-50%, 0); }
}
