:root {
  --bg: #fff8f3;
  --card: #ffffff;
  --text: #2a2233;
  --muted: #8a7f8f;
  --line: #f0e4dc;
  --accent: #ff6b4a;
  --accent2: #e8455f;
  --teal: #2bb5a8;
  --soft: #fff0e8;
  --danger: #d93a3a;
  --shadow: 0 2px 10px rgba(80, 40, 30, 0.07), 0 1px 2px rgba(80, 40, 30, 0.05);
  --radius: 18px;
  --nav-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17141d;
    --card: #221e2a;
    --text: #f2ecf3;
    --muted: #a59bab;
    --line: #342e3d;
    --soft: #2c2433;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--accent); text-decoration: none; }
h1, h2, h3, h4 { margin: 0 0 0.4em; line-height: 1.2; }
h1 { font-size: 1.7rem; letter-spacing: -0.02em; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
h4 { font-size: 0.85rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin: 1em 0 0.4em; }
p { margin: 0.3em 0; }
small { font-size: 0.8rem; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.center { text-align: center; }
.big { font-size: 1.6rem; font-weight: 700; margin: 0.1em 0; letter-spacing: -0.02em; }
.pre { white-space: pre-wrap; }
.clamp { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.hidden { display: none !important; }
input, select, textarea, button { font: inherit; color: inherit; }
input:not([type="checkbox"]):not([type="radio"]):not([type="color"]), select, textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  outline: none;
  transition: border-color 0.15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
textarea { resize: vertical; }
input[type="color"] { width: 48px; height: 44px; border: none; background: none; padding: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 16px; border: none; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff;
  font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: transform 0.1s, opacity 0.15s;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.6; }
.btn.ghost { background: var(--soft); color: var(--text); }
.btn.light { background: rgba(255, 255, 255, 0.92); color: #2a2233; }
.btn.light.ghost { background: rgba(255, 255, 255, 0.2); color: #fff; backdrop-filter: blur(6px); }
.btn.sm { padding: 6px 11px; font-size: 0.85rem; border-radius: 10px; }
.btn.big { padding: 14px 20px; font-size: 1.05rem; width: 100%; }
.btn.danger { background: var(--danger); }
.danger-text { color: var(--danger) !important; }
.link { background: none; border: none; color: var(--accent); padding: 0; cursor: pointer; font-weight: 600; }
.icon-btn { background: none; border: none; cursor: pointer; padding: 4px 6px; opacity: 0.55; }
.icon-btn:hover { opacity: 1; }
.row { display: flex; gap: 8px; align-items: center; }
.row.end { justify-content: flex-end; margin-top: 12px; }
.row.gap { gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.row.center { justify-content: center; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- Layout ---------- */
.topbar {
  position: sticky; top: 0; z-index: 500;
  display: flex; align-items: center; gap: 16px;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.15rem; color: var(--text); letter-spacing: -0.02em; }
.logo { font-size: 1.4rem; }
.topnav { display: none; gap: 4px; flex: 1; }
.topnav a { padding: 7px 12px; border-radius: 10px; color: var(--muted); font-weight: 600; }
.topnav a.active { background: var(--soft); color: var(--text); }
.me-btn { margin-left: auto; width: 38px; height: 38px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; font-size: 1.2rem; }
#view { max-width: 980px; margin: 0 auto; padding: 4px 16px calc(var(--nav-h) + 32px + env(safe-area-inset-bottom)); }
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 600;
  display: flex; justify-content: space-around;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 1px; color: var(--muted); padding: 4px 10px; border-radius: 12px; min-width: 56px; }
.tabbar a span { font-size: 1.35rem; transition: transform 0.15s; }
.tabbar a small { font-size: 0.7rem; font-weight: 600; }
.tabbar a.active { color: var(--accent); }
.tabbar a.active span { transform: translateY(-2px) scale(1.1); }
@media (min-width: 860px) {
  .topnav { display: flex; }
  .tabbar { display: none; }
  #view { padding-bottom: 48px; }
}
body.no-chrome .topbar, body.no-chrome .tabbar { display: none; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0 14px; }
.page-head h1 { margin: 0; }
.block { margin: 22px 0; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.block-head a { font-weight: 600; font-size: 0.9rem; }
.card { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin: 12px 0; }
.card h3 { margin-bottom: 6px; }
.cards2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cards2 .card { margin: 0; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.cards2 .card .btn { margin-top: auto; padding-top: 6px; }
.notice { background: var(--soft); border-radius: 14px; padding: 12px 14px; margin: 12px 0; }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 60px 0; color: var(--muted); }
.spin { width: 26px; height: 26px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; display: inline-block; }
.spin.sm { width: 15px; height: 15px; border-width: 2px; border-color: rgba(255,255,255,.4); border-top-color: currentColor; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-icon { font-size: 3rem; margin-bottom: 8px; }
.empty h3 { color: var(--text); }
.empty .btn { margin-top: 12px; }

/* ---------- Login ---------- */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 20% 10%, #ffd5c2, transparent 50%), radial-gradient(circle at 90% 90%, #b8ece6, transparent 50%), var(--bg); }
.gate-card { width: 100%; max-width: 360px; background: var(--card); border-radius: 26px; padding: 30px 24px; box-shadow: 0 20px 60px rgba(80, 40, 30, 0.15); text-align: center; display: flex; flex-direction: column; gap: 12px; }
.gate-logo { font-size: 3.4rem; }
.gate h1 { margin: 0; }
.gate .err { color: var(--danger); min-height: 1.2em; }
.emoji-in { width: 64px !important; flex: none; text-align: center; font-size: 1.3rem; }
.who { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.who-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 22px; border-radius: 20px; border: 2px solid var(--line); background: var(--card); cursor: pointer; font-weight: 700; min-width: 120px; }
.who-btn span { font-size: 2.6rem; width: 70px; height: 70px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 18%, transparent); }
.who-btn:hover { border-color: var(--c); }

/* ---------- Home ---------- */
.hello { margin: 6px 0 14px; }
.hello h1 { margin-bottom: 2px; }
.hero {
  position: relative; display: block; border-radius: 24px; overflow: hidden; min-height: 240px;
  background: linear-gradient(135deg, #ff9966, #ff5e62) center/cover; color: #fff; box-shadow: var(--shadow);
}
.hero-shade, .w-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.05) 20%, rgba(0,0,0,0.65)); }
.hero-body { position: relative; padding: 20px; display: flex; flex-direction: column; gap: 6px; min-height: 240px; justify-content: flex-end; }
.hero-body h2 { font-size: 1.6rem; margin: 0; }
.empty-hero { background: linear-gradient(135deg, #6a82fb, #fc5c7d); }
.pill { align-self: flex-start; display: inline-block; padding: 4px 10px; border-radius: 99px; background: rgba(255, 255, 255, 0.22); backdrop-filter: blur(6px); font-size: 0.8rem; font-weight: 700; }
.pill.warn { background: rgba(255, 200, 60, 0.9); color: #3b2a00; }
.countdown { position: absolute; top: 18px; right: 18px; background: rgba(255,255,255,0.95); color: var(--accent2); border-radius: 18px; padding: 8px 14px; text-align: center; line-height: 1; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.countdown b { display: block; font-size: 2.2rem; font-weight: 800; }
.countdown span { font-size: 0.75rem; font-weight: 700; color: #555; }
.wx-strip { display: flex; gap: 6px; margin-top: 4px; }
.wx-strip span { display: flex; flex-direction: column; align-items: center; background: rgba(255,255,255,0.18); backdrop-filter: blur(6px); border-radius: 12px; padding: 4px 8px; font-size: 1.1rem; }
.wx-strip small { font-size: 0.7rem; opacity: 0.9; }
.wx-strip b { font-size: 0.85rem; }
.now-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; background: linear-gradient(135deg, var(--teal), #2083b5); color: #fff; margin-bottom: 12px; }
.now-card div { flex: 1; display: flex; flex-direction: column; }
.pulse { width: 12px; height: 12px; border-radius: 50%; background: #9dffb0; box-shadow: 0 0 0 0 rgba(157, 255, 176, 0.7); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 12px rgba(157, 255, 176, 0); } 100% { box-shadow: 0 0 0 0 rgba(157, 255, 176, 0); } }
.memory { position: relative; display: flex; align-items: flex-end; min-height: 150px; border-radius: 20px; overflow: hidden; background-size: cover; background-position: center; color: #fff; margin-bottom: 10px; }
.memory > div:last-child { position: relative; padding: 16px; display: flex; flex-direction: column; }
.memory b { font-size: 1.3rem; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0 6px; color: var(--text); }
.tiles.static { margin-top: 0; }
.tiles.three { grid-template-columns: repeat(3, 1fr); }
@media (min-width: 640px) { .tiles:not(.three) { grid-template-columns: repeat(6, 1fr); } }
.tile { background: var(--card); border-radius: 16px; padding: 12px 8px; text-align: center; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; }
.tile span { font-size: 1.3rem; }
.tile b { font-size: 1.25rem; letter-spacing: -0.02em; }
.tile small { color: var(--muted); font-size: 0.72rem; }
.balance-card { display: block; padding: 14px 16px; border-radius: 16px; background: var(--soft); color: var(--text); margin: 14px 0; }
.balance-card .big { font-size: 1.1rem; color: var(--accent2); }
.balance-card small { color: var(--accent); font-weight: 600; }
.hlist { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hlist::-webkit-scrollbar { display: none; }
.mini-trip { flex: none; width: 150px; scroll-snap-align: start; color: var(--text); display: flex; flex-direction: column; gap: 2px; }
.mini-cover { position: relative; height: 100px; border-radius: 14px; background-size: cover; background-position: center; display: grid; place-items: center; font-size: 2.2rem; }
.mini-trip small { color: var(--muted); }
.hot { position: absolute; top: 6px; right: 6px; font-style: normal; font-size: 1rem; }
.wrapped-banner { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 18px; background: linear-gradient(120deg, #7f5af0, #ff6b9d, #ffb86b); color: #fff; margin: 18px 0; }
.wrapped-banner > span:first-child { font-size: 2rem; }
.wrapped-banner div { flex: 1; display: flex; flex-direction: column; }
.wrapped-banner > span:last-child { font-size: 1.6rem; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 32%) 1fr auto; gap: 10px; align-items: center; margin: 6px 0; font-size: 0.9rem; }
.bar-row small { color: var(--muted); white-space: nowrap; }
.bar { height: 9px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 99px; transition: width 0.4s; }
.bar.over i { background: var(--danger); }
.country-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cchip { background: var(--card); box-shadow: var(--shadow); border-radius: 99px; padding: 4px 10px; font-size: 0.85rem; }
.cchip small { color: var(--accent); font-weight: 700; }
.photo-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; border-radius: 16px; overflow: hidden; }
@media (min-width: 640px) { .photo-strip { grid-template-columns: repeat(6, 1fr); } }
.photo-strip img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.feed { list-style: none; padding: 0; margin: 0; }
.feed li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.feed li div { display: flex; flex-direction: column; }
.feed small { color: var(--muted); }
.avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: color-mix(in srgb, var(--c) 22%, var(--card)); font-size: 1.1rem; flex: none; }
.avatar.sm { width: 26px; height: 26px; font-size: 0.9rem; }
.avatar.xs { width: 22px; height: 22px; font-size: 0.75rem; }
.fab { position: fixed; right: 18px; bottom: calc(var(--nav-h) + 18px + env(safe-area-inset-bottom)); width: 58px; height: 58px; border-radius: 50%; border: none; font-size: 1.8rem; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: 0 8px 24px rgba(232, 69, 95, 0.4); cursor: pointer; z-index: 400; }
@media (min-width: 860px) { .fab { bottom: 28px; } }

/* ---------- Segmente & Chips ---------- */
.seg { display: flex; background: var(--soft); border-radius: 12px; padding: 3px; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: 1; border: none; background: none; padding: 8px 10px; border-radius: 10px; cursor: pointer; font-weight: 600; color: var(--muted); white-space: nowrap; font-size: 0.88rem; }
.seg button.on { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.seg button small { opacity: 0.6; }
.seg.wrap { flex-wrap: wrap; }
.seg.wrap button { flex: 1 1 auto; }
.seg.small button { padding: 5px 8px; font-size: 0.8rem; }
.tabs { margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1.5px solid var(--line); background: var(--card); border-radius: 99px; padding: 6px 12px; cursor: pointer; font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.chip.on { border-color: var(--accent); background: var(--soft); color: var(--accent2); }
.chips.static { margin: 14px 0; }
.search { margin-bottom: 12px; }

/* ---------- Trip-Liste ---------- */
.year-head { grid-column: 1 / -1; margin: 14px 0 0; font-size: 1.3rem; }
.trip-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) { .trip-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .trip-grid { grid-template-columns: 1fr 1fr 1fr; } }
.trip-card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); color: var(--text); display: flex; flex-direction: column; transition: transform 0.15s; }
.trip-card:active { transform: scale(0.98); }
.trip-cover { position: relative; height: 150px; background-size: cover; background-position: center; }
.trip-cover .rating { position: absolute; bottom: 8px; left: 10px; background: rgba(0,0,0,0.45); color: #ffd25e; border-radius: 99px; padding: 1px 8px; backdrop-filter: blur(4px); }
.trip-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 2px; }
.trip-body b { font-size: 1.05rem; }
.trip-body small { color: var(--muted); }
.hl { font-style: italic; color: var(--muted); font-size: 0.9rem; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 6px; font-size: 0.82rem; color: var(--muted); }
.stars { color: #f5b301; letter-spacing: 1px; font-size: 0.9rem; }

/* ---------- Trip-Detail ---------- */
.view-trip { padding-top: 0 !important; }
.trip-hero { position: relative; margin: 0 -16px; min-height: 260px; background-size: cover; background-position: center; color: #fff; display: flex; align-items: flex-end; }
@media (min-width: 860px) { .trip-hero { margin: 0; border-radius: 24px; overflow: hidden; } }
.trip-hero .hero-body { min-height: 0; padding: 20px; }
.trip-hero h1 { margin: 4px 0 0; font-size: 1.9rem; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.back, .hero-menu { position: absolute; top: 14px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,0.35); color: #fff; font-size: 1.6rem; border: none; backdrop-filter: blur(6px); cursor: pointer; }
.back { left: 14px; }
.hero-menu { right: 14px; font-size: 1.3rem; }
.trip-tabs { position: sticky; top: calc(58px + env(safe-area-inset-top)); z-index: 400; display: flex; gap: 4px; overflow-x: auto; padding: 10px 0; margin: 0 -16px; padding-left: 16px; padding-right: 16px; background: var(--bg); scrollbar-width: none; }
.trip-tabs::-webkit-scrollbar { display: none; }
.trip-tabs a { padding: 8px 13px; border-radius: 99px; color: var(--muted); font-weight: 600; white-space: nowrap; font-size: 0.9rem; }
.trip-tabs a.on { background: var(--text); color: var(--bg); }
.trip-tabs small { opacity: 0.7; }
.rate-card .rate-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; }
.star-input { display: inline-flex; }
.star-input button { background: none; border: none; font-size: 1.7rem; color: var(--line); cursor: pointer; padding: 0 2px; transition: transform 0.1s; }
.star-input button.on { color: #f5b301; }
.star-input button:active { transform: scale(1.3); }
.stay { display: flex; gap: 10px; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); }
.stay-main { display: flex; flex-direction: column; gap: 2px; }
.stay-act { display: flex; gap: 4px; align-items: flex-start; flex-wrap: wrap; justify-content: flex-end; }
.hotel-links { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.mini-map { height: 260px; border-radius: 16px; overflow: hidden; margin: 8px 0; z-index: 1; }
.places { list-style: none; margin: 0; padding: 0; }
.place { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.place > div { flex: 1; display: flex; flex-direction: column; }
.place.todo b { opacity: 0.8; }
.place-icon { font-size: 1.3rem; }
.check-btn { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); color: #fff; cursor: pointer; flex: none; font-size: 0.8rem; }
.place:not(.todo) .check-btn { background: var(--teal); border-color: var(--teal); }
.idea-box { background: var(--soft); border-radius: 18px; padding: 16px; }
.wx-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.wx-day { flex: none; min-width: 66px; background: var(--card); border-radius: 14px; padding: 8px; display: flex; flex-direction: column; align-items: center; box-shadow: var(--shadow); }
.wx-day span { font-size: 1.6rem; }
.wx-day small { color: var(--muted); font-size: 0.72rem; }
.wx-day .rain { color: #3a8ee6; }

.composer textarea { border: none; padding: 4px; font-size: 1rem; }
.composer-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.composer-row select, .composer-row input { width: auto !important; flex: 1 1 140px; }
.moods { display: flex; flex-wrap: wrap; gap: 2px; }
.moods button { background: none; border: none; font-size: 1.25rem; padding: 3px; border-radius: 8px; cursor: pointer; opacity: 0.55; }
.moods button.on { opacity: 1; background: var(--soft); transform: scale(1.15); }
.timeline { position: relative; }
.day { padding: 4px 0 10px 18px; border-left: 2px solid var(--line); margin-left: 8px; position: relative; }
.day::before { content: ""; position: absolute; left: -7px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.empty-day::before { background: var(--line); }
.day-head { display: flex; gap: 8px; align-items: baseline; margin-bottom: 6px; }
.day-head small { color: var(--muted); }
.entry { display: flex; gap: 10px; margin: 8px 0; }
.entry-body { flex: 1; background: var(--card); border-radius: 4px 16px 16px 16px; padding: 10px 12px; box-shadow: var(--shadow); border-left: 3px solid var(--c); }
.entry-meta { display: flex; align-items: center; gap: 6px; }
.entry-act { margin-left: auto; }
.day-photos { display: flex; gap: 4px; overflow-x: auto; margin: 6px 0; }
.day-photos img, .day-photos .more { width: 74px; height: 74px; object-fit: cover; border-radius: 10px; cursor: pointer; flex: none; }
.day-photos .more { display: grid; place-items: center; background: var(--soft); font-weight: 700; }

.dropzone { border: 2px dashed var(--line); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; margin-bottom: 14px; transition: background 0.15s; }
.dropzone.drag { background: var(--soft); border-color: var(--accent); }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; border-radius: 14px; overflow: hidden; margin-bottom: 18px; }
@media (min-width: 640px) { .photo-grid { grid-template-columns: repeat(5, 1fr); } }
.ph { position: relative; padding: 0; border: none; background: var(--line); cursor: pointer; aspect-ratio: 1; overflow: hidden; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.25s; }
.ph:hover img { transform: scale(1.04); }
.ph i { position: absolute; top: 5px; right: 5px; font-style: normal; font-size: 0.85rem; }
.ph .avatar { position: absolute; bottom: 5px; left: 5px; box-shadow: 0 1px 4px rgba(0,0,0,0.3); }
.album-head { display: flex; justify-content: space-between; align-items: baseline; color: var(--text); margin: 16px 0 6px; }
.album-head small { color: var(--muted); }

.cost-head { display: flex; justify-content: space-between; align-items: center; }
.paid-by { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; font-size: 0.88rem; }
.paid-by span { display: flex; align-items: center; gap: 6px; }
.expenses { list-style: none; padding: 0; margin: 0; }
.expenses li { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.expenses li div { flex: 1; display: flex; flex-direction: column; }
.expenses .cat { font-size: 1.3rem; width: 38px; height: 38px; display: grid; place-items: center; background: var(--soft); border-radius: 12px; }

.pack-head .bar { margin-bottom: 4px; }
.add-row { display: flex; gap: 8px; margin: 12px 0; }
.add-row .btn { flex: none; }
.pack { list-style: none; padding: 0; margin: 0; background: var(--card); border-radius: 14px; box-shadow: var(--shadow); }
.pack li { display: flex; align-items: center; gap: 4px; padding: 4px 8px; border-bottom: 1px solid var(--line); }
.pack li:last-child { border-bottom: none; }
.pack label { flex: 1; display: flex; align-items: center; gap: 10px; padding: 8px 0; cursor: pointer; }
.pack input { width: 20px; height: 20px; accent-color: var(--teal); }
.pack li.done span { text-decoration: line-through; color: var(--muted); }
.pack .who { background: var(--soft); border: none; border-radius: 99px; width: 32px; height: 32px; cursor: pointer; }

.plan-form summary { cursor: pointer; font-weight: 700; }
.plan-form .chips, .plan-form input { margin: 10px 0; }
.plan .lead { font-size: 1.05rem; }
.plan-day { margin: 18px 0; }
.plan-day h3 { display: flex; flex-direction: column; }
.plan-day h3 small { color: var(--muted); font-weight: 500; }
.plan-day ul { list-style: none; padding: 0; margin: 0; }
.plan-day li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.plan-day li div { flex: 1; }
.plan-day .time { flex: none; width: 76px; font-size: 0.8rem; color: var(--accent2); font-weight: 700; padding-top: 2px; }
.plan-day p { color: var(--muted); font-size: 0.9rem; }

/* ---------- Formulare & Modals ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 2000; background: rgba(20, 10, 25, 0.45); display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity 0.2s; backdrop-filter: blur(3px); }
.modal-wrap.show { opacity: 1; }
.modal { position: relative; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; background: var(--bg); border-radius: 24px 24px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); transform: translateY(30px); transition: transform 0.2s; }
.modal-wrap.show .modal { transform: none; }
@media (min-width: 640px) { .modal-wrap { align-items: center; } .modal { border-radius: 24px; } }
.modal-x { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; border: none; background: var(--soft); cursor: pointer; }
.form { display: flex; flex-direction: column; gap: 12px; }
.form label { display: flex; flex-direction: column; gap: 5px; font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.form label.check { flex-direction: row; align-items: center; gap: 10px; color: var(--text); font-weight: 500; font-size: 0.95rem; }
.form label.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.field-label { font-size: 0.85rem; font-weight: 600; color: var(--muted); margin-bottom: -6px; }
.form h3 { margin: 10px 0 0; }
.picked { font-size: 0.85rem; margin-top: -6px; }
.form .only-done, .form .only-wish { display: none; }
.form.is-done .only-done, .form.is-wish .only-wish { display: flex; }
.form.is-done .only-plan { display: none; }
.confirm-text { font-size: 1.05rem; margin: 10px 30px 4px 0; }
.menu-list { display: flex; flex-direction: column; }
.menu-list button { text-align: left; background: none; border: none; border-bottom: 1px solid var(--line); padding: 14px 4px; cursor: pointer; font-size: 1rem; display: flex; flex-direction: column; }
.suggest-host { position: relative; }
.suggest { position: absolute; left: 0; right: 0; top: 100%; z-index: 50; background: var(--card); border-radius: 14px; box-shadow: 0 12px 34px rgba(0,0,0,0.18); overflow: hidden; margin-top: 4px; max-height: 300px; overflow-y: auto; }
.suggest-item { display: flex; flex-direction: column; text-align: left; width: 100%; border: none; background: none; padding: 10px 14px; border-bottom: 1px solid var(--line); cursor: pointer; color: var(--text); }
.suggest-item:hover { background: var(--soft); }
.suggest-item small { color: var(--muted); font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); z-index: 5000; background: var(--text); color: var(--bg); padding: 11px 18px; border-radius: 14px; font-weight: 600; opacity: 0; transition: all 0.25s; max-width: calc(100vw - 32px); box-shadow: 0 8px 24px rgba(0,0,0,0.25); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); color: #fff; }
.upload-panel { position: fixed; left: 16px; right: 16px; bottom: calc(var(--nav-h) + 20px + env(safe-area-inset-bottom)); z-index: 4000; max-width: 420px; margin: 0 auto; background: var(--card); border-radius: 16px; padding: 14px; box-shadow: 0 10px 34px rgba(0,0,0,0.2); display: flex; flex-direction: column; gap: 6px; }
.upload-panel small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 3000; background: #000; color: #fff; display: flex; flex-direction: column; }
.lb-top, .lb-bottom { display: flex; align-items: center; gap: 12px; padding: 12px 14px; padding-top: calc(12px + env(safe-area-inset-top)); }
.lb-bottom { flex-direction: column; align-items: stretch; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
.lb-meta { flex: 1; font-size: 0.85rem; opacity: 0.85; }
.lb-meta a { color: #ffb59f; }
.lb-x { background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; }
.lb-stage { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.12); border: none; color: #fff; font-size: 2rem; width: 46px; height: 64px; border-radius: 12px; cursor: pointer; }
.lb-nav.prev { left: 8px; } .lb-nav.next { right: 8px; }
@media (hover: none) { .lb-nav { display: none; } }
.lb-caption { text-align: center; min-height: 1.2em; }
.lb-actions { display: flex; justify-content: center; gap: 10px; }
.lb-actions > * { background: rgba(255,255,255,0.12); border: none; color: #fff; font-size: 1.2rem; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }

/* ---------- Karte ---------- */
.view-map { max-width: none !important; padding: 0 !important; }
.map-page { position: relative; height: calc(100dvh - 58px - env(safe-area-inset-top)); }
#bigmap { position: absolute; inset: 0; }
.map-chips { position: absolute; top: 10px; left: 56px; right: 10px; z-index: 450; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.map-chips::-webkit-scrollbar { display: none; }
.map-chips .chip { box-shadow: var(--shadow); white-space: nowrap; }
.map-sheet { position: absolute; left: 10px; right: 10px; bottom: calc(var(--nav-h) + 10px + env(safe-area-inset-bottom)); z-index: 450; background: var(--card); border-radius: 20px; box-shadow: 0 10px 34px rgba(0,0,0,0.2); padding: 6px 14px 12px; max-height: 42vh; display: flex; flex-direction: column; transition: max-height 0.25s; }
.map-sheet.collapsed { max-height: 70px; overflow: hidden; }
@media (min-width: 860px) { .map-sheet { left: auto; width: 360px; top: 60px; bottom: 20px; max-height: none; } .map-sheet.collapsed { max-height: none; } .sheet-grip { display: none; } }
.sheet-grip { width: 40px; height: 5px; border-radius: 99px; background: var(--line); margin: 4px auto 8px; cursor: pointer; flex: none; }
.sheet-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.sheet-head b { font-size: 1.1rem; }
.sheet-head small { color: var(--muted); }
.sheet-head .link { align-self: flex-start; }
.sheet-list { overflow-y: auto; flex: 1; }
.country-row { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center; width: 100%; text-align: left; background: none; border: none; border-bottom: 1px solid var(--line); padding: 9px 2px; cursor: pointer; color: var(--text); }
.country-row small { grid-column: 2; color: var(--muted); }
.country-row .pct { grid-row: 1 / 3; grid-column: 3; font-weight: 800; color: var(--accent2); }
.explore-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 6px 0 10px; }
.explore-stats div { background: var(--soft); border-radius: 14px; padding: 10px 6px; text-align: center; display: flex; flex-direction: column; }
.explore-stats b { font-size: 1.2rem; color: var(--accent2); }
.explore-stats small { color: var(--muted); font-size: 0.72rem; }
.emoji-marker-wrap { background: none; border: none; }
.emoji-marker { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--card); box-shadow: 0 2px 8px rgba(0,0,0,0.3); font-size: 1.15rem; border: 2px solid #fff; }
.emoji-marker.big { width: 42px; height: 42px; font-size: 1.5rem; }
.emoji-marker.sm { width: 26px; height: 26px; font-size: 0.85rem; transform: translate(4px, 4px); }
.emoji-marker.todo { opacity: 0.65; border-style: dashed; border-color: var(--teal); }
.emoji-marker.trip.planned, .emoji-marker.trip.wish { border-color: var(--teal); }
.emoji-marker.home { background: var(--teal); }
.photo-marker { position: relative; display: block; width: 40px; height: 40px; border-radius: 12px; background-size: cover; background-position: center; border: 2.5px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,0.35); }
.photo-marker.sm { width: 30px; height: 30px; border-radius: 9px; transform: translate(5px, 5px); }
.photo-marker.trip { border-radius: 50%; border-color: var(--accent); width: 44px; height: 44px; }
.photo-marker i { position: absolute; top: -8px; right: -8px; background: var(--accent); color: #fff; font-style: normal; font-size: 0.7rem; font-weight: 700; padding: 1px 6px; border-radius: 99px; }
.map-pop { display: flex; flex-direction: column; gap: 2px; color: var(--text); min-width: 140px; }
.map-pop img { width: 100%; height: 90px; object-fit: cover; border-radius: 8px; margin-bottom: 4px; }
.map-pop small { color: var(--muted); }
.fog-canvas { pointer-events: none; }
.leaflet-container { font: inherit; background: #aad3df; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--card); color: var(--text); }
.leaflet-top.leaflet-left { top: 0; }

/* ---------- Ideen ---------- */
.ai-form { display: flex; flex-direction: column; gap: 10px; background: linear-gradient(160deg, var(--soft), var(--card)); }
.ai-form label { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.idea-grid { display: grid; gap: 12px; }
@media (min-width: 700px) { .idea-grid { grid-template-columns: 1fr 1fr; } }
.idea { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.idea-top { display: flex; gap: 10px; align-items: center; }
.idea-top div { display: flex; flex-direction: column; }
.idea-top b { font-size: 1.15rem; }
.idea-top small { color: var(--muted); }
.idea-emoji { font-size: 2rem; }
.tagline { font-weight: 700; color: var(--accent2); }
.idea ul { margin: 0; padding-left: 18px; font-size: 0.9rem; }
.idea .row { margin-top: auto; padding-top: 6px; }
.wish-list { display: flex; flex-direction: column; gap: 10px; }
.wish { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 16px; padding: 8px; box-shadow: var(--shadow); color: var(--text); }
.wish > div:nth-child(2) { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.wish small { color: var(--muted); }
.wish-cover { width: 64px; height: 64px; border-radius: 12px; background-size: cover; display: grid; place-items: center; font-size: 1.8rem; flex: none; }
.hot-btn { background: none; border: none; font-size: 1.4rem; cursor: pointer; filter: grayscale(1); opacity: 0.4; }
.hot-btn.on { filter: none; opacity: 1; }
.dice { text-align: center; padding: 10px 0; }
.dice-roll { font-size: 4rem; animation: roll 0.7s ease-out; }
@keyframes roll { from { transform: rotate(-540deg) scale(0.3); } to { transform: none; } }

/* ---------- Statistik ---------- */
.year-row { display: grid; grid-template-columns: 50px 1fr; grid-template-rows: auto auto; gap: 2px 10px; align-items: center; color: var(--text); padding: 6px 0; }
.year-row small { grid-column: 2; color: var(--muted); }
.versus { width: 100%; border-collapse: collapse; }
.versus td, .versus th { padding: 8px 4px; border-bottom: 1px solid var(--line); text-align: center; }
.versus td:first-child { text-align: left; }
.balance .transfer { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 0; }
.balance .transfer b { font-size: 1.3rem; color: var(--accent2); margin-left: auto; }
.country-list { display: grid; gap: 10px; }
@media (min-width: 700px) { .country-list { grid-template-columns: 1fr 1fr; } }
.country-card { margin: 0; }
.cc-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.cc-head > div { flex: 1; display: flex; flex-direction: column; }
.big-flag { font-size: 2.2rem; }
.cc-head .pct { font-weight: 800; color: var(--accent2); font-size: 1.2rem; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.cc-head .pct small { font-size: 0.7rem; color: var(--muted); font-weight: 500; }
.records { display: grid; gap: 8px; }
@media (min-width: 700px) { .records { grid-template-columns: 1fr 1fr; } }
.record { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow); color: var(--text); }
.record > span { font-size: 1.6rem; }
.record div { flex: 1; display: flex; flex-direction: column; }
.record small { color: var(--muted); }
.record em { font-style: normal; font-weight: 800; color: var(--accent2); }
.wrapped-years { margin-bottom: 10px; }
.wrapped-chip { flex: none; padding: 9px 16px; border-radius: 99px; background: linear-gradient(120deg, #7f5af0, #ff6b9d); color: #fff; font-weight: 700; }

/* ---------- Jahresrückblick ---------- */
.view-wrapped { max-width: none !important; padding: 0 !important; }
.wrapped { position: fixed; inset: 0; z-index: 2500; background: #111; color: #fff; }
.w-progress { position: absolute; top: calc(10px + env(safe-area-inset-top)); left: 12px; right: 52px; display: flex; gap: 4px; z-index: 5; }
.w-progress i { flex: 1; height: 3px; border-radius: 99px; background: rgba(255,255,255,0.3); overflow: hidden; }
.w-progress i.done { background: #fff; }
.w-close { position: absolute; top: calc(2px + env(safe-area-inset-top)); right: 12px; z-index: 6; color: #fff; font-size: 1.6rem; padding: 4px 8px; }
.w-stage, .w-slide { position: absolute; inset: 0; }
.w-slide { display: flex; align-items: center; justify-content: center; text-align: center; padding: 60px 26px; background-size: cover; background-position: center; animation: wIn 0.4s ease-out; }
@keyframes wIn { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: none; } }
.w-inner { position: relative; z-index: 3; max-width: 520px; display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; }
.w-inner a, .w-inner button { pointer-events: auto; }
.w-inner small { text-transform: uppercase; letter-spacing: 0.15em; opacity: 0.85; font-weight: 700; }
.w-inner h1 { font-size: 2.6rem; margin: 0; }
.w-inner h1 b { font-size: 4.5rem; display: block; }
.w-num { font-size: 5.5rem !important; font-weight: 900; letter-spacing: -0.04em; line-height: 1; }
.w-inner p { font-size: 1.15rem; }
.w-text { font-size: 1.25rem !important; line-height: 1.55; }
.w-quote { font-style: italic; font-size: 1.3rem !important; }
.w-flags { font-size: 3rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.w-months { display: flex; gap: 6px; align-items: flex-end; height: 160px; width: 100%; max-width: 380px; }
.w-months div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.w-months i { width: 100%; background: #fff; border-radius: 6px; min-height: 3px; }
.w-collage { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; width: min(86vw, 440px); border-radius: 18px; overflow: hidden; }
.w-collage img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.w-list { list-style: none; padding: 0; margin: 0; max-height: 40vh; overflow-y: auto; }
.w-list li { display: flex; flex-direction: column; padding: 4px 0; }
.w-list a { color: #fff; font-weight: 700; }
.w-tap { position: absolute; top: 0; bottom: 0; z-index: 2; background: none; border: none; cursor: pointer; }
.w-tap.prev { left: 0; width: 30%; }
.w-tap.next { right: 0; width: 70%; }
.g1 { background: linear-gradient(160deg, #ff6b4a, #e8455f 60%, #7f2a6a); }
.g2 { background: linear-gradient(160deg, #2bb5a8, #2083b5 60%, #253a7a); }
.g3 { background: linear-gradient(160deg, #7f5af0, #c04de0 60%, #ff6b9d); }
.g4 { background: linear-gradient(160deg, #ffb86b, #ff6b4a 60%, #c2185b); }
.g5 { background: linear-gradient(160deg, #1f2937, #4c1d95 60%, #9d174d); }
.intro, .photo { background-color: #333; }
.intro::before, .photo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.25), rgba(0,0,0,0.7)); }
.tiles-dark { filter: invert(1) hue-rotate(180deg) brightness(0.9) contrast(0.9); }
.collage { background: #111; }

/* ---------- Gäste & Abrechnung ---------- */
.person { display: inline-flex; align-items: center; gap: 6px; }
.avatar.guest { background: var(--soft); }
.transfer { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line); }
.transfer:last-of-type { border-bottom: none; }
.transfer > b { margin-left: auto; font-size: 1.1rem; color: var(--accent2); }
.transfer .full { flex-basis: 100%; }
.transfer.couple { opacity: 0.75; }
.transfer.mine { background: var(--soft); border-radius: 12px; padding: 8px 10px; }
.settle-card h3 { margin-bottom: 4px; }
.settle-row { display: flex; align-items: center; gap: 6px; padding: 4px 0; }
.companions { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--soft); border-radius: 14px; padding: 10px 14px; margin: 12px 0; font-size: 0.92rem; }
.share-link { display: flex; gap: 8px; margin: 12px 0 8px; }
.share-link input { font-size: 0.85rem; }
.guest-list { list-style: none; padding: 0; margin: 0 0 8px; }
.guest-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.guest-list li > div { flex: 1; display: flex; flex-direction: column; }
.mini-check { display: flex; align-items: center; gap: 5px; font-size: 0.82rem; color: var(--muted); white-space: nowrap; }
.mini-check input { accent-color: var(--accent); width: 18px; height: 18px; }
.mt { margin-top: 18px; }
.who-btn.small { min-width: 0; padding: 10px 16px; flex-direction: row; }
.who-btn.small span { width: auto; height: auto; background: none; font-size: 1.2rem; }
.guest-hello { margin-left: auto; font-weight: 600; color: var(--muted); }
body.guest-mode #view { padding-bottom: 40px; }
