/* ============================================================
   studizeit – Design System
   ============================================================ */
:root {
  --brand: #da164e;
  --brand-dark: #b0123e;
  --brand-soft: #fde7ee;
  --ink: #111827;
  --ink-2: #374151;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f7f7fa;
  --surface: #ffffff;
  --surface-2: #f3f4f6;
  --blue: #2563eb;
  --green: #16a34a;
  --amber: #d97706;
  --red: #dc2626;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(17,24,39,.04), 0 4px 16px rgba(17,24,39,.06);
  --shadow-lg: 0 10px 30px rgba(17,24,39,.12);
  --wrap: 1200px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f3f4f6;
    --ink-2: #d1d5db;
    --muted: #9ca3af;
    --line: #2a2f3a;
    --bg: #0f1218;
    --surface: #171b23;
    --surface-2: #1f2430;
    --brand-soft: #3a1121;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
    --shadow-lg: 0 10px 30px rgba(0,0,0,.45);
    color-scheme: dark;
  }
  .logo img { filter: invert(1) hue-rotate(180deg) brightness(1.15); }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.35rem, 2.5vw, 1.75rem); font-weight: 750; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.section { padding-top: 48px; padding-bottom: 8px; }
.section-tight { padding-top: 28px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-bottom: 20px; }
.section-head h2 { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.link-more { font-weight: 600; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 18px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 650; font-size: .95rem; line-height: 1.2; text-decoration: none !important;
  transition: transform .15s, background .15s, box-shadow .15s, border-color .15s; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff !important; box-shadow: 0 4px 14px rgba(218,22,78,.3); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-light { background: var(--surface); color: var(--ink) !important; border-color: var(--line); }
.btn-light:hover { border-color: var(--muted); }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); }
.btn-sm { padding: 8px 14px; font-size: .875rem; border-radius: 10px; }
.btn-lg { padding: 14px 26px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: wait; }
.link-btn { background: none; border: 0; color: var(--brand); font-weight: 600; padding: 0; text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(12px); -webkit-backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.logo img { width: 128px; height: auto; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a:not(.btn) { color: var(--ink-2); font-weight: 550; font-size: .95rem; padding: 8px 12px; border-radius: 10px; }
.nav a:not(.btn):hover, .nav a.active { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.nav .btn { margin-left: 8px; }
.fav-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; font-size: .72rem; font-weight: 700; color: #fff; background: var(--brand); border-radius: 999px; margin-left: 2px; }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; padding: 10px; }
.nav-toggle span { display: block; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: .2s; }
@media (max-width: 1024px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: 66px 0 auto 0; flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--surface); padding: 12px 16px 20px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg);
    transform: translateY(-120%); transition: transform .25s ease; z-index: 49;
  }
  .nav a:not(.btn) { padding: 12px; font-size: 1.05rem; }
  .nav .btn { margin: 8px 0 0; }
  .nav-open .nav { transform: translateY(0); }
  .nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- Hero (Start) ---------- */
.hero { overflow: hidden; padding: 56px 0 32px; background:
  radial-gradient(900px 400px at 85% -10%, rgba(218,22,78,.12), transparent 60%),
  radial-gradient(700px 360px at -10% 110%, rgba(37,99,235,.08), transparent 60%); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); background: var(--brand-soft); padding: 6px 12px; border-radius: 999px; margin-bottom: 18px; }
.hl { color: var(--brand); position: relative; white-space: nowrap; }
.hl::after { content: ''; position: absolute; left: 0; right: 0; bottom: .06em; height: .18em; background: currentColor; opacity: .18; border-radius: 4px; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 36em; }
.search-box {
  display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; padding: 6px 6px 6px 16px; box-shadow: var(--shadow-lg); margin-top: 24px; position: relative;
}
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 1.02rem; color: var(--ink); padding: 10px 0; }
.search-icon { font-size: 1.1rem; }
.search-results {
  position: relative; z-index: 20; margin-top: 8px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; max-height: 420px; overflow-y: auto;
}
.result { display: flex; gap: 12px; align-items: center; padding: 12px 16px; color: var(--ink); border-bottom: 1px solid var(--line); }
.result:last-child { border-bottom: 0; }
.result:hover { background: var(--surface-2); text-decoration: none; }
.result strong { display: block; }
.result small { color: var(--muted); }
.result-emoji { font-size: 1.4rem; width: 40px; height: 40px; display: grid; place-items: center; background: var(--surface-2); border-radius: 10px; flex: none; }
.result-empty { padding: 14px 16px; margin: 0; color: var(--muted); }
.hero-stats { display: flex; gap: 28px; list-style: none; padding: 0; margin: 26px 0 0; color: var(--muted); font-size: .95rem; }
.hero-stats strong { display: block; color: var(--ink); font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; }
.hero-visual { position: relative; }
.hero-visual img { border-radius: 24px; box-shadow: var(--shadow-lg); aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.floating-card {
  position: absolute; display: flex; gap: 12px; align-items: center; background: var(--surface); color: var(--ink);
  padding: 12px 16px; border-radius: 14px; box-shadow: var(--shadow-lg); border: 1px solid var(--line);
  animation: float 6s ease-in-out infinite;
}
.floating-card:hover { text-decoration: none; transform: scale(1.03); }
.floating-card > span { font-size: 1.6rem; }
.floating-card strong { display: block; font-size: .95rem; }
.floating-card small { color: var(--muted); font-size: .8rem; }
.fc-timer { left: -24px; bottom: 28px; }
.fc-noten { right: -16px; top: 24px; animation-delay: -3s; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@media (max-width: 900px) {
  .hero { padding-top: 32px; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .fc-timer { left: 12px; bottom: 12px; }
  .fc-noten { right: 12px; top: 12px; }
}
@media (max-width: 560px) {
  .search-box { flex-wrap: wrap; padding: 8px; }
  .search-box input { flex-basis: calc(100% - 40px); }
  .search-box .btn { width: 100%; }
  .hero-stats { gap: 18px; }
  .floating-card small { display: none; }
}

/* ---------- Karten / Grid ---------- */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 960px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-3 { grid-template-columns: 1fr; } }
.grid-span { grid-column: 1 / -1; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 24px; }
.place-card { position: relative; overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.place-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.place-card.is-featured { border: 2px solid #f5b301; }
.place-cover { position: relative; height: 112px; display: grid; place-items: center; }
.place-emoji { font-size: 2.6rem; filter: drop-shadow(0 4px 8px rgba(0,0,0,.15)); transition: transform .3s; }
.place-card:hover .place-emoji { transform: scale(1.15) rotate(-6deg); }
.place-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.place-body h3 { margin: 0 0 4px; }
.place-body h3 a { color: var(--ink); }
.stretched::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.place-city { font-size: .875rem; color: var(--muted); margin: 0 0 10px; }
.place-desc { font-size: .93rem; color: var(--ink-2); flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: .76rem; font-weight: 600; padding: 4px 9px; border-radius: 8px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.near-dist { margin-top: 12px; font-size: .85rem; font-weight: 700; color: var(--blue); }
.fav-btn {
  position: absolute; top: 10px; right: 10px; z-index: 2; width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.92); color: var(--brand); font-size: 1.25rem; line-height: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,.12); transition: transform .15s;
}
.fav-btn:hover { transform: scale(1.1); }
.fav-btn.is-fav { background: var(--brand); color: #fff; }
.fav-btn.pop { animation: pop .4s ease; }
@keyframes pop { 50% { transform: scale(1.35); } }
.fav-btn-lg { position: static; width: auto; height: auto; border-radius: 12px; font-size: .95rem; box-shadow: none; color: var(--ink); }
.fav-btn-lg.is-fav { background: var(--brand); color: #fff !important; border-color: var(--brand); }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 4px 9px; border-radius: 999px; }
.badge-partner { background: #fff6d6; color: #8a6100; }
.place-cover .badge-partner { position: absolute; top: 12px; left: 12px; z-index: 2; }
.live-badge { position: absolute; bottom: 10px; left: 10px; z-index: 2; font-size: .74rem; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: rgba(255,255,255,.95); color: #111; }
.live-badge.lvl-1, .live-pill.lvl-1 { background: #dcfce7; color: #166534; }
.live-badge.lvl-2, .live-pill.lvl-2 { background: #fef3c7; color: #92400e; }
.live-badge.lvl-3, .live-pill.lvl-3 { background: #fee2e2; color: #991b1b; }

/* Cover-Farben je Kategorie */
.cover-default, .cover-zentral { background: linear-gradient(135deg, #e0e7ff, #fce7f3); }
.cover-bibliothek { background: linear-gradient(135deg, #dbeafe, #e0e7ff); }
.cover-cafe { background: linear-gradient(135deg, #fde68a, #fecaca); }
.cover-bar { background: linear-gradient(135deg, #fbcfe8, #ddd6fe); }
.cover-coworking { background: linear-gradient(135deg, #cffafe, #c7d2fe); }
.cover-outdoor { background: linear-gradient(135deg, #bbf7d0, #d9f99d); }
.cover-see { background: linear-gradient(135deg, #bae6fd, #a5f3fc); }
.cover-universitaet, .cover-schule { background: linear-gradient(135deg, #fecdd3, #fde7ee); }
.cover-ruhig { background: linear-gradient(135deg, #e9d5ff, #dbeafe); }
.cover-museum { background: linear-gradient(135deg, #fed7aa, #fde68a); }
.cover-hotel { background: linear-gradient(135deg, #e5e7eb, #fde68a); }
.cover-wlan, .cover-steckdosen { background: linear-gradient(135deg, #ccfbf1, #e0f2fe); }
@media (prefers-color-scheme: dark) {
  .place-cover::before { content: ''; position: absolute; inset: 0; background: rgba(15,18,24,.38); }
  .place-emoji { position: relative; }
  .fav-btn { background: rgba(23,27,35,.9); }
}

/* ---------- Karte (Leaflet) ---------- */
.map { height: 460px; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; z-index: 1; margin-bottom: 28px; background: var(--surface-2); }
.map-lg { height: 540px; }
.map-sm { height: 300px; margin: 0; }
@media (max-width: 600px) { .map, .map-lg { height: 380px; } }
.pin span {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: var(--brand); border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,.3);
}
.pin i { transform: rotate(45deg); font-style: normal; font-size: 15px; line-height: 1; }
.pin-partner span { background: #f5b301; }
.leaflet-popup-content-wrapper { border-radius: 14px; }
.leaflet-tile-pane { filter: saturate(.85); }
@media (prefers-color-scheme: dark) { .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.9) contrast(.9) saturate(.6); } }
.leaflet-popup-content { margin: 14px 16px; min-width: 220px; font-family: inherit; }
.popup strong { display: block; font-size: 1rem; color: #111; }
.popup-city { display: block; font-size: .8rem; color: #6b7280; margin-bottom: 6px; }
.popup p { margin: 0 0 8px !important; font-size: .85rem; color: #374151; }
.popup .chips { margin-bottom: 10px; }
.popup .chip { background: #f3f4f6; color: #374151; }

/* ---------- Filter ---------- */
.toolbar { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.toolbar .filter-bar { margin: 0; flex: 1; }
.chip-btn {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); padding: 8px 14px; border-radius: 999px;
  font-size: .88rem; font-weight: 600; transition: all .15s;
}
.chip-btn small { opacity: .6; font-weight: 600; margin-left: 2px; }
.chip-btn:hover { border-color: var(--muted); }
.chip-btn.active { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.empty-state { text-align: center; padding: 32px; color: var(--muted); }

/* ---------- Kantone ---------- */
.canton-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.canton-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px; color: var(--ink); transition: transform .15s, box-shadow .15s, border-color .15s;
}
.canton-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--brand); text-decoration: none; }
.canton-card img { width: 40px; height: 40px; object-fit: contain; }
.canton-name { font-weight: 700; }
.canton-count { font-size: .82rem; color: var(--muted); }
.canton-hero {
  position: relative; color: #fff; padding: 36px 0 44px; background-color: #1f2430;
  background-image: linear-gradient(180deg, rgba(10,12,20,.45), rgba(10,12,20,.85)), var(--hero, none);
  background-size: cover; background-position: center;
}
.canton-hero-head { display: flex; align-items: center; gap: 20px; margin-top: 18px; }
.canton-hero h1 { margin: 0 0 4px; color: #fff; }
.canton-meta { margin: 0; opacity: .9; }
.wappen { width: 72px; height: 72px; object-fit: contain; background: rgba(255,255,255,.95); padding: 8px; border-radius: 16px; flex: none; }
.breadcrumb { font-size: .85rem; opacity: .9; }
.breadcrumb a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.breadcrumb span { margin: 0 4px; opacity: .6; }
.intro { font-size: 1.08rem; color: var(--ink-2); max-width: 52em; margin-bottom: 24px; }
.pill-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-links a { padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-size: .9rem; }
.pill-links a:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }

/* ---------- Lernort-Detail ---------- */
.place-hero { padding: 28px 0 32px; color: #111827; }
.place-hero .breadcrumb { color: #374151; }
.place-hero-head { display: flex; gap: 20px; align-items: center; margin: 18px 0 22px; }
.place-hero-emoji { font-size: 3rem; width: 88px; height: 88px; display: grid; place-items: center; background: rgba(255,255,255,.75); border-radius: 22px; box-shadow: var(--shadow); flex: none; }
.place-hero h1 { margin: 6px 0 4px; font-size: clamp(1.8rem, 4vw, 2.6rem); color: #111827; }
.place-hero-meta { margin: 0; color: #374151; font-weight: 500; }
.place-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.place-hero .btn-light { background: rgba(255,255,255,.85); color: #111827 !important; border-color: rgba(0,0,0,.08); }
.place-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; padding-top: 28px; align-items: start; }
.place-main > * + * { margin-top: 20px; }
@media (max-width: 900px) { .place-layout { grid-template-columns: 1fr; } .place-side { order: -1; } }
.sticky { position: sticky; top: 86px; }
.lead-sm { font-size: 1.08rem; color: var(--ink-2); }
.amenities { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 14px; }
.amenities li { display: flex; gap: 14px; align-items: flex-start; }
.amenities p { margin: 2px 0 0; color: var(--muted); font-size: .92rem; }
.amenity-icon { font-size: 1.3rem; width: 44px; height: 44px; display: grid; place-items: center; background: var(--surface-2); border-radius: 12px; flex: none; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0 0 18px; font-size: .93rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.report { text-align: center; }

/* Live-Check */
.live-card { border: 2px solid var(--brand-soft); }
.live-head h2 { font-size: 1.2rem; }
.live-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-weight: 700; font-size: .85rem; margin-right: 4px; }
.live-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 10px 0 18px; }
.live-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px; border-radius: 14px;
  border: 2px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 650; font-size: .9rem; transition: all .15s;
}
.live-btn span { font-size: 1.8rem; }
.live-btn:hover { border-color: var(--brand); transform: translateY(-2px); }
.live-btn.selected { border-color: var(--brand); background: var(--brand-soft); }
.live-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.like-btn { border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); padding: 8px 14px; border-radius: 999px; font-weight: 650; }
.like-btn.liked { background: #dcfce7; color: #166534; border-color: #86efac; }

/* ---------- Tools / CTA ---------- */
.tools-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .tools-grid { grid-template-columns: 1fr; } }
.tool-card { display: block; padding: 28px; border-radius: 20px; color: var(--ink); border: 1px solid var(--line); background: var(--surface); transition: transform .2s, box-shadow .2s; position: relative; overflow: hidden; }
.tool-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); text-decoration: none; }
.tool-card p { color: var(--muted); }
.tool-emoji { font-size: 2.2rem; display: block; margin-bottom: 12px; }
.tool-cta { font-weight: 700; color: var(--brand); }
.tool-timer { background: linear-gradient(160deg, var(--brand-soft), var(--surface) 60%); }
.tool-noten { background: linear-gradient(160deg, rgba(37,99,235,.12), var(--surface) 60%); }
.tool-fav { background: linear-gradient(160deg, rgba(245,179,1,.15), var(--surface) 60%); }
.cta-band {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  margin-top: 48px; padding: 36px 40px; border-radius: 24px; color: #fff;
  background: linear-gradient(120deg, #da164e, #8b1cf0);
}
.cta-band h2 { color: #fff; margin-bottom: 6px; }
.cta-band p { margin: 0; opacity: .92; max-width: 40em; }
.cta-small { padding: 26px 30px; }
.cta-small h2 { font-size: 1.3rem; }

/* ---------- FAQ ---------- */
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; }
.faq summary { padding: 16px 20px; font-weight: 650; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.3rem; line-height: 1; color: var(--brand); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 20px 16px; color: var(--ink-2); }

/* ---------- Anzeigen ---------- */
.ad { margin: 32px 0; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px dashed var(--line); min-height: 120px; }
.ad-label { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; }

/* ---------- Formulare ---------- */
.form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 650; margin-bottom: 6px; font-size: .93rem; }
.field small { color: var(--muted); font-weight: 400; }
.input, .field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); font: inherit; transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(218,22,78,.12); }
.check-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.check-grid label { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; font-weight: 550; font-size: .9rem; cursor: pointer; background: var(--surface); }
.check-grid input { width: auto; accent-color: var(--brand); }
.hp { position: absolute; left: -5000px; }
.notice { padding: 16px 20px; border-radius: 14px; margin-bottom: 20px; }
.notice-ok { background: #dcfce7; color: #14532d; }
.notice-err { background: #fee2e2; color: #7f1d1d; }

/* ---------- Content-Seiten ---------- */
.page-hero { padding: 48px 0 20px; }
.page-hero p { font-size: 1.1rem; color: var(--ink-2); max-width: 44em; }
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.legal { padding-bottom: 48px; }
.legal h3 { font-size: 1.05rem; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 72px; background: var(--surface); border-top: 1px solid var(--line); padding: 48px 0 24px; font-size: .93rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: var(--ink-2); }
.site-footer .logo img { width: 110px; margin-bottom: 14px; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); z-index: 1000;
  background: var(--ink); color: var(--surface); padding: 12px 20px; border-radius: 12px; font-weight: 600;
  box-shadow: var(--shadow-lg); transition: transform .3s cubic-bezier(.2,.9,.3,1.2); max-width: calc(100% - 32px);
}
.toast.show { transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ============================================================
   Lern-Timer
   ============================================================ */
.h3 { font-size: 1.1rem; }
.timer-page { padding: 32px 0 8px; --mode: var(--brand); transition: background .4s; }
.timer-page[data-mode="short"] { --mode: #0d9488; }
.timer-page[data-mode="long"] { --mode: #2563eb; }
.timer-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.timer-head h1 { margin: 0 0 4px; }
.timer-head p { margin: 0; }
.timer-place { font-weight: 600; }
.timer-layout { display: grid; grid-template-columns: 1.25fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 900px) { .timer-layout { grid-template-columns: 1fr; } }
.timer-side { display: grid; gap: 20px; }
.timer-card { padding: 24px; text-align: center; }
.mode-tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 14px; margin-bottom: 20px; flex-wrap: wrap; justify-content: center; }
.mode-tab { border: 0; background: transparent; color: var(--ink-2); font-weight: 650; padding: 9px 16px; border-radius: 10px; font-size: .92rem; }
.mode-tab.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.ring-wrap { position: relative; width: min(360px, 82vw); aspect-ratio: 1; margin: 0 auto; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; }
.ring-bg { stroke: var(--surface-2); }
.ring-fg { stroke: var(--mode); stroke-linecap: round; transition: stroke-dashoffset .3s linear, stroke .4s; }
.ring-center { position: absolute; inset: 0; display: grid; place-content: center; }
.time { font-size: clamp(3.4rem, 12vw, 5.2rem); font-weight: 800; letter-spacing: -.04em; font-variant-numeric: tabular-nums; line-height: 1; }
.time-label { color: var(--muted); font-weight: 600; margin-top: 8px; }
.is-running .time { color: var(--mode); }
.round-dots { display: flex; justify-content: center; gap: 8px; margin: 16px 0 6px; }
.round-dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--line); transition: .3s; }
.round-dots span.done { background: var(--mode); }
.round-dots span.now { background: var(--mode); opacity: .45; transform: scale(1.3); }
.current-task { font-weight: 650; color: var(--ink-2); margin: 8px 0 0; }
.timer-controls { display: flex; justify-content: center; align-items: center; gap: 16px; margin: 22px 0 10px; }
.ctrl { border: 0; border-radius: 999px; font-weight: 750; transition: transform .15s, background .2s; }
.ctrl:active { transform: scale(.96); }
.ctrl-main { min-width: 170px; padding: 18px 32px; font-size: 1.2rem; background: var(--mode); color: #fff; box-shadow: 0 8px 24px color-mix(in srgb, var(--mode) 40%, transparent); }
.ctrl-sec { width: 52px; height: 52px; font-size: 1.3rem; background: var(--surface-2); color: var(--ink-2); }
.ctrl-sec:hover { background: var(--line); }
.timer-settings { text-align: left; margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.timer-settings summary { cursor: pointer; font-weight: 650; color: var(--ink-2); }
.preset-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.settings-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
@media (max-width: 560px) { .settings-grid { grid-template-columns: 1fr 1fr; } }
.settings-grid label { font-size: .8rem; font-weight: 600; color: var(--muted); display: grid; gap: 4px; }
.input { padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; width: 100%; }
.switch { display: flex; align-items: center; gap: 8px; font-size: .92rem; margin: 6px 0; cursor: pointer; }
.switch input { accent-color: var(--brand); width: 18px; height: 18px; }
.sound-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.sound-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: .82rem; font-weight: 650; transition: .15s; }
.sound-btn span { font-size: 1.4rem; }
.sound-btn:hover { border-color: var(--muted); }
.sound-btn.active { border-color: var(--brand); background: var(--brand-soft); color: var(--ink); }
.volume { display: flex; align-items: center; gap: 10px; }
.volume input { flex: 1; accent-color: var(--brand); }
.task-form { display: flex; gap: 8px; margin-bottom: 10px; }
.tasks { list-style: none; padding: 0; margin: 0; max-height: 260px; overflow-y: auto; }
.tasks li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.tasks label { display: flex; align-items: center; gap: 10px; cursor: pointer; flex: 1; }
.tasks input { accent-color: var(--brand); width: 18px; height: 18px; flex: none; }
.tasks li.done span { text-decoration: line-through; color: var(--muted); }
.tasks button { border: 0; background: none; color: var(--muted); font-size: 1.2rem; padding: 0 6px; }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; margin-bottom: 16px; }
.stats-row strong { display: block; font-size: 1.7rem; font-weight: 800; letter-spacing: -.03em; }
.stats-row small { color: var(--muted); font-size: .78rem; }
.week-chart { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; height: 110px; align-items: end; margin-bottom: 8px; }
.week-chart .bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.week-chart .bar span { width: 100%; max-width: 28px; min-height: 4px; background: var(--line); border-radius: 6px 6px 3px 3px; transition: height .5s; }
.week-chart .bar.today span { background: var(--brand); }
.week-chart small { font-size: .72rem; color: var(--muted); }
.sponsor { display: grid; gap: 4px; color: var(--ink); }
.sponsor:hover { text-decoration: none; border-color: var(--brand); }
.timer-content { padding-top: 16px; }

/* Fokus-Modus: nur der Timer */
.focus-mode .site-header, .focus-mode .site-footer, .focus-mode .timer-side, .focus-mode .timer-content,
.focus-mode .timer-settings, .focus-mode .mode-tabs, .focus-mode .timer-head > div { display: none !important; }
.focus-mode .timer-page { min-height: 100vh; display: grid; place-items: center; padding: 20px 0; }
.focus-mode .timer-layout { grid-template-columns: 1fr; }
.focus-mode .timer-card { border: 0; box-shadow: none; background: transparent; }
.focus-mode .timer-head { position: fixed; top: 16px; right: 16px; margin: 0; z-index: 5; }
.focus-mode .ring-wrap { width: min(520px, 86vw, 70vh); }

/* ============================================================
   Notenrechner
   ============================================================ */
.noten-card { padding: 24px; }
.noten-card .mode-tabs { margin-bottom: 24px; }
.grade-head, .grade-row { display: grid; grid-template-columns: 1fr 110px 100px 40px; gap: 10px; align-items: center; }
.grade-head { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.grade-row { margin-bottom: 8px; }
.row-del { border: 0; background: var(--surface-2); color: var(--muted); width: 36px; height: 36px; border-radius: 10px; font-size: 1.2rem; }
.row-del:hover { background: #fee2e2; color: var(--red); }
@media (max-width: 560px) {
  .grade-head { display: none; }
  .grade-row { grid-template-columns: 1fr 1fr 40px; }
  .grade-row input:first-child { grid-column: 1 / -1; }
}
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 12px 0 20px; }
.round-select { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 600; color: var(--muted); }
.round-select select { width: auto; }
.result-box { background: var(--surface-2); border-radius: 16px; padding: 22px; }
.big-result { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.big-num { font-size: 3.4rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.big-label { font-weight: 700; font-size: 1.05rem; }
.g-good .big-num, .g-good .big-label { color: var(--green); }
.g-ok .big-num, .g-ok .big-label { color: var(--amber); }
.g-bad .big-num, .g-bad .big-label { color: var(--red); }
.result-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 10px; }
@media (max-width: 560px) { .result-stats { grid-template-columns: 1fr 1fr; } }
.result-stats div { background: var(--surface); border-radius: 12px; padding: 12px; }
.result-stats strong { display: block; font-size: 1.3rem; }
.result-stats small { color: var(--muted); font-size: .78rem; }
.pos { color: var(--green); }
.neg { color: var(--red); }
.table-title { margin-top: 24px; }
.table-scroll { overflow-x: auto; }
.scale-table { width: 100%; max-width: 420px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.scale-table th, .scale-table td { padding: 8px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.scale-table th { font-size: .8rem; color: var(--muted); text-transform: uppercase; }
.scale-table tr.g-good td:first-child { color: var(--green); font-weight: 700; }
.scale-table tr.g-ok td:first-child { color: var(--amber); font-weight: 700; }
.scale-table tr.g-bad td:first-child { color: var(--red); font-weight: 700; }
.scale-table tr.current { background: var(--brand-soft); }

.check-list { list-style: none; padding: 0; margin: 14px 0 0; }
.check-list li { padding-left: 24px; position: relative; margin-bottom: 6px; font-size: .93rem; }
.check-list li::before { content: "\2713"; position: absolute; left: 0; color: var(--green); font-weight: 800; }

/* ============================================================
   Lernplan & Countdown
   ============================================================ */
.countdown-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; margin-bottom: 24px; }
.countdown-card {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow); border-top: 5px solid var(--c);
}
.cd-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.cd-top strong { font-size: 1.05rem; }
.cd-actions { display: flex; gap: 2px; flex: none; }
.cd-actions button { border: 0; background: none; padding: 2px 4px; border-radius: 6px; opacity: .55; }
.cd-actions button:hover { opacity: 1; background: var(--surface-2); }
.cd-days { display: flex; align-items: baseline; gap: 8px; margin: 8px 0 2px; color: var(--c); }
.cd-num { font-size: 3rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.cd-num.cd-small { font-size: 1.6rem; }
.cd-unit { font-weight: 700; }
.cd-date { color: var(--muted); font-size: .88rem; margin-bottom: 12px; }
.cd-bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.cd-bar span { display: block; height: 100%; background: var(--c); border-radius: 99px; transition: width .5s; }
.cd-meta { font-size: .82rem; color: var(--muted); margin-top: 6px; font-weight: 600; }
.plan-empty { display: flex; gap: 16px; align-items: center; grid-column: 1 / -1; }
.plan-empty > span { font-size: 2.4rem; }
.plan-empty p { margin: 0; }

.plan-layout { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
@media (max-width: 960px) { .plan-layout { grid-template-columns: 1fr; } .plan-side { order: -1; } }
.plan-main, .plan-side { display: grid; gap: 20px; }
.plan-main .section-head h2 { font-size: 1.3rem; }
.plan-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.form-actions { display: flex; gap: 8px; }
.plan-subhead { font-size: .95rem; margin: 18px 0 8px; color: var(--amber); }

.plan-task {
  display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 12px; background: var(--surface-2); margin-bottom: 8px; cursor: pointer;
  border-left: 4px solid var(--c); transition: opacity .2s;
}
.plan-task input { width: 20px; height: 20px; accent-color: var(--c); margin: 0; }
.plan-subject { font-size: .75rem; font-weight: 700; color: #fff; background: var(--c); padding: 3px 8px; border-radius: 6px; white-space: nowrap; max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.plan-label { font-weight: 550; }
.plan-hours { font-size: .8rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.plan-task.is-done { opacity: .55; }
.plan-task.is-done .plan-label { text-decoration: line-through; }
.plan-task.is-review .plan-label { font-weight: 700; }
@media (max-width: 560px) {
  .plan-task { grid-template-columns: auto 1fr auto; }
  .plan-subject { grid-column: 2 / 4; justify-self: start; }
  .plan-label { grid-column: 2 / 3; }
}
.plan-day { display: grid; grid-template-columns: 120px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.plan-day:last-child { border-bottom: 0; }
.plan-date { font-weight: 700; color: var(--ink-2); padding-top: 8px; }
.plan-day.is-today .plan-date { color: var(--brand); }
@media (max-width: 560px) { .plan-day { grid-template-columns: 1fr; gap: 6px; } .plan-date { padding: 0; } }
.plan-exam { font-weight: 800; padding: 10px 12px; border-radius: 12px; margin-bottom: 8px; color: #fff; background: var(--c); }
.weekday-picker { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 12px; }
.wd-btn { padding: 9px 0; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-weight: 700; font-size: .85rem; }
.wd-btn.active { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.timer-import { width: 100%; margin-bottom: 10px; }
.tool-plan { background: linear-gradient(160deg, rgba(13,148,136,.14), var(--surface) 60%); }
.tools-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

@media print {
  .site-header, .site-footer, .plan-side, .page-hero, .ad, .section, .faq, .plan-actions, #show-all, .cd-actions, #today-card .btn { display: none !important; }
  .plan-layout { grid-template-columns: 1fr; }
  body { background: #fff; }
  .card, .countdown-card { box-shadow: none; }
}

/* ============================================================
   Bestenlisten, Lernort des Monats, Öffnungszeiten, Sessions
   ============================================================ */
.ranking { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.ranking-item { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: start; }
.ranking-item .place-card { flex-direction: row; }
.ranking-item .place-cover { width: 140px; height: auto; min-height: 100%; flex: none; }
@media (max-width: 600px) {
  .ranking-item { grid-template-columns: 40px 1fr; }
  .ranking-item .place-card { flex-direction: column; }
  .ranking-item .place-cover { width: auto; height: 90px; }
}
.rank { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-size: 1.3rem; font-weight: 800; box-shadow: var(--shadow); }
.ranking-item:nth-child(1) .rank { background: #f5b301; color: #fff; border-color: #f5b301; }
.ranking-item:nth-child(2) .rank { background: #9ca3af; color: #fff; border-color: #9ca3af; }
.ranking-item:nth-child(3) .rank { background: #b45309; color: #fff; border-color: #b45309; }
@media (max-width: 600px) { .rank { width: 36px; height: 36px; font-size: 1rem; border-radius: 10px; } }
.ranking-ad { list-style: none; }
.best-canton { margin-bottom: 18px; }
.best-canton h3 { display: flex; align-items: center; gap: 8px; font-size: 1rem; }
.best-canton img { width: 24px; height: 24px; object-fit: contain; }
.pill-links-lg a { padding: 10px 16px; font-weight: 600; }

.pom { display: grid; grid-template-columns: 260px 1fr; overflow: hidden; color: var(--ink); transition: transform .2s, box-shadow .2s; }
.pom:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); text-decoration: none; }
.pom-cover { display: grid; place-items: center; position: relative; min-height: 180px; }
.pom-cover span { font-size: 4.5rem; position: relative; }
.pom-body { padding: 26px 28px; }
.pom-body .eyebrow { margin-bottom: 10px; }
.pom-body h2 { margin-bottom: 4px; }
@media (max-width: 700px) { .pom { grid-template-columns: 1fr; } .pom-cover { min-height: 120px; } }

.open-state { font-weight: 600; white-space: nowrap; }
.open-state.is-open { color: var(--green); }
.open-state.is-closed { color: var(--red); }
.hours { border-top: 1px solid var(--line); padding-top: 14px; margin-bottom: 16px; }
.hours h3 { font-size: .95rem; display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.hours h3 .open-state { font-size: .82rem; }
.hours table { width: 100%; border-collapse: collapse; font-size: .9rem; margin-bottom: 6px; }
.hours th { text-align: left; color: var(--muted); font-weight: 600; padding: 3px 10px 3px 0; white-space: nowrap; vertical-align: top; }
.hours td { padding: 3px 0; font-variant-numeric: tabular-nums; }

.timer-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.session-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 18px; margin-bottom: 20px; border-radius: 14px; background: var(--brand-soft); border: 1px solid rgba(218,22,78,.25);
}
.session-actions { display: flex; gap: 8px; }
.live-count { font-size: .88rem; font-weight: 600; color: var(--green); margin: 8px 0 0; }
.in-session .timer-controls, .in-session .mode-tabs, .in-session .timer-settings, .in-session #group-btn { display: none !important; }
