:root {
  --dark-blue: #155e6d;
  --smoke-white: #f5f5f5;
  --snow-white: #fffafa;
  --blue-flag: #00aec8;
  --teal-blue: #008080;
  --earth-green: #7eaf72;
  --earth-black: #000000;
  --light-blue: #4fc3f7;
  --gradient-smoke-white: #f5f5f5;
  --color-primary: #155e6d;
  --color-accent: #00aec8;
  --color-text: #000000;
  --font-base: 16px;
  --font-face: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --line-height: 1.7;
  --reading-body-size: calc(var(--font-base) - 1px);
  --reading-head-size: calc(var(--font-base) + 3px);
  --headline-size: calc(var(--font-base) + 2px);
  --title-size: calc(var(--font-base) + 4px);
  --app-bar-action-touch: 36px;
  --app-bar-action-icon: 22px;
  --grace-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --grace-teal: rgba(21, 94, 109, 0.42);
}

@font-face {
  font-family: "Narsoz";
  src: url("/fonts/Narsoz.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: block;
}

.narsoz-icon {
  font-family: "Narsoz", sans-serif;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  speak: never;
}

.ni-share::before { content: "\e805"; }
.ni-info::before { content: "\e80c"; }
.ni-link::before { content: "\e80d"; }
.ni-apps::before { content: "\e80e"; }
.ni-no-internet::before { content: "\e804"; }

@font-face {
  font-family: "Gothic";
  src: url("/fonts/KZGOTHIC.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Sans SR";
  src: url("/fonts/Kzsanssr.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Bookman Old Style";
  src: url("/fonts/KZBookmanOldStyle.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Comp Pro Regular";
  src: url("/fonts/KZPFDinTextCompProRegular.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Exo 2 Regular";
  src: url("/fonts/KZExo2RegularCondensed.otf") format("opentype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Astana Pro Regular";
  src: url("/fonts/KZAstanaProRegular.otf") format("opentype");
  font-weight: 500;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  font-size: var(--font-base);
}

body {
  margin: 0;
  font-family: var(--font-face);
  background: var(--smoke-white);
  color: var(--earth-black);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
}

.app {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  background: var(--smoke-white);
}

/* Sticky top navigation — AppBar / GN (always above day picker) */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 1100;
  flex-shrink: 0;
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--dark-blue);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

.top-nav--player {
  background: var(--dark-blue);
  box-shadow: 0 1px 0 rgba(0, 174, 200, 0.18);
}

.top-nav .app-bar {
  padding-top: 0;
}

.app > .app-bar:first-child {
  padding-top: env(safe-area-inset-top, 0px);
}

/* App bar — same layout, morphs in place when playing */
.app-bar {
  position: relative;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 56px;
  padding: 0 2px 0 0;
  background: var(--dark-blue);
  color: var(--snow-white);
  overflow: hidden;
  isolation: isolate;
  transition: background 0.45s cubic-bezier(0.32, 0.72, 0, 1);
}

.app-bar--player {
  overflow: visible;
  background: linear-gradient(180deg, var(--dark-blue) 0%, #134a54 100%);
}

.app.gn-player-playing .top-nav--player {
  box-shadow: 0 2px 18px rgba(0, 174, 200, 0.14);
}

.app-bar-leading,
.app-bar-main,
.app-bar-actions {
  position: relative;
  z-index: 1;
  grid-row: 1;
}

.app-bar-leading {
  grid-column: 1;
}

.app-bar-main {
  grid-column: 2;
}

.app-bar-actions {
  grid-column: 3;
}

.app-bar--player .app-bar-leading {
  pointer-events: none;
}

.app-bar--player .app-bar-actions {
  pointer-events: none;
}

.app-bar--player .app-bar-actions .app-bar-btn {
  pointer-events: auto;
}

.app-bar-main {
  min-width: 0;
  padding-right: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.app-bar-main-row {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  padding-right: 52px;
}

.app-bar-time {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.62);
  text-align: right;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: opacity 0.32s ease;
  pointer-events: none;
}

.app-bar--player .app-bar-time {
  opacity: 1;
  pointer-events: auto;
}

.app-bar-time[aria-hidden="true"] {
  pointer-events: none;
}

.app-bar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  padding-right: 6px;
  min-width: calc(4 * var(--app-bar-action-touch) + 6px);
}

.app-bar-skip-icon {
  display: block;
  width: var(--app-bar-action-icon);
  height: var(--app-bar-action-icon);
  flex-shrink: 0;
}

.app-bar-btn--player-only {
  max-width: 0;
  min-width: 0;
  opacity: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
  pointer-events: none;
  transform: scale(0.88);
  transition:
    max-width 0.42s cubic-bezier(0.32, 0.72, 0, 1),
    opacity 0.28s ease,
    transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
}

.app-bar--player .app-bar-btn--player-only {
  max-width: var(--app-bar-action-touch);
  min-width: var(--app-bar-action-touch);
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
  color: var(--snow-white);
}

.app-bar--player .app-bar-btn--player-only:disabled {
  opacity: 0.32;
}

.app-bar-btn--idle-only {
  max-width: var(--app-bar-action-touch);
  min-width: var(--app-bar-action-touch);
  opacity: 1;
  transform: scale(1);
  transition:
    max-width 0.38s cubic-bezier(0.32, 0.72, 0, 1),
    opacity 0.28s ease,
    transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
}

.app-bar--player .app-bar-btn--idle-only {
  max-width: 0;
  min-width: 0;
  opacity: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
  pointer-events: none;
  transform: scale(0.88);
}

.app-bar-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -12px;
  grid-column: 1 / -1;
  grid-row: 1;
  z-index: 5;
  height: 22px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition:
    opacity 0.45s var(--grace-ease),
    transform 0.45s var(--grace-ease);
  --app-bar-progress: 0;
}

.app-bar-progress.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.app-bar-progress-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  width: 100%;
  height: 4px;
  border-radius: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.12) 10%,
    rgba(255, 255, 255, 0.16) 50%,
    rgba(255, 255, 255, 0.12) 90%,
    transparent 100%
  );
  overflow: hidden;
  pointer-events: none;
}

.app-bar-seek-input {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
  touch-action: none;
}

.app-bar-seek-input:disabled {
  cursor: default;
  pointer-events: none;
}

.app-bar-progress-fill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
  transform: scaleX(var(--app-bar-progress, 0));
  transform-origin: left center;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.45) 0%,
      rgba(127, 232, 245, 0.55) 28%,
      var(--blue-flag) 62%,
      #008fa8 100%
    ),
    radial-gradient(ellipse 18px 6px at 18% 40%, rgba(255, 255, 255, 0.55), transparent 70%),
    radial-gradient(ellipse 22px 7px at 52% 55%, rgba(255, 255, 255, 0.35), transparent 72%),
    radial-gradient(ellipse 16px 5px at 82% 35%, rgba(255, 255, 255, 0.4), transparent 70%);
  background-repeat: no-repeat;
  background-size: 100% 100%, 36% 160%, 42% 170%, 34% 150%;
  background-position: 0 0, 0% 30%, 40% 70%, 80% 40%;
  box-shadow:
    0 0 14px rgba(0, 174, 200, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.2s linear;
  will-change: transform, background-position;
  pointer-events: none;
  animation: none;
}

.app-bar-progress.has-progress:not(.app-bar-progress--indeterminate) .app-bar-progress-fill,
.app.gn-player-playing .app-bar-progress-fill {
  animation: water-slosh 2.8s ease-in-out infinite;
}

.app-bar-progress-fill::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 3px;
  background:
    radial-gradient(ellipse 10px 3px at 12% 50%, rgba(255, 255, 255, 0.7), transparent 70%),
    radial-gradient(ellipse 14px 3px at 38% 50%, rgba(255, 255, 255, 0.45), transparent 70%),
    radial-gradient(ellipse 11px 3px at 64% 50%, rgba(255, 255, 255, 0.55), transparent 70%),
    radial-gradient(ellipse 13px 3px at 88% 50%, rgba(255, 255, 255, 0.4), transparent 70%);
  opacity: 0;
  pointer-events: none;
}

.app-bar-progress.has-progress:not(.app-bar-progress--indeterminate) .app-bar-progress-fill::before,
.app.gn-player-playing .app-bar-progress-fill::before {
  opacity: 0.9;
  animation: water-surface 2.2s ease-in-out infinite;
}

.app-bar-progress-fill::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  width: 8px;
  height: 8px;
  border-radius: 50% 50% 50% 10%;
  background: radial-gradient(circle at 35% 30%, #fff 0%, #7fe8f5 45%, var(--blue-flag) 100%);
  transform: translate(35%, -55%) rotate(45deg);
  box-shadow:
    0 0 0 1.5px rgba(255, 255, 255, 0.35),
    0 0 10px rgba(0, 174, 200, 0.5);
  opacity: 0;
  transition: opacity 0.3s var(--grace-ease);
}

.app-bar-progress.has-progress:not(.app-bar-progress--indeterminate) .app-bar-progress-fill::after {
  opacity: 1;
  animation: water-drop-bob 1.8s ease-in-out infinite;
}

.app-bar-progress.app-bar-progress--indeterminate .app-bar-progress-fill {
  width: 28%;
  transform: none;
  animation: grace-progress-drop 1.6s var(--grace-ease) infinite;
  transition: none;
}

.app-bar-progress.app-bar-progress--indeterminate .app-bar-progress-fill::before,
.app-bar-progress.app-bar-progress--indeterminate .app-bar-progress-fill::after {
  opacity: 0;
  animation: none;
}

@keyframes water-slosh {
  0%, 100% {
    background-position: 0 0, 0% 25%, 45% 75%, 85% 35%;
  }
  50% {
    background-position: 0 0, 28% 70%, 15% 30%, 60% 65%;
  }
}

@keyframes water-surface {
  0%, 100% { transform: translateX(0); opacity: 0.75; }
  50% { transform: translateX(6%); opacity: 1; }
}

@keyframes water-drop-bob {
  0%, 100% { transform: translate(35%, -55%) rotate(45deg) scale(1); }
  50% { transform: translate(35%, -70%) rotate(45deg) scale(1.08); }
}

@keyframes grace-progress-drop {
  0% { transform: translateX(-40%); opacity: 0.35; }
  40% { opacity: 1; }
  100% { transform: translateX(360%); opacity: 0.2; }
}

.app.gn-player-playing .app-bar-progress-track {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(127, 232, 245, 0.14) 14%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(127, 232, 245, 0.14) 86%,
    transparent 100%
  );
}

@media (prefers-reduced-motion: reduce) {
  .app-bar,
  .app-bar-time,
  .app-bar-btn--player-only,
  .app-bar-btn--idle-only,
  .app-bar-progress,
  .app-bar-progress-fill {
    transition-duration: 0.01ms !important;
  }

  .app-bar-progress.app-bar-progress--indeterminate .app-bar-progress-fill {
    animation: none !important;
  }

  .app-bar-progress,
  .app-bar-progress.is-visible {
    transform: none !important;
  }

  .app-bar-progress-fill,
  .app-bar-progress-fill::before,
  .app-bar-progress-fill::after,
  .app-bar-grace-drop {
    animation: none !important;
  }

  .app-bar--playing .app-bar-logo-wrap::before,
  .app-bar--playing .app-bar-logo-wrap::after,
  .app-bar--playing .app-bar-logo,
  .app-bar-eq-bar {
    animation: none !important;
  }

  .app-bar--playing .app-bar-logo {
    transform: scale(1.04);
  }

  .app-bar--playing .app-bar-logo-wrap::before,
  .app-bar--playing .app-bar-logo-wrap::after {
    opacity: 0.7;
  }
}

.app-bar--sub {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 56px;
  padding: 0 2px 0 2px;
}

.app-bar-leading {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 56px;
  padding: 0 10px;
}

.app-bar-logo-wrap {
  position: relative;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: visible;
}

.app-bar-grace-drops {
  position: absolute;
  left: 50%;
  top: 70%;
  z-index: 3;
  width: 0;
  height: 0;
  pointer-events: none;
  opacity: 0;
}

.app-bar--playing .app-bar-grace-drops,
.app-bar-logo-wrap.is-grace-settling .app-bar-grace-drops {
  opacity: 1;
}

.app-bar-grace-drop {
  position: absolute;
  left: 0;
  top: 0;
  width: 5px;
  height: 7px;
  border-radius: 50% 50% 50% 10%;
  background: radial-gradient(circle at 35% 30%, #fff 0%, #7fe8f5 42%, rgba(0, 174, 200, 0.85) 100%);
  box-shadow: 0 0 6px rgba(0, 174, 200, 0.45);
  opacity: 0;
  transform: translate(-50%, 0) rotate(45deg) scale(0.6);
}

.app-bar--playing .app-bar-grace-drop,
.app-bar-logo-wrap.is-grace-settling .app-bar-grace-drop {
  animation: grace-drop-fall 2.4s var(--grace-ease) infinite;
}

.app-bar-grace-drop:nth-child(1) {
  margin-left: -5px;
  animation-delay: 0s;
}

.app-bar-grace-drop:nth-child(2) {
  width: 4px;
  height: 6px;
  margin-left: 4px;
  animation-delay: 0.75s;
}

.app-bar-grace-drop:nth-child(3) {
  width: 3.5px;
  height: 5px;
  margin-left: -1px;
  animation-delay: 1.45s;
}

@keyframes grace-drop-fall {
  0% {
    opacity: 0;
    transform: translate(-50%, 0) rotate(45deg) scale(0.45);
  }
  12% {
    opacity: 0.95;
    transform: translate(-50%, 2px) rotate(45deg) scale(0.85);
  }
  70% {
    opacity: 0.7;
    transform: translate(-50%, 18px) rotate(45deg) scale(0.7);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, 26px) rotate(45deg) scale(0.35);
  }
}

.app-bar-logo-wrap::before,
.app-bar-logo-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.app-bar-logo-wrap::before {
  inset: -6px;
  background: radial-gradient(
    circle,
    rgba(0, 174, 200, 0.5) 0%,
    rgba(0, 174, 200, 0.22) 38%,
    rgba(0, 174, 200, 0.06) 62%,
    transparent 78%
  );
}

.app-bar-logo-wrap::after {
  inset: -2px;
  border: 1.5px solid rgba(127, 232, 245, 0.65);
  box-shadow: 0 0 8px rgba(0, 174, 200, 0.35);
}

.app-bar-logo {
  display: block;
  position: relative;
  z-index: 1;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  transition:
    transform 0.35s var(--grace-ease),
    filter 0.35s ease,
    box-shadow 0.35s ease;
}

.app-bar-logo-wrap.is-grace-settling .app-bar-logo {
  animation: grace-logo-settle 0.9s var(--grace-ease) both;
}

.app-bar-logo-wrap.is-grace-settling::before {
  opacity: 0.85;
  animation: grace-logo-aura 0.9s var(--grace-ease) both;
}

@keyframes grace-logo-settle {
  0% {
    opacity: 0;
    transform: translateY(-8px) scale(0.88);
  }
  60% {
    opacity: 1;
    transform: translateY(1px) scale(1.04);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes grace-logo-aura {
  0% { opacity: 0; transform: scale(0.7); }
  55% { opacity: 0.9; transform: scale(1.08); }
  100% { opacity: 0; transform: scale(1.2); }
}

.app-bar-now-playing {
  position: absolute;
  right: -2px;
  bottom: -2px;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 1.5px;
  width: 14px;
  height: 14px;
  padding: 2px;
  border-radius: 50%;
  background: rgba(19, 74, 84, 0.94);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.3),
    0 0 0 1.5px rgba(0, 174, 200, 0.45);
  opacity: 0;
  transform: scale(0.7);
  transition:
    opacity 0.3s ease,
    transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  pointer-events: none;
}

.app-bar-eq-bar {
  display: block;
  width: 1.5px;
  height: 100%;
  max-height: 7px;
  border-radius: 999px;
  background: linear-gradient(180deg, #7fe8f5 0%, var(--blue-flag) 100%);
  transform-origin: center bottom;
  transform: scaleY(0.35);
  opacity: 0.9;
}

.app-bar-eq-bar:nth-child(1) { animation: app-bar-eq-a 0.72s ease-in-out infinite; }
.app-bar-eq-bar:nth-child(2) { animation: app-bar-eq-b 0.86s ease-in-out infinite 0.08s; }
.app-bar-eq-bar:nth-child(3) { animation: app-bar-eq-c 0.64s ease-in-out infinite 0.16s; }
.app-bar-eq-bar:nth-child(4) { animation: app-bar-eq-a 0.78s ease-in-out infinite 0.24s; }

.app-bar--playing .app-bar-logo {
  transform: scale(1.04);
  filter: brightness(1.06) saturate(1.08);
  box-shadow:
    0 0 0 1px rgba(127, 232, 245, 0.35),
    0 0 12px rgba(0, 174, 200, 0.45);
  animation: app-bar-logo-breathe 2.6s ease-in-out infinite;
}

.app-bar--playing .app-bar-logo-wrap::before {
  opacity: 1;
  animation: app-bar-aura 2.4s ease-in-out infinite;
}

.app-bar--playing .app-bar-logo-wrap::after {
  opacity: 1;
  animation: app-bar-ring 2s ease-out infinite;
}

.app-bar--playing .app-bar-now-playing {
  opacity: 1;
  transform: scale(1);
}

@keyframes app-bar-eq-a {
  0%, 100% { transform: scaleY(0.28); }
  35% { transform: scaleY(1); }
  70% { transform: scaleY(0.45); }
}

@keyframes app-bar-eq-b {
  0%, 100% { transform: scaleY(0.4); }
  40% { transform: scaleY(0.95); }
  65% { transform: scaleY(0.3); }
}

@keyframes app-bar-eq-c {
  0%, 100% { transform: scaleY(0.55); }
  30% { transform: scaleY(0.25); }
  60% { transform: scaleY(1); }
}

@keyframes app-bar-logo-breathe {
  0%, 100% {
    transform: scale(1.03);
    box-shadow:
      0 0 0 1px rgba(127, 232, 245, 0.28),
      0 0 10px rgba(0, 174, 200, 0.35);
  }
  50% {
    transform: scale(1.07);
    box-shadow:
      0 0 0 1.5px rgba(127, 232, 245, 0.5),
      0 0 16px rgba(0, 174, 200, 0.55);
  }
}

@keyframes app-bar-aura {
  0%, 100% {
    opacity: 0.45;
    transform: scale(0.92);
  }
  50% {
    opacity: 0.95;
    transform: scale(1.12);
  }
}

@keyframes app-bar-ring {
  0% {
    opacity: 0.9;
    transform: scale(1);
    border-color: rgba(127, 232, 245, 0.7);
  }
  70% {
    opacity: 0;
    transform: scale(1.55);
    border-color: rgba(0, 174, 200, 0);
  }
  100% {
    opacity: 0;
    transform: scale(1.55);
  }
}

.app-bar-title {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-family: inherit;
  font-size: calc(var(--font-base) - 2px);
  font-weight: 400;
  line-height: 1.2;
  color: var(--snow-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-bar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--app-bar-action-touch);
  height: var(--app-bar-action-touch);
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--snow-white);
  font-size: var(--app-bar-action-icon);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s ease;
}

.app-bar-btn .narsoz-icon {
  font-size: var(--app-bar-action-icon);
  color: inherit;
}

.app-bar-btn svg {
  display: block;
  width: var(--app-bar-action-icon);
  height: var(--app-bar-action-icon);
}

.app-bar-btn--menu {
  position: relative;
}

.app-bar-menu-icon {
  transition:
    opacity 0.32s cubic-bezier(0.32, 0.72, 0, 1),
    transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
}

.app-bar-menu-icon--menu {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.app-bar-menu-icon--close {
  position: absolute;
  inset: 0;
  margin: auto;
  opacity: 0;
  transform: scale(0.82) rotate(-90deg);
  pointer-events: none;
}

.app-bar--player .app-bar-menu-icon--menu {
  opacity: 0;
  transform: scale(0.82);
  pointer-events: none;
}

.app-bar--player .app-bar-menu-icon--close {
  opacity: 1;
  transform: scale(1) rotate(0deg);
  pointer-events: none;
}

.app-bar--player .app-bar-btn--menu {
  color: var(--snow-white);
}

.app-bar-btn:hover,
.app-bar-btn:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.app-bar-btn:active {
  background: rgba(255, 255, 255, 0.16);
}

.app-bar-btn--audio.is-playing {
  color: var(--teal-blue);
}

.audio-app-icon {
  display: block;
}

#audioAppIcon .audio-icon-state {
  display: none;
}

#audioAppIcon .audio-icon-state.is-visible {
  display: block;
}

/* Day picker — single calendar icon in app bar (left of headphones) */
.app-bar-btn--day .day-chip-calendar,
.app-bar-btn--day .day-chip-close {
  display: block;
  width: 22px;
  height: 22px;
  color: currentColor;
}

.app-bar-btn--day .day-chip-close {
  display: none;
}

.app-bar-btn--day.is-open {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.app-bar-btn--day.is-open .day-chip-calendar {
  display: none;
}

.app-bar-btn--day.is-open .day-chip-close {
  display: block;
}

.app-bar-btn--share .share-chip-icon,
.app-bar-btn--share .share-chip-close {
  display: block;
  width: 22px;
  height: 22px;
  color: currentColor;
}

.app-bar-btn--share .share-chip-close {
  display: none;
}

.app-bar-btn--share.is-open {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.app-bar-btn--share.is-open .share-chip-icon {
  display: none;
}

.app-bar-btn--share.is-open .share-chip-close {
  display: block;
}

body.day-picker-open .top-nav,
body.share-sheet-open .top-nav {
  box-shadow:
    0 1px 0 rgba(0, 174, 200, 0.22),
    0 8px 24px rgba(21, 94, 109, 0.12);
}

/* Legacy GN bar styles kept for snapshots; unused in live chrome */
.gn-bar {
  display: none;
}

@keyframes gn-indeterminate {
  0% { transform: scaleX(0.4) translateX(-120%); }
  100% { transform: scaleX(0.4) translateX(320%); }
}

@keyframes gn-pulse {
  0%, 100% { transform: scaleY(0.45); opacity: 0.55; }
  50% { transform: scaleY(1); opacity: 1; }
}

.audio-ctrl-icon[hidden] {
  display: none;
}

/* App chrome when player active */
.app.gn-player-active .top-nav--player {
  box-shadow: 0 2px 16px rgba(0, 128, 128, 0.18);
}

.app-bar-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 4px 0 4px 2px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--snow-white);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.app-bar-back:hover,
.app-bar-back:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.app-bar-btn.lang-chip {
  width: auto;
  min-width: 42px;
  height: 36px;
  margin-right: 6px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--dark-blue);
  background: var(--snow-white);
}

.app-bar-btn.lang-chip:hover,
.app-bar-btn.lang-chip:focus-visible {
  background: #f0f0f0;
}

.day-bar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--dark-blue);
  cursor: pointer;
}

.day-bar-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.day-chip {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--earth-black);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.day-chip-chevron {
  flex-shrink: 0;
  color: var(--dark-blue);
  opacity: 0.9;
}

.day-chip:hover,
.day-chip:focus-visible {
  background: rgba(21, 94, 109, 0.08);
  outline: none;
}

/* Passage reference — matches Flutter blueFlag bar */
.passage-bar {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: linear-gradient(180deg, var(--blue-flag) 0%, #00a0b8 100%);
  color: var(--snow-white);
  text-align: center;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.12);
}

.passage-bar:hover,
.passage-bar:focus-visible {
  filter: brightness(1.05);
  outline: none;
}

/* Legacy header (community page) */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  padding-top: max(10px, env(safe-area-inset-top, 0px));
  background: var(--color-primary);
  color: #fff;
  font-size: 15px;
  flex-shrink: 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  display: block;
  flex-shrink: 0;
}

.app-name {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-date {
  font-size: 13px;
  opacity: 0.95;
  margin-right: 4px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.header-date:hover,
.header-date:focus-visible {
  background: rgba(255, 255, 255, 0.2);
  outline: none;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.lang-toggle {
  min-width: 38px;
  min-height: 36px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: #fff;
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.lang-toggle:hover,
.lang-toggle:focus-visible {
  outline: none;
  background: #e8f4f5;
}

.icon-btn:hover,
.icon-btn:focus-visible {
  background: rgba(255, 255, 255, 0.22);
  outline: none;
}

.icon-btn:active {
  background: rgba(255, 255, 255, 0.3);
}

.icon-btn--audio.playing {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-primary);
}

.icon-btn--audio.icon-btn--has-audio {
  background: rgba(79, 195, 247, 0.25);
  border-color: var(--color-accent);
}

/* Content — quiet reading space */
.app-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 18px 18px 36px;
  line-height: var(--line-height);
  -webkit-overflow-scrolling: touch;
}

.app-content.is-grace-revealing > * {
  animation: grace-content-settle 0.7s var(--grace-ease) both;
}

.app-content.is-grace-revealing > *:nth-child(2) { animation-delay: 0.06s; }
.app-content.is-grace-revealing > *:nth-child(3) { animation-delay: 0.12s; }
.app-content.is-grace-revealing > *:nth-child(4) { animation-delay: 0.16s; }

@keyframes grace-content-settle {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.placeholder {
  color: #888;
  text-align: center;
  margin-top: 40px;
}

.loading-state,
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  padding: 24px;
  text-align: center;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(21, 94, 109, 0.15);
  border-top-color: var(--blue-flag);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.error-state .narsoz-icon {
  font-size: 70px;
  color: var(--teal-blue);
  margin-bottom: 20px;
}

.error-state p {
  margin: 0;
  font-size: var(--title-size);
  font-weight: 500;
  line-height: 1.45;
  white-space: pre-line;
}

/* Bible passage — Word first (nourishment) */
.btext-block {
  font-family: var(--font-face);
  font-size: var(--reading-body-size);
  font-weight: 450;
  line-height: 1.75;
  color: var(--earth-black);
  letter-spacing: -0.01em;
}

.btext-block .section-title,
.btext-block strong {
  font-weight: 700;
  font-size: var(--reading-head-size);
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}

.btext-block .passage-subtitle {
  font-style: italic;
  margin: 0 0 16px;
  color: #3a3a3a;
  opacity: 0.88;
}

.btext-block p {
  margin: 0 0 12px;
}

.btext-block sup {
  font-size: 0.65em;
  vertical-align: super;
  line-height: 0;
  font-weight: 600;
  color: var(--dark-blue);
  margin-right: 2px;
}

.btext-block .chapter-num {
  font-weight: 700;
  font-size: 1.08em;
  margin: 16px 0 8px;
  display: block;
  color: var(--dark-blue);
}

.btext-block .verse-line {
  margin-bottom: 10px;
}

.divider {
  border: none;
  height: 1px;
  margin: 28px 24px 24px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 174, 200, 0.55) 50%,
    transparent 100%
  );
}

/* Devotional — quieter companion to scripture */
.thought-block {
  font-family: var(--font-face);
  font-size: calc(var(--reading-body-size) - 0.5px);
  font-weight: 400;
  color: #1a1a1a;
  line-height: 1.72;
  opacity: 0.92;
}

.thought-block strong {
  font-family: inherit;
  font-size: var(--reading-head-size);
  font-weight: 700;
  color: var(--earth-black);
  opacity: 1;
}

/* Video and sharing */
.video-share-card,
.daily-share-card {
  margin-top: 24px;
  padding: 16px;
  border: 1px solid #d8e8ea;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 3px 14px rgba(13, 92, 99, 0.08);
}

.supplement-header {
  margin-bottom: 12px;
}

.supplement-header h2 {
  margin: 0;
  color: var(--color-primary);
  font-size: 1rem;
  line-height: 1.3;
}

.supplement-header p {
  margin: 4px 0 0;
  color: #667;
  font-size: 0.85rem;
  line-height: 1.35;
}

.vertical-video-frame {
  position: relative;
  width: min(100%, 240px);
  aspect-ratio: 9 / 16;
  margin: 0 auto 12px;
  overflow: hidden;
  border-radius: 18px;
  background:
    radial-gradient(circle at top, rgba(79, 195, 247, 0.35), transparent 34%),
    linear-gradient(160deg, #052f34, #0d5c63);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.video-thumbnail {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vertical-video-frame .video-link-preview {
  position: relative;
  z-index: 1;
  background: linear-gradient(to top, rgba(5, 47, 52, 0.94), rgba(5, 47, 52, 0.35) 58%, rgba(5, 47, 52, 0.08));
}

.vertical-video-frame video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.video-link-preview {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 18px;
  color: #fff;
  text-align: center;
}

.video-source {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.video-link-preview strong {
  font-size: 1.2rem;
  line-height: 1.25;
}

.video-card-play {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22);
  font-size: 1.35rem;
  line-height: 1;
}

.video-note {
  margin: 0 0 12px;
  color: #666;
  font-size: 0.82rem;
  line-height: 1.4;
}

.primary-link-button,
.share-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  border: none;
  border-radius: 12px;
  background: var(--color-primary);
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.share-form {
  display: grid;
  gap: 8px;
}

.share-form input,
.share-form textarea {
  width: 100%;
  border: 1px solid #ccdadd;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fbfbfb;
  color: var(--color-text);
  font: inherit;
}

.share-form textarea {
  resize: vertical;
  min-height: 88px;
}

.share-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.share-empty {
  margin: 0;
  color: #777;
  font-size: 0.9rem;
}

.share-item {
  padding: 12px;
  border-radius: 12px;
  background: #f2f7f8;
}

.share-meta {
  margin-bottom: 5px;
  color: var(--color-primary);
  font-size: 0.78rem;
  font-weight: 800;
}

.share-item p {
  margin: 0;
  line-height: 1.45;
}

/* Bottom tab bar */
.app-tab-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  flex-shrink: 0;
  background: #fff;
  border-top: 1px solid #e0e0e0;
  padding-bottom: max(0px, env(safe-area-inset-bottom, 0px));
}

.app-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 8px;
  color: #667;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  border-top: 3px solid transparent;
}

.app-tab--active {
  color: var(--color-primary);
  border-top-color: var(--color-accent);
  background: #f2f9fa;
}

/* YouTube testimony */
.testimony-card {
  margin-top: 16px;
}

.testimony-video-frame + .testimony-video-frame {
  margin-top: 12px;
}

.vertical-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.youtube-video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0 auto 12px;
  overflow: hidden;
  border-radius: 14px;
  background: #111;
}

.youtube-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.youtube-video-frame video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

.youtube-play-button {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 100%;
  border: none;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.15) 50%, rgba(0, 0, 0, 0.35));
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.youtube-play-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  font-size: 1.4rem;
}

/* Day navigation */
.day-nav {
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 10px 14px 8px;
  background: #fff;
  border-top: 1px solid #e0e0e0;
  flex-shrink: 0;
}

.day-nav-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 10px;
  background: #fff;
  color: var(--color-primary);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.day-nav-btn:hover:not(:disabled),
.day-nav-btn:focus-visible:not(:disabled) {
  background: #e8f4f5;
  border-color: var(--color-primary);
  outline: none;
}

.day-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.day-nav-btn--today {
  flex: 0 0 auto;
  min-width: 72px;
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.day-nav-btn--today:hover {
  background: #0a4a50;
}

.day-nav-arrow {
  font-size: 1.1em;
}

/* Day picker — drops from under GN (clipped so it never covers GN) */
.day-picker {
  --day-picker-top: 56px;
  position: fixed;
  top: var(--day-picker-top);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  overflow: hidden;
  pointer-events: none;
}

.day-picker-backdrop,
.day-picker-panel {
  pointer-events: auto;
}

body.day-picker-open {
  overflow: hidden;
}

.day-picker-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(21, 94, 109, 0.42);
  opacity: 0;
  transition: opacity 0.42s ease;
}

.day-picker.is-open .day-picker-backdrop {
  opacity: 1;
}

.day-picker.is-closing .day-picker-backdrop {
  opacity: 0;
}

.day-picker-panel {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  max-height: min(72dvh, 460px);
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(
      180deg,
      #d8eef2 0%,
      #eef7f9 14%,
      #fff8ef 36%,
      #ffffff 62%,
      #ffffff 100%
    );
  border-radius: 0 0 22px 22px;
  box-shadow:
    0 16px 40px rgba(21, 94, 109, 0.2),
    0 2px 8px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  border-top: 2px solid rgba(0, 174, 200, 0.35);
  padding-top: 0;
  transform: translate(-50%, calc(-100% - 12px));
  transition: transform 0.48s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -0.01em;
}

.day-picker.is-open .day-picker-panel {
  transform: translate(-50%, 0);
}

.day-picker.is-closing .day-picker-panel {
  transform: translate(-50%, calc(-100% - 12px));
}

.day-picker-grab {
  display: flex;
  justify-content: center;
  padding: 10px 0 14px;
  cursor: grab;
  touch-action: none;
  margin-top: auto;
}

.day-picker-grab:active {
  cursor: grabbing;
}

.day-picker-grab-bar {
  display: block;
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(0, 174, 200, 0.5), transparent);
}

.day-picker-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(21, 94, 109, 0.1);
  background: linear-gradient(180deg, rgba(21, 94, 109, 0.06) 0%, transparent 100%);
}

.day-picker-heading {
  min-width: 0;
  flex: 1;
}

.day-picker-title {
  margin: 0;
  color: var(--earth-black);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.day-picker-invite {
  margin: 6px 0 0;
  color: #555;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.day-picker-close {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #757575;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.day-picker-close .day-picker-icon {
  display: block;
}

.day-picker-close:hover,
.day-picker-close:focus-visible {
  background: rgba(0, 0, 0, 0.06);
  color: #424242;
  outline: none;
}

.day-picker-close:active {
  background: rgba(0, 0, 0, 0.1);
}

.day-picker-month {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 2px 8px 4px;
}

.day-picker-month-label {
  flex: 1;
  text-align: center;
  color: var(--dark-blue);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0;
}

.day-picker-month-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--dark-blue);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.day-picker-month-btn .day-picker-icon {
  display: block;
}

.day-picker-month-btn:hover:not(:disabled),
.day-picker-month-btn:focus-visible:not(:disabled) {
  background: rgba(21, 94, 109, 0.08);
  outline: none;
}

.day-picker-month-btn:disabled {
  opacity: 0.28;
  cursor: not-allowed;
}

.day-picker-calendar {
  position: relative;
  padding: 2px 16px 0;
}

.day-picker-weekdays {
  margin-bottom: 4px;
}

.day-picker-weekday {
  padding: 0;
  color: #555;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  letter-spacing: 0.02em;
}

.day-picker-weekdays,
.day-picker-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
  row-gap: 2px;
}

.day-picker-grid.is-settling {
  animation: day-picker-settle 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes day-picker-settle {
  0% {
    opacity: 0.35;
    transform: translateY(-8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.day-picker-day {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 40px;
  max-height: 40px;
  max-width: 40px;
  margin: 0 auto;
  padding: 0 0 4px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--earth-black, #2a2a2a);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  overflow: visible;
  transition: transform 0.14s ease, color 0.14s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.day-picker-day-num {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.day-picker-day--outside {
  color: #c5bfb6;
}

.day-picker-day--outside .day-picker-day-num {
  opacity: 0.55;
}

/* Read days only — blue dot */
.day-picker-day--completed:not(.day-picker-day--selected)::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0%, #7fe8f5 45%, var(--blue-flag) 100%);
  box-shadow: 0 0 6px rgba(0, 174, 200, 0.45);
  transform: translateX(-50%);
  pointer-events: none;
}

.day-picker-day--outside.day-picker-day--completed:not(.day-picker-day--selected)::after {
  opacity: 0.45;
}

.day-picker-day--completed:not(.day-picker-day--selected):not(.day-picker-day--today) .day-picker-day-num {
  color: var(--earth-black);
  font-weight: 600;
}

/* Today — soft warm invite ring (anticipation) */
.day-picker-day--today:not(.day-picker-day--selected) .day-picker-day-num {
  box-shadow: inset 0 0 0 1.5px rgba(210, 150, 70, 0.75);
  color: var(--earth-black);
  font-weight: 700;
  background: rgba(255, 236, 200, 0.55);
}

.day-picker-day--today:not(.day-picker-day--selected)::before {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(50% - 2px);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(232, 180, 90, 0.35);
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: day-picker-today-ripple 2.8s ease-out infinite;
}

@keyframes day-picker-today-ripple {
  0% {
    transform: translate(-50%, -50%) scale(0.92);
    opacity: 0.7;
  }
  70% {
    transform: translate(-50%, -50%) scale(1.28);
    opacity: 0;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.28);
    opacity: 0;
  }
}

/* Selected — brand teal glow */
.day-picker-day--selected .day-picker-day-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.9) 0%, transparent 42%),
    linear-gradient(165deg, #7fe8f5 0%, var(--blue-flag) 48%, var(--dark-blue) 100%);
  color: #fff;
  font-weight: 700;
  box-shadow:
    0 2px 12px rgba(0, 174, 200, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transform: none;
}

.day-picker-day--selected .day-picker-day-num > span {
  display: block;
  transform: none;
}

/* Today still open — warm anticipation */
.day-picker-day--invite:not(.day-picker-day--selected) .day-picker-day-num {
  background: rgba(255, 240, 210, 0.75);
  box-shadow:
    inset 0 0 0 1.5px rgba(220, 160, 70, 0.7),
    0 0 12px rgba(255, 210, 130, 0.4);
}

.day-picker-day--invite:not(.day-picker-day--selected):not(.day-picker-day--completed)::after {
  display: none;
}

@keyframes day-picker-invite-dew {
  0%, 100% { opacity: 0.55; transform: translateX(-50%) scale(0.9); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.15); }
}

@keyframes day-picker-invite-light {
  0%, 100% { opacity: 0.55; transform: translateX(-50%) scale(0.9); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.2); }
}

.day-picker-grace {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 16px 0;
  padding: 11px 14px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 248, 235, 0.98) 0%, rgba(255, 255, 255, 0.92) 55%, rgba(232, 247, 250, 0.55) 100%);
  border: 1px solid rgba(220, 180, 120, 0.28);
}

.day-picker-growth {
  position: relative;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  color: var(--earth-black);
}

.day-picker-rainbow {
  position: absolute;
  left: 50%;
  top: 4px;
  width: 28px;
  height: 14px;
  margin-left: -14px;
  border-radius: 28px 28px 0 0;
  background: conic-gradient(
    from 200deg at 50% 100%,
    #e8b87a 0deg,
    #f0c878 40deg,
    #7fe8f5 95deg,
    var(--blue-flag) 140deg,
    #8eb8d8 180deg,
    transparent 180deg
  );
  opacity: 0;
  mask-image: radial-gradient(ellipse 100% 120% at 50% 100%, transparent 42%, #000 48%, #000 70%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 100% 120% at 50% 100%, transparent 42%, #000 48%, #000 70%, transparent 78%);
  transition: opacity 0.45s ease;
  pointer-events: none;
}

.day-picker-grace.has-grace .day-picker-rainbow {
  opacity: 0.55;
}

.day-picker-grace[data-growth="flower"] .day-picker-rainbow,
.day-picker-grace[data-growth="tree"] .day-picker-rainbow {
  opacity: 0.75;
}

.day-picker-plant {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  display: block;
  overflow: visible;
}

.day-picker-plant-layer {
  opacity: 0;
  transform: translateY(4px) scale(0.92);
  transform-origin: 20px 34px;
  transition:
    opacity 0.4s ease,
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.day-picker-grace[data-growth="seed"] .day-picker-plant-layer--seed,
.day-picker-grace[data-growth="sprout"] .day-picker-plant-layer--sprout,
.day-picker-grace[data-growth="bud"] .day-picker-plant-layer--bud,
.day-picker-grace[data-growth="flower"] .day-picker-plant-layer--flower,
.day-picker-grace[data-growth="tree"] .day-picker-plant-layer--tree {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.day-picker-grace.has-grace .day-picker-plant {
  animation: day-picker-plant-breathe 3.2s ease-in-out infinite;
}

@keyframes day-picker-plant-breathe {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1px); }
}

.day-picker-grace-text {
  margin: 0;
  color: var(--earth-black);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.01em;
  opacity: 0.9;
}

.day-picker-day--disabled {
  opacity: 0.34;
  cursor: not-allowed;
}

.day-picker-day--disabled.day-picker-day--available {
  opacity: 0.34;
}

.day-picker-day:not(.day-picker-day--disabled):not(.day-picker-day--selected):active .day-picker-day-num {
  background: rgba(21, 94, 109, 0.16);
  transform: scale(0.94);
}

.day-picker-day:not(.day-picker-day--disabled):not(.day-picker-day--selected):hover .day-picker-day-num,
.day-picker-day:not(.day-picker-day--disabled):not(.day-picker-day--selected):focus-visible .day-picker-day-num {
  background: rgba(255, 236, 200, 0.55);
}

.day-picker-day:not(.day-picker-day--disabled):focus-visible {
  outline: none;
}

/* Pick ripple — warm anticipation */
.day-picker-ripple {
  position: absolute;
  left: 0;
  top: 0;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  border: 1.5px solid rgba(232, 180, 90, 0.5);
  background: radial-gradient(circle, rgba(255, 230, 170, 0.45) 0%, transparent 70%);
  pointer-events: none;
  z-index: 4;
  animation: day-picker-pick-ripple 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes day-picker-pick-ripple {
  0% {
    transform: scale(0.4);
    opacity: 0.9;
  }
  100% {
    transform: scale(14);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .day-picker-backdrop,
  .day-picker-panel {
    transition: none;
  }

  .day-picker .day-picker-backdrop {
    opacity: 1;
  }

  .day-picker .day-picker-panel {
    transform: translate(-50%, 0);
  }

  .day-picker-grid.is-settling,
  .day-picker-day--today:not(.day-picker-day--selected)::before,
  .day-picker-day--invite:not(.day-picker-day--selected)::after,
  .day-picker-grace.has-grace .day-picker-plant,
  .day-picker-ripple {
    animation: none !important;
  }

  .day-picker-plant-layer {
    transition: none !important;
  }
}

/* Share sheet — drops from under GN (same pattern as day picker) */
.share-sheet {
  --share-sheet-top: 56px;
  position: fixed;
  top: var(--share-sheet-top);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  overflow: hidden;
  pointer-events: none;
}

.share-sheet-backdrop,
.share-sheet-panel {
  pointer-events: auto;
}

body.share-sheet-open {
  overflow: hidden;
}

.share-sheet-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(21, 94, 109, 0.42);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.share-sheet.is-open .share-sheet-backdrop {
  opacity: 1;
}

.share-sheet.is-closing .share-sheet-backdrop {
  opacity: 0;
}

.share-sheet-panel {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 0 0 20px 20px;
  box-shadow:
    0 12px 40px rgba(21, 94, 109, 0.18),
    0 2px 8px rgba(0, 0, 0, 0.06);
  border-top: 2px solid rgba(0, 174, 200, 0.35);
  padding-top: 0;
  transform: translate(-50%, calc(-100% - 12px));
  transition: transform 0.48s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.share-sheet.is-open .share-sheet-panel {
  transform: translate(-50%, 0);
}

.share-sheet.is-closing .share-sheet-panel {
  transform: translate(-50%, calc(-100% - 12px));
}

.share-sheet-grab {
  display: flex;
  justify-content: center;
  padding: 10px 0 14px;
  cursor: grab;
  touch-action: none;
  order: 3;
}

.share-sheet-grab:active {
  cursor: grabbing;
}

.share-sheet-grab-bar {
  display: block;
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: rgba(21, 94, 109, 0.22);
}

.share-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(21, 94, 109, 0.08);
  order: 1;
}

.share-sheet-title {
  margin: 0;
  color: var(--earth-black);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.share-sheet-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 18px 12px 4px;
  order: 2;
}

.share-sheet-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: #333;
  font: inherit;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.share-sheet-action:hover,
.share-sheet-action:focus-visible {
  background: rgba(21, 94, 109, 0.06);
  outline: none;
}

.share-sheet-action:active {
  background: rgba(21, 94, 109, 0.1);
}

.share-sheet-action:disabled {
  opacity: 0.55;
  cursor: wait;
}

.share-sheet-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  color: #fff;
}

.share-sheet-icon--whatsapp {
  background: #25d366;
}

.share-sheet-icon--telegram {
  background: #6bbfe0;
}

.share-sheet-icon--copy {
  background: #b4a8f0;
}

.share-sheet-icon--image {
  background: #e6e6e6;
  color: #666;
}

.share-sheet-label {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  color: #444;
}

.share-sheet-toast {
  margin: 4px 16px 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0, 174, 200, 0.1);
  color: var(--dark-blue);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  animation: grace-toast-settle 0.45s var(--grace-ease) both;
}

.share-sheet-toast[hidden] {
  display: none;
}

@keyframes grace-toast-settle {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-content.is-grace-revealing > *,
  .app-bar-logo-wrap.is-grace-settling .app-bar-logo,
  .app-bar-logo-wrap.is-grace-settling::before,
  .share-sheet-toast {
    animation: none !important;
  }

  .share-sheet-backdrop,
  .share-sheet-panel {
    transition: none;
  }

  .share-sheet .share-sheet-backdrop {
    opacity: 1;
  }

  .share-sheet .share-sheet-panel {
    transform: translate(-50%, 0);
  }
}

/* Popup menu — matches Flutter PopupMenuButton */
.popup-menu {
  position: fixed;
  z-index: 1200;
  min-width: 220px;
  max-width: min(320px, calc(100vw - 16px));
  padding: 4px 0;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
}

.popup-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 4px 12px 4px 8px;
  border: none;
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 16px;
  color: var(--earth-black);
  cursor: pointer;
}

.popup-menu-item:hover,
.popup-menu-item:focus-visible {
  background: rgba(21, 94, 109, 0.08);
  outline: none;
}

.popup-menu-item .material-icon {
  width: 24px;
  font-size: 24px;
  color: var(--teal-blue);
  flex-shrink: 0;
}

.popup-menu-item .narsoz-icon {
  width: 24px;
  font-size: 24px;
  color: var(--teal-blue);
  flex-shrink: 0;
}

.popup-menu-item .ni-apps {
  padding-left: 4px;
}

.popup-scrim {
  position: fixed;
  inset: 0;
  z-index: 1190;
  background: transparent;
}

/* Settings page — matches Flutter Settings cards */
.settings-page {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  flex-direction: column;
  background: var(--smoke-white);
  max-width: 480px;
  margin: 0 auto;
  padding-top: env(safe-area-inset-top, 0px);
}

.settings-page .app-bar {
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

.settings-page[hidden] {
  display: none;
}

.settings-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px 24px;
}

.settings-card {
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.settings-card h2 {
  margin: 5px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--earth-black);
}

.settings-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 5px;
}

.settings-row .settings-icon,
.popup-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--earth-green);
  flex-shrink: 0;
}

.popup-menu-item .popup-icon {
  color: var(--teal-blue);
}

.settings-row-label {
  flex: 1;
  font-size: 1rem;
  font-weight: 500;
}

.settings-row select {
  max-width: 52%;
  padding: 6px 10px;
  border: none;
  border-radius: 4px;
  background: var(--teal-blue);
  color: var(--snow-white);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.settings-slider {
  flex: 1;
  min-width: 0;
  accent-color: #536dfe;
}

.settings-slider-value {
  min-width: 28px;
  text-align: right;
  font-size: 14px;
  color: #666;
}

/* About dialog — matches Flutter alertDialog */
.about-dialog {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.about-dialog[hidden] {
  display: none;
}

.about-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.about-dialog-panel {
  position: relative;
  width: min(100%, 360px);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  padding: 8px 0 20px;
}

.about-dialog-close {
  display: flex;
  justify-content: flex-end;
  padding: 0 8px;
}

.about-dialog-close button {
  border: none;
  background: transparent;
  color: var(--blue-flag);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}

.about-dialog-title {
  margin: 0;
  padding: 0 20px 5px;
  text-align: center;
  font-size: var(--headline-size);
  font-weight: 600;
}

.about-dialog hr {
  border: none;
  border-top: 2px solid var(--blue-flag);
  margin: 3px 19px 3px 20px;
}

.about-dialog-body {
  padding: 5px 20px 0;
  line-height: 1.5;
  font-size: var(--font-base);
}

.about-dialog-body p {
  margin: 0 0 10px;
}

.about-dialog-link {
  display: inline-block;
  margin: 0 0 10px 0;
  padding: 0;
  border: none;
  background: none;
  color: var(--light-blue);
  font: inherit;
  font-size: calc(var(--font-base) - 2px);
  text-decoration: underline;
  cursor: pointer;
}

.about-dialog-meta {
  text-align: center;
  font-size: var(--font-base);
  margin: 3px 0;
}

/* Sheets — menu, settings, about */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 1100;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 80dvh;
  overflow: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.18);
}

.sheet-panel--menu {
  padding: 8px 0;
}

.sheet-panel--menu button {
  display: block;
  width: 100%;
  padding: 14px 20px;
  border: none;
  background: #fff;
  text-align: left;
  font: inherit;
  font-size: 16px;
  color: var(--earth-black);
  cursor: pointer;
}

.sheet-panel--menu button:hover {
  background: #e8f4f5;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #e8e8e8;
  color: var(--dark-blue);
}

.sheet-close {
  border: none;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  color: var(--blue-flag);
  cursor: pointer;
}

.sheet-body {
  padding: 16px;
}

.sheet-body p {
  margin: 0 0 12px;
  line-height: 1.5;
}

.sheet-muted {
  color: #666;
  font-size: 14px;
}

.sheet-form label {
  display: block;
  margin-bottom: 16px;
  font-weight: 600;
  color: var(--dark-blue);
}

.sheet-form select,
.sheet-form input[type="range"] {
  display: block;
  width: 100%;
  margin-top: 8px;
  font: inherit;
}

.sheet-form select {
  padding: 10px 12px;
  border: 1px solid #ccdadd;
  border-radius: 10px;
  background: #fbfbfb;
}

/* Font size levels */
html[data-text-size="small"] { --font-base: 14px; }
html[data-text-size="medium"] { --font-base: 16px; }
html[data-text-size="large"] { --font-base: 19px; }
html[data-text-size="xlarge"] { --font-base: 23px; }

@media (min-width: 481px) {
  body {
    background: #e0e0e0;
  }

  .app {
    margin-top: 24px;
    margin-bottom: 24px;
    min-height: calc(100dvh - 48px);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  }
}
