:root {
  --bg: #0b0c0d;
  --panel: #151618;
  --panel-2: #1b1c1f;
  --text: #f5f1e8;
  --muted: #9b9a97;
  --gold: #d2a447;
  --gold-2: #f0c76b;
  --line: rgba(255,255,255,.08);
  --danger: #dd7a74;
  --success: #91b894;
  --shadow: 0 18px 60px rgba(0,0,0,.35);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 15px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: radial-gradient(circle at 50% -20%, #25201a 0%, var(--bg) 42%); color: var(--text); font-family: "DM Sans", system-ui, sans-serif; }
body { display: flex; justify-content: center; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { width: 100%; max-width: 520px; min-height: 100dvh; position: relative; padding-bottom: 92px; }
.topbar { position: sticky; top: 0; z-index: 20; display:grid; grid-template-columns:42px 1fr 42px; align-items:center; gap:10px; padding: 12px 20px 10px; background: linear-gradient(to bottom, rgba(11,12,13,.99), rgba(11,12,13,.88), transparent); backdrop-filter: blur(18px); }
.topbar-spacer { width:42px; height:42px; }
.brand-logo { width:86px; height:86px; object-fit:cover; border-radius:20px; justify-self:center; box-shadow:0 8px 30px rgba(0,0,0,.28); }
.icon-button { width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(210,164,71,.45); color: var(--gold-2); background: rgba(210,164,71,.08); display:grid; place-items:center; }
.plus { font-size: 26px; line-height: 1; margin-top: -2px; }
.main-content { padding: 2px 18px 28px; }
.hero { position:relative; overflow:hidden; min-height: 248px; border-radius: var(--radius-xl); border:1px solid rgba(210,164,71,.18); background: linear-gradient(135deg,#171719,#101113 68%); box-shadow: var(--shadow); }
.hero::after { content:""; position:absolute; right:-70px; top:-80px; width:230px; height:230px; border-radius:50%; background: radial-gradient(circle, rgba(210,164,71,.24), transparent 66%); pointer-events:none; }
.horse-photo { width:100%; height:248px; object-fit:cover; display:block; filter:saturate(.75) contrast(1.05) brightness(.74); }
.horse-photo-placeholder { width:100%; height:248px; display:grid; place-items:center; background: linear-gradient(145deg,#2a261f,#101113 65%); font-size:88px; color:var(--gold); }
.hero-overlay { position:absolute; inset:0; background: linear-gradient(to top, rgba(7,8,9,.96) 4%, rgba(7,8,9,.28) 58%, rgba(7,8,9,.08)); }
.hero-content { position:absolute; left:20px; right:20px; bottom:18px; display:flex; align-items:end; justify-content:space-between; gap:12px; }
.hero-name { font-family:"Playfair Display",serif; font-size:35px; margin:0 0 2px; }
.hero-meta { margin:0; font-size:13px; color:#d2d0cb; }
.pill { border-radius:999px; padding:8px 11px; font-size:11px; border:1px solid rgba(210,164,71,.4); color:var(--gold-2); background:rgba(11,12,13,.66); backdrop-filter: blur(8px); white-space:nowrap; }
.section { margin-top:24px; }
.section-head { display:flex; align-items:end; justify-content:space-between; gap:10px; margin-bottom:12px; }
.section h2 { margin:0; font-size:17px; font-weight:600; }
.section-link { color:var(--gold-2); border:0; background:none; padding:0; font-size:12px; }
.card { background:linear-gradient(145deg, rgba(27,28,31,.98), rgba(20,21,23,.98)); border:1px solid var(--line); border-radius:var(--radius-lg); box-shadow:0 10px 30px rgba(0,0,0,.15); }
.list-card { overflow:hidden; }
.list-row { display:flex; align-items:center; gap:12px; padding:14px; border-bottom:1px solid var(--line); }
.list-row:last-child { border-bottom:0; }
.list-icon { width:40px; height:40px; border-radius:12px; background:rgba(210,164,71,.1); color:var(--gold-2); display:grid; place-items:center; flex:0 0 auto; font-size:19px; }
.list-main { flex:1; min-width:0; }
.list-title { font-weight:600; font-size:14px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.list-sub { color:var(--muted); font-size:12px; margin-top:2px; }
.list-end { text-align:right; font-size:11px; color:#c7c3ba; }
.activity-card { display:flex; gap:14px; align-items:center; padding:15px; }
.activity-photo { width:82px; height:76px; border-radius:14px; object-fit:cover; border:1px solid var(--line); }
.activity-icon-big { width:72px; height:72px; display:grid; place-items:center; border-radius:18px; background:rgba(210,164,71,.08); color:var(--gold-2); font-size:32px; flex:0 0 auto; }
.activity-title { font-size:17px; font-weight:600; }
.activity-note { color:#c1beb7; font-size:12px; margin-top:6px; line-height:1.4; }
.stats-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.stat { padding:17px; }
.stat-value { font-family:"Playfair Display",serif; font-size:26px; color:var(--gold-2); }
.stat-label { color:var(--muted); font-size:11px; margin-top:4px; }
.primary-btn, .secondary-btn, .danger-btn { width:100%; border-radius:16px; min-height:48px; border:0; padding:12px 16px; font-weight:700; }
.primary-btn { color:#111; background:linear-gradient(135deg,var(--gold-2),var(--gold)); box-shadow:0 10px 30px rgba(210,164,71,.18); }
.secondary-btn { color:var(--text); background:#222326; border:1px solid var(--line); }
.danger-btn { color:#fff; background:rgba(221,122,116,.16); border:1px solid rgba(221,122,116,.28); }
.quick-action { margin-top:18px; }
.empty { padding:28px 20px; text-align:center; color:var(--muted); }
.empty strong { color:var(--text); display:block; margin-bottom:6px; }
.bottom-nav { position:fixed; z-index:30; left:50%; transform:translateX(-50%); bottom:0; width:100%; max-width:520px; display:grid; grid-template-columns:repeat(4,1fr); background:rgba(12,13,14,.93); backdrop-filter:blur(22px); border-top:1px solid var(--line); padding:9px 8px calc(9px + env(safe-area-inset-bottom)); }
.nav-item { border:0; background:none; color:#777; display:flex; flex-direction:column; gap:4px; align-items:center; padding:6px 0; font-size:10px; }
.nav-item.active { color:var(--gold-2); }
.nav-icon { font-size:20px; line-height:1; }
.page-title { margin:6px 0 4px; font-family:"Playfair Display",serif; font-size:32px; }
.page-sub { margin:0 0 18px; color:var(--muted); font-size:13px; }
.filter-row { display:flex; gap:8px; overflow:auto; padding-bottom:5px; scrollbar-width:none; }
.filter-chip { border:1px solid var(--line); background:#17181a; color:#aaa; border-radius:999px; padding:8px 12px; white-space:nowrap; font-size:12px; }
.filter-chip.active { color:#17120b; background:var(--gold-2); border-color:var(--gold-2); }
.timeline { position:relative; margin-top:18px; }
.timeline-day { margin:22px 0 9px; color:var(--gold-2); font-size:12px; letter-spacing:.04em; text-transform:uppercase; }
.entry { padding:15px; margin-bottom:10px; }
.entry-top { display:flex; justify-content:space-between; gap:10px; }
.entry-title { font-weight:600; }
.entry-meta { color:var(--muted); font-size:12px; margin-top:4px; }
.entry-note { margin:10px 0 0; color:#d3d0c8; font-size:13px; line-height:1.45; }
.entry-actions { display:flex; gap:8px; margin-top:12px; }
.tiny-btn { border:1px solid var(--line); background:#1f2022; color:#bdbab4; border-radius:10px; padding:7px 9px; font-size:11px; }
.profile-card { padding:18px; }
.profile-row { display:flex; justify-content:space-between; gap:20px; padding:13px 0; border-bottom:1px solid var(--line); }
.profile-row:last-child { border-bottom:0; }
.profile-key { color:var(--muted); font-size:12px; }
.profile-value { text-align:right; font-size:13px; }
.modal-backdrop { position:fixed; z-index:100; inset:0; background:rgba(0,0,0,.72); display:flex; align-items:flex-end; justify-content:center; backdrop-filter:blur(8px); }
.modal-backdrop.hidden { display:none; }
.modal { width:100%; max-width:520px; max-height:92dvh; overflow:auto; background:#111214; border-radius:28px 28px 0 0; border:1px solid var(--line); padding:10px 18px 26px; box-shadow:0 -24px 70px rgba(0,0,0,.45); }
.modal-handle { width:42px; height:4px; border-radius:999px; background:#37383b; margin:2px auto 14px; }
.modal-head { display:flex; justify-content:space-between; align-items:start; margin-bottom:16px; }
.modal-head h2 { margin:2px 0 0; font-family:"Playfair Display",serif; font-size:26px; }
.eyebrow { color:var(--gold); text-transform:uppercase; letter-spacing:.12em; font-size:10px; margin:0; }
.close-button { border:0; background:#202124; color:#ddd; width:36px; height:36px; border-radius:50%; font-size:24px; line-height:1; }
.form-grid { display:grid; gap:13px; }
.field label { display:block; font-size:11px; color:#aaa; margin:0 0 6px 3px; }
.field input, .field select, .field textarea { width:100%; border:1px solid var(--line); background:#1b1c1e; color:var(--text); border-radius:14px; padding:13px 14px; outline:none; }
.field input:focus, .field select:focus, .field textarea:focus { border-color:rgba(210,164,71,.55); box-shadow:0 0 0 3px rgba(210,164,71,.08); }
.field textarea { min-height:92px; resize:vertical; }
.category-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:8px; }
.category-option { border:1px solid var(--line); background:#191a1c; color:#d7d3cc; border-radius:14px; padding:11px; text-align:left; font-size:12px; }
.category-option.selected { border-color:rgba(210,164,71,.62); background:rgba(210,164,71,.1); color:var(--gold-2); }
.two-col { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.form-actions { display:grid; gap:9px; margin-top:4px; }
.upload-box { border:1px dashed rgba(210,164,71,.35); border-radius:16px; padding:14px; background:rgba(210,164,71,.04); font-size:12px; color:#bbb; }
.toast { position:fixed; z-index:200; left:50%; transform:translateX(-50%); bottom:104px; background:#f1e6c9; color:#16120d; padding:11px 16px; border-radius:999px; box-shadow:var(--shadow); font-size:12px; font-weight:600; }
.toast.hidden { display:none; }
@media (min-width: 600px) {
  .app-shell { margin:18px 0; min-height:calc(100dvh - 36px); border:1px solid var(--line); border-radius:32px; overflow:hidden; box-shadow:0 30px 100px rgba(0,0,0,.45); }
  .bottom-nav { bottom:18px; border-radius:0 0 32px 32px; }
  .modal { border-radius:28px; margin-bottom:18px; }
  .modal-backdrop { align-items:center; }
}

/* KORA production additions */
html,body{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif}
.brand,.hero-name,.page-title,.onboarding h1,.stat-value,.modal-head h2{font-family:Georgia,"Times New Roman",serif}
.today-line{font-size:12px;color:var(--gold-2);letter-spacing:.06em;text-transform:capitalize;margin:2px 2px 12px}
.row-button{width:100%;border:0;color:inherit;text-align:left}
.activity-card.row-button{background:linear-gradient(145deg,rgba(27,28,31,.98),rgba(20,21,23,.98))}
.activity-copy{min-width:0}
.hidden-nav,.hidden-control{display:none!important}
.horse-photo-placeholder{display:flex;flex-direction:column;gap:6px}.horse-photo-placeholder small{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:11px;color:#9b8b69}
.onboarding{padding:18px 0 30px;text-align:center}.onboarding-mark{font-family:Georgia,"Times New Roman",serif;letter-spacing:.35em;color:var(--gold-2);font-size:27px;margin:8px 0 22px}.onboarding-icon{width:76px;height:76px;border-radius:50%;display:grid;place-items:center;margin:0 auto 18px;border:1px solid rgba(210,164,71,.35);background:rgba(210,164,71,.06);font-size:35px;color:var(--gold-2)}.onboarding h1{font-size:39px;line-height:1.02;margin:6px 0 14px}.onboarding-copy{max-width:390px;margin:0 auto 20px;color:var(--muted);font-size:14px;line-height:1.55}.onboarding-card{text-align:left;padding:18px}.privacy-note{font-size:10px;color:#777;line-height:1.45;margin:14px 12px 0}
.entry-photo{width:100%;max-height:220px;object-fit:cover;border-radius:14px;margin-top:12px}.danger-text{color:#e2918b}.appointment-stack{overflow:hidden}.appointment-item{border-bottom:1px solid var(--line)}.appointment-item:last-child{border-bottom:0}.appointment-item.past{opacity:.58}.appointment-item .list-row{border-bottom:0}.appointment-note{font-size:12px;color:#c6c2ba;margin-top:5px;line-height:1.4}.appointment-actions{display:flex;justify-content:flex-end;gap:8px;padding:0 14px 13px}
.settings-card{overflow:hidden}.settings-row{width:100%;border:0;border-bottom:1px solid var(--line);background:transparent;color:var(--text);display:flex;align-items:center;justify-content:space-between;text-align:left;padding:15px 16px;gap:16px}.settings-row:last-child{border-bottom:0}.settings-row strong{display:block;font-size:13px}.settings-row small{display:block;color:var(--muted);font-size:11px;margin-top:3px}.settings-row.static{cursor:default}.file-settings{position:relative;cursor:pointer}.file-settings input{position:absolute;inset:0;opacity:0;cursor:pointer}.field-hint{display:block;margin:6px 3px 0;color:var(--muted);font-size:10px;line-height:1.4}
@media (max-width:380px){.hero-content{left:15px;right:15px}.hero-name{font-size:31px}.pill{display:none}.category-grid{grid-template-columns:1fr}.two-col{grid-template-columns:1fr}}


/* PWA installation */
.install-banner{position:fixed;z-index:70;left:50%;transform:translateX(-50%);top:10px;width:calc(100% - 20px);max-width:500px;display:grid;grid-template-columns:48px 1fr auto 28px;gap:10px;align-items:center;padding:10px 9px 10px 10px;border:1px solid rgba(210,164,71,.28);border-radius:18px;background:rgba(20,21,23,.96);box-shadow:0 16px 50px rgba(0,0,0,.42);backdrop-filter:blur(20px)}
.install-icon{width:48px;height:48px;border-radius:13px;border:1px solid rgba(210,164,71,.32)}
.install-copy{min-width:0;display:flex;flex-direction:column;gap:3px}.install-copy strong{font-size:13px;color:var(--text)}.install-copy span{font-size:10px;line-height:1.3;color:var(--muted)}
.install-cta{border:0;border-radius:11px;padding:9px 10px;background:linear-gradient(135deg,var(--gold-2),var(--gold));color:#111;font-size:11px;font-weight:800}
.install-close{border:0;background:none;color:#8c8983;font-size:22px;line-height:1;padding:0}
.install-steps{display:grid;gap:10px;margin:4px 0 16px}.install-steps>div{display:grid;grid-template-columns:34px 1fr;gap:11px;align-items:center;padding:12px;border:1px solid var(--line);border-radius:15px;background:#18191b}.install-steps>div>span{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:rgba(210,164,71,.12);color:var(--gold-2);font-weight:800}.install-steps p{margin:0;color:#d8d4cb;font-size:13px;line-height:1.45}
.install-note{margin:0 0 12px;padding:11px 12px;border-radius:13px;background:rgba(210,164,71,.1);color:#e0d4bb;font-size:12px;line-height:1.4}.share-symbol{color:var(--gold-2);font-weight:800}.install-preview{display:flex;align-items:center;gap:12px;padding:13px;border-radius:16px;background:#111214;border:1px solid rgba(210,164,71,.18)}.install-preview img{width:58px;height:58px;border-radius:15px}.install-preview div{display:flex;flex-direction:column;gap:4px}.install-preview strong{color:var(--gold-2);letter-spacing:.18em}.install-preview small{color:var(--muted);line-height:1.35}
@media (max-width:390px){.install-banner{grid-template-columns:44px 1fr auto 22px}.install-icon{width:44px;height:44px}.install-copy span{display:none}.install-cta{padding:8px 9px}}

/* KORA V2 brand refinements */
.today-line { color: var(--gold-2); font-size: 13px; font-weight: 600; letter-spacing: .01em; margin: 2px 2px 14px; display:flex; align-items:center; gap:8px; }
.today-line::before { content:"▣"; font-size:14px; color:var(--gold); }
.icon-button { justify-self:end; box-shadow: inset 0 0 0 1px rgba(255,255,255,.02); }
.hero { border-color: rgba(240,199,107,.22); }
.card { border-color: rgba(240,199,107,.10); }
.primary-btn { letter-spacing:.02em; }
@media (max-width:380px){ .brand-logo{width:76px;height:76px;border-radius:18px;} .topbar{padding-top:8px;} }

/* KORA V2.1 – Home appointment cards */
.list-card {
  background: linear-gradient(145deg, rgba(27,28,31,.98), rgba(20,21,23,.98));
  border: 1px solid rgba(240,199,107,.10);
}
.list-card .list-row.row-button {
  appearance: none;
  -webkit-appearance: none;
  background: linear-gradient(145deg, rgba(27,28,31,.98), rgba(20,21,23,.98));
  color: var(--text);
}
.list-card .list-row.row-button:hover,
.list-card .list-row.row-button:focus-visible {
  background: linear-gradient(145deg, rgba(36,35,32,.98), rgba(22,23,25,.98));
}
.list-card .list-title { color: var(--text); }
.list-card .list-sub { color: #bdb9b1; }
.list-card .list-end { color: #d5d0c6; }


/* KORA V3 – Auth & Cloud */
.auth-hidden{display:none!important}
.auth-gate{min-height:100dvh;display:grid;place-items:center;padding:28px 18px;background:radial-gradient(circle at 50% 12%,rgba(211,165,75,.12),transparent 35%),#090a0b;color:#f6f3eb}
.auth-gate.hidden{display:none}
.auth-card{width:min(100%,430px);background:linear-gradient(180deg,#151617,#0e0f10);border:1px solid rgba(211,165,75,.25);border-radius:28px;padding:30px 22px;box-shadow:0 30px 80px rgba(0,0,0,.45);text-align:center}
.auth-logo{width:180px;max-width:62%;height:auto;margin:0 auto 18px;display:block}
.auth-card h1{font-size:25px;margin:0 0 10px}.auth-card p{color:#b8b8b8;line-height:1.55;margin:0 0 24px}
.auth-form{text-align:left;display:grid;gap:9px}.auth-form label{font-size:13px;color:#d7ad59;font-weight:700;text-transform:uppercase;letter-spacing:.07em}
.auth-form input{width:100%;box-sizing:border-box;background:#0b0c0d;color:#fff;border:1px solid #343536;border-radius:14px;padding:15px;font-size:16px;outline:none}.auth-form input:focus{border-color:#d3a54b}
.auth-form .primary-btn{margin-top:7px}.auth-message{min-height:22px;margin-top:16px;color:#d7ad59;font-size:14px;line-height:1.4}.auth-card small{display:block;color:#777;margin-top:8px;line-height:1.4}
.account-chip{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 14px;border:1px solid #2c2d2e;background:#111213;border-radius:14px;margin-bottom:12px}.account-chip small{display:block;color:#888;margin-top:2px}.cloud-dot{width:8px;height:8px;border-radius:50%;background:#d3a54b;display:inline-block;margin-right:6px}

/* KORA V3.1 – Mehrpferde & Checkout */
.horse-switch.active-horse{background:rgba(201,164,92,.08)}
.add-horse-row strong{color:var(--gold,#c9a45c)}
.purchase-box{display:grid;gap:16px;line-height:1.55}
.purchase-box .primary-btn{width:100%;margin-top:4px}

/* KORA V4 – Release hardening */
.auth-legal{margin-top:18px;display:flex;gap:7px;align-items:center;justify-content:center;color:#676767}.auth-legal button{border:0;background:none;color:#8f8b83;font-size:10px;padding:4px;cursor:pointer}.auth-legal button:hover{color:#d3a54b}
.legal-copy{display:grid;gap:8px;color:#d5d2ca;font-size:13px;line-height:1.55}.legal-copy h3{margin:12px 0 0;color:#e5bd68;font-size:13px;letter-spacing:.03em}.legal-copy p{margin:0}.legal-note{margin-top:12px!important;padding:12px 13px;border-radius:14px;border:1px solid rgba(211,165,75,.18);background:rgba(211,165,75,.06);color:#b9af9b!important;font-size:11px!important}
.sync-pending{opacity:.75}

