/* ПОДХОДЕЦ — тёмный неон, крупные тач-цели, safe-area */
:root {
  --bg: #0c0e11;
  --card: #15181d;
  --card2: #1b1f26;
  --line: #262b33;
  --text: #f2f4f8;
  --dim: #949cab;
  --pink: #ff4d8d;
  --pink2: #ff7ab8;
  --lime: #c6ff4d;
  --danger: #ff5c5c;
  --radius: 18px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  font-size: 16px;
  line-height: 1.45;
  min-height: 100%;
  overscroll-behavior-y: none;
}

body {
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}
input, textarea { -webkit-user-select: auto; user-select: auto; }

#app {
  max-width: 520px;
  margin: 0 auto;
  padding: 10px 14px calc(28px + env(safe-area-inset-bottom));
  min-height: 100vh;
}

/* без transform в анимации: transform делает родителя containing block для position:fixed оверлея отдыха */
.view { display: flex; flex-direction: column; gap: 12px; animation: fadein .18s ease; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* ---------- верхняя панель ---------- */
.topbar {
  display: flex; align-items: center; gap: 10px;
  padding-top: env(safe-area-inset-top);
  min-height: 44px;
}
.topbar-title {
  flex: 1; font-weight: 800; font-size: 17px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-align: left; background: none; border: 0; color: var(--text);
}
.topbar-right { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--dim); font-size: 15px; }
.logo { font-weight: 900; font-size: 26px; letter-spacing: .04em; flex: 1; }
.logo-sub { font-size: 24px; }
.tagline { font-size: 13px; margin-top: -6px; }

.icon-btn {
  background: var(--card); border: 1px solid var(--line); color: var(--text);
  width: 44px; height: 44px; border-radius: 14px; font-size: 20px;
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn.tiny { width: 36px; height: 36px; font-size: 14px; border-radius: 11px; }
.icon-btn.danger { color: var(--danger); }

/* ---------- карточки ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  text-align: left;
}
.profile-card, .active-banner {
  display: flex; align-items: center; gap: 14px;
  width: 100%; cursor: pointer;
}
.profile-card:active, .active-banner:active { transform: scale(.985); }
.pc-emoji { font-size: 34px; }
.pc-main { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.active-banner { border-color: var(--pink); box-shadow: 0 0 22px rgba(255, 77, 141, .18); }

.empty-card {
  border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 22px 16px; color: var(--dim); text-align: center;
}
.foot { text-align: center; margin-top: 4px; }

.ex-chevron { color: var(--dim); font-size: 20px; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 54px; padding: 12px 18px;
  border-radius: 16px; border: 1px solid var(--line);
  background: var(--card2); color: var(--text);
  font-size: 16px; font-weight: 700; cursor: pointer;
  text-align: center; line-height: 1.3;
  transition: transform .06s ease;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--pink), #ff2f6d);
  border-color: transparent;
  box-shadow: 0 10px 28px rgba(255, 77, 141, .35);
  color: #fff;
}
.btn-danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn-ghost { background: var(--card); }
.btn-ghost.small, .btn.small { min-height: 44px; font-size: 14px; padding: 8px 14px; }
.btn-huge { min-height: 96px; font-size: 24px; font-weight: 900; letter-spacing: .02em; padding: 16px; }
.btn-sub { font-size: 12px; font-weight: 600; opacity: .85; letter-spacing: 0; }
.grow { flex: 1; }
.btn[hidden], .cal-start[hidden] { display: none !important; }

.row { display: flex; }
.gap { gap: 10px; }
.gap2 { gap: 8px; }
.wrap { flex-wrap: wrap; }
.dim { color: var(--dim); }
.small { font-size: 13px; }
.pad-l { padding-left: 6px; display: block; }

/* ---------- чипсы ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--card2); border: 1px solid var(--line);
  padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
  color: var(--text); cursor: default;
}
.chip-pink { color: var(--pink); border-color: rgba(255, 77, 141, .4); }
.chip-lime { color: var(--lime); border-color: rgba(198, 255, 77, .4); }
.chip-btn { cursor: pointer; }

/* ---------- инпуты ---------- */
.input {
  width: 100%; background: var(--card2); border: 1px solid var(--line);
  color: var(--text); border-radius: 14px; padding: 12px 14px;
  font-size: 16px; font-family: inherit;
}
.input:focus { outline: none; border-color: var(--pink); }
textarea.input { resize: vertical; }

.f-label { font-size: 13px; font-weight: 700; color: var(--dim); margin: 10px 0 6px; display: block; }
.f-label.tiny { margin: 2px 0 2px; font-size: 11px; }

.stepper { display: flex; gap: 8px; align-items: center; }
.step-btn {
  flex: 1; min-height: 48px; background: var(--card2); border: 1px solid var(--line);
  color: var(--text); border-radius: 14px; font-size: 16px; font-weight: 800; cursor: pointer;
}
.step-btn:active { transform: scale(.96); }
.step-input {
  width: 110px; min-height: 48px; text-align: center;
  background: var(--card2); border: 1px solid var(--line); color: var(--text);
  border-radius: 14px; font-size: 18px; font-weight: 800; font-family: inherit;
}
.weight-input { width: 90px; min-height: 48px; text-align: center; background: var(--card2); border: 1px solid var(--line); color: var(--text); border-radius: 14px; font-size: 18px; font-weight: 800; }

.switch-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 12px 0; font-weight: 700; cursor: pointer;
}
.switch { appearance: none; width: 52px; height: 32px; border-radius: 999px; background: var(--card2); border: 1px solid var(--line); position: relative; cursor: pointer; transition: background .15s; }
.switch:checked { background: var(--pink); border-color: var(--pink); }
.switch::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px;
  background: #fff; border-radius: 50%; transition: left .15s;
}
.switch:checked::after { left: 23px; }

input[type="range"] { width: 100%; accent-color: var(--pink); height: 36px; }

/* ---------- шторки/оверлеи ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(5, 6, 8, .72);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadein .15s ease;
}
.modal-sheet {
  margin-bottom: 24px; align-self: center;
  max-width: 440px; width: calc(100% - 28px);
}
.sheet {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 22px; padding: 18px 16px calc(16px + env(safe-area-inset-bottom));
  max-height: 92vh; overflow-y: auto; width: 100%;
  max-width: 520px;
}
.full-sheet { border-radius: 22px 22px 0 0; }
.sheet-grab { width: 44px; height: 4px; background: var(--line); border-radius: 2px; margin: 0 auto 12px; }
.sheet-title { font-size: 20px; font-weight: 900; margin-bottom: 10px; }
.warnbox { color: var(--lime); border: 1px dashed rgba(198,255,77,.4); border-radius: 12px; padding: 8px 10px; margin-top: 6px; }

.emoji-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; padding: 6px 0 10px; }
.emoji-cell { background: var(--card2); border: 1px solid var(--line); border-radius: 12px; font-size: 22px; padding: 10px 0; }
.emoji-cell.active { border-color: var(--pink); }

/* ---------- профиль ---------- */
.workout-card { display: flex; flex-direction: column; gap: 8px; }
.workout-head { display: flex; align-items: center; gap: 6px; }
.workout-name { flex: 1; background: none; border: 0; color: var(--text); font-weight: 800; font-size: 17px; text-align: left; padding: 6px 2px; }
.ex-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: var(--card2); border: 1px solid var(--line); border-radius: 14px;
  padding: 10px 12px; cursor: pointer; color: var(--text); text-align: left;
}
.ex-row:active { transform: scale(.98); }
.ex-idx {
  width: 26px; height: 26px; border-radius: 8px; background: rgba(255, 77, 141, .15);
  color: var(--pink); font-weight: 800; font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ex-row-main { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ex-row-main b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.add-ex { border-style: dashed; }
.section-title { font-size: 17px; font-weight: 900; margin-top: 6px; }
.hist-row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.hist-row:last-child { border-bottom: 0; }
.hist-meta { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---------- игрок ---------- */
.player-view { gap: 12px; }
.ex-progress { color: var(--dim); font-size: 14px; font-weight: 700; }
.mini-bar { height: 5px; background: var(--card2); border-radius: 3px; margin-top: 6px; overflow: hidden; }
.mini-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--pink), var(--pink2)); border-radius: 3px; transition: width .3s; }

.ex-card { display: flex; flex-direction: column; gap: 14px; }
.ex-name { font-size: 26px; font-weight: 900; line-height: 1.2; }
.ex-note { background: var(--card2); border-radius: 12px; padding: 10px 12px; font-size: 14px; color: var(--dim); }
.next-hint { font-size: 14px; color: var(--dim); text-align: center; padding-top: 2px; }
.weight-row { display: flex; flex-direction: column; gap: 8px; }
.weight-label { font-size: 13px; font-weight: 700; color: var(--dim); }
.stepper .weight-input { width: 90px; }

/* ---------- оверлей отдыха ---------- */
.rest-overlay {
  position: fixed; inset: 0; z-index: 50;
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(255, 77, 141, .16), transparent 60%),
    radial-gradient(900px 420px at 50% 110%, rgba(198, 255, 77, .08), transparent 60%),
    var(--bg);
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(10px, 3dvh, 18px);
  padding: calc(12px + env(safe-area-inset-top)) max(18px, env(safe-area-inset-right))
    calc(12px + env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  overflow: auto;
  text-align: center;
}
.rest-overlay > * { flex-shrink: 0; }
.rest-top { align-self: stretch; display: flex; justify-content: space-between; align-items: center; margin-bottom: auto; }
.rest-digits {
  font-size: clamp(56px, min(25vw, 21dvh), 190px);
  font-weight: 900;
  color: var(--lime);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-shadow: 0 0 46px rgba(198, 255, 77, .35);
}
.rest-overlay.urgent .rest-digits { color: var(--pink); text-shadow: 0 0 46px rgba(255, 77, 141, .5); animation: pulse .5s infinite alternate; }
@keyframes pulse { from { transform: scale(1); } to { transform: scale(1.045); } }
.rest-bar { width: min(72vw, 340px); height: 8px; background: var(--card2); border-radius: 4px; overflow: hidden; }
.rest-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--lime), #e4ff8a); border-radius: 4px; transition: width .3s linear; }
.rest-overlay.urgent .rest-bar i { background: linear-gradient(90deg, var(--pink), var(--pink2)); }
.rest-next { font-size: 18px; font-weight: 800; max-width: 90%; overflow-wrap: anywhere; }
.rest-exname { font-size: 20px; font-weight: 900; color: var(--pink2); max-width: 90%; overflow-wrap: anywhere; }
.rest-phrase { color: var(--dim); font-size: 15px; max-width: 88%; }
.rest-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: min(100%, 320px); }
.rc-btn {
  min-height: clamp(56px, 11dvh, 84px); border-radius: 18px;
  background: var(--card); border: 1px solid var(--line); color: var(--text);
  font-size: 22px; font-weight: 900; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.rc-btn span { font-size: 12px; font-weight: 700; color: var(--dim); }
.rc-btn:active { transform: scale(.95); }
.rest-skip { width: min(100%, 260px); }
.rest-profile { margin-top: auto; }
.set-overlay .rest-skip { margin-bottom: auto; }

/* ---------- итоги ---------- */
.summary-view { align-items: center; text-align: center; padding-top: 30px; gap: 14px; }
.summary-hero { font-size: 64px; }
.summary-title { font-size: 34px; font-weight: 900; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; margin-top: 8px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 14px 6px; display: flex; flex-direction: column; gap: 3px;
}
.stat b { font-size: 22px; font-variant-numeric: tabular-nums; }
.award {
  background: linear-gradient(135deg, rgba(255, 77, 141, .16), rgba(198, 255, 77, .1));
  border: 1px solid rgba(255, 77, 141, .35);
  padding: 14px 18px; border-radius: 16px; font-weight: 800; font-size: 17px;
}

/* ---------- импорт-предпросмотр ---------- */
.iv-workout { display: flex; flex-direction: column; gap: 8px; }
.iv-ex { background: var(--card2); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.iv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; }
.iv-grid .input { padding: 8px 10px; font-size: 15px; }
.iv-name { padding: 10px 12px !important; }
.import-warn { margin-bottom: 8px; }

/* ---------- тост ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(30px + env(safe-area-inset-bottom));
  transform: translate(-50%, 20px);
  background: var(--card2); border: 1px solid var(--line);
  color: var(--text); padding: 12px 18px; border-radius: 14px;
  font-weight: 700; font-size: 14px; z-index: 60;
  opacity: 0; transition: all .25s ease; pointer-events: none;
  max-width: 88vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 700px) {
  .rest-overlay { border-radius: 0; }
}

/* ============================================================
   ПРЕМИУМ-3D: объёмные кнопки, стеклянные карты, extrude-цифры
   ============================================================ */
.btn, .rc-btn, .step-btn, .icon-btn, .emoji-cell {
  background: linear-gradient(180deg, #242a36 0%, #171b23 100%);
  border: 1px solid rgba(255, 255, 255, .07);
  box-shadow:
    0 12px 26px rgba(0, 0, 0, .5),
    inset 0 1px 0 rgba(255, 255, 255, .09),
    inset 0 -2px 6px rgba(0, 0, 0, .35);
}
.btn:active, .rc-btn:active, .step-btn:active, .icon-btn:active, .emoji-cell:active {
  transform: translateY(2px) scale(.98);
  box-shadow:
    0 4px 10px rgba(0, 0, 0, .5),
    inset 0 1px 0 rgba(255, 255, 255, .05),
    inset 0 -1px 4px rgba(0, 0, 0, .3);
}
.btn-primary {
  background: linear-gradient(180deg, #ff6ba0 0%, #ff2f6d 55%, #e82461 100%);
  border-color: rgba(255, 130, 175, .55);
  box-shadow:
    0 14px 30px rgba(255, 47, 109, .42),
    inset 0 1px 0 rgba(255, 255, 255, .4),
    inset 0 -3px 8px rgba(120, 0, 40, .4);
}
.btn-primary:active {
  box-shadow:
    0 6px 14px rgba(255, 47, 109, .3),
    inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn-ghost { background: linear-gradient(180deg, #1f242e 0%, #161a21 100%); }
.btn-danger {
  background: linear-gradient(180deg, #2a1417 0%, #1c1012 100%);
  border-color: rgba(255, 92, 92, .55);
}
.card {
  background: linear-gradient(180deg, #181c24 0%, #12151c 100%);
  border: 1px solid rgba(255, 255, 255, .06);
  box-shadow:
    0 16px 36px rgba(0, 0, 0, .45),
    inset 0 1px 0 rgba(255, 255, 255, .05);
}
.profile-card:active, .active-banner:active, .cal-card:active { transform: scale(.985); }
.sheet {
  background: linear-gradient(180deg, #181c24 0%, #12151c 100%);
  border: 1px solid rgba(255, 255, 255, .07);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.chip { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05); }

/* логотип теперь кнопка (открывает календарь) */
.logo {
  background: none; border: 0; color: var(--text); cursor: pointer;
  font-family: inherit; text-align: left; padding: 4px 0;
  font-weight: 900; font-size: 26px; letter-spacing: .04em; flex: 1;
}
.logo:active { opacity: .8; }

/* цифры отдыха — объёмный extrude */
.rest-digits {
  color: var(--lime);
  text-shadow:
    0 1px 0 #bfe34f,
    0 2px 0 #a3c339,
    0 3px 0 #8aa429,
    0 5px 8px rgba(0, 0, 0, .55),
    0 0 46px rgba(198, 255, 77, .4);
}
.rest-overlay.urgent .rest-digits {
  color: var(--pink);
  text-shadow:
    0 1px 0 #ff82ac,
    0 2px 0 #f5608f,
    0 3px 0 #d64379,
    0 5px 8px rgba(0, 0, 0, .55),
    0 0 46px rgba(255, 77, 141, .5);
}
.card.active-banner {
  color: var(--text);
  border-color: rgba(255, 77, 141, .55);
  background: linear-gradient(135deg, #2f1727, #18151e);
}
.btn:disabled { opacity: .45; cursor: default; }
button:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .view, .rest-overlay.urgent .rest-digits { animation: none; }
}

/* ============================================================
   КАЛЕНДАРЬ
   ============================================================ */
.cal-card {
  display: flex; align-items: center; gap: 14px; width: 100%; cursor: pointer;
  border-color: rgba(198, 255, 77, .22);
}
.cal-card .pc-emoji { font-size: 30px; }

.cal-card-main { padding: 14px; }
.cal-monthbar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.cal-title {
  flex: 1; text-align: center; font-weight: 900; font-size: 19px; letter-spacing: .02em;
}
.cal-today-btn { min-height: 34px; padding: 4px 12px; font-size: 12px; flex: 0 0 auto; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-wd {
  text-align: center; font-size: 11px; font-weight: 800; color: var(--dim);
  padding: 4px 0; text-transform: uppercase; letter-spacing: .05em;
}
.cal-day {
  position: relative; height: 46px; border-radius: 13px;
  background: linear-gradient(180deg, #1e232c 0%, #151920 100%);
  border: 1px solid rgba(255, 255, 255, .05);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .05);
  color: var(--text); font-weight: 700; font-size: 14px;
  cursor: pointer; font-family: inherit;
  transition: transform .06s ease;
}
.cal-day:active { transform: scale(.92); }
.cal-day .n { position: absolute; top: 6px; left: 7px; }
.cal-day .m { position: absolute; bottom: 4px; right: 5px; font-size: 11px; }
.cal-day .pdot {
  position: absolute; bottom: 6px; left: 7px; width: 5px; height: 5px;
  border-radius: 50%; background: var(--lime);
  box-shadow: 0 0 7px rgba(198, 255, 77, .9);
}
.cal-day.today {
  background: linear-gradient(160deg, rgba(255, 77, 141, .34) 0%, rgba(255, 77, 141, .1) 100%);
  border-color: rgba(255, 77, 141, .65);
  box-shadow: 0 8px 22px rgba(255, 77, 141, .32), inset 0 1px 0 rgba(255, 255, 255, .18);
  color: #fff;
}
.cal-day.has-plan { border-color: rgba(198, 255, 77, .4); }
.cal-day.empty { background: none; border: none; box-shadow: none; }

.cal-up-list { display: flex; flex-direction: column; gap: 2px; }
.cal-up {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 11px 8px; background: none; border: 0; border-bottom: 1px solid var(--line);
  color: var(--text); text-align: left; cursor: pointer; font-family: inherit;
  border-radius: 10px;
}
.cal-up:last-child { border-bottom: 0; }
.cal-up:active { background: rgba(255, 255, 255, .04); }
.cal-up-date {
  font-weight: 800; font-size: 13px; color: var(--pink2);
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.cal-up-txt {
  font-size: 14px; font-weight: 600; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* шторка дня: пикер плана + метки */
.cal-sheet-head { margin-bottom: 4px; }
.pick-list {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 240px; overflow-y: auto;
  padding: 5px; border: 1px solid var(--line); border-radius: 14px;
  background: rgba(0, 0, 0, .18);
}
.pick-group {
  font-size: 12px; font-weight: 800; color: var(--dim);
  padding: 6px 8px 2px; text-transform: uppercase; letter-spacing: .04em;
}
.pick-item {
  text-align: left; padding: 11px 12px; border-radius: 12px;
  background: linear-gradient(180deg, #1e232c 0%, #161a21 100%);
  border: 1px solid var(--line); color: var(--text);
  font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}
.pick-item.active {
  border-color: var(--pink);
  background: rgba(255, 77, 141, .13);
  box-shadow: 0 0 0 1px var(--pink);
}
.cal-marker.active {
  border-color: var(--pink);
  color: var(--pink);
  background: rgba(255, 77, 141, .12);
}
.cal-start { margin-top: 12px; }

/* ---------- режимы главной ---------- */
.mode-hint {
  font-size: 11px; font-weight: 800; color: var(--dim);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 10px; white-space: nowrap;
  text-transform: uppercase; letter-spacing: .06em;
}
.logo:active + .mode-hint { opacity: .5; }

/* ---------- события: таймлайн-карточки ---------- */
.ev-list { display: flex; flex-direction: column; gap: 8px; }
.ev-card {
  position: relative; display: flex; align-items: stretch; gap: 10px;
  background: linear-gradient(180deg, #1d222b 0%, #161a21 100%);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 14px; padding: 10px 10px 10px 0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .05);
  overflow: hidden;
}
.ev-bar { width: 4px; border-radius: 0 4px 4px 0; flex: 0 0 4px; }
.cal-up .ev-bar { height: 34px; border-radius: 4px; }
.ev-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ev-title { font-size: 15px; line-height: 1.3; }
.ev-start {
  padding: 2px 8px !important; font-size: 12px !important;
  background: rgba(198, 255, 77, .12) !important; color: var(--lime) !important;
}

/* точки типов на ячейке дня */
.cal-dots { position: absolute; bottom: 6px; left: 7px; display: flex; gap: 3px; }
.cal-dots i { width: 5px; height: 5px; border-radius: 50%; box-shadow: 0 0 6px currentColor; }
.cal-day .pdot { display: none; }

/* счётчики месяца */
.cal-counters { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

/* сегодня: сейчас/далее */
.cal-today-card {
  background: linear-gradient(160deg, rgba(255, 77, 141, .12) 0%, rgba(198, 255, 77, .06) 100%);
  border-color: rgba(255, 77, 141, .3);
}
.cal-today-head { font-weight: 900; font-size: 15px; margin-bottom: 8px; letter-spacing: .02em; }
.now-line { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 15px; }
.now-tag {
  font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em;
  padding: 3px 8px; border-radius: 999px; color: #0c0e11; flex-shrink: 0;
}
.now-tag.dimtag { background: var(--card2); color: var(--dim); border: 1px solid var(--line); }

/* голова шторки: заголовок + кнопка справа */
.sheet-head-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.sheet-head-row .sheet-title { margin-bottom: 0; }

/* просмотр дня: выбранная карточка + большие часы */
.ev-card { cursor: pointer; }
.ev-card.selected {
  border-color: var(--pink);
  box-shadow: 0 0 0 1px var(--pink), 0 10px 24px rgba(255, 77, 141, .25);
}
.ev-side {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding-right: 2px; flex-shrink: 0;
}
.ev-clock {
  font-weight: 900; font-size: 17px; font-variant-numeric: tabular-nums;
  color: var(--lime); text-shadow: 0 0 12px rgba(198, 255, 77, .35);
}
.ev-now {
  padding: 2px 8px !important; font-size: 11px !important;
  background: rgba(198, 255, 77, .14) !important; color: var(--lime) !important;
}
