/* ATLAS – Clean premium × JARVIS HUD */
@font-face { font-family: 'Inter'; src: url(fonts/inter.woff2) format('woff2'); font-weight: 100 900; font-display: block;
  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'; src: url(fonts/inter-ext.woff2) format('woff2'); font-weight: 100 900; font-display: block;
  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: 'JB Mono'; src: url(fonts/jbmono-400.woff2) format('woff2'); font-weight: 400; font-display: block; }
@font-face { font-family: 'JB Mono'; src: url(fonts/jbmono-500.woff2) format('woff2'); font-weight: 500; font-display: block; }
@font-face { font-family: 'JB Mono'; src: url(fonts/jbmono-600.woff2) format('woff2'); font-weight: 600; font-display: block; }

:root {
  color-scheme: dark;
  --bg: #05080d;
  --surface: #0d141d;
  --surface-2: #121b27;
  --surface-3: #182334;
  --glass: rgba(13, 20, 29, 0.74);
  --line: rgba(130, 190, 255, 0.09);
  --line-2: rgba(130, 190, 255, 0.16);
  --grid: #1a2533;
  --axis: #2a3747;
  --text: #e9f2fc;
  --text-2: #a2b3c6;
  --muted: #6b7f94;
  --accent: #4fd2ff;
  --accent-ink: #04121a;
  --accent-wash: rgba(79, 210, 255, 0.1);
  --accent-glow: 0 0 0 1px rgba(79, 210, 255, 0.35), 0 0 22px rgba(79, 210, 255, 0.22);
  /* focus polarity: productive ↔ distraction with a neutral gray midpoint */
  --prod: #2a9fd6;
  --neutral: #4c5a6a;
  --dist: #e0662f;
  --away: #1c2735;
  /* life modules (validated order: focus, habits, content, fitness) */
  --m-focus: #2b9bd8;
  --m-habits: #c98500;
  --m-content: #9085e9;
  --m-fitness: #19a974;
  --good: #0ca30c;
  --good-ink: #3ad13a;
  --warn: #fab219;
  --crit: #d03b3b;
  --crit-ink: #ff7a7a;
  --health: #ff4f73; /* Apple Health source mark */
  /* platform identity (Social) – always paired with glyph + name; social.css may refine them */
  --pf-yt: #ee362f;
  --pf-ig: #b91a96;
  --pf-tt: #12a7a7;
  --radius: 18px;
  --radius-sm: 10px;
  --font: 'Inter', 'Segoe UI Variable Text', 'Segoe UI', system-ui, sans-serif;
  --mono: 'JB Mono', 'Cascadia Mono', Consolas, monospace;
  --titlebar: 44px;
  --sidebar: 220px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 14px/1.45 var(--font);
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  user-select: none;
}
body::before { /* ambient light */
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(1100px 620px at 12% -10%, rgba(42, 159, 214, 0.13), transparent 60%),
    radial-gradient(900px 700px at 100% 110%, rgba(144, 133, 233, 0.09), transparent 60%);
}
#bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.9; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(79, 210, 255, 0.3); }
input, textarea { user-select: text; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(130, 190, 255, 0.12); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(130, 190, 255, 0.22); }
::-webkit-scrollbar-track { background: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ───── Titlebar ───── */
.titlebar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--titlebar); z-index: 20;
  display: flex; align-items: center; gap: 18px; padding: 0 150px 0 18px;
  -webkit-app-region: drag;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(5, 8, 13, 0.92), rgba(5, 8, 13, 0.7));
  backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 10px; width: calc(var(--sidebar) - 18px); }
.brand svg { width: 22px; height: 22px; }
.brand b { font: 600 13px/1 var(--mono); letter-spacing: 0.32em; }
.brand em { font: 400 10px/1 var(--mono); color: var(--muted); font-style: normal; letter-spacing: 0.12em; text-transform: uppercase; }
.sys { display: flex; align-items: center; gap: 8px; font: 500 10.5px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-2); }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: pulse 2.4s ease-in-out infinite; }
.pulse.off { background: var(--muted); box-shadow: none; animation: none; }
.pulse.warn { background: var(--warn); box-shadow: 0 0 10px var(--warn); }
@keyframes pulse { 50% { opacity: 0.35; } }
.titlebar .spacer { flex: 1; }
.clock { font: 500 12px/1 var(--mono); color: var(--text-2); letter-spacing: 0.08em; }
.clock b { color: var(--text); font-weight: 600; }
.titlebar .tb-btn { -webkit-app-region: no-drag; }

/* ───── Sidebar ───── */
.sidebar {
  position: fixed; top: var(--titlebar); bottom: 0; left: 0; width: var(--sidebar); z-index: 10;
  padding: 18px 12px; display: flex; flex-direction: column; gap: 4px;
  border-right: 1px solid var(--line);
  background: rgba(5, 8, 13, 0.55); backdrop-filter: blur(10px);
}
.nav-label { font: 500 10px/1 var(--mono); letter-spacing: 0.18em; color: var(--muted); text-transform: uppercase; padding: 14px 12px 8px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  color: var(--text-2); cursor: pointer; border: 1px solid transparent; background: none; text-align: left; width: 100%;
  transition: background 0.15s, color 0.15s;
}
.nav-item svg { width: 18px; height: 18px; flex: none; }
.nav-item:hover { background: rgba(130, 190, 255, 0.05); color: var(--text); }
.nav-item.active { color: var(--text); background: linear-gradient(90deg, rgba(79, 210, 255, 0.12), rgba(79, 210, 255, 0.02)); border-color: rgba(79, 210, 255, 0.16); }
.nav-item.active::before { content: ''; position: absolute; left: -12px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.nav-item .dot { width: 6px; height: 6px; border-radius: 50%; margin-left: auto; }
.sidebar .grow { flex: 1; }
.side-card { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: rgba(13, 20, 29, 0.6); }
.side-card .k { font: 500 10px/1 var(--mono); letter-spacing: 0.14em; color: var(--muted); text-transform: uppercase; }
.side-card .v { margin-top: 8px; font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.side-card .v b { color: var(--text); font-weight: 600; }

/* ───── Main view ───── */
#view {
  position: fixed; top: var(--titlebar); left: var(--sidebar); right: 0; bottom: 0; z-index: 5;
  overflow-y: auto; overflow-x: hidden; padding: 26px 30px 40px;
  scroll-behavior: auto;
}
.page { max-width: 1480px; margin: 0 auto; animation: fadeUp 0.35s ease both; }
.page.no-anim { animation: none; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; }
.page-head h1 { margin: 0; font-size: 30px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.page-head .sub { margin-top: 6px; color: var(--text-2); font-size: 14px; }
.page-head .eyebrow { font: 500 10.5px/1 var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.page-head .eyebrow::before { content: ''; width: 18px; height: 1px; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.s2 { grid-column: span 2; } .s3 { grid-column: span 3; } .s4 { grid-column: span 4; } .s5 { grid-column: span 5; }
.s6 { grid-column: span 6; } .s7 { grid-column: span 7; } .s8 { grid-column: span 8; } .s9 { grid-column: span 9; } .s12 { grid-column: span 12; }
@media (max-width: 1280px) {
  .s3 { grid-column: span 6; } .s4, .s5, .s7, .s8 { grid-column: span 12; } .s6 { grid-column: span 12; }
}

/* ───── Cards ───── */
.card {
  position: relative; border-radius: var(--radius); padding: 18px 20px;
  background: linear-gradient(180deg, rgba(18, 27, 39, 0.78), rgba(11, 17, 25, 0.78));
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 18px 40px -24px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(14px);
  min-width: 0;
}
.card.hud::before, .card.hud::after { content: ''; position: absolute; width: 14px; height: 14px; pointer-events: none; opacity: 0.7; }
.card.hud::before { top: -1px; left: -1px; border-top: 1px solid var(--accent); border-left: 1px solid var(--accent); border-top-left-radius: var(--radius); }
.card.hud::after { bottom: -1px; right: -1px; border-bottom: 1px solid var(--accent); border-right: 1px solid var(--accent); border-bottom-right-radius: var(--radius); }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; min-height: 22px; }
.card-title { font: 500 10.5px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.card-title .sw { width: 8px; height: 8px; border-radius: 2px; }
.card-head .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.card-note { color: var(--muted); font-size: 12px; }
.card.flush { padding: 0; }
.empty { color: var(--muted); font-size: 13px; padding: 18px 4px; text-align: center; }
.empty b { color: var(--text-2); font-weight: 500; }

/* ───── Stat tiles ───── */
.tile .label { font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.tile .label .sw { width: 8px; height: 8px; border-radius: 50%; }
.tile .value { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; margin-top: 10px; line-height: 1; }
.tile .value small { font-size: 15px; color: var(--text-2); font-weight: 500; margin-left: 4px; letter-spacing: 0; }
.tile .foot { margin-top: 12px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.delta { font-weight: 600; font-size: 12px; }
.delta.up { color: var(--good-ink); } .delta.down { color: var(--crit-ink); } .delta.flat { color: var(--text-2); }
.tile .icon-badge { margin-left: auto; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: rgba(130, 190, 255, 0.06); border: 1px solid var(--line); color: var(--text-2); }
.tile .icon-badge svg { width: 15px; height: 15px; }

/* ───── Meter ───── */
.meter { height: 6px; border-radius: 6px; background: rgba(130, 190, 255, 0.08); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 6px; background: var(--c, var(--accent)); box-shadow: 0 0 12px -2px var(--c, var(--accent)); transition: width 0.6s cubic-bezier(.2,.8,.2,1); }
.meter.lg { height: 10px; }

/* ───── Buttons & inputs ───── */
.btn {
  -webkit-app-region: no-drag; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 34px; padding: 0 14px;
  border-radius: 10px; border: 1px solid var(--line-2); background: rgba(130, 190, 255, 0.05); color: var(--text); cursor: pointer;
  font-size: 13px; font-weight: 500; white-space: nowrap; transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.btn svg { width: 15px; height: 15px; }
.btn:hover { background: rgba(130, 190, 255, 0.1); border-color: rgba(130, 190, 255, 0.28); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 600; }
.btn.primary:hover { box-shadow: var(--accent-glow); background: #6fdbff; }
.btn.ghost { background: none; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { color: var(--text); background: rgba(130, 190, 255, 0.06); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn.icon { width: 34px; padding: 0; }
.btn.icon.sm { width: 28px; }
.btn.danger:hover, .btn.armed { color: var(--crit-ink); border-color: rgba(208, 59, 59, 0.5); background: rgba(208, 59, 59, 0.1); }
.linkbtn.armed, .linkbtn.armed:hover { color: var(--crit-ink); }

.input, select.input, textarea.input {
  height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(5, 8, 13, 0.55);
  color: var(--text); outline: none; width: 100%; transition: border-color 0.15s, box-shadow 0.15s;
}
textarea.input { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.45; }
.input:focus { border-color: rgba(79, 210, 255, 0.6); box-shadow: 0 0 0 3px rgba(79, 210, 255, 0.12); }
.input::placeholder { color: var(--muted); }
select.input { appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a2b3c6' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
select.input option { background: #0d141d; }
input[type='number']::-webkit-inner-spin-button, input[type='number']::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type='date'].input::-webkit-calendar-picker-indicator, input[type='time'].input::-webkit-calendar-picker-indicator { filter: invert(0.75); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 12px; color: var(--text-2); }
.field-row { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.with-unit { position: relative; }
.with-unit .input { padding-right: 44px; }
.with-unit em { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--muted); font-size: 12px; pointer-events: none; }

.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: rgba(5, 8, 13, 0.6); border: 1px solid var(--line); }
.seg button { border: 0; background: none; color: var(--text-2); height: 26px; padding: 0 10px; border-radius: 7px; cursor: pointer; font-size: 12px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.seg button .sw { width: 7px; height: 7px; border-radius: 50%; }
.seg.full { display: flex; } .seg.full button { flex: 1; justify-content: center; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(130, 190, 255, 0.03); color: var(--text-2); cursor: pointer; font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; }
.chip:hover { color: var(--text); border-color: rgba(130, 190, 255, 0.3); }
.chip.on { background: var(--accent-wash); border-color: rgba(79, 210, 255, 0.5); color: var(--text); }
.chip input { display: none; }

.toggle { position: relative; width: 38px; height: 22px; flex: none; }
.toggle input { opacity: 0; width: 100%; height: 100%; margin: 0; position: absolute; cursor: pointer; z-index: 1; }
.toggle i { position: absolute; inset: 0; border-radius: 22px; background: rgba(130, 190, 255, 0.12); transition: background 0.2s; }
.toggle i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #c7d4e2; transition: transform 0.2s, background 0.2s; }
.toggle input:checked + i { background: var(--accent); box-shadow: 0 0 14px -2px var(--accent); }
.toggle input:checked + i::after { transform: translateX(16px); background: var(--accent-ink); }

.tag { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 500; color: var(--text-2); background: rgba(130, 190, 255, 0.06); border: 1px solid var(--line); white-space: nowrap; }
.tag .sw { width: 6px; height: 6px; border-radius: 50%; }
.tag.warn { color: #ffd27a; border-color: rgba(250, 178, 25, 0.35); background: rgba(250, 178, 25, 0.08); }
.tag.crit { color: var(--crit-ink); border-color: rgba(208, 59, 59, 0.4); background: rgba(208, 59, 59, 0.08); }
.tag.good { color: var(--good-ink); border-color: rgba(12, 163, 12, 0.4); background: rgba(12, 163, 12, 0.08); }

/* ───── Lists ───── */
.rows { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-top: 1px solid var(--line); min-width: 0; }
.row:first-child { border-top: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .meta { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .num { font-variant-numeric: tabular-nums; color: var(--text-2); font-size: 13px; white-space: nowrap; }
.row .hover-only { opacity: 0; transition: opacity 0.15s; }
.row:hover .hover-only { opacity: 1; }
.app-icon { width: 30px; height: 30px; border-radius: 9px; flex: none; display: grid; place-items: center; background: var(--surface-3); border: 1px solid var(--line); overflow: hidden; font: 600 12px/1 var(--font); color: var(--text-2); }
.app-icon img { width: 20px; height: 20px; }

/* ───── Check items (habits) ───── */
.check { display: flex; align-items: center; gap: 12px; padding: 9px 10px; margin: 0 -10px; border-radius: 12px; cursor: pointer; transition: background 0.15s; }
.check:hover { background: rgba(130, 190, 255, 0.05); }
.check .box { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid rgba(130, 190, 255, 0.3); display: grid; place-items: center; flex: none; transition: all 0.2s; }
.check .box svg { width: 14px; height: 14px; opacity: 0; color: #1a1200; stroke-width: 3; }
.check.done .box { background: var(--m-habits); border-color: var(--m-habits); box-shadow: 0 0 14px -3px var(--m-habits); }
.check.done .box svg { opacity: 1; }
.check.done .name { color: var(--text-2); }
.check .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.streak { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.streak svg { width: 13px; height: 13px; color: var(--m-habits); }
.streak.cold svg { color: var(--muted); }

/* ───── Hero / reactor ───── */
.hero { display: flex; align-items: center; gap: 26px; }
.reactor { position: relative; flex: none; }
.reactor .spin { transform-origin: 50% 50%; animation: spin 60s linear infinite; }
.reactor .spin.rev { animation-duration: 90s; animation-direction: reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.reactor .center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.reactor .center .k { font: 500 9.5px/1 var(--mono); letter-spacing: 0.22em; color: var(--text-2); text-transform: uppercase; }
.reactor .center .v { font-size: 44px; font-weight: 600; letter-spacing: -0.04em; line-height: 1; margin: 8px 0 6px; text-shadow: 0 0 30px rgba(79, 210, 255, 0.35); }
.reactor .center .l { font-size: 12px; color: var(--accent); font-weight: 500; }
.legend-list { display: flex; flex-direction: column; gap: 14px; flex: 1; min-width: 0; }
.legend-list .li { display: grid; grid-template-columns: 10px 1fr auto; gap: 4px 10px; align-items: center; }
.legend-list .li .sw { width: 10px; height: 10px; border-radius: 3px; }
.legend-list .li .n { font-size: 13px; color: var(--text-2); }
.legend-list .li .p { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.legend-list .li .meter { grid-column: 2 / 4; height: 4px; }

.now { display: flex; flex-direction: column; gap: 14px; height: 100%; }
.now-activity { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: rgba(5, 8, 13, 0.45); border: 1px solid var(--line); }
.now-activity .grow { flex: 1; min-width: 0; }
.now-activity .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now-activity .meta { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now-activity .t { font: 500 13px/1 var(--mono); color: var(--text-2); }
.now-activity .meta.now-meta { white-space: normal; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.now-activity > .btn { flex: none; }
.big-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.big-pair .k { font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 7px; }
.big-pair .k .sw { width: 8px; height: 8px; border-radius: 50%; }
.big-pair .v { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; margin-top: 6px; line-height: 1; }
.big-pair .s { font-size: 12px; color: var(--muted); margin-top: 6px; }

.scale { display: flex; gap: 6px; }
.scale button { flex: 1; height: 34px; border-radius: 9px; border: 1px solid var(--line-2); background: rgba(5, 8, 13, 0.4); color: var(--text-2); cursor: pointer; font-weight: 600; font-size: 13px; transition: all 0.15s; }
.scale button:hover { color: var(--text); border-color: rgba(130, 190, 255, 0.3); }
.scale button.on { background: var(--accent-wash); color: var(--text); border-color: rgba(79, 210, 255, 0.55); box-shadow: inset 0 0 12px rgba(79, 210, 255, 0.12); }
.scale-lbl { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 6px; }

.water { display: flex; align-items: center; gap: 18px; }
.water .ringwrap { position: relative; flex: none; }
.water .ringwrap .c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.water .ringwrap .c b { font-size: 17px; font-weight: 600; }
.water .ringwrap .c span { font-size: 10.5px; color: var(--muted); }

/* ───── Charts ───── */
.chart { position: relative; width: 100%; }
.chart svg { display: block; overflow: visible; }
.chart text { font-family: var(--font); fill: var(--muted); font-size: 11px; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; shape-rendering: crispEdges; }
.chart .baseline { stroke: var(--axis); stroke-width: 1; shape-rendering: crispEdges; }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover + .bar, .chart .col:hover .bar { filter: brightness(1.25); }
.chart .xhair { stroke: rgba(162, 179, 198, 0.5); stroke-width: 1; pointer-events: none; }
.chart .endlabel { fill: var(--text-2); font-size: 11.5px; font-weight: 500; }
.chart .goal { stroke: rgba(162, 179, 198, 0.45); stroke-dasharray: 3 4; stroke-width: 1; }
.chart .goal-label { fill: var(--text-2); font-size: 10.5px; paint-order: stroke; stroke: #0f1722; stroke-width: 4px; stroke-linejoin: round; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend i.line { height: 2px; width: 14px; border-radius: 2px; }

.timeline { position: relative; }
.timeline .track { display: flex; gap: 0; height: 34px; border-radius: 8px; overflow: hidden; background: rgba(5, 8, 13, 0.5); }
.timeline .track i { flex: 1; min-width: 0; }
.timeline .ticks { position: relative; height: 18px; margin-top: 6px; }
.timeline .ticks span { position: absolute; transform: translateX(-50%); font: 500 10.5px/1 var(--mono); color: var(--muted); }
.timeline .now-marker { position: absolute; top: -4px; height: 42px; width: 2px; background: var(--accent); box-shadow: 0 0 10px var(--accent); border-radius: 2px; }

.heat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 1fr); gap: 3px; }
.heat i { aspect-ratio: 1; border-radius: 3px; background: rgba(130, 190, 255, 0.05); }
.heat-wrap { display: flex; gap: 8px; }
.heat-days { display: grid; grid-template-rows: repeat(7, 1fr); gap: 3px; font: 500 9.5px/1 var(--mono); color: var(--muted); }
.heat-days span { display: flex; align-items: center; }
.heat-scale { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); margin-top: 10px; justify-content: flex-end; }
.heat-scale i { width: 11px; height: 11px; border-radius: 3px; }

/* ───── Kanban ───── */
.kanban { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.kcol { border-radius: 14px; background: rgba(5, 8, 13, 0.4); border: 1px solid var(--line); padding: 10px; min-height: 220px; display: flex; flex-direction: column; gap: 8px; transition: border-color 0.15s, background 0.15s; }
.kcol.drop { border-color: rgba(79, 210, 255, 0.55); background: rgba(79, 210, 255, 0.05); }
.kcol-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 6px; font: 500 10.5px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-2); }
.kcol-head .n { margin-left: auto; color: var(--muted); }
.kcol-head .step { width: 18px; height: 18px; border-radius: 6px; display: grid; place-items: center; background: rgba(144, 133, 233, 0.12); color: #b9b2f3; font-size: 10px; }
.kcard { border-radius: 11px; padding: 10px 11px; background: var(--surface-2); border: 1px solid var(--line); cursor: grab; transition: transform 0.12s, border-color 0.15s, box-shadow 0.15s; }
.kcard:hover { border-color: rgba(144, 133, 233, 0.45); box-shadow: 0 8px 22px -14px rgba(144, 133, 233, 0.6); }
.kcard.dragging { opacity: 0.4; }
.kcard .t { font-size: 13px; font-weight: 500; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.kcard .m { display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.kadd { display: flex; gap: 6px; margin-top: 2px; }
.kadd .input { height: 30px; font-size: 12.5px; border-radius: 8px; }
.pf { width: 18px; height: 18px; border-radius: 5px; display: inline-grid; place-items: center; font: 700 9.5px/1 var(--font); color: #fff; flex: none; }
.pf-YouTube { background: var(--pf-yt); } .pf-Instagram { background: var(--pf-ig); } .pf-TikTok { background: var(--pf-tt); }
.pf-other { background: var(--surface-3); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line-2); }

/* ───── Day strip ───── */
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.daycell { border-radius: 12px; border: 1px solid var(--line); padding: 10px 8px; background: rgba(5, 8, 13, 0.35); min-height: 92px; display: flex; flex-direction: column; gap: 6px; }
.daycell.today { border-color: rgba(79, 210, 255, 0.5); box-shadow: inset 0 0 18px rgba(79, 210, 255, 0.07); }
.daycell .d { font: 500 10.5px/1 var(--mono); color: var(--muted); letter-spacing: 0.06em; }
.daycell .d b { color: var(--text-2); font-weight: 600; }
.daycell .it { font-size: 11.5px; line-height: 1.3; padding: 5px 6px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--line); display: flex; gap: 5px; align-items: flex-start; cursor: pointer; }
.daycell .it .pf { width: 14px; height: 14px; font-size: 8px; border-radius: 4px; margin-top: 1px; }

/* ───── Habit grid ───── */
.habit-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto 84px 36px 28px; grid-template-areas: 'icon name dots streak check edit' 'icon sub dots streak check edit'; column-gap: 14px; row-gap: 3px; align-items: center; padding: 11px 4px; border-top: 1px solid var(--line); }
.habit-row > .hicon { grid-area: icon; }
.habit-row > .hname { grid-area: name; align-self: end; }
.habit-row > .hsub { grid-area: sub; align-self: start; }
.habit-row > .dots { grid-area: dots; }
.habit-row > .hstreak { grid-area: streak; }
.habit-row > .bigcheck { grid-area: check; }
.habit-row > .hedit { grid-area: edit; }
.habit-row.head { grid-template-areas: 'icon name dots streak check edit'; padding: 0 4px 8px; border-top: 0; }
.habit-row.head > :nth-child(1) { grid-area: icon; } .habit-row.head > :nth-child(2) { grid-area: name; } .habit-row.head > :nth-child(3) { grid-area: dots; }
.habit-row.head > :nth-child(4) { grid-area: streak; } .habit-row.head > :nth-child(5) { grid-area: check; } .habit-row.head > :nth-child(6) { grid-area: edit; }
.habit-row.head + .habit-row { border-top: 0; }
.habit-row:first-of-type { border-top: 0; }
.habit-row .hicon, .hicon.sm { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: rgba(201, 133, 0, 0.1); color: #f0b23a; border: 1px solid rgba(201, 133, 0, 0.25); flex: none; }
.habit-row .hicon svg { width: 16px; height: 16px; }
.hicon.sm { width: 26px; height: 26px; border-radius: 8px; }
.habit-row .hname { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.habit-row .hsub { display: flex; align-items: center; gap: 7px; min-width: 0; white-space: nowrap; overflow: hidden; font-size: 12px; color: var(--muted); }
.hlive { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.hlive.none { color: var(--muted); }
.hman { color: var(--muted); }
.hok { display: inline-grid; place-items: center; flex: none; color: var(--good-ink); }
.hok svg { width: 12px; height: 12px; stroke-width: 3; }
.hbar { flex: 0 1 64px; min-width: 24px; height: 4px; border-radius: 4px; background: rgba(130, 190, 255, 0.1); overflow: hidden; }
.hbar i { display: block; height: 100%; border-radius: 4px; background: var(--m-habits); }
.hbar.over i { background: var(--dist); }
.hneed { border: 0; background: none; padding: 0; font: inherit; font-size: 12px; color: var(--accent); cursor: pointer; white-space: nowrap; }
.hneed:hover { text-decoration: underline; }
.hneed.off { color: var(--muted); cursor: default; text-decoration: none; }
.hstreak { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; cursor: default; min-width: 0; }
.hstreak .best { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hstreak .best svg { width: 11px; height: 11px; }
.dots { display: flex; gap: 4px; }
.dots button { width: 18px; height: 18px; border-radius: 5px; border: 1px solid var(--line-2); background: rgba(5, 8, 13, 0.45); cursor: pointer; padding: 0; position: relative; }
.dots button.on { background: var(--m-habits); border-color: var(--m-habits); }
.dots button.today { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px rgba(79, 210, 255, 0.6); }
.dots button:hover { border-color: rgba(201, 133, 0, 0.8); }
.dots-head { display: flex; gap: 4px; }
.dots-head span { width: 18px; text-align: center; font: 500 8.5px/1 var(--mono); color: var(--muted); letter-spacing: -0.04em; }
.bigcheck { width: 36px; height: 36px; border-radius: 11px; border: 1.5px solid rgba(201, 133, 0, 0.45); background: none; cursor: pointer; display: grid; place-items: center; color: transparent; transition: all 0.2s; }
.bigcheck svg { width: 18px; height: 18px; stroke-width: 3; }
.bigcheck:hover { background: rgba(201, 133, 0, 0.1); }
.bigcheck.on { background: var(--m-habits); border-color: var(--m-habits); color: #1a1200; box-shadow: 0 0 18px -4px var(--m-habits); }

/* automatic habit: "Auto" badge with the source mark (platform glyph, Apple Health heart, PC monitor) */
.auto-src { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px 0 3px; border-radius: 6px; border: 1px solid var(--line-2); background: rgba(130, 190, 255, 0.04); flex: none; cursor: default; }
.auto-src b { font: 600 10.5px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text); }
.auto-src.s-health { border-color: rgba(255, 79, 115, 0.28); }
.auto-src.s-pc { border-color: rgba(79, 210, 255, 0.3); }
.auto-src.s-social { border-color: rgba(185, 26, 150, 0.32); }
.auto-src.off { opacity: 0.55; }
.auto-src.off .rg { filter: grayscale(1); }
.rg { width: 14px; height: 14px; border-radius: 4px; display: inline-grid; place-items: center; flex: none; color: #fff; }
.rg svg { width: 9px; height: 9px; display: block; }
.rg.pf-YouTube { background: var(--pf-yt); } .rg.pf-Instagram { background: var(--pf-ig); } .rg.pf-TikTok { background: var(--pf-tt); }
.rg.pf-all { background: linear-gradient(135deg, var(--pf-yt), var(--pf-ig) 55%, var(--pf-tt)); }
.rg.hl { color: var(--health); background: rgba(255, 79, 115, 0.12); }
.rg.pc { color: var(--accent); background: rgba(79, 210, 255, 0.1); }
.rg.pc svg { width: 10px; height: 10px; }

/* ───── Projection ───── */
.proj { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.proj > div { border-radius: 12px; padding: 12px; background: rgba(5, 8, 13, 0.45); border: 1px solid var(--line); }
.proj .k { font: 500 10px/1 var(--mono); letter-spacing: 0.14em; color: var(--muted); text-transform: uppercase; }
.proj .v { font-size: 19px; font-weight: 600; margin-top: 8px; letter-spacing: -0.02em; white-space: nowrap; }
.proj .v small { font-size: 12px; color: var(--text-2); font-weight: 500; margin-left: 2px; }
.proj-hero { margin: 4px 0 16px; font-size: 14px; color: var(--text-2); line-height: 1.55; }
.proj-hero b { color: var(--text); font-weight: 600; }
.proj-hero .big { display: block; font-size: 38px; font-weight: 600; color: var(--text); letter-spacing: -0.03em; margin-bottom: 2px; }
.proj-hero .big em { font-style: normal; color: #f39a6d; }

/* ───── Settings ───── */
.set-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.set-row:first-child { border-top: 0; padding-top: 2px; }
.set-row .txt { flex: 1; min-width: 0; }
.set-row .txt b { display: block; font-weight: 500; }
.set-row .txt span { font-size: 12px; color: var(--muted); }
.set-row .ctl { flex: none; display: flex; align-items: center; gap: 8px; }
.set-row .ctl .input { width: 120px; }
.set-row .ctl .with-unit .input { width: 120px; }

/* ───── Modal, toast, tooltip ───── */
.modal-back { position: fixed; inset: 0; z-index: 50; background: rgba(2, 4, 8, 0.6); backdrop-filter: blur(6px); display: grid; place-items: center; animation: fade 0.2s ease; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(520px, 92vw); border-radius: 20px; padding: 22px; background: linear-gradient(180deg, #121b27, #0c131c); border: 1px solid var(--line-2); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(79, 210, 255, 0.06); animation: fadeUp 0.25s ease; }
.modal h3 { margin: 0 0 16px; font-size: 18px; font-weight: 600; }
.modal .form { display: flex; flex-direction: column; gap: 12px; }
.modal .foot { display: flex; gap: 8px; margin-top: 18px; }
.modal .foot .spacer { flex: 1; }
#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; gap: 8px; }
.toast { min-width: 260px; max-width: 360px; padding: 12px 14px; border-radius: 14px; background: rgba(18, 27, 39, 0.95); border: 1px solid var(--line-2); box-shadow: 0 20px 40px -20px #000; animation: fadeUp 0.25s ease; }
.toast b { display: block; font-weight: 600; margin-bottom: 2px; }
.toast span { color: var(--text-2); font-size: 13px; }
.tooltip { position: fixed; z-index: 70; pointer-events: none; padding: 9px 11px; border-radius: 10px; background: rgba(9, 14, 21, 0.97); border: 1px solid var(--line-2); box-shadow: 0 14px 30px -12px #000; font-size: 12.5px; color: var(--text); opacity: 0; transform: translateY(4px); transition: opacity 0.12s, transform 0.12s; max-width: 280px; }
.tooltip.show { opacity: 1; transform: none; }
.tooltip .tt-h { font: 500 10.5px/1.2 var(--mono); color: var(--text-2); letter-spacing: 0.06em; margin-bottom: 6px; text-transform: uppercase; }
.tooltip .tt-r { display: flex; align-items: center; gap: 8px; margin-top: 3px; }
.tooltip .tt-r i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.tooltip .tt-r span { flex: 1; color: var(--text-2); }
.tooltip .tt-r b { font-weight: 600; font-variant-numeric: tabular-nums; }

.muted { color: var(--muted); } .t2 { color: var(--text-2); }
.mono { font-family: var(--mono); }
.flex { display: flex; align-items: center; gap: 10px; } .flex.wrap { flex-wrap: wrap; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt20 { margin-top: 20px; }
.hidden { display: none !important; }
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; border: 1px solid rgba(250, 178, 25, 0.3); background: rgba(250, 178, 25, 0.06); color: #ffd890; font-size: 13px; margin-bottom: 16px; }
.banner svg { width: 18px; height: 18px; flex: none; }
.chip:has(input:checked) { background: var(--accent-wash); border-color: rgba(79, 210, 255, 0.5); color: var(--text); }
body { background-image: linear-gradient(rgba(130, 190, 255, 0.022) 1px, transparent 1px), linear-gradient(90deg, rgba(130, 190, 255, 0.022) 1px, transparent 1px); background-size: 56px 56px; }

/* ───── Automation · v1.1 ───── */
.tooltip .tt-t { color: var(--text); font-size: 12.5px; line-height: 1.45; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* status pill (state: label + dot, never color alone) */
.pill { display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 10px; border-radius: 999px; font: 500 10px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-2); border: 1px solid var(--line-2); background: rgba(130, 190, 255, 0.04); white-space: nowrap; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); flex: none; }
.pill.on { color: var(--text); border-color: rgba(12, 163, 12, 0.45); background: rgba(12, 163, 12, 0.08); }
.pill.on i { background: var(--good-ink); box-shadow: 0 0 8px var(--good-ink); animation: pulse 2.4s ease-in-out infinite; }
.pill.err { color: var(--crit-ink); border-color: rgba(208, 59, 59, 0.45); background: rgba(208, 59, 59, 0.08); }
.pill.err i { background: var(--crit-ink); }
.pill.warn { color: #ffd27a; border-color: rgba(250, 178, 25, 0.4); background: rgba(250, 178, 25, 0.08); }
.pill.warn i { background: var(--warn); }

/* source badge: where a value comes from */
.src-badge { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px 0 6px; border-radius: 6px; font-size: 11px; font-weight: 500; color: var(--text-2); background: rgba(255, 79, 115, 0.06); border: 1px solid rgba(255, 79, 115, 0.22); white-space: nowrap; cursor: default; flex: none; }
.src-badge svg { color: var(--health); flex: none; }
.src-badge.compact { width: 16px; height: 16px; padding: 0; justify-content: center; border: 0; background: none; opacity: 0.85; }
.src-badge.compact svg { width: 10px; height: 10px; }
.src-chip { -webkit-app-region: no-drag; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 13px; border-radius: 10px; border: 1px solid rgba(255, 79, 115, 0.25); background: rgba(255, 79, 115, 0.05); color: var(--text-2); font-size: 12.5px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: border-color 0.15s, color 0.15s; }
.src-chip svg { color: var(--health); width: 12px; height: 12px; }
.src-chip b { color: var(--text); font-weight: 600; }
.src-chip .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); flex: none; }
.src-chip:hover { border-color: rgba(255, 79, 115, 0.5); color: var(--text); }
.src-line { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); white-space: nowrap; min-width: 0; }
.src-line svg { color: var(--health); flex: none; }
.src-line.wrap { white-space: normal; align-items: flex-start; line-height: 1.45; }
.src-line.wrap svg { margin-top: 3px; }
.row .meta .auto-chip { margin-right: 2px; vertical-align: 1px; }
.field-head { display: flex; align-items: center; gap: 8px; min-height: 20px; font-size: 12px; color: var(--text-2); }
.field-head .r { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.manual-tag { font-size: 11px; color: var(--muted); }
.linkbtn { border: 0; background: none; padding: 0; color: var(--muted); font-size: 11.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.linkbtn:hover { color: var(--accent); }
.linkbtn svg { width: 12px; height: 12px; }
.tile.compact { padding: 14px 18px; }
.tile.compact .value { font-size: 24px; margin-top: 9px; }
.tile.compact .foot { margin-top: 9px; }
.tile .foot .src-badge { margin-left: auto; }

/* connection cards */
.conn-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.conn-head h2 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; display: flex; align-items: center; gap: 10px; }
.conn-head .s { font-size: 12.5px; color: var(--text-2); margin-top: 4px; }
.conn-head .r { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.conn-ico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: none; border: 1px solid var(--line-2); background: var(--surface-3); color: var(--text-2); }
.conn-ico svg { width: 20px; height: 20px; }
.conn-ico.sm { width: 34px; height: 34px; border-radius: 11px; }
.conn-ico.sm svg { width: 16px; height: 16px; }
.conn-ico.health { color: var(--health); background: radial-gradient(circle at 50% 35%, rgba(255, 79, 115, 0.24), rgba(255, 79, 115, 0.04) 72%); border-color: rgba(255, 79, 115, 0.32); box-shadow: 0 0 24px -8px rgba(255, 79, 115, 0.55); }
.conn-ico.health svg { width: 19px; height: 19px; }
.conn-ico.yt { background: var(--pf-yt); border-color: transparent; color: #fff; box-shadow: 0 0 24px -8px var(--pf-yt); }
.conn-ico.accent { color: var(--accent); background: var(--accent-wash); border-color: rgba(79, 210, 255, 0.3); }
.kv { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr) minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 10px; }
.kv > div { border-radius: 12px; padding: 11px 12px; background: rgba(5, 8, 13, 0.45); border: 1px solid var(--line); min-width: 0; }
.kv .k { font: 500 9.5px/1 var(--mono); letter-spacing: 0.14em; color: var(--muted); text-transform: uppercase; white-space: nowrap; }
.kv .v { font-size: 14px; font-weight: 600; margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kv .v small { font-size: 12px; font-weight: 500; color: var(--text-2); }
.seg.methods { display: flex; margin-top: 16px; }
.seg.methods button { flex: 1; flex-direction: column; justify-content: center; gap: 5px; height: auto; min-height: 34px; padding: 8px 10px; font-size: 12.5px; }
.seg.methods button svg { width: 14px; height: 14px; }
.seg.methods .n { display: inline-flex; align-items: center; gap: 6px; }
.seg.methods .c { font-size: 11px; font-weight: 400; color: var(--muted); white-space: nowrap; }
.seg.methods button.on .c { color: var(--text-2); }
.needs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.card-note.lead { color: var(--text-2); font-size: 12.5px; line-height: 1.55; margin-bottom: 16px; }
.seg .rec { font: 600 8.5px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); border: 1px solid rgba(79, 210, 255, 0.4); border-radius: 5px; padding: 3px 5px; }
.setup { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 20px; margin-top: 18px; align-items: start; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; counter-reset: st; }
.steps li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; counter-increment: st; }
.steps li::before { content: counter(st); width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; font: 600 11px/1 var(--mono); color: var(--accent); background: var(--accent-wash); border: 1px solid rgba(79, 210, 255, 0.3); }
.steps .st { display: block; font-weight: 600; font-size: 13.5px; line-height: 24px; }
.steps p b { color: var(--text); font-weight: 600; }
.steps p { margin: 1px 0 0; font-size: 12.5px; color: var(--text-2); line-height: 1.55; }
.steps .btn { margin-top: 8px; }
.steps.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 28px; align-items: start; }
/* settings sheet: on-screen label in the other app → what to pick */
.appset { display: grid; grid-template-columns: max-content minmax(0, 1fr); margin: 8px 0 2px; border: 1px solid var(--line); border-radius: 10px; background: rgba(5, 8, 13, 0.4); overflow: hidden; }
.appset dt, .appset dd { margin: 0; padding: 6px 10px; border-top: 1px solid var(--line); min-width: 0; }
.appset dt:first-of-type, .appset dd:first-of-type { border-top: 0; }
.appset dt { font: 500 11px/1.5 var(--mono); color: var(--muted); white-space: nowrap; }
.appset dd { font-size: 12px; line-height: 1.5; font-weight: 500; color: var(--text); }
.appset + p { margin-top: 8px; }
code.k, .steps code, .card-note code, .appset code, .steps-note code { font: 500 11.5px/1.6 var(--mono); padding: 1px 5px; border-radius: 4px; background: rgba(130, 190, 255, 0.1); color: var(--text); white-space: nowrap; }
.panel { border-radius: 14px; padding: 14px; background: rgba(5, 8, 13, 0.45); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.panel-title { font: 500 10px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.panel-title .r { margin-left: auto; letter-spacing: 0.06em; text-transform: none; font: 500 11px/1 var(--font); }
.panel .set-row { padding: 10px 0; }
.panel .set-row:first-child { padding-top: 0; }
.path { font: 500 12px/1.45 var(--mono); color: var(--text); word-break: break-all; user-select: text; }
.copyrow { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 10px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(5, 8, 13, 0.55); min-width: 0; }
.copyrow code { flex: 1; min-width: 0; padding: 4px 0; font: 500 12px/1.45 var(--mono); color: var(--text); overflow-wrap: anywhere; user-select: text; }
.copyrow code.masked { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal; letter-spacing: 0.06em; }
.copyrow code.tok { font-size: 13px; max-width: 15ch; } /* three groups per line, like a licence key */
.copyrow code.tok span { display: inline-block; }
.copyrow code.tok span:not(:last-child) { margin-right: 0.7ch; }
.copyrow .ck { flex: none; width: 40px; font: 500 9.5px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.copyrow .btn { flex: none; }
.fgroup { display: flex; flex-direction: column; gap: 8px; }
.steps-note p { margin: 0; font-size: 12px; color: var(--text-2); line-height: 1.55; }
.steps-note p b { color: var(--text); font-weight: 600; }
details.fold { border-top: 1px solid var(--line); padding-top: 12px; }
details.fold summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 500; color: var(--text-2); }
details.fold summary::-webkit-details-marker { display: none; }
details.fold summary:hover { color: var(--text); }
details.fold summary > svg { width: 14px; height: 14px; }
details.fold summary .chev { margin-left: auto; transition: transform 0.2s; }
details.fold[open] > summary .chev { transform: rotate(180deg); }
.fold-body { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.pbody { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pinfo { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.panel.wide .pbody { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; }
.panel.wide .btnrow { flex: none; flex-wrap: nowrap; }
.receivers { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.receivers.one { grid-template-columns: minmax(0, 1fr); }
.card.conn-live { display: flex; flex-direction: column; }
.card.conn-live > details.guide { margin-top: auto; }
.src-line.privacy { display: block; text-align: center; white-space: normal; line-height: 1.55; max-width: 860px; margin: 6px auto 4px; }
.src-line.privacy svg { color: var(--muted); vertical-align: -2px; margin-right: 6px; }
.recent { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; margin: 20px 0 18px; }
.recent .panel-title { margin-bottom: 10px; min-height: 14px; }
.mini-kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mini-kv > div { border-radius: 10px; padding: 10px 11px; background: rgba(5, 8, 13, 0.45); border: 1px solid var(--line); min-width: 0; }
.mini-kv .k { font: 500 9px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-kv .v { font-size: 16px; font-weight: 600; margin-top: 7px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-kv .v small { font-size: 11px; font-weight: 500; color: var(--text-2); margin-left: 3px; }
.mini-kv .w { font-size: 11px; color: var(--muted); margin-top: 3px; }
.recent .rows .row { padding: 8px 2px; }
.recent .rows .row:first-child { padding-top: 2px; }
.recent .app-icon { width: 28px; height: 28px; }
.codeblock { font: 400 11.5px/1.6 var(--mono); color: var(--text-2); background: rgba(5, 8, 13, 0.7); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; white-space: pre; overflow-x: auto; user-select: text; margin: 0; }
.banner.info { border-color: rgba(79, 210, 255, 0.24); background: rgba(79, 210, 255, 0.05); color: var(--text-2); }
.banner.info svg { color: var(--accent); }
.banner.crit { border-color: rgba(208, 59, 59, 0.42); background: rgba(208, 59, 59, 0.07); color: #ffc0c0; }
.banner.crit svg { color: var(--crit-ink); }
.banner.tight { margin: 0; padding: 10px 12px; font-size: 12.5px; align-items: flex-start; line-height: 1.5; }
.banner.tight svg { margin-top: 1px; width: 16px; height: 16px; }
.banner b { color: var(--text); font-weight: 600; }
.opt { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(130, 190, 255, 0.03); color: var(--text); cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.opt:hover { border-color: rgba(79, 210, 255, 0.45); background: var(--accent-wash); }
.opt.on { border-color: rgba(79, 210, 255, 0.55); background: var(--accent-wash); cursor: default; }
.opt > svg { width: 15px; height: 15px; color: var(--text-2); flex: none; }
.opt .t { flex: 1; min-width: 0; }
.opt .t b { display: block; font-size: 12.5px; font-weight: 500; }
.opt .t span { display: block; font: 400 11px/1.35 var(--mono); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt .tag { flex: none; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; }
.mchips { display: flex; flex-wrap: wrap; gap: 6px; }
.mchip .box { width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid rgba(130, 190, 255, 0.35); display: grid; place-items: center; flex: none; }
.mchip .box svg { width: 10px; height: 10px; stroke-width: 3.4; opacity: 0; color: var(--accent-ink); }
.mchip:has(input:checked) .box { background: var(--accent); border-color: var(--accent); }
.mchip:has(input:checked) .box svg { opacity: 1; }
.progress { display: flex; flex-direction: column; gap: 8px; }
.progress .pl { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 12px; color: var(--text-2); }
.progress .pl b { font: 600 12px/1 var(--mono); color: var(--text); }
.spinner { width: 13px; height: 13px; border-radius: 50%; border: 2px solid rgba(130, 190, 255, 0.25); border-top-color: var(--accent); animation: spin 0.8s linear infinite; flex: none; }
.btn.primary .spinner { border-color: rgba(4, 18, 26, 0.25); border-top-color: var(--accent-ink); }
.btn[disabled] { opacity: 0.6; cursor: default; }
.channel { display: flex; align-items: center; gap: 12px; min-width: 0; }
.channel .av { width: 46px; height: 46px; border-radius: 50%; overflow: hidden; flex: none; background: linear-gradient(135deg, var(--pf-yt), color-mix(in oklab, var(--pf-yt) 45%, #000)); display: grid; place-items: center; font-weight: 700; color: #fff; border: 1px solid var(--line-2); }
.channel .av img { width: 100%; height: 100%; object-fit: cover; }
.channel .nm { min-width: 0; }
.channel .nm b { display: block; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.channel .nm span { font-size: 12px; color: var(--muted); }
details.guide { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 14px; }
details.guide summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 500; color: var(--text-2); }
details.guide summary:hover { color: var(--text); }
details.guide summary::-webkit-details-marker { display: none; }
details.guide summary > svg { width: 15px; height: 15px; }
details.guide summary .chev { margin-left: auto; transition: transform 0.2s; }
details.guide[open] > summary .chev { transform: rotate(180deg); }
details.guide > .steps { margin-top: 16px; }
.note-list { display: flex; flex-direction: column; gap: 10px; font-size: 12.5px; color: var(--text-2); line-height: 1.55; }
.note-list p { margin: 0; }

.sline { display: inline-flex; align-items: center; gap: 6px; }
.sdot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); display: inline-block; flex: none; }
.sdot.on { background: var(--good-ink); box-shadow: 0 0 8px var(--good-ink); }
.sdot.warn { background: var(--warn); }
.sdot.err { background: var(--crit-ink); }

/* YouTube uploads */
.yt-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.yt-card { min-width: 0; }
.yt-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: linear-gradient(135deg, #18222f, #0d141d 55%, #1d1215); display: grid; place-items: center; }
.yt-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.yt-thumb .play { width: 32px; height: 22px; border-radius: 7px; background: var(--pf-yt); display: grid; place-items: center; box-shadow: 0 6px 18px -6px var(--pf-yt); }
.yt-thumb .new { position: absolute; left: 6px; top: 6px; }
.yt-card .t { font-size: 12.5px; font-weight: 500; line-height: 1.35; margin-top: 9px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.yt-card .m { font-size: 11.5px; color: var(--muted); margin-top: 5px; display: flex; gap: 6px; white-space: nowrap; overflow: hidden; }

/* habits: automatic rules */
.auto-chip { display: inline-flex; align-items: center; gap: 3px; height: 16px; padding: 0 5px; border-radius: 4px; font: 600 8.5px/1 var(--mono); letter-spacing: 0.1em; color: var(--accent); background: rgba(79, 210, 255, 0.08); border: 1px solid rgba(79, 210, 255, 0.3); flex: none; text-transform: uppercase; }
.auto-chip svg { width: 9px; height: 9px; stroke-width: 2.4; }
.bigcheck { position: relative; }
.bigcheck.auto { cursor: default; }
.bigcheck.auto:hover { background: var(--m-habits); }
.bigcheck.missed { border-color: rgba(162, 179, 198, 0.3); }
.bigcheck .bolt { position: absolute; top: -6px; right: -6px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface), 0 0 10px rgba(79, 210, 255, 0.5); }
.bigcheck .bolt svg { width: 9px; height: 9px; stroke-width: 2.6; }
.bigcheck.pending { border-style: dashed; border-color: rgba(162, 179, 198, 0.4); color: var(--muted); }
.bigcheck.pending > svg { width: 16px; height: 16px; stroke-width: 2; }
.dots button.auto { background: var(--m-habits); border-color: var(--m-habits); cursor: default; }
.dots button .ab { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(26, 18, 0, 0.62); pointer-events: none; }
.dots button .ab svg { width: 10px; height: 10px; stroke-width: 2.4; }
.dots button.pre { background: none; border-color: rgba(130, 190, 255, 0.07); }
.dots button.pending { border-style: dashed; }
.check .auto-chip, .check .auto-src { margin-left: -4px; }
.check.auto { cursor: default; }
.check.auto .box { background: var(--m-habits); border-color: var(--m-habits); box-shadow: 0 0 14px -3px var(--m-habits); }
.check.auto .box svg { opacity: 1; }
.check.pending .box { border-style: dashed; }
.sugg { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 10px; }
.sugg button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px dashed rgba(130, 190, 255, 0.22); background: rgba(5, 8, 13, 0.35); color: var(--text); cursor: pointer; text-align: left; transition: border-color 0.15s, background 0.15s; min-width: 0; }
.sugg button:hover { border-style: solid; border-color: rgba(79, 210, 255, 0.5); background: var(--accent-wash); }
.sugg .si { width: 28px; height: 28px; border-radius: 10px; display: grid; place-items: center; background: rgba(201, 133, 0, 0.1); color: #f0b23a; border: 1px solid rgba(201, 133, 0, 0.25); flex: none; }
.sugg .si svg { width: 15px; height: 15px; }
.sugg .t { flex: 1; min-width: 0; }
.sugg .t b { display: block; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sugg .t span { display: block; font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sugg .t span svg { width: 10px; height: 10px; margin-right: 4px; vertical-align: -1px; }
.sugg .t span.rg { display: inline-grid; width: 13px; height: 13px; margin-right: 6px; vertical-align: -2px; border-radius: 4px; }
.sugg .t span.rg svg { width: 8px; height: 8px; margin: 0; vertical-align: 0; }
.sugg .t span.rg.hl svg { color: var(--health); }
.sugg .t span svg[fill="currentColor"] { color: var(--health); }
.sugg .plus { color: var(--muted); width: 16px; height: 16px; flex: none; }
.sugg button:hover .plus { color: var(--accent); }
.sugg button.later { border-color: rgba(130, 190, 255, 0.14); background: none; }
.sugg button.later .si { filter: grayscale(1); opacity: 0.55; }
.sugg button.later .t b { color: var(--text-2); }
.sugg button.later:hover .si { filter: none; opacity: 1; }
.sugg .t .need { display: inline; color: var(--accent); cursor: pointer; }
.sugg .t .need:hover { text-decoration: underline; }
.qr-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qr-pair figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.qr-pair .qr { width: 100%; max-width: 140px; aspect-ratio: 1; padding: 6px; border-radius: 10px; background: #fff; box-shadow: 0 0 0 1px var(--line-2), 0 0 24px -10px rgba(79, 210, 255, 0.5); }
.qr-pair .qr svg { display: block; width: 100%; height: 100%; }
.qr-pair .qr.skel { position: relative; overflow: hidden; background: rgba(130, 190, 255, 0.04); box-shadow: inset 0 0 0 1px var(--line-2); }
.qr-pair .qr.skel::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(79, 210, 255, 0.09) 50%, transparent 70%); animation: qrshim 1.4s linear infinite; }
@keyframes qrshim { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.qr-pair figcaption { font: 500 10px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-2); }
.with-btn { position: relative; }
.with-btn .input { padding-right: 42px; }
.with-btn .btn { position: absolute; right: 4px; top: 4px; }


@media (max-width: 1280px) {
  .yt-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ═════════ v2 · web app, iPhone & icon rail ═════════ */
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.clock .sec { color: var(--text-2); font-weight: 500; }
body.web .titlebar { padding-right: 18px; -webkit-app-region: no-drag; }
.side-sub { display: flex; align-items: center; gap: 7px; margin-top: 10px; font-size: 11.5px; color: var(--muted); min-width: 0; line-height: 1.35; }
.side-sub .sdot { flex: none; }
.side-card .v b.ell { display: block; }
.tabbar { display: none; }
.sheet-grip { display: none; }
.dots button .wd { display: none; }
.touch-only { display: none !important; }
#toasts .toast { cursor: default; }

/* "Mehr" sheet */
.more { display: flex; flex-direction: column; gap: 12px; }
.more .side-card { background: rgba(5, 8, 13, 0.45); }
.more-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: rgba(5, 8, 13, 0.4); }
.more-item { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 62px; padding: 10px 14px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--text); text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.more-item:first-child { border-top: 0; }
.more-item:active { background: rgba(130, 190, 255, 0.06); }
.more-item .mi { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--surface-3); border: 1px solid var(--line-2); color: var(--text-2); }
.more-item .mi svg { width: 18px; height: 18px; }
.more-item .t { flex: 1; min-width: 0; }
.more-item .t b { display: block; font-size: 15px; font-weight: 600; }
.more-item .t span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.more-item .chev { width: 16px; height: 16px; color: var(--muted); flex: none; }
.more-item.active .mi { border-color: rgba(79, 210, 255, 0.45); box-shadow: 0 0 16px -6px var(--accent); }
.more-item.active .t b::after { content: ' · geöffnet'; font-weight: 400; color: var(--muted); font-size: 12px; }
.more-item.out { border: 1px solid var(--line); border-radius: 16px; min-height: 56px; background: rgba(5, 8, 13, 0.3); }
.more-item.out .mi { color: var(--crit-ink); background: rgba(208, 59, 59, 0.08); border-color: rgba(208, 59, 59, 0.3); }

/* settings · web app (account, devices, iPhone) & desktop (server pairing) */
.modal-lead { margin: -6px 0 16px; font-size: 13px; color: var(--text-2); line-height: 1.55; }
.form-err { padding: 9px 12px; border-radius: 10px; border: 1px solid rgba(208, 59, 59, 0.42); background: rgba(208, 59, 59, 0.07); color: #ffc0c0; font-size: 12.5px; line-height: 1.45; }
.form-err[hidden] { display: none; }
.field > span em { font-style: normal; font-size: 11.5px; }
.dev-pc { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(5, 8, 13, 0.45); min-width: 0; }
.dev-pc .grow { flex: 1; min-width: 0; }
.dev-pc b { display: block; font-weight: 600; font-size: 13.5px; }
.dev-pc .grow > span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.dev-pc-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.dev-pc-h .pill { flex: none; }
.dev-row .app-icon { width: 32px; height: 32px; color: var(--text-2); }
.dev-row .dev-ico.companion { color: var(--accent); }
.dev-row .dev-ico.health { color: var(--health); }
.linkbtn.inline { display: inline; min-height: 0; color: var(--accent); font-size: inherit; vertical-align: baseline; text-decoration: underline; text-decoration-color: rgba(79, 210, 255, 0.35); text-underline-offset: 2px; }
.steps .copyrow code { background: none; padding: 4px 0; white-space: normal; border-radius: 0; }
.nw { white-space: nowrap; }
.steps b.ib { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.steps b.ib svg { width: 13px; height: 13px; color: var(--accent); }
.pair-code { display: flex; align-items: flex-start; gap: 8px; padding: 12px 8px 12px 14px; border-radius: 12px; border: 1px solid rgba(79, 210, 255, 0.35); background: rgba(5, 8, 13, 0.6); box-shadow: 0 0 22px -12px var(--accent); }
.pair-code code { flex: 1; min-width: 0; font: 500 12.5px/1.55 var(--mono); color: var(--text); overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; max-height: 7.8em; overflow-y: auto; }
.pair-code .btn { flex: none; }
.pair-form { display: flex; gap: 8px; }
.pair-form .input { flex: 1; min-width: 0; }
.kv.kv2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hae-open { display: flex; flex-direction: column; gap: 8px; }
.hae-open .btn { justify-content: center; text-decoration: none; }
.hae-open .btn svg { width: 14px; height: 14px; }

/* ───── icon rail (861–1200 px) ───── */
@media (min-width: 861px) and (max-width: 1200px) {
  :root { --sidebar: 64px; }
  .brand { width: auto; }
  .sidebar { padding: 14px 9px; }
  .nav-label { padding: 12px 0 8px; font-size: 0; letter-spacing: 0; }
  .nav-label::after { content: ''; display: block; height: 1px; margin: 0 8px; background: var(--line-2); }
  .nav-label:first-child { padding: 0; }
  .nav-label:first-child::after { display: none; }
  .nav-item { justify-content: center; padding: 11px 0; gap: 0; }
  .nav-item > span:not(.dot) { display: none; }
  .nav-item .dot { position: absolute; top: 8px; right: 8px; margin: 0; width: 5px; height: 5px; }
  .nav-item.active::before { left: -9px; }
  .nav-item::after {
    content: attr(aria-label); position: absolute; left: calc(100% + 14px); top: 50%; transform: translate(-4px, -50%); z-index: 40;
    padding: 7px 10px; border-radius: 9px; background: rgba(9, 14, 21, 0.97); border: 1px solid var(--line-2); box-shadow: 0 14px 30px -12px #000;
    color: var(--text); font-size: 12.5px; font-weight: 500; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.12s, transform 0.12s;
  }
  .nav-item:hover::after, .nav-item:focus-visible::after { opacity: 1; transform: translate(0, -50%); }
  .side-card { display: none; }
}

/* ───── touch: tap targets ≥ 44 px, no zoom on input focus (iOS needs 16 px) ───── */
@media (max-width: 860px), (pointer: coarse) {
  .btn { height: 44px; padding: 0 16px; font-size: 14px; border-radius: 12px; }
  .btn.sm { height: 38px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
  .btn.icon { width: 44px; }
  .btn.icon.sm { width: 38px; }
  :where(.btn.sm, .seg button, .chip) { position: relative; }
  .btn.sm::after, .seg button::after, .chip::after { content: ''; position: absolute; inset: -3px 0; }
  .input, select.input { height: 44px; font-size: 16px; }
  textarea.input { font-size: 16px; }
  .seg button { height: 38px; padding: 0 12px; font-size: 13px; }
  .seg.methods button { min-height: 52px; }
  .chip { height: 38px; padding: 0 14px; font-size: 13px; }
  .scale button { height: 44px; }
  .toggle { width: 50px; height: 30px; }
  .toggle i::after { width: 22px; height: 22px; top: 4px; left: 4px; }
  .toggle input:checked + i::after { transform: translateX(20px); }
  .check { min-height: 46px; }
  .bigcheck { width: 44px; height: 44px; }
  .opt { min-height: 50px; }
  .kadd .input { height: 40px; }
  .linkbtn { min-height: 32px; position: relative; }
  .linkbtn::after { content: ''; position: absolute; inset: -6px -4px; }
  .with-btn .btn { top: 3px; right: 3px; }
  .with-btn .input { padding-right: 48px; }
}
@media (hover: none) {
  body { -webkit-tap-highlight-color: transparent; }
  /* iOS only delivers taps to elements that look clickable */
  [data-go], [data-act], [data-cmd], [data-item-open], [data-copy], [data-tip], .linehit { cursor: pointer; }
  .linehit { touch-action: pan-y; }
  .row .hover-only { opacity: 1; }
  .touch-only { display: revert !important; }
  .hover-hint { display: none; }
}

/* ───── iPhone (≤ 860 px): tab bar, one column, bottom sheets ───── */
@media (max-width: 860px) {
  :root { --titlebar: calc(50px + env(safe-area-inset-top)); --tabbar: calc(60px + env(safe-area-inset-bottom)); --radius: 16px; }
  .titlebar { padding: env(safe-area-inset-top) calc(16px + env(safe-area-inset-right)) 0 calc(16px + env(safe-area-inset-left)); gap: 12px; -webkit-app-region: no-drag; }
  .brand { width: auto; gap: 9px; }
  .brand em { display: none; }
  .titlebar .spacer { order: 1; }
  .sys { order: 2; padding: 12px; margin: -12px -4px -12px -12px; }
  .sys .sys-t { display: none; }
  .clock { order: 3; font-size: 13px; }
  .clock .sec, .clock .date { display: none; }
  .sidebar { display: none; }
  #view { left: 0; padding: 18px calc(16px + env(safe-area-inset-right)) calc(var(--tabbar) + 28px) calc(16px + env(safe-area-inset-left)); overscroll-behavior-y: contain; }

  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: var(--tabbar);
    padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    background: linear-gradient(180deg, rgba(8, 12, 18, 0.8), rgba(5, 8, 13, 0.95)); backdrop-filter: blur(18px) saturate(1.2);
    border-top: 1px solid var(--line);
  }
  .tabbar::before { content: ''; position: absolute; top: -1px; left: 50%; width: 160px; height: 1px; transform: translateX(-50%); background: linear-gradient(90deg, transparent, rgba(79, 210, 255, 0.55), transparent); pointer-events: none; }
  .tab { flex: 1; min-width: 0; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px 2px 2px; border: 0; background: none; color: var(--muted); font-size: 10.5px; font-weight: 500; letter-spacing: 0.01em; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .tab svg { width: 22px; height: 22px; transition: transform 0.15s; }
  .tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tab.active { color: var(--text); }
  .tab.active svg { color: var(--accent); filter: drop-shadow(0 0 6px rgba(79, 210, 255, 0.55)); }
  .tab.active::before { content: ''; position: absolute; top: -1px; left: 50%; width: 26px; height: 2px; margin-left: -13px; border-radius: 0 0 2px 2px; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
  .tab:active svg { transform: scale(0.9); }
  .tab-dot { position: absolute; top: 7px; left: calc(50% + 7px); width: 8px; height: 8px; border-radius: 50%; background: var(--crit-ink); box-shadow: 0 0 0 2px #070b11; display: none; }
  .tab-dot.on { display: block; }

  #toasts { left: calc(12px + env(safe-area-inset-left)); right: calc(12px + env(safe-area-inset-right)); bottom: calc(var(--tabbar) + 12px); }
  .toast { min-width: 0; max-width: none; }
  .tooltip { max-width: min(300px, calc(100vw - 16px)); }

  /* pages */
  .page-head { flex-direction: column; align-items: stretch; gap: 14px; margin-bottom: 18px; }
  .page-head h1 { font-size: 26px; }
  .page-head .sub { font-size: 13.5px; line-height: 1.5; }
  .page-head .actions { margin-left: 0; flex-wrap: wrap; }
  .page-head .actions > .input { flex: 1 1 160px; width: auto !important; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
  .grid > * { grid-column: 1 / -1; }
  .grid > .tile { grid-column: span 1; }
  .grid > .tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .stack { gap: 12px; }
  .card { padding: 15px; }
  .card-head { flex-wrap: wrap; row-gap: 8px; margin-bottom: 12px; }
  .card-head .right { flex-wrap: wrap; justify-content: flex-end; }
  .legend { gap: 6px 12px; }
  .tile .label { font-size: 12px; gap: 6px; }
  .tile .icon-badge { width: 26px; height: 26px; border-radius: 8px; }
  .tile .icon-badge svg { width: 13px; height: 13px; }
  .tile .value { font-size: 24px; margin-top: 8px; }
  .tile .value small { font-size: 13px; }
  .tile .foot { margin-top: 10px; font-size: 11.5px; flex-wrap: wrap; gap: 4px 8px; }
  .tile.compact { padding: 13px 15px; }
  .tile.compact .value { font-size: 21px; }
  .hero { flex-direction: column; gap: 18px; }
  .legend-list { width: 100%; }
  .big-pair .v { font-size: 26px; }
  .water .flex .btn:not(.icon) svg { display: none; }
  .water .flex .btn { padding: 0 8px; }
  .kv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proj { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proj-hero .big { font-size: 30px; }
  .setup, .receivers, .recent { grid-template-columns: minmax(0, 1fr); }
  .steps.cols { grid-template-columns: minmax(0, 1fr); }
  .conn-head { flex-wrap: wrap; row-gap: 12px; }
  .conn-head .r { margin-left: 0; flex-basis: 100%; flex-wrap: wrap; }
  .seg.methods .c { white-space: normal; }
  .panel.wide .pbody { flex-direction: column; align-items: stretch; }
  .yt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .src-line { white-space: normal; }
  .set-row { flex-wrap: wrap; gap: 10px 14px; }
  .set-row .txt { flex: 1 1 170px; }
  .set-row .ctl { margin-left: auto; max-width: 100%; }
  .set-row.wide .ctl { flex: 1 1 100%; }
  .set-row.wide .ctl .input { width: 100%; }
  .sugg { grid-template-columns: minmax(0, 1fr); }
  .hide-mobile { display: none !important; }
  .set-row.wide-m .ctl { flex: 1 1 100%; }
  .set-row.wide-m .ctl .input { width: 100% !important; }
  .pair-form { flex-direction: column; }
  .pair-form .btn { width: 100%; }
  .live-banner { flex-wrap: wrap; }
  .live-banner > div { flex: 1 1 200px; }
  .live-banner > .btn { flex: 1 1 100%; justify-content: center; }
  .seg.methods .n { flex-wrap: wrap; justify-content: center; row-gap: 5px; text-align: center; }
  .seg.methods .n > svg { display: none; }
  .modal .steps .st { line-height: 1.4; padding-top: 3px; }

  /* long horizontal content scrolls sideways and snaps */
  .kanban, .days { overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 15px; margin: 0 -15px; padding: 0 15px 8px; scrollbar-width: none; overscroll-behavior-x: contain; }
  .kanban::-webkit-scrollbar, .days::-webkit-scrollbar, .dots::-webkit-scrollbar { display: none; }
  .kanban { display: flex; gap: 10px; }
  .kcol { flex: 0 0 min(80%, 290px); scroll-snap-align: start; min-height: 170px; }
  .days { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: calc((100% - 16px) / 3); }
  .daycell { scroll-snap-align: start; }
  .snap-hint { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); margin-top: 6px; }

  /* habits: name row, live detail, then a swipeable 14-day strip with the edit button */
  .habit-row { grid-template-columns: 34px minmax(0, 1fr) auto 44px; grid-template-areas: 'icon name streak check' 'icon sub sub check' 'dots dots dots edit'; column-gap: 10px; row-gap: 4px; padding: 12px 0; }
  .habit-row > .dots { margin-top: 6px; }
  .habit-row > .hedit { margin-top: 6px; justify-self: end; }
  .habit-row.head { display: none; }
  .hstreak { flex-direction: row; align-items: center; gap: 9px; align-self: end; }
  .hstreak .streak .u, .hstreak .bl { display: none; }
  .dots { overflow-x: auto; scroll-snap-type: x proximity; gap: 5px; padding: 4px 3px 2px; margin: 0 -3px; scrollbar-width: none; }
  .dots button { flex: none; width: 34px; height: 40px; border-radius: 10px; scroll-snap-align: end; display: grid; place-items: center; }
  .dots button .wd { display: block; font: 500 9.5px/1 var(--mono); color: var(--muted); letter-spacing: 0; }
  .dots button.on .wd { color: #1a1200; font-weight: 600; }
  .dots button.auto .wd { color: #1a1200; font-weight: 600; }
  .dots button .ab { inset: 3px 3px auto auto; display: block; line-height: 0; }
  .dots button .ab svg { width: 8px; height: 8px; }
  .hbar { flex-basis: 40px; }

  /* focus: classification below the app name */
  .cat-row { flex-wrap: wrap; row-gap: 8px; }
  .cat-row > .seg { order: 3; flex: 1 1 100%; }
  .cat-row > .seg button { flex: 1; justify-content: center; }

  /* modals become bottom sheets */
  .modal-back { place-items: end stretch; }
  .modal {
    position: relative; width: 100%; max-height: calc(100% - env(safe-area-inset-top) - 16px); overflow-y: auto; overscroll-behavior: contain;
    border-radius: 22px 22px 0 0; border-bottom: 0; padding: 28px calc(16px + env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left));
    animation: sheetUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); transition: transform 0.22s ease;
  }
  .sheet-grip { display: block; position: absolute; top: 0; left: 0; right: 0; height: 28px; touch-action: none; cursor: grab; z-index: 1; }
  .sheet-grip::before { content: ''; position: absolute; top: 10px; left: 50%; width: 38px; height: 4px; margin-left: -19px; border-radius: 4px; background: rgba(162, 179, 198, 0.35); }
  .modal h3 { font-size: 18px; margin-bottom: 14px; }
  .modal .foot { flex-wrap: wrap; }
  .modal .foot .spacer { display: none; }
  .modal .foot .btn { flex: 1 1 auto; }
  .modal.sheet-more { padding-top: 30px; }
  .modal .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal .field-row > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@keyframes sheetUp { from { transform: translateY(100%); } }
.tooltip .tt-r.tt-sub { margin-top: 0; font-size: 11px; }
.tooltip .tt-r.tt-sub i { background: none; }
.tooltip .tt-r.tt-sub span { color: var(--text-3, var(--text-2)); }

/* ═════════ Gewohnheiten v3 · rule editor, Durchhalten, Verlauf ═════════ */
.input.bad { border-color: rgba(208, 59, 59, 0.6); }
.field .field-note { font-style: normal; font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.icon-pick .chip { padding: 0 9px; }

/* rule editor: where the tick comes from */
.rsrc { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.rsrc-o { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 10px 9px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(130, 190, 255, 0.03); cursor: pointer; min-width: 0; transition: border-color 0.15s, background 0.15s; }
.rsrc-o:hover { border-color: rgba(130, 190, 255, 0.3); }
.rsrc-o input { position: absolute; opacity: 0; pointer-events: none; }
.rsrc-o:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.rsrc-o .ri { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: rgba(130, 190, 255, 0.06); color: var(--text-2); margin-bottom: 5px; }
.rsrc-o .ri > svg { width: 13px; height: 13px; }
.rsrc-o.s-manual .ri { color: #f0b23a; }
.rsrc-o.s-health .ri { color: var(--health); }
.rsrc-o.s-pc .ri { color: var(--accent); }
.rsrc-o b { font-size: 12.5px; font-weight: 600; }
.rsrc-o small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.rsrc-o.on { border-color: rgba(79, 210, 255, 0.55); background: var(--accent-wash); box-shadow: inset 0 0 0 1px rgba(79, 210, 255, 0.2); }
.rule-fields { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.rule-fields:empty { display: none; }
.rule-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.rule-row.one { grid-template-columns: minmax(0, 260px); }
.rule-hint { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(5, 8, 13, 0.45); border: 1px solid var(--line); font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.rule-hint p { margin: 0; }
.rule-hint p + p { margin-top: 7px; }
.rh-need { display: flex; gap: 7px; align-items: flex-start; }
.rh-need svg { margin-top: 3px; color: var(--accent); flex: none; }
.modal.hb-modal, .modal.dh-modal { width: min(560px, 94vw); max-height: calc(100vh - 40px); overflow-y: auto; }
@media (min-width: 861px) {
  .modal-back:has(> .hb-modal), .modal-back:has(> .dh-modal) { place-items: start center; }
  .modal.hb-modal, .modal.dh-modal { margin-top: min(11vh, 104px); max-height: calc(100vh - min(11vh, 104px) - 24px); }
}

/* Durchhalten – days without */
.dh-card { background: radial-gradient(900px 280px at 0% 0%, rgba(79, 210, 255, 0.075), transparent 62%), linear-gradient(180deg, rgba(15, 25, 38, 0.86), rgba(9, 14, 22, 0.86)); border-color: rgba(79, 210, 255, 0.16); }
.dh-card::before { content: ''; position: absolute; left: 28px; right: 28px; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, rgba(79, 210, 255, 0.55), transparent); pointer-events: none; }
.dh-card .card-title { color: var(--text); }
.dh-card .card-title svg { color: var(--accent); }
.dh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(214px, 1fr)); gap: 12px; }
.dh-tile { position: relative; display: flex; flex-direction: column; padding: 14px 16px; border-radius: 16px; min-width: 0; overflow: hidden; container-type: inline-size;
  background: linear-gradient(180deg, rgba(20, 32, 47, 0.92), rgba(8, 13, 20, 0.92)); border: 1px solid rgba(130, 190, 255, 0.12); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04); }
.dh-top { display: flex; align-items: center; gap: 10px; min-height: 30px; }
.dh-ic { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; flex: none; color: var(--accent); background: rgba(79, 210, 255, 0.08); border: 1px solid rgba(79, 210, 255, 0.22); }
.dh-ic svg { width: 15px; height: 15px; }
.dh-name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13.5px; }
.dh-lock { display: inline-grid; color: var(--muted); flex: none; }
.dh-lock svg { width: 11px; height: 11px; }
.dh-top .btn { flex: none; margin: -4px -6px -4px 0; }
.dh-top .dh-eye { gap: 6px; padding: 0 9px; }
.dh-top .dh-eye svg { width: 14px; height: 14px; flex: none; }
.dh-top .dh-eye.icon { padding: 0; }
.dh-count { display: flex; align-items: baseline; flex-wrap: nowrap; gap: 8px; margin-top: 16px; min-width: 0; }
.dh-count b { font-size: clamp(36px, 19cqi, 46px); font-weight: 600; letter-spacing: -0.035em; line-height: 0.95; text-shadow: 0 0 28px rgba(79, 210, 255, 0.26); }
.dh-count > .u { font-size: 15px; color: var(--text-2); font-weight: 500; }
.dh-badge { display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 22px; min-width: 22px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; margin-left: auto; align-self: center; flex: none; }
.dh-badge svg { width: 11px; height: 11px; flex: none; }
/* narrow tiles: the badge keeps its icon (and title), the record its number – no line ever wraps, so all tiles line up */
@container (max-width: 226px) {
  .dh-badge { padding: 0; width: 24px; height: 24px; }
  .dh-badge > span { display: none; }
  .dh-rec .w { display: none; }
}
/* three-digit counts and more: the badge is always just its icon */
.dh-count.long .dh-badge { padding: 0; width: 24px; height: 24px; }
.dh-count.long .dh-badge > span { display: none; }
.dh-badge.rec, .dh-badge.mile { color: #f6c25a; background: rgba(201, 133, 0, 0.12); border: 1px solid rgba(201, 133, 0, 0.42); }
.dh-badge.clean { color: var(--accent); background: var(--accent-wash); border: 1px solid rgba(79, 210, 255, 0.3); }
.dh-since { font-size: 12.5px; color: var(--text-2); margin-top: 7px; }
.dh-next { margin: 14px 0; display: flex; flex-direction: column; gap: 6px; cursor: default; }
.dh-bar { height: 4px; border-radius: 4px; background: rgba(130, 190, 255, 0.1); overflow: hidden; }
.dh-bar i { display: block; height: 100%; min-width: 4px; border-radius: 4px; background: linear-gradient(90deg, rgba(79, 210, 255, 0.5), var(--accent)); box-shadow: 0 0 10px -2px var(--accent); }
.dh-nl { display: flex; align-items: center; justify-content: space-between; flex-wrap: nowrap; gap: 10px; font-size: 11.5px; color: var(--muted); min-width: 0; }
.dh-nl > span { white-space: nowrap; }
.dh-rec { display: inline-flex; align-items: center; gap: 4px; flex: none; color: var(--text-2); }
.dh-rec svg { width: 11px; height: 11px; color: #f0b23a; flex: none; }
.dh-foot { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.dh-meta { flex: 1; min-width: 0; font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dh-reset { flex: none; }
.dh-reset svg { width: 13px; height: 13px; }
.dh-undo { margin-top: 9px; font-size: 11.5px; color: var(--text-2); }
.dh-tile.priv .dh-ic { color: var(--text-2); background: rgba(130, 190, 255, 0.06); border-color: var(--line-2); }
.dh-tile.priv .dh-name { color: var(--text-2); font-weight: 500; font: 500 10.5px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; }
.dh-tile.priv .dh-count b { text-shadow: none; }
.dh-hidden { margin: 10px 0 14px; display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.dh-hidden svg { width: 13px; height: 13px; }
/* milestone reached today: warm glow, one soft shine when it first shows */
.dh-tile.mile { border-color: rgba(201, 133, 0, 0.45);
  background: radial-gradient(120% 80% at 100% 0%, rgba(201, 133, 0, 0.16), transparent 60%), linear-gradient(180deg, rgba(24, 30, 38, 0.94), rgba(10, 13, 19, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 16px 40px -20px rgba(201, 133, 0, 0.6); }
.dh-tile.mile .dh-count b { text-shadow: 0 0 30px rgba(240, 178, 58, 0.45); }
.dh-tile.mile .dh-bar i { background: linear-gradient(90deg, rgba(240, 178, 58, 0.55), #f0b23a); box-shadow: 0 0 10px -2px #f0b23a; }
.dh-tile.shine::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 38%, rgba(255, 214, 120, 0.12) 50%, transparent 62%); transform: translateX(-100%); animation: dhShine 1.6s ease 0.2s 1 both; }
@keyframes dhShine { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .dh-tile.shine::after { display: none; } }
.dh-add { align-items: center; justify-content: center; text-align: center; gap: 6px; min-height: 150px; border-style: dashed; border-color: rgba(130, 190, 255, 0.2); background: rgba(5, 8, 13, 0.3); color: var(--text-2); cursor: pointer; font: inherit; }
.dh-add > svg { width: 20px; height: 20px; color: var(--accent); }
.dh-add b { font-size: 13.5px; color: var(--text); font-weight: 600; }
.dh-add span { font-size: 11.5px; color: var(--muted); }
.dh-add:hover { border-color: rgba(79, 210, 255, 0.5); background: var(--accent-wash); }
.dh-add.gone { display: none; }
.dh-empty { display: flex; align-items: center; gap: 16px 24px; flex-wrap: wrap; padding: 4px 2px; }
.dh-empty-t { flex: 1 1 320px; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.dh-empty-t b { font-size: 15px; font-weight: 600; }
.dh-empty-t span { font-size: 12.5px; color: var(--text-2); line-height: 1.55; }
.dh-picks .chip svg { width: 14px; height: 14px; }
.dh-picks .chip .pl { width: 11px; height: 11px; color: var(--muted); }
.dh-privrow { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(5, 8, 13, 0.4); cursor: pointer; }
.dh-privrow .txt { flex: 1; min-width: 0; }
.dh-privrow .txt b { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; }
.dh-privrow .txt > span { display: block; font-size: 12px; color: var(--muted); line-height: 1.45; margin-top: 3px; }
.dh-last { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); font-size: 12.5px; color: var(--text-2); }
.dh-last > span { flex: 1 1 200px; display: flex; align-items: center; gap: 7px; }
.dh-last b { color: var(--text); font-weight: 600; }

/* Verlauf */
@media (min-width: 861px) and (max-width: 1280px) { .grid > .hb-l { grid-column: span 7; } .grid > .hb-r { grid-column: span 5; } }
.hpf { display: inline-flex; gap: 3px; flex: none; }
.hpf .rg { width: 13px; height: 13px; }
.hpf .rg svg { width: 8px; height: 8px; }
.hc-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.hc-sel { flex: 0 1 250px; width: auto; min-width: 160px; height: 32px; font-size: 13px; }
.hc-segs { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.hc-segs .seg svg { width: 13px; height: 13px; }
.hc-cap { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); margin-bottom: 6px; min-height: 18px; }
.hc-cap b { color: var(--text); font-weight: 600; font-size: 13px; }
.hc-key { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.hc-key i { width: 9px; height: 9px; border-radius: 2px; }
.hc-key i.dash { width: 14px; height: 0; border-top: 1px dashed rgba(162, 179, 198, 0.7); border-radius: 0; }
.hc-key i.dot { width: 8px; height: 8px; border-radius: 50%; }
.hc-key i.dot.hollow { box-sizing: border-box; border: 1.5px solid var(--muted); background: none; }
.hc-note { margin-left: auto; }

/* Heute: Durchhalten line (never private streaks) */
.today-dh { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); cursor: pointer; min-width: 0; }
.today-dh .k { font: 500 10px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.today-dh .vals { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.today-dh .v { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 28px; padding: 0 10px 0 8px; border-radius: 999px; border: 1px solid rgba(79, 210, 255, 0.18); background: rgba(79, 210, 255, 0.05); font-size: 12.5px; color: var(--text-2); white-space: nowrap; transition: border-color 0.15s; }
.today-dh .v .nm { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.today-dh .v b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.today-dh:hover .v { border-color: rgba(79, 210, 255, 0.4); }
.today-dh svg { width: 12px; height: 12px; color: var(--accent); flex: none; }

@media (max-width: 860px) {
  .rsrc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rule-row, .rule-row.one { grid-template-columns: minmax(0, 1fr); }
  .rule-row:not(.one) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .modal.hb-modal, .modal.dh-modal { width: 100%; max-height: calc(100% - env(safe-area-inset-top) - 16px); }
  .modal.hb-modal { min-height: calc(100% - env(safe-area-inset-top) - 16px); display: flex; flex-direction: column; }
  .modal.hb-modal .foot { margin-top: auto; padding-top: 18px; }
  .dh-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .dh-tile { padding: 13px 14px; }
  .dh-count { margin-top: 12px; }
  .dh-count b { font-size: 40px; }
  .dh-add { min-height: 0; flex-direction: row; padding: 14px; }
  .dh-add span { display: none; }
  .dh-top .btn { margin: -6px -6px -6px 0; }
  .hc-sel { flex: 1 1 100%; max-width: none; height: 44px; }
  .hc-segs { margin-left: 0; width: 100%; flex-wrap: nowrap; }
  .hc-segs .seg { flex: 1; }
  .hc-segs .seg button { flex: 1; justify-content: center; }
  .hc-note { margin-left: 0; }
  .hlive .lr { display: none; }
}
