/* PferdeZeit – Ergänzungen für die Closed Beta (Design-System bleibt in styles.css) */

/* ---------- Lokale Schriften (keine Google-Fonts-Abrufe) ---------- */
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(../fonts/inter-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(../fonts/inter-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Fraunces'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(../fonts/fraunces-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fraunces'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(../fonts/fraunces-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- Layout: Desktop als App-Fenster statt Smartphone-Attrappe ---------- */
@media (min-width: 561px) {
  .device {
    width: min(620px, 100%); height: calc(100vh - 48px); min-height: 600px;
    border-radius: 28px; box-shadow: 0 1px 2px rgba(31, 58, 46, .06), 0 24px 70px rgba(31, 40, 30, .16);
    border: 1px solid var(--line);
  }
  .device.on-hero .tabs { top: 0; }
  .device:not(.mobile) .tabbar { padding-bottom: 14px; }
}
@media (min-width: 1000px) { .stage { gap: 56px; } }
.device.no-tabs #view { padding-bottom: 32px; }
.device.no-tabs .tabbar { display: none; }
.beta-badge { display: inline-block; font-family: var(--font); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--amber-bg); color: var(--amber); padding: 3px 8px; border-radius: 999px; vertical-align: middle; margin-left: 6px; }
.intro .hint a { text-decoration: underline; }
.boot { height: 100%; display: grid; place-items: center; }
.boot .logo-mark { width: 54px; height: 54px; border-radius: 16px; background: var(--forest); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; transform: scale(.94); } }
.txt-urgent { color: var(--clay); font-weight: 600; }

/* ---------- Anmeldung ---------- */
.auth { padding: 36px 22px 28px; max-width: 460px; margin: 0 auto; }
.auth-logo { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 24px; font-weight: 600; color: var(--forest); margin-bottom: 28px; }
.auth-logo .logo-mark { width: 44px; height: 44px; border-radius: 14px; background: var(--forest); color: var(--beige); display: grid; place-items: center; }
.auth .title { margin-bottom: 6px; }
.auth-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 6px 18px 18px; margin-top: 18px; box-shadow: var(--shadow); }
.form-error { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--clay-bg); color: var(--clay); font-size: 13.5px; font-weight: 500; }
.check-line { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink-2); margin-top: 12px; line-height: 1.4; }
.check-line input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--forest); flex: none; }
.check-line a { text-decoration: underline; }

/* ---------- Skeletons ---------- */
.skel-box { background: linear-gradient(90deg, var(--sand-2) 0%, #fbf7ef 50%, var(--sand-2) 100%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.skel { display: block; height: 10px; border-radius: 6px; background: var(--sand-2); margin: 6px 0; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Meine wichtigen Termine ---------- */
.li.imp { position: relative; }
.li.imp-high { background: linear-gradient(90deg, var(--amber-bg) 0%, transparent 70%); }
.li.imp-high::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--amber); }
.li.imp-soon .li-ic b { color: var(--clay); }
.imp-flag { display: inline-flex; color: var(--amber); margin-right: 5px; vertical-align: -1px; }
.imp-type { width: 32px; height: 32px; border-radius: 10px; flex: none; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 13%, #fff); }

/* ---------- Einstellungen „Meine wichtigen Ereignisse“ ---------- */
.pref-legend, .pref-row { display: grid; grid-template-columns: 1fr 52px 52px 92px 52px; gap: 6px; align-items: center; }
.pref-legend { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 0 12px 6px; }
.pref-legend span:not(:first-child) { text-align: center; }
.pref-row { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.pref-row:last-child { border-bottom: 0; }
.pref-row .toggle { justify-self: center; }
.pref-name { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 14px; }
.pref-name small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; }
.pref-lead { padding: 6px 22px 6px 8px !important; border-radius: 10px !important; font-size: 12.5px; width: 100%; }
.toggle.star input:checked + span { background: var(--amber); }
@media (max-width: 400px) {
  .pref-legend, .pref-row { grid-template-columns: 1fr 46px 46px 78px 46px; gap: 4px; }
  .pref-name .imp-type { display: none; }
}

/* ---------- News ---------- */
.news { display: flex; gap: 12px; padding: 12px 14px; align-items: flex-start; border-bottom: 1px solid var(--line); background: var(--paper); }
.list .news:last-child { border-bottom: 0; }
.news:hover .news-t { color: var(--forest-3); }
.news-img { width: 84px; height: 64px; border-radius: 12px; overflow: hidden; flex: none; background: var(--sand-2); display: grid; place-items: center; color: var(--muted); }
.news.compact .news-img { width: 64px; height: 52px; }
.news-img img { width: 100%; height: 100%; object-fit: cover; }
.news-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.news-src { font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.news-t { font-weight: 600; font-size: 14.5px; line-height: 1.3; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news.compact .news-t { -webkit-line-clamp: 2; font-size: 14px; }
.news-s { font-size: 13px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Galerie ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
@media (min-width: 561px) { .gallery-grid { grid-template-columns: repeat(4, 1fr); } }
.g-item { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--sand-2); }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.g-item:hover img { transform: scale(1.04); }
.g-cover { position: absolute; top: 6px; left: 6px; width: 24px; height: 24px; border-radius: 50%; background: rgba(255, 255, 255, .9); color: var(--amber); display: grid; place-items: center; }
.g-previews { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 10px; }
.g-prev { aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--sand-2); }
.g-prev img { width: 100%; height: 100%; object-fit: cover; }
.upload-progress { height: 6px; border-radius: 3px; background: var(--sand-2); overflow: hidden; margin-top: 14px; }
.upload-progress span { display: block; height: 100%; width: 0; background: var(--forest-3); transition: width .2s; }

/* ---------- Lightbox ---------- */
#lightbox-root { position: absolute; inset: 0; z-index: 80; display: none; }
#lightbox-root.open { display: block; }
.lb { position: absolute; inset: 0; background: rgba(10, 16, 12, .96); color: #fff; display: flex; flex-direction: column; }
.lb-top { display: flex; align-items: center; justify-content: space-between; padding: calc(12px + env(safe-area-inset-top)) 12px 8px; gap: 8px; }
.lb-count { font-size: 13px; opacity: .8; font-weight: 600; }
.lb-stage { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; touch-action: pan-y; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; display: grid; place-items: center; }
.lb-nav.prev { left: 10px; }
.lb-nav.next { right: 10px; }
.lb-caption { padding: 12px 18px calc(18px + env(safe-area-inset-bottom)); font-size: 14px; line-height: 1.45; }
.lb-caption .muted { color: rgba(255, 255, 255, .6); }
.lb a.icon-btn { color: #fff; }

/* ---------- Rechtstexte ---------- */
.legal h3 { font-size: 16px; margin: 22px 0 6px; color: var(--forest); }
.legal p, .legal li { font-size: 14px; color: var(--ink-2); }
.legal ul { padding-left: 18px; }
mark.placeholder { background: var(--amber-bg); color: var(--amber); padding: 0 4px; border-radius: 4px; font-weight: 600; }

/* ---------- Diverses ---------- */
.btn.sm.danger-ghost { padding: 6px 10px; }
.chips { flex-wrap: wrap; }
.segmented a, .segmented button { white-space: nowrap; }
.device.mobile .segmented { overflow-x: auto; scrollbar-width: none; }
