:root {
  --bg: #000;
  --card: #1c1c1e;
  --card2: #2c2c2e;
  --line: #38383a;
  --text: #fff;
  --dim: #98989f;
  --accent: #ff9f0a;
  --blue: #0a84ff;
  --green: #30d158;
  --red: #ff3b30;
  --top: env(safe-area-inset-top, 0px);
  --bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; background: var(--bg); overflow: hidden; overscroll-behavior: none; }
body {
  color: var(--text);
  font: 17px/1.3 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }
svg { display: block; }

.view { position: fixed; inset: 0; display: flex; flex-direction: column; padding: var(--top) 16px var(--bottom); background: var(--bg); }

/* Startseite */
.bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 4px 0; }
.bar h1 { margin: 0; font-size: 34px; font-weight: 700; letter-spacing: .3px; }
.plain { width: 44px; height: 44px; display: grid; place-items: center; color: var(--dim); margin-right: -10px; }
.presets { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-content: center; justify-items: center; max-width: 380px; width: 100%; margin: 0 auto; }
.presets button {
  width: min(27vw, 104px); aspect-ratio: 1; border-radius: 50%;
  background: rgba(255,159,10,.16); color: var(--accent);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px rgba(255,159,10,.16);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: transform .12s, opacity .12s;
}
.presets button:active { transform: scale(.94); opacity: .75; }
.presets b { font-size: 30px; font-weight: 400; font-variant-numeric: tabular-nums; line-height: 1.05; }
.presets span { font-size: 13px; }

.wide { display: block; width: 100%; max-width: 380px; margin: 0 auto 12px; padding: 15px; border-radius: 14px; background: var(--card); text-align: center; }
.wide:active { background: var(--card2); }
.wide.accent { background: var(--accent); color: #000; font-weight: 600; }
.wide.danger { color: #ff453a; margin-top: 24px; }

/* Warten */
.black { background: #000; align-items: center; justify-content: flex-end; padding-bottom: calc(var(--bottom) + 28px); }
#blackHint { margin: 0; font-size: 13px; color: #55555a; transition: opacity 1s; }
#blackHint.gone { opacity: 0; }

#waitTimer { justify-content: center; gap: 56px; }
.dial { position: relative; width: min(74vw, 300px); aspect-ratio: 1; margin: 0 auto; }
.dial svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dial circle { fill: none; stroke-width: 7; }
.dial .track { stroke: var(--card2); }
.dial .arc { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 100 100; transition: stroke-dashoffset .25s linear; }
#dialTime { position: absolute; inset: 0; display: grid; place-items: center; font-size: 62px; font-weight: 200; font-variant-numeric: tabular-nums; }

/* Anrufansichten */
.phone { padding: 0; background: #1b1b1f; overflow: hidden; }
.poster { position: absolute; inset: -40px; background: radial-gradient(120% 70% at 50% 10%, #5a5a63 0%, #2c2c31 48%, #131316 100%); background-size: cover; background-position: center; }
.poster.photo { filter: blur(26px) brightness(.5); }
.who { position: relative; padding: calc(var(--top) + 8vh) 24px 0; text-align: center; }
.avatar {
  width: 92px; height: 92px; margin: 0 auto 14px; border-radius: 50%;
  display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(#a1a1a8, #6e6e75) center / cover no-repeat;
  color: #fff; font-size: 38px; font-weight: 500;
}
.name { font-size: 34px; font-weight: 400; line-height: 1.15; overflow-wrap: anywhere; }
.sub { margin-top: 6px; font-size: 18px; color: rgba(255,255,255,.72); font-variant-numeric: tabular-nums; }

.round { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; color: #fff; font-style: normal; }
.round svg { width: 36px; height: 36px; fill: currentColor; }
.round.red { background: var(--red); }
.round.green { background: var(--green); }
.round.glass { background: rgba(255,255,255,.15); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); }
.hangup { transform: rotate(135deg); }

.ringFoot { position: relative; margin-top: auto; padding: 0 44px calc(var(--bottom) + 44px); }
.minor, .major { display: flex; justify-content: space-between; }
.minor { margin-bottom: 40px; padding: 0 12px; }
.minor button { width: 76px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; color: rgba(255,255,255,.85); }
.minor svg { width: 24px; height: 24px; fill: currentColor; }
.major button { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 14px; }
.major button:active .round { filter: brightness(1.3); }

.callFoot { position: relative; margin: auto auto 0; padding: 0 0 calc(var(--bottom) + 44px); display: grid; grid-template-columns: repeat(3, 76px); gap: 24px min(9vw, 34px); }
.callFoot button { display: flex; flex-direction: column; align-items: center; gap: 7px; font-size: 13px; white-space: nowrap; }
.callFoot .round svg { width: 30px; height: 30px; }
.tog.on .round { background: #fff; color: #1c1c1e; }

/* Einstellungen */
.page { padding: 0; background: #000; }
.nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: calc(var(--top) + 10px) 16px 10px; background: #000; }
.nav strong { font-weight: 600; }
.link { color: var(--blue); cursor: pointer; }
.nav .link { justify-self: end; font-weight: 600; }
.scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 16px calc(var(--bottom) + 28px); }
.scroll h2 { margin: 22px 16px 7px; font-size: 13px; font-weight: 400; color: var(--dim); text-transform: uppercase; letter-spacing: .3px; }
.group { background: var(--card); border-radius: 12px; overflow: hidden; }
.group li { display: flex; align-items: center; min-height: 46px; padding: 0 16px; position: relative; }
.group li + li::before { content: ""; position: absolute; left: 16px; right: 0; top: 0; height: .5px; background: var(--line); }
.row { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; min-height: 46px; text-align: left; }
.row .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .d { color: var(--dim); font-size: 15px; }
.row.add { color: var(--blue); }
.check { color: var(--blue); font-weight: 600; width: 20px; text-align: right; }
.more { width: 40px; height: 44px; margin-right: -12px; color: var(--dim); font-size: 22px; }
.note { margin: 10px 16px 0; font-size: 13px; color: var(--dim); }

.photoRow { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 0 22px; }
.photoRow .avatar { margin: 0; }
.field { gap: 12px; }
.field label { width: 76px; flex: none; }
.field input { flex: 1; min-width: 0; height: 46px; border: 0; outline: 0; background: none; color: var(--text); font: inherit; -webkit-user-select: text; user-select: text; }
.segments { flex: 1; display: flex; margin: 8px 0; padding: 2px; border-radius: 9px; background: #000; }
.segments button { flex: 1; padding: 6px 2px; border-radius: 7px; font-size: 13px; color: var(--dim); }
.segments button.on { background: #636366; color: #fff; }

/* Eigene Zeit */
.sheetWrap { position: fixed; inset: 0; display: flex; align-items: flex-end; background: rgba(0,0,0,.55); }
.sheet { width: 100%; padding: 18px 16px calc(var(--bottom) + 12px); background: #121214; border-radius: 16px 16px 0 0; animation: rise .22s ease-out; }
@keyframes rise { from { transform: translateY(100%); } }
.wheels { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; height: 180px; margin-bottom: 16px; color: var(--dim); }
.wheel { width: 72px; height: 180px; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; padding: 72px 0; color: var(--text); text-align: right; font-size: 23px; font-variant-numeric: tabular-nums; }
.wheel::-webkit-scrollbar { display: none; }
.wheel div { height: 36px; line-height: 36px; padding-right: 8px; scroll-snap-align: center; }
.wheels span { width: 44px; }
.lens { position: absolute; left: 0; right: 0; top: 72px; height: 36px; border-radius: 8px; background: rgba(255,255,255,.09); pointer-events: none; }
