/* MNEME Today — главный экран как личная тёмная тетрадь.
   Этот файл подключается последним и держит единый визуальный язык:
   мягкая бумага, память, закладки, спокойные предметные акценты. */

:root {
  --mneme-night: #090f10;
  --mneme-ink: #0d1516;
  --mneme-panel: #121b1c;
  --mneme-panel-2: #172122;
  --mneme-paper: #f1e4cd;
  --mneme-paper-soft: #decaa5;
  --mneme-paper-muted: rgba(241, 228, 205, 0.62);
  --mneme-line: rgba(241, 228, 205, 0.1);
  --mneme-line-soft: rgba(241, 228, 205, 0.065);
  --mneme-teal: #2aa7a0;
  --mneme-teal-bright: #34c5bb;
  --mneme-green: #8edc78;
  --mneme-violet: #c397df;
  --mneme-amber: #e0aa5a;
  --mneme-red: #ed7d6f;
  --mneme-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
  --mneme-radius-xl: 28px;
  --mneme-radius-lg: 22px;
  --mneme-radius-md: 16px;
  --header-icon-size: 42px;
  --header-icon-bg:
    radial-gradient(circle at 50% 20%, rgba(241, 228, 205, 0.11), transparent 38%),
    rgba(9, 16, 17, 0.66);
  --header-icon-border: rgba(241, 228, 205, 0.14);
  --dock-h: 72px;
  --mic-size: 58px;
  --cradle-r: 35px;
  --cradle-y: 18px;
  --dock-clearance: calc(var(--dock-h) + 30px + env(safe-area-inset-bottom));
}

body {
  background:
    radial-gradient(circle at 50% -10%, rgba(50, 185, 176, 0.16), transparent 31rem),
    radial-gradient(circle at 86% 18%, rgba(224, 170, 90, 0.07), transparent 21rem),
    linear-gradient(180deg, #080c0d 0%, #0c1515 42%, #081010 100%) !important;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 50% 24%, rgba(241, 228, 205, 0.055), transparent 28rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 38%);
  content: '';
  pointer-events: none;
}

.screen-today {
  width: min(100%, 740px);
  padding-inline: clamp(14px, 4vw, 24px);
  gap: 20px;
}

:where(
    .action-icon,
    .stat-icon,
    .empty-icon,
    .task-check,
    .attention-check,
    .voice-fab-icon,
    .dock-tab,
    .header-notification-icon
  )
  svg
  [data-solid] {
  fill: rgba(241, 228, 205, 0.1);
  stroke: rgba(241, 228, 205, 0.22);
  stroke-width: 1.15;
}

:where(
    .action-icon,
    .stat-icon,
    .empty-icon,
    .task-check,
    .attention-check,
    .voice-fab-icon,
    .dock-tab,
    .header-notification-icon
  )
  svg
  [data-fill] {
  fill: currentColor;
  stroke: none;
  opacity: 0.92;
}

:where(
    .action-icon,
    .stat-icon,
    .empty-icon,
    .task-check,
    .attention-check,
    .voice-fab-icon,
    .dock-tab,
    .header-notification-icon
  )
  svg
  [data-accent] {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.35;
  opacity: 0.82;
}

.mneme-glyph {
  display: block;
  overflow: visible;
  fill: none;
  stroke: none;
}

.mneme-glyph [data-glyph-main] {
  fill: currentColor;
  stroke: none;
}

.mneme-glyph [data-glyph-soft] {
  fill: currentColor;
  stroke: none;
  opacity: 0.28;
}

.mneme-glyph [data-glyph-accent] {
  fill: var(--mneme-teal-bright);
  stroke: none;
}

.mneme-glyph [data-glyph-cut] {
  fill: rgba(7, 12, 13, 0.82);
  stroke: none;
}

.mneme-glyph [data-glyph-stroke] {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

/* -------------------------------------------------------------------------- */
/* Шапка                                                                      */
/* -------------------------------------------------------------------------- */

@media (max-width: 767px) {
  .app-main {
    padding-top: calc(74px + env(safe-area-inset-top));
    padding-bottom: calc(112px + env(safe-area-inset-bottom));
  }

  .mobile-header {
    right: 0;
    left: 0;
    display: flex;
    height: calc(70px + env(safe-area-inset-top));
    padding: calc(13px + env(safe-area-inset-top)) 16px 11px;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(241, 228, 205, 0.075);
    background:
      linear-gradient(180deg, rgba(241, 228, 205, 0.04), transparent 75%), rgba(7, 12, 13, 0.96);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(18px);
  }

  .mobile-header::after {
    right: 18px;
    bottom: 0;
    left: 18px;
    height: 1px;
    background: linear-gradient(
      90deg,
      transparent,
      rgba(241, 228, 205, 0.14),
      rgba(52, 197, 187, 0.36),
      rgba(241, 228, 205, 0.12),
      transparent
    );
  }

  .brand-lockup.compact {
    max-width: 156px;
    gap: 10px;
  }

  .brand-lockup.compact .brand-mark {
    width: 46px;
    height: 46px;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .brand-lockup.compact .brand-mark img {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    filter: drop-shadow(0 9px 13px rgba(0, 0, 0, 0.34));
  }

  .brand-lockup.compact .brand-sigil {
    display: block;
    width: 46px;
    height: 46px;
    overflow: visible;
    filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.34));
  }

  .brand-lockup.compact .brand-sigil-shadow {
    fill: rgba(0, 0, 0, 0.34);
    transform: translate(2px, 2px);
  }

  .brand-lockup.compact .brand-sigil-main {
    fill: #10191a;
    stroke: rgba(241, 228, 205, 0.74);
    stroke-linejoin: round;
    stroke-width: 2.6;
  }

  .brand-lockup.compact .brand-sigil-spine {
    fill: none;
    stroke: rgba(241, 228, 205, 0.36);
    stroke-linecap: round;
    stroke-width: 2.4;
  }

  .brand-lockup.compact .brand-sigil-memory {
    fill: var(--mneme-teal);
    filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.22));
  }

  .brand-lockup.compact .brand-sigil-paper {
    fill: var(--mneme-paper);
    filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.18));
  }

  .brand-lockup.compact strong {
    display: block;
    max-width: 96px;
    overflow: hidden;
    color: var(--mneme-paper);
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 760;
    letter-spacing: 0.01em;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand-lockup.compact small {
    display: none;
  }

  .mobile-header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
  }

  .header-notification-button {
    position: relative;
    top: auto;
    left: auto;
    display: grid;
    width: 42px;
    min-width: 42px;
    height: 44px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--mneme-paper);
    box-shadow: none;
    transform: none;
  }

  .header-notification-button::before {
    display: none;
  }

  .header-notification-button.has-items {
    border-color: transparent;
    background: transparent;
    color: var(--mneme-paper);
  }

  .header-notification-icon {
    display: grid;
    width: 35px;
    height: 35px;
    place-items: center;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .header-notification-button.has-items .header-notification-icon {
    background: transparent;
    box-shadow: none;
    color: inherit;
  }

  .header-notification-icon svg {
    display: block;
    width: 35px;
    height: 35px;
    overflow: visible;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.75;
  }

  .header-notification-icon svg [data-fill] {
    fill: var(--mneme-amber);
    stroke: none;
    opacity: 0.96;
  }

  .header-notification-icon svg [data-accent] {
    stroke: var(--mneme-amber);
    opacity: 0.95;
  }

  .header-notification-icon .mneme-glyph [data-glyph-main] {
    fill: var(--mneme-paper);
    filter: drop-shadow(0 7px 10px rgba(0, 0, 0, 0.32));
  }

  .header-notification-icon .mneme-glyph [data-glyph-soft] {
    fill: var(--mneme-paper);
    opacity: 0.24;
  }

  .header-notification-icon .mneme-glyph [data-glyph-accent] {
    fill: var(--mneme-amber);
  }

  .header-notification-text {
    display: none !important;
  }

  .header-notification-badge {
    top: -2px;
    right: -2px;
    min-width: 17px;
    height: 17px;
    border: 2px solid #0a1112;
    background: var(--mneme-amber);
    color: #2a1804;
    font-size: 9px;
    font-weight: 800;
  }

  .avatar-button {
    width: var(--header-icon-size);
    height: var(--header-icon-size);
    border: 1px solid var(--header-icon-border);
    border-radius: 50%;
    background: var(--header-icon-bg);
    color: var(--mneme-paper);
    box-shadow:
      0 10px 22px rgba(0, 0, 0, 0.28),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }

  .avatar-button img {
    width: calc(var(--header-icon-size) - 4px);
    height: calc(var(--header-icon-size) - 4px);
    border-radius: 50%;
    object-fit: cover;
  }
}

/* -------------------------------------------------------------------------- */
/* Хиро                                                                       */
/* -------------------------------------------------------------------------- */

.screen-today .today-cover {
  position: relative;
  display: grid;
  padding: 10px 0 0;
  justify-items: center;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

.screen-today .today-cover::before,
.screen-today .today-cover::after {
  display: none;
}

.screen-today .today-cover-copy {
  position: relative;
  z-index: 2;
  display: grid;
  width: 100%;
  min-height: clamp(168px, 27vw, 230px);
  padding-top: clamp(28px, 6vw, 50px);
  place-items: start center;
  align-content: start;
  gap: 6px;
}

.screen-today .today-cover-date {
  margin: 0;
  color: rgba(241, 228, 205, 0.64);
  font-size: clamp(17px, 4.3vw, 25px);
  font-weight: 520;
  line-height: 1.15;
  letter-spacing: -0.035em;
  text-shadow: 0 10px 24px rgba(0, 0, 0, 0.46);
}

.screen-today .today-cover h1 {
  margin: 0;
  max-width: 15ch;
  color: var(--mneme-paper);
  font-family: var(--font-display);
  font-size: clamp(36px, 9vw, 58px);
  font-weight: 780;
  line-height: 0.96;
  letter-spacing: -0.078em;
  text-shadow:
    0 13px 26px rgba(0, 0, 0, 0.42),
    0 1px 0 rgba(255, 255, 255, 0.08);
}

.screen-today .today-cover-art {
  display: none;
}

.screen-today .today-cover-art img {
  display: none;
}

.screen-today .today-thought-card {
  position: relative;
  z-index: 3;
  display: grid;
  width: 100%;
  margin-top: -4px;
  padding: 28px clamp(22px, 6vw, 44px) 24px;
  justify-items: center;
  gap: 18px;
  overflow: hidden;
  border: 1px solid rgba(120, 96, 60, 0.18);
  border-radius: 23px;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.3), transparent 17rem),
    linear-gradient(180deg, #f4ead9, #ebdcc3);
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.64);
}

.screen-today .today-thought-card::before {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 86% 28%, rgba(42, 167, 160, 0.08), transparent 9rem),
    linear-gradient(180deg, rgba(120, 96, 60, 0.035), transparent);
  content: '';
  pointer-events: none;
}

.screen-today .today-thought-ribbon {
  position: absolute;
  top: 0;
  right: clamp(30px, 8vw, 50px);
  width: 28px;
  height: 66px;
  background: linear-gradient(180deg, #35bdb4, #237f7b);
  box-shadow: -6px 8px 14px rgba(0, 0, 0, 0.12);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%);
}

.screen-today .today-thought-card textarea {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 52px;
  padding: 0 66px 0 0;
  border: 0;
  background: transparent;
  color: #5b5145;
  font: inherit;
  font-size: clamp(18px, 4.8vw, 22px);
  font-weight: 520;
  line-height: 1.35;
  resize: vertical;
  scrollbar-color: rgba(42, 167, 160, 0.45) transparent;
}

.screen-today .today-thought-card textarea:focus {
  outline: none;
}

.screen-today .today-thought-card textarea::placeholder {
  color: rgba(91, 81, 69, 0.56);
}

.screen-today .today-thought-card .btn {
  position: relative;
  z-index: 1;
  width: min(100%, 270px);
  min-height: 54px;
  justify-content: center;
  border: 1px solid rgba(5, 65, 63, 0.2);
  border-radius: 16px;
  background: linear-gradient(180deg, #35bbb3, #238f8a);
  color: #f7ead2;
  box-shadow:
    0 9px 19px rgba(8, 70, 67, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.screen-today .today-cover-example {
  display: none;
}

/* -------------------------------------------------------------------------- */
/* Общие листы / план дня                                                     */
/* -------------------------------------------------------------------------- */

.screen-today .today-sheet {
  position: relative;
  display: grid;
  padding: clamp(18px, 4vw, 24px);
  gap: 16px;
  overflow: hidden;
  border: 1px solid var(--mneme-line);
  border-radius: var(--mneme-radius-xl);
  background:
    radial-gradient(circle at 18% 4%, rgba(241, 228, 205, 0.055), transparent 18rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.026), transparent), rgba(18, 27, 28, 0.96);
  box-shadow:
    var(--mneme-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.screen-today .today-sheet::before {
  display: none;
}

.screen-today .today-sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 14px;
}

.screen-today .today-sheet-head h2,
.screen-today .today-mneme-note h2 {
  margin: 0;
  color: var(--mneme-paper);
  font-family: var(--font-display);
  font-size: clamp(28px, 6.8vw, 39px);
  font-weight: 760;
  line-height: 1;
  letter-spacing: -0.066em;
}

.screen-today .today-focus-row {
  display: grid;
  min-height: 56px;
  padding: 10px 13px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--mneme-line-soft);
  border-radius: 17px;
  background:
    linear-gradient(180deg, rgba(241, 228, 205, 0.045), rgba(241, 228, 205, 0.014)),
    rgba(8, 13, 14, 0.66);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.screen-today .today-focus-row::before {
  display: none;
}

.screen-today .today-focus-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--mneme-green);
  box-shadow:
    0 0 0 5px rgba(142, 220, 120, 0.1),
    0 0 18px rgba(142, 220, 120, 0.52);
}

.screen-today .today-focus-row.urgent .today-focus-dot {
  background: var(--mneme-amber);
  box-shadow:
    0 0 0 5px rgba(224, 170, 90, 0.12),
    0 0 18px rgba(224, 170, 90, 0.5);
}

.screen-today .today-focus-copy {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 10px;
}

.screen-today .today-focus-copy strong {
  overflow: hidden;
  color: var(--mneme-paper);
  font-size: 15px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen-today .today-focus-copy span {
  color: rgba(241, 228, 205, 0.62);
  font-size: 13px;
  white-space: nowrap;
}

.screen-today .today-focus-row .link-button {
  min-height: 32px;
  padding: 0 11px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--mneme-teal-bright);
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.screen-today .today-progress {
  display: grid;
  gap: 7px;
}

.screen-today .today-progress::before,
.screen-today .today-progress > span {
  height: 5px;
  border-radius: 999px;
}

.screen-today .today-progress::before {
  background: rgba(241, 228, 205, 0.075);
}

.screen-today .today-progress > span {
  background: linear-gradient(90deg, var(--mneme-teal-bright), var(--mneme-green));
}

.screen-today .today-progress small {
  color: rgba(241, 228, 205, 0.52);
  font-size: 12px;
}

.screen-today .today-agenda {
  display: grid;
  overflow: hidden;
  gap: 0;
  border: 1px solid var(--mneme-line-soft);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent), rgba(8, 13, 14, 0.52);
}

.screen-today .today-agenda-row {
  display: grid;
  min-height: 62px;
  padding: 0 14px;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 0;
  border-top: 1px solid rgba(241, 228, 205, 0.07);
  border-radius: 0;
  background: transparent;
  color: var(--mneme-paper);
  text-align: left;
}

.screen-today .today-agenda-row:first-child {
  border-top: 0;
}

.screen-today .today-agenda-time {
  color: var(--mneme-teal-bright);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 680;
  letter-spacing: -0.05em;
}

.screen-today .today-agenda-row:nth-child(2) .today-agenda-time {
  color: var(--mneme-amber);
}

.screen-today .today-agenda-row:nth-child(3) .today-agenda-time {
  color: var(--mneme-violet);
}

.screen-today .today-agenda-row strong {
  display: block;
  overflow: hidden;
  color: var(--mneme-paper);
  font-size: 17px;
  font-weight: 680;
  line-height: 1.16;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen-today .today-agenda-status {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(42, 167, 160, 0.12);
  color: var(--mneme-teal-bright);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.screen-today .today-agenda-row:nth-child(n + 2) .today-agenda-status {
  background: rgba(224, 170, 90, 0.12);
  color: var(--mneme-amber);
}

.screen-today .today-agenda-row.done .today-agenda-status {
  background: rgba(142, 220, 120, 0.12);
  color: var(--mneme-green);
}

.screen-today .today-empty-line {
  display: grid;
  min-height: 92px;
  padding: 18px;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  border: 1px solid var(--mneme-line-soft);
  border-radius: 18px;
  background:
    radial-gradient(circle at 10% 40%, rgba(42, 167, 160, 0.11), transparent 8rem),
    rgba(8, 13, 14, 0.45);
}

.screen-today .today-empty-mark {
  width: 38px;
  height: 46px;
  border: 1px solid rgba(241, 228, 205, 0.2);
  border-radius: 10px 10px 4px 4px;
  background:
    linear-gradient(145deg, rgba(241, 228, 205, 0.24), transparent 42%),
    linear-gradient(160deg, #34c5bb 0 56%, #decaa5 56% 100%);
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.26),
    0 0 0 6px rgba(52, 197, 187, 0.08);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 77%, 0 100%);
}

.screen-today .today-empty-line strong {
  display: block;
  color: var(--mneme-paper);
  font-size: 16px;
}

.screen-today .today-empty-line small {
  color: rgba(241, 228, 205, 0.55);
  font-size: 13px;
  line-height: 1.45;
}

.screen-today .today-action-row {
  display: grid;
  margin-top: 2px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.screen-today .today-action-row .btn,
.screen-today .today-action-row .btn:last-child {
  min-height: 56px;
  justify-content: center;
  border-radius: 16px;
}

.screen-today .today-action-row .btn.primary {
  border: 1px solid rgba(52, 197, 187, 0.34);
  background: linear-gradient(180deg, #35bdb4, #218d88);
  color: #f7ead2;
}

.screen-today .today-action-row .btn.ghost {
  border: 1px solid rgba(241, 228, 205, 0.1);
  background: linear-gradient(180deg, rgba(241, 228, 205, 0.08), rgba(241, 228, 205, 0.035));
  color: var(--mneme-paper);
}

/* -------------------------------------------------------------------------- */
/* Карманы                                                                    */
/* -------------------------------------------------------------------------- */

.screen-today .today-pockets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.screen-today .today-pocket {
  position: relative;
  display: grid;
  min-height: 142px;
  padding: 17px 18px 16px;
  grid-template-columns: 54px minmax(0, 1fr) 12px;
  grid-template-rows: auto auto auto;
  align-content: end;
  align-items: center;
  gap: 3px 12px;
  overflow: hidden;
  border: 1px solid var(--mneme-line);
  border-radius: 20px;
  background:
    radial-gradient(
      circle at 24% 16%,
      color-mix(in srgb, var(--pocket) 18%, transparent),
      transparent 4.5rem
    ),
    linear-gradient(180deg, rgba(241, 228, 205, 0.045), rgba(241, 228, 205, 0.012)),
    rgba(18, 27, 28, 0.95);
  color: var(--mneme-paper);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
  text-align: left;
}

.screen-today .today-pocket::before {
  display: none;
}

.screen-today .today-pocket-asset {
  grid-row: 1 / 4;
  align-self: center;
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.24));
}

.screen-today .today-pocket-name,
.screen-today .today-pocket small,
.screen-today .today-pocket strong {
  grid-column: 2;
  min-width: 0;
}

.screen-today .today-pocket-name {
  overflow: hidden;
  color: var(--mneme-paper);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen-today .today-pocket small {
  color: rgba(241, 228, 205, 0.52);
  font-size: 13px;
  line-height: 1.2;
}

.screen-today .today-pocket strong {
  justify-self: start;
  color: var(--mneme-paper);
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 740;
  line-height: 1.05;
  letter-spacing: -0.055em;
  text-align: left;
}

.screen-today .today-pocket-tail {
  position: absolute;
  right: 18px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-top: 2px solid rgba(241, 228, 205, 0.46);
  border-right: 2px solid rgba(241, 228, 205, 0.46);
  transform: translateY(-50%) rotate(45deg);
}

/* -------------------------------------------------------------------------- */
/* Сегодня для тебя                                                           */
/* -------------------------------------------------------------------------- */

.screen-today .today-mneme-note {
  min-height: 206px;
  padding: 22px 80px 22px 24px;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: stretch;
  gap: 22px;
}

.screen-today .today-note-tag {
  display: grid;
  width: 60px;
  min-height: 160px;
  place-items: center;
  align-self: stretch;
  border: 1px solid rgba(120, 96, 60, 0.15);
  border-radius: 15px;
  background: linear-gradient(180deg, rgba(120, 96, 60, 0.08), transparent), #dac49d;
  color: #78644a;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 760;
  letter-spacing: 0.11em;
  text-orientation: mixed;
  transform: rotate(180deg);
  writing-mode: vertical-rl;
  box-shadow:
    0 10px 18px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

.screen-today .today-note-ribbon {
  position: absolute;
  top: 0;
  right: 34px;
  width: 34px;
  height: 86px;
  background: linear-gradient(180deg, rgba(241, 228, 205, 0.52), rgba(150, 164, 158, 0.36));
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%);
  opacity: 0.72;
}

.screen-today .today-note-copy {
  display: grid;
  align-content: center;
  gap: 10px;
  padding-right: 18px;
}

.screen-today .today-note-copy p {
  max-width: 38ch;
  color: rgba(241, 228, 205, 0.68);
  font-size: 18px;
  line-height: 1.45;
}

.screen-today .today-note-copy .link-button {
  justify-self: start;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--mneme-teal-bright);
  font-size: 16px;
  font-weight: 740;
}

.screen-today .today-insight-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.screen-today .insight-rating-actions {
  display: inline-flex;
  gap: 6px;
}

.screen-today .insight-rating {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid rgba(241, 228, 205, 0.16);
  border-radius: 999px;
  background: rgba(241, 228, 205, 0.06);
  color: rgba(241, 228, 205, 0.76);
  font: inherit;
  font-size: 13px;
  font-weight: 680;
}

.screen-today .insight-rating-thanks {
  color: rgba(241, 228, 205, 0.58);
  font-size: 13px;
}

/* -------------------------------------------------------------------------- */
/* Голос и нижний борд                                                        */
/* -------------------------------------------------------------------------- */

.voice-fab,
.voice-root.ready .voice-fab {
  bottom: calc(env(safe-area-inset-bottom) + 17px);
  width: var(--mic-size);
  height: var(--mic-size);
  border: 1px solid rgba(241, 228, 205, 0.18);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 20%, rgba(241, 228, 205, 0.25), transparent 34%),
    linear-gradient(180deg, #35bdb4, #218d88);
  color: #f8ead3;
  box-shadow:
    0 0 0 6px rgba(52, 197, 187, 0.11),
    0 14px 28px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.voice-fab-icon .mneme-glyph {
  width: 31px;
  height: 31px;
  color: #fff2d9;
  filter: drop-shadow(0 5px 9px rgba(0, 0, 0, 0.24));
}

.voice-fab-icon .mneme-glyph [data-glyph-main] {
  fill: #fff2d9;
}

.voice-fab-icon .mneme-glyph [data-glyph-soft] {
  fill: #fff2d9;
  opacity: 0.28;
}

.voice-fab-icon .mneme-glyph [data-glyph-accent] {
  fill: rgba(255, 242, 217, 0.76);
}

.voice-fab-icon .mneme-glyph [data-glyph-stroke] {
  stroke: #fff2d9;
  stroke-width: 2.25;
}

.voice-root.active .voice-fab,
.voice-root.recording .voice-fab {
  bottom: calc(env(safe-area-inset-bottom) + 17px);
  background:
    radial-gradient(circle at 32% 20%, rgba(241, 228, 205, 0.2), transparent 32%),
    linear-gradient(180deg, #ee7d6f, #bd473f);
  color: #fff0e8;
}

.dock {
  right: auto;
  bottom: calc(10px + env(safe-area-inset-bottom));
  left: 50%;
  width: min(calc(100vw - 28px), 520px);
  height: var(--dock-h);
  padding: 0;
  overflow: visible;
  border-radius: 999px;
  background: transparent;
  transform: translateX(-50%);
}

.dock-surface {
  inset: 0;
  overflow: hidden;
  border: 1px solid rgba(241, 228, 205, 0.11);
  border-radius: 999px;
  background:
    radial-gradient(circle at 15% 18%, rgba(241, 228, 205, 0.075), transparent 10rem),
    radial-gradient(circle at 50% 0, rgba(52, 197, 187, 0.12), transparent 8rem),
    linear-gradient(180deg, rgba(36, 44, 43, 0.98), rgba(18, 24, 24, 0.98));
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
  -webkit-mask-image: none;
  mask-image: none;
  backdrop-filter: blur(22px);
}

.dock-cradle {
  display: none;
}

.dock-slots {
  height: 100%;
  padding: 6px 12px;
  grid-template-columns: 1fr 1fr 74px 1fr 1fr;
}

.dock-tab {
  position: relative;
  height: 60px;
  gap: 4px;
  border-radius: 30px;
  background: transparent;
  color: rgba(241, 228, 205, 0.58);
  font-family: var(--font-ui, system-ui, sans-serif);
  transition:
    background 180ms var(--ease),
    color 180ms var(--ease),
    opacity 180ms var(--ease),
    transform 180ms var(--ease);
}

.dock-tab.active {
  background:
    radial-gradient(circle at 50% 12%, rgba(52, 197, 187, 0.18), transparent 78%),
    rgba(52, 197, 187, 0.075);
  color: var(--mneme-paper);
  opacity: 1;
  transform: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 8px 18px rgba(0, 0, 0, 0.16);
}

.dock-tab.active svg [data-fill] {
  fill: var(--mneme-teal-bright);
  opacity: 1;
}

.dock-tab.active svg [data-solid] {
  fill: none;
  stroke: var(--mneme-teal-bright);
}

.dock-tab.active svg [data-accent] {
  stroke: var(--mneme-teal-bright);
  opacity: 1;
}

.dock-tab .mneme-glyph [data-glyph-main] {
  fill: currentColor;
  opacity: 0.82;
  transition:
    fill 180ms var(--ease),
    opacity 180ms var(--ease),
    transform 180ms var(--ease);
}

.dock-tab .mneme-glyph [data-glyph-soft] {
  fill: currentColor;
  opacity: 0.24;
  transition: opacity 180ms var(--ease);
}

.dock-tab .mneme-glyph [data-glyph-accent] {
  fill: var(--mneme-teal-bright);
  opacity: 0.46;
  transition: opacity 180ms var(--ease);
}

.dock-tab .mneme-glyph [data-glyph-cut] {
  fill: rgba(7, 12, 13, 0.92);
}

.dock-tab.active .mneme-glyph [data-glyph-main] {
  fill: var(--mneme-paper);
  opacity: 1;
}

.dock-tab.active .mneme-glyph [data-glyph-soft] {
  fill: var(--mneme-paper);
  opacity: 0.28;
}

.dock-tab.active .mneme-glyph [data-glyph-accent] {
  fill: var(--mneme-teal-bright);
  opacity: 1;
}

.dock-tab.active::after {
  display: none;
  content: none;
}

.dock-tab svg {
  width: 30px;
  height: 30px;
  overflow: visible;
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.22));
}

.dock-tab span {
  font-family: var(--font-ui, system-ui, sans-serif);
  font-size: 10px;
  font-weight: 740;
  letter-spacing: 0;
}

/* -------------------------------------------------------------------------- */
/* Телефон                                                                    */
/* -------------------------------------------------------------------------- */

@media (max-width: 620px) {
  .screen-today {
    width: 100%;
    padding-inline: 14px;
    gap: 18px;
  }

  .screen-today .today-cover {
    padding-top: 0;
  }

  .screen-today .today-cover-copy {
    min-height: 178px;
    padding-top: 30px;
  }

  .screen-today .today-cover h1 {
    font-size: clamp(34px, 9.5vw, 44px);
  }

  .screen-today .today-cover-date {
    font-size: clamp(17px, 4.8vw, 22px);
  }

  .screen-today .today-cover-art {
    display: none;
  }

  .screen-today .today-cover-art img {
    display: none;
  }

  .screen-today .today-focus-row {
    min-height: auto;
    padding: 12px 13px;
  }

  .screen-today .today-focus-copy {
    display: grid;
    gap: 3px;
  }

  .screen-today .today-focus-row .link-button {
    padding-right: 0;
  }

  .screen-today .today-agenda-row {
    min-height: 66px;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 10px;
  }

  .screen-today .today-agenda-row strong {
    font-size: 16px;
  }

  .screen-today .today-agenda-status {
    justify-self: start;
    grid-column: 2;
    margin-top: -8px;
    padding: 4px 9px;
    font-size: 12px;
  }

  .screen-today .today-pockets {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .screen-today .today-pocket {
    min-height: 126px;
    padding: 14px 9px 13px;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
    justify-items: center;
    align-content: center;
    gap: 5px;
    text-align: center;
  }

  .screen-today .today-pocket-asset,
  .screen-today .today-pocket-name,
  .screen-today .today-pocket small,
  .screen-today .today-pocket strong {
    grid-column: 1;
    grid-row: auto;
    justify-self: center;
    text-align: center;
  }

  .screen-today .today-pocket-asset {
    width: 46px;
    height: 46px;
  }

  .screen-today .today-pocket-name {
    max-width: 100%;
    overflow: visible;
    font-size: 14px;
    text-overflow: clip;
    white-space: normal;
  }

  .screen-today .today-pocket small {
    display: none;
  }

  .screen-today .today-pocket strong {
    max-width: 100%;
    overflow: hidden;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .screen-today .today-pocket-tail {
    display: none;
  }
}

@media (max-width: 420px) {
  .screen-today {
    padding-inline: 12px;
  }

  .screen-today .today-cover-copy {
    min-height: 170px;
  }

  .screen-today .today-cover-art {
    display: none;
  }

  .screen-today .today-thought-card {
    margin-top: -4px;
    padding: 26px 18px 20px;
    border-radius: 22px;
  }

  .screen-today .today-thought-card textarea {
    padding-right: 56px;
    font-size: 18px;
  }

  .screen-today .today-sheet {
    padding: 18px;
    border-radius: 24px;
  }

  .screen-today .today-focus-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
  }

  .screen-today .today-focus-row .link-button {
    font-size: 12px;
  }

  .screen-today .today-action-row {
    gap: 10px;
  }

  .screen-today .today-action-row .btn {
    min-height: 52px;
    font-size: 12px;
  }

  .screen-today .today-mneme-note {
    min-height: 208px;
    padding: 18px 58px 18px 18px;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 15px;
  }

  .screen-today .today-note-tag {
    width: 48px;
    min-height: 172px;
    font-size: 13px;
  }

  .screen-today .today-note-ribbon {
    right: 24px;
    width: 30px;
    height: 74px;
  }

  .screen-today .today-note-copy {
    padding-right: 12px;
  }

  .screen-today .today-note-copy p {
    font-size: 16px;
  }
}

/* -------------------------------------------------------------------------- */
/* План — первый перенос зафиксированного языка Today                          */
/* -------------------------------------------------------------------------- */

.screen-plan {
  width: min(100%, 740px);
  padding-inline: clamp(14px, 4vw, 24px);
  gap: 18px;
}

.plan-page {
  display: grid;
  gap: 18px;
}

.plan-cover-note,
.plan-paper,
.screen-plan .plan-alert {
  border: 1px solid rgba(241, 228, 205, 0.12);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.plan-cover-note {
  position: relative;
  display: grid;
  min-height: 242px;
  padding: 24px 20px 20px;
  align-content: space-between;
  gap: 22px;
  overflow: hidden;
  border-radius: 30px;
  background:
    radial-gradient(circle at 88% 0%, rgba(52, 197, 187, 0.16), transparent 14rem),
    radial-gradient(circle at 0% 100%, rgba(224, 170, 90, 0.08), transparent 13rem),
    linear-gradient(180deg, rgba(30, 40, 40, 0.96), rgba(14, 22, 23, 0.96));
}

.plan-cover-note::before {
  position: absolute;
  top: 0;
  right: 34px;
  width: 36px;
  height: 88px;
  background: linear-gradient(180deg, var(--mneme-teal-bright), #238d88);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 76%, 0 100%);
  content: '';
  opacity: 0.9;
}

.screen-plan .plan-date-switcher {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(100%, 460px);
  max-width: 100%;
  margin: 0 auto -2px;
  padding: 7px;
  grid-template-columns: 46px minmax(0, 1fr) 46px;
  align-items: center;
  justify-self: center;
  gap: 8px;
  border: 1px solid rgba(241, 228, 205, 0.12);
  border-radius: 999px;
  background: rgba(6, 11, 12, 0.52);
  color: var(--mneme-paper);
  text-align: center;
  backdrop-filter: blur(16px);
}

.screen-plan .plan-date-floating {
  justify-self: center;
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.screen-plan .plan-date-switcher .icon-button {
  width: 46px;
  min-width: 46px;
  height: 42px;
  border: 1px solid rgba(241, 228, 205, 0.08);
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 0%, rgba(52, 197, 187, 0.14), transparent 72%),
    rgba(241, 228, 205, 0.045);
  color: rgba(241, 228, 205, 0.82);
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1;
}

.screen-plan .plan-date-switcher strong {
  display: block;
  overflow: hidden;
  font-family: var(--font-ui, system-ui, sans-serif);
  font-size: 15px;
  font-weight: 760;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.screen-plan .plan-date-switcher small {
  display: block;
  margin-top: 2px;
  color: var(--mneme-paper-muted);
  font-size: 12px;
}

.plan-cover-copy {
  position: relative;
  z-index: 1;
  display: grid;
  max-width: 392px;
  gap: 8px;
}

.plan-eyebrow,
.screen-plan .eyebrow {
  color: var(--mneme-teal-bright);
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.screen-plan .eyebrow::before {
  display: none;
  content: none;
}

.plan-cover-copy h1 {
  margin: 0;
  color: var(--mneme-paper);
  font-family: var(--font-display);
  font-size: clamp(38px, 8.8vw, 56px);
  font-weight: 780;
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.plan-cover-copy p {
  margin: 0;
  max-width: 34ch;
  color: rgba(241, 228, 205, 0.68);
  font-size: 16px;
  line-height: 1.42;
}

.plan-quick-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.plan-quick-stats span {
  display: grid;
  min-height: 78px;
  padding: 14px;
  align-content: end;
  gap: 4px;
  border: 1px solid rgba(241, 228, 205, 0.09);
  border-radius: 22px;
  background: rgba(6, 11, 12, 0.34);
}

.plan-quick-stats strong {
  color: var(--mneme-paper);
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.06em;
}

.plan-quick-stats small {
  color: var(--mneme-paper-muted);
  font-size: 12px;
}

.plan-paper {
  display: grid;
  padding: 20px;
  gap: 14px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(28, 37, 37, 0.96), rgba(17, 26, 27, 0.96));
}

.plan-toolbox {
  gap: 16px;
}

.plan-tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.plan-tool-card {
  --tool-ribbon-color: #34c5bb;
  position: relative;
  display: grid;
  min-height: 96px;
  padding: 16px 15px;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: end;
  gap: 12px;
  overflow: hidden;
  border: 1px solid rgba(241, 228, 205, 0.085);
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(52, 197, 187, 0.1), transparent 7rem),
    rgba(7, 13, 14, 0.42);
  color: var(--mneme-paper);
  text-align: left;
}

.plan-tool-card.reminder {
  --tool-ribbon-color: #e0aa5a;
}

.plan-tool-card.event {
  --tool-ribbon-color: #c79ee2;
}

.plan-tool-card.tasks {
  --tool-ribbon-color: #8edc78;
}

.plan-tool-card.calendar {
  --tool-ribbon-color: #5ba8ff;
}

.plan-tool-card.rhythm {
  --tool-ribbon-color: #d56b68;
}

.plan-tool-card.mneme {
  --tool-ribbon-color: #2aa7a0;
  border-color: rgba(52, 197, 187, 0.24);
  background:
    radial-gradient(circle at 100% 0%, rgba(52, 197, 187, 0.18), transparent 9rem),
    rgba(16, 51, 50, 0.46);
}

.plan-tool-ribbon {
  display: block;
  width: 31px;
  height: 42px;
  align-self: center;
  border-radius: 9px 9px 3px 3px;
  background:
    linear-gradient(
      145deg,
      rgba(241, 228, 205, 0.22),
      rgba(241, 228, 205, 0.03) 44%,
      transparent 56%
    ),
    var(--tool-ribbon-color);
  box-shadow:
    0 10px 20px rgba(0, 0, 0, 0.22),
    0 0 0 5px color-mix(in srgb, var(--mneme-teal-bright) 7%, transparent);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 77%, 0 100%);
}

.plan-tool-card strong {
  display: block;
  overflow: visible;
  color: var(--mneme-paper);
  font-size: 16px;
  font-weight: 820;
  line-height: 1.05;
  text-overflow: clip;
  white-space: normal;
}

.plan-tool-card small {
  display: block;
  overflow: visible;
  margin-top: 5px;
  max-width: 23ch;
  color: rgba(241, 228, 205, 0.55);
  font-size: 12px;
  line-height: 1.28;
  text-overflow: clip;
  white-space: normal;
}

.screen-plan .section-head {
  display: flex;
  margin: 0;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.screen-plan .section-head > div {
  min-width: 0;
}

.screen-plan .section-head h2 {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  color: var(--mneme-paper);
  font-family: var(--font-display);
  font-size: clamp(24px, 5.4vw, 32px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.screen-plan .link-button {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(52, 197, 187, 0.2);
  border-radius: 999px;
  background: rgba(52, 197, 187, 0.06);
  color: var(--mneme-teal-bright);
  font-size: 13px;
  font-weight: 760;
}

.screen-plan .status-badge {
  flex: 0 0 auto;
  border-color: rgba(241, 228, 205, 0.11);
  background: rgba(241, 228, 205, 0.045);
  color: rgba(241, 228, 205, 0.72);
  white-space: nowrap;
}

.screen-plan .plan-timeline {
  padding: 20px;
}

.screen-plan .plan-block {
  --plan-dot: var(--mneme-teal-bright);
  position: relative;
  display: grid;
  min-height: 82px;
  padding: 0;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(241, 228, 205, 0.075);
  border-radius: 22px;
  background: rgba(10, 17, 18, 0.5);
}

.screen-plan .plan-block::before {
  display: none;
}

.screen-plan .plan-block.task {
  --plan-dot: var(--mneme-green);
}

.screen-plan .plan-block.workout {
  --plan-dot: var(--mneme-violet);
}

.screen-plan .plan-block.conflict {
  --plan-dot: var(--mneme-amber);
  border-color: rgba(224, 170, 90, 0.34);
  background:
    linear-gradient(rgba(224, 170, 90, 0.075), rgba(224, 170, 90, 0.075)), rgba(10, 17, 18, 0.5);
}

.screen-plan .plan-block.completed {
  opacity: 0.64;
}

.screen-plan .plan-block-time {
  display: grid;
  padding: 14px 6px 14px 14px;
  align-content: center;
  gap: 5px;
}

.screen-plan .plan-block-time strong {
  color: var(--plan-dot);
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 780;
  line-height: 1;
  letter-spacing: -0.06em;
}

.screen-plan .plan-block-time small {
  color: rgba(241, 228, 205, 0.46);
  font-size: 11px;
}

.plan-block-open {
  display: grid;
  min-width: 0;
  padding: 13px 8px 13px 0;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  border: 0;
  background: transparent;
  color: var(--mneme-paper);
  text-align: left;
}

.plan-block-mark {
  display: block;
  width: 18px;
  height: 24px;
  justify-self: center;
  border: 1.7px solid var(--plan-dot);
  border-radius: 7px 7px 3px 3px;
  background: color-mix(in srgb, var(--plan-dot) 22%, transparent);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 76%, 0 100%);
}

.screen-plan .plan-block .item-main {
  min-width: 0;
}

.screen-plan .plan-block .item-main strong,
.screen-plan .plan-block .item-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen-plan .plan-block .item-main strong {
  color: var(--mneme-paper);
  font-size: 16px;
  font-weight: 780;
}

.screen-plan .plan-block.completed .item-main strong {
  text-decoration: none;
}

.screen-plan .plan-block .item-main small {
  margin-top: 4px;
  color: var(--mneme-paper-muted);
  font-size: 12px;
}

.plan-block-status {
  grid-column: 2;
  justify-self: start;
  margin-top: 7px;
  padding: 5px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--plan-dot) 13%, transparent);
  color: var(--plan-dot);
  font-size: 12px;
  font-weight: 760;
}

.screen-plan .plan-block-actions {
  display: flex;
  padding: 10px 10px 10px 0;
  align-items: center;
  gap: 7px;
}

.screen-plan .plan-check,
.screen-plan .plan-block-actions .icon-button {
  display: grid;
  width: 38px;
  min-width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 15px;
}

.screen-plan .plan-check {
  border: 1px solid rgba(142, 220, 120, 0.28);
  background: rgba(142, 220, 120, 0.12);
  color: var(--mneme-green);
}

.screen-plan .plan-block-actions .icon-button {
  border: 1px solid rgba(241, 228, 205, 0.09);
  background: rgba(241, 228, 205, 0.04);
  color: var(--mneme-paper-muted);
}

.screen-plan .plan-block svg {
  width: 20px;
  height: 20px;
}

.plan-empty-state {
  display: grid;
  min-height: 138px;
  padding: 18px;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 15px;
  border: 1px dashed rgba(241, 228, 205, 0.16);
  border-radius: 24px;
  background:
    radial-gradient(circle at 10% 40%, rgba(52, 197, 187, 0.12), transparent 8rem),
    linear-gradient(90deg, rgba(213, 107, 104, 0.07), transparent 42%), rgba(8, 13, 14, 0.45);
}

.plan-empty-mark {
  display: block;
  width: 38px;
  height: 46px;
  border: 1px solid rgba(241, 228, 205, 0.18);
  border-radius: 10px 10px 4px 4px;
  background:
    linear-gradient(145deg, rgba(241, 228, 205, 0.25), transparent 42%),
    linear-gradient(160deg, #34c5bb 0 56%, #decaa5 56% 100%);
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.26),
    0 0 0 6px rgba(52, 197, 187, 0.08);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 77%, 0 100%);
}

.plan-empty-state strong {
  display: block;
  color: var(--mneme-paper);
  font-size: 18px;
  font-weight: 820;
}

.plan-empty-state small {
  display: block;
  margin-top: 6px;
  color: rgba(241, 228, 205, 0.58);
  font-size: 14px;
  line-height: 1.36;
}

.plan-empty-actions {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.plan-empty-actions .btn {
  min-height: 48px;
  justify-content: center;
  border-radius: 17px;
}

.plan-action-grid {
  display: grid;
  padding-top: 4px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.plan-action-grid .btn {
  min-height: 54px;
  justify-content: center;
  border-radius: 18px;
}

.plan-link-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.plan-link-card {
  display: grid;
  min-height: 92px;
  padding: 16px;
  align-content: end;
  gap: 5px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 90% 0%, rgba(52, 197, 187, 0.12), transparent 9rem),
    rgba(18, 26, 27, 0.92);
  color: var(--mneme-paper);
  text-align: left;
}

.plan-link-card span {
  color: var(--mneme-teal-bright);
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.plan-link-card strong {
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1;
  letter-spacing: -0.055em;
}

.screen-plan .plan-alert {
  display: grid;
  padding: 16px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-color: rgba(224, 170, 90, 0.28);
  border-radius: 22px;
  background: rgba(224, 170, 90, 0.08);
}

.screen-plan .empty-state {
  border: 1px dashed rgba(241, 228, 205, 0.16);
  border-radius: 22px;
  background: rgba(241, 228, 205, 0.025);
}

@media (max-width: 620px) {
  .screen-plan {
    width: 100%;
    padding-inline: 14px;
  }

  .plan-cover-note {
    min-height: 226px;
    padding: 18px;
    border-radius: 28px;
  }

  .plan-cover-copy h1 {
    font-size: clamp(38px, 11vw, 52px);
  }

  .plan-cover-copy p {
    font-size: 15px;
  }

  .screen-plan .plan-block {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .screen-plan .plan-block-actions {
    padding: 0 12px 12px 84px;
    grid-column: 1 / -1;
    justify-content: start;
  }

  .plan-tool-grid,
  .plan-action-grid,
  .plan-link-row {
    grid-template-columns: 1fr;
  }

  .plan-tool-card {
    min-height: 86px;
  }
}

@media (max-width: 420px) {
  .screen-plan .plan-date-switcher {
    padding: 6px;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
  }

  .screen-plan .plan-date-switcher .icon-button {
    width: 42px;
    min-width: 42px;
    height: 38px;
    font-size: 28px;
  }

  .plan-quick-stats {
    gap: 8px;
  }

  .plan-quick-stats span {
    min-height: 70px;
    padding: 12px;
  }

  .screen-plan .plan-paper {
    padding: 16px;
    border-radius: 25px;
  }

  .screen-plan .section-head {
    align-items: start;
  }

  .screen-plan .section-head .status-badge {
    max-width: 112px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .screen-plan .plan-block .item-main strong {
    font-size: 15px;
  }
}

/* -------------------------------------------------------------------------- */
/* Финансы и заметки — перенос нового языка MNEME                              */
/* -------------------------------------------------------------------------- */

.screen-finance,
.screen-notes {
  width: min(100%, 740px);
  padding-inline: clamp(14px, 4vw, 24px);
  gap: 18px;
}

.finance-page,
.notes-page {
  display: grid;
  gap: 18px;
}

.finance-cover-note,
.notes-cover-note,
.finance-paper,
.notes-paper,
.notes-capture-card {
  border: 1px solid rgba(241, 228, 205, 0.12);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.finance-cover-note,
.notes-cover-note {
  position: relative;
  display: grid;
  min-height: 266px;
  padding: 24px 20px 20px;
  align-content: space-between;
  gap: 22px;
  overflow: hidden;
  border-radius: 30px;
}

.finance-cover-note {
  background:
    radial-gradient(circle at 86% 6%, rgba(142, 220, 120, 0.14), transparent 14rem),
    radial-gradient(circle at 0% 100%, rgba(224, 170, 90, 0.08), transparent 13rem),
    linear-gradient(180deg, rgba(30, 40, 39, 0.96), rgba(14, 22, 22, 0.96));
}

.finance-cover-note.negative {
  background:
    radial-gradient(circle at 86% 6%, rgba(213, 107, 104, 0.14), transparent 14rem),
    radial-gradient(circle at 0% 100%, rgba(224, 170, 90, 0.08), transparent 13rem),
    linear-gradient(180deg, rgba(34, 36, 35, 0.96), rgba(16, 22, 22, 0.96));
}

.notes-cover-note {
  background:
    radial-gradient(circle at 88% 2%, rgba(199, 158, 226, 0.14), transparent 14rem),
    radial-gradient(circle at 0% 100%, rgba(52, 197, 187, 0.11), transparent 13rem),
    linear-gradient(180deg, rgba(30, 39, 40, 0.96), rgba(14, 22, 23, 0.96));
}

.finance-cover-note::before,
.notes-cover-note::before,
.notes-capture-ribbon {
  position: absolute;
  top: 0;
  right: 18px;
  width: 34px;
  height: 88px;
  background: linear-gradient(180deg, var(--mneme-teal-bright), #238d88);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 76%, 0 100%);
  content: '';
  opacity: 0.9;
}

.notes-cover-note::before {
  background: linear-gradient(180deg, #c79ee2, #7f65a8);
}

.finance-cover-copy,
.notes-cover-copy {
  position: relative;
  z-index: 1;
  display: grid;
  max-width: 390px;
  gap: 8px;
}

.finance-eyebrow,
.notes-eyebrow,
.screen-finance .eyebrow,
.screen-notes .eyebrow {
  color: var(--mneme-teal-bright);
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.screen-finance .eyebrow::before,
.screen-notes .eyebrow::before {
  display: none;
  content: none;
}

.finance-cover-copy h1,
.notes-cover-copy h1 {
  margin: 0;
  color: var(--mneme-paper);
  font-family: var(--font-display);
  font-size: clamp(38px, 8.6vw, 56px);
  font-weight: 780;
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.finance-cover-copy p,
.notes-cover-copy p {
  margin: 0;
  max-width: 35ch;
  color: rgba(241, 228, 205, 0.68);
  font-size: 16px;
  line-height: 1.42;
}

.finance-cover-asset,
.notes-cover-asset {
  position: absolute;
  right: 18px;
  bottom: 8px;
  width: 138px;
  max-width: 32%;
  opacity: 0.96;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.34));
  transform: rotate(-4deg);
}

.notes-cover-asset {
  width: 126px;
  bottom: 16px;
  opacity: 1;
  filter: brightness(1.18) saturate(1.08) drop-shadow(0 18px 24px rgba(0, 0, 0, 0.3));
  transform: rotate(3deg);
}

.finance-balance-slip,
.notes-count-slip {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(100%, 330px);
  min-height: 104px;
  padding: 16px;
  align-content: end;
  gap: 4px;
  border: 1px solid rgba(241, 228, 205, 0.09);
  border-radius: 24px;
  background: rgba(6, 11, 12, 0.4);
}

.finance-balance-slip span,
.finance-balance-slip small,
.notes-count-slip small {
  color: rgba(241, 228, 205, 0.58);
  font-size: 12px;
  font-weight: 760;
}

.finance-balance-slip strong,
.notes-count-slip strong {
  color: var(--mneme-paper);
  font-family: var(--font-display);
  font-size: clamp(32px, 7vw, 46px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.finance-balance-slip.positive strong {
  color: #8edc78;
}

.finance-balance-slip.negative strong {
  color: #ff8c7e;
}

.finance-action-row,
.notes-action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.finance-action-row .btn,
.notes-action-row .btn {
  min-height: 56px;
  justify-content: center;
  border-radius: 19px;
}

.finance-flow-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.finance-flow-card,
.finance-paper,
.notes-paper,
.notes-capture-card {
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(28, 37, 37, 0.96), rgba(17, 26, 27, 0.96));
}

.finance-flow-card {
  display: grid;
  min-height: 130px;
  padding: 18px;
  align-content: end;
  gap: 6px;
  border: 1px solid rgba(241, 228, 205, 0.1);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.finance-flow-card small,
.finance-flow-card span {
  color: rgba(241, 228, 205, 0.54);
  font-size: 12px;
}

.finance-flow-card strong {
  color: var(--mneme-paper);
  font-family: var(--font-display);
  font-size: clamp(28px, 6vw, 38px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.finance-flow-card.income strong {
  color: #8edc78;
}

.finance-flow-card.expense strong {
  color: #ff8c7e;
}

.finance-paper,
.notes-paper {
  display: grid;
  padding: 20px;
  gap: 14px;
}

.screen-finance .section-head,
.screen-notes .section-head {
  display: flex;
  margin: 0;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.screen-finance .section-head > div,
.screen-notes .section-head > div {
  min-width: 0;
}

.screen-finance .section-head h2,
.screen-notes .section-head h2 {
  margin: 4px 0 0;
  color: var(--mneme-paper);
  font-family: var(--font-display);
  font-size: clamp(25px, 5.6vw, 34px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.screen-finance .link-button,
.screen-notes .link-button {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(52, 197, 187, 0.2);
  border-radius: 999px;
  background: rgba(52, 197, 187, 0.06);
  color: var(--mneme-teal-bright);
  font-size: 13px;
  font-weight: 760;
}

.finance-transaction-list,
.memory-note-list {
  display: grid;
  gap: 10px;
}

.finance-transaction,
.memory-note-item {
  position: relative;
  display: grid;
  min-height: 84px;
  padding: 14px;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  overflow: hidden;
  border: 1px solid rgba(241, 228, 205, 0.075);
  border-radius: 22px;
  background: rgba(10, 17, 18, 0.5);
  color: var(--mneme-paper);
  text-align: left;
}

.finance-transaction::before,
.transaction-item::before {
  display: none;
}

.finance-transaction-ribbon,
.memory-note-ribbon,
.finance-empty-mark,
.notes-empty-mark {
  display: block;
  width: 31px;
  height: 42px;
  border-radius: 9px 9px 3px 3px;
  background:
    linear-gradient(
      145deg,
      rgba(241, 228, 205, 0.22),
      rgba(241, 228, 205, 0.03) 44%,
      transparent 56%
    ),
    #34c5bb;
  box-shadow:
    0 10px 20px rgba(0, 0, 0, 0.22),
    0 0 0 5px rgba(52, 197, 187, 0.07);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 77%, 0 100%);
}

.finance-transaction.expense .finance-transaction-ribbon {
  background:
    linear-gradient(
      145deg,
      rgba(241, 228, 205, 0.2),
      rgba(241, 228, 205, 0.03) 44%,
      transparent 56%
    ),
    #d56b68;
}

.finance-transaction.income .finance-transaction-ribbon {
  background:
    linear-gradient(
      145deg,
      rgba(241, 228, 205, 0.2),
      rgba(241, 228, 205, 0.03) 44%,
      transparent 56%
    ),
    #8edc78;
}

.finance-transaction .item-main,
.memory-note-item .item-main {
  min-width: 0;
}

.finance-transaction .item-main strong,
.memory-note-item .item-main strong {
  display: block;
  overflow: hidden;
  color: var(--mneme-paper);
  font-size: 16px;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-transaction .transaction-description,
.finance-transaction .transaction-date {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-transaction .transaction-description {
  margin-top: 5px;
  color: rgba(241, 228, 205, 0.56);
  font-size: 13px;
}

.finance-transaction .transaction-date {
  margin-top: 3px;
  color: rgba(241, 228, 205, 0.36);
  font-size: 11px;
}

.finance-transaction .amount {
  min-width: 90px;
  color: var(--mneme-paper);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 780;
  letter-spacing: -0.04em;
  text-align: right;
}

.finance-transaction.expense .amount {
  color: #ff8c7e;
}

.finance-transaction.income .amount {
  color: #8edc78;
}

.finance-report-card .report-balance {
  margin: 0;
  border-color: rgba(52, 197, 187, 0.18);
  border-radius: 22px;
  background: rgba(6, 11, 12, 0.34);
}

.finance-report-card .report-note {
  border-left: 0;
  border-radius: 18px;
  background: rgba(52, 197, 187, 0.06);
}

.finance-ledger {
  display: grid;
  gap: 10px;
}

.finance-ledger-row {
  display: grid;
  min-height: 78px;
  padding: 14px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 14px;
  border: 1px solid rgba(241, 228, 205, 0.08);
  border-radius: 20px;
  background: rgba(10, 17, 18, 0.42);
}

.finance-ledger-row span,
.finance-ledger-row small {
  color: rgba(241, 228, 205, 0.55);
}

.finance-ledger-row span {
  font-size: 13px;
  font-weight: 760;
}

.finance-ledger-row small {
  grid-column: 1 / -1;
  font-size: 12px;
}

.finance-ledger-row strong {
  color: var(--mneme-paper);
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.055em;
}

.finance-ledger-row.balance strong,
.finance-ledger-row.income strong {
  color: #8edc78;
}

.finance-ledger-row.balance.negative strong,
.finance-ledger-row.expense strong {
  color: #ff8c7e;
}

.finance-report-card .report-breakdown h3 {
  margin-top: 6px;
  color: var(--mneme-paper);
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.055em;
}

.finance-empty-state,
.notes-empty-state {
  display: grid;
  min-height: 112px;
  padding: 18px;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  border: 1px dashed rgba(241, 228, 205, 0.16);
  border-radius: 22px;
  background:
    radial-gradient(circle at 10% 40%, rgba(52, 197, 187, 0.11), transparent 8rem),
    rgba(241, 228, 205, 0.025);
}

.finance-empty-state strong,
.notes-empty-state strong {
  display: block;
  color: var(--mneme-paper);
  font-size: 16px;
}

.finance-empty-state small,
.notes-empty-state small {
  display: block;
  margin-top: 5px;
  color: rgba(241, 228, 205, 0.56);
  font-size: 13px;
  line-height: 1.4;
}

.notes-capture-card {
  position: relative;
  display: grid;
  min-height: 190px;
  padding: 22px;
  align-content: space-between;
  gap: 18px;
  overflow: hidden;
}

.notes-capture-ribbon {
  right: 18px;
  height: 76px;
  background: linear-gradient(180deg, #34c5bb, #238d88);
}

.notes-capture-card > div:first-of-type {
  padding-right: 56px;
}

.notes-capture-card h2 {
  margin: 0;
  max-width: 12ch;
  color: var(--mneme-paper);
  font-family: var(--font-display);
  font-size: clamp(30px, 7vw, 42px);
  line-height: 0.96;
  letter-spacing: -0.065em;
}

.notes-capture-card p {
  margin: 9px 0 0;
  max-width: 36ch;
  color: rgba(241, 228, 205, 0.62);
  line-height: 1.42;
}

.notes-search-field {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 58px;
  padding: 0 18px;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  border: 1px solid rgba(241, 228, 205, 0.1);
  border-radius: 999px;
  background:
    radial-gradient(circle at 0% 50%, rgba(52, 197, 187, 0.08), transparent 9rem),
    rgba(10, 17, 18, 0.56);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 12px 24px rgba(0, 0, 0, 0.16);
}

.notes-search-field .search-glyph {
  position: static !important;
  top: auto;
  left: auto;
  padding-left: 0;
  color: rgba(241, 228, 205, 0.56);
}

.notes-search-field input {
  height: 58px;
  min-width: 0;
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  background: transparent;
  color: var(--mneme-paper);
  outline: none;
}

.notes-kind-row {
  display: flex;
  overflow-x: auto;
  padding-bottom: 2px;
  gap: 8px;
  scrollbar-width: none;
}

.notes-kind-row::-webkit-scrollbar {
  display: none;
}

.notes-kind-row .chip {
  min-height: 38px;
  padding: 0 14px;
  flex: 0 0 auto;
  border-color: rgba(241, 228, 205, 0.09);
  background: rgba(10, 17, 18, 0.5);
  color: rgba(241, 228, 205, 0.6);
}

.notes-kind-row .chip.active {
  border-color: rgba(52, 197, 187, 0.26);
  background: rgba(52, 197, 187, 0.14);
  color: var(--mneme-paper);
}

.memory-note-item {
  min-height: 136px;
  padding: 18px;
  grid-template-columns: 58px minmax(0, 1fr) 24px;
  align-items: stretch;
  gap: 18px;
}

.memory-note-tag {
  display: grid;
  width: 54px;
  min-height: 112px;
  place-items: center;
  align-self: stretch;
  border: 1px solid rgba(120, 96, 60, 0.15);
  border-radius: 15px;
  background: linear-gradient(180deg, rgba(120, 96, 60, 0.08), transparent), #dac49d;
  color: #78644a;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 760;
  letter-spacing: 0.1em;
  text-orientation: mixed;
  transform: rotate(180deg);
  writing-mode: vertical-rl;
  box-shadow:
    0 10px 18px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

.memory-note-item .kind-badge {
  width: fit-content;
  min-height: 24px;
  margin-bottom: 8px;
  border-color: rgba(241, 228, 205, 0.08);
  background: rgba(241, 228, 205, 0.04);
}

.memory-note-item .note-content {
  display: -webkit-box;
  margin-top: 7px;
  overflow: hidden;
  color: rgba(241, 228, 205, 0.6);
  font-size: 13px;
  line-height: 1.42;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.memory-note-item .note-tags {
  display: flex;
  margin-top: 10px;
  flex-wrap: wrap;
  gap: 5px;
}

.memory-note-item .tag {
  border-color: rgba(52, 197, 187, 0.18);
  background: rgba(52, 197, 187, 0.07);
  color: var(--mneme-teal-bright);
}

.memory-note-item .item-tail {
  align-self: center;
  color: rgba(241, 228, 205, 0.45);
}

.notes-safe-note {
  margin-top: -4px;
}

@media (max-width: 620px) {
  .screen-finance,
  .screen-notes {
    width: 100%;
    padding-inline: 14px;
  }

  .finance-cover-note,
  .notes-cover-note {
    min-height: 250px;
    padding: 18px;
    border-radius: 28px;
  }

  .finance-cover-copy h1,
  .notes-cover-copy h1 {
    font-size: clamp(38px, 11vw, 52px);
  }

  .finance-cover-asset,
  .notes-cover-asset {
    width: 110px;
  }

  .finance-cover-asset {
    opacity: 0.86;
  }

  .notes-cover-asset {
    opacity: 1;
    filter: brightness(1.2) saturate(1.08) drop-shadow(0 16px 22px rgba(0, 0, 0, 0.28));
  }

  .finance-transaction {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .memory-note-item {
    grid-template-columns: 54px minmax(0, 1fr) 22px;
    gap: 14px;
  }

  .finance-transaction .amount {
    grid-column: 2;
    justify-self: start;
    text-align: left;
  }

  .memory-note-item .item-tail {
    grid-column: 3;
    justify-self: end;
    text-align: right;
  }
}

@media (max-width: 420px) {
  .screen-finance .section-head,
  .screen-notes .section-head {
    align-items: start;
  }

  .finance-paper,
  .notes-paper {
    padding: 16px;
    border-radius: 25px;
  }

  .notes-capture-card {
    padding: 18px;
    border-radius: 25px;
  }
}

/* -------------------------------------------------------------------------- */
/* MNEME Surface v04 — единый материал страниц, листов и всплывающих блоков    */
/* -------------------------------------------------------------------------- */

.screen {
  transition:
    filter 180ms var(--ease),
    opacity 180ms var(--ease),
    transform 180ms var(--ease);
}

body.modal-open .app-main,
body.voice-open .app-main {
  filter: blur(7px) saturate(0.82) brightness(0.76);
  pointer-events: none;
  transform: scale(0.992);
}

:where(
  .page-head,
  .card,
  .plan-cover-note,
  .plan-paper,
  .finance-cover-note,
  .notes-cover-note,
  .finance-paper,
  .notes-paper,
  .notes-capture-card,
  .finance-flow-card,
  .finance-transaction,
  .memory-note-item,
  .settings-group,
  .settings-item,
  .notification-item,
  .modal-sheet,
  .voice-panel
) {
  position: relative;
}

:where(
  .page-head,
  .card,
  .plan-cover-note,
  .plan-paper,
  .finance-cover-note,
  .notes-cover-note,
  .finance-paper,
  .notes-paper,
  .notes-capture-card,
  .finance-flow-card,
  .settings-group,
  .modal-sheet,
  .voice-panel
) {
  overflow: hidden;
  border-color: rgba(241, 228, 205, 0.115) !important;
  background:
    radial-gradient(circle at 14% 8%, rgba(241, 228, 205, 0.075), transparent 14rem),
    radial-gradient(circle at 94% 6%, rgba(52, 197, 187, 0.115), transparent 13rem),
    radial-gradient(circle at 10% 100%, rgba(195, 151, 223, 0.055), transparent 13rem),
    linear-gradient(180deg, rgba(31, 42, 42, 0.965), rgba(14, 23, 24, 0.965)) !important;
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.048) !important;
}

:where(.plan-toolbox, .notes-capture-card, .notification-intro) {
  background:
    radial-gradient(circle at 86% 0%, rgba(52, 197, 187, 0.18), transparent 12rem),
    radial-gradient(circle at 0% 100%, rgba(142, 220, 120, 0.07), transparent 12rem),
    linear-gradient(180deg, rgba(31, 43, 42, 0.97), rgba(14, 24, 24, 0.97)) !important;
}

:where(.finance-paper, .finance-flow-card, .finance-transaction, .finance-report-card) {
  background:
    radial-gradient(circle at 88% 0%, rgba(142, 220, 120, 0.12), transparent 12rem),
    radial-gradient(circle at 0% 88%, rgba(237, 125, 111, 0.065), transparent 12rem),
    linear-gradient(180deg, rgba(31, 42, 41, 0.965), rgba(13, 22, 23, 0.965)) !important;
}

:where(.notes-paper, .memory-note-item) {
  background:
    radial-gradient(circle at 92% 0%, rgba(195, 151, 223, 0.12), transparent 12rem),
    radial-gradient(circle at 0% 100%, rgba(52, 197, 187, 0.08), transparent 12rem),
    linear-gradient(180deg, rgba(31, 41, 42, 0.965), rgba(13, 22, 23, 0.965)) !important;
}

:where(
  .plan-tool-card,
  .finance-transaction,
  .memory-note-item,
  .settings-item,
  .notification-item
)::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.045), transparent 34%),
    radial-gradient(circle at 100% 0%, rgba(52, 197, 187, 0.09), transparent 7rem);
  content: '';
  opacity: 0.72;
  pointer-events: none;
}

:where(.plan-tool-card, .finance-transaction, .memory-note-item, .settings-item, .notification-item)
  > * {
  position: relative;
  z-index: 1;
}

/* Notes release hardening: the memory feed must be visible on the first phone
   screen. The hero keeps its identity, while the secondary capture card no
   longer behaves like a second full-screen cover. */
.notes-page {
  gap: 14px;
}

.notes-cover-note {
  min-height: 184px;
  padding: 20px;
  gap: 12px;
}

.notes-cover-copy h1 {
  font-size: clamp(36px, 8vw, 48px);
}

.notes-cover-copy p {
  max-width: 34ch;
  font-size: 14px;
}

.notes-cover-asset {
  width: 96px;
}

.notes-capture-card {
  min-height: 0;
  padding: 18px;
  gap: 14px;
}

.notes-capture-card > div:first-of-type {
  padding-right: 0;
}

.notes-capture-card h2 {
  max-width: none;
  font-size: clamp(27px, 6vw, 34px);
}

.notes-capture-card p {
  margin-top: 6px;
  font-size: 13px;
}

.notes-action-row .btn {
  min-height: 48px;
}

.notes-limit-hint {
  display: block;
  min-height: 0;
  margin-top: 6px;
  color: rgba(241, 228, 205, 0.5);
  font-size: 11px;
  line-height: 1.35;
}

.memory-note-item {
  min-height: 104px;
  padding: 14px;
  grid-template-columns: 44px minmax(0, 1fr) 22px;
  gap: 13px;
}

.memory-note-tag {
  width: 42px;
  min-height: 78px;
  font-size: 12px;
}

@media (max-width: 620px) {
  .notes-cover-note {
    min-height: 136px;
    padding: 16px;
    border-radius: 24px;
  }

  .notes-cover-copy {
    max-width: calc(100% - 92px);
    gap: 4px;
  }

  .notes-cover-copy h1 {
    font-size: clamp(34px, 10vw, 44px);
  }

  .notes-cover-copy p {
    display: -webkit-box;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .notes-cover-asset {
    width: 76px;
  }

  .notes-count-slip {
    padding: 8px 11px;
  }

  .notes-count-slip strong {
    font-size: 22px;
  }

  .notes-capture-card {
    padding: 15px;
    border-radius: 23px;
  }

  .notes-capture-card h2 {
    font-size: 25px;
  }

  .notes-search-field,
  .notes-search-field input {
    min-height: 50px;
    height: 50px;
  }

  .notes-kind-row .chip {
    min-height: 34px;
    padding-inline: 12px;
  }
}

@media (max-width: 420px) {
  .notes-page {
    gap: 10px;
  }

  .notes-cover-note {
    min-height: 108px;
    padding: 14px;
  }

  .notes-cover-copy {
    max-width: calc(100% - 76px);
  }

  .notes-cover-copy p {
    display: none;
  }

  .notes-cover-asset {
    width: 62px;
  }

  .notes-capture-card {
    padding: 12px;
  }

  .notes-capture-card > div:first-of-type {
    display: none;
  }

  .notes-action-row .btn {
    min-height: 44px;
    padding-inline: 10px;
    border-radius: 16px;
    font-size: 13px;
  }

  .notes-search-field,
  .notes-search-field input {
    min-height: 46px;
    height: 46px;
  }

  .notes-paper {
    padding: 14px;
  }
}

.plan-tool-card {
  background:
    radial-gradient(
      circle at 92% 8%,
      color-mix(in srgb, var(--tool-ribbon-color) 22%, transparent),
      transparent 7rem
    ),
    linear-gradient(150deg, rgba(241, 228, 205, 0.04), rgba(241, 228, 205, 0.012)),
    rgba(8, 14, 15, 0.5) !important;
}

.finance-flow-card.income {
  background:
    radial-gradient(circle at 86% 6%, rgba(142, 220, 120, 0.22), transparent 9rem),
    linear-gradient(180deg, rgba(31, 45, 38, 0.96), rgba(13, 22, 20, 0.96)) !important;
}

.finance-flow-card.expense {
  background:
    radial-gradient(circle at 86% 6%, rgba(237, 125, 111, 0.2), transparent 9rem),
    linear-gradient(180deg, rgba(48, 34, 32, 0.96), rgba(22, 15, 15, 0.96)) !important;
}

.finance-transaction.income {
  border-color: rgba(142, 220, 120, 0.12) !important;
}

.finance-transaction.expense {
  border-color: rgba(237, 125, 111, 0.13) !important;
}

.notes-search-field {
  background:
    radial-gradient(circle at 0% 50%, rgba(52, 197, 187, 0.1), transparent 10rem),
    radial-gradient(circle at 100% 50%, rgba(195, 151, 223, 0.06), transparent 8rem),
    rgba(10, 17, 18, 0.62) !important;
}

.screen-more {
  width: min(100%, 740px);
  padding-inline: clamp(14px, 4vw, 24px);
  gap: 18px;
}

.screen-more .page-head {
  min-height: 174px;
  padding: 22px;
  align-content: end;
  border: 1px solid rgba(241, 228, 205, 0.12);
  border-radius: 30px;
}

.screen-more .page-head h1 {
  color: var(--mneme-paper);
  font-family: var(--font-display);
  font-size: clamp(42px, 10vw, 60px);
  line-height: 0.94;
  letter-spacing: -0.075em;
}

.screen-more .page-status {
  max-width: 34ch;
  color: rgba(241, 228, 205, 0.64);
  font-size: 15px;
  line-height: 1.38;
}

.screen-more .settings-group {
  display: grid;
  padding: 20px;
  gap: 14px;
  border-radius: 28px;
}

.screen-more .settings-group h2,
.screen-more .settings-group .section-head h2 {
  margin: 0;
  color: var(--mneme-paper);
  font-family: var(--font-display);
  font-size: clamp(26px, 6vw, 34px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.screen-more .settings-list {
  display: grid;
  gap: 9px;
}

.screen-more .settings-item {
  min-height: 74px;
  padding: 13px 14px;
  border: 1px solid rgba(241, 228, 205, 0.08);
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(52, 197, 187, 0.08), transparent 8rem),
    rgba(8, 14, 15, 0.46) !important;
}

.screen-more .settings-copy strong {
  color: var(--mneme-paper);
  font-weight: 820;
}

.screen-more .settings-copy small {
  margin-top: 3px;
  color: rgba(241, 228, 205, 0.55);
}

.screen-more .tariff-card,
.screen-more .companion-card {
  border-radius: 28px;
}

/* Bottom sheets: не перекрывают нижнюю панель и ощущаются как лист MNEME. */
.modal-backdrop {
  z-index: 38 !important;
  align-items: flex-end !important;
  justify-content: center !important;
  padding: 16px 14px var(--dock-clearance) !important;
  background:
    radial-gradient(circle at 50% 76%, rgba(52, 197, 187, 0.13), transparent 20rem),
    rgba(2, 5, 6, 0.58) !important;
  backdrop-filter: blur(16px) saturate(0.86) !important;
}

.modal-sheet {
  width: min(540px, 100%) !important;
  max-height: min(760px, calc(100dvh - var(--dock-clearance) - 26px)) !important;
  border: 1px solid rgba(241, 228, 205, 0.13) !important;
  border-radius: 30px 30px 24px 24px !important;
  transform-origin: 50% 100%;
}

.modal-sheet::before {
  position: absolute;
  top: 10px;
  left: 50%;
  width: 46px;
  height: 4px;
  border-radius: 999px;
  background: rgba(241, 228, 205, 0.18);
  content: '';
  transform: translateX(-50%);
}

.modal-head {
  padding: 28px 20px 12px !important;
  background: linear-gradient(180deg, rgba(18, 27, 28, 0.98) 70%, rgba(18, 27, 28, 0)) !important;
}

.modal-head .eyebrow {
  color: var(--mneme-teal-bright);
}

.modal-head h2 {
  color: var(--mneme-paper);
  font-family: var(--font-display);
  font-size: clamp(27px, 6.5vw, 38px);
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.modal-head .icon-button {
  width: 42px;
  min-width: 42px;
  height: 42px;
  border: 1px solid rgba(241, 228, 205, 0.11);
  border-radius: 16px;
  background: rgba(241, 228, 205, 0.055);
  color: rgba(241, 228, 205, 0.74);
  font-size: 22px;
}

.modal-body {
  padding: 8px 20px 18px !important;
}

.modal-actions {
  padding: 12px 20px 20px !important;
  gap: 10px !important;
  border-top: 1px solid rgba(241, 228, 205, 0.07);
  background: linear-gradient(180deg, rgba(18, 27, 28, 0), rgba(18, 27, 28, 0.98) 26%) !important;
  backdrop-filter: blur(18px);
}

.modal-actions .btn {
  min-height: 52px;
  justify-content: center;
  border-radius: 18px;
}

.modal-actions:has(> :only-child) {
  grid-template-columns: 1fr;
}

.modal-actions > :only-child {
  grid-column: 1 / -1;
}

.field input,
.field textarea,
.field select {
  border-color: rgba(241, 228, 205, 0.1) !important;
  border-radius: 18px !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(52, 197, 187, 0.07), transparent 7rem),
    rgba(8, 14, 15, 0.55) !important;
}

.category-choice span {
  min-height: 46px;
  border-color: rgba(241, 228, 205, 0.09) !important;
  border-radius: 999px !important;
  background: rgba(8, 14, 15, 0.54) !important;
}

.transaction-form.income .category-choice input:checked + span {
  border-color: rgba(142, 220, 120, 0.48) !important;
  background:
    radial-gradient(circle at 20% 0%, rgba(241, 228, 205, 0.12), transparent 5rem),
    rgba(142, 220, 120, 0.17) !important;
  color: #adf09f !important;
}

.transaction-form.expense .category-choice input:checked + span {
  border-color: rgba(237, 125, 111, 0.48) !important;
  background:
    radial-gradient(circle at 20% 0%, rgba(241, 228, 205, 0.1), transparent 5rem),
    rgba(237, 125, 111, 0.17) !important;
  color: #ff9d91 !important;
}

.notification-intro {
  margin: 0 0 14px;
  padding: 16px;
  border: 1px solid rgba(241, 228, 205, 0.1);
  border-radius: 22px;
}

.notification-intro strong {
  color: var(--mneme-paper);
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: -0.055em;
}

.notification-intro span {
  color: rgba(241, 228, 205, 0.58);
  font-size: 13px;
  line-height: 1.4;
}

.notification-list {
  gap: 10px;
}

.notification-item {
  min-height: 82px;
  padding: 14px;
  grid-template-columns: 46px minmax(0, 1fr) 24px;
  border-color: rgba(241, 228, 205, 0.09) !important;
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(224, 170, 90, 0.11), transparent 8rem),
    rgba(8, 14, 15, 0.52) !important;
}

.notification-kind {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(224, 170, 90, 0.2);
  border-radius: 17px;
  background: rgba(224, 170, 90, 0.1);
  color: var(--mneme-amber);
}

.notification-kind .mneme-glyph {
  width: 24px;
  height: 24px;
}

.notification-item strong {
  color: var(--mneme-paper);
  font-weight: 820;
}

.notification-item small {
  color: rgba(241, 228, 205, 0.55);
}

.notification-actions .btn {
  min-height: 42px;
  border-radius: 15px;
}

.voice-scrim {
  z-index: 36 !important;
  background:
    radial-gradient(circle at 50% 82%, rgba(52, 197, 187, 0.13), transparent 20rem),
    rgba(2, 5, 6, 0.56) !important;
  backdrop-filter: blur(16px) saturate(0.86) !important;
}

.voice-panel {
  z-index: 39 !important;
  right: 14px !important;
  bottom: var(--dock-clearance) !important;
  left: 14px !important;
  width: min(540px, calc(100vw - 28px)) !important;
  height: min(330px, 34dvh) !important;
  min-height: 258px;
  margin-inline: auto;
  border: 1px solid rgba(241, 228, 205, 0.13) !important;
  border-radius: 30px 30px 24px 24px !important;
}

.voice-root.result .voice-panel,
.voice-root.editor .voice-panel,
.voice-root.error .voice-panel,
.voice-root.success .voice-panel,
.voice-root.processing .voice-panel {
  height: auto !important;
  max-height: min(720px, calc(100dvh - var(--dock-clearance) - 26px)) !important;
}

.voice-panel::before {
  position: absolute;
  top: 10px;
  left: 50%;
  width: 46px;
  height: 4px;
  border-radius: 999px;
  background: rgba(241, 228, 205, 0.18);
  content: '';
  transform: translateX(-50%);
}

.voice-panel-body {
  padding: 28px 20px 18px !important;
}

.voice-root.processing .voice-panel-body,
.voice-root.result .voice-panel-body,
.voice-root.editor .voice-panel-body,
.voice-root.error .voice-panel-body,
.voice-root.success .voice-panel-body {
  max-height: min(720px, calc(100dvh - var(--dock-clearance) - 26px)) !important;
  padding-bottom: 0 !important;
}

.voice-panel-head h2,
.voice-result-head h2 {
  color: var(--mneme-paper);
  font-family: var(--font-display);
  font-size: clamp(26px, 6vw, 36px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.voice-waveform {
  height: 94px;
  padding: 8px;
  border: 1px solid rgba(52, 197, 187, 0.14);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 50%, rgba(52, 197, 187, 0.12), transparent 12rem),
    rgba(8, 14, 15, 0.58);
}

.voice-live-meta {
  justify-content: center;
  color: rgba(241, 228, 205, 0.58);
  text-align: center;
}

.voice-live-meta strong {
  color: var(--mneme-paper);
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: -0.04em;
}

.voice-transcript blockquote,
.voice-question,
.voice-error-card,
.voice-understood .preview-item {
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0%, rgba(52, 197, 187, 0.1), transparent 9rem),
    rgba(8, 14, 15, 0.54) !important;
}

.voice-result-actions {
  padding-bottom: 18px !important;
  background: linear-gradient(180deg, rgba(18, 27, 28, 0), rgba(18, 27, 28, 0.98) 28%) !important;
}

.voice-result-actions .btn {
  min-height: 50px;
  justify-content: center;
  border-radius: 18px;
}

@media (max-width: 620px) {
  .modal-backdrop {
    padding-inline: 12px !important;
  }

  .modal-sheet,
  .voice-panel {
    width: calc(100vw - 24px) !important;
  }

  .modal-head,
  .modal-body,
  .modal-actions,
  .voice-panel-body {
    padding-right: 18px !important;
    padding-left: 18px !important;
  }

  .category-choice-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 390px) {
  .modal-actions,
  .voice-result-actions {
    grid-template-columns: 1fr !important;
  }

  .category-choice-grid {
    grid-template-columns: 1fr;
  }
}

/* -------------------------------------------------------------------------- */
/* MNEME Surface v05 — чистим занозы и приводим вторые экраны к новой тетради */
/* -------------------------------------------------------------------------- */

.eyebrow::before,
.today-sheet-label::before,
.page-status::before,
.capture-kicker::before,
.finance-eyebrow::before,
.onboarding-copy .eyebrow::before,
.onboarding-hero .eyebrow::before {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  content: none !important;
}

.onboarding-copy .eyebrow,
.onboarding-hero .eyebrow {
  display: none !important;
}

.plan-empty-state,
.screen-plan .empty-state,
.screen-tasks .empty-state,
.screen-calendar .empty-state,
.finance-empty-state,
.notes-empty-state {
  border-style: solid !important;
  border-color: rgba(241, 228, 205, 0.11) !important;
}

.plan-empty-state,
.screen-plan .empty-state {
  background:
    radial-gradient(circle at 12% 20%, rgba(52, 197, 187, 0.1), transparent 9rem),
    radial-gradient(circle at 92% 0%, rgba(195, 151, 223, 0.06), transparent 9rem),
    rgba(8, 14, 15, 0.48) !important;
}

.screen-calendar,
.screen-tasks {
  width: min(100%, 760px);
  padding-inline: clamp(14px, 4vw, 24px);
  gap: 18px;
}

.screen-calendar .page-head,
.screen-tasks .page-head {
  display: grid;
  min-height: 148px;
  padding: 22px;
  place-items: center;
  border: 1px solid rgba(241, 228, 205, 0.115);
  border-radius: 30px;
  text-align: center;
}

.screen-calendar .page-head .head-blob,
.screen-tasks .page-head .head-blob {
  display: none !important;
}

.screen-calendar .page-head h1,
.screen-tasks .page-head h1 {
  max-width: none;
  color: var(--mneme-paper);
  font-family: var(--font-display);
  font-size: clamp(42px, 10vw, 60px);
  line-height: 0.92;
  letter-spacing: -0.075em;
}

.screen-calendar .page-head .header-actions,
.screen-tasks .page-head .header-actions {
  width: min(100%, 420px);
  margin-top: 16px;
  justify-content: center;
}

.screen-calendar .page-head .header-actions .btn,
.screen-tasks .page-head .header-actions .btn {
  flex: 1 1 0;
  justify-content: center;
}

.screen-calendar .plan-tabs,
.screen-tasks .plan-tabs {
  position: static;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  border-radius: 999px;
  background:
    radial-gradient(circle at 18% 0%, rgba(52, 197, 187, 0.1), transparent 9rem),
    rgba(10, 16, 17, 0.74);
}

.screen-calendar .calendar-layout,
.screen-tasks .tasks-layout {
  display: grid;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  grid-template-columns: 1fr;
  gap: 14px;
}

.screen-calendar .calendar-card,
.screen-calendar .card-pad,
.screen-tasks .task-section,
.screen-tasks .today-figures > * {
  border-radius: 28px;
  background:
    radial-gradient(circle at 90% 0%, rgba(52, 197, 187, 0.105), transparent 11rem),
    radial-gradient(circle at 5% 100%, rgba(195, 151, 223, 0.055), transparent 10rem),
    linear-gradient(180deg, rgba(31, 42, 42, 0.95), rgba(12, 21, 22, 0.95)) !important;
}

.screen-calendar .calendar-card {
  padding: 18px;
}

.screen-calendar .calendar-head {
  display: grid;
  margin-bottom: 14px;
  grid-template-columns: 46px minmax(0, 1fr) 46px;
  align-items: center;
  gap: 10px;
}

.screen-calendar .calendar-title {
  min-height: 46px;
  padding: 0 16px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(241, 228, 205, 0.09);
  border-radius: 999px;
  background: rgba(8, 14, 15, 0.46);
  color: var(--mneme-paper);
  font-weight: 850;
  text-align: center;
  text-transform: none;
}

.screen-calendar .calendar-head .icon-button {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: rgba(241, 228, 205, 0.055);
  color: rgba(241, 228, 205, 0.82);
}

.screen-calendar .calendar-grid {
  width: 100%;
  margin-inline: auto;
  gap: 7px;
}

.screen-calendar .calendar-weekday {
  color: rgba(241, 228, 205, 0.54);
  font-size: 11px;
  font-weight: 820;
  text-align: center;
}

.screen-calendar .calendar-day {
  min-height: clamp(42px, 10.5vw, 54px);
  border-radius: 17px;
  border-color: rgba(241, 228, 205, 0.08);
  background:
    radial-gradient(circle at 50% 0%, rgba(241, 228, 205, 0.035), transparent 4rem),
    rgba(8, 14, 15, 0.48);
  color: rgba(241, 228, 205, 0.78);
  font-weight: 820;
}

.screen-calendar .calendar-day.today {
  border-color: rgba(52, 197, 187, 0.34);
  color: var(--mneme-teal-bright);
}

.screen-calendar .calendar-day.selected {
  border-color: rgba(52, 197, 187, 0.58);
  background: linear-gradient(180deg, #43d6cf, #1c918c);
  color: #f8ead0;
  box-shadow: 0 12px 24px rgba(52, 197, 187, 0.18);
}

.screen-calendar .calendar-day.occupied::after {
  bottom: 7px;
  width: 4px;
  height: 4px;
  background: currentColor;
  opacity: 0.85;
}

.screen-calendar .timeline,
.screen-calendar .reminder-list,
.screen-tasks .task-list,
.screen-tasks .scheduled-task-list {
  gap: 10px;
}

.screen-calendar .timeline-item,
.screen-calendar .reminder-item,
.screen-tasks .task-item {
  overflow: hidden;
  border: 1px solid rgba(241, 228, 205, 0.08);
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(52, 197, 187, 0.08), transparent 8rem),
    rgba(8, 14, 15, 0.52) !important;
}

.screen-tasks .today-figures {
  display: grid;
  max-width: 680px;
  margin: 0 auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.screen-tasks .today-figures > * {
  min-height: 106px;
  padding: 16px;
  text-align: left;
}

.screen-tasks .today-figures small {
  color: rgba(241, 228, 205, 0.58);
  font-size: 13px;
  text-transform: none;
}

.screen-tasks .today-figures strong {
  margin-top: 8px;
  color: var(--mneme-paper);
  font-family: var(--font-display);
  font-size: clamp(34px, 9vw, 48px);
  line-height: 0.9;
  letter-spacing: -0.07em;
}

.screen-tasks .task-section {
  padding: 18px;
}

.screen-tasks .section-head {
  margin-bottom: 14px;
  align-items: center;
}

.screen-tasks .section-head h2 {
  color: var(--mneme-paper);
  font-family: var(--font-display);
  font-size: clamp(26px, 6vw, 36px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.screen-tasks .task-check {
  width: 50px;
  min-height: 64px;
  border-right-color: rgba(241, 228, 205, 0.06);
  color: rgba(241, 228, 205, 0.5);
}

.screen-tasks .task-check .action-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-color: rgba(52, 197, 187, 0.22);
  background: rgba(52, 197, 187, 0.08);
  color: var(--mneme-teal-bright);
}

.screen-tasks .task-open {
  min-height: 64px;
  padding: 13px 14px;
}

.screen-tasks .item-main strong,
.screen-calendar .item-main strong {
  color: var(--mneme-paper);
  font-weight: 840;
}

.screen-tasks .item-main small,
.screen-calendar .item-main small {
  color: rgba(241, 228, 205, 0.54);
}

.screen-tasks .tasks-back {
  width: min(100%, 680px);
  margin: 0 auto;
  justify-content: center;
}

.onboarding-root.active {
  z-index: 70;
  display: grid;
  padding: 18px;
  place-items: center;
  background:
    radial-gradient(circle at 50% 16%, rgba(52, 197, 187, 0.13), transparent 18rem),
    rgba(3, 7, 8, 0.78);
  backdrop-filter: blur(16px) saturate(0.84);
}

.onboarding-shell {
  width: min(560px, 100%);
  max-height: min(860px, calc(100dvh - 28px));
  overflow: hidden;
  border: 1px solid rgba(241, 228, 205, 0.13);
  border-radius: 34px;
  background:
    radial-gradient(circle at 12% 0%, rgba(241, 228, 205, 0.09), transparent 13rem),
    radial-gradient(circle at 94% 8%, rgba(52, 197, 187, 0.13), transparent 13rem),
    radial-gradient(circle at 18% 100%, rgba(195, 151, 223, 0.06), transparent 12rem),
    linear-gradient(180deg, rgba(31, 42, 42, 0.985), rgba(9, 17, 18, 0.985));
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.44),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.onboarding-top {
  min-height: 72px;
  padding: 16px 18px 10px;
  border-bottom: 1px solid rgba(241, 228, 205, 0.08);
}

.onboarding-brand {
  color: var(--mneme-paper);
}

.onboarding-top > span {
  color: rgba(241, 228, 205, 0.55);
  font-size: 13px;
  font-weight: 760;
}

.onboarding-progress {
  padding: 10px 18px 0;
  gap: 6px;
}

.onboarding-progress i {
  height: 5px;
  border-radius: 999px;
  background: rgba(241, 228, 205, 0.12);
}

.onboarding-progress i.active {
  background: linear-gradient(90deg, #49d7d0, #8edc78);
}

.onboarding-stage {
  max-height: calc(100dvh - 210px);
  overflow: auto;
  padding: 18px;
  scrollbar-width: thin;
}

.onboarding-hero,
.onboarding-copy {
  text-align: center;
}

.onboarding-logo {
  margin-inline: auto;
}

.onboarding-stage h1 {
  margin: 0;
  color: var(--mneme-paper);
  font-family: var(--font-display);
  font-size: clamp(36px, 9vw, 54px);
  line-height: 0.94;
  letter-spacing: -0.075em;
  text-wrap: balance;
}

.onboarding-stage p {
  color: rgba(241, 228, 205, 0.64);
  line-height: 1.42;
}

.onboarding-name,
.onboarding-example,
.onboarding-module-grid article,
.onboarding-choice,
.onboarding-rhythm-card,
.onboarding-guide-grid article,
.onboarding-terms,
.onboarding-ready,
.onboarding-legal-grid article,
.onboarding-legal-note,
.onboarding-consent {
  border: 1px solid rgba(241, 228, 205, 0.1) !important;
  border-radius: 24px !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(52, 197, 187, 0.09), transparent 9rem),
    rgba(8, 14, 15, 0.5) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.onboarding-choice.selected,
.onboarding-consent:has(input:checked),
.onboarding-rhythm-card:has(input:checked) {
  border-color: rgba(142, 220, 120, 0.32) !important;
  background:
    radial-gradient(circle at 0% 20%, rgba(142, 220, 120, 0.13), transparent 9rem),
    rgba(23, 54, 33, 0.42) !important;
}

.guide-number {
  display: block;
  width: 28px;
  height: 42px;
  overflow: hidden;
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, #43d6cf 0 62%, #ed7d6f 62% 100%);
  color: transparent !important;
  font-size: 0 !important;
}

.guide-number::after {
  display: block;
  width: 0;
  height: 0;
  margin: 31px auto 0;
  border-right: 8px solid transparent;
  border-left: 8px solid transparent;
  border-bottom: 8px solid rgba(8, 14, 15, 0.7);
  content: '';
}

.onboarding-actions {
  padding: 12px 18px 18px;
  border-top: 1px solid rgba(241, 228, 205, 0.08);
  background: linear-gradient(180deg, rgba(14, 22, 23, 0), rgba(14, 22, 23, 0.98) 28%);
}

.onboarding-actions .btn {
  min-height: 52px;
  justify-content: center;
  border-radius: 18px;
}

.voice-root.recording .voice-panel,
.voice-root.requesting .voice-panel {
  height: auto !important;
  min-height: auto !important;
  max-height: calc(100dvh - var(--dock-clearance) - 24px) !important;
}

.voice-root.recording .voice-panel-body,
.voice-root.requesting .voice-panel-body {
  max-height: none !important;
  overflow: visible !important;
  padding-bottom: 18px !important;
}

.voice-root.recording .voice-live {
  display: grid;
  gap: 14px;
}

.voice-root.recording .voice-waveform {
  height: 86px;
}

.voice-root.recording .voice-lock-stop {
  width: 100%;
  min-height: 54px;
  justify-content: center;
}

.screen-more .companion-platforms {
  grid-template-columns: 1fr;
}

@media (max-width: 767px) {
  .app-main {
    overflow-x: hidden !important;
  }

  .screen {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    justify-self: center;
  }

  .screen > * {
    max-width: 100% !important;
  }

  .demo-banner {
    overflow: hidden;
  }

  .demo-banner small {
    min-width: 0;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .screen-calendar,
  .screen-tasks,
  .screen-more {
    width: 100% !important;
    max-width: calc(100vw - 28px) !important;
    margin-inline: auto !important;
    padding-inline: 0 !important;
    justify-self: center !important;
  }

  .screen-calendar .page-head,
  .screen-tasks .page-head {
    min-height: 132px;
    padding: 20px 18px;
  }

  .screen-calendar .page-head .header-actions,
  .screen-tasks .page-head .header-actions {
    grid-template-columns: 1fr 1fr;
  }

  .screen-calendar .plan-tabs,
  .screen-tasks .plan-tabs {
    width: 100% !important;
    max-width: 100% !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    overflow: hidden;
  }

  .screen-calendar .plan-tabs button,
  .screen-tasks .plan-tabs button {
    min-width: 0;
    padding-inline: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .screen-calendar .plan-tabs .action-icon,
  .screen-tasks .plan-tabs .action-icon {
    width: 15px;
    min-width: 15px;
    height: 15px;
  }

  .screen-calendar .calendar-card {
    width: 100% !important;
    max-width: 100% !important;
    padding: 14px !important;
    overflow: hidden !important;
  }

  .screen-calendar .calendar-head {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
  }

  .screen-calendar .calendar-title {
    min-width: 0;
    padding-inline: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .screen-calendar .calendar-grid {
    width: 100% !important;
    max-width: 100% !important;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 5px;
  }

  .screen-calendar .calendar-weekday,
  .screen-calendar .calendar-day {
    min-width: 0 !important;
  }

  .screen-calendar .calendar-day {
    width: 100% !important;
    min-height: 0 !important;
    aspect-ratio: 1;
    border-radius: 14px;
  }

  .screen-tasks .today-figures {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .screen-tasks .today-figures > * {
    min-height: 92px;
    padding: 12px;
    border-radius: 22px;
  }

  .screen-tasks .today-figures strong {
    font-size: clamp(30px, 9vw, 40px);
  }

  .onboarding-root.active {
    padding: 10px;
  }

  .onboarding-shell {
    max-height: calc(100dvh - 18px);
    border-radius: 28px;
  }

  .onboarding-stage {
    max-height: calc(100dvh - 188px);
    padding: 16px;
  }

  .dock {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    overflow: hidden;
  }

  .dock-slots {
    padding-inline: 8px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 66px minmax(0, 1fr) minmax(0, 1fr) !important;
    min-width: 0 !important;
  }

  .dock-tab {
    min-width: 0 !important;
    padding-inline: 4px;
  }

  .dock-tab span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* -------------------------------------------------------------------------- */
/* MNEME Surface v06 — план: единый пульт, задачи-флажки и одна галочка       */
/* -------------------------------------------------------------------------- */

.screen-plan .plan-tabs,
.screen-calendar .plan-tabs,
.screen-tasks .plan-tabs {
  display: grid !important;
  width: min(100%, 560px) !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  padding: 6px !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 6px !important;
  overflow: hidden;
  border: 1px solid rgba(241, 228, 205, 0.11) !important;
  border-radius: 999px !important;
  background:
    radial-gradient(circle at 18% 0%, rgba(52, 197, 187, 0.11), transparent 9rem),
    linear-gradient(180deg, rgba(35, 43, 42, 0.84), rgba(14, 20, 21, 0.82)) !important;
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.045) !important;
  backdrop-filter: blur(18px);
}

.screen-plan .plan-tabs button,
.screen-calendar .plan-tabs button,
.screen-tasks .plan-tabs button {
  min-width: 0;
  min-height: 46px;
  padding: 8px 10px;
  border-radius: 999px;
  color: rgba(241, 228, 205, 0.56);
  font-family: var(--font-ui, system-ui, sans-serif);
  font-size: 12px;
  font-weight: 820;
  line-height: 1;
  white-space: nowrap;
}

.screen-plan .plan-tabs button.active,
.screen-calendar .plan-tabs button.active,
.screen-tasks .plan-tabs button.active {
  background:
    radial-gradient(circle at 50% 0%, rgba(52, 197, 187, 0.2), transparent 76%),
    rgba(52, 197, 187, 0.12) !important;
  color: var(--mneme-teal-bright) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 8px 18px rgba(0, 0, 0, 0.16);
}

.screen-plan .plan-tabs .action-icon,
.screen-calendar .plan-tabs .action-icon,
.screen-tasks .plan-tabs .action-icon {
  width: 17px;
  min-width: 17px;
  height: 17px;
}

.screen-plan .plan-date-switcher {
  margin-bottom: -6px;
}

.attention-check::before,
.attention-check::after,
.task-check::before,
.task-check::after,
.plan-check::before,
.plan-check::after,
.schedule-empty-icon::before,
.schedule-empty-icon::after {
  display: none !important;
  content: none !important;
}

.attention-check,
.task-check:not(.passive),
.plan-check,
.schedule-empty-icon {
  display: grid !important;
  place-items: center !important;
  border: 1px solid rgba(142, 220, 120, 0.34) !important;
  border-radius: 16px !important;
  background:
    radial-gradient(circle at 35% 18%, rgba(241, 228, 205, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(142, 220, 120, 0.28), rgba(75, 150, 78, 0.18)) !important;
  color: #9af08d !important;
  box-shadow:
    0 9px 18px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.attention-check svg,
.task-check:not(.passive) .action-icon,
.plan-check svg,
.schedule-empty-icon svg {
  display: block !important;
  width: 20px !important;
  height: 20px !important;
  border: 0 !important;
  background: transparent !important;
  color: inherit !important;
}

.task-check:not(.passive) .action-icon .mneme-glyph,
.attention-check .mneme-glyph,
.plan-check .mneme-glyph,
.schedule-empty-icon .mneme-glyph {
  width: 20px;
  height: 20px;
}

.task-check.passive {
  display: grid !important;
  place-items: center !important;
  border-right: 0 !important;
  color: var(--mneme-teal-bright) !important;
}

.task-check.passive::before,
.task-check.passive::after {
  display: none !important;
  content: none !important;
}

.task-check.passive .action-icon {
  display: grid !important;
  width: 34px !important;
  height: 34px !important;
  place-items: center;
  border: 1px solid rgba(52, 197, 187, 0.2) !important;
  border-radius: 14px !important;
  background: rgba(52, 197, 187, 0.08) !important;
  color: var(--mneme-teal-bright) !important;
}

.screen-tasks .tasks-layout {
  gap: 16px;
}

.screen-tasks .task-section {
  padding: 18px !important;
}

.screen-tasks .task-list {
  gap: 11px;
}

.screen-tasks .task-item {
  position: relative;
  display: grid;
  min-height: 84px;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: stretch;
  overflow: hidden;
  border: 1px solid rgba(241, 228, 205, 0.085) !important;
  border-radius: 24px !important;
  background:
    radial-gradient(circle at 92% 0%, rgba(52, 197, 187, 0.095), transparent 9rem),
    radial-gradient(circle at 0% 100%, rgba(195, 151, 223, 0.045), transparent 9rem),
    rgba(8, 14, 15, 0.52) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 12px 26px rgba(0, 0, 0, 0.16);
}

.screen-tasks .task-item.overdue {
  border-color: rgba(237, 125, 111, 0.18) !important;
  background:
    radial-gradient(circle at 92% 0%, rgba(237, 125, 111, 0.12), transparent 9rem),
    rgba(18, 12, 12, 0.52) !important;
}

.screen-tasks .task-item.completed {
  opacity: 0.76;
}

.screen-tasks .task-check {
  width: 58px !important;
  min-height: 84px !important;
  border-right: 1px solid rgba(241, 228, 205, 0.055) !important;
}

.screen-tasks .task-open {
  display: grid;
  min-height: 84px;
  padding: 14px 14px 14px 2px !important;
  grid-template-columns: 34px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 12px;
}

.task-item-ribbon {
  display: block;
  width: 30px;
  height: 42px;
  justify-self: center;
  border-radius: 9px 9px 3px 3px;
  background:
    linear-gradient(145deg, rgba(241, 228, 205, 0.2), transparent 42%),
    linear-gradient(180deg, #43d6cf 0 58%, #decaa5 58% 100%);
  box-shadow:
    0 10px 18px rgba(0, 0, 0, 0.22),
    0 0 0 5px rgba(52, 197, 187, 0.07);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 77%, 0 100%);
}

.task-item-ribbon.overdue {
  background:
    linear-gradient(145deg, rgba(241, 228, 205, 0.18), transparent 42%),
    linear-gradient(180deg, #ed7d6f 0 58%, #decaa5 58% 100%);
}

.task-item-ribbon.upcoming {
  background:
    linear-gradient(145deg, rgba(241, 228, 205, 0.18), transparent 42%),
    linear-gradient(180deg, #c79ee2 0 58%, #decaa5 58% 100%);
}

.task-item-ribbon.undated {
  background:
    linear-gradient(145deg, rgba(241, 228, 205, 0.18), transparent 42%),
    linear-gradient(180deg, #8edc78 0 58%, #decaa5 58% 100%);
}

.task-item-ribbon.reminder,
.task-item-ribbon.today {
  background:
    linear-gradient(145deg, rgba(241, 228, 205, 0.18), transparent 42%),
    linear-gradient(180deg, #34c5bb 0 58%, #decaa5 58% 100%);
}

.screen-tasks .task-item .item-main strong {
  color: var(--mneme-paper);
  font-size: 16px;
  font-weight: 840;
  line-height: 1.08;
}

.screen-tasks .task-item .item-main small {
  margin-top: 5px;
  color: rgba(241, 228, 205, 0.55);
  font-size: 12px;
  line-height: 1.3;
}

.screen-tasks .task-priority {
  grid-column: 3;
  justify-self: end;
  border: 1px solid rgba(224, 170, 90, 0.22);
  background: rgba(224, 170, 90, 0.1);
  color: var(--mneme-amber);
  text-transform: none;
}

.screen-tasks .task-open .item-tail {
  grid-column: 4;
  justify-self: end;
}

.screen-tasks .task-section .empty-state {
  min-height: 86px;
  padding: 12px 4px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.screen-tasks .task-section .empty-state .art-scene {
  display: none !important;
}

.screen-tasks .task-section .empty-state h3 {
  color: var(--mneme-paper);
  font-family: var(--font-display);
  font-size: 25px;
  line-height: 1;
  letter-spacing: -0.055em;
}

.screen-tasks .today-figures > * {
  min-height: 92px;
  align-content: center;
  background:
    radial-gradient(circle at 90% 0%, rgba(52, 197, 187, 0.12), transparent 8rem),
    rgba(8, 14, 15, 0.5) !important;
}

.calendar-month-nav {
  position: relative;
}

.calendar-nav-mark {
  position: relative;
  display: block;
  width: 13px;
  height: 13px;
}

.calendar-nav-mark::before {
  position: absolute;
  inset: 0;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  border-radius: 2px;
  content: '';
}

.calendar-month-nav.prev .calendar-nav-mark::before {
  transform: rotate(-135deg);
}

.calendar-month-nav.next .calendar-nav-mark::before {
  transform: rotate(45deg);
}

.screen-calendar .calendar-day-detail,
.screen-calendar .calendar-reminders-card {
  padding: 18px !important;
  border-radius: 28px;
}

.screen-calendar .calendar-day-detail .section-head h2,
.screen-calendar .calendar-reminders-card .section-head h2 {
  color: var(--mneme-paper);
  font-family: var(--font-display);
  font-size: clamp(26px, 6vw, 36px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.screen-calendar .schedule-empty {
  border: 0 !important;
  background:
    radial-gradient(circle at 0% 20%, rgba(52, 197, 187, 0.08), transparent 8rem),
    rgba(8, 14, 15, 0.36) !important;
  box-shadow: none !important;
}

.reminder-empty-plain {
  display: grid;
  min-height: 92px;
  padding: 8px 0 2px;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
}

.reminder-empty-plain .plan-empty-mark {
  width: 32px;
  height: 40px;
}

.reminder-empty-plain strong {
  display: block;
  color: var(--mneme-paper);
  font-weight: 840;
}

.reminder-empty-plain small {
  display: block;
  margin-top: 4px;
  color: rgba(241, 228, 205, 0.56);
  line-height: 1.35;
}

@media (max-width: 767px) {
  .screen-plan {
    width: 100% !important;
    max-width: calc(100vw - 28px) !important;
    padding-inline: 0 !important;
  }

  .screen-plan .plan-tabs,
  .screen-calendar .plan-tabs,
  .screen-tasks .plan-tabs {
    width: 100% !important;
    max-width: 100% !important;
  }

  .screen-plan .plan-tabs button,
  .screen-calendar .plan-tabs button,
  .screen-tasks .plan-tabs button {
    padding-inline: 7px;
    font-size: 11px;
  }

  .screen-tasks .task-item {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .screen-tasks .task-check {
    width: 52px !important;
  }

  .screen-tasks .task-open {
    grid-template-columns: 30px minmax(0, 1fr) auto 18px;
    gap: 10px;
  }

  .task-item-ribbon {
    width: 27px;
    height: 38px;
  }
}

@media (max-width: 767px) {
  .app-shell,
  .app-main {
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    overflow-x: hidden !important;
  }

  .app-main {
    padding-right: 14px !important;
    padding-left: 14px !important;
  }

  .screen,
  .screen > section,
  .plan-page,
  .screen-plan,
  .screen-tasks,
  .screen-calendar {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
    overflow-x: hidden !important;
  }

  .plan-date-switcher,
  .plan-tabs,
  .plan-cover-note,
  .plan-paper,
  .screen-plan .plan-alert,
  .screen-tasks .today-figures,
  .screen-tasks .task-section,
  .screen-calendar .calendar-layout,
  .screen-calendar .calendar-card,
  .screen-calendar .calendar-day-detail,
  .screen-calendar .calendar-reminders-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .plan-cover-note {
    padding-right: 18px;
    padding-left: 18px;
  }

  .plan-quick-stats {
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .plan-quick-stats span {
    min-width: 0;
  }

  .screen-plan .section-head,
  .screen-calendar .section-head,
  .screen-tasks .section-head {
    min-width: 0;
  }

  .screen-plan .section-head .status-badge,
  .screen-calendar .section-head .status-badge,
  .screen-tasks .section-head .status-badge {
    max-width: 42%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .demo-banner {
    width: 100%;
    min-width: 0;
  }

  .demo-banner > div,
  .demo-banner small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Telegram WebView иногда держит layout viewport шире видимой области.
   Эти ограничения не завязаны на media-query и защищают план от боковой
   прокрутки даже в таком режиме. */
.screen-plan,
.screen-tasks,
.screen-calendar {
  width: min(100%, 740px, calc(var(--mneme-visible-width, 100vw) - 44px)) !important;
  max-width: calc(var(--mneme-visible-width, 100vw) - 44px) !important;
  min-width: 0 !important;
  margin-inline: auto !important;
  padding-inline: 0 !important;
  justify-self: center !important;
  overflow-x: hidden !important;
}

.screen-plan > *,
.screen-tasks > *,
.screen-calendar > *,
.plan-page,
.calendar-layout,
.tasks-layout {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.screen-plan .plan-date-switcher,
.screen-plan .plan-tabs,
.screen-tasks .plan-tabs,
.screen-calendar .plan-tabs,
.plan-cover-note,
.plan-paper,
.screen-plan .plan-alert,
.screen-tasks .today-figures,
.screen-tasks .task-section,
.screen-calendar .calendar-card,
.screen-calendar .calendar-day-detail,
.screen-calendar .calendar-reminders-card {
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.screen-plan .plan-date-switcher {
  width: min(100%, 460px, calc(var(--mneme-visible-width, 100vw) - 44px)) !important;
}

.screen-plan .plan-tabs,
.screen-tasks .plan-tabs,
.screen-calendar .plan-tabs {
  width: min(100%, 560px, calc(var(--mneme-visible-width, 100vw) - 44px)) !important;
}

.plan-cover-note,
.plan-paper,
.screen-calendar .calendar-card,
.screen-calendar .calendar-day-detail,
.screen-calendar .calendar-reminders-card,
.screen-tasks .task-section {
  width: 100% !important;
}

.plan-quick-stats,
.screen-tasks .today-figures {
  min-width: 0 !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.screen-tasks .today-figures {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.plan-quick-stats > *,
.screen-tasks .today-figures > * {
  min-width: 0 !important;
}

/* -------------------------------------------------------------------------- */
/* MNEME Surface v12 — План как единый пульт, а не набор отдельных карточек   */
/* -------------------------------------------------------------------------- */

.screen-plan .plan-page,
.screen-tasks,
.screen-calendar {
  gap: 14px !important;
}

.plan-dashboard {
  position: relative;
  display: grid;
  width: 100%;
  padding: 20px;
  align-content: start;
  gap: 14px;
  overflow: hidden;
  border: 1px solid rgba(241, 228, 205, 0.12);
  border-radius: 31px;
  background:
    radial-gradient(circle at 12% 0%, rgba(52, 197, 187, 0.16), transparent 13rem),
    radial-gradient(circle at 88% 8%, rgba(195, 151, 223, 0.08), transparent 12rem),
    radial-gradient(circle at 18% 100%, rgba(224, 170, 90, 0.055), transparent 12rem),
    linear-gradient(180deg, rgba(33, 43, 42, 0.97), rgba(11, 18, 19, 0.97));
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.plan-dashboard::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(241, 228, 205, 0.035), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 44%);
  content: '';
  pointer-events: none;
}

.plan-dashboard-top,
.plan-dashboard-control,
.plan-dashboard .plan-tabs,
.plan-dashboard-metrics {
  position: relative;
  z-index: 1;
}

.plan-dashboard-top {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: start;
  gap: 13px;
}

.plan-dashboard-ribbon {
  display: block;
  width: 35px;
  height: 48px;
  margin-top: 2px;
  border-radius: 10px 10px 4px 4px;
  background:
    linear-gradient(145deg, rgba(241, 228, 205, 0.24), transparent 42%),
    linear-gradient(180deg, #3bd0c8 0 57%, #e1cba5 57% 100%);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 77%, 0 100%);
  box-shadow:
    0 10px 21px rgba(0, 0, 0, 0.28),
    0 0 0 6px rgba(52, 197, 187, 0.075);
}

.plan-dashboard-kicker {
  display: block;
  margin-bottom: 6px;
  color: var(--mneme-teal-bright);
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.plan-dashboard h1 {
  margin: 0;
  color: var(--mneme-paper);
  font-family: var(--font-display);
  font-size: clamp(38px, 9vw, 58px);
  font-weight: 770;
  line-height: 0.92;
  letter-spacing: -0.078em;
}

.plan-dashboard p {
  margin: 8px 0 0;
  max-width: 42ch;
  color: rgba(241, 228, 205, 0.62);
  font-size: 14px;
  line-height: 1.42;
}

.plan-dashboard-actions {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.plan-dashboard-actions .btn {
  min-height: 42px;
  padding-inline: 14px;
  border-radius: 15px;
  white-space: nowrap;
}

.plan-dashboard-control {
  display: grid;
  min-height: 54px;
  margin-top: 0;
  margin-bottom: -2px;
  padding: 6px;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(241, 228, 205, 0.095);
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 0%, rgba(52, 197, 187, 0.1), transparent 10rem),
    rgba(7, 13, 14, 0.46);
}

.plan-dashboard:not([data-active='plan']) .plan-dashboard-control {
  grid-template-columns: minmax(0, 1fr);
  padding-inline: 16px;
}

.plan-dashboard-date {
  display: grid;
  min-width: 0;
  place-items: center;
  text-align: center;
}

.plan-dashboard-date strong {
  max-width: 100%;
  overflow: hidden;
  color: var(--mneme-paper);
  font-size: 15px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-dashboard-date small {
  display: block;
  max-width: 100%;
  margin-top: 2px;
  overflow: hidden;
  color: rgba(241, 228, 205, 0.52);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-date-nav {
  width: 44px !important;
  height: 42px !important;
  border-radius: 999px !important;
  background: rgba(241, 228, 205, 0.055) !important;
  color: rgba(241, 228, 205, 0.82) !important;
}

.plan-date-nav.prev .calendar-nav-mark::before {
  transform: rotate(-135deg);
}

.plan-date-nav.next .calendar-nav-mark::before {
  transform: rotate(45deg);
}

.plan-dashboard .plan-tabs {
  width: 100% !important;
  margin: 0 !important;
  align-self: start;
  border-color: rgba(241, 228, 205, 0.095) !important;
  background:
    radial-gradient(circle at 16% 0%, rgba(52, 197, 187, 0.1), transparent 8rem),
    rgba(7, 13, 14, 0.38) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035) !important;
}

.plan-dashboard .plan-tabs button {
  min-height: 44px;
}

.plan-dashboard-metrics {
  display: grid;
  align-self: start;
  margin-top: -2px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.plan-dashboard-metrics span {
  display: grid;
  min-height: 68px;
  padding: 11px 12px;
  align-content: center;
  border: 1px solid rgba(241, 228, 205, 0.075);
  border-radius: 18px;
  background:
    radial-gradient(circle at 75% 0%, rgba(52, 197, 187, 0.09), transparent 6rem),
    rgba(8, 14, 15, 0.42);
}

.plan-dashboard-metrics span.success {
  background:
    radial-gradient(circle at 75% 0%, rgba(142, 220, 120, 0.13), transparent 6rem),
    rgba(8, 14, 15, 0.42);
}

.plan-dashboard-metrics span.danger {
  background:
    radial-gradient(circle at 75% 0%, rgba(237, 125, 111, 0.14), transparent 6rem),
    rgba(18, 12, 12, 0.42);
}

.plan-dashboard-metrics span.quiet {
  background:
    radial-gradient(circle at 75% 0%, rgba(241, 228, 205, 0.055), transparent 6rem),
    rgba(8, 14, 15, 0.36);
}

.plan-dashboard-metrics strong {
  display: block;
  overflow: hidden;
  color: var(--mneme-paper);
  font-family: var(--font-display);
  font-size: clamp(22px, 5.6vw, 32px);
  font-weight: 760;
  line-height: 0.98;
  letter-spacing: -0.06em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-dashboard-metrics small {
  margin-top: 6px;
  color: rgba(241, 228, 205, 0.52);
  font-size: 11px;
  font-weight: 650;
}

.screen-plan .plan-paper,
.screen-plan .plan-alert,
.screen-tasks .task-section,
.screen-calendar .calendar-card,
.screen-calendar .calendar-day-detail,
.screen-calendar .calendar-reminders-card {
  margin-top: 0 !important;
}

.screen-tasks .page-head,
.screen-calendar .page-head,
.screen-tasks .today-figures {
  display: none !important;
}

.screen-tasks .task-item {
  display: block !important;
  min-height: 88px;
  border-radius: 24px !important;
}

.screen-tasks .task-open {
  display: grid;
  width: 100%;
  min-height: 88px;
  padding: 14px 54px 14px 14px !important;
  grid-template-columns: 34px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.screen-tasks .task-item.scheduled .task-open {
  padding-right: 14px !important;
}

.task-status-action {
  position: absolute;
  right: 13px;
  bottom: 12px;
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid rgba(142, 220, 120, 0.28);
  border-radius: 13px;
  background:
    radial-gradient(circle at 35% 18%, rgba(241, 228, 205, 0.15), transparent 42%),
    rgba(142, 220, 120, 0.13);
  color: #9af08d;
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.task-status-action.reopen {
  border-color: rgba(241, 228, 205, 0.14);
  background: rgba(241, 228, 205, 0.065);
  color: rgba(241, 228, 205, 0.7);
}

.task-status-action .action-icon,
.task-status-action svg {
  width: 18px !important;
  height: 18px !important;
}

.screen-tasks .task-priority {
  grid-column: 3;
  align-self: center;
  justify-self: end;
}

.screen-tasks .task-waiting {
  display: inline-grid;
  min-height: 31px;
  padding: 0 10px;
  grid-column: 3;
  grid-auto-flow: column;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(224, 170, 90, 0.22);
  border-radius: 999px;
  background: rgba(224, 170, 90, 0.1);
  color: var(--mneme-amber);
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

.screen-tasks .task-waiting .action-icon {
  width: 15px;
  height: 15px;
}

.screen-tasks .task-open .item-tail {
  grid-column: 4;
}

.screen-tasks .task-check {
  display: none !important;
}

.plan-block-actions .plan-check {
  width: 33px !important;
  height: 33px !important;
  min-height: 33px !important;
  border-radius: 13px !important;
}

.plan-block-actions .plan-check svg,
.plan-block-actions .plan-check .mneme-glyph {
  width: 17px !important;
  height: 17px !important;
}

@media (max-width: 767px) {
  .screen-today {
    width: min(100%, calc(var(--mneme-visible-width, 100vw) - 28px)) !important;
    max-width: calc(var(--mneme-visible-width, 100vw) - 28px) !important;
    padding-inline: 14px !important;
  }

  .plan-dashboard {
    padding: 17px;
    align-content: start;
    gap: 10px;
    border-radius: 27px;
  }

  .plan-dashboard-top {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .plan-dashboard-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .plan-dashboard-actions .btn {
    flex: 1;
    justify-content: center;
  }

  .plan-dashboard-ribbon {
    width: 31px;
    height: 44px;
  }

  .plan-dashboard h1 {
    font-size: clamp(36px, 10vw, 48px);
  }

  .plan-dashboard p {
    font-size: 13px;
  }

  .plan-dashboard-metrics {
    margin-top: -1px;
    gap: 7px;
  }

  .plan-dashboard-metrics span {
    min-height: 62px;
    padding: 10px 9px;
  }

  .plan-dashboard-metrics strong {
    font-size: clamp(20px, 5.4vw, 27px);
  }

  .plan-dashboard-metrics small {
    font-size: 10px;
  }

  .screen-tasks .task-open {
    grid-template-columns: 30px minmax(0, 1fr) auto 16px;
    padding-left: 12px !important;
    gap: 10px;
  }

  .task-status-action {
    right: 11px;
    bottom: 11px;
  }
}

@media (max-width: 390px) {
  .screen-today {
    padding-inline: 12px !important;
  }

  .plan-dashboard-metrics {
    grid-template-columns: 1fr;
  }

  .screen-tasks .task-open {
    grid-template-columns: 30px minmax(0, 1fr) 16px;
    padding-right: 48px !important;
  }

  .screen-tasks .task-priority,
  .screen-tasks .task-waiting {
    grid-column: 2;
    justify-self: start;
    margin-top: 7px;
  }

  .screen-tasks .task-open .item-tail {
    grid-column: 3;
    grid-row: 1;
  }
}

/* -------------------------------------------------------------------------- */
/* MNEME Surface v13 — возвращаем поля и нормальное положение пульта          */
/* -------------------------------------------------------------------------- */

.plan-dashboard > .plan-tabs {
  order: 0;
}

.plan-dashboard-top {
  margin-top: 0;
}

.schedule-empty .plan-empty-mark {
  flex: 0 0 auto;
}

.screen-more .page-head {
  align-content: center !important;
  place-items: center !important;
  text-align: center;
}

.screen-more .page-head h1,
.screen-more .page-status {
  max-width: min(100%, 34ch);
  margin-inline: auto;
  text-align: center;
}

@media (max-width: 767px) {
  .screen-plan,
  .screen-tasks,
  .screen-more {
    width: min(100%, calc(var(--mneme-visible-width, 100vw) - 28px)) !important;
    max-width: calc(var(--mneme-visible-width, 100vw) - 28px) !important;
    padding-inline: 14px !important;
    box-sizing: border-box !important;
  }

  .screen-plan .plan-page,
  .screen-tasks > *,
  .screen-more > * {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .plan-dashboard {
    gap: 13px;
  }

  .plan-dashboard > .plan-tabs {
    margin-top: 1px !important;
    margin-bottom: 0 !important;
  }

  .screen-tasks .task-section {
    padding-inline: 18px !important;
  }

  .screen-today .today-sheet,
  .screen-today .today-mneme-note,
  .screen-more .settings-group,
  .screen-calendar .calendar-day-detail,
  .screen-calendar .calendar-reminders-card {
    padding-right: 20px !important;
    padding-left: 20px !important;
  }

  .screen-tasks .task-open {
    padding-left: 14px !important;
  }
}

@media (max-width: 390px) {
  .screen-plan,
  .screen-tasks,
  .screen-more {
    padding-inline: 12px !important;
  }
}

/* -------------------------------------------------------------------------- */
/* MNEME Surface v14 — плотный пульт плана и возвращённые внутренние поля     */
/* -------------------------------------------------------------------------- */

.plan-dashboard {
  height: auto !important;
  min-height: 0 !important;
  grid-template-rows: auto auto auto auto !important;
  align-content: start !important;
  align-items: start !important;
  gap: 11px !important;
}

.plan-dashboard-top {
  order: 1;
}

.plan-dashboard-control {
  order: 2;
  margin: 0 !important;
}

.plan-dashboard-metrics {
  order: 3;
  width: 100%;
  margin: 0 !important;
  align-self: start !important;
}

.plan-dashboard > .plan-tabs {
  order: 4;
  margin: 0 !important;
  align-self: start !important;
}

.plan-dashboard[data-active='plan'] {
  padding-bottom: 18px !important;
}

.plan-dashboard[data-active='plan'] .plan-dashboard-actions {
  grid-column: 1 / -1;
  width: 100%;
}

.plan-dashboard[data-active='plan'] .plan-dashboard-actions .btn {
  width: 100%;
  justify-content: center;
}

.plan-dashboard[data-active='plan'] .plan-dashboard-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.plan-dashboard[data-active='plan'] .plan-dashboard-metrics span {
  min-height: 58px !important;
  padding: 9px 10px !important;
}

.plan-dashboard[data-active='plan'] .plan-dashboard-metrics strong {
  font-size: clamp(19px, 5vw, 27px) !important;
}

.plan-dashboard[data-active='plan'] .plan-dashboard-metrics small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen-plan .plan-page,
.screen-tasks .tasks-layout {
  gap: 14px !important;
}

.screen-today .today-thought-card,
.screen-today .today-sheet,
.screen-today .today-mneme-note,
.screen-plan .plan-dashboard,
.screen-plan .plan-paper,
.screen-plan .plan-alert,
.screen-tasks .task-section,
.screen-calendar .calendar-card,
.screen-calendar .calendar-day-detail,
.screen-calendar .calendar-reminders-card,
.screen-more .settings-group {
  padding-left: clamp(18px, 5vw, 24px) !important;
  padding-right: clamp(18px, 5vw, 24px) !important;
}

.screen-tasks .task-open,
.screen-plan .plan-block,
.screen-calendar .timeline-item,
.screen-calendar .reminder-item {
  padding-left: 16px !important;
  padding-right: 16px !important;
}

.screen-plan .plan-block .item-main,
.screen-tasks .task-open .item-main,
.screen-calendar .timeline-item .item-main,
.screen-calendar .reminder-item .item-main {
  min-width: 0;
}

@media (max-width: 767px) {
  .plan-dashboard {
    gap: 10px !important;
    padding-top: 17px !important;
    padding-bottom: 17px !important;
  }

  .plan-dashboard-control {
    min-height: 50px !important;
    padding: 5px !important;
  }

  .plan-dashboard .plan-tabs {
    padding: 5px !important;
    gap: 5px !important;
  }

  .plan-dashboard .plan-tabs button {
    min-height: 40px !important;
    padding-inline: 6px !important;
    font-size: 11px !important;
  }

  .plan-dashboard .plan-tabs .action-icon {
    display: none !important;
  }

  .plan-dashboard-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  .screen-today .today-thought-card,
  .screen-today .today-sheet,
  .screen-today .today-mneme-note,
  .screen-plan .plan-dashboard,
  .screen-plan .plan-paper,
  .screen-plan .plan-alert,
  .screen-tasks .task-section,
  .screen-calendar .calendar-card,
  .screen-calendar .calendar-day-detail,
  .screen-calendar .calendar-reminders-card,
  .screen-more .settings-group {
    padding-left: 19px !important;
    padding-right: 19px !important;
  }
}

@media (max-width: 390px) {
  .plan-dashboard-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .plan-dashboard[data-active='plan'] .plan-dashboard-metrics span {
    padding-inline: 8px !important;
  }

  .screen-today .today-thought-card,
  .screen-today .today-sheet,
  .screen-today .today-mneme-note,
  .screen-plan .plan-dashboard,
  .screen-plan .plan-paper,
  .screen-plan .plan-alert,
  .screen-tasks .task-section,
  .screen-calendar .calendar-card,
  .screen-calendar .calendar-day-detail,
  .screen-calendar .calendar-reminders-card,
  .screen-more .settings-group {
    padding-left: 17px !important;
    padding-right: 17px !important;
  }
}

/* -------------------------------------------------------------------------- */
/* MNEME Surface v15 — страховка: пульт плана не схлопывается и не пропадает  */
/* -------------------------------------------------------------------------- */

.screen-plan .plan-dashboard,
.screen-tasks .plan-dashboard,
.screen-calendar .plan-dashboard {
  display: flex !important;
  height: auto !important;
  min-height: 0 !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 10px !important;
}

.screen-plan .plan-dashboard-top,
.screen-plan .plan-dashboard-control,
.screen-plan .plan-dashboard-metrics,
.screen-plan .plan-dashboard > .plan-tabs,
.screen-tasks .plan-dashboard-top,
.screen-tasks .plan-dashboard-control,
.screen-tasks .plan-dashboard-metrics,
.screen-tasks .plan-dashboard > .plan-tabs,
.screen-calendar .plan-dashboard-top,
.screen-calendar .plan-dashboard-control,
.screen-calendar .plan-dashboard-metrics,
.screen-calendar .plan-dashboard > .plan-tabs {
  display: grid !important;
  position: relative !important;
  z-index: 1 !important;
  width: 100% !important;
  min-width: 0 !important;
  flex: 0 0 auto !important;
  visibility: visible !important;
  opacity: 1 !important;
  transform: none !important;
}

.screen-plan .plan-dashboard-top,
.screen-tasks .plan-dashboard-top,
.screen-calendar .plan-dashboard-top {
  order: 1 !important;
}

.screen-plan .plan-dashboard-control,
.screen-tasks .plan-dashboard-control,
.screen-calendar .plan-dashboard-control {
  order: 2 !important;
}

.screen-plan .plan-dashboard-metrics,
.screen-tasks .plan-dashboard-metrics,
.screen-calendar .plan-dashboard-metrics {
  order: 3 !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.screen-plan .plan-dashboard > .plan-tabs,
.screen-tasks .plan-dashboard > .plan-tabs,
.screen-calendar .plan-dashboard > .plan-tabs {
  order: 4 !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.screen-plan .plan-dashboard .plan-tabs .action-icon,
.screen-tasks .plan-dashboard .plan-tabs .action-icon,
.screen-calendar .plan-dashboard .plan-tabs .action-icon {
  display: inline-grid !important;
}

@media (max-width: 390px) {
  .screen-plan .plan-dashboard .plan-tabs button,
  .screen-tasks .plan-dashboard .plan-tabs button,
  .screen-calendar .plan-dashboard .plan-tabs button {
    padding-inline: 5px !important;
    gap: 3px !important;
    font-size: 10px !important;
  }

  .screen-plan .plan-dashboard .plan-tabs .action-icon,
  .screen-tasks .plan-dashboard .plan-tabs .action-icon,
  .screen-calendar .plan-dashboard .plan-tabs .action-icon {
    width: 13px !important;
    min-width: 13px !important;
    height: 13px !important;
  }
}

/* -------------------------------------------------------------------------- */
/* MNEME Surface v16 — аварийный откат пульта к видимой рабочей структуре     */
/* -------------------------------------------------------------------------- */

.screen-plan .plan-dashboard,
.screen-tasks .plan-dashboard,
.screen-calendar .plan-dashboard {
  display: grid !important;
  height: auto !important;
  min-height: 0 !important;
  grid-template-rows: none !important;
  align-content: start !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  gap: 13px !important;
}

.screen-plan .plan-dashboard-top,
.screen-tasks .plan-dashboard-top,
.screen-calendar .plan-dashboard-top {
  display: grid !important;
  order: 0 !important;
  width: 100% !important;
  grid-template-columns: 42px minmax(0, 1fr) auto !important;
}

.screen-plan .plan-dashboard-control,
.screen-tasks .plan-dashboard-control,
.screen-calendar .plan-dashboard-control {
  display: grid !important;
  order: 0 !important;
  width: 100% !important;
  margin: 0 !important;
}

.screen-plan .plan-dashboard > .plan-tabs,
.screen-tasks .plan-dashboard > .plan-tabs,
.screen-calendar .plan-dashboard > .plan-tabs {
  display: grid !important;
  order: 0 !important;
  width: min(100%, 560px) !important;
  margin: 0 auto !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.screen-plan .plan-dashboard-metrics,
.screen-tasks .plan-dashboard-metrics,
.screen-calendar .plan-dashboard-metrics {
  display: grid !important;
  order: 0 !important;
  width: 100% !important;
  margin: 0 !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  visibility: visible !important;
  opacity: 1 !important;
}

@media (max-width: 767px) {
  .screen-plan .plan-dashboard-top,
  .screen-tasks .plan-dashboard-top,
  .screen-calendar .plan-dashboard-top {
    grid-template-columns: 36px minmax(0, 1fr) !important;
  }

  .screen-plan .plan-dashboard > .plan-tabs button,
  .screen-tasks .plan-dashboard > .plan-tabs button,
  .screen-calendar .plan-dashboard > .plan-tabs button {
    min-height: 42px !important;
    padding-inline: 7px !important;
    font-size: 11px !important;
  }

  .screen-plan .plan-dashboard > .plan-tabs .action-icon,
  .screen-tasks .plan-dashboard > .plan-tabs .action-icon,
  .screen-calendar .plan-dashboard > .plan-tabs .action-icon {
    display: none !important;
  }
}
