/* Seitenlayout der App (Bausteine kommen aus components.css, Werte aus tokens.css) */
.app-body { min-height: 100vh; display: flex; flex-direction: column; }
.container { width: 100%; max-width: var(--layout-content-max); margin: 0 auto; padding: var(--space-6) var(--space-5); }
.topbar-app .logo { text-decoration: none; color: var(--c-text); }
.topbar-app .grow { flex: 1; }
.topbar-app form { margin: 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-4); margin-bottom: var(--space-5); flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: var(--text-xl); line-height: var(--leading-xl); font-weight: 800; letter-spacing: -0.01em; }
.page-head p { margin: 4px 0 0; color: var(--c-text-muted); }
.stack { display: grid; gap: var(--space-4); }
.row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.flash { padding: 10px 14px; border-radius: var(--radius-md); font-size: var(--text-sm); margin-bottom: var(--space-4); }
.flash.ok { background: var(--c-success-soft); color: var(--c-success); }
.flash.error { background: var(--c-danger-soft); color: var(--c-danger); }
.dev-note { padding: 10px 14px; border-radius: var(--radius-md); background: var(--c-warning-soft); color: var(--c-text); font-size: var(--text-sm); word-break: break-all; }

/* Anmelden / Beitreten */
.auth { min-height: 100vh; display: grid; place-items: center; padding: var(--space-6) var(--space-4); }
.auth .card { width: min(420px, 100%); padding: var(--space-7); display: grid; gap: var(--space-5); }
.auth h1 { margin: 0; font-size: var(--text-xl); font-weight: 800; }
.auth .or { display: flex; align-items: center; gap: 10px; color: var(--c-text-muted); font-size: var(--text-sm); }
.auth .or::before, .auth .or::after { content: ""; flex: 1; height: 1px; background: var(--c-border); }

/* Tourliste */
.tour-list { display: grid; gap: var(--space-3); }
.tour-row { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4) var(--space-5); text-decoration: none; color: inherit; }
.tour-row:hover { background: var(--c-surface-2); }
.tour-row .grow { flex: 1; min-width: 0; }
.tour-row b { display: block; font-size: var(--text-lg); }
.tour-row small { color: var(--c-text-muted); }
.cover-tile { width: 44px; height: 44px; border-radius: 12px; background: var(--c-primary); color: var(--c-on-primary); display: grid; place-items: center; font-weight: 800; flex: none; }

/* Tagesseite */
.day-wrap { flex: 1; }
.day2 { max-width: 1320px; margin: 0 auto; }
.dayhead3 .sub a { color: inherit; }
.ev { cursor: default; }
.ev.clickable { cursor: pointer; }
.ev.clickable:focus-visible { outline: 2px solid var(--c-focus); outline-offset: -2px; }
.addrow form { display: flex; gap: 10px; align-items: center; flex: 1; margin: 0; }
.empty-inline { padding: var(--space-6) var(--space-5); color: var(--c-text-muted); display: grid; gap: 4px; }
.empty-inline b { color: var(--c-text); }
.rail3 .muted-line { color: var(--c-text-muted); font-size: var(--text-sm); margin: 0; }
.mobile-only { display: none; }
.who .avatar-group { background: var(--c-surface-2); color: var(--c-text); box-shadow: inset 0 0 0 1px var(--c-border); }

/* Drawer über der Seite */
#drawer:empty { display: none; }
#drawer { position: fixed; inset: 0; z-index: 50; display: grid; grid-template-columns: 1fr auto; }
#drawer .scrim { background: color-mix(in srgb, var(--c-text) 28%, transparent); }
#drawer .drawer { height: 100vh; animation: slidein var(--motion-base) var(--motion-ease); }
@keyframes slidein { from { transform: translateX(24px); } to { transform: none; } }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks label { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--c-border); font-size: var(--text-sm); font-weight: 600; cursor: pointer; }
.checks input { accent-color: var(--c-primary); }
.checks label:has(input:checked) { background: var(--c-primary); color: var(--c-on-primary); border-color: var(--c-primary); }

/* Toast */
#toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; }

/* Routing */
.routing-list { list-style: none; margin: 0; padding: 4px; }
.routing-list li a { display: grid; grid-template-columns: 120px 160px 1fr; gap: var(--space-4); align-items: center; padding: 12px 16px; border-radius: var(--radius-md); text-decoration: none; color: inherit; }
.routing-list li + li a { border-top: 1px solid var(--c-border); border-radius: 0; }
.routing-list li a:hover { background: var(--c-surface-2); }
.routing-edit td { padding: 6px 8px; }
.routing-edit .input { height: 36px; font-size: var(--text-sm); }
.routing-edit td:first-child { white-space: nowrap; font-weight: 700; }

/* Monat */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); border: 1px solid var(--c-border); border-radius: var(--radius-lg); overflow: hidden; background: var(--c-surface); }
.cal .h { padding: 8px; font-size: 12px; font-weight: 700; color: var(--c-text-muted); border-bottom: 1px solid var(--c-border); }
.cal .c { min-height: 92px; padding: 8px; border-top: 1px solid var(--c-border); border-left: 1px solid var(--c-border); font-size: 13px; text-decoration: none; color: inherit; display: grid; align-content: start; gap: 4px; }
.cal .c:nth-child(7n+1) { border-left: 0; }
.cal .c.out { background: var(--c-bg); color: var(--c-text-muted); }
.cal .c.in:hover { background: var(--c-surface-2); }
.cal .c .n { font-weight: 700; }
.cal .c.today .n { color: var(--c-accent-text); }

/* Platzhalter */
.soon { max-width: 560px; margin: 10vh auto; }

/* Handy */
@media (max-width: 860px) {
  .topbar-app { padding: 0 var(--space-4); gap: var(--space-2); }
  .topbar-app .tabs, .topbar-app .kbd-search, .topbar-app .hide-sm { display: none; }
  .crumb { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .datebar { padding: 8px var(--space-3); }
  .datebar .hide-sm { display: none; }
  .datechip { min-width: 74px; padding: 7px 8px 8px; }
  .day2 { grid-template-columns: 1fr; padding: var(--space-4); gap: var(--space-5); }
  .dayhead3 { flex-direction: column; align-items: flex-start; }
  .dayhead3 h1 { font-size: 32px; line-height: 36px; }
  .ev { grid-template-columns: 64px 1fr auto; padding: 12px; gap: 12px; }
  .mobile-only { display: block; }
  .tabbar { position: sticky; bottom: 0; z-index: 20; }
  .app-body { padding-bottom: 0; }
  #drawer { grid-template-columns: 1fr; }
  #drawer .scrim { display: none; }
  #drawer .drawer { width: 100vw; }
  .routing-list li a { grid-template-columns: 90px 1fr; }
  .routing-list li a .rt { grid-column: 2; }
  .routing-edit thead { display: none; }
  .routing-edit tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--c-border); }
  .routing-edit td:first-child { grid-column: 1 / -1; }
}
@media (min-width: 861px) { .tabbar { display: none; } }
.crumb { text-decoration: none; }
.rail3 { display: grid; gap: var(--space-5); align-content: start; }
.rail3 h3 { margin: 0 0 8px; font-size: var(--text-sm); font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.day2 > *, .day2 main { min-width: 0; }
@media (max-width: 860px) { .dayhead3 .viewas { display: none; } html, body { overflow-x: hidden; } }

/* Bearbeiten in der Tagesspalte */
.rail3 h3 { display: flex; align-items: center; gap: 6px; }
.rail3 h3 .h3-add { margin-left: auto; height: 28px; width: 28px; }
.noteline { display: flex; align-items: flex-start; gap: 6px; margin: 0 0 8px; }
.noteline p { margin: 0; flex: 1; min-width: 0; }
.noteline .btn-icon { height: 26px; width: 26px; flex: none; }

/* Dateien */
.upload-card { display: grid; gap: var(--space-4); margin-bottom: var(--space-6); max-width: 820px; }
.dropzone { position: relative; display: grid; justify-items: center; gap: 4px; padding: var(--space-5) var(--space-4); border: 1.5px dashed var(--c-border-strong, var(--c-border)); border-radius: var(--radius-lg); background: var(--c-surface-2); text-align: center; cursor: pointer; }
.dropzone:hover, .dropzone:focus-within { border-color: var(--c-accent); }
.dropzone .icon { width: 22px; height: 22px; color: var(--c-text-muted); }
.dropzone input[type=file] { margin-top: 8px; max-width: 100%; font-size: var(--text-sm); }
.upload-opts { align-items: start; gap: var(--space-4); }
.upload-opts .field { min-width: 200px; }
.upload-opts .grow { flex: 1; }
.file-group { margin-bottom: var(--space-5); }
.file-group .section-title { font-size: var(--text-sm); font-weight: 700; color: var(--c-text-muted); margin: 0 0 var(--space-2); }
.filelist { list-style: none; margin: 0; padding: 0; }
.filerow { display: flex; align-items: center; gap: var(--space-2); padding: 8px 10px; border-top: 1px solid var(--c-border); flex-wrap: wrap; }
.filerow:first-child { border-top: 0; }
.filerow-main { display: flex; align-items: center; gap: var(--space-3); flex: 1; min-width: 0; color: inherit; text-decoration: none; padding: 4px; border-radius: var(--radius-md); }
.filerow-main:hover b { text-decoration: underline; }
.filerow-main .grow { display: grid; min-width: 0; }
.filerow-main b { overflow-wrap: anywhere; }
.filerow-main small { color: var(--c-text-muted); font-size: var(--text-xs); }
.filerow .who { display: flex; gap: 4px; align-items: center; }
.file-ic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-md); background: var(--c-surface-2); color: var(--c-text-muted); }
.file-edit { flex-basis: auto; }
.file-edit > summary { list-style: none; }
.file-edit > summary::-webkit-details-marker { display: none; }
.file-edit[open] { flex-basis: 100%; order: 10; }
.file-edit[open] > summary { display: none; }
.file-edit form { padding: var(--space-3) var(--space-1) var(--space-2); max-width: 560px; }
.daydocs .item { color: inherit; text-decoration: none; }
.daydocs .item:hover b { text-decoration: underline; }
.daydocs .file-ic { width: 32px; height: 32px; }
.daydocs b { overflow-wrap: anywhere; }
.alllink { display: inline-block; margin-top: 6px; text-decoration: underline; }
.sep { display: inline-block; margin: 0 0.4em; }

/* Hell/Dunkel-Schalter: im hellen Modus Mond zeigen, im dunklen Sonne */
.theme-switch { display: inline-flex; }
.theme-ico-light { display: none; }
[data-theme="dark"] .theme-ico-light { display: inline-block; }
[data-theme="dark"] .theme-ico-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-ico-light { display: inline-block; }
  :root:not([data-theme="light"]) .theme-ico-dark { display: none; }
}

/* Datumsleiste: ausgeblendete freie Tage als schmaler Hinweis */
.dategap { display: inline-flex; align-items: center; align-self: center; padding: 2px 8px; border-radius: 999px;
  border: 1px dashed var(--c-border-input); color: var(--c-text-muted); font-size: 12px; white-space: nowrap; flex: none; }
.offdays-toggle { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; color: var(--c-text-muted); font-size: 14px; }

/* ===================== v0.4 Tourbuddy: klarer, ruhiger, verständlicher ===================== */
/* Kopfleiste */
.topbar-app { position: sticky; top: 0; z-index: 30; gap: var(--space-3); }
.logo-word { letter-spacing: -0.01em; }
.crumb { max-width: 300px; min-width: 0; gap: 8px; padding: 0 10px; border: 1px solid var(--c-border); background: var(--c-bg); }
.crumb-a { color: var(--c-text-muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.crumb-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tabs { margin-left: var(--space-2); }
.tabs a { white-space: nowrap; }
.top-tools { display: flex; align-items: center; gap: 4px; }
.usermenu { position: relative; }
.usermenu > summary { list-style: none; gap: 6px; padding: 0 6px 0 4px; }
.usermenu > summary::-webkit-details-marker { display: none; }
.avatar-me { width: 26px; height: 26px; font-size: 11px; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; width: 260px; display: grid; gap: 2px; }
.menu-pop form { margin: 0; }
.menu-who { padding: 8px 12px 10px; border-bottom: 1px solid var(--c-border); margin-bottom: 4px; display: grid; }
.menu-who small { color: var(--c-text-muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.menu-sections { display: none; border-bottom: 1px solid var(--c-border); padding-bottom: 4px; margin-bottom: 4px; }
.menu-item { text-decoration: none; }
.flashes { padding-bottom: 0 !important; }

/* Datumsleiste */
.datebar { position: sticky; top: var(--layout-header); z-index: 25; }
.dates { mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 24px), transparent 100%); padding: 0 12px; scroll-padding: 0 40px; }
.datebar-tools { display: flex; gap: 6px; align-items: center; }
.datebar-label { font-size: 12px; font-weight: 700; color: var(--c-text-muted); padding: 0 6px 0 4px; }
.dategap { text-decoration: none; border-style: solid; border-color: var(--c-border); background: var(--c-bg); font-weight: 700; }
.dategap:hover { border-color: var(--c-text-muted); color: var(--c-text); }
.datechip.is-today:not([aria-current]) b::after { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--c-accent); margin-left: 6px; vertical-align: 2px; }
.datechip.past { opacity: .62; }

/* Tageskopf */
.dayhead3 { align-items: flex-end; flex-wrap: wrap; }
.dh-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.viewas { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--c-text-muted); }
.select-sm { height: 32px; width: auto; max-width: 260px; font-size: 14px; padding-right: 28px; }
.dayno { color: var(--c-text-muted); font-weight: 500; }

/* Hinweisleisten */
.infobar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-radius: var(--radius-lg); background: var(--c-surface); border: 1px solid var(--c-border); margin-bottom: var(--space-4); font-size: var(--text-sm); }
.infobar > .icon { color: var(--c-text-muted); }
.infobar .grow { flex: 1; min-width: 200px; display: grid; gap: 2px; }
.infobar .grow b { font-size: var(--text-sm); }
.infobar .grow span { color: var(--c-text-muted); }
.infobar-accent { background: var(--c-accent-soft); border-color: transparent; }
.infobar-accent > .icon { color: var(--c-accent-text); }
.infobar-accent .grow, .infobar-accent .grow span { color: var(--c-text); display: block; }
.infobar-ok { background: var(--c-success-soft); border-color: transparent; }
.infobar-ok > .icon { color: var(--c-success); }
.infobar-ok .grow, .infobar-ok .grow span { color: var(--c-text); display: block; }

/* Ablauf */
.sched-card { overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sched-card > .panel-head { padding: 12px 16px; border-bottom: 1px solid var(--c-border); }
.panel-head h2, .panel-head h3 { margin: 0; font-size: var(--text-sm); font-weight: 700; display: flex; align-items: center; gap: 8px; }
.panel-head h3 .icon { color: var(--c-text-muted); }
.schedule { padding: 4px; }
.ev { grid-template-columns: 92px 1fr auto; }
.ev .end { display: block; margin-top: 2px; }
.ev .name { font-size: var(--text-base); }
.who { flex-wrap: wrap; justify-content: flex-end; max-width: 220px; }
.aud { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 700;
  background: color-mix(in srgb, var(--g) 12%, var(--c-surface)); color: var(--c-text); white-space: nowrap; }
.aud::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--g); }
.addrow { border-top: 1px dashed var(--c-border); margin: 4px 0 0; }
.addrow .btn { flex: none; }

/* Rechte Spalte */
.rail4 { display: grid; gap: var(--space-4); align-content: start; }
.panel { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-lg); }
.panel-pad { padding: 14px 16px; display: grid; gap: 10px; }
.panel .place { padding: 14px 16px; }
.place .kind { justify-content: flex-start; }
.place .kind-edit { margin-left: auto; height: 28px; width: 28px; }
.place-slim { gap: 6px; }
.place .actions { margin-top: 8px; }
.kv2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin: 8px 0 0; }
.kv2 div { min-width: 0; }
.kv2 dt { font-size: 12px; color: var(--c-text-muted); font-weight: 600; }
.kv2 dd { margin: 0; font-weight: 700; }
.addbtn { justify-self: start; }
.statline { margin: 0; font-size: var(--text-sm); display: flex; align-items: center; flex-wrap: wrap; gap: 2px; }
.warn-text { color: var(--c-warning); font-weight: 700; }
.accent-text { color: var(--c-accent-text); margin: 0; }
.ok-text { color: var(--c-success); display: inline-flex; gap: 6px; align-items: center; font-weight: 600; }
.linkline { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-sm); font-weight: 600; color: var(--c-text); text-decoration: none; }
.linkline:hover { text-decoration: underline; }
.prewrap { white-space: pre-line; margin: 2px 0 0; }
.noteline { margin: 0; padding: 8px 0; border-top: 1px solid var(--c-border); }
.noteline:first-of-type { border-top: 0; padding-top: 0; }
.rm { color: var(--c-text-muted); }
.rm:hover { color: var(--c-danger); }
.list .item { padding: 8px 0; }

/* Seitenkopf allgemein */
.page-head p .sep, .sep { margin: 0 .45em; }
.backlink { display: inline-flex; align-items: center; gap: 4px; color: var(--c-text-muted); text-decoration: none; font-size: var(--text-sm); font-weight: 600; margin-bottom: 8px; }
.backlink:hover { color: var(--c-text); }
.container.narrow { max-width: 860px; }
.eyebrow { margin: 0; text-transform: uppercase; letter-spacing: .06em; font-size: 12px; }
.eyebrow-sm { display: block; font-size: 12px; font-weight: 600; color: var(--c-text-muted); }
.lead { font-size: var(--text-base); color: var(--c-text-muted); margin: 0 0 var(--space-5); max-width: 640px; }

/* Routing */
.rlist { overflow: hidden; }
.rrow { display: grid; grid-template-columns: 110px 140px minmax(0, 1fr) 200px; gap: var(--space-4); align-items: center; padding: 6px 16px; min-height: 56px; border-top: 1px solid var(--c-border); }
.rrow:first-child { border-top: 0; }
.rhead { min-height: 40px; font-size: 12px; font-weight: 700; color: var(--c-text-muted); background: var(--c-bg); }
.rrow:not(.rhead):hover { background: var(--c-surface-2); }
.rlink { color: inherit; text-decoration: none; display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.rlink small { color: var(--c-text-muted); font-size: 12px; }
.rwhere { flex-direction: column; gap: 0; }
.rwhere b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.rwhere span { font-size: 13px; color: var(--c-text-muted); }
.rvis form { margin: 0; }
.rvis-txt { font-size: 12px; color: var(--c-text-muted); font-weight: 600; min-width: 80px; }
.rrow.is-hidden .rlink, .rrow.is-hidden .tag-day { opacity: .5; }
.rrow.is-today { box-shadow: inset 3px 0 0 var(--c-accent); }

/* Kennzahlen */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--space-3); margin-bottom: var(--space-5); }
.stat { padding: 14px 16px; display: grid; gap: 6px; align-content: start; }
.stat small { font-size: 12px; font-weight: 700; color: var(--c-text-muted); }
.stat > b { font-size: 28px; line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat > b .muted { font-size: 18px; font-weight: 600; }
.stat-warn { border-color: color-mix(in srgb, var(--c-warning) 50%, var(--c-border)); background: var(--c-warning-soft); }
.passlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: var(--text-sm); }
.passlist li { display: flex; justify-content: space-between; gap: 8px; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--c-text); text-decoration: underline; cursor: pointer; font: inherit; }

/* Gästeliste */
.glist { overflow: hidden; }
.grow-h, .grow-r { display: grid; grid-template-columns: minmax(0, 2fr) 130px minmax(0, 1fr) auto; gap: var(--space-4); align-items: center; padding: 10px 16px; border-top: 1px solid var(--c-border); }
.grow-h { border-top: 0; font-size: 12px; font-weight: 700; color: var(--c-text-muted); background: var(--c-bg); }
.g-name { display: grid; min-width: 0; }
.g-name b { font-size: var(--text-base); }
.g-name small { color: var(--c-text-muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qty { display: inline-block; font-size: 12px; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: var(--c-surface-2); margin-left: 4px; vertical-align: 2px; }
.g-act { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.g-act .ok { border-color: color-mix(in srgb, var(--c-success) 50%, var(--c-border)); color: var(--c-success); }
.checkin { margin: 0; }
.grow-r.is-rejected .g-name { opacity: .55; text-decoration: line-through; }
.grow-r.is-in { background: color-mix(in srgb, var(--c-success-soft) 70%, transparent); }
details.more > summary { cursor: pointer; font-size: var(--text-sm); font-weight: 600; color: var(--c-text-muted); }
.segmented-radio { display: inline-flex; padding: 3px; gap: 2px; background: var(--c-surface-2); border-radius: var(--radius-md); }
.segmented-radio label { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 7px; font-size: var(--text-sm); font-weight: 600; color: var(--c-text-muted); cursor: pointer; }
.segmented-radio input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented-radio label:has(input:checked) { background: var(--c-surface); color: var(--c-text); box-shadow: var(--shadow-card); }
.segmented-radio label:has(input:focus-visible) { outline: 2px solid var(--c-focus); }
.passedit { display: grid; gap: 8px; }
.passedit label { display: grid; grid-template-columns: 1fr 130px; gap: 10px; align-items: center; font-size: var(--text-sm); font-weight: 600; }

/* Advancing */
.alist { overflow: hidden; }
.arow { display: grid; grid-template-columns: 90px minmax(0, 1.4fr) 150px 140px 120px 24px; gap: var(--space-4); align-items: center; padding: 10px 16px; min-height: 58px; border-top: 1px solid var(--c-border); color: inherit; text-decoration: none; }
.arow:first-child { border-top: 0; }
.ahead { min-height: 40px; font-size: 12px; font-weight: 700; color: var(--c-text-muted); background: var(--c-bg); }
a.arow:hover { background: var(--c-surface-2); }
.arow small { color: var(--c-text-muted); font-size: 12px; margin-left: 4px; }
.a-where { display: grid; min-width: 0; }
.a-where b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-where small { margin: 0; }
.arow.past { opacity: .6; }
.minimeter { display: inline-block; width: 70px; height: 6px; border-radius: 999px; background: var(--c-surface-2); overflow: hidden; vertical-align: middle; }
.minimeter i { display: block; height: 100%; background: var(--c-success); }
.adv-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--space-6); align-items: start; }
.adv-main { display: grid; gap: var(--space-4); margin: 0; }
.adv-sec { padding: 16px 18px 18px; }
.adv-sec h2 { margin: 0 0 12px; font-size: var(--text-base); font-weight: 800; }
.adv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.adv-grid.adv-times { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.adv-grid .wide { grid-column: 1 / -1; }
.input-time { font-variant-numeric: tabular-nums; font-weight: 700; }
.hintfill { justify-self: start; border: 1px dashed var(--c-border-input); background: var(--c-bg); color: var(--c-text-muted); border-radius: 999px; padding: 2px 10px; font: 600 12px/1.6 var(--font-sans); cursor: pointer; }
.hintfill:hover { color: var(--c-text); border-color: var(--c-text-muted); }
.savebar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 16px; background: color-mix(in srgb, var(--c-surface) 92%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--c-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-pop); }
.savebar .grow { flex: 1; }
.adv-side { display: grid; gap: var(--space-4); position: sticky; top: calc(var(--layout-header) + 16px); }
.statuspick { display: grid; gap: 4px; }
.statuspick label { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-md); border: 1px solid var(--c-border); cursor: pointer; font-size: var(--text-sm); font-weight: 600; }
.statuspick input { accent-color: var(--c-accent); }
.statuspick label:has(input:checked) { border-color: var(--c-text); background: var(--c-surface-2); }
.copyline { display: flex; gap: 6px; }
.copyline .input { height: 36px; font-size: 13px; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.checklist label { display: flex; gap: 10px; align-items: flex-start; padding: 6px 4px; border-radius: 6px; cursor: pointer; font-size: var(--text-sm); }
.checklist label:hover { background: var(--c-surface-2); }
.checklist input { width: 18px; height: 18px; accent-color: var(--c-success); margin: 1px 0 0; flex: none; }
.checklist input:checked + span { color: var(--c-text-muted); text-decoration: line-through; }
.input-sm { height: 34px; font-size: 14px; }
.applylist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: var(--text-sm); }
.applylist li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.applylist .time { font-size: 14px; min-width: 44px; }
.applylist .pill { height: 20px; }
.adv-public { max-width: 900px; }
.adv-public .adv-main, .adv-public form { display: grid; gap: var(--space-4); }

/* App-Seite */
.howto { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--space-4); margin-bottom: var(--space-4); }
.howto h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: var(--text-base); }
.howto ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: var(--text-sm); }
.install-now { display: flex; align-items: center; gap: 16px; margin-bottom: var(--space-4); flex-wrap: wrap; }
.install-now .grow { flex: 1; }

/* Rückfrage */
.confirm { border: 1px solid var(--c-border); border-radius: var(--radius-lg); background: var(--c-surface); color: var(--c-text); padding: 20px; width: min(400px, calc(100vw - 32px)); box-shadow: var(--shadow-pop); }
.confirm::backdrop { background: color-mix(in srgb, #000 35%, transparent); }
.confirm p { margin: 0 0 16px; font-weight: 600; }
.confirm .row { justify-content: flex-end; }

/* Dateien: ganze Fläche klickbar, eigene Schaltfläche statt Browser-Feld */
.dropzone { position: relative; }
.dropzone .file-cover { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; width: 100%; }
.dropzone [data-files]:empty { display: none; }
.checks input { width: 16px; height: 16px; }

/* Tourliste */
.tour-row b { font-size: var(--text-lg); }
.cover-tile { font-size: 14px; }

/* Breite Bildschirme: rechte Spalte etwas breiter */
@media (min-width: 1200px) { .day2 { grid-template-columns: minmax(0, 1fr) 380px; } }

/* Mittlere Breiten: Advancing einspaltig */
@media (max-width: 1100px) {
  .adv-layout { grid-template-columns: 1fr; }
  .adv-side { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .tabs a { padding: 0 9px; }
  .crumb { max-width: 200px; }
  .crumb-a { display: none; }
}
@media (max-width: 1240px) and (min-width: 861px) { .logo-word { display: none; } }

/* Handy */
@media (max-width: 860px) {
  .logo-word { display: none; }
  .crumb { max-width: none; flex: 1; border: 0; background: none; padding: 0 4px; }
  .crumb-a { display: none; }
  .menu-sections { display: grid; }
  .usermenu .avatar-me { display: none; }
  .top-tools .hide-sm { display: none; }
  .datebar { top: var(--layout-header); }
  .dates { padding: 0 6px; }
  .ev { grid-template-columns: 70px 1fr; }
  .ev .who { grid-column: 2; justify-content: flex-start; max-width: none; }
  .addrow { flex-wrap: wrap; }
  .addrow form { flex-wrap: wrap; }
  .addrow input { min-width: 0; flex: 1 1 200px; }
  .dh-tools { width: 100%; }
  .rrow { grid-template-columns: 64px minmax(0, 1fr) auto; grid-template-areas: "d w v" "d t v"; row-gap: 2px; padding: 10px 12px; }
  .rrow > :nth-child(1) { grid-area: d; flex-direction: column; gap: 0; }
  .rrow > :nth-child(2) { grid-area: t; }
  .rrow > :nth-child(3) { grid-area: w; }
  .rrow > :nth-child(4) { grid-area: v; }
  .rhead { display: none; }
  .rvis-txt { display: none; }
  .grow-h { display: none; }
  .grow-r { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; }
  .grow-r > :nth-child(2) { grid-row: 2; }
  .grow-r > .g-act { grid-column: 2; grid-row: 1 / span 2; }
  .arow { grid-template-columns: 56px minmax(0, 1fr) auto 16px; }
  .ahead { display: none; }
  .arow > :nth-child(1) { display: grid; }
  .arow small { margin: 0; }
  .adv-grid, .adv-grid.adv-times { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cal { font-size: 12px; }
  .cal .c { min-height: 64px; padding: 4px; }
  .cal .c .tag-day { display: none; }
  .cal .c .muted { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cal .h { padding: 6px 4px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat > b { font-size: 24px; }
  .savebar { border-radius: 0; margin: 0 calc(var(--space-5) * -1); }
  .tabbar { grid-template-columns: repeat(5, 1fr); }
  .table th, .table td { padding: 8px; }
  .people-table td:nth-child(3), .people-table th:nth-child(3) { display: none; }
}
/* Feinschliff nach Klicktest */
.sep { font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; }
.adv-grid .field { align-content: start; }
.rvis .switch input:checked + .track { background: var(--c-text); }
.grow-h, .grow-r { grid-template-columns: minmax(0, 2fr) 130px minmax(0, 1fr) 290px; }
.grow-h > :last-child { text-align: right; }
.checkedin { display: inline-flex; align-items: center; gap: 6px; color: var(--c-success); font-weight: 700; font-size: 13px; }
@media (max-width: 860px) { .grow-r { grid-template-columns: minmax(0, 1fr) auto; } }
@media (max-width: 860px) {
  .hide-sm { display: none !important; }
  .grow-r { grid-template-columns: minmax(0, 1fr) auto; }
  .grow-r > .g-name { grid-column: 1; grid-row: 1; }
  .grow-r > :nth-child(2) { grid-column: 2; grid-row: 1; align-self: start; }
  .grow-r > .g-act { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
  .grow-r > .g-act .rm { margin-left: auto; }
  .g-name small { white-space: normal; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .stat { padding: 10px 12px; }
  .stat .hint { display: none; }
}
[hidden] { display: none !important; }
/* Der Mittelpunkt „·“ in Overpass sitzt schief: diesen einen Buchstaben aus der Systemschrift nehmen */
@font-face { font-family: "Overpass"; src: local("Helvetica Neue"), local("Helvetica"), local("Arial"), local("Segoe UI"), local("Roboto"), local("DejaVu Sans"); unicode-range: U+00B7; font-weight: 100 900; }
