/* Заработок — неон / киберпанк. Ночной режим по умолчанию, дневной — по кнопке «Тема».
   Шрифты системные (работает без интернета): Bahnschrift на Windows, DIN на Mac. */
:root {
  color-scheme: dark;
  --bg: #0A0616;
  --bg-2: #0F0920;
  --panel: #140C27;
  --panel-2: #1B1235;
  --panel-3: #22173F;
  --ink: #EEE8FF;
  --ink-2: #BDB2E0;
  --muted: #8C80B8;
  --line: #2F2254;
  --line-2: #231942;
  --grid-line: rgba(160, 83, 253, .07);

  --neon: #B65CFF;          /* интерфейсный фиолетовый неон */
  --neon-soft: rgba(182, 92, 255, .16);
  --pink: #FF3DCB;          /* акцентный розовый неон — редко */
  --cyan: #2BE4FF;          /* фокус и ссылки */

  /* серии графиков — проверены на различимость (в т.ч. дальтонизм) */
  --s1: #A053FD;            /* факт */
  --s2: #0CA3BE;            /* ожидание / прогноз */
  --s3: #E63281;            /* второй человек */
  --plan: #8C80B8;

  /* статусы — только со значком и словами */
  --good: #3BE8A8;
  --good-soft: rgba(59, 232, 168, .13);
  --warn: #FFC93C;
  --warn-soft: rgba(255, 201, 60, .13);
  --bad: #FF6A4D;
  --bad-soft: rgba(255, 106, 77, .14);
  --info: #2BE4FF;
  --info-soft: rgba(43, 228, 255, .11);

  --hero-bg: #120A26;
  --glow: 0 0 22px rgba(182, 92, 255, .45);
  --glow-on: 1;
  --cut: 14px;

  --f-num: "Bahnschrift", "DIN Alternate", "DIN Next", "Barlow", "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
  --f-text: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Noto Sans", system-ui, sans-serif;
  --f-mono: "Cascadia Mono", "Consolas", "SF Mono", "Menlo", "DejaVu Sans Mono", monospace;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F3F0FB; --bg-2: #ECE7F8; --panel: #FFFFFF; --panel-2: #F7F4FE; --panel-3: #EFEAFB;
  --ink: #1A1033; --ink-2: #4A3E70; --muted: #74699A; --line: #D9D0EF; --line-2: #E9E3F7;
  --grid-line: rgba(128, 41, 225, .05);
  --neon: #7A26DB; --neon-soft: rgba(122, 38, 219, .10); --pink: #C0187E; --cyan: #0B7F99;
  --s1: #8029E1; --s2: #068FA7; --s3: #C91A6D; --plan: #8A80A8;
  --good: #0B8A5C; --good-soft: rgba(11, 138, 92, .10); --warn: #A86F00; --warn-soft: rgba(196, 140, 0, .12);
  --bad: #CF3A1E; --bad-soft: rgba(207, 58, 30, .09); --info: #0B7F99; --info-soft: rgba(11, 127, 153, .09);
  --hero-bg: #160B30;
  --glow: none; --glow-on: 0;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 500px at 92% -8%, rgba(255, 61, 203, .10), transparent 60%),
    radial-gradient(800px 600px at -10% 110%, rgba(43, 228, 255, .07), transparent 60%),
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: auto, auto, 44px 44px, 44px 44px;
  background-attachment: fixed;
  color: var(--ink);
  font: 15px/1.5 var(--f-text);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
::selection { background: rgba(182, 92, 255, .4); }
.num, .hero-num, .kpi-v, td.n, .big { font-family: var(--f-num); font-variant-numeric: tabular-nums; }
code { font-family: var(--f-mono); font-size: .9em; color: var(--ink-2); }
a { color: var(--cyan); }

/* ───── каркас ───── */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.rail {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 20px 14px;
  border-right: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 88%, transparent); backdrop-filter: blur(6px);
}
.brand { display: flex; align-items: center; gap: 10px; font: 600 20px/1 var(--f-num); letter-spacing: .04em; padding: 4px 8px 20px; }
.brand svg { width: 30px; height: 30px; filter: drop-shadow(0 0 6px rgba(182, 92, 255, calc(.7 * var(--glow-on)))); }
.brand-bg { fill: #160B30; stroke: var(--neon); stroke-width: 1.2; }
.brand-bars { stroke: var(--pink); stroke-width: 3.2; stroke-linecap: round; fill: none; }
nav { display: flex; flex-direction: column; gap: 2px; }
nav a, .theme-btn {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 10px 9px 14px; border-radius: 6px;
  color: var(--ink-2); text-decoration: none; font-size: 14.5px; border: 0; background: none; cursor: pointer; text-align: left;
}
nav a svg, .theme-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
nav a:hover, .theme-btn:hover { background: var(--panel-2); color: var(--ink); }
nav a.active { background: var(--neon-soft); color: var(--ink); }
nav a.active::before { content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px; border-radius: 2px; background: var(--neon); box-shadow: var(--glow); }
nav a.active svg { stroke: var(--neon); }
.theme-btn { margin-top: auto; }

main { min-width: 0; padding: 0 32px 64px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0 18px; flex-wrap: wrap; }
.month-switch { display: flex; align-items: center; gap: 6px; }
.month-switch h1 { margin: 0 6px; font: 600 30px/1.1 var(--f-num); letter-spacing: .02em; min-width: 7.2em; text-align: center; font-stretch: 92%; }
.month-switch > button:not(.ghost) {
  width: 36px; height: 36px; border-radius: 4px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; font-size: 20px; line-height: 1;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}
.month-switch > button:hover { border-color: var(--neon); color: var(--neon); }

.seg { display: inline-flex; padding: 3px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; }
.seg button { border: 0; background: none; padding: 6px 14px; border-radius: 4px; cursor: pointer; color: var(--ink-2); font-size: 14px; }
.seg button[aria-selected="true"] { background: var(--neon); color: #fff; font-weight: 600; box-shadow: 0 0 14px rgba(182, 92, 255, calc(.45 * var(--glow-on))); }
.seg:empty { display: none; }

.view { outline: none; display: grid; gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.grid-2.one { grid-template-columns: minmax(0, 780px); }
.grid-2.one .span-2 { grid-column: auto; }
.span-2 { grid-column: span 2; }

/* панель-HUD: срезанный угол и скобка в левом верхнем углу */
.panel {
  position: relative; background: var(--panel); border: 1px solid var(--line); padding: 20px 22px; min-width: 0;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}
.panel::before { content: ""; position: absolute; left: -1px; top: -1px; width: 18px; height: 18px; border-left: 2px solid var(--neon); border-top: 2px solid var(--neon); pointer-events: none; }
.panel::after { content: ""; position: absolute; right: 0; top: 0; width: var(--cut); height: var(--cut); background: linear-gradient(to bottom left, transparent calc(50% - 1px), var(--line) calc(50% - 1px), var(--line) calc(50% + 1px), transparent calc(50% + 1px)); pointer-events: none; }
.panel > h2, .section-title { margin: 0 0 4px; font: 600 19px/1.25 var(--f-num); letter-spacing: .02em; }
.panel > .sub { margin: 0 0 16px; color: var(--muted); font-size: 13.5px; }
.person-head { display: flex; align-items: center; gap: 10px; margin: 8px 0 -6px; font: 600 22px/1.2 var(--f-num); letter-spacing: .03em; }
.person-head i { width: 10px; height: 10px; transform: rotate(45deg); background: var(--s1); box-shadow: 0 0 10px var(--s1); }
.person-head.p2 i { background: var(--s3); box-shadow: 0 0 10px var(--s3); }

/* ───── герой: реактор месяца ───── */
.hero {
  position: relative; overflow: hidden; color: #EEE8FF; padding: 26px 30px 22px;
  background:
    radial-gradient(600px 260px at 85% 0%, rgba(255, 61, 203, .22), transparent 70%),
    radial-gradient(500px 300px at 0% 100%, rgba(43, 228, 255, .12), transparent 70%),
    linear-gradient(rgba(182, 92, 255, .09) 1px, transparent 1px) 0 0 / 100% 26px,
    var(--hero-bg);
  border: 1px solid rgba(182, 92, 255, .5);
  clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 28px 100%, 0 calc(100% - 28px));
  box-shadow: inset 0 0 60px rgba(160, 83, 253, .18);
}
.hero::before { content: ""; position: absolute; right: 0; top: 0; width: 28px; height: 28px; background: linear-gradient(to bottom left, transparent calc(50% - 1px), rgba(182, 92, 255, .8) calc(50% - 1px), rgba(182, 92, 255, .8) calc(50% + 1px), transparent calc(50% + 1px)); }
.hero::after { content: ""; position: absolute; left: 0; bottom: 0; width: 28px; height: 28px; background: linear-gradient(to top right, transparent calc(50% - 1px), rgba(182, 92, 255, .8) calc(50% - 1px), rgba(182, 92, 255, .8) calc(50% + 1px), transparent calc(50% + 1px)); }
.hero-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.hero-k { margin: 0 0 4px; color: #A99CD6; font-size: 14px; }
.hero-num {
  font-size: clamp(52px, 7vw, 88px); line-height: .92; font-weight: 600; letter-spacing: -.005em; font-stretch: 85%;
  text-shadow: -2px 0 rgba(43, 228, 255, .55), 2px 0 rgba(255, 61, 203, .55), 0 0 30px rgba(182, 92, 255, .55);
}
.hero-num small { font-size: .38em; font-weight: 500; color: #A99CD6; margin-left: 8px; text-shadow: none; }
.hero-meta { margin: 10px 0 0; color: #A99CD6; font: 13.5px/1.5 var(--f-mono); }
.hero-meta b { color: #EEE8FF; font-weight: 600; }
.hero-side { display: flex; gap: 30px; flex-wrap: wrap; }
.hero-side div { min-width: 110px; }
.hero-side span { display: block; color: #A99CD6; font-size: 13px; }
.hero-side b { font: 600 28px/1.15 var(--f-num); font-stretch: 90%; }
.hero-side small { display: block; color: #A99CD6; font: 12px var(--f-mono); }
.hero-side b.good { color: #3BE8A8; text-shadow: 0 0 14px rgba(59, 232, 168, .5); }
.hero-side b.warn { color: #FFC93C; text-shadow: 0 0 14px rgba(255, 201, 60, .45); }
.hero-side b.bad { color: #FF6A4D; text-shadow: 0 0 14px rgba(255, 106, 77, .5); }

.ruler { margin-top: 46px; position: relative; }
.ruler-track { position: relative; height: 16px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(182, 92, 255, .35); }
.ruler-band { position: absolute; top: -1px; bottom: -1px; background: repeating-linear-gradient(135deg, rgba(43, 228, 255, .55) 0 5px, rgba(43, 228, 255, .18) 5px 10px); border-left: 1px solid #2BE4FF; border-right: 1px solid #2BE4FF; }
.ruler-mid { position: absolute; top: -6px; bottom: -6px; width: 2px; background: #2BE4FF; box-shadow: 0 0 10px #2BE4FF; }
.ruler-fact { position: absolute; inset: -1px auto -1px -1px; background: linear-gradient(90deg, #7B2FE0, #B65CFF 70%, #FF3DCB); box-shadow: 0 0 18px rgba(182, 92, 255, .7); transform-origin: left; }
.boot .ruler-fact { animation: charge 1.1s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes charge { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.ruler-mark { position: absolute; top: -9px; bottom: -9px; width: 2px; background: #fff; }
.ruler-mark span { position: absolute; top: -22px; left: 50%; transform: translateX(-50%); white-space: nowrap; font: 12px var(--f-mono); color: #fff; }
.ruler-scale { position: relative; height: 18px; margin-top: 7px; color: #8C80B8; font: 11.5px/1 var(--f-mono); }
.ruler-scale span { position: absolute; transform: translateX(-50%); }
.ruler-legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 6px; color: #A99CD6; font-size: 12.5px; }
.ruler-legend i { display: inline-block; width: 14px; height: 8px; margin-right: 6px; vertical-align: middle; }

.skyline { display: grid; gap: 3px; align-items: end; height: 70px; margin-top: 22px; }
.skyline .d { position: relative; background: linear-gradient(180deg, #B65CFF, #6A22C9); min-height: 3px; cursor: default; }
.skyline .d.top { background: linear-gradient(180deg, #FF7BE0, #FF3DCB); box-shadow: 0 0 12px rgba(255, 61, 203, .7); }
.skyline .d.off { background: transparent; border-bottom: 2px solid #3A2C63; }
.skyline .d.future { background: transparent; border-bottom: 2px dashed #3A2C63; }
.skyline .d.exp { background: repeating-linear-gradient(180deg, rgba(43, 228, 255, .35) 0 2px, transparent 2px 4px); }
.skyline .d.today { outline: 1px solid #2BE4FF; outline-offset: 2px; }
.skyline-days { display: grid; gap: 3px; margin-top: 6px; color: #7C70A8; font: 10.5px/1 var(--f-mono); text-align: center; }
.skyline-days span.we { color: #C9BEEA; }

/* ───── главное сейчас ───── */
.insights { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 22px; }
.insights li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 12px 14px 12px 12px; background: var(--panel-2); border-left: 2px solid var(--c); }
.insights li b { display: block; font: 600 15.5px/1.3 var(--f-num); letter-spacing: .02em; margin-bottom: 2px; }
.insights li p { margin: 0; font-size: 13.8px; color: var(--ink-2); }
.insights .ico { width: 24px; height: 24px; display: grid; place-items: center; color: var(--c); font: 700 13px/1 var(--f-mono); border: 1px solid var(--c); box-shadow: 0 0 10px color-mix(in srgb, var(--c) calc(45% * var(--glow-on)), transparent); }
.lv-bad { --c: var(--bad); } .lv-warn { --c: var(--warn); } .lv-good { --c: var(--good); } .lv-info { --c: var(--info); }

/* ───── показатели ───── */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0; }
.kpi { padding: 16px 20px; border-left: 1px solid var(--line-2); }
.kpi:first-child { border-left: 0; }
.kpi-k { color: var(--muted); font-size: 13px; }
.kpi-v { font-size: 32px; font-weight: 600; line-height: 1.15; margin-top: 2px; font-stretch: 90%; }
.kpi-s { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.good { color: var(--good); } .bad { color: var(--bad); } .warn { color: var(--warn); } .muted { color: var(--muted); }

/* ───── формы ───── */
.quick { display: grid; grid-template-columns: 1.1fr 1fr; padding: 0; }
.quick-form { padding: 20px 22px; display: grid; gap: 12px; align-content: start; }
.quick-today { padding: 20px 22px; background: var(--panel-2); border-left: 1px solid var(--line-2); }
.field { display: grid; gap: 4px; }
.field label, .lbl { font-size: 13px; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--muted); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.row.top { align-items: start; }
.row > .field { flex: 1 1 140px; }
input[type=text], input[type=number], input[type=date], select, textarea {
  width: 100%; padding: 9px 11px; border-radius: 3px; border: 1px solid var(--line); background: var(--bg-2); min-height: 40px;
}
input.big { font-size: 28px; padding: 4px 12px; font-weight: 600; font-family: var(--f-num); }
input:hover, select:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { border-color: var(--neon); outline: none; box-shadow: 0 0 0 3px var(--neon-soft), 0 0 16px rgba(182, 92, 255, calc(.3 * var(--glow-on))); }
input[type=range] { width: 100%; accent-color: var(--neon); }
.btn {
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 20px;
  border: 1px solid var(--neon); background: var(--neon); color: #fff; font-weight: 600; cursor: pointer; letter-spacing: .02em;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  box-shadow: 0 0 18px rgba(182, 92, 255, calc(.5 * var(--glow-on)));
}
.btn:hover { filter: brightness(1.15); }
.btn.ghost, .ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); cursor: pointer; box-shadow: none; }
.btn.ghost:hover, .ghost:hover { border-color: var(--neon); color: var(--neon); filter: none; }
.ghost.small { padding: 5px 12px; font-size: 13px; min-height: 32px; margin-left: 6px; border-radius: 3px; }
.btn.danger { background: transparent; color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); box-shadow: none; }
.linkbtn { background: none; border: 0; color: var(--cyan); cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 3px; }

.est { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.est .big { font-size: 44px; font-weight: 600; font-stretch: 88%; }
.est-range { color: var(--ink-2); font-size: 14px; }
.chip { display: inline-block; padding: 2px 10px; font-size: 12.5px; border: 1px solid var(--line); color: var(--ink-2); }
.chip.good { border-color: var(--good); color: var(--good); background: var(--good-soft); }
.chip.bad { border-color: var(--bad); color: var(--bad); background: var(--bad-soft); }
.chip.warn { border-color: var(--warn); color: var(--warn); background: var(--warn-soft); }
.factors { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 13.5px; color: var(--ink-2); }
.factors li { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed var(--line); padding-bottom: 5px; }
.factors li b { font-family: var(--f-num); color: var(--ink); font-weight: 600; white-space: nowrap; }

/* ───── таблицы ───── */
.table-wrap { overflow-x: auto; margin: 0 -6px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12.5px; padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 7px 8px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
td.n, th.n { text-align: right; white-space: nowrap; }
tr.today td { background: rgba(43, 228, 255, .07); }
tr.today td:first-child { box-shadow: inset 2px 0 0 var(--cyan); }
tr.future td { color: var(--muted); }
tr.we td:first-child { color: var(--ink); font-weight: 600; }
tbody tr:hover td { background: var(--panel-2); }
td input { min-height: 34px; padding: 5px 9px; }
td input.raw { width: 110px; text-align: right; font-family: var(--f-num); font-size: 15px; }
td input.cm { min-width: 160px; }
tr.saved td { animation: flash 1s ease; }
@keyframes flash { from { background: var(--neon-soft); } to { background: transparent; } }
.days-sum td { font-weight: 600; border-top: 2px solid var(--line); border-bottom: 0; }

.stat-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); border-top: 1px solid var(--line-2); }
.stat-list div { padding: 12px 10px 10px 0; border-bottom: 1px solid var(--line-2); }
.stat-list span { display: block; font-size: 12.5px; color: var(--muted); }
.stat-list b { font: 600 23px/1.2 var(--f-num); font-stretch: 92%; }
.stat-list small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }

.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); margin: -4px 0 8px; }
.legend i { display: inline-block; width: 16px; height: 3px; vertical-align: middle; margin-right: 6px; }
.legend i.dash { background: repeating-linear-gradient(90deg, currentColor 0 4px, transparent 4px 7px) !important; height: 2px; }
.legend i.box { height: 10px; width: 10px; }
.legend i.band { height: 10px; width: 16px; opacity: .45; }

/* ───── графики ───── */
.chart { width: 100%; min-height: 120px; }
.chart-empty { display: grid; place-items: center; color: var(--muted); font-size: 14px; border: 1px dashed var(--line); }
.chart-svg { display: block; overflow: visible; }
.chart-svg .grid { stroke: var(--line-2); stroke-width: 1; }
.chart-svg .grid.zero { stroke: var(--line); }
.chart-svg .tick { fill: var(--muted); font: 11px var(--f-mono); }
.chart-svg .tick.strong { fill: var(--cyan); font-weight: 700; }
.chart-svg .line { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.chart-svg .line.glow { filter: drop-shadow(0 0 calc(4px * var(--glow-on)) var(--c)); }
.chart-svg .band { opacity: .2; }
.chart-svg .ref { stroke-width: 1.5; stroke-dasharray: 5 4; }
.chart-svg .ref-label, .chart-svg .end-label { fill: var(--ink-2); font: 11.5px var(--f-mono); paint-order: stroke; stroke: var(--panel); stroke-width: 4px; }
.chart-svg .end-label { font-weight: 600; }
.chart-svg .cross { stroke: var(--cyan); stroke-width: 1; stroke-dasharray: 3 3; opacity: .7; }
.chart-svg .hover-dot, .chart-svg .dot { stroke: var(--panel); stroke-width: 2; }
.chart-svg .bar { transition: opacity .1s; }
.chart-svg .bar.hl { filter: drop-shadow(0 0 calc(6px * var(--glow-on)) var(--c)); }
.chart-svg .bar.hover { opacity: .75; }
.chart-tip {
  position: fixed; z-index: 50; display: none; pointer-events: none; background: #120A26; color: #EEE8FF; border: 1px solid rgba(182, 92, 255, .6);
  padding: 8px 11px; font-size: 13px; box-shadow: 0 0 24px rgba(160, 83, 253, .35); min-width: 150px; max-width: 320px;
}
.tip-title { color: #A99CD6; font: 11.5px var(--f-mono); margin-bottom: 4px; }
.tip-row { display: flex; align-items: center; gap: 8px; }
.tip-row i { width: 9px; height: 9px; flex: none; }
.tip-row b { margin-left: auto; font-family: var(--f-num); padding-left: 12px; white-space: nowrap; }

/* календарь месяца */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.cal .h { font-size: 12px; color: var(--muted); text-align: center; padding-bottom: 2px; }
.cal .c { aspect-ratio: 1.35; background: var(--panel-2); padding: 5px 7px; display: flex; flex-direction: column; justify-content: space-between; font: 11px var(--f-mono); color: var(--ink-2); border: 1px solid transparent; }
.cal .c b { font: 600 15px/1 var(--f-num); color: var(--ink); text-align: right; }
.cal .c.blank { background: none; }
.cal .c.today { border-color: var(--cyan); }
.cal .c.hot, .cal .c.hot b { color: #fff; }

/* тепловая карта всей истории */
.heat-wrap { overflow-x: auto; padding-bottom: 4px; }
.heat { --cs: 14px; display: grid; grid-auto-flow: column; grid-template-rows: 16px repeat(7, var(--cs)); gap: 3px; width: max-content; }
.heat .m { font: 10.5px var(--f-mono); color: var(--muted); white-space: nowrap; }
.heat .cell { width: var(--cs); height: var(--cs); background: var(--panel-3); }
.heat .cell.none { background: transparent; }
.heat .wdl { font: 10px var(--f-mono); color: var(--muted); line-height: var(--cs); padding-right: 4px; }
.heat-legend { display: flex; align-items: center; gap: 4px; font: 11px var(--f-mono); color: var(--muted); margin-top: 10px; }
.heat-legend i { width: 14px; height: 14px; display: inline-block; }

/* пороги и симулятор */
.ladder { display: grid; gap: 8px; }
.ladder .st { display: grid; grid-template-columns: 96px 1fr 70px 110px; gap: 12px; align-items: center; font-size: 13.5px; }
.ladder .st .bar { height: 10px; background: var(--panel-3); position: relative; }
.ladder .st .bar i { position: absolute; inset: 0 auto 0 0; background: var(--s1); box-shadow: 0 0 10px rgba(160, 83, 253, calc(.6 * var(--glow-on))); }
.ladder .st.done .bar i { background: var(--good); box-shadow: none; }
.ladder .st .n { font-family: var(--f-num); font-weight: 600; text-align: right; }
.ladder .st small { color: var(--muted); display: block; font-size: 12px; }
.ladder .st.next { color: var(--ink); }
.ladder .st.next .bar { outline: 1px solid var(--cyan); }

.sim { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.sim-out { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line-2); }
.sim-out div { padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.sim-out span { display: block; font-size: 12.5px; color: var(--muted); }
.sim-out b { font: 600 26px/1.15 var(--f-num); font-stretch: 90%; }
.sim-val { font: 600 22px var(--f-num); color: var(--neon); }
.range-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 14px; }

/* формы месяца */
.mode-card { border: 1px solid var(--line); padding: 14px 16px; display: grid; gap: 12px; background: var(--bg-2); }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--neon); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); }
.stepper button { width: 38px; height: 38px; border: 0; background: var(--panel-2); cursor: pointer; font-size: 18px; }
.stepper output { min-width: 42px; text-align: center; font: 600 18px var(--f-num); }
.grid-ladder { display: grid; gap: 4px; margin-top: 6px; }
.grid-ladder .step { display: grid; grid-template-columns: 90px 1fr 60px; align-items: center; gap: 10px; font-size: 13.5px; }
.grid-ladder .bar { height: 8px; background: var(--panel-3); position: relative; overflow: hidden; }
.grid-ladder .bar i { position: absolute; inset: 0 auto 0 0; background: var(--s1); }
.grid-ladder .step.cur { font-weight: 700; }
.grid-ladder .step.cur .n { color: var(--neon); }

.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.checks li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; font-size: 14px; }
.checks li small { display: block; color: var(--muted); font-size: 12.5px; }
.ic { width: 20px; height: 20px; display: grid; place-items: center; font-size: 12px; font-weight: 700; border: 1px solid; }
.ic.ok { color: var(--good); } .ic.no { color: var(--bad); } .ic.mid { color: var(--warn); }

.empty { padding: 30px; text-align: center; color: var(--muted); }
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 30px); opacity: 0; background: #120A26; color: #EEE8FF;
  border: 1px solid var(--neon); padding: 10px 18px; transition: .2s; pointer-events: none; z-index: 60; font-size: 14px; box-shadow: 0 0 24px rgba(160, 83, 253, .4);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { border-color: var(--bad); box-shadow: 0 0 24px rgba(255, 106, 77, .4); }
.note { font-size: 13px; color: var(--muted); margin: 10px 0 0; max-width: 72ch; }
p { max-width: 75ch; }
details > summary { cursor: pointer; font: 600 17px var(--f-num); letter-spacing: .02em; }

@media (max-width: 1100px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .kpi:nth-child(3) { border-left: 0; }
  .kpi:nth-child(n+3) { border-top: 1px solid var(--line-2); }
  .insights { grid-template-columns: 1fr; }
  .sim { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .rail { position: sticky; z-index: 20; height: auto; flex-direction: row; padding: 8px 10px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand span, .theme-btn span { display: none; }
  .brand { padding: 4px; }
  nav { flex-direction: row; }
  nav a span { display: none; }
  nav a.active::before { left: 6px; right: 6px; top: auto; bottom: 0; width: auto; height: 2px; }
  .theme-btn { margin: 0 0 0 auto; }
  main { padding: 0 16px 48px; }
  .grid-2, .grid-3, .quick { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .quick-today { border-left: 0; border-top: 1px solid var(--line-2); }
  .month-switch h1 { font-size: 23px; min-width: 0; }
  .hero { padding: 20px 18px; }
  .skyline-days span:not(.k) { visibility: hidden; }
  .skyline { gap: 2px; }
  .ladder .st { grid-template-columns: 80px 1fr 56px; }
  .ladder .st .p { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
tr.future.we td:first-child { color: var(--muted); font-weight: 400; }

/* легенда «симуляции + колокол» под гистограммой Монте-Карло */
.bell-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: 10px; }
.bell-legend i { display: inline-block; vertical-align: middle; }
.bell-legend .lg-bar { width: 12px; height: 10px; border-radius: 2px; }
.bell-legend .lg-line { width: 18px; height: 0; border-top: 2.5px solid var(--warn); margin-left: 8px; box-shadow: 0 0 6px var(--warn); }

/* ═════════════════════════════════════════════════════════════════════
   «Жидкое стекло» — тот же неоново-фиолетовый «Заработок», но поверхности
   стеклянные: скруглённые, полупрозрачные, со светящейся кромкой; на фоне —
   мягкие неоновые пятна вместо сетки. Цвета и размеры выше — основа,
   здесь переопределяется только форма и материал поверхностей.
   ═════════════════════════════════════════════════════════════════════ */
:root {
  --r: 20px; --r-s: 13px;
  --glass: rgba(30, 18, 58, .46);
  --glass-2: rgba(44, 28, 82, .42);
  --glass-strong: rgba(24, 14, 48, .82);
  --glass-edge: rgba(190, 150, 255, .16);
  --glass-hl: inset 0 1px 0 rgba(255, 255, 255, .09);
  --glass-shadow: 0 18px 44px -22px rgba(0, 0, 0, .85);
  --rim: linear-gradient(155deg, rgba(220, 190, 255, .55), rgba(182, 92, 255, .12) 32%, rgba(255, 255, 255, 0) 56%, rgba(255, 61, 203, .38));
  --field: rgba(255, 255, 255, .05);
  --field-edge: rgba(190, 150, 255, .2);
  --neon-grad: linear-gradient(180deg, #C77DFF 0%, #A24BF5 50%, #7B2FE0 100%);
  --grain: .06;
}
:root[data-theme="light"] {
  --glass: rgba(255, 255, 255, .58);
  --glass-2: rgba(255, 255, 255, .5);
  --glass-strong: rgba(255, 255, 255, .86);
  --glass-edge: rgba(255, 255, 255, .7);
  --glass-hl: inset 0 1px 0 rgba(255, 255, 255, .95);
  --glass-shadow: 0 16px 38px -18px rgba(80, 30, 160, .28), 0 2px 6px -2px rgba(80, 30, 160, .08);
  --rim: linear-gradient(155deg, #fff, rgba(255, 255, 255, .35) 32%, rgba(255, 255, 255, 0) 56%, rgba(192, 24, 126, .3));
  --field: rgba(255, 255, 255, .75);
  --field-edge: rgba(122, 38, 219, .16);
  --neon-grad: linear-gradient(180deg, #9447F0 0%, #7A26DB 52%, #5E17B3 100%);
  --grain: .04;
}

/* ---------- фон: неоновые пятна + зерно матового стекла ---------- */
body { background: var(--bg); background-image: none; position: relative; }
body::before, body::after { content: ""; position: fixed; z-index: -1; pointer-events: none; }
body::before {
  inset: -10vmax;
  background:
    radial-gradient(40vmax 40vmax at 92% 0%, rgba(255, 61, 203, .20), transparent 70%),
    radial-gradient(44vmax 44vmax at 6% 8%, rgba(160, 83, 253, .30), transparent 70%),
    radial-gradient(40vmax 40vmax at 0% 100%, rgba(43, 228, 255, .13), transparent 70%),
    radial-gradient(36vmax 36vmax at 85% 95%, rgba(122, 38, 219, .25), transparent 70%),
    linear-gradient(180deg, #0C0719, #07040F);
}
:root[data-theme="light"] body::before {
  background:
    radial-gradient(40vmax 40vmax at 92% 0%, rgba(255, 61, 203, .16), transparent 70%),
    radial-gradient(44vmax 44vmax at 6% 8%, rgba(160, 83, 253, .22), transparent 70%),
    radial-gradient(40vmax 40vmax at 0% 100%, rgba(43, 228, 255, .14), transparent 70%),
    radial-gradient(36vmax 36vmax at 85% 95%, rgba(122, 38, 219, .14), transparent 70%),
    linear-gradient(180deg, #F6F2FE, #EDE7FA);
}
body::after {
  inset: 0; opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- меню слева: стеклянная колонна ---------- */
.rail {
  background: var(--glass-strong); border-right: 1px solid var(--glass-edge);
  -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  box-shadow: var(--glass-hl), 12px 0 40px -30px rgba(0, 0, 0, .6);
}
nav a, .theme-btn { border-radius: 12px; transition: background .15s ease, color .15s ease, transform .12s ease; }
nav a.active {
  background: linear-gradient(180deg, rgba(182, 92, 255, .26), rgba(182, 92, 255, .12));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 0 0 1px rgba(182, 92, 255, .32), 0 0 18px -6px rgba(182, 92, 255, calc(.8 * var(--glow-on)));
}
nav a.active::before { display: none; }
:root[data-theme="light"] nav a.active { background: linear-gradient(180deg, rgba(122, 38, 219, .14), rgba(122, 38, 219, .07)); box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(122, 38, 219, .18); }

/* ---------- панели: стекло со светящейся кромкой вместо срезанных углов ---------- */
.panel {
  clip-path: none; border-radius: var(--r); background: var(--glass); border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-hl), var(--glass-shadow);
}
.panel::before {   /* кромка: ярче сверху-слева, розовый отблеск снизу-справа */
  left: 0; top: 0; width: auto; height: auto; inset: 0; border: 0; border-radius: inherit; padding: 1px;
  background: var(--rim);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.panel::after { display: none; }

/* ---------- герой месяца: тёмное неоновое стекло ---------- */
.hero {
  clip-path: none; border-radius: 26px;
  background:
    radial-gradient(600px 260px at 85% 0%, rgba(255, 61, 203, .26), transparent 70%),
    radial-gradient(500px 300px at 0% 100%, rgba(43, 228, 255, .14), transparent 70%),
    linear-gradient(160deg, rgba(40, 20, 80, .92), rgba(14, 8, 30, .95));
  border: 1px solid rgba(190, 140, 255, .32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 0 60px rgba(160, 83, 253, .16), 0 24px 50px -24px rgba(60, 10, 120, .8);
}
.hero::before {   /* блик стекла сверху */
  inset: 0 0 60% 0; width: auto; height: auto; border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, .10), transparent);
}
.hero::after { display: none; }
.ruler-track { border-radius: 999px; overflow: hidden; border-color: rgba(190, 140, 255, .3); }
.ruler-band { border-radius: 2px; }
.ruler-fact { border-radius: 999px; }
.skyline .d { border-radius: 4px 4px 1px 1px; }

/* ---------- верх: месяц и переключатель ---------- */
.month-switch > button:not(.ghost) {
  clip-path: none; border-radius: 50%; background: var(--glass); border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-hl); transition: transform .12s ease, border-color .15s ease;
}
.month-switch > button:active { transform: scale(.94); }
.seg { border-radius: 999px; background: var(--glass); border-color: var(--glass-edge); box-shadow: var(--glass-hl); padding: 4px; }
.seg button { border-radius: 999px; }
.seg button[aria-selected="true"] { background: var(--neon-grad); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 6px 16px -6px rgba(182, 92, 255, .8); }

/* ---------- кнопки ---------- */
.btn {
  clip-path: none; border-radius: 14px; background: var(--neon-grad); border: 1px solid rgba(160, 83, 253, .6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .32), inset 0 -1px 0 rgba(255, 61, 203, .45), 0 10px 24px -10px rgba(182, 92, 255, .85);
  transition: transform .12s ease, filter .15s ease;
}
.btn:active { transform: scale(.97); }
.btn.ghost, .ghost { background: var(--field); border: 1px solid var(--field-edge); box-shadow: var(--glass-hl); border-radius: 12px; }
.ghost.small { border-radius: 999px; }
.btn.danger { background: rgba(255, 106, 77, .08); }

/* ---------- поля ---------- */
input[type=text], input[type=number], input[type=date], select, textarea {
  border-radius: 12px; background: var(--field); border: 1px solid var(--field-edge);
  transition: border-color .15s ease, box-shadow .2s ease, background .15s ease;
}
input:focus, select:focus, textarea:focus { background: var(--glass-strong); border-color: var(--neon); box-shadow: 0 0 0 4px var(--neon-soft), 0 0 18px rgba(182, 92, 255, calc(.35 * var(--glow-on))); }
.stepper { border-radius: 12px; overflow: hidden; border-color: var(--field-edge); }
.mode-card { border-radius: 16px; background: var(--glass-2); border-color: var(--glass-edge); box-shadow: var(--glass-hl); }

/* ---------- блоки внутри панелей ---------- */
.insights li { border-radius: 14px; background: var(--glass-2); border-left: 0; box-shadow: var(--glass-hl), inset 3px 0 0 var(--c); }
.insights .ico { border-radius: 8px; }
.quick-today { background: var(--glass-2); border-radius: 0 var(--r) var(--r) 0; }
.chip { border-radius: 999px; }
.cal .c { border-radius: 10px; background: var(--glass-2); }
.heat .cell { border-radius: 3px; }
.ladder .st .bar, .grid-ladder .bar { border-radius: 999px; overflow: hidden; }
.ladder .st .bar i, .grid-ladder .bar i { border-radius: 999px; }
.ic { border-radius: 6px; }
tbody tr:hover td { background: rgba(182, 92, 255, .07); }
:root[data-theme="light"] tbody tr:hover td { background: rgba(122, 38, 219, .05); }
.chart-empty { border-radius: 14px; }

/* ---------- всплывающие подсказки и уведомления — стекло поверх содержимого ---------- */
.chart-tip, .toast {
  border-radius: 14px; background: rgba(20, 10, 40, .78);
  -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px);
  border: 1px solid rgba(190, 140, 255, .35);
}
.toast { border-radius: 999px; }

/* ---------- движение: панели мягко всплывают ---------- */
@media (prefers-reduced-motion: no-preference) {
  .view > * { animation: zrise .28s cubic-bezier(.2, .75, .2, 1) both; }
  .view > *:nth-child(2) { animation-delay: .03s; }
  .view > *:nth-child(n+3) { animation-delay: .06s; }
  nav a:active, .theme-btn:active, .seg button:active { transform: scale(.95); }
}
@keyframes zrise { from { opacity: .2; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- телефон: меню — плавающая стеклянная капсула снизу ---------- */
@media (max-width: 860px) {
  .rail {
    position: fixed; top: auto; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 40;
    height: auto; padding: 6px; gap: 2px; border-radius: 26px; border: 1px solid var(--glass-edge);
    justify-content: space-between; overflow-x: auto; scrollbar-width: none;
    box-shadow: var(--glass-hl), 0 16px 40px -14px rgba(0, 0, 0, .7);
  }
  .rail::-webkit-scrollbar { display: none; }
  .brand { display: none; }
  nav { flex: 1; justify-content: space-between; gap: 2px; }
  nav a, .theme-btn { padding: 9px 8px; border-radius: 20px; justify-content: center; flex: 1 1 0; min-width: 34px; }
  nav a.active::before { display: none; }
  .theme-btn { margin: 0; }
  main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .quick-today { border-radius: 0 0 var(--r) var(--r); }
  .hero { border-radius: 22px; }
}

/* без размытия или если просили меньше прозрачности — плотные поверхности */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --glass-strong: #150C2A; }
  :root[data-theme="light"] { --glass-strong: #fff; }
}
@media (prefers-reduced-transparency: reduce) {
  :root { --glass: var(--panel); --glass-2: var(--panel-2); --glass-strong: var(--panel); }
  :root[data-theme="light"] { --glass: #fff; --glass-2: #F7F4FE; --glass-strong: #fff; }
}

/* текст не выделяется (кроме полей ввода) */
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
input, textarea, select, [contenteditable] { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }

/* ---------- выпадающие списки и календарь (pickers.js) — системные поля спрятаны, но остаются в форме ---------- */
.pk { position: relative; display: block; min-width: 0; }
.pk-native { position: absolute !important; left: 0; bottom: 0; width: 1px !important; height: 1px !important; min-height: 0 !important;
  opacity: 0; pointer-events: none; padding: 0 !important; border: 0 !important; }
.pk-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 40px; padding: 8px 12px;
  border-radius: 12px; background: var(--field); border: 1px solid var(--field-edge); color: var(--ink); font: inherit; text-align: left; cursor: pointer;
  transition: border-color .15s ease, box-shadow .2s ease, background .15s ease;
}
.pk-btn::after { content: ""; flex: none; width: 8px; height: 8px; margin: -4px 2px 0 0; border: solid var(--muted); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .2s ease; }
.pk.open .pk-btn::after { transform: translateY(3px) rotate(-135deg); }
.pk-btn:hover { border-color: var(--muted); }
.pk-btn:focus-visible, .pk.open .pk-btn { outline: none; background: var(--glass-strong); border-color: var(--neon); box-shadow: 0 0 0 4px var(--neon-soft), 0 0 18px rgba(182, 92, 255, calc(.35 * var(--glow-on))); }
.pk-btn:disabled { opacity: .55; cursor: default; }
.pk-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-cal .pk-btn::after { width: 16px; height: 16px; margin: 0; border: 0; transform: none; background: var(--muted);
  -webkit-mask: var(--pk-cal) center / contain no-repeat; mask: var(--pk-cal) center / contain no-repeat; }
.pk-cal.open .pk-btn::after { transform: none; background: var(--neon); }
:root { --pk-cal: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='3'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E"); }
.pk-pop {
  position: fixed; z-index: 90; display: flex; flex-direction: column; overflow: hidden;
  background: linear-gradient(var(--glass-strong), var(--glass-strong)), var(--bg);
  -webkit-backdrop-filter: saturate(160%) blur(20px); backdrop-filter: saturate(160%) blur(20px);
  border: 1px solid var(--glass-edge); border-radius: 16px; box-shadow: var(--glass-hl), 0 18px 40px -12px rgba(0, 0, 0, .6), 0 0 24px rgba(182, 92, 255, calc(.18 * var(--glow-on)));
  animation: pk-in .16s ease-out;
}
@keyframes pk-in { from { opacity: 0; transform: translateY(-4px); } }
.pk-search { margin: 8px 8px 4px; width: auto !important; min-height: 38px; padding: 8px 12px; }
.pk-list { list-style: none; margin: 0; padding: 4px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.pk-opt { padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.pk-opt:hover, .pk-opt.hl { background: var(--panel-2); }
.pk-opt.on { background: var(--neon-soft); color: var(--ink); font-weight: 600; box-shadow: inset 0 0 0 1px rgba(182, 92, 255, .35); }
.pk-opt.off, .pk-none { color: var(--muted); cursor: default; }
.pk-none { padding: 10px 12px; }
.pk-calpop { padding: 12px; }
.pk-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.pk-head b { font-family: var(--f-num); font-size: 1.05rem; letter-spacing: .02em; }
.pk-nav { width: 36px; height: 36px; border: 0; border-radius: 10px; background: none; color: var(--ink); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.pk-nav:hover { background: var(--panel-2); }
.pk-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.pk-wd { text-align: center; font-size: .72rem; font-weight: 600; color: var(--muted); padding: 4px 0; text-transform: uppercase; }
.pk-wd.we { color: var(--pink); }
.pk-day { aspect-ratio: 1; min-height: 34px; border: 0; border-radius: 10px; background: none; color: var(--ink); font: inherit; font-family: var(--f-num);
  font-variant-numeric: tabular-nums; cursor: pointer; transition: background .15s ease; }
.pk-day:hover, .pk-day.hl { background: var(--panel-2); }
.pk-day.we { color: color-mix(in srgb, var(--pink) 75%, var(--ink)); }
.pk-day.out { opacity: .35; }
.pk-day.today { box-shadow: inset 0 0 0 1.5px var(--cyan); font-weight: 600; }
.pk-day.on { background: var(--neon); color: #fff; font-weight: 700; box-shadow: 0 0 14px rgba(182, 92, 255, calc(.6 * var(--glow-on))); }
.pk-day:disabled { opacity: .18; cursor: default; background: none; }
.pk-foot { display: flex; align-items: center; gap: 4px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--glass-edge); }
.pk-foot span { flex: 1; }
.pk-link { border: 0; background: none; color: var(--cyan); font: inherit; font-weight: 600; padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.pk-link:hover { background: var(--panel-2); }

.today-panel { margin-top: 20px; }
.today-form, .today-form label, .today-list { display: grid; gap: 8px; }
.today-form { margin-block: 14px; }
.today-form input { width: 100%; min-width: 0; }
.today-list label { display: flex; align-items: baseline; gap: 8px; overflow-wrap: anywhere; }
.today-list small { color: var(--muted); }
.topbar[hidden] { display: none; }
.today-inbox-title { margin-top: 24px; }
