/* Locate – nach Apples Human Interface Guidelines: Liquid Glass (iOS 27), dunkles Erscheinungsbild,
   Systemfarben, SF-Typografie, gruppierte Listen, getönte Knöpfe. Der Globus füllt den Bildschirm. */
:root {
  /* iOS-Systemfarben (dunkel) */
  --label: #fff; --label2: rgba(235, 235, 245, .6); --label3: rgba(235, 235, 245, .3);
  --separator: rgba(84, 84, 88, .55); --fill: rgba(120, 120, 128, .24); --fill2: rgba(120, 120, 128, .16);
  --cell: rgba(118, 118, 128, .14);
  --blue: #0a84ff; --blue-tint: rgba(10, 132, 255, .2); --blue-text: #409cff;
  --red: #ff453a; --red-tint: rgba(255, 69, 58, .18); --green: #30d158; --orange: #ff9f0a; --gray: #8e8e93;
  /* Liquid Glass */
  --glass: rgba(28, 28, 30, .5); --glass-edge: rgba(255, 255, 255, .12); --glass-hi: rgba(255, 255, 255, .28);
  --blur: blur(40px) saturate(180%);
  --shadow: 0 20px 60px rgba(0, 0, 0, .5), 0 1px 3px rgba(0, 0, 0, .3);
  --ease: cubic-bezier(.32, .72, 0, 1);
  --top: calc(env(safe-area-inset-top) + 8px); --bottom: calc(env(safe-area-inset-bottom) + 12px);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #000; color: var(--label); }
body { font: 17px/1.29 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
       letter-spacing: -.022em; -webkit-font-smoothing: antialiased; -webkit-user-select: none; user-select: none; }
p, li, .sheet-body { -webkit-user-select: text; user-select: text; }
button, input, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { -webkit-appearance: none; appearance: none; }
a { color: var(--blue-text); text-decoration: none; }
[hidden] { display: none !important; }
svg { display: block; }
.icon-btn svg, .close svg, .go svg, .sym svg, .drop-card svg {
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.globe { position: fixed; inset: 0; z-index: 0; cursor: grab; }
.globe:active { cursor: grabbing; }

/* Liquid Glass: helle Lichtkante oben, Unschärfe, weiche Schatten */
.glass {
  background: var(--glass); border: .5px solid var(--glass-edge);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--shadow), inset 0 .5px 0 var(--glass-hi), inset 0 0 0 .5px rgba(255, 255, 255, .04);
}

/* Kopfzeile */
.top { position: fixed; z-index: 3; top: var(--top); left: 50%; transform: translateX(-50%);
  width: min(760px, calc(100% - 20px)); display: flex; align-items: center; justify-content: space-between;
  border-radius: 999px; padding: 6px 6px 6px 8px; }
h1 { display: flex; align-items: center; gap: 9px; font-size: 17px; font-weight: 600; margin: 0; letter-spacing: -.024em; }
.app-icon { width: 30px; height: 30px; border-radius: 7px; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
.app-icon.big { width: 76px; height: 76px; border-radius: 17px; margin: 0 auto 14px; box-shadow: 0 10px 30px rgba(10, 132, 255, .35); }
nav { display: flex; gap: 6px; }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--fill2); color: var(--label);
  display: grid; place-items: center; cursor: pointer; transition: transform .2s var(--ease), background .2s; }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { background: var(--fill); }
.icon-btn:active { transform: scale(.9); }

/* Typografie (iOS-Textstile) */
h2 { font-size: 22px; line-height: 1.27; font-weight: 700; letter-spacing: -.026em; margin: 0 0 8px; }
h3 { font-size: 13px; line-height: 1.38; font-weight: 400; letter-spacing: -.006em; text-transform: uppercase;
  color: var(--label2); margin: 0 0 6px 16px; }
p { margin: 8px 0; font-size: 17px; line-height: 1.35; }
.muted { color: var(--label2); font-size: 15px; letter-spacing: -.016em; }
.small { color: var(--label2); font-size: 13px; letter-spacing: -.006em; margin: 8px 0 0; }
.error { color: var(--red); font-size: 15px; margin: 8px 0 0; }
.error:empty { display: none; }

/* Knöpfe: getönt (bordered) und gefüllt (borderedProminent) */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; padding: 7px 14px;
  margin: 4px 6px 4px 0; background: var(--blue-tint); color: var(--blue-text); font-size: 15px; font-weight: 500;
  letter-spacing: -.016em; cursor: pointer; transition: transform .2s var(--ease), opacity .2s; }
.btn:hover { opacity: .85; }
.btn:active { transform: scale(.95); }
.btn.danger { background: var(--red-tint); color: var(--red); }
.primary { width: 100%; height: 50px; border: 0; border-radius: 999px; background: var(--blue); color: #fff;
  font-size: 17px; font-weight: 600; cursor: pointer; transition: transform .2s var(--ease), opacity .2s; }
.primary:active { transform: scale(.97); opacity: .85; }
.close { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--fill); color: var(--label2);
  display: grid; place-items: center; cursor: pointer; flex: none; }
.close svg { width: 14px; height: 14px; stroke-width: 2.6; }

/* Eingabefelder */
input[type=password], input[type=text], textarea { width: 100%; border: 0; border-radius: 12px; padding: 13px 16px;
  background: var(--fill2); outline: none; font-size: 17px; -webkit-user-select: text; user-select: text; }
textarea { resize: vertical; margin-bottom: 8px; min-height: 76px; line-height: 1.35; }
input:focus, textarea:focus { box-shadow: 0 0 0 3px rgba(10, 132, 255, .5); }
::placeholder { color: var(--label3); }

/* Anmeldung */
.login { position: fixed; z-index: 4; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(360px, calc(100% - 32px));
  border-radius: 32px; padding: 32px 22px 22px; text-align: center; animation: pop .5s var(--ease); }
.login h2 { font-size: 28px; margin: 0; }
.login .muted { margin: 4px 0 0; }
.login form { margin-top: 24px; display: grid; gap: 12px; }

/* Upload-Leiste unten (wie das Suchfeld in Karten) */
.dock { position: fixed; z-index: 3; bottom: var(--bottom); left: 50%; transform: translateX(-50%);
  width: min(620px, calc(100% - 20px)); display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: 999px;
  flex-wrap: wrap; animation: rise .5s var(--ease); }
.pick { width: 46px; height: 46px; border-radius: 50%; flex: none; cursor: pointer; overflow: hidden; background: var(--fill2)
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8.5A1.5 1.5 0 0 1 5.5 7h2l1.5-2h6l1.5 2h2A1.5 1.5 0 0 1 20 8.5v9a1.5 1.5 0 0 1-1.5 1.5h-13A1.5 1.5 0 0 1 4 17.5z'/%3E%3Ccircle cx='12' cy='12.8' r='3.3'/%3E%3C/svg%3E") center / 23px no-repeat;
  transition: transform .2s var(--ease); }
.pick:active { transform: scale(.92); }
.pick img { width: 100%; height: 100%; object-fit: cover; }
.dock input[type=text] { flex: 1; min-width: 0; background: transparent; padding: 12px 6px; box-shadow: none; }
.go { width: 46px; height: 46px; border-radius: 50%; border: 0; flex: none; color: #fff; cursor: pointer; display: grid;
  place-items: center; background: var(--blue); transition: transform .2s var(--ease), opacity .2s, background .2s; }
.go svg { width: 21px; height: 21px; stroke-width: 2.4; }
.go:active { transform: scale(.9); }
.go:disabled { background: var(--fill); color: var(--label3); cursor: default; }
.go.busy svg { animation: spin 1s linear infinite; }
.dock-error { flex-basis: 100%; text-align: center; margin: 2px 0 4px; }

.dropzone { position: fixed; inset: 0; z-index: 9; display: grid; place-items: center; background: rgba(0, 0, 0, .35);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: fade .2s; }
.drop-card { display: grid; justify-items: center; gap: 4px; padding: 28px 40px; border-radius: 28px; text-align: center;
  outline: 2px dashed rgba(10, 132, 255, .8); outline-offset: -10px; animation: pop .3s var(--ease); }
.drop-card svg { width: 44px; height: 44px; color: var(--blue-text); margin-bottom: 6px; }
.drop-card strong { font-size: 20px; }
.drop-card span { color: var(--label2); font-size: 15px; }

/* Blatt: unten (Handy, mit Griff) bzw. rechts (Desktop) */
.sheet { position: fixed; z-index: 2; left: 8px; right: 8px; bottom: var(--bottom); height: 56vh; border-radius: 34px;
  display: flex; flex-direction: column; animation: rise .5s var(--ease); }
.grabber { width: 36px; height: 5px; border-radius: 3px; background: var(--label3); margin: 7px auto 0; flex: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px 6px 20px; }
.sheet-head h2 { margin: 0; font-size: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-body { overflow-y: auto; padding: 4px 16px 24px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
@media (min-width: 900px) {
  .sheet { left: auto; right: 14px; top: calc(var(--top) + 66px); bottom: calc(var(--bottom) + 76px); width: 400px;
    height: auto; animation-name: slide; }
  .grabber { display: none; }
  .sheet-head { padding-top: 16px; }
}
.dock { --tx: -50%; }
.login { --px: -50%; --py: -50%; }
@keyframes rise { from { transform: translate(var(--tx, 0), 30px); opacity: 0; } }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
@keyframes pop { from { transform: translate(var(--px, 0), var(--py, 0)) scale(.94); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* Inhalt des Blatts */
.photo { width: 100%; border-radius: 16px; display: block; margin: 4px 0 2px; }
.sheet-body > .small { margin: 6px 4px 0; }
.sheet-body > p { margin: 14px 4px; }
.status { display: flex; align-items: center; gap: 12px; color: var(--label2); padding: 14px 4px; }
.spinner { width: 20px; height: 20px; border: 2.5px solid var(--fill); border-top-color: var(--label2); border-radius: 50%;
  animation: spin .9s linear infinite; flex: none; }

.maps-main { display: flex; align-items: center; gap: 12px; margin: 14px 0 4px; padding: 10px 18px 10px 12px; min-height: 58px;
  border-radius: 999px; background: var(--blue); color: #fff; transition: transform .2s var(--ease), opacity .2s; }
.maps-main .sym { width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .2); display: grid; place-items: center; flex: none; }
.maps-main .sym svg { width: 20px; height: 20px; stroke-width: 2.2; }
.maps-main span:last-child { display: grid; gap: 1px; min-width: 0; }
.maps-main strong { font-size: 17px; font-weight: 600; }
.maps-main small { font-size: 13px; opacity: .8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.maps-main.apple { margin-top: 8px; background: var(--cell); color: var(--label); }
.maps-main.apple .sym { background: var(--fill); color: var(--blue-text); }
.maps-main:active { transform: scale(.97); opacity: .85; }

/* Gruppierte Liste (inset grouped): Zellen ohne Abstand, Trennlinien, abgerundete Gruppe */
.block { margin-top: 26px; }
.block > :not(h3) { background: var(--cell); margin: 0; }
.block > h3 + * , .block > :first-child:not(h3) { border-top-left-radius: 14px; border-top-right-radius: 14px; }
.block > :last-child { border-bottom-left-radius: 14px; border-bottom-right-radius: 14px; }
.block > ul.clean, .block > p, .block > details, .block > div:not(.cand):not(.row), .block > textarea { padding: 12px 16px; }
.block > textarea { display: block; width: 100%; min-height: 70px; border-radius: 0; box-shadow: none; }
.block > h3 + textarea { border-radius: 14px 14px 0 0; }
.block > .btn { display: flex; justify-content: center; width: 100%; margin: 0; border-radius: 0; padding: 13px 16px;
  background: var(--cell); color: var(--blue-text); font-size: 17px; font-weight: 400; border-top: .5px solid var(--separator); }
.block > .btn.danger { color: var(--red); }
.block > a.btn { justify-content: flex-start; }
.block > h3 + .btn { border-top: 0; }
.block > .btn:last-child { border-bottom-left-radius: 14px; border-bottom-right-radius: 14px; }
.block .btn:active { transform: none; background: var(--fill); }

.cand { padding: 12px 16px; cursor: pointer; position: relative; }
.cand + .cand::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: .5px solid var(--separator); }
.cand-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cand-head strong { font-size: 17px; font-weight: 600; }
.cand .muted { font-size: 15px; }
.cand p { margin: 6px 0; font-size: 15px; color: var(--label2); }
.cand .btn { font-size: 14px; padding: 6px 12px; }
.badge { font-size: 12px; font-weight: 600; border-radius: 999px; padding: 2px 8px; letter-spacing: 0;
  color: var(--gray); background: rgba(142, 142, 147, .18); }
.badge.bestätigt { color: var(--green); background: rgba(48, 209, 88, .16); }
.badge.wahrscheinlich { color: var(--blue-text); background: var(--blue-tint); }
.badge.möglich { color: var(--orange); background: rgba(255, 159, 10, .16); }
.map { width: 100%; height: 200px; border: 0; border-radius: 12px; margin: 10px 0 4px; display: block;
  filter: invert(.9) hue-rotate(180deg) saturate(.7) brightness(.95); background: #1c1c1e; }

ul.clean { list-style: none; padding: 0; margin: 0; }
ul.clean li { padding: 9px 0; font-size: 15px; line-height: 1.35; }
ul.clean li + li { border-top: .5px solid var(--separator); }
.stark { color: var(--green); } .mittel { color: var(--orange); } .schwach { color: var(--gray); }
details summary { cursor: pointer; color: var(--blue-text); padding: 2px 0; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: " ›"; }
details[open] summary::after { content: " ⌄"; }
pre.notes { white-space: pre-wrap; font: 14px/1.5 -apple-system, BlinkMacSystemFont, sans-serif; color: var(--label2); margin: 8px 0 0; }

/* Verlauf */
.list { display: block; }
.row { display: flex; gap: 12px; align-items: center; padding: 8px 12px 8px 10px; cursor: pointer; position: relative; }
.row + .row::before { content: ""; position: absolute; top: 0; left: 76px; right: 0; border-top: .5px solid var(--separator); }
.row:active { background: var(--fill2); }
.row img { width: 54px; height: 54px; border-radius: 10px; object-fit: cover; flex: none; background: var(--fill); }
.row > div { flex: 1; min-width: 0; }
.row strong { display: block; font-size: 17px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row span { color: var(--label2); font-size: 15px; }
.chevron { color: var(--label3); flex: none; }
.chevron svg { width: 16px; height: 16px; stroke-width: 2.4; }
.empty { text-align: center; padding: 40px 20px; }

/* Beschriftung auf dem Globus */
.marker { display: inline-flex; align-items: center; gap: 4px; font: 600 13px/1 -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: -.01em; color: #fff; padding: 7px 11px; border-radius: 999px; background: rgba(28, 28, 30, .6);
  border: .5px solid rgba(255, 255, 255, .2); -webkit-backdrop-filter: blur(16px) saturate(180%); backdrop-filter: blur(16px) saturate(180%);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .4); white-space: nowrap; transform: translate(-50%, -160%); pointer-events: auto; cursor: pointer; }
a.marker { color: #fff; }
@media (prefers-reduced-motion: reduce) { .sheet, .dock, .login, .drop-card { animation: none; } }

/* Feinschliff */
.block > h3 + .btn { border-top-left-radius: 14px; border-top-right-radius: 14px; }
.block > ul.clean { padding-top: 3px; padding-bottom: 3px; }
.sheet-body > .block:first-child { margin-top: 8px; }
.sheet-body { -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16px); mask-image: linear-gradient(to bottom, transparent 0, #000 16px); }
