:root {
  --green: #087443;
  --green-dark: #075833;
  --orange: #ef4f23;
  --yellow: #f5c51b;
  --red: #ed1f2c;
  --ink: #17251d;
  --muted: #65746b;
  --surface: #ffffff;
  --canvas: #fff8ec;
  --line: #dfe7e1;
  --shadow: 0 14px 40px rgba(19, 62, 38, .13);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: Inter, ui-rounded, "SF Pro Rounded", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100%; background: var(--canvas); -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid rgba(8, 116, 67, .28); outline-offset: 2px; }
a { color: inherit; }
[hidden] { display: none !important; }

.app-header {
  position: fixed; inset: 0 0 auto; z-index: 80; height: calc(68px + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 14px 0; display: grid; grid-template-columns: 44px 1fr 44px;
  align-items: center; background: rgba(255, 255, 255, .94); border-bottom: 1px solid rgba(8, 116, 67, .1);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.icon-button, .language-button { width: 42px; height: 42px; border: 0; border-radius: 14px; background: #eef6f1; color: var(--green); font-weight: 900; cursor: pointer; }
.icon-button { font-size: 1.35rem; }
.language-button { font-size: .82rem; letter-spacing: .04em; }
.brand { min-width: 0; justify-self: center; display: flex; align-items: center; gap: 8px; text-decoration: none; }
.brand img { width: 48px; height: 48px; object-fit: contain; }
.brand span { display: grid; line-height: 1.05; }
.brand strong { color: var(--green); font-size: 1.08rem; }
.brand small { color: var(--muted); font-size: .7rem; margin-top: 4px; white-space: nowrap; }

main { max-width: 1120px; margin: 0 auto; padding: calc(86px + env(safe-area-inset-top, 0px)) 16px calc(118px + var(--safe-bottom)); }
.page { display: none; animation: page-in .22s ease-out; }
.page.active { display: block; }
@keyframes page-in { from { opacity: 0; transform: translateY(7px); } }
.page-title { margin: 7px 2px 18px; }
.page-title h1 { margin: 0; font-size: clamp(1.8rem, 7vw, 2.55rem); line-height: 1.05; letter-spacing: -.035em; }
.eyebrow { margin: 0 0 6px; color: var(--orange); font-size: .77rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.map-title-row { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.pill-button, .primary-button { border: 0; border-radius: 14px; background: var(--green); color: #fff; font-weight: 850; padding: 11px 14px; cursor: pointer; box-shadow: 0 8px 24px rgba(8, 116, 67, .2); }
.pill-button { display: flex; align-items: center; gap: 7px; white-space: nowrap; font-size: .84rem; }

.map-toolbar, .schedule-toolbar, .date-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: none; }
.map-toolbar::-webkit-scrollbar, .schedule-toolbar::-webkit-scrollbar, .date-tabs::-webkit-scrollbar { display: none; }
.filter-chip, .date-tab { flex: 0 0 auto; border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 999px; padding: 9px 13px; font-weight: 750; font-size: .82rem; cursor: pointer; }
.filter-chip.active, .date-tab.active { border-color: var(--green); background: var(--green); color: #fff; }
.map-card { overflow: hidden; border-radius: 23px; background: #fff; box-shadow: var(--shadow); border: 1px solid rgba(8, 116, 67, .1); }
.map-viewport { position: relative; width: 100%; aspect-ratio: 1023 / 1080; overflow: hidden; background: #dcefcf; touch-action: none; cursor: grab; }
.map-viewport.dragging { cursor: grabbing; }
.map-world { position: absolute; width: 100%; aspect-ratio: 1023 / 1537; left: 0; top: 0; transform-origin: 0 0; will-change: transform; overflow: hidden; }
.map-image { display: block; width: 100%; height: auto; user-select: none; pointer-events: none; }
.marker-layer, .route-layer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.route-layer { z-index: 2; overflow: visible; }
.marker-layer { z-index: 3; }
.route-layer path { filter: drop-shadow(0 2px 3px rgba(255,255,255,.95)); }
.map-marker { --marker-color: var(--orange); position: absolute; left: calc(var(--x) * 100%); top: calc(var(--y) * 100%); transform: translate(-50%, -100%); width: 34px; height: 42px; padding: 0; border: 3px solid #fff; border-radius: 18px 18px 18px 5px; rotate: -45deg; background: var(--marker-color); color: #fff; box-shadow: 0 5px 14px rgba(22, 42, 29, .36); pointer-events: auto; cursor: pointer; transition: scale .15s ease, opacity .15s ease; }
.map-marker span { display: grid; place-items: center; width: 100%; height: 100%; rotate: 45deg; font-size: .9rem; font-weight: 900; }
.map-marker:hover, .map-marker:focus-visible { scale: 1.12; z-index: 4; }
.map-marker.filtered { opacity: 0; pointer-events: none; }
.map-marker.room { --marker-color: #6f3fc5; }
.map-marker.location { --marker-color: #168dcc; width: 30px; height: 30px; border-radius: 50%; rotate: 0deg; transform: translate(-50%, -50%); animation: gps-pulse 1.8s infinite; }
.map-marker.location span { rotate: 0deg; }
@keyframes gps-pulse { 50% { box-shadow: 0 0 0 12px rgba(22, 141, 204, .16); } }
.map-actions { position: absolute; right: 10px; bottom: 12px; display: grid; gap: 6px; }
.map-actions button { width: 42px; height: 42px; border: 0; border-radius: 13px; background: rgba(255,255,255,.94); color: var(--green); box-shadow: 0 5px 18px rgba(0,0,0,.18); font-size: 1.15rem; font-weight: 900; cursor: pointer; }
.map-instruction { position: absolute; z-index: 5; left: 50%; top: 14px; transform: translateX(-50%); max-width: calc(100% - 100px); padding: 9px 12px; border-radius: 999px; background: var(--ink); color: #fff; font-size: .75rem; font-weight: 800; text-align: center; box-shadow: var(--shadow); }
.map-status { display: flex; align-items: center; gap: 8px; padding: 11px 14px; color: var(--muted); font-size: .78rem; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }

.search-field { display: flex; align-items: center; gap: 8px; padding: 0 14px; background: #fff; border: 1px solid var(--line); border-radius: 15px; margin-bottom: 13px; }
.search-field input { width: 100%; border: 0; background: transparent; padding: 13px 0; outline: 0; }
.workshop-list, .notification-list { display: grid; gap: 11px; }
.workshop-card { display: grid; grid-template-columns: 62px 1fr auto; gap: 12px; align-items: start; padding: 15px; border-radius: 18px; background: #fff; box-shadow: 0 7px 24px rgba(28,64,40,.08); border-left: 5px solid var(--card-color, var(--orange)); }
.workshop-time { color: var(--green); font-weight: 900; font-size: .92rem; }
.workshop-time small { display: block; color: var(--muted); font-weight: 650; font-size: .65rem; margin-top: 3px; }
.workshop-info h2 { margin: 0 0 5px; font-size: 1rem; }
.workshop-info p { margin: 0; color: var(--muted); font-size: .78rem; }
.workshop-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.workshop-meta span { padding: 4px 7px; background: #eff6f1; color: var(--green-dark); border-radius: 7px; font-size: .65rem; font-weight: 750; }
.favorite-button { border: 0; background: transparent; color: #a9b4ad; font-size: 1.35rem; cursor: pointer; padding: 3px; }
.favorite-button.active { color: var(--red); }
.cancelled { opacity: .65; }
.cancelled .workshop-info h2 { text-decoration: line-through; }

.artist-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.artist-card { overflow: hidden; border: 0; padding: 0; text-align: left; background: #fff; border-radius: 19px; box-shadow: 0 8px 25px rgba(28,64,40,.1); cursor: pointer; }
.artist-card-image { aspect-ratio: 4 / 4.6; background: linear-gradient(135deg,#e6f4eb,#fff2dc); display: grid; place-items: center; overflow: hidden; color: var(--green); font-size: 2.2rem; font-weight: 900; }
.artist-card-image img { width: 100%; height: 100%; object-fit: cover; }
.artist-card-info { padding: 12px; }
.artist-card-info strong { display: block; font-size: .95rem; }
.artist-card-info small { display: block; color: var(--orange); margin-top: 4px; font-weight: 750; }

.push-card { display: grid; grid-template-columns: auto 1fr; gap: 13px; padding: 18px; border-radius: 21px; background: linear-gradient(135deg,var(--green),var(--green-dark)); color: #fff; box-shadow: var(--shadow); margin-bottom: 18px; }
.push-card h2 { margin: 0 0 5px; font-size: 1rem; }
.push-card p { margin: 0; opacity: .84; font-size: .8rem; }
.push-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: rgba(255,255,255,.16); color: var(--yellow); }
.push-card .primary-button { grid-column: 1 / -1; background: #fff; color: var(--green); box-shadow: none; }
.notification-card { padding: 16px; border-radius: 17px; background: #fff; border: 1px solid var(--line); }
.notification-card time { color: var(--orange); font-size: .7rem; font-weight: 800; }
.notification-card h2 { margin: 5px 0 5px; font-size: 1rem; }
.notification-card p { margin: 0; color: var(--muted); font-size: .83rem; white-space: pre-line; }

.legend-card, .info-card, .settings-list { background: #fff; border-radius: 21px; box-shadow: 0 8px 28px rgba(28,64,40,.08); overflow: hidden; }
.legend-row { display: flex; align-items: center; gap: 13px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.legend-row:last-child { border: 0; }
.legend-row div { display: grid; gap: 3px; }
.legend-row small { color: var(--muted); }
.legend-pin { flex: 0 0 auto; width: 39px; height: 39px; display: grid; place-items: center; border-radius: 13px; color: #fff; font-weight: 900; background: var(--orange); }
.legend-pin.dance { background: var(--orange); }.legend-pin.facility { background: var(--green); }.legend-pin.meeting { background: var(--yellow); color: var(--ink); }.legend-pin.room { background: #6f3fc5; }.legend-pin.gps { background: #168dcc; }
.info-card { margin-top: 13px; padding: 17px; }
.info-card h2 { margin: 0 0 7px; font-size: 1rem; }.info-card p { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.55; }
.setting-row { width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 15px; border: 0; border-bottom: 1px solid var(--line); text-align: left; background: transparent; cursor: pointer; }
.setting-row:last-child { border: 0; }.setting-row span:nth-child(2) { display: grid; gap: 3px; }.setting-row small { color: var(--muted); }.setting-row b { color: var(--muted); font-size: 1.5rem; }
.setting-icon { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 12px; color: var(--green); background: #eaf5ee; font-weight: 900; }
.privacy-note { display: flex; gap: 12px; margin-top: 14px; padding: 16px; border-radius: 18px; background: #e5f4ea; }
.privacy-note > span { flex: 0 0 auto; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--green); color: #fff; }
.privacy-note p { margin: 5px 0 0; color: var(--muted); font-size: .8rem; line-height: 1.45; }
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin: 24px 0; color: var(--muted); font-size: .76rem; }.legal-links a { color: var(--green); font-weight: 750; }
.empty-state { min-height: 240px; display: grid; place-items: center; align-content: center; text-align: center; padding: 35px; color: var(--muted); }
.empty-state > span { font-size: 2.4rem; color: var(--green); }.empty-state h2 { color: var(--ink); margin: 10px 0 5px; font-size: 1.1rem; }.empty-state p { margin: 0; max-width: 300px; font-size: .83rem; }


/* Schmaler, dauerhaft sichtbarer Legal-Footer über der Bottom-Navigation */
.legal-footer {
  position: fixed;
  z-index: 69;
  left: 0;
  right: 0;
  bottom: calc(68px + var(--safe-bottom));
  min-height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 2px 10px;
  background: rgba(255,255,255,.94);
  border-top: 1px solid rgba(8,116,67,.08);
  color: #7a897f;
  font-size: .63rem;
  line-height: 1.1;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.legal-footer a {
  color: #64766b;
  text-decoration: none;
  font-weight: 700;
}
.legal-footer a:focus-visible,
.legal-footer a:hover { color: var(--green); text-decoration: underline; }

.bottom-nav { position: fixed; z-index: 70; left: 0; right: 0; bottom: 0; height: calc(68px + var(--safe-bottom)); padding: 5px 8px var(--safe-bottom); display: grid; grid-template-columns: repeat(4,1fr); background: rgba(255,255,255,.96); border-top: 1px solid rgba(8,116,67,.12); backdrop-filter: blur(18px); }
.bottom-nav a { display: grid; justify-items: center; align-content: center; gap: 2px; color: #7a897f; text-decoration: none; font-weight: 750; }
.bottom-nav a > span { font-size: 1.35rem; line-height: 1; }.bottom-nav small { font-size: .64rem; }.bottom-nav a.active { color: var(--green); }
.menu-drawer { position: fixed; z-index: 100; inset: 0 auto 0 0; width: min(86vw,360px); padding: calc(16px + env(safe-area-inset-top,0px)) 15px calc(18px + var(--safe-bottom)); background: #fff; transform: translateX(-105%); transition: transform .24s ease; display: flex; flex-direction: column; box-shadow: 15px 0 50px rgba(0,0,0,.2); }
.menu-drawer.open { transform: translateX(0); }.drawer-backdrop { position: fixed; z-index: 95; inset: 0; background: rgba(9,31,18,.45); backdrop-filter: blur(2px); }
.drawer-head { display: grid; grid-template-columns: 58px 1fr 42px; align-items: center; gap: 10px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }.drawer-head img { width: 58px; height: 58px; object-fit: contain; }.drawer-head div { display: grid; }.drawer-head strong { color: var(--green); font-size: 1.15rem; }.drawer-head small { color: var(--muted); margin-top: 3px; }
.drawer-nav { display: grid; gap: 5px; padding: 18px 0; }.drawer-nav a { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; min-height: 48px; padding: 8px 12px; border-radius: 13px; text-decoration: none; color: var(--ink); font-weight: 750; }.drawer-nav a.active { background: #eaf5ee; color: var(--green); }.drawer-nav a > span:first-child { font-size: 1.2rem; }.drawer-nav b { min-width: 22px; height: 22px; display: grid; place-items: center; border-radius: 999px; background: var(--red); color: #fff; font-size: .68rem; }
.drawer-footer { margin-top: auto; display: flex; flex-wrap: wrap; gap: 12px; padding: 15px 10px 0; border-top: 1px solid var(--line); }.drawer-footer a { color: var(--muted); font-size: .72rem; }

.detail-dialog { width: min(92vw,500px); max-height: 82vh; border: 0; border-radius: 24px; padding: 26px; color: var(--ink); box-shadow: 0 24px 80px rgba(0,0,0,.25); }.detail-dialog::backdrop { background: rgba(10,34,19,.56); backdrop-filter: blur(3px); }.dialog-close { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border: 0; border-radius: 12px; background: #eef4f0; color: var(--green); font-size: 1.4rem; cursor: pointer; }.detail-dialog h2 { margin: 0 40px 8px 0; }.detail-dialog p { color: var(--muted); line-height: 1.5; }.detail-dialog .detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }.detail-dialog .detail-image { width: calc(100% + 52px); height: min(300px, 42vh); object-fit: cover; object-position: center top; margin: -26px -26px 20px; border-radius: 24px 24px 0 0; }
.toast { position: fixed; z-index: 150; left: 50%; bottom: calc(82px + var(--safe-bottom)); transform: translateX(-50%); max-width: min(88vw,450px); padding: 11px 15px; border-radius: 12px; background: var(--ink); color: #fff; font-size: .82rem; font-weight: 750; text-align: center; box-shadow: var(--shadow); }
.offline-badge { position: fixed; z-index: 200; top: calc(8px + env(safe-area-inset-top,0px)); left: 50%; transform: translateX(-50%); padding: 4px 10px; border-radius: 999px; background: var(--yellow); color: var(--ink); font-size: .7rem; font-weight: 900; }
.loading-screen { position: fixed; z-index: 300; inset: 0; display: grid; place-items: center; align-content: center; gap: 16px; background: var(--canvas); transition: opacity .3s ease, visibility .3s ease; }.loading-screen.done { opacity: 0; visibility: hidden; }.loading-screen img { width: min(55vw,240px); height: min(55vw,240px); object-fit: contain; }.loading-screen span { color: var(--green); font-weight: 900; font-size: 1.15rem; }.loader { width: 34px; height: 34px; border-radius: 50%; border: 4px solid #dcebe1; border-top-color: var(--orange); animation: spin .8s linear infinite; }@keyframes spin{to{rotate:360deg}}

@media (min-width: 760px) {
  main { padding-left: 28px; padding-right: 28px; }
  .map-page { max-width: 820px; margin: 0 auto; }
  .map-viewport { aspect-ratio: 1023 / 930; }
  .artist-grid { grid-template-columns: repeat(3,1fr); }
  .workshop-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .notification-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (min-width: 1100px) {
  .legal-footer { left: 50%; right: auto; width: 560px; transform: translateX(-50%); border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
  .bottom-nav { left: 50%; width: 560px; transform: translateX(-50%); border: 1px solid var(--line); border-bottom: 0; border-radius: 22px 22px 0 0; }
  .artist-grid { grid-template-columns: repeat(4,1fr); }
}

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

/* Compact programme view – v1.3 */
#page-schedule { max-width: 760px; margin: 0 auto; }
#page-schedule .page-title { margin-bottom: 12px; }
.schedule-search { margin-bottom: 10px; }
.schedule-modes { padding-bottom: 10px; }
.schedule-modes .filter-chip { padding: 10px 16px; font-size: .88rem; color: var(--ink); }
.schedule-modes .filter-chip.active { background: #fff1b9; border-color: #d4a91c; color: var(--ink); }
.date-tabs { margin: 0 -2px 10px; padding-bottom: 2px; }
.date-tab { padding: 10px 16px; font-size: .88rem; color: var(--ink); border-color: #cfd8d2; }
.date-tab.active { background: #cceaff; border-color: #31a6e8; color: var(--ink); }
.artist-filter-tabs { display: flex; gap: 7px; overflow-x: auto; margin: -2px 0 9px; padding: 2px 2px 5px; scrollbar-width: none; }
.artist-filter-tabs::-webkit-scrollbar { display: none; }
.artist-filter-chip { flex: 0 0 auto; border: 1px solid #cfd8d2; background: #fff; border-radius: 999px; padding: 8px 12px; color: var(--ink); font-size: .78rem; font-weight: 750; }
.artist-filter-chip.active { color: #fff; background: var(--green); border-color: var(--green); }
.workshop-list { display: block; }
.workshop-time-group { margin: 0 0 14px; }
.time-group-title { margin: 0 0 7px; font-size: 1.05rem; line-height: 1.2; letter-spacing: -.01em; }
.time-group-items { display: grid; gap: 5px; }
.workshop-card { display: grid; grid-template-columns: minmax(0,1fr) 46px; gap: 0; align-items: stretch; min-height: 64px; padding: 0; overflow: hidden; border: 1px solid color-mix(in srgb, var(--card-color) 70%, #718078); border-left: 0; border-radius: 13px; background: color-mix(in srgb, var(--card-color) 72%, white); box-shadow: none; }
.workshop-main { min-width: 0; display: grid; align-content: center; gap: 2px; padding: 8px 5px 8px 14px; border: 0; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.workshop-main strong { overflow-wrap: anywhere; font-size: 1.08rem; line-height: 1.08; letter-spacing: -.018em; }
.workshop-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #33463b; font-size: .78rem; line-height: 1.25; }
.workshop-main small span { margin: 0 3px; }
.workshop-main em { color: var(--red); font-size: .7rem; font-style: normal; font-weight: 900; text-transform: uppercase; }
.favorite-button { width: 46px; min-height: 100%; display: grid; place-items: center; align-self: stretch; border: 0; background: transparent; color: #17251d; font-size: 1.55rem; line-height: 1; cursor: pointer; }
.favorite-button.active { color: #d99c00; }
.cancelled { opacity: .68; }
.cancelled .workshop-main strong { text-decoration: line-through; }

@media (min-width: 760px) {
  .workshop-list { display: block; }
  .time-group-items { grid-template-columns: 1fr; }
}
