.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--st) + 6px);
  z-index: 50;
  pointer-events: none;
  background: linear-gradient(rgba(3, 8, 18, .96) 75%, rgba(3, 8, 18, 0));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  opacity: 0;
  transition: opacity .25s, height .22s ease, background .22s;
}

.topbar.on {
  opacity: 1;
  pointer-events: auto;
}

.topbar.titled {
  height: calc(var(--st) + 40px);
  background: rgba(3, 8, 18, .86);
  box-shadow: 0 1px 0 var(--line-dim);
}

.topbar .tb-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .2s, transform .2s;
}

.topbar.titled .tb-title {
  opacity: 1;
  transform: none;
}

body.bare.kb-open .nav {
  display: none;
}

.view {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  position: relative;
  scrollbar-width: none;
}

.view::-webkit-scrollbar {
  display: none;
}

.panes {
  flex: 1;
  position: relative;
  min-height: 0;
  isolation: isolate;
}

.panes > .ambient {
  z-index: 0;
}

.panes .view {
  z-index: 1;
}

.panes .view {
  position: absolute;
  inset: 0;
}

.panes .view.fade-in {
  animation: fadein .18s ease both;
}

.fullscreen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
}

.ambient {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(120% 60% at 50% -10%, rgba(34, 211, 238, .13), transparent 60%), radial-gradient(70% 45% at 110% 30%, rgba(232, 93, 4, .09), transparent 70%), var(--bg);
}

.nav {
  flex: none;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  padding: 10px 8px var(--sb);
  border-top: 1px solid var(--line);
  background: linear-gradient(#060b12, #04070c);
  position: relative;
  z-index: 20;
}

.nav button {
  height: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
  transition: color .15s ease;
  transform: translateZ(0);
}

.nav button::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(34, 211, 238, .55);
  background: rgba(34, 211, 238, .07);
  box-shadow: 0 0 18px -6px rgba(34, 211, 238, .6), inset 0 0 14px -8px rgba(34, 211, 238, .8);
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
  will-change: opacity;
}

.nav button svg {
  display: block;
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  position: relative;
  filter: drop-shadow(0 0 5px rgba(34, 211, 238, 0));
}

.nav button span {
  display: block;
  height: 12px;
  line-height: 12px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  position: relative;
}

.nav button.on {
  color: var(--cyan);
}

.nav button.on::before {
  opacity: 1;
}

.nav button.on svg {
  filter: drop-shadow(0 0 5px rgba(34, 211, 238, .85));
}

.nav button.pressed {
  color: var(--dim);
}

.nav button.on.pressed {
  color: rgba(34, 211, 238, .55);
}

.nav button {
  position: relative;
}

@media (max-width: 380px) {
  .nav {
    gap: 2px;
    padding-left: 4px;
    padding-right: 4px;
  }
  .nav button span {
    letter-spacing: .03em;
  }
}

.view.settled .week .c .ok {
  animation: none!important;
  transform: none;
}

.toast {
  position: absolute;
  left: 16px;
  right: 16px;
  top: calc(var(--st) + 8px);
  z-index: 90;
  pointer-events: none;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  background: rgba(9, 20, 30, .96);
  border: 1px solid var(--line-2);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .5), 0 0 20px -8px rgba(34, 211, 238, .6);
  font-size: 13px;
  animation: toastin .35s cubic-bezier(.2, 1.2, .4, 1) both;
}

.toast.out {
  animation: fadeout .3s both;
}

.toast svg {
  flex: none;
  width: 18px;
  height: 18px;
  stroke: var(--cyan);
  fill: none;
  stroke-width: 2;
}

@keyframes toastin {
  from {
    opacity: 0;
    transform: translateY(-16px) scale(.96);
  }
}

.confetti {
  position: absolute;
  inset: 0;
  z-index: 95;
  pointer-events: none;
}

.page {
  padding: calc(var(--st) + 14px) 16px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.page-h h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: .02em;
  margin: 6px 0 4px;
  text-transform: uppercase;
  font-family: var(--mono);
}

.periods {
  display: flex;
  gap: 8px;
}


.page-h-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.add-entry {
  flex: none;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--orange);
  background: rgba(255, 72, 0, .12);
  color: #ffd2bf;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* Нижняя навигация по концепту Home Rev02: крупные иконки, подписи обычным шрифтом, активная — бирюзовая без рамки */
.nav button {
  gap: 5px;
  color: var(--text-2);
}

.nav button::before {
  content: none;
}

.nav button svg {
  width: 26px;
  height: 26px;
  stroke-width: 1.5;
}

.nav button span {
  height: 14px;
  line-height: 14px;
  font-family: var(--body);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}


/* ---------- Визуальный язык концепта Home Rev02 для всех экранов ---------- */

.page {
  padding-top: var(--st);
}

.app-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  margin: calc(-1 * var(--st)) -16px 0;
  padding-top: var(--st);
  box-sizing: content-box;
  background:
    linear-gradient(rgba(4, 8, 15, .35), var(--bg)),
    url("../assets/panda-sky.webp") center top / cover no-repeat;
}

.app-bar .hero-icon {
  top: var(--st);
}

.page-h h2 {
  margin: 4px 0 4px;
  font-family: var(--body);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.01em;
  text-transform: none;
}

.topbar .tb-title {
  font-family: var(--body);
  letter-spacing: .02em;
}
