:root {
  --v5-bg: #fbf8f7;
  --v5-surface: #ffffff;
  --v5-surface-soft: #f6f2ff;
  --v5-ink: #29243a;
  --v5-muted: #746f80;
  --v5-line: rgba(92, 75, 139, .14);
  --v5-brand: #7866cb;
  --v5-brand-dark: #5f4fb1;
  --v5-brand-soft: #eee9ff;
  --v5-peach: #f3b2a8;
  --v5-success: #3f806d;
  --v5-warning: #b96f28;
  --v5-danger: #b64b59;
  --v5-shadow: 0 18px 50px rgba(58, 44, 83, .12);
  --v5-radius: 24px;
  --v5-bottom-height: 78px;
}

body.v5-active:not(.welcome-mode):not(.intro-only) {
  background:
    radial-gradient(circle at 8% 0%, rgba(224, 214, 255, .58), transparent 32%),
    radial-gradient(circle at 96% 8%, rgba(255, 220, 220, .52), transparent 30%),
    var(--v5-bg);
  color: var(--v5-ink);
}

body.v5-active.night {
  --v5-bg: #101421;
  --v5-surface: #1b2130;
  --v5-surface-soft: #252a3d;
  --v5-ink: #f5f2fb;
  --v5-muted: #b9b5c5;
  --v5-line: rgba(224, 216, 255, .16);
  --v5-brand: #a99af0;
  --v5-brand-dark: #c6bcff;
  --v5-brand-soft: #302d4b;
  --v5-peach: #d28f96;
  --v5-success: #76bda8;
  --v5-warning: #e7a765;
  --v5-danger: #ef8f9b;
  --v5-shadow: 0 18px 50px rgba(0, 0, 0, .34);
  background: #101421;
}

body.v5-active:not(.welcome-mode):not(.intro-only) .app {
  display: block;
  min-height: 100dvh;
  max-width: 900px;
  margin: 0 auto;
  background: transparent;
}

body.v5-active:not(.welcome-mode):not(.intro-only) .sidebar,
body.v5-active:not(.welcome-mode):not(.intro-only) #v4ContextBar,
body.v5-active:not(.welcome-mode):not(.intro-only) #v4BottomNav,
body.v5-active:not(.welcome-mode):not(.intro-only) #v4AiFab,
body.v5-active:not(.welcome-mode):not(.intro-only) #v4QuickSheet,
body.v5-active:not(.welcome-mode):not(.intro-only) #v4ToolsSheet,
body.v5-active:not(.welcome-mode):not(.intro-only) #v4DesktopNav {
  display: none !important;
}

body.v5-active:not(.welcome-mode):not(.intro-only) .main {
  width: 100%;
  max-width: 760px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 0 16px calc(var(--v5-bottom-height) + 76px + env(safe-area-inset-bottom));
  background: transparent;
}

body.v5-active:not(.welcome-mode):not(.intro-only) .view {
  padding-top: 12px;
}

body.v5-active:not(.welcome-mode):not(.intro-only) .view > .topbar {
  display: none !important;
}

body.v5-active:not(.welcome-mode):not(.intro-only) .panel,
body.v5-active:not(.welcome-mode):not(.intro-only) .item,
body.v5-active:not(.welcome-mode):not(.intro-only) .quick,
body.v5-active:not(.welcome-mode):not(.intro-only) .report-box,
body.v5-active:not(.welcome-mode):not(.intro-only) .modal-card,
body.v5-active:not(.welcome-mode):not(.intro-only) .all-tools-panel {
  color: var(--v5-ink);
  background: var(--v5-surface);
  border-color: var(--v5-line);
  box-shadow: 0 10px 30px rgba(58, 44, 83, .07);
}

body.v5-active.night:not(.welcome-mode):not(.intro-only) .panel,
body.v5-active.night:not(.welcome-mode):not(.intro-only) .item,
body.v5-active.night:not(.welcome-mode):not(.intro-only) .quick,
body.v5-active.night:not(.welcome-mode):not(.intro-only) .report-box,
body.v5-active.night:not(.welcome-mode):not(.intro-only) .modal-card,
body.v5-active.night:not(.welcome-mode):not(.intro-only) input,
body.v5-active.night:not(.welcome-mode):not(.intro-only) select,
body.v5-active.night:not(.welcome-mode):not(.intro-only) textarea,
body.v5-active.night:not(.welcome-mode):not(.intro-only) button:not(.primary) {
  color: var(--v5-ink) !important;
  background-color: var(--v5-surface) !important;
  border-color: var(--v5-line) !important;
}

body.v5-active.night:not(.welcome-mode):not(.intro-only) .muted,
body.v5-active.night:not(.welcome-mode):not(.intro-only) small,
body.v5-active.night:not(.welcome-mode):not(.intro-only) p {
  color: var(--v5-muted) !important;
}

#v5Header {
  position: sticky;
  z-index: 80;
  top: 0;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 70px;
  margin: 0 -4px 8px;
  padding: max(8px, env(safe-area-inset-top)) 4px 8px;
  background: color-mix(in srgb, var(--v5-bg) 88%, transparent);
  border-bottom: 1px solid var(--v5-line);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

#v5Header[data-home="true"] .v5-back {
  visibility: hidden;
  pointer-events: none;
}

#v5Header[data-home="true"] [data-v5-home] {
  display: none;
}

#v5Header:not([data-home="true"]) [data-v5-feature="profiles"] {
  display: none;
}

.v5-header-title {
  min-width: 0;
}

.v5-header-title strong,
.v5-header-title span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v5-header-title strong {
  font-size: 16px;
  color: var(--v5-ink);
}

.v5-header-title span {
  margin-top: 2px;
  font-size: 12px;
  color: var(--v5-muted);
}

.v5-header-actions {
  display: flex;
  gap: 8px;
}

.v5-icon-button {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  color: var(--v5-ink);
  background: var(--v5-surface);
  border: 1px solid var(--v5-line);
  border-radius: 50%;
  box-shadow: 0 8px 22px rgba(58, 44, 83, .08);
}

.v5-icon-button svg,
.v5-icon svg,
.v5-nav-icon svg,
.v5-timer-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#home > :not(#v5Home) {
  display: none !important;
}

#v5Home {
  display: grid;
  gap: 14px;
}

.v5-card {
  padding: 20px;
  color: var(--v5-ink);
  background: var(--v5-surface);
  border: 1px solid var(--v5-line);
  border-radius: var(--v5-radius);
  box-shadow: var(--v5-shadow);
}

.v5-hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(239, 233, 255, .96), rgba(255, 244, 239, .98));
}

body.night .v5-hero {
  background: linear-gradient(135deg, #292547, #2a2638);
}

.v5-hero::after {
  position: absolute;
  right: -42px;
  bottom: -62px;
  width: 160px;
  height: 160px;
  content: "";
  background: rgba(244, 173, 178, .24);
  border-radius: 50%;
}

.v5-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  color: var(--v5-brand-dark);
  background: var(--v5-brand-soft);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.v5-hero h1,
.v5-hero h2,
.v5-section-head h2,
.v5-flow-head h1,
.v5-drawer-head h2 {
  margin: 10px 0 6px;
  color: var(--v5-ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.03;
}

.v5-hero h1,
.v5-hero h2 {
  max-width: 510px;
  font-size: clamp(31px, 8vw, 46px);
}

.v5-hero p,
.v5-section-head p,
.v5-flow-head p {
  margin: 0;
  color: var(--v5-muted);
  line-height: 1.55;
}

.v5-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 18px;
}

.v5-status {
  min-width: 0;
  padding: 13px;
  background: color-mix(in srgb, var(--v5-surface) 86%, transparent);
  border: 1px solid var(--v5-line);
  border-radius: 17px;
}

.v5-status span,
.v5-status strong {
  display: block;
}

.v5-status span {
  margin-bottom: 4px;
  color: var(--v5-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.v5-status strong {
  overflow: hidden;
  color: var(--v5-ink);
  font-size: 14px;
  text-overflow: ellipsis;
}

.v5-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.v5-section-head h2 {
  margin: 0;
  font-size: 28px;
}

.v5-link-button {
  min-height: 42px;
  padding: 8px 12px;
  color: var(--v5-brand-dark);
  background: var(--v5-brand-soft);
  border: 0;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.v5-home-favorites,
.v5-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.v5-action,
.v5-choice {
  position: relative;
  display: flex;
  min-height: 96px;
  padding: 15px;
  color: var(--v5-ink);
  text-align: left;
  background: var(--v5-surface);
  border: 1px solid var(--v5-line);
  border-radius: 19px;
  box-shadow: 0 10px 24px rgba(58, 44, 83, .07);
}

.v5-action {
  align-items: center;
  gap: 12px;
}

.v5-choice {
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.v5-action:active,
.v5-choice:active,
.v5-bottom-action:active {
  transform: scale(.98);
}

.v5-icon {
  display: inline-grid;
  flex: 0 0 44px;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--v5-brand-dark);
  background: var(--v5-brand-soft);
  border-radius: 15px;
}

.v5-action strong,
.v5-action small,
.v5-choice strong,
.v5-choice small {
  display: block;
}

.v5-action strong,
.v5-choice strong {
  color: var(--v5-ink);
  font-size: 14px;
  line-height: 1.25;
}

.v5-action small,
.v5-choice small {
  margin-top: 4px;
  color: var(--v5-muted);
  font-size: 12px;
  line-height: 1.35;
}

.v5-row-card {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 76px;
  padding: 15px;
  color: var(--v5-ink);
  text-align: left;
  background: var(--v5-surface);
  border: 1px solid var(--v5-line);
  border-radius: 19px;
}

.v5-row-card > div:nth-child(2) {
  min-width: 0;
  flex: 1;
  text-align: left;
}

.v5-row-card strong,
.v5-row-card span {
  display: block;
}

.v5-row-card span {
  margin-top: 3px;
  color: var(--v5-muted);
  font-size: 13px;
}

.v5-row-arrow {
  color: var(--v5-brand);
  font-size: 22px;
}

#v5BottomBar {
  position: fixed;
  z-index: 120;
  right: 50%;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(100%, 760px);
  min-height: calc(var(--v5-bottom-height) + env(safe-area-inset-bottom));
  padding: 14px 8px calc(8px + env(safe-area-inset-bottom));
  transform: translateX(50%);
  background: color-mix(in srgb, var(--v5-surface) 94%, transparent);
  border: 1px solid var(--v5-line);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -12px 38px rgba(50, 38, 72, .14);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  touch-action: pan-x;
}

#v5BottomBar.v5-hidden-for-modal {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

#v5BottomBar::before {
  position: absolute;
  top: 6px;
  left: 50%;
  width: 44px;
  height: 4px;
  content: "";
  transform: translateX(-50%);
  background: color-mix(in srgb, var(--v5-muted) 42%, transparent);
  border-radius: 999px;
}

.v5-bottom-action {
  display: flex;
  min-width: 0;
  min-height: 56px;
  padding: 8px 3px 3px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--v5-muted);
  background: transparent;
  border: 0;
  border-radius: 14px;
  font-size: 10px;
  font-weight: 800;
}

.v5-bottom-action.active {
  color: var(--v5-brand-dark);
  background: var(--v5-brand-soft);
}

.v5-nav-icon {
  display: grid;
  place-items: center;
  height: 25px;
}

#v5DrawerOverlay {
  position: fixed;
  z-index: 180;
  inset: 0;
  visibility: hidden;
  opacity: 0;
  background: rgba(25, 21, 36, .46);
  transition: opacity .22s ease, visibility .22s ease;
}

#v5DrawerOverlay.open {
  visibility: visible;
  opacity: 1;
}

#v5Drawer {
  position: absolute;
  right: 50%;
  bottom: 0;
  display: flex;
  width: min(100%, 760px);
  max-height: min(88dvh, 820px);
  padding: 7px 16px calc(22px + env(safe-area-inset-bottom));
  transform: translate(50%, 102%);
  flex-direction: column;
  color: var(--v5-ink);
  background: var(--v5-bg);
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -22px 70px rgba(25, 20, 38, .28);
  transition: transform .3s cubic-bezier(.2, .8, .2, 1);
  touch-action: pan-y;
}

#v5DrawerOverlay.open #v5Drawer {
  transform: translate(50%, 0);
}

.v5-drawer-handle {
  display: grid;
  flex: 0 0 34px;
  place-items: center;
  width: 100%;
  padding: 0;
  background: transparent;
  border: 0;
}

.v5-drawer-handle::before {
  width: 56px;
  height: 5px;
  content: "";
  background: color-mix(in srgb, var(--v5-muted) 38%, transparent);
  border-radius: 999px;
}

.v5-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px 12px;
}

.v5-drawer-head h2 {
  margin: 0;
  font-size: 31px;
}

.v5-drawer-head p {
  margin: 3px 0 0;
  color: var(--v5-muted);
  font-size: 13px;
}

.v5-drawer-scroll {
  overflow: auto;
  padding: 2px 1px 36px;
  overscroll-behavior: contain;
}

.v5-drawer-group {
  margin-top: 20px;
}

.v5-drawer-group:first-child {
  margin-top: 4px;
}

.v5-drawer-group h3 {
  margin: 0 0 9px 3px;
  color: var(--v5-muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.v5-drawer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.v5-drawer-app {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 106px;
  padding: 13px 42px 13px 10px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 9px;
  color: var(--v5-ink);
  text-align: left;
  background: var(--v5-surface);
  border: 1px solid var(--v5-line);
  border-radius: 18px;
}

.v5-drawer-app-wrap {
  position: relative;
  min-width: 0;
}

.v5-drawer-app-wrap .v5-drawer-app {
  padding-right: 42px;
}

.v5-drawer-app-wrap.is-priority {
  grid-column: 1 / -1;
}

.v5-drawer-app-wrap.is-priority .v5-drawer-app {
  min-height: 78px;
  padding: 12px 54px 12px 13px;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  background: linear-gradient(135deg, color-mix(in srgb, var(--v5-brand-soft) 86%, var(--v5-surface)), var(--v5-surface));
  border-color: color-mix(in srgb, var(--v5-brand) 24%, var(--v5-line));
}

.v5-drawer-app-wrap.is-priority .v5-drawer-app strong {
  font-size: 15px;
}

.v5-drawer-pin {
  position: absolute;
  top: 9px;
  right: 9px;
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  color: var(--v5-muted);
  background: color-mix(in srgb, var(--v5-surface) 90%, transparent);
  border: 1px solid var(--v5-line);
  border-radius: 11px;
}

.v5-drawer-pin svg {
  display: block;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.v5-drawer-pin.active {
  color: var(--v5-brand-dark);
  background: var(--v5-brand-soft);
  border-color: color-mix(in srgb, var(--v5-brand) 28%, var(--v5-line));
}

.v5-drawer-app strong {
  font-size: 12px;
  line-height: 1.25;
}

.v5-teeth-age-card {
  display: flex;
  align-items: center;
  gap: 14px;
}

.v5-teeth-age-card > .v5-icon {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  color: var(--v5-brand-dark);
  background: var(--v5-brand-soft);
  border-radius: 17px;
}

.v5-teeth-age-card strong {
  color: var(--v5-ink);
  font-size: 17px;
}

.v5-teeth-age-card p {
  margin: 3px 0 0;
  color: var(--v5-muted);
  font-size: 13px;
  line-height: 1.4;
}

.v5-tier {
  display: inline-flex;
  min-height: 20px;
  padding: 3px 7px;
  align-items: center;
  color: var(--v5-brand-dark);
  background: var(--v5-brand-soft);
  border-radius: 999px;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.v5-tier.free {
  color: var(--v5-success);
  background: color-mix(in srgb, var(--v5-success) 13%, var(--v5-surface));
}

.v5-drawer-tip {
  position: fixed;
  z-index: 140;
  right: 50%;
  bottom: calc(var(--v5-bottom-height) + 14px + env(safe-area-inset-bottom));
  max-width: min(330px, calc(100vw - 32px));
  padding: 10px 13px;
  transform: translateX(50%);
  color: var(--v5-ink);
  background: var(--v5-surface);
  border: 1px solid var(--v5-line);
  border-radius: 14px;
  box-shadow: var(--v5-shadow);
  font-size: 12px;
  line-height: 1.35;
}

.v5-drawer-tip button {
  margin-left: 6px;
  padding: 3px 7px;
  color: var(--v5-brand-dark);
  background: transparent;
  border: 0;
  font-weight: 900;
}

#v5PersistentTimers {
  position: fixed;
  z-index: 115;
  right: 50%;
  bottom: calc(var(--v5-bottom-height) + 11px + env(safe-area-inset-bottom));
  display: none;
  width: min(calc(100% - 24px), 736px);
  transform: translateX(50%);
  gap: 8px;
}

#v5PersistentTimers.active {
  display: flex;
}

.v5-timer-pill {
  display: flex;
  min-width: 0;
  min-height: 52px;
  padding: 9px 9px 9px 13px;
  flex: 1;
  align-items: center;
  gap: 9px;
  color: #fff;
  background: #342d52;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(24, 19, 39, .25);
}

.v5-timer-pill > div {
  min-width: 0;
  flex: 1;
}

.v5-timer-pill strong,
.v5-timer-pill span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v5-timer-pill strong {
  font-size: 13px;
}

.v5-timer-pill span {
  margin-top: 2px;
  color: rgba(255,255,255,.72);
  font-size: 11px;
}

.v5-timer-pill button {
  min-width: 76px;
  min-height: 36px;
  padding: 6px 9px;
  color: #342d52;
  background: #fff;
  border: 0;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 900;
}

#v5AudioDock {
  position: fixed;
  z-index: 114;
  right: 50%;
  bottom: calc(var(--v5-bottom-height) + 10px + env(safe-area-inset-bottom));
  display: none;
  width: min(calc(100% - 24px), 736px);
  padding: 10px;
  transform: translateX(50%);
  color: #fff;
  background: #342d52;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 20px;
  box-shadow: 0 14px 36px rgba(24, 19, 39, .28);
}

#v5AudioDock.active { display: block; }

.v5-audio-dock-inner {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
}

.v5-audio-dock-inner > div { min-width: 0; }
.v5-audio-dock-inner strong,
.v5-audio-dock-inner span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v5-audio-dock-inner strong { font-size: 13px; }
.v5-audio-dock-inner span { margin-top: 2px; color: rgba(255,255,255,.7); font-size: 10px; }
.v5-audio-dock-inner button {
  min-height: 34px;
  padding: 6px 9px;
  color: #342d52;
  background: #fff;
  border: 0;
  border-radius: 11px;
  font-size: 10px;
  font-weight: 900;
}

.v5-audio-controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,.13);
}

.v5-audio-controls label {
  display: grid;
  grid-template-columns: auto minmax(74px, 1fr);
  align-items: center;
  gap: 7px;
  color: rgba(255,255,255,.78);
  font-size: 9px;
  font-weight: 800;
}

.v5-audio-controls input { min-height: 24px !important; }
.v5-audio-controls select {
  min-height: 30px !important;
  padding: 4px 24px 4px 7px !important;
  color: #342d52 !important;
  background: #fff !important;
  border-radius: 9px !important;
  font-size: 10px !important;
}

body.v5-audio-active:not(.welcome-mode):not(.intro-only) .main {
  padding-bottom: calc(var(--v5-bottom-height) + 174px + env(safe-area-inset-bottom));
}

body.v5-audio-active #v5PersistentTimers {
  bottom: calc(var(--v5-bottom-height) + 122px + env(safe-area-inset-bottom));
}

.v5-flow {
  max-width: 620px;
  margin: 0 auto;
}

.v5-flow-progress {
  display: grid;
  grid-template-columns: repeat(var(--steps, 3), 1fr);
  gap: 6px;
  margin: 8px 0 22px;
}

.v5-flow-progress span {
  height: 4px;
  background: var(--v5-line);
  border-radius: 99px;
}

.v5-flow-progress span.active {
  background: var(--v5-brand);
}

.v5-flow-head {
  margin-bottom: 18px;
}

.v5-flow-head h1 {
  font-size: clamp(34px, 9vw, 48px);
}

.v5-form-card {
  display: grid;
  gap: 14px;
  padding: 20px;
  background: var(--v5-surface);
  border: 1px solid var(--v5-line);
  border-radius: 22px;
  box-shadow: var(--v5-shadow);
}

.v5-form-card label {
  display: grid;
  gap: 7px;
  color: var(--v5-ink);
  font-size: 13px;
  font-weight: 800;
}

.v5-form-card input,
.v5-form-card select,
.v5-form-card textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  color: var(--v5-ink);
  background: var(--v5-surface);
  border: 1px solid var(--v5-line);
  border-radius: 15px;
  font: inherit;
  font-weight: 500;
}

.v5-form-card textarea {
  min-height: 100px;
  resize: vertical;
}

.v5-actions {
  display: flex;
  margin-top: 18px;
  flex-wrap: wrap;
  gap: 9px;
}

.v5-primary,
.v5-secondary,
.v5-text-action {
  min-height: 50px;
  padding: 11px 17px;
  border-radius: 15px;
  font-weight: 900;
}

.v5-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--v5-brand), #9c78d8);
  border: 0;
  box-shadow: 0 12px 24px rgba(110, 91, 191, .24);
}

.v5-secondary {
  color: var(--v5-brand-dark);
  background: var(--v5-brand-soft);
  border: 1px solid color-mix(in srgb, var(--v5-brand) 22%, transparent);
}

.v5-text-action {
  color: var(--v5-muted);
  background: transparent;
  border: 0;
}

.v5-confirm {
  display: grid;
  min-height: 260px;
  place-items: center;
  padding: 32px 20px;
  text-align: center;
  background: var(--v5-surface);
  border: 1px solid var(--v5-line);
  border-radius: 24px;
  box-shadow: var(--v5-shadow);
}

.v5-confirm-mark {
  display: grid;
  width: 68px;
  height: 68px;
  margin: 0 auto 14px;
  place-items: center;
  color: #fff;
  background: var(--v5-success);
  border-radius: 50%;
  font-size: 30px;
}

.v5-confirm h2 {
  margin: 0 0 7px;
  color: var(--v5-ink);
  font-size: 24px;
}

.v5-confirm p {
  max-width: 420px;
  margin: 0;
  color: var(--v5-muted);
  line-height: 1.5;
}

.v5-info-box,
.v5-warning-box,
.v5-source-box {
  padding: 14px;
  color: var(--v5-ink);
  background: var(--v5-surface-soft);
  border: 1px solid var(--v5-line);
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.5;
}

.v5-warning-box {
  color: color-mix(in srgb, var(--v5-warning) 80%, var(--v5-ink));
  background: color-mix(in srgb, var(--v5-warning) 10%, var(--v5-surface));
}

.v5-danger-box {
  color: var(--v5-danger);
  background: color-mix(in srgb, var(--v5-danger) 10%, var(--v5-surface));
  border-color: color-mix(in srgb, var(--v5-danger) 24%, transparent);
}

.v5-list {
  display: grid;
  gap: 9px;
}

.v5-empty {
  padding: 28px 18px;
  color: var(--v5-muted);
  text-align: center;
  background: var(--v5-surface);
  border: 1px dashed color-mix(in srgb, var(--v5-muted) 34%, transparent);
  border-radius: 18px;
}

.v5-favorite-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.v5-favorite-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 8px 9px;
  background: var(--v5-surface);
  border: 1px solid var(--v5-line);
  border-radius: 16px;
}

.v5-drag-handle {
  color: var(--v5-muted);
  font-size: 20px;
  cursor: grab;
  touch-action: none;
}

.v5-favorite-item strong {
  color: var(--v5-ink);
  font-size: 13px;
}

.v5-favorite-item select {
  min-width: 140px;
  min-height: 42px;
  padding: 7px 9px;
  color: var(--v5-ink);
  background: var(--v5-surface);
  border: 1px solid var(--v5-line);
  border-radius: 12px;
}

.v5-profile-tabs {
  display: flex;
  overflow-x: auto;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 2px;
}

.v5-profile-tabs button {
  min-height: 42px;
  padding: 8px 13px;
  color: var(--v5-muted);
  background: var(--v5-surface);
  border: 1px solid var(--v5-line);
  border-radius: 999px;
  white-space: nowrap;
}

.v5-profile-tabs button.active {
  color: var(--v5-brand-dark);
  background: var(--v5-brand-soft);
  border-color: color-mix(in srgb, var(--v5-brand) 30%, transparent);
  font-weight: 900;
}

.v5-profile-section {
  margin-top: 10px;
  overflow: hidden;
  background: color-mix(in srgb, var(--v5-brand-soft) 42%, #fff);
  border: 1px solid var(--v5-line);
  border-radius: 16px;
}

.v5-profile-section summary {
  position: relative;
  padding: 14px 42px 14px 14px;
  color: var(--v5-ink);
  cursor: pointer;
  list-style: none;
  font-size: 14px;
  font-weight: 900;
}

.v5-profile-section summary::-webkit-details-marker { display: none; }
.v5-profile-section summary::after {
  position: absolute;
  top: 50%;
  right: 16px;
  content: "+";
  transform: translateY(-50%);
  color: var(--v5-brand-dark);
  font-size: 20px;
}
.v5-profile-section[open] summary::after { content: "−"; }
.v5-profile-section > div { display: grid; gap: 12px; padding: 0 12px 12px; }

.v5-check-category {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 13px;
  color: var(--v5-ink);
  background: var(--v5-surface);
  border: 1px solid var(--v5-line);
  border-radius: 18px;
}

.v5-check-category small,
.v5-check-category strong {
  display: block;
}

.v5-check-category small {
  margin-top: 3px;
  color: var(--v5-muted);
}

/* V7.6 — checklisty ako jednoduché dotykové karty. */
.v5-checklist-shell { display: grid; gap: 14px; }
.v5-checklist-intro { padding: 2px 3px 0; }
.v5-checklist-intro span,
.v5-checklist-detail-head small {
  color: var(--v5-brand-dark);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.v5-checklist-intro h1 { margin: 3px 0 0; color: var(--v5-ink); font-size: 25px; line-height: 1.05; }
.v5-checklist-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
#v5PrenatalContent { padding-top: 16px; }
#v5PrenatalContent > .v5-flow-progress { display: none; }
.v5-check-category-card {
  position: relative;
  display: grid;
  min-height: 145px;
  padding: 15px;
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  align-items: center;
  gap: 10px;
  color: var(--v5-ink);
  text-align: left;
  background: linear-gradient(145deg, #f4efff, #fff);
  border: 1px solid var(--v5-line);
  border-radius: 23px;
  box-shadow: 0 9px 24px rgba(67, 49, 91, .06);
}
.v5-check-category-card:nth-child(2n) { background: linear-gradient(145deg, #fff2ed, #fff); }
.v5-check-category-card:nth-child(3n) { background: linear-gradient(145deg, #edf7ff, #fff); }
.v5-check-category-card .v5-icon { width: 48px; height: 48px; color: var(--v5-brand-dark); background: rgba(255,255,255,.88); border-radius: 16px; }
.v5-check-category-card .v5-icon svg { width: 25px; height: 25px; }
.v5-check-card-copy { min-width: 0; }
.v5-check-card-copy small,
.v5-check-card-copy strong { display: block; }
.v5-check-card-copy small { color: var(--v5-muted); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.v5-check-card-copy strong { margin-top: 3px; font-size: 13px; line-height: 1.18; }
.v5-check-count { position: absolute; top: 11px; right: 11px; padding: 5px 7px; color: var(--v5-brand-dark); background: rgba(255,255,255,.82); border-radius: 10px; font-size: 9px; font-weight: 900; }
.v5-check-progress { grid-column: 1 / -1; display: block; height: 6px; overflow: hidden; background: rgba(119, 99, 180, .1); border-radius: 999px; }
.v5-check-progress i { display: block; width: var(--progress); height: 100%; background: linear-gradient(90deg, #8a75d1, #d69aaa); border-radius: inherit; transition: width .2s ease; }
.v5-check-category-card.is-done { background: linear-gradient(145deg, #edf8f1, #fff); border-color: rgba(77, 134, 98, .25); }
.v5-check-category-card.is-done .v5-check-count { color: var(--v5-success); }

.v5-checklist-detail-head {
  display: grid;
  min-height: 112px;
  padding: 16px;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  background: linear-gradient(145deg, #f1ebff, #fff6f1);
  border: 1px solid var(--v5-line);
  border-radius: 24px;
}
.v5-checklist-detail-head .v5-icon { width: 54px; height: 54px; color: var(--v5-brand-dark); background: #fff; border-radius: 18px; }
.v5-checklist-detail-head h1 { margin: 3px 0 0; color: var(--v5-ink); font-size: 20px; line-height: 1.12; }
.v5-checklist-detail-head > strong { color: var(--v5-brand-dark); font-size: 16px; }
.v5-checklist-detail-head .v5-check-progress { grid-column: 1 / -1; }
.v5-check-items { display: grid; gap: 8px; }
.v5-check-item-card {
  position: relative;
  display: grid;
  min-height: 66px;
  padding: 10px 13px;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  color: var(--v5-ink);
  background: var(--v5-surface);
  border: 1px solid var(--v5-line);
  border-radius: 18px;
  cursor: pointer;
  transition: transform .14s ease, border-color .14s ease, background .14s ease;
}
.v5-check-item-card:active { transform: scale(.985); }
.v5-check-item-card:has(input:focus-visible) { outline: 3px solid rgba(121, 100, 201, .2); outline-offset: 2px; }
.v5-check-item-card input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.v5-check-toggle { display: grid; width: 38px; height: 38px; place-items: center; color: transparent; background: var(--v5-brand-soft); border: 2px solid rgba(113, 93, 183, .17); border-radius: 13px; font-weight: 950; }
.v5-check-item-card strong { font-size: 12px; line-height: 1.28; }
.v5-check-item-card.is-done { background: #f2f8f4; border-color: rgba(70, 132, 94, .22); }
.v5-check-item-card.is-done .v5-check-toggle { color: #fff; background: #6f9d80; border-color: #6f9d80; }
.v5-check-item-card.is-done strong { color: var(--v5-muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.v5-check-add { display: grid; margin-top: 2px; grid-template-columns: minmax(0, 1fr) 48px; gap: 8px; }
.v5-check-add input { min-height: 50px; padding: 10px 13px; color: var(--v5-ink); background: var(--v5-surface); border: 1px solid var(--v5-line); border-radius: 15px; font: inherit; }
.v5-check-add button { width: 48px; min-height: 48px; padding: 0; color: #fff; background: var(--v5-brand); border: 0; border-radius: 15px; font-size: 23px; }
.v5-check-categories-button { display: inline-flex; min-height: 44px; margin: 0 auto; padding: 8px 13px; align-items: center; gap: 7px; color: var(--v5-brand-dark); background: transparent; border: 0; font-size: 10px; font-weight: 900; }
.v5-check-categories-button svg { width: 17px; height: 17px; }
body.v5-active.night .v5-check-category-card,
body.v5-active.night .v5-checklist-detail-head,
body.v5-active.night .v5-check-item-card { background: var(--v5-surface); }
@media (max-width: 390px) {
  .v5-checklist-grid { gap: 7px; }
  .v5-check-category-card { min-height: 132px; padding: 12px; grid-template-columns: 42px minmax(0, 1fr); }
  .v5-check-category-card .v5-icon { width: 42px; height: 42px; }
  .v5-check-card-copy strong { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .v5-check-progress i,
  .v5-check-item-card { transition: none; }
}

/* V7.7 — samostatná Tehotenská knižka. */
#v5PregnancyBookContent { display: grid; gap: 12px; padding-top: 16px; }
#v5PregnancyBookContent > .v5-flow-progress { display: none; }
.v5-book-hero {
  display: grid;
  min-height: 154px;
  padding: 20px;
  grid-template-columns: minmax(0, 1fr) 104px;
  align-items: center;
  gap: 14px;
  background: linear-gradient(145deg, #f0eaff, #fff2ed);
  border: 1px solid var(--v5-line);
  border-radius: 26px;
  overflow: hidden;
}
.v5-book-hero small { color: var(--v5-brand-dark); font-size: 9px; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
.v5-book-hero h1 { margin: 5px 0 3px; color: var(--v5-ink); font-size: 27px; line-height: 1; }
.v5-book-hero p { margin: 0; color: var(--v5-muted); font-size: 11px; font-weight: 700; }
.v5-book-fruit { width: 104px; height: 104px; border: 8px solid rgba(255,255,255,.76); border-radius: 30px; box-shadow: 0 12px 28px rgba(72, 58, 103, .11); }
.v5-book-main-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.v5-book-main-grid button {
  display: grid;
  min-height: 126px;
  padding: 13px 9px;
  justify-items: start;
  align-content: start;
  gap: 7px;
  color: var(--v5-ink);
  text-align: left;
  background: var(--v5-surface);
  border: 1px solid var(--v5-line);
  border-radius: 21px;
  box-shadow: 0 8px 20px rgba(69, 52, 94, .05);
}
.v5-book-main-grid button:nth-child(2) { background: linear-gradient(145deg, #fff4ef, #fff); }
.v5-book-main-grid button:nth-child(3) { background: linear-gradient(145deg, #eef7ff, #fff); }
.v5-book-main-grid .v5-icon { width: 40px; height: 40px; border-radius: 13px; }
.v5-book-main-grid strong { font-size: 12px; line-height: 1.15; }
.v5-book-main-grid small { color: var(--v5-muted); font-size: 9px; line-height: 1.25; }
.v5-book-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.v5-book-tools button {
  display: grid;
  min-height: 72px;
  padding: 10px 12px;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  color: var(--v5-ink);
  text-align: left;
  background: var(--v5-surface);
  border: 1px solid var(--v5-line);
  border-radius: 18px;
}
.v5-book-tools .v5-icon { width: 38px; height: 38px; border-radius: 12px; }
.v5-book-tools strong,
.v5-book-tools small { display: block; }
.v5-book-tools strong { font-size: 11px; }
.v5-book-tools small { margin-top: 3px; color: var(--v5-muted); font-size: 8px; line-height: 1.2; }
.v5-book-note { margin: 0; padding: 4px 8px; color: var(--v5-muted); font-size: 9px; line-height: 1.35; text-align: center; }
.v5-book-detail-list { display: grid; gap: 8px; }
.v5-book-detail-list > div {
  display: grid;
  min-height: 68px;
  padding: 11px 13px;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  background: var(--v5-surface);
  border: 1px solid var(--v5-line);
  border-radius: 18px;
}
.v5-book-detail-list .v5-icon { width: 40px; height: 40px; border-radius: 13px; }
.v5-book-detail-list strong { font-size: 11px; line-height: 1.32; }
.v5-book-question-add { display: grid; grid-template-columns: minmax(0, 1fr) 50px; gap: 8px; }
.v5-book-question-add input { min-height: 52px; padding: 11px 14px; color: var(--v5-ink); background: var(--v5-surface); border: 1px solid var(--v5-line); border-radius: 16px; font: inherit; }
.v5-book-question-add button { min-height: 50px; color: #fff; background: var(--v5-brand); border: 0; border-radius: 16px; font-size: 23px; }
.v5-book-question-list { display: grid; gap: 8px; }
.v5-book-question-list > div { display: grid; min-height: 58px; padding: 9px 10px 9px 14px; grid-template-columns: minmax(0, 1fr) 38px; align-items: center; gap: 8px; background: var(--v5-surface); border: 1px solid var(--v5-line); border-radius: 17px; }
.v5-book-question-list span { font-size: 11px; font-weight: 800; line-height: 1.3; }
.v5-book-question-list button { width: 36px; height: 36px; color: var(--v5-muted); background: var(--v5-brand-soft); border: 0; border-radius: 12px; font-size: 18px; }
body.v5-active.night .v5-book-hero,
body.v5-active.night .v5-book-main-grid button,
body.v5-active.night .v5-book-tools button,
body.v5-active.night .v5-book-detail-list > div,
body.v5-active.night .v5-book-question-list > div { background: var(--v5-surface); }
@media (max-width: 390px) {
  .v5-book-hero { padding: 16px; grid-template-columns: minmax(0, 1fr) 82px; }
  .v5-book-fruit { width: 82px; height: 82px; border-radius: 24px; }
  .v5-book-main-grid button { min-height: 116px; padding: 11px 8px; }
}

.v5-zodiac-preview {
  position: relative;
  display: grid;
  overflow: hidden;
  min-height: 430px;
  padding: 30px 24px;
  place-items: center;
  align-content: center;
  color: #32284c;
  text-align: center;
  background: linear-gradient(145deg, #eee8ff, #ffe8df);
  border: 1px solid rgba(91, 73, 141, .18);
  border-radius: 30px;
  box-shadow: var(--v5-shadow);
}

.v5-zodiac-preview::before,
.v5-zodiac-preview::after {
  position: absolute;
  width: 180px;
  height: 180px;
  content: "";
  opacity: .32;
  border: 1px solid currentColor;
  border-radius: 48% 52% 58% 42%;
}

.v5-zodiac-preview::before {
  top: -84px;
  left: -58px;
  transform: rotate(18deg);
}

.v5-zodiac-preview::after {
  right: -72px;
  bottom: -90px;
  transform: rotate(-28deg);
}

.v5-zodiac-preview.palette-sage { background: linear-gradient(145deg, #dfe9dc, #fff5e8); color: #31594d; }
.v5-zodiac-preview.palette-sky { background: linear-gradient(145deg, #dcefff, #eee4ff); color: #414f85; }
.v5-zodiac-preview.palette-powder { background: linear-gradient(145deg, #f7dfe6, #f7eadc); color: #70485d; }
.v5-zodiac-preview.sign-lev { background-image: radial-gradient(circle at 50% 35%, rgba(255,210,98,.5), transparent 25%), linear-gradient(145deg, #f7e4b8, #f4d8df); }
.v5-zodiac-preview.sign-rak { background-image: radial-gradient(circle at 20% 20%, rgba(255,255,255,.8), transparent 28%), linear-gradient(145deg, #dceeff, #e9e2f8); }
.v5-zodiac-preview.sign-skorpion { background-image: linear-gradient(145deg, #e7dcf3, #f1d7df); }
.v5-zodiac-preview.sign-strelec { background-image: linear-gradient(145deg, #e9e1ff, #f8dfcc); }
.v5-zodiac-preview.sign-vodnar { background-image: linear-gradient(145deg, #d8eef2, #e2e2fb); }
.v5-zodiac-preview.sign-ryby { background-image: linear-gradient(145deg, #d9e8fa, #eadff8); }

.v5-zodiac-symbol {
  position: relative;
  z-index: 1;
  display: grid;
  width: 92px;
  height: 92px;
  margin: 10px 0;
  place-items: center;
  background: rgba(255,255,255,.52);
  border: 1px solid rgba(255,255,255,.74);
  border-radius: 50%;
  box-shadow: inset 0 0 0 7px rgba(255,255,255,.2);
  font-size: 50px;
}

.v5-zodiac-constellation {
  position: relative;
  z-index: 1;
  font-size: 25px;
  letter-spacing: .34em;
}

.v5-zodiac-preview small,
.v5-zodiac-preview h2,
.v5-zodiac-preview p,
.v5-zodiac-facts {
  position: relative;
  z-index: 1;
}

.v5-zodiac-preview small {
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.v5-zodiac-preview h2 {
  margin: 8px 0 6px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(42px, 12vw, 66px);
  line-height: .95;
}

.v5-zodiac-preview p {
  max-width: 360px;
  margin: 6px 0 18px;
  color: inherit;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 19px;
  font-weight: 700;
}

.v5-zodiac-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.v5-zodiac-facts span {
  padding: 7px 10px;
  background: rgba(255,255,255,.52);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.v5-zodiac-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
}

.v5-zodiac-grid button {
  display: grid;
  min-height: 105px;
  padding: 11px 8px;
  place-items: center;
  color: var(--v5-ink);
  background: var(--v5-surface);
  border: 1px solid var(--v5-line);
  border-radius: 17px;
}

.v5-zodiac-grid button.active {
  background: var(--v5-brand-soft);
  border: 2px solid var(--v5-brand);
}

.v5-zodiac-grid button span {
  font-size: 29px;
}

.v5-zodiac-grid button strong,
.v5-zodiac-grid button small {
  display: block;
}

.v5-zodiac-grid button strong { font-size: 12px; }
.v5-zodiac-grid button small { color: var(--v5-muted); font-size: 9px; letter-spacing: .1em; }

.toast.show {
  z-index: 210 !important;
  right: 50% !important;
  bottom: calc(var(--v5-bottom-height) + 78px + env(safe-area-inset-bottom)) !important;
  transform: translateX(50%) !important;
  color: #fff !important;
  background: #342d52 !important;
  border: 1px solid rgba(255,255,255,.12) !important;
}

@media (max-width: 560px) {
  body.v5-active:not(.welcome-mode):not(.intro-only) .main {
    padding-right: 12px;
    padding-left: 12px;
  }

  .v5-card,
  .v5-form-card {
    padding: 17px;
    border-radius: 21px;
  }

  .v5-home-favorites,
  .v5-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .v5-drawer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .v5-drawer-app {
    min-height: 102px;
    padding: 11px 8px;
  }

  .v5-favorite-item {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .v5-favorite-item select {
    grid-column: 2;
    width: 100%;
  }
}

@media (max-width: 360px) {
  .v5-drawer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .v5-status-grid,
  .v5-home-favorites,
  .v5-choice-grid {
    grid-template-columns: 1fr;
  }

  .v5-bottom-action {
    font-size: 9px;
  }
}

@media (min-width: 900px) {
  body.v5-active:not(.welcome-mode):not(.intro-only) .app {
    margin-top: 18px;
    margin-bottom: 18px;
    overflow: hidden;
    background: color-mix(in srgb, var(--v5-surface) 35%, transparent);
    border: 1px solid var(--v5-line);
    border-radius: 34px;
    box-shadow: 0 28px 80px rgba(48, 36, 67, .13);
  }

  #v5BottomBar {
    bottom: 18px;
    overflow: hidden;
    border: 1px solid var(--v5-line);
    border-radius: 24px;
  }

  #v5PersistentTimers {
    bottom: calc(var(--v5-bottom-height) + 30px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}

/* V6.8 — stabilná navigácia a rozloženie podľa skutočnej šírky obsahu */
body.v5-active:not(.welcome-mode):not(.intro-only) .main {
  container: v5main / inline-size;
}

#v5BottomBar {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

#v5DrawerTip {
  display: none !important;
}

.v5-sos-button {
  min-width: 44px;
  min-height: 38px;
  padding: 0 9px;
  color: #a72f43;
  background: #fff0f2;
  border: 1px solid rgba(183, 59, 79, .2);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .04em;
}

.v5-record-cta {
  display: grid;
  width: 100%;
  min-height: 76px;
  padding: 13px;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  text-align: left;
  color: #fff;
  background: linear-gradient(135deg, #7866cb, #d87f94);
  border: 0;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(104, 82, 172, .18);
}

.v5-record-cta .v5-icon {
  width: 46px;
  height: 46px;
  color: #6656b0;
  background: rgba(255, 255, 255, .9);
  border-radius: 15px;
}

.v5-record-cta strong,
.v5-record-cta small {
  display: block;
  color: inherit !important;
  overflow-wrap: break-word;
  word-break: normal;
}

.v5-record-cta strong { font-size: 16px; }
.v5-record-cta small { margin-top: 3px; font-size: 11px; line-height: 1.35; opacity: .88; }

#v5QuickRecordOverlay,
#v5OOverlay {
  position: fixed;
  z-index: 190;
  inset: 0;
  visibility: hidden;
  opacity: 0;
  background: rgba(25, 21, 36, .46);
  transition: opacity .22s ease, visibility .22s ease;
}

#v5QuickRecordOverlay.open,
#v5OOverlay.open { visibility: visible; opacity: 1; }

#v5QuickRecord,
#v5OMenu {
  position: absolute;
  top: 50%;
  right: 50%;
  bottom: auto;
  width: min(calc(100% - 28px), 440px);
  max-height: calc(100dvh - 32px);
  padding: 20px 16px;
  overflow-y: auto;
  opacity: 0;
  transform: translate(50%, -46%) scale(.96);
  color: var(--v5-ink);
  background: #fffafd;
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 28px;
  box-shadow: 0 26px 80px rgba(25, 20, 38, .28);
  transition: transform .24s cubic-bezier(.2, .8, .2, 1), opacity .2s ease;
}

#v5QuickRecordOverlay.open #v5QuickRecord,
#v5OOverlay.open #v5OMenu { opacity: 1; transform: translate(50%, -50%) scale(1); }

.v5-quick-record-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 16px;
}

.v5-quick-record-grid .v5-quick-tile { min-height: 92px; }
.v5-quick-record-grid.v5-o-menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.v5-o-menu-grid .v5-quick-tile { min-height: 106px; }

.v5-o-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.v5-o-modal-head > div { min-width: 0; flex: 1; text-align: left; }
.v5-o-modal-head h2 { margin: 0; font-size: 31px; line-height: 1.02; }
.v5-o-modal-head p { margin: 3px 0 0; font-size: 13px; }
#v5OMenuBack { display: flex; flex: 0 0 44px; }
#v5OMenuBack[hidden] { display: none !important; }
#v5OMenuBody { margin-top: 4px; }

.v5-o-summary-copy {
  margin: 1px 2px 0;
  max-width: none;
  color: var(--v5-muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  text-align: left;
}

.v5-o-status-grid.is-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.v5-o-day-row {
  position: relative;
  min-height: 108px !important;
  padding: 10px 5px 22px;
  border: 1px solid transparent;
  text-align: center;
}

.v5-o-day-row .v5-icon {
  width: 38px;
  height: 38px;
}

.v5-o-day-row strong,
.v5-o-day-row small { display: block; }
.v5-o-day-row strong { max-width: 100%; font-size: 10px; line-height: 1.2; white-space: normal; }
.v5-o-day-row small { color: var(--v5-muted); font-size: 8px; font-weight: 800; }
.v5-o-day-row b { position: absolute; right: 8px; bottom: 6px; color: #6656b0; font-size: 14px; }
.v5-o-day-row.is-done { background: #f0f8f2; border-color: rgba(91, 145, 108, .16); }
.v5-o-day-row.is-done .v5-icon,
.v5-o-day-row.is-done b { color: #4f8a64; }

.v5-o-single-action {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 24px 8px 7px;
  text-align: center;
}

.v5-o-single-action .v5-icon {
  width: 62px;
  height: 62px;
  color: #6656b0;
  background: #f1ecff;
  border-radius: 20px;
}

.v5-o-single-action h3 { margin: 0; color: var(--v5-ink); font-size: 19px; }
.v5-o-single-action .v5-primary { width: 100%; min-height: 49px; }

.v5-sleep-start-card { display: grid; gap: 11px; margin-top: 12px; }
.v5-sleep-start-card .v5-primary { width: 100%; min-height: 48px; }
.v5-sleep-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.v5-sleep-type {
  position: relative;
  display: grid;
  min-height: 112px;
  padding: 15px 10px;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--v5-ink);
  background: #f4f0ff;
  border: 2px solid transparent;
  border-radius: 20px;
  cursor: pointer;
}
.v5-sleep-type:nth-child(2) { background: #eef2ff; }
.v5-sleep-type input { position: absolute; opacity: 0; pointer-events: none; }
.v5-sleep-type .v5-icon {
  width: 48px;
  height: 48px;
  color: #6d59b7;
  background: rgba(255,255,255,.82);
  border-radius: 16px;
}
.v5-sleep-type strong { font-size: 13px; }
.v5-sleep-type:has(input:checked) {
  border-color: #8d73d5;
  box-shadow: 0 10px 24px rgba(116, 88, 177, .13);
}
.v5-sleep-type:has(input:checked)::after {
  position: absolute;
  top: 9px;
  right: 10px;
  content: "✓";
  color: #6d59b7;
  font-size: 13px;
  font-weight: 950;
}
.v5-sleep-start-button { width: 100%; margin-top: 10px; }
.v5-sleep-tools { margin-top: 10px; }
#v5OMenu .v5-o-feature-flow .v5-sleep-tools-one { grid-template-columns: 1fr; }
.v5-sleep-audio { margin-top: 14px; }
.v5-sleep-audio .v5-compact-head { margin-bottom: 8px; }
.v5-sleep-audio .v5-compact-head h3 { margin: 0; font-size: 15px; }
.v5-sleep-audio .v5-compact-head p { margin: 2px 0 0; color: var(--v5-muted); font-size: 10px; }
.v5-compact-record-card { gap: 12px; }
.v5-selected-record {
  display: flex;
  min-height: 62px;
  padding: 10px 12px;
  align-items: center;
  gap: 11px;
  color: var(--v5-ink);
  background: #f4f0ff;
  border-radius: 17px;
}
.v5-selected-record .v5-icon { width: 42px; height: 42px; color: #6d59b7; background: #fff; border-radius: 14px; }
.v5-selected-record strong { font-size: 14px; }
.v5-bath-choice-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.v5-bath-choice-grid .v5-choice { min-height: 118px; padding-inline: 6px; }
.v5-bath-choice-grid .v5-choice small { display: none; }

#v5QuickRecord .v5-quick-record-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#v5OMenu .v5-o-feature-flow > .v5-flow-progress { display: none; }

/* Ďalšie aplikácie používajú rovnaký čistý ikonový jazyk ako Zaznamenať. */
#v5Drawer .v5-drawer-scroll { padding: 4px 1px 42px; }
#v5Drawer .v5-drawer-flat {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
#v5Drawer .v5-drawer-app-wrap,
#v5Drawer .v5-drawer-app-wrap.is-priority { grid-column: auto; }
#v5Drawer .v5-drawer-app,
#v5Drawer .v5-drawer-app-wrap.is-priority .v5-drawer-app {
  min-height: 112px;
  padding: 15px 10px 26px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  text-align: center;
  background: #f5f1ff;
  border-color: transparent;
  border-radius: 20px;
  box-shadow: none;
}
#v5Drawer .v5-drawer-app-wrap:nth-child(4n + 2) .v5-drawer-app { background: #fff0ec; }
#v5Drawer .v5-drawer-app-wrap:nth-child(4n + 3) .v5-drawer-app { background: #edf7ff; }
#v5Drawer .v5-drawer-app-wrap:nth-child(4n) .v5-drawer-app { background: #fff7dc; }
#v5Drawer .v5-drawer-app-wrap.is-priority .v5-drawer-app {
  background: linear-gradient(145deg, #f0ebff, #fff1f0);
  border-color: rgba(116, 91, 181, .14);
}
#v5Drawer .v5-drawer-app .v5-icon,
#v5Drawer .v5-drawer-app-wrap.is-priority .v5-drawer-app .v5-icon {
  display: flex;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  align-items: center;
  justify-content: center;
  color: #6d59b7;
  background: rgba(255,255,255,.86);
  border-radius: 16px;
}
#v5Drawer .v5-drawer-app strong,
#v5Drawer .v5-drawer-app-wrap.is-priority .v5-drawer-app strong {
  max-width: 100%;
  font-size: 12px;
  line-height: 1.2;
}
#v5Drawer .v5-drawer-pin {
  top: auto;
  right: 8px;
  bottom: 8px;
  width: 27px;
  height: 27px;
  background: rgba(255,255,255,.78);
  border-color: rgba(111, 91, 163, .1);
  border-radius: 10px;
}
#v5Drawer .v5-drawer-pin svg { width: 13px; height: 13px; }

#v5PersistentTimers.active { pointer-events: auto; }
.v5-timer-pill button { min-width: 96px; }
#v5OFeatureContent:has(.v5-sleep-start-card, .v5-sleep-running) > .v5-flow-progress { display: none; }

.v5-o-feature-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 16px;
}

.v5-o-feature-choices .v5-quick-tile { min-height: 108px; }
.v5-o-compact-form { display: grid; gap: 11px; margin-top: 16px; }
.v5-o-compact-form label { display: grid; gap: 6px; color: var(--v5-muted); font-size: 11px; font-weight: 900; }
.v5-o-compact-form input,
.v5-o-compact-form textarea,
.v5-o-compact-form select {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  color: var(--v5-ink);
  background: #fff;
  border: 1px solid var(--v5-line);
  border-radius: 15px;
  font: inherit;
}
.v5-o-compact-form textarea { min-height: 92px; resize: vertical; }
.v5-o-compact-form .v5-primary { width: 100%; min-height: 49px; }

.v5-calendar-upcoming {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.v5-calendar-upcoming > div {
  display: grid;
  padding: 9px 11px;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  background: #f6f2ff;
  border-radius: 15px;
}

.v5-calendar-upcoming .v5-icon { width: 38px; height: 38px; color: #6656b0; background: #fff; border-radius: 12px; }
.v5-calendar-upcoming strong,
.v5-calendar-upcoming small { display: block; }
.v5-calendar-upcoming strong { color: var(--v5-ink); font-size: 12px; }
.v5-calendar-upcoming small { margin-top: 2px; color: var(--v5-muted); font-size: 9px; }

.v5-calendar-item-actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.v5-calendar-item-actions button {
  display: grid;
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  color: var(--v5-brand-dark);
  background: #fff;
  border: 1px solid var(--v5-line);
  border-radius: 11px;
  font-size: 18px;
  font-weight: 800;
}

.v5-growth-history {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.v5-growth-history h3 { margin: 0 0 2px; font-size: 14px; }

.v5-growth-history > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  background: var(--v5-surface);
  border: 1px solid var(--v5-line);
  border-radius: 14px;
}

.v5-growth-history span { color: var(--v5-muted); font-size: 12px; }

.v5-calendar-share {
  display: grid !important;
  padding: 11px 12px;
  grid-template-columns: 22px 38px minmax(0, 1fr);
  align-items: center;
  gap: 9px !important;
  color: var(--v5-ink) !important;
  background: #f7f4fb;
  border: 1px solid rgba(101, 86, 173, .1);
  border-radius: 16px;
  cursor: pointer;
}

.v5-calendar-share > input { width: 20px; min-height: 20px; margin: 0; accent-color: #6656b0; }
.v5-calendar-share > span:nth-child(2) { display: grid; width: 38px; height: 38px; place-items: center; color: #6656b0; background: #fff; border-radius: 12px; }
.v5-calendar-share svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.v5-calendar-share strong,
.v5-calendar-share small { display: block; }
.v5-calendar-share strong { font-size: 12px; }
.v5-calendar-share small { margin-top: 2px; color: var(--v5-muted); font-size: 9px; line-height: 1.35; }

.v5-o-help-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 13px;
  color: #742736;
  background: #fff1f3;
  border: 1px solid rgba(183, 59, 79, .16);
  border-radius: 17px;
}
.v5-o-help-card small,
.v5-o-help-card strong { display: block; }
.v5-o-help-card small { margin-bottom: 3px; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.v5-o-help-card strong { font-size: 12px; line-height: 1.35; }
.v5-o-help-card > div:last-child { display: flex; gap: 6px; }
.v5-o-help-card a { padding: 9px 10px; color: #fff; background: #b63f55; border-radius: 12px; font-size: 12px; font-weight: 900; text-decoration: none; }

.v5-o-feature-flow { padding: 0; }
.v5-o-feature-flow .v5-flow-progress { margin: 14px 2px 8px; }
.v5-o-feature-flow .v5-flow-head { margin-bottom: 12px; text-align: left; }
.v5-o-feature-flow .v5-flow-head .v5-eyebrow { display: none; }
.v5-o-feature-flow .v5-flow-head h1 { font-size: 20px; }
.v5-o-feature-flow .v5-flow-head p { display: none; }
.v5-o-feature-flow .v5-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.v5-o-feature-flow .v5-choice {
  min-height: 104px;
  padding: 12px 7px;
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  border-radius: 17px;
}
.v5-o-feature-flow .v5-choice:nth-child(1) { background: #f6f2ff; }
.v5-o-feature-flow .v5-choice:nth-child(2) { background: #fff0ee; }
.v5-o-feature-flow .v5-choice:nth-child(3) { background: #edf7ff; }
.v5-o-feature-flow .v5-choice:nth-child(4) { background: #fff7df; }
.v5-o-feature-flow .v5-choice .v5-icon { width: 43px; height: 43px; }
.v5-o-feature-flow .v5-choice small { display: none; }
.v5-o-feature-flow .v5-form-card { padding: 13px; border-radius: 18px; }
.v5-o-feature-flow .v5-warning-box { font-size: 10px; }
.v5-o-feature-flow .v5-actions { gap: 8px; }
.v5-o-feature-flow .v5-actions > * { flex: 1 1 auto; min-height: 44px; }

.v5-o-modal-confirm { padding: 22px 6px 6px; text-align: center; }
.v5-o-modal-confirm > span { display: grid; width: 58px; height: 58px; margin: 0 auto 12px; place-items: center; color: #fff; background: #76a286; border-radius: 50%; font-size: 27px; font-weight: 900; }
.v5-o-modal-confirm h3 { margin: 0; color: var(--v5-ink); font-size: 21px; }
.v5-o-modal-confirm p { margin: 7px 0 18px; color: var(--v5-muted); font-size: 12px; }
.v5-o-modal-confirm > div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.v5-o-modal-confirm button { min-height: 46px; }

@media (max-width: 360px) {
  #v5OMenu { padding: 16px 12px; }
  .v5-o-feature-flow .v5-choice { min-height: 94px; }
  .v5-o-feature-flow .v5-actions { flex-direction: column; }
}

.urgent-first-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: #742736 !important;
  background: #fff2f3 !important;
  border-color: rgba(183, 59, 79, .2) !important;
}

.urgent-first-action strong,
.urgent-first-action span { display: block; }
.urgent-first-action span { margin-top: 5px; font-size: 13px; line-height: 1.45; }
.urgent-first-action .contact-actions { flex: 0 0 auto; }
.urgent-first-action .contact-actions a { background: #b63f55; color: #fff; border-color: #b63f55; }

body.v5-active:not(.welcome-mode):not(.intro-only) .view > .grid {
  grid-template-columns: minmax(0, 1fr) !important;
}

body.v5-active:not(.welcome-mode):not(.intro-only) .view > .grid > [class*="span-"] {
  grid-column: 1 / -1 !important;
}

body.v5-active:not(.welcome-mode):not(.intro-only) .form-grid {
  grid-template-columns: minmax(0, 1fr) !important;
}

body.v5-active:not(.welcome-mode):not(.intro-only) .checklist-grid {
  grid-template-columns: minmax(0, 1fr) !important;
}

body.v5-active:not(.welcome-mode):not(.intro-only) .grid > *,
body.v5-active:not(.welcome-mode):not(.intro-only) .form-grid > *,
body.v5-active:not(.welcome-mode):not(.intro-only) .age-cards > *,
body.v5-active:not(.welcome-mode):not(.intro-only) label,
body.v5-active:not(.welcome-mode):not(.intro-only) input,
body.v5-active:not(.welcome-mode):not(.intro-only) select,
body.v5-active:not(.welcome-mode):not(.intro-only) textarea {
  min-width: 0;
  max-width: 100%;
}

body.v5-active:not(.welcome-mode):not(.intro-only) p,
body.v5-active:not(.welcome-mode):not(.intro-only) h1,
body.v5-active:not(.welcome-mode):not(.intro-only) h2,
body.v5-active:not(.welcome-mode):not(.intro-only) h3,
body.v5-active:not(.welcome-mode):not(.intro-only) h4,
body.v5-active:not(.welcome-mode):not(.intro-only) strong,
body.v5-active:not(.welcome-mode):not(.intro-only) span,
body.v5-active:not(.welcome-mode):not(.intro-only) label {
  overflow-wrap: break-word;
  word-break: normal;
}

@container v5main (min-width: 760px) {
  body.v5-active:not(.welcome-mode):not(.intro-only) .view > .grid {
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  }

  body.v5-active:not(.welcome-mode):not(.intro-only) .view > .grid > .span-4 { grid-column: span 4 !important; }
  body.v5-active:not(.welcome-mode):not(.intro-only) .view > .grid > .span-5 { grid-column: span 5 !important; }
  body.v5-active:not(.welcome-mode):not(.intro-only) .view > .grid > .span-6 { grid-column: span 6 !important; }
  body.v5-active:not(.welcome-mode):not(.intro-only) .view > .grid > .span-7 { grid-column: span 7 !important; }
  body.v5-active:not(.welcome-mode):not(.intro-only) .view > .grid > .span-8 { grid-column: span 8 !important; }
  body.v5-active:not(.welcome-mode):not(.intro-only) .view > .grid > .span-12 { grid-column: 1 / -1 !important; }
  body.v5-active:not(.welcome-mode):not(.intro-only) .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

@media (max-width: 390px) {
  .v5-quick-record-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .urgent-first-action { align-items: stretch; flex-direction: column; }
  .urgent-first-action .contact-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v5-header-actions { gap: 4px; }
  .v5-sos-button { min-width: 40px; padding-inline: 7px; }
}

@media (min-width: 900px) {
  body.v5-active:not(.welcome-mode):not(.intro-only) .app {
    width: calc(100% - 36px);
    max-width: 1120px;
  }

  body.v5-active:not(.welcome-mode):not(.intro-only) .main {
    max-width: 1040px;
    padding-inline: 22px;
  }

  #v5BottomBar { width: min(calc(100% - 36px), 720px); }
  #v5Drawer { width: min(calc(100% - 36px), 720px); }
}

body.v5-active:not(.welcome-mode):not(.intro-only) .v5-glance strong {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  line-height: 1.3;
}

body.v5-active:not(.welcome-mode):not(.intro-only) .v5-bottom-action {
  font-size: clamp(9px, 2.5vw, 11px);
}

body.v5-active:not(.welcome-mode):not(.intro-only) .v5-bottom-action > span:last-child {
  display: block;
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* V6.9 optická čistota hlavičky a presné centrovanie ikon */
#v5Header[data-home="true"] {
  background: transparent;
  border-bottom-color: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

#v5Header[data-home="true"] .v5-header-logo {
  background: transparent;
}

.v5-icon-button,
.v5-icon,
.v5-mini-profile,
.v5-baby-avatar,
.v5-child-photo-card > span {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 0;
}

.v5-icon-button > svg,
.v5-icon > svg,
.v5-mini-profile > svg,
.v5-baby-avatar > svg,
.v5-child-photo-card > span > svg {
  display: block;
  flex: 0 0 auto;
  margin: 0;
  transform: none;
  transform-origin: 50% 50%;
}

.v5-empty-avatar > svg,
.v5-child-photo-card > span > svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Momenty: jedna dnešná úloha, pokročilé polia až na vyžiadanie. */
#diary .moments-capture-card {
  background: linear-gradient(145deg, rgba(239, 233, 250, .94), rgba(255, 244, 240, .96));
}

#diary .moments-capture-card h3 { margin: 9px 0 3px; font-size: 21px; }
#diary .moments-capture-intro { margin: 0 0 14px; }

#diary .moments-photo-input {
  position: relative;
  min-height: 112px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 18px;
  border: 2px dashed rgba(117, 103, 169, .28);
  border-radius: 20px;
  background: rgba(243, 239, 250, .7);
  color: #655790;
  text-align: center;
  font-weight: 800;
}

#diary .moments-photo-input input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

#diary .moments-photo-input strong { display: block; font-size: 15px; }
#diary .moments-photo-input span { font-size: 12px; font-weight: 650; }
#diary .moments-photo-input .moments-photo-icon { font-size: 28px; line-height: 1; }
#diary #diaryPhotoPreview:not(:has(img)) { display: none; }
#diary .moments-details { margin-top: 12px; border-top: 1px solid rgba(117, 103, 169, .14); }
#diary .moments-details summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--muted); font-weight: 750; }
#diary .moments-details[open] { display: grid; gap: 10px; }
#diary .moments-capture-actions .primary { width: 100%; }
#diary .moments-history-card { padding-top: 16px; }

body.night #diary .moments-capture-card { background: linear-gradient(145deg, #40374d, #49363f); }
body.night #diary .moments-photo-input { background: rgba(42, 36, 45, .82); color: var(--ink); }

#v5BottomBar {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Kartička musí zostať kompletná aj v úzkom mobilnom náhľade. */
body.v5-active #birthCard .birth-card-facts {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

@media (max-width: 430px) {
  body.v5-active #birthCard .birth-card-layout > article:last-child { padding: 10px; }
  body.v5-active #birthCard .birth-card-preview-wrap { padding: 8px; }
  body.v5-active #birthCard .birth-card-preview { aspect-ratio: 3 / 4; }
  body.v5-active #birthCard .birth-card-paper { padding: 16px 14px 13px; }
  body.v5-active #birthCard .birth-card-constellation-stage { width: 62%; height: 56px; margin-block: 2px -2px; }
  body.v5-active #birthCard .birth-card-name { font-size: 43px; }
  body.v5-active #birthCard .birth-card-preview.name-font-hand .birth-card-name { font-size: 48px; }
  body.v5-active #birthCard .birth-card-preview.name-font-modern .birth-card-name { font-size: 37px; }
  body.v5-active #birthCard .birth-card-zodiac-tagline { margin-block: 2px 4px; font-size: 10px; }
  body.v5-active #birthCard .birth-card-sentence { margin-bottom: 5px; }
  body.v5-active #birthCard .birth-card-sentence > b { font-size: 17px; }
  body.v5-active #birthCard .birth-card-facts { padding-block: 5px; }
  body.v5-active #birthCard .birth-card-fact { min-height: 42px; padding-inline: 2px; }
  body.v5-active #birthCard .birth-card-fact small { font-size: 6px; }
  body.v5-active #birthCard .birth-card-fact b { font-size: 11px; }
  body.v5-active #birthCard .birth-card-keepsake-meta { min-height: 31px; margin-top: 4px; }
  body.v5-active #birthCard #birthCardPreviewMessage { margin-top: 3px; font-size: 10px; }
  body.v5-active #birthCard .birth-card-landscape { padding-top: 3px; }
}

/* V6.8 dostupnosť, čitateľnosť a dôveryhodnosť popôrodných pohľadov */
body.v5-active:not(.welcome-mode):not(.intro-only) .v5-glance strong {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  line-height: 1.3;
}

body.v5-active:not(.welcome-mode):not(.intro-only) .check-row {
  min-height: 48px;
  align-items: center;
  cursor: pointer;
}

body.v5-active:not(.welcome-mode):not(.intro-only) .check-row input[type="checkbox"] {
  width: 24px;
  height: 24px;
  min-height: 24px;
}

body.v5-active:not(.welcome-mode):not(.intro-only) .view button,
body.v5-active:not(.welcome-mode):not(.intro-only) .view a,
body.v5-active:not(.welcome-mode):not(.intro-only) .v5-icon-button {
  min-height: 44px;
}

body.v5-active:not(.welcome-mode):not(.intro-only) .v5-bottom-action {
  font-size: 12px;
}

.demo-notice {
  display: grid;
  gap: 3px;
  margin: 10px 0 14px;
  padding: 12px 14px;
  color: #5a4b2c;
  background: #fff7de;
  border: 1px solid rgba(177, 129, 42, .2);
  border-radius: 14px;
  font-size: 12px;
  line-height: 1.45;
}

.demo-notice strong,
.demo-notice span { display: block; }

/* V5.1 — jednoduchší, hravejší a dôsledne mobilný povrch */
body.v5-active:not(.welcome-mode):not(.intro-only) {
  --v5-bg: #fffaf8;
  --v5-surface: #ffffff;
  --v5-surface-soft: #f5f1ff;
  --v5-ink: #302b42;
  --v5-muted: #777184;
  --v5-line: rgba(91, 76, 132, .11);
  --v5-shadow: 0 9px 28px rgba(76, 61, 103, .08);
  font-family: Montserrat, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.v5-active:not(.welcome-mode):not(.intro-only) .app {
  max-width: 500px;
}

body.v5-active:not(.welcome-mode):not(.intro-only) .main {
  max-width: 460px;
  padding: 0 12px calc(var(--v5-bottom-height) + 72px + env(safe-area-inset-bottom));
}

#v5Header {
  min-height: 62px;
  margin: 0 -2px 7px;
  padding: max(7px, env(safe-area-inset-top)) 2px 7px;
  border-bottom: 0;
}

#v5Header[data-home="true"] {
  grid-template-columns: minmax(0, 1fr) auto;
}

#v5Header[data-home="true"] .v5-back {
  display: none;
}

.v5-header-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.v5-header-logo {
  display: none;
  width: 118px;
  height: 42px;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 7px 12px rgba(93, 77, 155, .16));
}

#v5Header[data-home="true"] .v5-header-logo { display: block; }
#v5Header[data-home="true"] .v5-header-title { display: none; }

.v5-header-title strong {
  font-family: Nunito, Inter, sans-serif;
  font-size: 16px;
  font-weight: 900;
}

.v5-icon-button {
  width: 42px;
  height: 42px;
  box-shadow: 0 6px 18px rgba(58, 44, 83, .07);
}

#v5Header[data-home="true"] [data-v5-feature="profiles"] { display: none; }

#v5Home {
  gap: 10px;
}

.v5-home-hero {
  position: relative;
  overflow: hidden;
  padding: 16px;
  background: linear-gradient(135deg, #f0ebff 0%, #fff2ef 72%, #fff9e8 100%);
  border: 1px solid rgba(117, 96, 181, .1);
  border-radius: 24px;
  box-shadow: var(--v5-shadow);
}

.v5-home-hero::before,
.v5-home-hero::after {
  position: absolute;
  content: "";
  border-radius: 50%;
  pointer-events: none;
}

.v5-home-hero::before {
  top: -46px;
  right: -24px;
  width: 118px;
  height: 118px;
  background: rgba(255, 193, 202, .3);
}

.v5-home-hero::after {
  right: 68px;
  bottom: -60px;
  width: 104px;
  height: 104px;
  background: rgba(192, 220, 255, .3);
}

.v5-home-person {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 11px;
}

.v5-baby-bubble {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  color: #6656b0;
  background: linear-gradient(145deg, #fff, #e8dfff);
  border: 2px solid rgba(255,255,255,.9);
  border-radius: 19px 19px 19px 7px;
  box-shadow: 0 9px 22px rgba(97, 77, 153, .13);
  font: 900 25px/1 Nunito, sans-serif;
}

.pregnancy-fruit-photo,
.v5-fruit-avatar {
  background-color: #fff9f5;
  background-image: url("pregnancy-oval-fruits-v1.png");
  background-repeat: no-repeat;
  background-size: 400% 200%;
}

.baby-growth-fruit.pregnancy-fruit-photo {
  display: inline-block;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 50%;
  box-shadow: 0 4px 11px rgba(72, 55, 100, .12);
}

.fruit-icon.pregnancy-fruit-photo {
  width: 88px;
  height: 88px;
  margin-inline: auto;
  border-radius: 28px;
  box-shadow: 0 12px 28px rgba(72, 55, 100, .12);
}

.v5-baby-avatar {
  display: grid;
  width: 54px;
  height: 54px;
  padding: 0;
  place-items: center;
  overflow: hidden;
  color: #6656b0;
  background-color: #fff9f5;
  border: 2px solid rgba(255, 255, 255, .94);
  border-radius: 19px 19px 19px 7px;
  box-shadow: 0 9px 22px rgba(97, 77, 153, .16);
  font: 900 24px/1 Nunito, sans-serif;
  transition: transform .18s ease, box-shadow .18s ease;
}

.v5-baby-avatar:hover,
.v5-baby-avatar:focus-visible {
  transform: translateY(-2px) rotate(-1deg);
  box-shadow: 0 13px 27px rgba(97, 77, 153, .22);
  outline: 3px solid rgba(101, 86, 173, .18);
  outline-offset: 2px;
}

.v5-photo-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.v5-empty-avatar {
  background: linear-gradient(145deg, #fff, #e8dfff);
}

.v5-avatar-popover {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, .9);
  border: 1px solid rgba(101, 86, 173, .13);
  border-radius: 18px 18px 18px 7px;
  box-shadow: 0 13px 30px rgba(72, 55, 100, .1);
  animation: v5-avatar-reveal .22s ease-out both;
}

.v5-avatar-popover[hidden] { display: none; }

.v5-avatar-popover-photo {
  display: block;
  width: 62px;
  height: 62px;
  border-radius: 17px;
}

.v5-avatar-popover div { display: grid; gap: 3px; }
.v5-avatar-popover small { color: #9c6948; font-size: 10px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.v5-avatar-popover strong { color: var(--v5-ink); font-size: 13px; line-height: 1.28; }
.v5-avatar-popover button {
  width: fit-content;
  margin-top: 3px;
  padding: 0;
  color: #6556ad;
  background: transparent;
  border: 0;
  font-size: 11px;
  font-weight: 900;
}

.v5-child-photo-card {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 13px;
  background: linear-gradient(135deg, #f1ecff, #fff2ef);
  border: 1px solid rgba(101, 86, 173, .12);
  border-radius: 20px;
}

.v5-child-photo-card > img,
.v5-child-photo-card > span {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  object-fit: cover;
  color: #6556ad;
  background: rgba(255,255,255,.82);
  border-radius: 22px 22px 22px 8px;
  font-size: 28px;
}

.v5-child-photo-card > div { display: grid; gap: 4px; }
.v5-child-photo-card strong { color: var(--v5-ink); font-size: 14px; }
.v5-child-photo-card small { color: var(--v5-muted); font-size: 11px; line-height: 1.4; }
.v5-child-photo-card .v5-photo-picker {
  display: inline-flex;
  width: fit-content;
  margin-top: 4px;
  padding: 8px 12px;
  color: #fff;
  background: #6556ad;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}
.v5-photo-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

@keyframes v5-avatar-reveal {
  from { opacity: 0; transform: translateY(-5px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.v5-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.v5-home-person h1 {
  margin: 0;
  color: var(--v5-ink);
  font: 900 25px/1.05 Nunito, Inter, sans-serif;
  letter-spacing: -.025em;
}

.v5-home-person p {
  margin: 4px 0 0;
  color: #665d75;
  font-size: 12px;
  font-weight: 700;
}

.v5-mini-profile {
  position: relative;
  z-index: 2;
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  color: #6556ad;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(101,86,173,.1);
  border-radius: 13px;
}

.v5-mini-profile svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; }

.v5-glance-strip {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.v5-glance {
  min-width: 0;
  min-height: 55px;
  padding: 10px;
  background: rgba(255,255,255,.76);
  border: 1px solid rgba(111, 91, 163, .09);
  border-radius: 14px;
}

.v5-glance-action {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.v5-glance-action:hover,
.v5-glance-action:focus-visible {
  border-color: rgba(111, 91, 163, .28);
  box-shadow: 0 8px 18px rgba(71, 52, 105, .08);
  outline: none;
  transform: translateY(-1px);
}
.v5-glance-action:active { transform: scale(.98); }

.v5-glance-strip .v5-glance:nth-child(4) { background: rgba(239, 247, 255, .88); }
.v5-glance-strip .v5-glance:nth-child(5) { background: rgba(255, 243, 239, .88); }
.v5-glance-strip .v5-glance:nth-child(6) { background: rgba(246, 241, 255, .9); }

.v5-glance span,
.v5-glance strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v5-glance span {
  color: var(--v5-muted);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.v5-glance strong {
  margin-top: 2px;
  color: var(--v5-ink);
  font-size: 11px;
}

.v5-growth-modal-grid {
  display: grid;
  gap: 9px;
  margin-bottom: 12px;
}

.v5-growth-field {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) minmax(82px, 108px);
  min-height: 66px;
  padding: 9px 10px;
  align-items: center;
  gap: 10px;
  color: var(--v5-ink);
  background: #f5f1ff;
  border: 1px solid transparent;
  border-radius: 18px;
}
.v5-growth-field:nth-child(2) { background: #edf7ff; }
.v5-growth-field:nth-child(3) { background: #fff3ef; }
.v5-growth-field .v5-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #6d59b7;
  background: rgba(255,255,255,.9);
  border-radius: 14px;
}
.v5-growth-field .v5-icon svg { width: 21px; height: 21px; }
.v5-growth-field strong,
.v5-growth-field small { display: block; }
.v5-growth-field strong { font-size: 13px; }
.v5-growth-field small { color: var(--v5-muted); font-size: 10px; font-weight: 800; }
.v5-growth-field input {
  width: 100%;
  min-height: 42px;
  padding: 8px 9px;
  color: var(--v5-ink);
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(111,91,163,.12);
  border-radius: 12px;
  font: 800 13px/1 Inter, sans-serif;
  text-align: center;
}
.v5-growth-details { margin: 2px 0 12px; }
.v5-growth-details summary {
  padding: 10px 2px;
  color: var(--v5-brand-dark);
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.v5-quick-panel {
  padding: 14px;
  background: var(--v5-surface);
  border: 1px solid var(--v5-line);
  border-radius: 22px;
  box-shadow: var(--v5-shadow);
}

.v5-compact-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.v5-compact-head h2 {
  margin: 0;
  color: var(--v5-ink);
  font: 900 18px/1.1 Nunito, Inter, sans-serif;
}

.v5-compact-head p {
  margin: 2px 0 0;
  color: var(--v5-muted);
  font-size: 11px;
}

.v5-compact-head > button {
  min-height: 34px;
  padding: 6px 10px;
  color: var(--v5-brand-dark);
  background: var(--v5-brand-soft);
  border: 0;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 900;
}

.v5-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.v5-quick-tile {
  display: flex;
  min-width: 0;
  min-height: 78px;
  padding: 9px 4px 8px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--v5-ink);
  background: #f6f2ff;
  border: 0;
  border-radius: 17px;
}

.v5-quick-tile:nth-child(2) { background: #fff0ee; }
.v5-quick-tile:nth-child(3) { background: #edf7ff; }
.v5-quick-tile:nth-child(4) { background: #fff7df; }

.v5-quick-tile .v5-icon {
  width: 36px;
  height: 36px;
  flex-basis: 36px;
  color: #6656b0;
  background: rgba(255,255,255,.74);
  border-radius: 12px;
}

.v5-quick-tile .v5-icon svg { width: 19px; height: 19px; }
.v5-quick-tile strong { overflow: hidden; max-width: 100%; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

.v5-row-card {
  min-height: 66px;
  padding: 11px 13px;
  border-radius: 18px;
  box-shadow: 0 7px 20px rgba(71, 57, 99, .045);
}

.v5-row-card .v5-icon {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
  border-radius: 13px;
}

.v5-today-card {
  display: flex;
  width: 100%;
  min-height: 62px;
  padding: 11px 13px;
  align-items: center;
  gap: 11px;
  color: inherit;
  background: linear-gradient(135deg, #fff7df, #fff1ed);
  border: 1px solid rgba(201, 147, 102, .12);
  border-radius: 18px;
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 7px 20px rgba(117, 77, 49, .045);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.v5-today-card > div { min-width: 0; flex: 1; }
.v5-today-card small,
.v5-today-card strong { display: block; }
.v5-today-card small { color: #9d6c43; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.v5-today-card strong { margin-top: 2px; color: var(--v5-ink); font-size: 13px; }
.v5-today-card .v5-today-hint { display: block; margin-top: 3px; color: var(--v5-muted); font-size: 9px; font-weight: 700; }
.v5-today-card .v5-row-arrow { color: #9d6c43; font-size: 22px; transition: transform .18s ease; }

.v5-today-card:hover {
  transform: translateY(-1px);
  border-color: rgba(157, 108, 67, .25);
  box-shadow: 0 11px 26px rgba(117, 77, 49, .09);
}

.v5-today-card:hover .v5-row-arrow { transform: translateX(2px); }
.v5-today-card:active { transform: translateY(0) scale(.995); }
.v5-today-card:focus-visible { outline: 3px solid rgba(116, 98, 199, .24); outline-offset: 3px; }

.v5-hero h1,
.v5-hero h2,
.v5-section-head h2,
.v5-flow-head h1,
.v5-drawer-head h2,
.v5-memory-card h2,
.v5-card-preview h2 {
  font-family: Nunito, Inter, sans-serif;
  font-weight: 900;
  letter-spacing: -.025em;
}

.v5-flow-head h1 { font-size: clamp(25px, 7vw, 31px); line-height: 1.08; }
.v5-section-head h2 { font-size: 23px; }
.v5-flow-head p, .v5-section-head p { line-height: 1.4; }

#v5BottomBar {
  width: min(100%, 460px);
  min-height: calc(82px + env(safe-area-inset-bottom));
  padding: 17px 7px calc(7px + env(safe-area-inset-bottom));
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -9px 30px rgba(55, 42, 79, .13);
}

#v5BottomBar::before { display: none; }

.v5-bottom-handle {
  position: absolute;
  z-index: 3;
  top: -27px;
  left: 50%;
  display: inline-flex;
  min-height: 32px;
  padding: 5px 13px;
  transform: translateX(-50%);
  align-items: center;
  gap: 5px;
  color: #6656b0;
  background: #fff;
  border: 1px solid rgba(102,86,176,.15);
  border-radius: 999px;
  box-shadow: 0 6px 17px rgba(55,42,79,.13);
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}

.v5-bottom-handle span { font-size: 14px; line-height: .7; }

.v5-bottom-action {
  min-height: 56px;
  padding: 7px 2px 2px;
  font-size: 9px;
}

.v5-bottom-action.active {
  color: #5f4fb1;
  background: #f1edff;
}

#v5Drawer {
  width: min(100%, 500px);
  border-radius: 26px 26px 0 0;
}

.v5-drawer-head h2 { font-size: 25px; }
.v5-drawer-app { min-height: 94px; border-radius: 17px; box-shadow: 0 6px 18px rgba(62,48,89,.05); }
.v5-drawer-app .v5-icon { width: 38px; height: 38px; flex-basis: 38px; border-radius: 12px; }

body.v5-active.night .v5-home-hero {
  background: linear-gradient(135deg, #282744, #312a3e);
  border-color: rgba(220,211,255,.12);
}

body.v5-active.night .v5-glance,
body.v5-active.night .v5-mini-profile,
body.v5-active.night .v5-quick-tile,
body.v5-active.night .v5-quick-panel,
body.v5-active.night .v5-row-card {
  color: var(--v5-ink);
  background: var(--v5-surface);
  border-color: var(--v5-line);
}

body.v5-active.night .v5-today-card { background: #2c293d; border-color: var(--v5-line); }

body.v5-active.night:not(.welcome-mode):not(.intro-only) {
  --v5-bg: #101421;
  --v5-surface: #1b2130;
  --v5-surface-soft: #252a3d;
  --v5-ink: #f5f2fb;
  --v5-muted: #b9b5c5;
  --v5-line: rgba(224, 216, 255, .16);
  --v5-brand: #a99af0;
  --v5-brand-dark: #c6bcff;
  --v5-brand-soft: #302d4b;
  background: #101421;
}

body.v5-active.night:not(.welcome-mode):not(.intro-only) .v5-flow-head h1,
body.v5-active.night:not(.welcome-mode):not(.intro-only) .v5-flow-head h2,
body.v5-active.night:not(.welcome-mode):not(.intro-only) .v5-choice strong,
body.v5-active.night:not(.welcome-mode):not(.intro-only) .v5-action strong,
body.v5-active.night:not(.welcome-mode):not(.intro-only) .v5-row-card strong,
body.v5-active.night:not(.welcome-mode):not(.intro-only) .v5-quick-tile strong,
body.v5-active.night:not(.welcome-mode):not(.intro-only) .v5-today-card strong {
  color: var(--v5-ink) !important;
}

@media (max-width: 360px) {
  .v5-quick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .v5-status-grid, .v5-home-favorites, .v5-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v5-home-person { grid-template-columns: 48px minmax(0, 1fr) 36px; }
  .v5-baby-bubble, .v5-baby-avatar { width: 48px; height: 48px; }
  .v5-quick-tile { min-height: 72px; }
}

@media (min-width: 900px) {
  body.v5-active:not(.welcome-mode):not(.intro-only) .app {
    max-width: 500px;
    margin-top: 18px;
    margin-bottom: 18px;
  }

  #v5BottomBar { bottom: 18px; overflow: visible; }
}

/* V6 — jednotná typografia celej aplikácie */
html body,
html body * {
  font-family: Montserrat, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

/* V6 — úvodné nastavenie (kroky 1 až 9) bez plávajúceho menu */
body.welcome-mode #v5Header,
body.welcome-mode #v5BottomBar,
body.welcome-mode #v5DrawerOverlay,
body.welcome-mode #v5QuickRecordOverlay,
body.welcome-mode #v5OOverlay,
body.welcome-mode #v5DrawerTip,
body.welcome-mode #v5PersistentTimers,
body.welcome-mode #v5AudioDock {
  display: none !important;
}

/* V6 — prechodové obrazovky po nastavení profilu ešte nie sú aplikácia. */
body.intro-only #v5Header,
body.intro-only #v5BottomBar,
body.intro-only #v5DrawerOverlay,
body.intro-only #v5QuickRecordOverlay,
body.intro-only #v5OOverlay,
body.intro-only #v5DrawerTip,
body.intro-only #v5PersistentTimers,
body.intro-only #v5AudioDock {
  display: none !important;
}

/* V6.5 — emocionálny prvý moment onboardingu */
#welcomeCard[data-step="1"] {
  position: relative;
  width: min(100%, 1080px);
  max-width: 1080px;
  min-height: min(700px, calc(100dvh - 48px));
  padding: clamp(24px, 5vw, 64px);
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 24%, rgba(255, 177, 190, .34), transparent 29%),
    radial-gradient(circle at 92% 82%, rgba(231, 220, 255, .66), transparent 31%),
    linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(255, 244, 246, .96) 56%, rgba(243, 239, 255, .98));
  border: 1px solid rgba(123, 107, 200, .16);
  border-radius: 34px !important;
  box-shadow: 0 30px 90px rgba(67, 51, 93, .14);
}

#welcomeCard[data-step="1"]::before {
  position: absolute;
  width: 260px;
  height: 260px;
  top: -150px;
  left: -90px;
  content: "";
  background: rgba(123, 107, 200, .08);
  border-radius: 50%;
}

#welcomeCard[data-step="1"] > .welcome-logo,
#welcomeCard[data-step="1"] > .pill,
#welcomeCard[data-step="1"] > #welcomeProgressLabel,
#welcomeCard[data-step="1"] > #welcomeStepper {
  display: none;
}

#welcomeCard[data-step="1"] .welcome-first-step {
  position: relative;
  z-index: 1;
}

.welcome-first-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr);
  min-height: 560px;
  align-items: center;
  gap: clamp(28px, 6vw, 76px);
}

.welcome-first-copy {
  max-width: 570px;
}

.welcome-first-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  color: #6653b5;
  background: rgba(238, 233, 255, .9);
  border: 1px solid rgba(123, 107, 200, .15);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.welcome-first-kicker span {
  color: #e86879;
  font-size: 17px;
  line-height: 1;
}

#welcomeCard .welcome-first-copy h2 {
  max-width: 620px;
  margin: 22px 0 16px;
  color: #302b42;
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -.052em;
  text-wrap: balance;
}

#welcomeCard .welcome-first-copy h2 span {
  display: block;
  color: #7462c7;
}

#welcomeCard .welcome-first-copy h2:focus {
  outline: none;
}

.welcome-first-lead {
  max-width: 560px;
  margin: 0;
  color: #625e6e;
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.55;
  text-wrap: balance;
}

.welcome-first-themes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.welcome-first-themes span {
  padding: 7px 11px;
  color: #5f586d;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(123, 107, 200, .12);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.welcome-first-actions {
  margin-top: 28px;
}

.welcome-first-cta {
  min-height: 54px;
  padding: 14px 22px;
  gap: 14px;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 14px 30px rgba(123, 107, 200, .24);
  transition: transform .18s ease, box-shadow .18s ease;
}

.welcome-first-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(123, 107, 200, .3);
}

.welcome-first-cta:focus-visible {
  outline: 3px solid rgba(111, 120, 214, .34);
  outline-offset: 4px;
}

.welcome-first-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 13px 0 0;
  color: #777184;
  font-size: 12px;
  line-height: 1.45;
}

.welcome-first-note span {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  color: #4f8d7d;
  background: rgba(79, 141, 125, .1);
  border-radius: 50%;
  font-size: 11px;
}

.welcome-first-visual {
  position: relative;
  min-height: 430px;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.welcome-first-halo {
  position: absolute;
  border-radius: 48% 52% 57% 43% / 48% 40% 60% 52%;
}

.welcome-first-halo-a {
  width: min(390px, 92%);
  aspect-ratio: 1;
  background: linear-gradient(145deg, rgba(227, 219, 255, .92), rgba(255, 218, 225, .86));
  box-shadow: inset 0 0 70px rgba(255, 255, 255, .7), 0 28px 70px rgba(101, 82, 156, .13);
  animation: welcome-breathe 6s ease-in-out infinite;
}

.welcome-first-halo-b {
  width: min(300px, 72%);
  aspect-ratio: 1;
  background: rgba(255, 255, 255, .55);
  border: 1px solid rgba(255, 255, 255, .8);
  backdrop-filter: blur(10px);
  animation: welcome-breathe 6s ease-in-out 1.2s infinite reverse;
}

.welcome-first-logo-cloud {
  position: relative;
  z-index: 2;
  width: min(350px, 84%);
  padding: 30px 24px;
  background: rgba(255, 255, 255, .7);
  border: 1px solid rgba(255, 255, 255, .88);
  border-radius: 34px;
  box-shadow: 0 24px 60px rgba(79, 65, 122, .14);
  backdrop-filter: blur(14px);
  animation: welcome-float 6s ease-in-out infinite;
}

.welcome-first-logo-cloud img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 12px 18px rgba(101, 82, 156, .18));
}

.welcome-first-orbit {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 13px;
  color: #4e485b;
  background: rgba(255, 255, 255, .88);
  border: 1px solid rgba(123, 107, 200, .12);
  border-radius: 15px;
  box-shadow: 0 12px 26px rgba(67, 51, 93, .1);
  font-size: 12px;
  animation: welcome-float 5.2s ease-in-out infinite;
}

.welcome-first-orbit span {
  color: #7462c7;
  font-size: 17px;
}

.welcome-first-orbit-a {
  top: 19%;
  left: 1%;
}

.welcome-first-orbit-b {
  top: 8%;
  right: 4%;
  animation-delay: -2.4s;
}

.welcome-first-orbit-c {
  right: 0;
  bottom: 16%;
  animation-delay: -1.1s;
}

.welcome-first-spark {
  position: absolute;
  z-index: 4;
  color: #ed8491;
  text-shadow: 0 6px 14px rgba(232, 104, 121, .2);
  animation: welcome-twinkle 3.8s ease-in-out infinite;
}

.welcome-first-spark-a {
  top: 8%;
  right: 48%;
  font-size: 28px;
}

.welcome-first-spark-b {
  bottom: 10%;
  left: 18%;
  color: #7462c7;
  font-size: 18px;
  animation-delay: -1.5s;
}

@keyframes welcome-breathe {
  0%, 100% { transform: scale(1) rotate(-2deg); }
  50% { transform: scale(1.045) rotate(2deg); }
}

@keyframes welcome-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes welcome-twinkle {
  0%, 100% { opacity: .45; transform: scale(.9); }
  50% { opacity: 1; transform: scale(1.12); }
}

@media (max-width: 820px) {
  body.welcome-mode .main {
    min-height: 100dvh;
    padding: 0;
  }

  #welcomeCard[data-step="1"] {
    display: flex;
    width: 100%;
    min-height: 100dvh;
    height: 100dvh;
    padding: max(18px, env(safe-area-inset-top)) 18px max(14px, env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0 !important;
    box-shadow: none;
  }

  #welcomeCard[data-step="1"] .welcome-first-step {
    width: 100%;
    min-height: 0;
    flex: 1;
  }

  .welcome-first-grid {
    grid-template-columns: 1fr;
    grid-template-rows: clamp(180px, 27dvh, 230px) minmax(0, 1fr);
    width: 100%;
    height: 100%;
    min-height: 0;
    gap: clamp(10px, 2dvh, 18px);
  }

  .welcome-first-visual {
    min-height: 0;
    height: 100%;
    order: -1;
  }

  .welcome-first-halo-a { width: min(270px, 82%); }
  .welcome-first-halo-b { width: min(210px, 65%); }
  .welcome-first-logo-cloud { width: min(255px, 78%); padding: 21px 18px; border-radius: 26px; }
  .welcome-first-orbit { padding: 8px 10px; font-size: 10px; }
  .welcome-first-orbit-a { top: 14%; left: 2%; }
  .welcome-first-orbit-b { top: 3%; right: 1%; }
  .welcome-first-orbit-c { right: 1%; bottom: 10%; }
  .welcome-first-spark-a { top: 5%; right: 12%; }
  .welcome-first-spark-b { bottom: 4%; left: 17%; }
  .welcome-first-copy {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    width: 100%;
    max-width: 620px;
    height: 100%;
    min-height: 0;
    margin-inline: auto;
    text-align: center;
  }

  .welcome-first-message {
    align-self: center;
    width: 100%;
  }

  #welcomeCard .welcome-first-copy h2 {
    max-width: 540px;
    margin: clamp(12px, 2dvh, 17px) auto 9px;
    font-size: clamp(34px, 8.8vw, 46px);
    line-height: 1.02;
    letter-spacing: -.045em;
  }

  .welcome-first-kicker,
  .welcome-first-themes,
  .welcome-first-actions,
  .welcome-first-note { justify-content: center; }

  .welcome-first-kicker {
    width: fit-content;
    max-width: 100%;
    margin-inline: auto;
  }

  .welcome-first-lead {
    margin-inline: auto;
    font-size: clamp(15px, 3.8vw, 18px);
    line-height: 1.42;
  }

  .welcome-first-actions {
    display: flex;
    width: 100%;
    padding-top: clamp(12px, 2dvh, 20px);
  }
  .welcome-first-cta {
    width: min(100%, 430px);
    min-height: 60px;
    margin-inline: auto;
    font-size: 17px;
    touch-action: manipulation;
  }
}

@media (max-width: 420px) {
  .welcome-first-orbit-a { left: -8px; }
  .welcome-first-orbit-b { right: -8px; }
  .welcome-first-orbit-c { right: -8px; }
  #welcomeCard .welcome-first-copy h2 { font-size: clamp(33px, 8.7vw, 39px); }
  .welcome-first-lead { font-size: 16px; }
  .welcome-first-themes { margin-top: 17px; gap: 6px; }
  .welcome-first-themes span { padding: 6px 9px; font-size: 11px; }
}

@media (max-width: 820px) and (max-height: 700px) {
  #welcomeCard[data-step="1"] {
    padding-top: max(10px, env(safe-area-inset-top));
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }

  .welcome-first-grid {
    grid-template-rows: 155px minmax(0, 1fr);
    gap: 7px;
  }

  .welcome-first-halo-a { width: min(225px, 72%); }
  .welcome-first-halo-b { width: min(175px, 56%); }
  .welcome-first-logo-cloud { width: min(220px, 68%); padding: 16px 14px; }
  #welcomeCard .welcome-first-copy h2 { margin: 8px auto 6px; font-size: clamp(30px, 8.4vw, 37px); }
  .welcome-first-kicker { padding: 6px 10px; font-size: 11px; }
  .welcome-first-lead { font-size: 14px; }
  .welcome-first-actions { padding-top: 8px; }
  .welcome-first-cta { min-height: 54px; }
}

@media (prefers-reduced-motion: reduce) {
  .welcome-first-halo,
  .welcome-first-logo-cloud,
  .welcome-first-orbit,
  .welcome-first-spark {
    animation: none !important;
  }

  .welcome-first-cta {
    transition: none;
  }
}

/* V6 calm onboarding story — steps after the opening screen */
#welcomeCard:not([data-step="1"]) {
  width: min(940px, 100%);
  min-height: min(760px, calc(100dvh - 48px));
  padding: clamp(28px, 5vw, 56px);
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 5%, rgba(226, 216, 255, .72), transparent 31%),
    radial-gradient(circle at 3% 94%, rgba(255, 221, 228, .55), transparent 34%),
    rgba(255, 252, 252, .96);
  border: 1px solid rgba(123, 107, 200, .13);
  border-radius: 34px;
  box-shadow: 0 26px 80px rgba(75, 59, 102, .12);
}

#welcomeCard:not([data-step="1"]) > .welcome-logo {
  width: 148px;
  max-height: 74px;
  object-fit: contain;
  margin: -8px auto 2px;
}

#welcomeCard:not([data-step="1"]) > .pill {
  display: none;
}

#welcomeCard:not([data-step="1"]) #welcomeProgressLabel {
  margin: 7px auto 8px;
  color: #81798d;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

#welcomeCard:not([data-step="1"]) .stepper {
  width: min(300px, 70%);
  margin: 0 auto clamp(30px, 5vw, 52px);
  gap: 7px;
}

#welcomeCard:not([data-step="1"]) .step-dot {
  width: auto;
  height: 5px;
  flex: 1;
  border-radius: 99px;
  background: #ebe6ee;
}

#welcomeCard:not([data-step="1"]) .step-dot.active {
  background: var(--welcome-step-color, #8b78d6);
  box-shadow: none;
}

#welcomeCard:not([data-step="1"]) .step-dot:nth-child(1) { --welcome-step-color: #8b78d6; }
#welcomeCard:not([data-step="1"]) .step-dot:nth-child(2) { --welcome-step-color: #9f7bd0; }
#welcomeCard:not([data-step="1"]) .step-dot:nth-child(3) { --welcome-step-color: #b47fc6; }
#welcomeCard:not([data-step="1"]) .step-dot:nth-child(4) { --welcome-step-color: #c984ba; }
#welcomeCard:not([data-step="1"]) .step-dot:nth-child(5) { --welcome-step-color: #dc8aaa; }
#welcomeCard:not([data-step="1"]) .step-dot:nth-child(6) { --welcome-step-color: #e991a0; }

.welcome-story-step.active {
  animation: welcome-story-in .36s ease both;
}

.welcome-story-step {
  width: min(760px, 100%);
  margin: 0 auto;
}

.welcome-step-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, .95fr);
  gap: clamp(28px, 5vw, 58px);
  align-items: center;
}

.welcome-story-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #7462c7;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.welcome-story-kicker > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #7462c7;
  background: rgba(123, 107, 200, .1);
  border-radius: 50%;
  font-size: 10px;
}

#welcomeCard .welcome-story-step h2 {
  max-width: 690px;
  margin: 14px 0 10px;
  color: #312c3e;
  font-family: Montserrat, Arial, sans-serif !important;
  font-size: clamp(29px, 4.6vw, 48px);
  font-weight: 750;
  line-height: 1.08;
  letter-spacing: -.04em;
  text-wrap: balance;
}

#welcomeCard .welcome-story-step h2:focus {
  outline: none;
}

.welcome-story-lead {
  max-width: 620px;
  margin: 0 0 24px;
  color: #6f687a;
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.55;
  text-wrap: balance;
}

.welcome-friendly-field,
.welcome-baby-card .welcome-friendly-field {
  display: grid;
  gap: 9px;
  color: #514a5d;
  font-size: 13px;
  font-weight: 750;
}

.welcome-profile-step,
.welcome-location-step {
  width: min(100%, 620px);
  margin-inline: auto;
}

.welcome-profile-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(180px, .75fr);
  gap: 12px;
  margin-top: 24px;
}

.welcome-profile-note {
  margin: 11px 0 0;
  color: #81798a;
  font-size: 12px;
  text-align: center;
}

.welcome-location-step > h2,
.welcome-location-step > .welcome-story-lead {
  margin-inline: auto;
  text-align: center;
}

.welcome-location-step > .welcome-story-lead {
  margin-bottom: 15px;
}

.welcome-location-step .welcome-location-card {
  width: min(100%, 500px);
  margin-inline: auto;
  text-align: center;
}

#welcomeCard .welcome-friendly-field input,
#welcomeCard .welcome-manual-country select {
  width: 100%;
  min-height: 54px;
  padding: 13px 15px;
  color: #342f40;
  background: rgba(255, 255, 255, .9);
  border: 1px solid rgba(101, 87, 132, .17);
  border-radius: 15px;
  font: inherit;
  font-size: 16px;
  box-shadow: 0 8px 24px rgba(72, 55, 100, .05);
}

#welcomeCard .welcome-friendly-field input:focus,
#welcomeCard .welcome-manual-country select:focus {
  border-color: #8171ce;
  outline: 3px solid rgba(129, 113, 206, .16);
}

.welcome-location-card {
  display: grid;
  gap: 12px;
  padding: 20px;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(123, 107, 200, .12);
  border-radius: 22px;
  box-shadow: 0 12px 32px rgba(76, 59, 105, .06);
}

.welcome-location-icon,
.welcome-choice-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #7462c7;
  background: linear-gradient(145deg, #eee9ff, #ffe8ed);
  border-radius: 14px;
  font-size: 22px;
}

.welcome-location-card strong {
  color: #40394d;
  font-size: 15px;
}

.welcome-location-card p {
  margin: 5px 0 0;
  color: #756e7e;
  font-size: 12px;
  line-height: 1.55;
}

.welcome-location-benefit {
  margin: 0 !important;
  text-align: center;
  text-wrap: balance;
}

#welcomeCard .welcome-location-card .secondary {
  width: 100%;
  min-height: 45px;
  justify-content: center;
}

.welcome-text-button {
  justify-self: center;
  padding: 3px;
  color: #6d5db7;
  background: none;
  border: 0;
  font-size: 12px;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.welcome-manual-country label {
  display: grid;
  gap: 7px;
  color: #5f5869;
  font-size: 12px;
  font-weight: 700;
}

.welcome-location-status {
  display: block;
  margin-top: 4px !important;
  padding-top: 13px;
  color: #696173 !important;
  border-top: 1px solid rgba(123, 107, 200, .12);
  text-align: left;
}

.welcome-location-status > span:first-child {
  display: inline-grid;
  width: 20px;
  height: 20px;
  margin-right: 6px;
  place-items: center;
  color: #fff;
  background: #8171ce;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  vertical-align: top;
}

.welcome-location-source {
  color: #8a8391 !important;
  font-size: 10px !important;
  text-align: center;
}

.welcome-story-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

#welcomeCard .welcome-story-choices .choice-card {
  min-height: 174px;
  padding: 20px;
  gap: 9px;
  align-content: start;
  color: #6d6676;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(106, 91, 138, .14);
  border-radius: 21px;
  text-align: left;
  box-shadow: 0 12px 34px rgba(71, 54, 97, .055);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

#welcomeCard .welcome-story-choices .choice-card:hover {
  transform: translateY(-2px);
  border-color: rgba(116, 98, 199, .34);
  box-shadow: 0 17px 38px rgba(71, 54, 97, .09);
}

#welcomeCard .welcome-story-choices .choice-card.active {
  color: #5d5570;
  background: linear-gradient(145deg, rgba(241, 237, 255, .97), rgba(255, 238, 242, .92));
  border-color: #8b7bd2;
  box-shadow: 0 0 0 3px rgba(139, 123, 210, .1), 0 17px 38px rgba(71, 54, 97, .09);
}

#welcomeCard .welcome-story-choices .choice-card strong {
  color: #40394c;
  font-size: 15px;
}

#welcomeCard .welcome-story-choices .choice-card > span:last-child {
  font-size: 12px;
  line-height: 1.5;
}

.welcome-baby-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: clamp(20px, 4vw, 30px);
  background: rgba(255, 255, 255, .75);
  border: 1px solid rgba(123, 107, 200, .12);
  border-radius: 24px;
  box-shadow: 0 15px 40px rgba(72, 55, 100, .06);
}

.welcome-baby-card label:first-child {
  grid-column: 1 / -1;
}

.welcome-fruit-avatar-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 30px;
  gap: 15px;
  align-items: center;
  width: 100%;
  margin-top: 14px;
  padding: 13px;
  color: #40394c;
  text-align: left;
  background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(255,242,238,.92));
  border: 1px solid rgba(123, 107, 200, .16);
  border-radius: 22px;
  box-shadow: 0 12px 34px rgba(72, 55, 100, .07);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.welcome-fruit-avatar-card:hover,
.welcome-fruit-avatar-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(123, 107, 200, .42);
  box-shadow: 0 16px 38px rgba(72, 55, 100, .11);
  outline: none;
}

.welcome-fruit-avatar-image {
  display: block;
  width: 76px;
  height: 76px;
  border-radius: 22px 22px 22px 8px;
  box-shadow: 0 8px 20px rgba(72, 55, 100, .1);
}

.welcome-fruit-avatar-copy { display: grid; gap: 3px; }
.welcome-fruit-avatar-copy small { color: #9c6948; font-size: 10px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.welcome-fruit-avatar-copy strong { font-size: 14px; line-height: 1.3; }
.welcome-fruit-avatar-copy > span { color: #7a7383; font-size: 11px; line-height: 1.4; }
.welcome-fruit-avatar-check {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  color: white;
  background: #7564bd;
  border-radius: 50%;
  opacity: .35;
}
.welcome-fruit-avatar-card.active .welcome-fruit-avatar-check { opacity: 1; }

.welcome-soft-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 17px 0 0;
  color: #7a7383;
  font-size: 12px;
  line-height: 1.5;
}

.welcome-soft-note span {
  color: #d87f8c;
}

#welcomePartnerEmailWrap {
  max-width: 520px;
  margin-top: 18px;
}

#welcomePartnerEmailWrap small {
  color: #807886;
  font-weight: 500;
  line-height: 1.45;
}

.welcome-story-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: clamp(26px, 5vw, 42px);
}

#welcomeCard .welcome-story-actions .primary {
  min-height: 50px;
  padding-inline: 22px;
  box-shadow: 0 12px 26px rgba(123, 107, 200, .2);
}

.welcome-finish-step {
  text-align: center;
}

.welcome-finish-step .welcome-story-kicker {
  justify-content: center;
}

#welcomeCard .welcome-finish-step h2,
.welcome-finish-step .welcome-story-lead {
  margin-inline: auto;
}

.welcome-finish-mark {
  display: grid;
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #8877d1, #ea95a3);
  border: 8px solid rgba(255, 255, 255, .75);
  border-radius: 50%;
  box-shadow: 0 18px 40px rgba(122, 98, 174, .2);
  font-size: 27px;
}

.welcome-finish-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 30px auto 18px;
}

.welcome-finish-summary > span {
  display: grid;
  gap: 5px;
  padding: 16px 10px;
  background: rgba(255, 255, 255, .75);
  border: 1px solid rgba(123, 107, 200, .11);
  border-radius: 16px;
}

.welcome-finish-summary small {
  color: #8a8291;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.welcome-finish-summary strong {
  color: #484052;
  font-size: 13px;
}

.welcome-finish-step .welcome-soft-note {
  justify-content: center;
}

.welcome-finish-actions {
  justify-content: center;
}

@keyframes welcome-story-in {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 720px) {
  body.welcome-mode .main {
    padding: 10px;
  }

  #welcomeCard:not([data-step="1"]) {
    min-height: calc(100dvh - 20px);
    padding: 22px 18px 26px;
    border-radius: 25px;
  }

  #welcomeCard:not([data-step="1"]) > .welcome-logo {
    width: 126px;
    max-height: 60px;
  }

  #welcomeCard:not([data-step="1"]) .stepper {
    margin-bottom: 28px;
  }

  .welcome-step-layout,
  .welcome-story-choices,
  .welcome-baby-card {
    grid-template-columns: 1fr;
  }

  .welcome-profile-fields {
    grid-template-columns: 1fr;
    margin-top: 18px;
  }

  .welcome-step-layout {
    gap: 22px;
  }

  .welcome-baby-card label:first-child {
    grid-column: auto;
  }

  #welcomeCard .welcome-story-step h2 {
    font-size: clamp(28px, 8vw, 39px);
  }

  .welcome-story-choices {
    gap: 10px;
  }

  #welcomeCard .welcome-story-choices .choice-card {
    min-height: 0;
    grid-template-columns: 42px 1fr;
    padding: 15px;
  }

  #welcomeCard .welcome-story-choices .choice-card .welcome-choice-icon {
    grid-row: 1 / 3;
  }

  .welcome-location-card {
    padding: 17px;
  }

  .welcome-finish-summary {
    grid-template-columns: 1fr;
  }

  .welcome-story-actions {
    position: sticky;
    bottom: 0;
    z-index: 5;
    padding-top: 13px;
    background: linear-gradient(180deg, transparent, rgba(255, 252, 252, .98) 28%);
  }
}

@media (max-width: 390px) {
  #welcomeCard:not([data-step="1"]) {
    padding-inline: 15px;
  }

  .welcome-story-actions .ghost {
    padding-inline: 11px;
  }

  #welcomeCard .welcome-story-actions .primary {
    padding-inline: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .welcome-story-step.active {
    animation: none;
  }

  #welcomeCard .welcome-story-choices .choice-card {
    transition: none;
  }

  .v5-today-card,
  .v5-today-card .v5-row-arrow {
    transition: none;
  }
}

/* V7.6 — posledný krok onboardingu: náhľad domova z rovnakých v5 blokov ako renderHome. */
.welcome-finish-step {
  --v5-ink: #29243a;
  --v5-muted: #746f80;
}

#welcomeCard .welcome-finish-step h2 {
  max-width: 460px;
  margin: 6px auto 8px;
  font-size: clamp(26px, 6.4vw, 36px);
}

.welcome-finish-title-line {
  display: block;
}

.welcome-finish-step .welcome-story-lead {
  max-width: 420px;
  margin-bottom: 20px;
  font-size: 15px;
}

.welcome-finish-preview,
.welcome-finish-first-step,
.welcome-finish-facts {
  width: min(100%, 460px);
  margin-inline: auto;
  text-align: left;
}

.welcome-finish-preview .v5-home-person {
  grid-template-columns: 54px minmax(0, 1fr);
}

.welcome-finish-preview .v5-home-person h3 {
  margin: 0;
  overflow: hidden;
  color: var(--v5-ink);
  font: 900 23px/1.05 Nunito, Inter, sans-serif;
  letter-spacing: -.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.welcome-finish-preview .v5-home-person p {
  margin: 4px 0 0;
  color: #665d75;
  font-size: 12px;
  font-weight: 700;
}

.welcome-finish-preview .v5-baby-avatar:not(.v5-fruit-avatar) {
  background: linear-gradient(145deg, #fff, #e8dfff);
}

.welcome-finish-preview .v5-baby-avatar:hover {
  transform: none;
  box-shadow: 0 9px 22px rgba(97, 77, 153, .16);
  outline: none;
}

.welcome-finish-preview .v5-glance-strip {
  margin: 14px 0 0;
}

.welcome-finish-preview .v5-glance dt,
.welcome-finish-preview .v5-glance dd {
  display: block;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.welcome-finish-preview .v5-glance dt {
  color: var(--v5-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.welcome-finish-preview .v5-glance dd {
  margin-top: 3px;
  color: var(--v5-ink);
  font-size: 13px;
  font-weight: 800;
}

.welcome-finish-first-step {
  margin-top: 12px;
  cursor: default;
}

.welcome-finish-first-step:hover {
  transform: none;
  border-color: rgba(201, 147, 102, .12);
  box-shadow: 0 7px 20px rgba(117, 77, 49, .045);
}

.welcome-finish-first-step small { font-size: 10px; }
.welcome-finish-first-step strong { font-size: 14px; }
.welcome-finish-first-step .v5-today-hint { font-size: 12px; font-weight: 600; }

.welcome-finish-facts {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  margin-bottom: 0;
  padding: 0;
  color: #6f687a;
  font-size: 13px;
  line-height: 1.45;
  list-style: none;
}

.welcome-finish-facts li {
  position: relative;
  padding-left: 16px;
}

.welcome-finish-facts li::before {
  position: absolute;
  top: .55em;
  left: 3px;
  width: 6px;
  height: 6px;
  content: "";
  background: #b8acec;
  border-radius: 50%;
}

.welcome-finish-edit {
  min-height: 44px;
  margin: 10px auto 0;
  padding: 8px 12px;
  color: #5f4fb1;
  background: none;
  border: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.welcome-finish-edit:focus-visible {
  outline: 3px solid rgba(116, 98, 199, .3);
  outline-offset: 2px;
  border-radius: 10px;
}

body.v5-active.night .welcome-finish-step .v5-home-hero {
  background: linear-gradient(135deg, #f0ebff 0%, #fff2ef 72%, #fff9e8 100%);
}

body.v5-active.night .welcome-finish-step .v5-today-card {
  background: linear-gradient(135deg, #fff7df, #fff1ed);
  border-color: rgba(201, 147, 102, .12);
}

/* V6.8 final cascade: desktop app využije priestor, mobil zostáva jednokolónový. */
@media (min-width: 900px) {
  body.v5-active:not(.welcome-mode):not(.intro-only) .app {
    width: calc(100% - 36px);
    max-width: 1120px;
  }

  body.v5-active:not(.welcome-mode):not(.intro-only) .main {
    max-width: 1040px;
    padding-inline: 22px;
  }

  #v5BottomBar { width: min(calc(100% - 36px), 720px); }
  #v5Drawer { width: min(calc(100% - 36px), 720px); }
}

body.v5-active:not(.welcome-mode):not(.intro-only) .v5-glance strong {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  line-height: 1.3;
}

body.v5-active:not(.welcome-mode):not(.intro-only) .v5-bottom-action {
  font-size: 12px;
}

/* V6.9 final cascade: ikonové symboly zostávajú geometricky v strede. */
body.v5-active:not(.welcome-mode):not(.intro-only) .v5-row-card > .v5-icon,
body.v5-active:not(.welcome-mode):not(.intro-only) .v5-today-card > .v5-icon,
body.v5-active:not(.welcome-mode):not(.intro-only) .v5-record-cta > .v5-icon,
body.v5-active:not(.welcome-mode):not(.intro-only) .v5-quick-tile > .v5-icon,
body.v5-active:not(.welcome-mode):not(.intro-only) .v5-drawer-app > .v5-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

/* V6.10 jednotná pomoc a starostlivosť */
.v5-care-emergency {
  display: flex;
  padding: 12px 13px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #76283a;
  background: #fff0f2;
  border: 1px solid rgba(183, 59, 79, .18);
  border-radius: 18px;
}

.v5-care-emergency small,
.v5-care-emergency strong { display: block; }
.v5-care-emergency small { margin-bottom: 3px; font-size: 9px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.v5-care-emergency strong { font-size: 12px; line-height: 1.35; }
.v5-care-emergency > div:last-child { display: flex; flex: 0 0 auto; gap: 6px; }
.v5-care-emergency a {
  display: inline-flex;
  min-width: 48px;
  min-height: 42px;
  padding: 7px 10px;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #b63b4f;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.v5-care-grid { display: grid; gap: 9px; }
.v5-care-option {
  display: grid;
  width: 100%;
  min-height: 72px;
  grid-template-columns: 44px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 11px;
}
.v5-care-option > span:nth-child(2) { min-width: 0; }
.v5-care-option .v5-row-arrow { color: var(--v5-muted); font-size: 22px; }
.v5-care-disclaimer { margin: 2px 3px 0; color: var(--v5-muted); font-size: 10px; line-height: 1.45; }

body.v5-active.night .v5-care-emergency {
  color: #ffd9e0;
  background: #3b2530;
  border-color: rgba(255, 167, 183, .22);
}

@media (min-width: 620px) {
  .v5-care-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v5-care-option:last-child { grid-column: 1 / -1; }
}

@media (max-width: 390px) {
  .v5-care-emergency { align-items: stretch; flex-direction: column; }
  .v5-care-emergency > div:last-child { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* V6.11 adaptívne motivačné O pre popôrodnú časť */
.v5-o-card {
  position: relative;
  overflow: hidden;
  padding: 19px;
  color: var(--v5-ink);
  background:
    radial-gradient(circle at 13% 6%, rgba(219, 207, 247, .36), transparent 31%),
    radial-gradient(circle at 92% 94%, rgba(247, 205, 218, .32), transparent 34%),
    var(--v5-surface);
  border: 1px solid var(--v5-line);
  border-radius: 26px;
  box-shadow: var(--v5-shadow);
}

.v5-o-head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.v5-o-head small {
  color: var(--v5-brand-dark);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.v5-o-head h2 {
  margin: 3px 0 4px;
  color: var(--v5-ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 30px;
  line-height: 1;
}

.v5-o-head p,
.v5-o-reassurance {
  margin: 0;
  color: var(--v5-muted);
  font-size: 12px;
  line-height: 1.45;
}

.v5-o-role-shortcut {
  min-width: 62px;
  min-height: 44px;
  padding: 8px 12px;
  color: var(--v5-brand-dark);
  background: var(--v5-brand-soft);
  border: 0;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 900;
}

.v5-o-layout {
  display: grid;
  grid-template-columns: minmax(190px, 1.05fr) minmax(160px, .95fr);
  align-items: center;
  gap: 8px 16px;
  margin-top: 7px;
}

.v5-o-ring-wrap {
  position: relative;
  display: grid;
  width: min(100%, 330px);
  margin-inline: auto;
  aspect-ratio: 1;
  place-items: center;
}

.v5-o-ring {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.v5-o-track,
.v5-o-value {
  fill: none;
  stroke-width: 76;
  stroke-linecap: round;
}

.v5-o-track {
  cursor: pointer;
  outline: none;
  stroke: rgba(229, 224, 233, .73);
  transition: opacity .18s ease, filter .18s ease;
}

.v5-o-track-care { stroke: rgba(241, 194, 209, .38); }
.v5-o-track-movement { stroke: rgba(211, 181, 219, .38); }
.v5-o-track-health { stroke: rgba(190, 179, 228, .4); }

.v5-o-track:focus-visible,
.v5-o-track:hover {
  opacity: .82;
  filter: drop-shadow(0 0 7px rgba(110, 86, 139, .3));
}

.v5-o-value {
  pointer-events: none;
  filter: url(#v5ODepth);
}

.v5-o-value-1 { stroke: url(#v5OPink); }
.v5-o-value-2 { stroke: url(#v5OLilac); }
.v5-o-value-3 { stroke: url(#v5OPurple); }

.v5-o-record {
  position: absolute;
  z-index: 3;
  display: flex;
  width: 104px;
  aspect-ratio: 1;
  padding: 10px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #fff;
  background:
    radial-gradient(circle at 30% 22%, rgba(255,255,255,.36), transparent 34%),
    linear-gradient(145deg, #d5cbf2, #b9a7e1 62%, #9b84cf);
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 50%;
  box-shadow: inset 0 2px 3px rgba(255,255,255,.5), inset 0 -5px 11px rgba(76,50,112,.14), 0 12px 25px rgba(96,67,132,.2);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}

.v5-o-record:hover,
.v5-o-record:focus-visible {
  outline: 3px solid rgba(123, 107, 200, .18);
  transform: translateY(-2px) scale(1.025);
}

.v5-o-record:active { transform: scale(.98); }
.v5-o-record > span { font-size: 27px; font-weight: 400; line-height: .9; }
.v5-o-record strong { font-size: 10px; letter-spacing: -.01em; }

.v5-o-celebration {
  position: absolute;
  top: 14%;
  right: 17%;
  color: #8b73c7;
  font-size: 25px;
  filter: drop-shadow(0 5px 8px rgba(103, 77, 134, .25));
  animation: v5OPulse 1.9s ease-in-out infinite;
}

@keyframes v5OPulse {
  0%, 100% { transform: scale(1) rotate(-7deg); }
  50% { transform: scale(1.17) rotate(7deg); }
}

.v5-o-legend {
  display: grid;
  gap: 8px;
}

.v5-o-legend-item {
  display: grid;
  width: 100%;
  min-height: 61px;
  padding: 9px 10px;
  grid-template-columns: 13px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  color: var(--v5-ink);
  text-align: left;
  background: color-mix(in srgb, var(--v5-surface) 88%, transparent);
  border: 1px solid var(--v5-line);
  border-radius: 17px;
}

.v5-o-legend-item span:nth-child(2) { min-width: 0; }
.v5-o-legend-item strong,
.v5-o-legend-item small { display: block; }
.v5-o-legend-item strong { font-size: 12px; line-height: 1.2; }
.v5-o-legend-item small { margin-top: 3px; color: var(--v5-muted); font-size: 10px; }
.v5-o-legend-item b { font-size: 14px; }
.v5-o-dot { width: 11px; height: 11px; background: #efabc0; border-radius: 50%; box-shadow: inset 0 1px 2px rgba(255,255,255,.7); }
.v5-o-movement .v5-o-dot { background: #cda8d5; }
.v5-o-health .v5-o-dot { background: #aa94dc; }
.v5-o-reassurance { margin-top: 8px; text-align: center; font-size: 10px; }

.v5-o-detail-hero {
  display: grid;
  padding: 18px;
  grid-template-columns: 94px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, #fff4f7, #f7eef4);
  border: 1px solid rgba(226, 177, 196, .42);
  border-radius: 25px;
}

.v5-o-detail-hero.v5-o-movement {
  background: linear-gradient(135deg, #fbf7fd, #f1e9f5);
  border-color: rgba(194, 153, 203, .38);
}

.v5-o-detail-hero.v5-o-health {
  background: linear-gradient(135deg, #f7f4ff, #ece8fa);
  border-color: rgba(159, 140, 214, .36);
}

.v5-o-detail-progress {
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  align-content: center;
  color: #9a526d;
  background: radial-gradient(circle at 32% 25%, #fff, #f2c4d2 62%, #e69ab2);
  border: 4px solid rgba(255,255,255,.72);
  border-radius: 50%;
  box-shadow: inset 0 3px 7px rgba(255,255,255,.66), 0 10px 22px rgba(107,70,93,.12);
}

.v5-o-movement .v5-o-detail-progress { color: #76527f; background: radial-gradient(circle at 32% 25%, #fff, #dec7e5 62%, #c4a0cf); }
.v5-o-health .v5-o-detail-progress { color: #635096; background: radial-gradient(circle at 32% 25%, #fff, #d8cff2 62%, #b4a3e2); }
.v5-o-detail-progress span { font-size: 24px; font-weight: 900; line-height: 1; }
.v5-o-detail-progress small { margin-top: 4px; font-size: 8px; font-weight: 900; text-transform: uppercase; }
.v5-o-detail-hero h1 { margin: 5px 0 6px; color: var(--v5-ink); font-family: "Cormorant Garamond", Georgia, serif; font-size: 31px; line-height: 1; }
.v5-o-detail-hero p { margin: 0; color: var(--v5-muted); font-size: 12px; line-height: 1.45; }

.v5-o-role-switch {
  display: grid;
  padding: 4px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  background: color-mix(in srgb, var(--v5-brand-soft) 65%, var(--v5-surface));
  border: 1px solid var(--v5-line);
  border-radius: 17px;
}

.v5-o-role-switch button {
  min-height: 44px;
  color: var(--v5-muted);
  background: transparent;
  border: 0;
  border-radius: 13px;
  font-weight: 900;
}

.v5-o-role-switch button.active {
  color: var(--v5-brand-dark);
  background: var(--v5-surface);
  box-shadow: 0 6px 16px rgba(69, 53, 94, .1);
}

.v5-o-goal-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
}

.v5-o-goal-heading h2 { margin: 0; color: var(--v5-ink); font-size: 21px; }
.v5-o-goal-heading p { margin: 4px 0 0; color: var(--v5-muted); font-size: 11px; }
.v5-o-goal-heading > strong { color: var(--v5-brand-dark); font-size: 22px; }
.v5-o-goals { display: grid; gap: 9px; }

.v5-o-goal {
  padding: 12px;
  opacity: .72;
  background: color-mix(in srgb, var(--v5-surface) 92%, var(--v5-bg));
  border: 1px solid var(--v5-line);
  border-radius: 19px;
  transition: opacity .18s ease, border-color .18s ease, transform .18s ease;
}

.v5-o-goal.is-tracked { opacity: 1; background: var(--v5-surface); }
.v5-o-goal.is-done { border-color: rgba(105, 151, 126, .34); }
.v5-o-goal-main { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.v5-o-goal-main > div { min-width: 0; }
.v5-o-goal-main strong,
.v5-o-goal-main small { display: block; }
.v5-o-goal-main strong { color: var(--v5-ink); font-size: 13px; line-height: 1.25; }
.v5-o-goal-main small { margin-top: 3px; color: var(--v5-muted); font-size: 10px; line-height: 1.35; }

.v5-o-track-toggle {
  min-width: 72px;
  min-height: 40px;
  padding: 7px 9px;
  color: var(--v5-brand-dark);
  background: var(--v5-brand-soft);
  border: 0;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 900;
}

.v5-o-track-toggle[aria-pressed="true"] { color: #526e5d; background: #edf7f1; }
.v5-o-goal-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--v5-line); }
.v5-o-complete,
.v5-o-open {
  min-height: 42px;
  padding: 8px 10px;
  border: 0;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 900;
}
.v5-o-complete { color: var(--v5-brand-dark); background: var(--v5-brand-soft); }
.v5-o-complete.is-done { color: #35614a; background: #e9f5ee; }
.v5-o-open { margin-left: auto; color: var(--v5-muted); background: transparent; }
.v5-o-auto-status { color: var(--v5-muted); font-size: 9px; font-weight: 800; }
.v5-o-auto-status.is-done { color: #47745a; }
.v5-o-detail-note { margin: 0 4px; color: var(--v5-muted); font-size: 10px; line-height: 1.45; text-align: center; }

body.v5-active.night .v5-o-card,
body.v5-active.night .v5-o-goal,
body.v5-active.night .v5-o-legend-item { background-color: var(--v5-surface); }
body.v5-active.night .v5-o-detail-hero { background: linear-gradient(135deg, #392c36, #302938); }
body.v5-active.night .v5-o-detail-hero.v5-o-movement { background: linear-gradient(135deg, #332b3b, #2c2937); }
body.v5-active.night .v5-o-detail-hero.v5-o-health { background: linear-gradient(135deg, #2c2941, #29283a); }
body.v5-active.night .v5-o-track { stroke: rgba(83, 78, 96, .78); }

@media (max-width: 620px) {
  .v5-o-layout { grid-template-columns: 1fr; }
  .v5-o-ring-wrap { width: min(100%, 292px); }
  .v5-o-legend { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .v5-o-legend-item { min-height: 82px; grid-template-columns: 10px minmax(0, 1fr); align-content: center; }
  .v5-o-legend-item b { grid-column: 2; }
  .v5-o-record { width: 91px; }
}

@media (max-width: 390px) {
  .v5-o-card { padding: 15px; }
  .v5-o-head h2 { font-size: 27px; }
  .v5-o-ring-wrap { width: min(100%, 264px); }
  .v5-o-track,
  .v5-o-value { stroke-width: 72; }
  .v5-o-legend { gap: 5px; }
  .v5-o-legend-item { min-height: 78px; padding: 8px 6px; gap: 6px; border-radius: 14px; }
  .v5-o-legend-item strong { font-size: 10px; }
  .v5-o-legend-item small { font-size: 8px; }
  .v5-o-legend-item b { font-size: 12px; }
  .v5-o-detail-hero { grid-template-columns: 78px minmax(0, 1fr); padding: 15px; gap: 12px; }
  .v5-o-detail-progress { width: 74px; height: 74px; }
  .v5-o-detail-progress span { font-size: 20px; }
  .v5-o-detail-hero h1 { font-size: 27px; }
  .v5-o-goal-main { grid-template-columns: 42px minmax(0, 1fr); }
  .v5-o-goal-main .v5-o-track-toggle { grid-column: 1 / -1; width: 100%; min-height: 38px; }
  .v5-o-goal-actions { align-items: stretch; flex-direction: column; }
  .v5-o-complete,
  .v5-o-open { width: 100%; margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .v5-o-track,
  .v5-o-goal,
  .v5-o-record { transition: none; }
  .v5-o-celebration { animation: none; }
}

/* V6.35 — pôvodné mäkké 3D O a jednoduchý detail ako lišta aplikácií */
.v5-o-card {
  padding: 17px 15px 15px;
  background: rgba(255, 253, 255, .96);
  border-color: rgba(111, 80, 130, .08);
  box-shadow: 0 12px 34px rgba(84, 57, 101, .07);
}

.v5-o-head { justify-content: center; text-align: center; }
.v5-o-head small { font-size: 9px; }
.v5-o-head h2 {
  margin-top: 2px;
  font-family: inherit;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -.025em;
}

.v5-o-layout {
  grid-template-columns: 1fr;
  gap: 2px;
  margin-top: -4px;
}

.v5-o-ring-wrap { width: min(100%, 324px); }
.v5-o-empty-ring {
  fill: none;
  stroke: url(#v5ONeutral);
  stroke-width: 88;
  filter: drop-shadow(0 10px 15px rgba(102, 72, 121, .09));
}
.v5-o-outline {
  fill: none;
  stroke: rgba(128, 101, 147, .14);
  stroke-width: 4;
  opacity: .3;
  filter: blur(2px);
  pointer-events: none;
}
.v5-o-outline-inner { stroke: rgba(128, 101, 147, .1); }
.v5-o-sector-base {
  stroke: rgba(255, 255, 255, .96);
  stroke-width: 5;
  stroke-linejoin: round;
  pointer-events: none;
}
.v5-o-sector-base.v5-o-clickable {
  pointer-events: visiblePainted;
  cursor: pointer;
  outline: none;
  transform-box: view-box;
  transform-origin: 210px 210px;
  transition: filter .18s ease, transform .18s ease;
}
.v5-o-sector-base.v5-o-clickable:hover { filter: brightness(.985) saturate(1.08); transform: scale(1.008); }
.v5-o-sector-base.v5-o-clickable:active { transform: scale(.99); }
.v5-o-sector-base.v5-o-clickable:focus-visible { stroke: rgba(111, 84, 158, .7); }
.v5-o-sector-base-1 { fill: #fbe8ee; opacity: .88; }
.v5-o-sector-base-2 { fill: #f1e4f2; opacity: .9; }
.v5-o-sector-base-3 { fill: #e9e4f8; opacity: .92; }
.v5-o-value-shape {
  stroke: none;
  filter: url(#v5ODepth);
  pointer-events: none;
  transition: opacity .22s ease;
}
.v5-o-value-shape.is-seed { opacity: .62; }
.v5-o-value-1 { fill: url(#v5OPink); }
.v5-o-value-2 { fill: url(#v5OLilac); }
.v5-o-value-3 { fill: url(#v5OPurple); }
.v5-o-gloss {
  fill: none;
  stroke: rgba(255, 255, 255, .62);
  stroke-width: 14;
  stroke-linecap: round;
  opacity: .15;
  filter: blur(5px);
  pointer-events: none;
}
.v5-o-gloss.is-seed { opacity: .08; }
.v5-o-hit {
  fill: transparent;
  stroke: transparent;
  stroke-width: 5;
  pointer-events: all;
  cursor: pointer;
  outline: none;
  transform-box: view-box;
  transform-origin: 210px 210px;
  transition: transform .18s ease, stroke .18s ease;
}
.v5-o-hit:hover { transform: scale(1.018); stroke: rgba(255,255,255,.72); }
.v5-o-hit:active { transform: scale(.988); }
.v5-o-hit:focus-visible { stroke: rgba(117, 91, 163, .42); }
.v5-o-record {
  width: 72px;
  padding: 6px;
  gap: 2px;
  background: radial-gradient(circle at 32% 25%, rgba(255,255,255,.26), transparent 36%), linear-gradient(145deg, #d8cef3 4%, #beaee5 58%, #aa95d5 100%);
  box-shadow: inset 0 2px 2px rgba(255,255,255,.48), inset 0 -4px 9px rgba(88,48,117,.11), 0 8px 18px rgba(118,76,148,.15);
}
.v5-o-record > span { font-size: 21px; }
.v5-o-record strong { font-size: 8px; }

.v5-o-legend {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: -2px;
}
.v5-o-legend-item {
  min-height: 58px;
  padding: 9px 6px;
  grid-template-columns: 9px minmax(0, 1fr);
  gap: 6px;
  align-content: center;
  background: color-mix(in srgb, var(--v5-surface) 92%, transparent);
  border-radius: 16px;
  text-align: left;
}
.v5-o-legend-item strong { font-size: 10px; }
.v5-o-legend-item small { display: none; }
.v5-o-legend-item b { grid-column: 2; font-size: 11px; }
.v5-o-dot { width: 9px; height: 9px; }
.v5-o-legend-item.v5-o-care { background: #fff4f7; border-color: rgba(231, 150, 177, .22); }
.v5-o-legend-item.v5-o-movement { background: #fbf3fb; border-color: rgba(190, 145, 201, .22); }
.v5-o-legend-item.v5-o-health { background: #f5f2ff; border-color: rgba(147, 128, 207, .2); }

.v5-o-simple-head {
  display: grid;
  min-height: 76px;
  padding: 12px 14px;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  background: linear-gradient(145deg, #fff4f7, #fffafb);
  border: 1px solid rgba(226, 177, 196, .32);
  border-radius: 22px;
}
.v5-o-simple-head.v5-o-movement { background: linear-gradient(145deg, #fbf5fc, #fffafd); border-color: rgba(194, 153, 203, .3); }
.v5-o-simple-head.v5-o-health { background: linear-gradient(145deg, #f5f2ff, #fcfbff); border-color: rgba(159, 140, 214, .28); }
.v5-o-simple-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: #a8657e;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 7px 16px rgba(100, 67, 90, .08);
}
.v5-o-movement .v5-o-simple-icon { color: #805b8a; }
.v5-o-health .v5-o-simple-icon { color: #6956a1; }
.v5-o-simple-icon svg { width: 24px; height: 24px; }
.v5-o-simple-head small { color: var(--v5-muted); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.v5-o-simple-head h1 { margin: 2px 0 0; color: var(--v5-ink); font-size: 20px; line-height: 1.05; }
.v5-o-simple-head > strong { color: var(--v5-brand-dark); font-size: 18px; }

.v5-o-role-switch { margin-top: 2px; }
.v5-o-role-switch button { min-height: 42px; }
.v5-o-simple-toolbar {
  display: flex;
  min-height: 40px;
  margin-top: 2px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.v5-o-simple-toolbar h2 { margin: 0; color: var(--v5-ink); font-size: 16px; }
.v5-o-simple-toolbar button {
  min-width: 60px;
  min-height: 36px;
  padding: 7px 11px;
  color: var(--v5-brand-dark);
  background: var(--v5-brand-soft);
  border: 0;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 900;
}

.v5-o-app-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}
.v5-o-app-grid.is-editing { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.v5-o-app-wrap { position: relative; min-width: 0; }
.v5-o-app {
  position: relative;
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 104px;
  padding: 12px 4px 9px;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  color: var(--v5-ink);
  background: var(--v5-surface);
  border: 1px solid var(--v5-line);
  border-radius: 19px;
  box-shadow: 0 7px 18px rgba(84, 57, 101, .045);
}
.v5-o-app .v5-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: var(--v5-brand-dark);
  background: var(--v5-brand-soft);
  border-radius: 15px;
}
.v5-o-app .v5-icon svg { width: 24px; height: 24px; }
.v5-o-app strong {
  width: 100%;
  overflow-wrap: anywhere;
  font-size: 9px;
  line-height: 1.15;
  text-align: center;
}
.v5-o-app-wrap.is-done .v5-o-app,
.v5-o-app-select.is-selected { border-color: rgba(104, 153, 124, .34); background: linear-gradient(145deg, #f7fcf9, #fff); }
.v5-o-app-status,
.v5-o-app-check {
  position: absolute;
  z-index: 2;
  top: -5px;
  right: -5px;
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  color: transparent;
  background: transparent;
  border: 0;
  font-size: 10px;
  font-weight: 900;
}
.v5-o-app-status::before,
.v5-o-app-check::before {
  position: absolute;
  z-index: -1;
  width: 20px;
  height: 20px;
  content: "";
  background: #fff;
  border: 1.5px solid #d8d0dc;
  border-radius: 50%;
}
.v5-o-app-status.is-done,
.v5-o-app-select.is-selected .v5-o-app-check { color: #fff; background: transparent; }
.v5-o-app-status.is-done::before,
.v5-o-app-select.is-selected .v5-o-app-check::before { background: #6f9b7f; border-color: #6f9b7f; }
.v5-o-app-select:not(.is-selected) .v5-o-app-check { color: var(--v5-brand-dark); }
.v5-flow .v5-o-app-complete {
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
}
.v5-o-empty-apps {
  grid-column: 1 / -1;
  min-height: 96px;
  color: var(--v5-brand-dark);
  background: var(--v5-brand-soft);
  border: 1px dashed rgba(123, 107, 200, .3);
  border-radius: 18px;
  font-weight: 900;
}

body.v5-active.night .v5-o-card,
body.v5-active.night .v5-o-app,
body.v5-active.night .v5-o-simple-head { background: var(--v5-surface); }

@media (max-width: 390px) {
  .v5-o-card { padding: 14px 12px; }
  .v5-o-ring-wrap { width: min(100%, 286px); }
  .v5-o-record { width: 64px; }
  .v5-o-legend-item { min-height: 54px; padding-inline: 5px; }
  .v5-o-app-grid { gap: 5px; }
  .v5-o-app { min-height: 98px; padding-inline: 2px; border-radius: 16px; }
  .v5-o-app .v5-icon { width: 42px; height: 42px; }
  .v5-o-app strong { font-size: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .v5-o-hit { transition: none; }
}

/* V7.1 — denný kruh pre pohodu mamy bez tlaku na výkon. */
.v5-o-mother-head {
  position: relative;
  z-index: 3;
  display: flex;
  min-height: 42px;
  padding: 0 2px;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}
.v5-o-mother-head strong,
.v5-o-mother-head small { display: block; }
.v5-o-mother-head strong { color: var(--v5-ink); font-size: 17px; line-height: 1.1; }
.v5-o-mother-head small { margin-top: 3px; color: var(--v5-muted); font-size: 9px; font-weight: 800; }
.v5-o-request-grid .v5-quick-tile { padding-inline: 7px; }
.v5-o-request-grid .v5-quick-tile strong { font-size: 10px; white-space: normal; }
.v5-o-status-grid .v5-o-day-row { min-height: 116px !important; }
.v5-o-status-grid .v5-o-day-row strong {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}
.v5-o-legend-item {
  grid-template-columns: 9px minmax(0, 1fr) auto;
}
.v5-o-legend-item b {
  grid-column: 3;
  grid-row: 1;
  align-self: center;
}

@media (max-width: 390px) {
  .v5-o-mother-head strong { font-size: 15px; }
}

/* V7.3 — citové funkcie sú jeden príbeh, nie ďalšia galéria aplikácií. */
#v5Drawer .v5-drawer-emotional-card {
  display: grid;
  width: 100%;
  min-height: 104px;
  margin: 2px 0 14px;
  padding: 16px;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  color: var(--v5-ink);
  text-align: left;
  background: linear-gradient(135deg, #f2edff 0%, #fff3ee 58%, #fff9df 100%);
  border: 1px solid rgba(122, 99, 187, .13);
  border-radius: 22px;
}
#v5Drawer .v5-drawer-emotional-card .v5-icon {
  width: 52px;
  height: 52px;
  color: #725dbe;
  background: rgba(255,255,255,.82);
  border-radius: 17px;
}
#v5Drawer .v5-drawer-emotional-card small,
#v5Drawer .v5-drawer-emotional-card strong,
#v5Drawer .v5-drawer-emotional-card em { display: block; }
#v5Drawer .v5-drawer-emotional-card small { color: #9a6c45; font-size: 9px; font-weight: 900; text-transform: uppercase; }
#v5Drawer .v5-drawer-emotional-card strong { margin-top: 2px; font-size: 18px; }
#v5Drawer .v5-drawer-emotional-card em { margin-top: 3px; color: var(--v5-muted); font-size: 10px; font-style: normal; line-height: 1.3; }

.v5-moments-hub,
.v5-lullaby-quick-list { display: grid; gap: 10px; }
.v5-moments-hub > button,
.v5-lullaby-quick-list > button {
  display: grid;
  width: 100%;
  min-height: 82px;
  padding: 12px;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  color: var(--v5-ink);
  text-align: left;
  background: #fff;
  border: 1px solid var(--v5-line);
  border-radius: 20px;
}
.v5-moments-hub > button:nth-child(1) { background: #fff8e8; }
.v5-moments-hub > button:nth-child(2) { background: #f5f1ff; }
.v5-moments-hub > button:nth-child(3) { background: #fff0f2; }
.v5-moments-hub .v5-icon,
.v5-lullaby-quick-list .v5-icon { width: 48px; height: 48px; color: #715dbb; background: rgba(255,255,255,.86); border-radius: 15px; }
.v5-moments-hub strong,
.v5-moments-hub small,
.v5-lullaby-quick-list strong,
.v5-lullaby-quick-list small { display: block; }
.v5-moments-hub strong,
.v5-lullaby-quick-list strong { font-size: 14px; }
.v5-moments-hub small,
.v5-lullaby-quick-list small { margin-top: 3px; color: var(--v5-muted); font-size: 10px; }
.v5-lullaby-quick-list { margin-top: 10px; }
.v5-lullaby-quick-list > button { min-height: 68px; grid-template-columns: 42px minmax(0, 1fr) auto; }
.v5-lullaby-quick-list .v5-icon { width: 42px; height: 42px; }
.v5-lullaby-quick-list b { color: #6e59b6; font-size: 10px; }
.v5-shared-lullabies { margin-top: 18px; }
.v5-moment-photo { width: 100%; max-height: 300px; object-fit: cover; border-radius: 20px; }

.v5-first-moments-grid {
  display: grid;
  margin-bottom: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.v5-first-moments-grid > button {
  min-height: 128px;
  padding: 14px 8px;
  color: var(--v5-ink);
  background: #f6f2ff;
  border: 1px solid transparent;
  border-radius: 20px;
}
.v5-first-moments-grid > button.is-saved { background: #eaf6ee; border-color: #b9dac5; }
.v5-first-moments-grid .v5-icon { width: 46px; height: 46px; margin: 0 auto 8px; color: #6d59b7; background: #fff; border-radius: 15px; }
.v5-first-moments-grid strong,
.v5-first-moments-grid small { display: block; }
.v5-first-moments-grid strong { font-size: 12px; line-height: 1.25; }
.v5-first-moments-grid small { margin-top: 5px; color: var(--v5-muted); font-size: 9px; }

.v5-story-output-grid { display: grid; gap: 10px; }
.v5-story-output-grid section {
  display: grid;
  min-height: 94px;
  padding: 14px;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  background: linear-gradient(135deg, #f3efff, #fff2ed);
  border: 1px solid rgba(122, 99, 187, .12);
  border-radius: 21px;
}
.v5-story-output-grid section > span { color: #765fc1; font-size: 30px; font-weight: 950; text-align: center; }
.v5-story-output-grid strong,
.v5-story-output-grid small { display: block; }
.v5-story-output-grid strong { font-size: 14px; }
.v5-story-output-grid small { margin-top: 5px; color: var(--v5-muted); font-size: 10px; line-height: 1.35; }

/* V7.5 — jeden čistý zobrazovací systém pre každú aplikáciu a podaplikáciu. */
body.v5-active.v5-app-window-open {
  overflow: hidden;
}

html.v5-app-window-open {
  overflow: hidden;
}

body.v5-active.v5-app-window-open #v5Header,
body.v5-active.v5-app-window-open #v5BottomBar.v5-hidden-for-window {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

body.v5-active.v5-app-window-open .main::before {
  position: fixed;
  z-index: 160;
  inset: 0;
  content: "";
  background: rgba(40, 33, 51, .32);
  -webkit-backdrop-filter: blur(11px);
  backdrop-filter: blur(11px);
}

body.v5-active.v5-app-window-open .view.active {
  position: fixed !important;
  z-index: 170;
  top: max(10px, env(safe-area-inset-top));
  bottom: max(10px, env(safe-area-inset-bottom));
  left: 50%;
  display: block !important;
  width: min(calc(100vw - 20px), 720px);
  max-width: 720px;
  margin: 0;
  padding: 0 14px 42px !important;
  overflow-x: hidden;
  overflow-y: auto;
  transform: translateX(-50%);
  color: var(--v5-ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(229, 218, 255, .38), transparent 31%),
    radial-gradient(circle at 98% 2%, rgba(255, 220, 222, .34), transparent 28%),
    var(--v5-bg);
  border: 1px solid rgba(104, 82, 139, .13);
  border-radius: 30px;
  box-shadow: 0 28px 90px rgba(38, 29, 49, .28);
  overscroll-behavior: contain;
}

.v5-universal-window-head {
  position: sticky;
  z-index: 14;
  top: 0;
  display: grid;
  min-height: 76px;
  margin: 0 -14px 14px;
  padding: 10px 12px;
  grid-template-columns: 74px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 7px;
  background: color-mix(in srgb, var(--v5-bg) 91%, transparent);
  border-bottom: 1px solid var(--v5-line);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.v5-universal-window-head > div {
  min-width: 0;
  text-align: center;
}

.v5-universal-window-head small,
.v5-universal-window-head strong {
  display: block;
}

.v5-universal-window-head small {
  color: var(--v5-muted);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.v5-universal-window-head strong {
  margin-top: 2px;
  overflow: hidden;
  color: var(--v5-ink);
  font-size: 14px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v5-universal-back,
.v5-universal-cancel {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  color: var(--v5-brand-dark);
  background: var(--v5-surface);
  border: 1px solid var(--v5-line);
  box-shadow: 0 6px 18px rgba(64, 48, 86, .07);
}

.v5-universal-back {
  min-width: 72px;
  padding: 7px 10px;
  gap: 5px;
  border-radius: 15px;
  font-size: 10px;
  font-weight: 900;
}

.v5-universal-back svg { width: 17px; height: 17px; }
.v5-universal-cancel { width: 46px; padding: 0; border-radius: 50%; font-size: 24px; line-height: 1; }
.v5-universal-back:focus-visible,
.v5-universal-cancel:focus-visible { outline: 3px solid rgba(121, 101, 203, .22); outline-offset: 2px; }

body.v5-active.v5-app-window-open .view.active > .screen,
body.v5-active.v5-app-window-open .view.active > .view-content,
body.v5-active.v5-app-window-open .view.active > .feature-content {
  max-width: none;
  margin-inline: 0;
}

body.v5-active.v5-app-window-open .activities-shell,
body.v5-active.v5-app-window-open .private-shell,
body.v5-active.v5-app-window-open .teeth-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 0 26px;
  background: transparent;
}

body.v5-active.v5-app-window-open .activities-hero,
body.v5-active.v5-app-window-open .teeth-hero,
body.v5-active.v5-app-window-open .private-heading {
  margin-top: 2px;
}

body.v5-active.v5-app-window-open .activities-hero h1,
body.v5-active.v5-app-window-open .teeth-hero h1,
body.v5-active.v5-app-window-open .private-heading h1 {
  display: none;
}

body.v5-active.night.v5-app-window-open .view.active {
  background: var(--v5-bg);
}

/* Dva významy jedného kruhu: pohoda alebo organizácia. */
.v5-circle-switch {
  position: relative;
  z-index: 5;
  display: grid;
  width: 108px;
  margin: 0 auto 2px;
  padding: 3px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  background: color-mix(in srgb, var(--v5-brand-soft) 72%, var(--v5-surface));
  border: 1px solid var(--v5-line);
  border-radius: 15px;
}

.v5-circle-switch button {
  min-height: 36px;
  padding: 4px;
  color: var(--v5-muted);
  background: transparent;
  border: 0;
  border-radius: 12px;
  font-size: 19px;
  font-weight: 900;
}

.v5-circle-switch button span {
  display: block;
  line-height: 1;
}

.v5-circle-switch button.active {
  color: var(--v5-brand-dark);
  background: var(--v5-surface);
  box-shadow: 0 6px 16px rgba(67, 50, 91, .1);
}

.v5-o-next-task {
  background: radial-gradient(circle at 32% 25%, rgba(255,255,255,.34), transparent 36%), linear-gradient(145deg, #ead4db, #d8b2c3 55%, #bd91aa);
}

.v5-org-progress {
  height: 8px;
  margin: 1px 2px 15px;
  overflow: hidden;
  background: var(--v5-brand-soft);
  border-radius: 999px;
}

.v5-org-progress span {
  display: block;
  width: var(--progress);
  height: 100%;
  background: linear-gradient(90deg, #8974ce, #d19aaa);
  border-radius: inherit;
  transition: width .25s ease;
}

.v5-org-next-card {
  display: grid;
  min-height: 290px;
  padding: 24px 18px;
  place-items: center;
  align-content: center;
  gap: 12px;
  text-align: center;
  background: linear-gradient(145deg, #f4efff, #fff6f1);
  border: 1px solid var(--v5-line);
  border-radius: 26px;
}

.v5-org-next-card > small {
  color: #9a6a48;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.v5-org-next-card .v5-icon {
  width: 68px;
  height: 68px;
  color: var(--v5-brand-dark);
  background: rgba(255,255,255,.86);
  border-radius: 22px;
  box-shadow: 0 9px 24px rgba(71, 51, 96, .08);
}

.v5-org-next-card .v5-icon svg { width: 32px; height: 32px; }
.v5-org-next-card h3 { max-width: 360px; margin: 0; color: var(--v5-ink); font-size: 22px; line-height: 1.16; }
.v5-org-next-card .v5-primary { width: min(100%, 320px); margin-top: 4px; }

.v5-org-completed {
  margin-top: 12px;
  padding: 4px 13px;
  background: var(--v5-surface);
  border: 1px solid var(--v5-line);
  border-radius: 17px;
}

.v5-org-completed summary {
  min-height: 46px;
  padding: 13px 0;
  color: var(--v5-muted);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.v5-org-completed div {
  display: flex;
  min-height: 42px;
  padding: 9px 2px;
  align-items: center;
  gap: 9px;
  color: var(--v5-ink);
  border-top: 1px solid var(--v5-line);
  font-size: 11px;
}

.v5-org-completed div span { color: var(--v5-success); font-weight: 900; }

@media (max-width: 520px) {
  body.v5-active.v5-app-window-open .view.active {
    top: max(6px, env(safe-area-inset-top));
    bottom: max(6px, env(safe-area-inset-bottom));
    width: calc(100vw - 12px);
    padding-inline: 11px !important;
    border-radius: 25px;
  }
  .v5-universal-window-head { margin-inline: -11px; padding-inline: 9px; grid-template-columns: 67px minmax(0, 1fr) 46px; }
  .v5-universal-back { min-width: 65px; padding-inline: 7px; }
  .v5-universal-window-head strong { font-size: 13px; }
  .v5-org-next-card { min-height: 260px; padding-inline: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .v5-org-progress span { transition: none; }
}
