/* ==========================================================================
   AURA OS — iOS 26 "Liquid Glass" design system.
   System font stack (SF Pro via -apple-system), iOS system colors, exact
   HIG component proportions (segmented control, switches, inset-grouped
   lists), SF-Symbols-style line icons (Lucide) for all interface chrome.
   Floating chrome (tab bar, navbar, sheets, primary buttons, banners) uses
   the Liquid Glass material: heavy blur + saturation, a bright inset top
   highlight to read as a refractive edge, and pill/continuous-corner shapes.
   ========================================================================== */

:root {
  --font-system: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", system-ui, Arial, sans-serif;

  /* iOS system colors — light */
  --bg: #F2F2F7;
  --card: #FFFFFF;
  --card-2: #F2F2F7;
  --label: #000000;
  --label-2: rgba(60, 60, 67, 0.6);
  --label-3: rgba(60, 60, 67, 0.3);
  --separator: rgba(60, 60, 67, 0.29);
  --fill: rgba(120, 120, 128, 0.12);
  --fill-2: rgba(120, 120, 128, 0.2);

  --blue: #007AFF;
  --green: #34C759;
  --orange: #FF9500;
  --red: #FF3B30;
  --purple: #AF52DE;
  --yellow: #FFCC00;
  --teal: #32ADE6;
  --gray: #8E8E93;

  --navbar-bg: rgba(242, 242, 247, 0.82);
  --tabbar-bg: rgba(249, 249, 249, 0.86);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-float: 0 8px 24px -4px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08);

  /* Liquid Glass material — the floating layer that sits above content.
     Real Liquid Glass is built from three layers Apple names explicitly:
     a highlight (specular light catching the top edge), a shadow (depth
     separating it from what's behind), and illumination (the frosted body
     itself). --glass-sheen is the highlight layer, applied via ::before on
     every floating glass surface below; --glass-blur/--glass-tint/
     --glass-shadow are the illumination + shadow layers. */
  --glass-blur: blur(34px) saturate(220%) brightness(1.04);
  --glass-tint: rgba(255, 255, 255, 0.55);
  --glass-tint-strong: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-sheen: radial-gradient(120% 100% at 50% -30%, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0) 60%);
  --glass-shadow:
    0 14px 32px -8px rgba(0, 0, 0, 0.18),
    0 2px 6px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    inset 0 -1px 0 rgba(0, 0, 0, 0.03);

  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
}

/* AURA OS is deliberately locked to the light/white palette above — the
   product is a "bela, minimalistička" mobile app, so it must look the same
   regardless of the device's system dark-mode setting. (A dark variant
   existed here before; keep it out on purpose.) */

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--label);
  font-family: var(--font-system);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button {
  font-family: var(--font-system);
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.ico {
  width: 20px;
  height: 20px;
  stroke-width: 1.9;
  display: block;
  flex-shrink: 0;
}

#app {
  position: relative;
  min-height: 100vh;
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}

/* ---- Navbar ---------------------------------------------------------- */

.ios-navbar {
  position: sticky;
  top: 0;
  z-index: 30;
  /* viewport-fit=cover draws the page under the status bar / Dynamic Island,
     so the bar must add its own safe-area padding — otherwise the title
     renders behind the notch instead of below it. */
  height: calc(48px + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navbar-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 0.5px solid transparent;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.5);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ios-navbar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--glass-sheen);
  pointer-events: none;
}

.ios-navbar.is-scrolled {
  border-bottom-color: var(--separator);
  box-shadow: 0 1px 16px rgba(0, 0, 0, 0.04);
}

.navbar-title {
  position: relative;
  z-index: 1;
  font-size: 17px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s, transform 0.2s;
}

.ios-navbar.is-scrolled .navbar-title {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Main / views ------------------------------------------------------ */

.ios-main {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 16px 28px;
}

.view[hidden] {
  display: none;
}

.large-title {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  padding: 8px 4px 4px;
}

.large-subtitle {
  font-size: 15px;
  color: var(--label-2);
  padding: 0 4px 18px;
}

.section-label {
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--label-2);
  padding: 18px 16px 6px;
}

/* ---- Now card ----------------------------------------------------------- */

.now-card {
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 6px;
}

.now-icon-tile {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--orange);
}

.now-icon-tile .ico {
  width: 24px;
  height: 24px;
  stroke-width: 1.8;
  color: #fff;
}

.now-text {
  flex: 1;
  min-width: 0;
}

.now-clock {
  font-size: 13px;
  color: var(--label-2);
  font-variant-numeric: tabular-nums;
  margin-bottom: 2px;
}

.now-title {
  font-size: 17px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.now-sub {
  font-size: 13px;
  color: var(--label-2);
  margin-top: 1px;
}

.ring {
  position: relative;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
}

.ring svg {
  width: 46px;
  height: 46px;
  transform: rotate(-90deg);
}

.ring-track {
  fill: none;
  stroke: var(--fill);
  stroke-width: 4;
}

.ring-fill {
  fill: none;
  stroke: var(--orange);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 125.6;
  stroke-dashoffset: calc(125.6 - (125.6 * var(--pct)) / 100);
  transition: stroke-dashoffset 0.5s ease, stroke 0.3s;
}

body[data-mode="recovery"] .ring-fill {
  stroke: var(--green);
}

.ring-pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ---- Segmented control -------------------------------------------------- */

.segmented {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--fill);
  border-radius: var(--r-sm);
  padding: 2px;
  margin-top: 14px;
  height: 36px;
}

.segmented-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(50% - 2px);
  height: calc(100% - 4px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.9));
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 1px 1px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

body[data-mode="recovery"] .segmented-thumb {
  transform: translateX(100%);
}

.segment-btn {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--label-2);
  transition: color 0.2s;
}

.segment-btn .ico {
  width: 15px;
  height: 15px;
  stroke-width: 2.1;
}

body[data-mode="training"] .segment-btn[data-mode="training"] {
  color: var(--orange);
}

body[data-mode="recovery"] .segment-btn[data-mode="recovery"] {
  color: var(--green);
}

.mode-auto-row {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.mode-reset {
  font-size: 13px;
  color: var(--blue);
  padding: 4px 8px;
}

.mode-reset.is-hidden {
  visibility: hidden;
}

/* ---- Quick stats (water + progress) -------------------------------------- */

.stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.stat-card {
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: 14px;
}

.stat-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
}

.stat-head .ico {
  width: 16px;
  height: 16px;
  stroke-width: 2.1;
  color: var(--teal);
}

.stat-head span {
  font-size: 13px;
  font-weight: 600;
  color: var(--label-2);
}

.water-widget {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}

.water-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--fill);
  font-size: 16px;
  font-weight: 600;
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.water-btn:active {
  background: var(--fill-2);
}

.water-mid {
  text-align: center;
  flex: 1;
}

.water-amount {
  font-size: 19px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.water-goal {
  font-size: 11px;
  color: var(--label-2);
}

.water-fill-track {
  height: 5px;
  border-radius: 3px;
  background: var(--fill);
  margin-top: 8px;
  overflow: hidden;
}

.water-fill-bar {
  height: 100%;
  width: 0%;
  border-radius: 3px;
  background: var(--teal);
  transition: width 0.4s ease, background 0.3s;
}

.stat-card.is-goal-met .water-fill-bar {
  background: var(--green);
}

/* ---- Grouped inset lists -------------------------------------------------- */

.ios-group {
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.ios-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 9px 14px;
  text-align: left;
  transition: background 0.1s;
}

.ios-row:active {
  background: var(--fill);
}

.ios-row:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 54px;
  right: 0;
  bottom: 0;
  height: 0.5px;
  background: var(--separator);
}

.row-icon-tile {
  width: 29px;
  height: 29px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.row-icon-tile .ico {
  width: 16px;
  height: 16px;
  stroke-width: 2.1;
  color: #fff;
}

.tile-orange { background: var(--orange); }
.tile-green { background: var(--green); }
.tile-blue { background: var(--blue); }
.tile-red { background: var(--red); }
.tile-gray { background: var(--gray); }
.tile-purple { background: var(--purple); }
.tile-yellow { background: var(--yellow); }
.tile-teal { background: var(--teal); }

.row-text {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.row-title {
  font-size: 15px;
  line-height: 1.3;
}

.ios-row.is-checked .row-title {
  color: var(--label-2);
}

.row-note {
  font-size: 12px;
  color: var(--label-3);
  margin-top: 1px;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.bw-launch {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--fill);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  transition: background 0.15s;
}

.bw-launch:active {
  background: var(--fill-2);
}

.bw-launch .ico {
  width: 15px;
  height: 15px;
  stroke-width: 2.2;
}

/* iOS switch — exact HIG proportions (51x31) */

.ios-switch {
  width: 51px;
  height: 31px;
  border-radius: 15.5px;
  background: var(--fill-2);
  position: relative;
  flex-shrink: 0;
  transition: background 0.25s;
}

.switch-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 1px rgba(0, 0, 0, 0.06), 0 3px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ios-row.is-checked .ios-switch {
  background: var(--green);
}

.ios-row.is-checked .switch-knob {
  transform: translateX(20px);
}

.ios-row.is-hard-stop-task.is-checked .ios-switch {
  background: var(--red);
}

/* ---- Timeline ------------------------------------------------------------ */

.timeline-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.block-card {
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: opacity 0.3s;
}

.block-card.is-past {
  opacity: 0.45;
}

.block-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  text-align: left;
}

.block-heading {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.block-title {
  font-size: 15px;
  font-weight: 600;
}

.block-time {
  font-size: 12px;
  color: var(--label-2);
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
}

.block-chevron {
  color: var(--label-3);
  transition: transform 0.25s;
  flex-shrink: 0;
}

.block-chevron .ico {
  width: 16px;
  height: 16px;
  stroke-width: 2.3;
}

.block-card.is-open .block-chevron {
  transform: rotate(180deg);
}

.block-card.is-current .block-header {
  background: var(--fill);
}

.block-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}

.block-card.is-open .block-body {
  grid-template-rows: 1fr;
}

.block-body > * {
  overflow: hidden;
  min-height: 0;
}

.block-note {
  padding: 0 14px 10px 55px;
  font-size: 12px;
  color: var(--label-2);
}

.block-tasks {
  border-top: 0.5px solid var(--separator);
  display: flex;
  flex-direction: column;
}

.block-tasks .ios-row {
  padding-left: 14px;
}

/* ---- Timeline view (Day Detail: "Po vremenu") ----------------------------- */

#dd-view-segmented {
  margin-top: 10px;
}

.timeline-block {
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  border-left: 3px solid var(--separator);
  transition: border-color 0.2s, opacity 0.2s;
}

.timeline-block.is-past-complete {
  border-left-color: rgba(52, 199, 89, 0.55);
}

.timeline-block.is-past-incomplete {
  border-left-color: rgba(255, 59, 48, 0.65);
}

.timeline-block.is-future {
  opacity: 0.62;
}

.timeline-block + .timeline-block {
  margin-top: 10px;
}

.timeline-block.is-current .timeline-block-header {
  background: var(--fill);
}

.timeline-block-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  text-align: left;
}

.timeline-block-heading {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.timeline-block-title {
  font-size: 15px;
  font-weight: 600;
}

.timeline-block-time {
  font-size: 12px;
  color: var(--label-2);
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
}

.timeline-block-note {
  padding: 0 14px 10px 55px;
  font-size: 12px;
  color: var(--label-2);
}

.timeline-block-tasks {
  border-top: 0.5px solid var(--separator);
  display: flex;
  flex-direction: column;
}

.timeline-block-tasks .ios-row {
  padding-left: 14px;
}

.timeline-block-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 20px;
  flex-shrink: 0;
  white-space: nowrap;
}

.timeline-block-badge.is-complete {
  color: #1f8a3d;
  background: rgba(52, 199, 89, 0.12);
}

.timeline-block-badge.is-incomplete {
  color: #c0392b;
  background: rgba(255, 59, 48, 0.12);
}

/* Desk timer widget */

.desk-timer-widget {
  padding: 18px 14px;
  text-align: center;
  border-top: 0.5px solid var(--separator);
}

.desk-timer-label {
  font-size: 12px;
  color: var(--label-2);
  margin-bottom: 10px;
}

.desk-timer-display {
  font-size: 40px;
  font-weight: 700;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.desk-timer-widget.is-running .desk-timer-display {
  color: var(--label);
}

.desk-timer-controls {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 14px;
}

.dt-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--fill);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  transition: background 0.15s;
}

.dt-btn:active {
  background: var(--fill-2);
}

.dt-btn .ico {
  width: 18px;
  height: 18px;
  stroke-width: 2.1;
}

/* ---- Breathe tab ---------------------------------------------------------- */

.breathe-intro {
  padding: 4px 4px 16px;
  font-size: 15px;
  color: var(--label-2);
}

.breathe-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.breathe-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: 16px;
  text-align: left;
  transition: transform 0.15s;
}

.breathe-card:active {
  transform: scale(0.98);
}

.breathe-icon-tile {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.breathe-icon-tile .ico {
  width: 26px;
  height: 26px;
  stroke-width: 1.8;
  color: #fff;
}

.breathe-text {
  flex: 1;
}

.breathe-title {
  font-size: 16px;
  font-weight: 600;
}

.breathe-sub {
  font-size: 13px;
  color: var(--label-2);
  margin-top: 2px;
}

.breathe-chevron {
  color: var(--label-3);
}

.breathe-chevron .ico {
  width: 17px;
  height: 17px;
  stroke-width: 2.2;
}

.breathe-log {
  margin-top: 22px;
  font-size: 13px;
  color: var(--label-3);
  text-align: center;
}

/* ---- Tab bar — floating Liquid Glass capsule (iOS 26) ----------------------
   Docked off the screen edges rather than flush, with a sliding glass pill
   (.tab-bar-thumb) that morphs to sit behind whichever tab is active —
   position is driven from JS the same way the segmented-control thumb is.
   `.is-minimized` (toggled from JS on scroll direction) shrinks the whole
   capsule and collapses the labels — the real iOS 26 tab bar "minimizes to
   bring focus to content" on scroll-down and expands again on scroll-up,
   rather than just fading; it stays fully tappable throughout. */

.tab-bar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 40;
  display: flex;
  background: var(--glass-tint);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: 999px;
  border: 0.5px solid var(--glass-border);
  padding: 6px;
  box-shadow: var(--glass-shadow);
  /* left/right both stay plain length values in both states (never `auto`)
     so they interpolate smoothly toward a centered, narrower capsule —
     `auto` can't be transitioned and would make this snap instead of
     the "physically compresses" glide Liquid Glass is meant to have. */
  transition: padding 0.4s cubic-bezier(0.32, 0.72, 0, 1), left 0.4s cubic-bezier(0.32, 0.72, 0, 1), right 0.4s cubic-bezier(0.32, 0.72, 0, 1);
}

.tab-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: var(--glass-sheen);
  pointer-events: none;
}

.tab-bar.is-minimized {
  left: calc(50% - 100px);
  right: calc(50% - 100px);
  padding: 4px;
}

.tab-bar-thumb {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 6px;
  width: calc((100% - 12px) / 5);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.75));
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform 0.36s cubic-bezier(0.34, 1.15, 0.64, 1), top 0.4s ease, bottom 0.4s ease;
  z-index: 0;
}

.tab-bar.is-minimized .tab-bar-thumb {
  top: 4px;
  bottom: 4px;
}

.tab-btn {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 0 7px;
  border-radius: 999px;
  color: var(--gray);
  transition: color 0.2s, padding 0.4s cubic-bezier(0.32, 0.72, 0, 1), transform 0.15s ease;
}

.tab-bar.is-minimized .tab-btn {
  padding: 7px 0;
}

.tab-btn:active {
  transform: scale(0.88);
}

.tab-btn .ico {
  width: 23px;
  height: 23px;
  stroke-width: 1.9;
  transition: transform 0.25s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.tab-btn span {
  font-size: 10px;
  font-weight: 500;
  max-height: 12px;
  opacity: 1;
  transform: scaleY(1);
  transition: opacity 0.2s ease, max-height 0.3s ease, margin-top 0.3s ease;
}

.tab-bar.is-minimized .tab-btn span {
  max-height: 0;
  opacity: 0;
  margin-top: -2px;
}

.tab-btn.is-active {
  color: var(--blue);
}

.tab-btn.is-active .ico {
  /* Lucide has no filled counterpart to swap in the way SF Symbols swaps
     house → house.fill on tab selection, so a faint currentColor fill
     behind the same stroke approximates that "went solid" cue instead. */
  fill: currentColor;
  fill-opacity: 0.16;
  transform: translateY(-1px) scale(1.06);
}

/* ---- Decompression modal -------------------------------------------------- */

.decomp-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  padding: 20px;
}

.decomp-overlay.is-open {
  opacity: 1;
}

.decomp-card {
  background: var(--glass-sheen), var(--glass-tint-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 0.5px solid var(--glass-border);
  border-radius: 24px;
  padding: 28px 24px;
  text-align: center;
  max-width: 300px;
  box-shadow: var(--shadow-float);
}

.decomp-card.is-picker {
  max-width: 340px;
}

.decomp-intro {
  font-size: 13px;
}

.decomp-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.decomp-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: var(--card-2);
  border-radius: 14px;
  padding: 10px 12px;
  transition: background 0.15s, transform 0.1s;
}

.decomp-option:active {
  transform: scale(0.98);
}

.decomp-option.is-last-used {
  background: rgba(10, 132, 255, 0.1);
}

.decomp-option-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.decomp-option-icon .ico {
  width: 17px;
  height: 17px;
  color: #fff;
  stroke-width: 2;
}

.decomp-option-text {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.decomp-option-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--label);
  line-height: 1.25;
}

.decomp-option-sub {
  font-size: 11px;
  color: var(--label-2);
  margin-top: 1px;
}

.decomp-skip {
  font-size: 13px;
  color: var(--label-2);
  padding: 6px;
  width: 100%;
}

.decomp-icon-tile {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}

.decomp-icon-tile .ico {
  width: 26px;
  height: 26px;
  color: #fff;
  stroke-width: 1.8;
}

.decomp-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px;
}

.decomp-card p {
  font-size: 14px;
  color: var(--label-2);
  margin: 0 0 16px;
}

.decomp-count {
  font-size: 40px;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 18px;
  font-variant-numeric: tabular-nums;
}

.decomp-dismiss {
  /* A "tinted glass" button, not a flat color one — real Liquid Glass
     controls stay translucent (blur + a see-through color tint) even when
     prominent/colored, they don't go opaque. */
  background: var(--glass-sheen), linear-gradient(180deg, rgba(10, 132, 255, 0.85), rgba(0, 100, 230, 0.85));
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 0.5px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  width: 100%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 4px 12px rgba(0, 122, 255, 0.28);
  transition: transform 0.15s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.15s;
}

.decomp-dismiss:active {
  opacity: 0.85;
  transform: scale(0.97);
}

/* ---- Hard stop banner (Live-Activity-style floating card) ------------------ */

.hardstop-banner {
  position: fixed;
  top: calc(48px + env(safe-area-inset-top));
  left: 12px;
  right: 12px;
  z-index: 9500;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--glass-sheen), var(--glass-tint);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 0.5px solid var(--glass-border);
  border-radius: 20px;
  padding: 12px 14px;
  box-shadow: var(--glass-shadow);
  animation: banner-in 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes banner-in {
  from { transform: translateY(-16px) scale(0.96); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.hardstop-icon-tile {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  animation: rust-pulse 2s ease-in-out infinite;
}

.hardstop-icon-tile .ico {
  width: 20px;
  height: 20px;
  color: #fff;
  stroke-width: 2;
}

@keyframes rust-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(255, 59, 48, 0.15); }
}

.hardstop-text {
  flex: 1;
}

.hardstop-title {
  font-size: 14px;
  font-weight: 700;
}

.hardstop-sub {
  font-size: 12px;
  color: var(--label-2);
  margin-top: 1px;
}

.hardstop-banner button {
  background: var(--fill);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--red);
  flex-shrink: 0;
}

/* ---- Full-screen Breathwork engine ----------------------------------------- */

.bw-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: radial-gradient(ellipse at 50% 40%, #12161d 0%, #05070a 70%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: #F2F2F7;
  font-family: var(--font-system);
}

.bw-overlay.is-open {
  opacity: 1;
}

.bw-close {
  position: absolute;
  top: max(20px, env(safe-area-inset-top));
  right: 20px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(120, 120, 128, 0.36);
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
}

.bw-close .ico {
  width: 16px;
  height: 16px;
  stroke-width: 2.4;
}

.bw-sound {
  position: absolute;
  top: max(20px, env(safe-area-inset-top));
  left: 20px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(120, 120, 128, 0.36);
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.bw-sound.is-muted {
  background: rgba(255, 69, 58, 0.5);
}

.bw-sound .ico {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
}

.bw-pattern-name {
  position: absolute;
  top: max(24px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  font-size: 16px;
  font-weight: 600;
  color: rgba(242, 242, 247, 0.65);
}

.bw-stage {
  position: relative;
  width: min(60vw, 280px);
  height: min(60vw, 280px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.bw-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.bw-circle {
  width: 46%;
  height: 46%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 149, 0, 0.9), rgba(255, 149, 0, 0.2) 55%, transparent 75%);
  box-shadow: 0 0 60px 10px rgba(255, 149, 0, 0.32);
  transform: scale(1);
  transition: transform 4s ease-in-out, background 0.6s, box-shadow 0.6s;
}

.bw-circle.is-inhale {
  transform: scale(1.55);
  background: radial-gradient(circle at 35% 30%, rgba(50, 173, 230, 0.9), rgba(50, 173, 230, 0.2) 55%, transparent 75%);
  box-shadow: 0 0 80px 16px rgba(50, 173, 230, 0.35);
}

.bw-circle.is-exhale {
  transform: scale(0.75);
  background: radial-gradient(circle at 35% 30%, rgba(255, 59, 48, 0.82), rgba(255, 59, 48, 0.18) 55%, transparent 75%);
  box-shadow: 0 0 40px 6px rgba(255, 59, 48, 0.28);
}

.bw-circle.is-hold {
  transform: scale(1.15);
  background: radial-gradient(circle at 35% 30%, rgba(52, 199, 89, 0.9), rgba(52, 199, 89, 0.2) 55%, transparent 75%);
  box-shadow: 0 0 60px 12px rgba(52, 199, 89, 0.3);
}

.bw-phase-label {
  position: absolute;
  bottom: -56px;
  left: 50%;
  transform: translateX(-50%);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.bw-count {
  position: absolute;
  bottom: -84px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 15px;
  color: rgba(242, 242, 247, 0.55);
  font-variant-numeric: tabular-nums;
}

.bw-meta {
  margin-top: 96px;
  font-size: 13px;
  color: rgba(242, 242, 247, 0.5);
}

.bw-hof-action {
  margin-top: 18px;
}

.bw-btn {
  background: var(--glass-sheen), linear-gradient(180deg, rgba(10, 132, 255, 0.85), rgba(0, 100, 230, 0.85));
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 0.5px solid rgba(255, 255, 255, 0.35);
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 4px 14px rgba(0, 122, 255, 0.3);
  transition: transform 0.15s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.15s;
}

.bw-btn:active {
  opacity: 0.85;
  transform: scale(0.97);
}

.bw-timer {
  position: absolute;
  bottom: max(22px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

.bw-timer-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(242, 242, 247, 0.3);
  margin-bottom: 2px;
}

.bw-timer-value {
  font-size: 13px;
  color: rgba(242, 242, 247, 0.45);
  font-variant-numeric: tabular-nums;
}

.bw-duration-picker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.bw-duration-title {
  font-size: 18px;
  font-weight: 600;
  color: rgba(242, 242, 247, 0.9);
}

.bw-duration-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 280px;
}

.bw-duration-btn {
  padding: 12px 20px;
  border-radius: 14px;
  background: rgba(120, 120, 128, 0.28);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  min-width: 84px;
  transition: background 0.15s;
}

.bw-duration-btn:active {
  background: rgba(120, 120, 128, 0.42);
}

/* ---- Compact water widget (home page) -------------------------------------- */

.water-mini {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: 12px 14px;
  margin-top: 14px;
}

.water-mini-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.water-mini-icon .ico {
  width: 17px;
  height: 17px;
  color: #fff;
  stroke-width: 2;
}

.water-mini-body {
  flex: 1;
  min-width: 0;
}

.water-mini-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}

.water-mini-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--label-2);
}

.water-mini-amount {
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.water-mini-track {
  height: 5px;
  border-radius: 3px;
  background: var(--fill);
  overflow: hidden;
}

.water-mini-fill {
  height: 100%;
  width: 0%;
  border-radius: 3px;
  background: var(--teal);
  transition: width 0.4s ease, background 0.3s;
}

.water-mini.is-goal-met .water-mini-fill {
  background: var(--green);
}

.water-mini-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.water-mini-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--fill);
  font-size: 16px;
  font-weight: 600;
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.water-mini-btn:active {
  background: var(--fill-2);
}

/* ---- Hero block ("Sada radiš" — the routine for the current part of day) --

.hero-block sits right under the water/progress stat row on the Today view:
it's always expanded (no accordion), shows every task for whichever block
the clock is currently in, and — when that block is a meal — the 7-item
meal quick-pick. This is meant to be the first actionable thing you see. */

.hero-block {
  border: 1.5px solid var(--separator);
}

.hero-block .block-header {
  cursor: default;
}

.hero-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--green);
  background: rgba(52, 199, 89, 0.12);
  padding: 4px 9px;
  border-radius: 20px;
  flex-shrink: 0;
  white-space: nowrap;
}

.hero-empty {
  padding: 22px 16px;
  text-align: center;
  color: var(--label-2);
  font-size: 14px;
}

/* ---- Meal quick-pick (inline, at meal time) -------------------------------- */

.meal-picker {
  border-top: 0.5px solid var(--separator);
  padding: 4px 14px 14px;
}

.meal-picker-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--label-2);
  margin: 14px 0 8px;
}

.meal-logged-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(52, 199, 89, 0.12);
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 13px;
  color: #1f8a3d;
  font-weight: 600;
  margin-bottom: 10px;
}

.meal-logged-banner .ico {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
  flex-shrink: 0;
}

.meal-option-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.meal-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: var(--card-2);
  border-radius: 14px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.meal-option:active {
  transform: scale(0.98);
}

.meal-option.is-selected {
  background: rgba(52, 199, 89, 0.12);
}

.meal-option-text {
  flex: 1;
  min-width: 0;
}

.meal-option-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
}

.meal-option-kcal {
  font-size: 11.5px;
  color: var(--label-2);
  margin-top: 2px;
}

.meal-option-info {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--fill);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--label-2);
  transition: background 0.15s;
}

.meal-option-info:active {
  background: var(--fill-2);
}

.meal-option-info .ico {
  width: 14px;
  height: 14px;
  stroke-width: 2.2;
}

.meal-option-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--separator);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: transparent;
}

.meal-option.is-selected .meal-option-check {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.meal-option-check .ico {
  width: 13px;
  height: 13px;
  stroke-width: 3;
}

/* ---- Generic local segmented control (Ideje tabs, Day Detail mode toggle) --
   Same visual language as .segmented, but the thumb position and the active
   button color are driven by JS (inline transform / --seg-color), not by a
   global body[data-mode] attribute — so several of these can exist on screen
   at once (e.g. a Day Detail sheet for a past date) without fighting the
   Today tab's own segmented control. */

.segmented-local {
  --n: 2;
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--n), 1fr);
  background: var(--fill);
  border-radius: var(--r-sm);
  padding: 2px;
  height: 36px;
}

.segmented-local .segmented-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc((100% - 4px) / var(--n));
  height: calc(100% - 4px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.9));
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 1px 1px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.segmented-local .segment-btn.is-selected {
  color: var(--seg-color, var(--blue));
}

.segmented-local .segment-btn {
  font-size: 11.5px;
  gap: 4px;
  padding: 0 2px;
}

.segmented-local .segment-btn .ico {
  width: 13px;
  height: 13px;
}

/* Same look as .segment-btn, own class name — the "Vežbe" tab's Disanje/Za
   leđa switch must never be caught by the Today tab's global
   document.querySelectorAll(".segment-btn") training/recovery wiring. */
.exseg-btn {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 0 2px;
  color: var(--label-2);
  transition: color 0.2s;
}

.exseg-btn.is-selected {
  color: var(--blue);
}

.exseg-btn .ico {
  width: 13px;
  height: 13px;
  stroke-width: 2.1;
}

#ex-segmented {
  margin: 14px 0 18px;
}

/* ---- Week tab: a real list, not a cramped 7-cell grid ----------------------
   Full day names, one big tap-target per day, a small progress ring instead
   of a bare percentage — reuses the same .ios-group/.ios-row list language
   as the rest of the app (Ideje, the Danas hero checklist) for consistency. */

.week-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 4px 14px;
}

.week-nav-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--fill);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--label);
  transition: background 0.15s;
}

.week-nav-btn:active {
  background: var(--fill-2);
}

.week-nav-btn .ico {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
}

.week-nav-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--label-2);
}

.week-day-row {
  width: 100%;
}

.week-day-row .row-text {
  cursor: default;
}

.week-day-row.is-today {
  background: rgba(10, 132, 255, 0.05);
}

.week-day-row.is-future {
  opacity: 0.55;
}

.today-badge {
  display: inline-block;
  margin-left: 6px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--blue);
  background: rgba(10, 132, 255, 0.12);
  padding: 1.5px 6px;
  border-radius: 8px;
  vertical-align: middle;
}

.mini-ring {
  position: relative;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.mini-ring svg {
  width: 34px;
  height: 34px;
  transform: rotate(-90deg);
}

.mini-ring-track {
  fill: none;
  stroke: var(--fill);
  stroke-width: 3;
}

.mini-ring-fill {
  fill: none;
  stroke: var(--ring-color, var(--blue));
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 91.1;
  stroke-dashoffset: calc(91.1 - (91.1 * var(--pct)) / 100);
  transition: stroke-dashoffset 0.5s ease;
}

.mini-ring-pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ---- Day Detail sheet ---------------------------------------------------- */

.dd-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: 14px 16px;
  margin: 14px 0;
}

.dd-summary-text {
  flex: 1;
  min-width: 0;
}

.dd-summary-count {
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.dd-summary-label {
  font-size: 12.5px;
  color: var(--label-2);
  margin-top: 1px;
}

.dd-overlay {
  position: fixed;
  inset: 0;
  z-index: 8500;
  background: var(--bg);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.dd-overlay.is-open {
  transform: translateY(0);
}

.dd-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: max(14px, env(safe-area-inset-top)) 16px 12px;
  background: var(--navbar-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 0.5px solid var(--separator);
}

.dd-back {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--fill);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dd-back .ico {
  width: 16px;
  height: 16px;
  stroke-width: 2.3;
}

.dd-title-wrap {
  flex: 1;
  min-width: 0;
}

.dd-title {
  font-size: 17px;
  font-weight: 700;
}

.dd-sub {
  font-size: 12px;
  color: var(--label-2);
  margin-top: 1px;
}

.dd-body {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px 16px 48px;
}

.dd-notes-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--label-2);
  margin: 22px 4px 8px;
}

.dd-notes {
  width: 100%;
  min-height: 96px;
  border-radius: var(--r-lg);
  border: none;
  background: var(--card);
  box-shadow: var(--shadow-card);
  padding: 13px 14px;
  font-size: 14px;
  line-height: 1.4;
  font-family: var(--font-system);
  color: var(--label);
  resize: vertical;
}

.dd-notes::placeholder {
  color: var(--label-3);
}

.dd-notes-saved {
  font-size: 11px;
  color: var(--green);
  text-align: right;
  margin-top: 6px;
  height: 14px;
  opacity: 0;
  transition: opacity 0.2s;
}

.dd-notes-saved.is-visible {
  opacity: 1;
}

/* ---- Ideje tab ------------------------------------------------------------

Redesigned as: colorful horizontally-scrolling category pills (one accent
per meal type, so nothing gets cramped) → a plain iOS inset list to browse
(reusing the same .ios-group/.ios-row language as the rest of the app) →
tapping a recipe opens the existing full-screen .dd-overlay sheet pattern
(already used by the Nedelja day detail) with room to actually read the
macros/ingredients/why without an accordion fighting for space. */

.ideas-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  padding: 2px;
  margin: 4px 0 14px;
}

.ideas-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 9px 6px;
  border-radius: 14px;
  background: var(--fill);
  font-size: 12px;
  font-weight: 600;
  color: var(--label-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}

.ideas-tab:active {
  transform: scale(0.96);
}

.ideas-tab .ico {
  width: 14px;
  height: 14px;
  stroke-width: 2.1;
  flex-shrink: 0;
}

.ideas-tab.is-active {
  background: var(--tab-accent, var(--blue));
  color: #fff;
}

.ideas-note {
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: 13px 14px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--label-2);
  margin: 0 0 16px;
}

.ideas-note b {
  color: var(--label);
}

.idea-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 3px;
}

.idea-row-meta span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11.5px;
  color: var(--label-2);
  font-variant-numeric: tabular-nums;
}

.idea-row-meta .meta-ico {
  width: 11px;
  height: 11px;
  stroke-width: 2.4;
}

.idea-row-meal-tag {
  background: var(--fill);
  color: var(--label) !important;
  font-weight: 600;
  padding: 1.5px 7px;
  border-radius: 20px;
}

.idea-row-chevron {
  color: var(--label-3);
  flex-shrink: 0;
}

.idea-row-chevron .ico {
  width: 15px;
  height: 15px;
  stroke-width: 2.2;
}

/* ---- Recipe detail sheet (reuses .dd-overlay/.dd-header/.dd-body shell) --- */

.idea-thumb-tile {
  position: relative;
  overflow: hidden;
}

.idea-row-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 7px;
  display: block;
}

.idea-photo-container {
  margin-bottom: 16px;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: var(--card);
  position: relative;
}

.idea-photo-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #1c1c1e;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}

.idea-detail-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
  cursor: pointer;
}

.idea-photo-wrapper:hover .idea-detail-photo {
  transform: scale(1.03);
}

.idea-dish-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.idea-photo-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.12) 0%, rgba(0,0,0,0) 40%, rgba(0,0,0,0.65) 100%);
  pointer-events: none;
}

.idea-photo-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  z-index: 2;
}

.idea-zoom-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 2;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0.5px solid rgba(255, 255, 255, 0.25);
  transition: background 0.2s, transform 0.15s;
}

.idea-zoom-btn:active {
  transform: scale(0.95);
  background: rgba(0, 0, 0, 0.75);
}

.idea-zoom-btn .ico {
  width: 13px;
  height: 13px;
  stroke-width: 2.2;
}

.idea-photo-caption {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--label-2);
  background: var(--card-2);
  border-top: 0.5px solid var(--separator);
}

.idea-photo-caption .meta-ico {
  width: 14px;
  height: 14px;
  color: var(--orange);
  stroke-width: 2.2;
}

/* Lightbox Modal for full screen meal image preview */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 20px;
}

.lightbox-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1001;
  transition: background 0.2s, transform 0.15s;
}

.lightbox-close:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.35);
}

.lightbox-close .ico {
  width: 20px;
  height: 20px;
  stroke-width: 2.3;
}

.lightbox-img {
  max-width: 92vw;
  max-height: 78vh;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  object-fit: contain;
}

.lightbox-title {
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  margin-top: 16px;
  text-align: center;
}

.idea-detail-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.idea-detail-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.idea-detail-icon .ico {
  width: 28px;
  height: 28px;
  color: #fff;
  stroke-width: 1.7;
}

.idea-chip {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2.5px 8px;
  border-radius: 20px;
  background: var(--fill);
  color: var(--label-2);
  white-space: nowrap;
}

.idea-chip.tag-training { background: rgba(255, 149, 0, 0.14); color: #C2670A; }
.idea-chip.tag-fasting { background: rgba(52, 199, 89, 0.14); color: #1F8A3D; }
.idea-chip.tag-any { background: rgba(50, 173, 230, 0.14); color: #0B7BAA; }
.idea-chip.tag-clay { background: rgba(184, 92, 56, 0.16); color: #8B4226; }

.idea-why-callout {
  background: var(--card-2);
  border-left: 3px solid var(--teal);
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 18px;
}

.idea-why-callout-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--teal);
  margin-bottom: 6px;
}

.idea-why-callout-label .ico {
  width: 13px;
  height: 13px;
  stroke-width: 2.4;
}

.idea-why-callout p {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--label);
  margin: 0;
}

.macro-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 4px;
}

.macro-pill {
  background: var(--card-2);
  border-radius: 10px;
  text-align: left;
  padding: 8px 10px;
}

.macro-pill .macro-val {
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.macro-pill .macro-lbl {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--label-2);
  margin-top: 1px;
}

.idea-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--label-2);
  margin: 14px 0 7px;
}

.idea-ingredients {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ingredient-chip {
  font-size: 12px;
  background: var(--fill);
  border-radius: 8px;
  padding: 5px 9px;
  line-height: 1.2;
}

.idea-prep {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--label);
  margin: 0;
}

/* ---- Profil tab: body stats, calculated targets, controls, data ----------- */

.settings-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 9px 14px;
}

.settings-row:not(:last-child) {
  border-bottom: 0.5px solid var(--separator);
}

.settings-row-label {
  flex: 1;
  font-size: 15px;
}

.settings-input-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.settings-input-wrap input {
  width: 64px;
  text-align: right;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  border: none;
  background: transparent;
  color: var(--label);
  font-family: var(--font-system);
}

.settings-input-wrap input[type="time"] {
  width: 92px;
}

.settings-input-wrap input:focus {
  outline: none;
}

.settings-input-wrap input::placeholder {
  color: var(--label-3);
}

.settings-input-wrap span {
  font-size: 13px;
  color: var(--label-2);
}

.suggest-btn {
  font-size: 11px;
  font-weight: 600;
  color: var(--blue);
  background: var(--fill);
  padding: 5px 9px;
  border-radius: 8px;
  flex-shrink: 0;
}

.suggest-btn:active {
  background: var(--fill-2);
}

.settings-saved-row {
  font-size: 11px;
  color: var(--green);
  text-align: right;
  padding: 0 14px;
  height: 16px;
  opacity: 0;
  transition: opacity 0.2s;
}

.settings-saved-row.is-visible {
  opacity: 1;
}

.sex-toggle {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.sex-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--fill);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--label-2);
  transition: background 0.15s, color 0.15s;
}

.sex-btn .ico {
  width: 15px;
  height: 15px;
  stroke-width: 2.1;
}

.sex-btn.is-active {
  background: var(--blue);
  color: #fff;
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 4px 0 16px;
}

.calc-card {
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: 14px;
}

.calc-card-icon {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 9px;
}

.calc-card-icon .ico {
  width: 14px;
  height: 14px;
  color: #fff;
  stroke-width: 2.1;
}

.calc-card-val {
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.calc-card-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--label-2);
  margin-top: 3px;
}

.calc-card-sub {
  font-size: 10.5px;
  color: var(--label-3);
  margin-top: 4px;
  line-height: 1.35;
}

.calc-empty {
  grid-column: 1 / -1;
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: 16px;
  font-size: 13px;
  color: var(--label-2);
  text-align: center;
}

.weight-row-delta {
  font-size: 12px;
  color: var(--label-2);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.settings-save-btn {
  display: block;
  width: 100%;
  background: var(--glass-sheen), linear-gradient(180deg, rgba(10, 132, 255, 0.85), rgba(0, 100, 230, 0.85));
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 0.5px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  padding: 12px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  margin: 4px 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 4px 14px rgba(0, 122, 255, 0.25);
  transition: transform 0.15s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.15s;
}

.settings-save-btn:active {
  opacity: 0.85;
  transform: scale(0.97);
}

.measure-status {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: 12px 14px;
  margin: 4px 0 10px;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--label-2);
}

.measure-status .ico {
  width: 17px;
  height: 17px;
  color: var(--blue);
  stroke-width: 2;
  flex-shrink: 0;
}

.measure-status.is-due {
  background: rgba(255, 149, 0, 0.1);
  color: #c2670a;
}

.measure-status.is-due .ico {
  color: var(--orange);
}

.trend-chart-card {
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: 14px;
  margin: 4px 0 16px;
}

.trend-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.trend-chart-title {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--label-2);
}

.trend-chart-delta {
  font-size: 13px;
  font-weight: 700;
  color: var(--label);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.trend-chart-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.trend-axis {
  stroke: var(--separator);
  stroke-width: 1;
}

.trend-point-label {
  font-size: 9px;
  font-weight: 700;
  font-family: var(--font-system);
}

.trend-chart-empty {
  font-size: 12.5px;
  color: var(--label-2);
  text-align: center;
  padding: 18px 4px;
}

.trend-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 10px;
}

.trend-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--label-2);
  font-variant-numeric: tabular-nums;
}

.trend-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.weekday-toggle {
  display: flex;
  gap: 7px;
  justify-content: space-between;
  margin: 4px 0 16px;
}

.weekday-btn {
  flex: 1;
  height: 40px;
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow-card);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--label-2);
  transition: background 0.15s, color 0.15s, transform 0.1s;
}

.weekday-btn:active {
  transform: scale(0.94);
}

.weekday-btn.is-active {
  background: var(--orange);
  color: #fff;
}

.danger-row .row-title {
  color: var(--red);
}

.scale-picker {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.scale-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--fill);
  font-size: 11px;
  font-weight: 700;
  color: var(--label-2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.scale-btn.is-active {
  background: var(--blue);
  color: #fff;
}

/* ---- Shopping list (Ideje tab, bottom) -------------------------------------
   Grouped grocery checklist covering every ingredient across all recipes —
   opened from the "Lista za kupovinu" row via the shared .dd-overlay sheet. */

.grocery-cat-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 18px 4px 8px;
}

.grocery-cat-header .row-icon-tile {
  width: 24px;
  height: 24px;
  border-radius: 7px;
}

.grocery-cat-header .row-icon-tile .ico {
  width: 13px;
  height: 13px;
}

.grocery-cat-header span {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--label-2);
}

/* Two-column grid — each item is its own chip, so the outer .ios-group
   card chrome (background/shadow) is neutralized in favor of per-item
   backgrounds, and there's no "last child" divider logic to get wrong
   across an odd/even item count split into two columns. */
.ios-group.grocery-list {
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.grocery-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.grocery-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 10px;
  text-align: left;
  background: var(--fill);
  border-radius: 10px;
}

.grocery-item:active {
  background: var(--separator);
}

.grocery-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--separator);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: transparent;
}

.grocery-item.is-checked .grocery-check {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.grocery-check .ico {
  width: 11px;
  height: 11px;
  stroke-width: 3;
}

.grocery-item-label {
  font-size: 12.5px;
  line-height: 1.25;
  flex: 1;
}

.grocery-item.is-checked .grocery-item-label {
  text-decoration: line-through;
  color: var(--label-3);
}

.grocery-priority-intro .ico {
  color: var(--orange);
}

.grocery-item.is-priority .grocery-item-label::after {
  content: " ★";
  color: var(--orange);
  font-size: 11px;
}

/* ---- Print: shopping list only, plain checkboxes to tick by hand ------- */

@media print {
  body * {
    visibility: hidden;
  }
  .dd-overlay,
  .dd-overlay * {
    visibility: visible;
  }
  .dd-overlay {
    position: absolute;
    inset: auto;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    overflow: visible;
    transform: none !important;
    background: #fff;
  }
  .dd-header {
    position: static;
    background: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid #000;
    padding: 4px 0 6px;
  }
  .dd-back,
  #grocery-print,
  #grocery-reset {
    display: none;
  }
  .dd-title {
    font-size: 15px;
  }
  .dd-sub {
    font-size: 10px;
  }
  .dd-body {
    max-width: 100%;
    padding: 6px 0 0;
  }
  .dd-title,
  .dd-sub,
  .grocery-item-label,
  .grocery-cat-header span,
  .grocery-priority-intro span,
  .eatout-tip span {
    color: #000 !important;
  }
  /* Compact explanatory blurbs — informational, not part of the checklist. */
  .grocery-priority-intro,
  .eatout-tip {
    background: #fff !important;
    border: 1px solid #000;
    padding: 4px 6px;
    margin: 4px 0;
    font-size: 9px;
    line-height: 1.3;
  }
  .grocery-priority-intro .ico,
  .eatout-tip .ico {
    display: none;
  }
  .grocery-cat-header {
    padding: 8px 2px 3px;
  }
  .grocery-cat-header span {
    font-size: 12px;
  }
  .grocery-cat-header .row-icon-tile {
    display: none;
  }
  .section-label {
    padding: 8px 2px 3px;
    font-size: 11px;
  }

  /* Excel-style grid: shared borders via container top/left + cell
     right/bottom, so adjoining cells don't double up their edges. */
  .grocery-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    border-top: 1px solid #000;
    border-left: 1px solid #000;
  }
  .grocery-item {
    background: #fff !important;
    border-radius: 0;
    border: none;
    border-right: 1px solid #000;
    border-bottom: 1px solid #000;
    min-height: 0;
    padding: 3px 6px;
    gap: 6px;
  }
  .grocery-item-label {
    font-size: 14px;
    line-height: 1.2;
  }
  .grocery-check {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    border: 1px solid #000 !important;
  }
  .grocery-check .ico {
    width: 9px;
    height: 9px;
  }
  .grocery-item.is-checked .grocery-check {
    background: #fff !important;
  }
  .grocery-item.is-checked .grocery-item-label {
    color: #000 !important;
  }
  .grocery-item.is-priority .grocery-item-label::after {
    color: #000 !important;
  }
}

/* ---- Auth screen (accounts / cloud sync, when configured) ------------------ */

.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 340px;
  background: var(--card);
  border-radius: 22px;
  box-shadow: var(--shadow-float);
  padding: 32px 24px 24px;
  text-align: center;
}

.auth-icon-tile {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.auth-icon-tile .ico {
  width: 28px;
  height: 28px;
  color: #fff;
  stroke-width: 1.8;
}

.auth-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
}

.auth-subtitle {
  font-size: 13.5px;
  color: var(--label-2);
  margin: 0 0 20px;
}

.auth-tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--fill);
  border-radius: var(--r-sm);
  padding: 2px;
  height: 36px;
  margin-bottom: 18px;
}

.auth-tab {
  font-size: 13px;
  font-weight: 600;
  color: var(--label-2);
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.auth-tab.is-active {
  background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.9));
  color: var(--label);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 1px 1px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-input {
  width: 100%;
  background: var(--card-2);
  border: none;
  border-radius: 12px;
  padding: 13px 14px;
  font-size: 15px;
  font-family: var(--font-system);
  color: var(--label);
}

.auth-input::placeholder {
  color: var(--label-3);
}

.auth-input:focus {
  outline: 2px solid var(--blue);
  outline-offset: -1px;
}

.auth-error {
  font-size: 12.5px;
  color: var(--red);
  text-align: left;
  padding: 0 2px;
}

.auth-submit {
  background: var(--glass-sheen), linear-gradient(180deg, rgba(10, 132, 255, 0.85), rgba(0, 100, 230, 0.85));
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 0.5px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  padding: 13px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  margin-top: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 4px 14px rgba(0, 122, 255, 0.25);
  transition: transform 0.15s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.15s;
}

.auth-submit:active {
  opacity: 0.85;
  transform: scale(0.97);
}

.auth-submit:disabled {
  opacity: 0.6;
}

.auth-note {
  font-size: 12.5px;
  color: var(--label-2);
  margin-top: 14px;
  line-height: 1.4;
}

/* ---- "Van kuće" tab: eating-out guidance cards (no macros — varies by
   kitchen — so order/avoid/tip instead of the recipe detail pattern) ------- */

.eatout-card {
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: 4px 14px 14px;
  margin-bottom: 10px;
}

.eatout-card .grocery-cat-header {
  padding-left: 0;
  padding-right: 0;
}

.eatout-section {
  margin-bottom: 10px;
}

.eatout-section:last-of-type {
  margin-bottom: 0;
}

.eatout-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 7px;
}

.eatout-label.is-good {
  color: var(--green);
}

.eatout-label.is-bad {
  color: var(--red);
}

.eatout-label .ico {
  width: 13px;
  height: 13px;
  stroke-width: 2.3;
}

.eatout-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.eatout-chip {
  font-size: 12px;
  background: var(--fill);
  border-radius: 8px;
  padding: 5px 9px;
  line-height: 1.3;
}

.eatout-tip {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--label-2);
  background: var(--card-2);
  border-radius: 12px;
  padding: 10px 12px;
  margin-top: 12px;
}

.eatout-tip .ico {
  width: 14px;
  height: 14px;
  color: var(--yellow);
  flex-shrink: 0;
  margin-top: 1px;
  stroke-width: 2.2;
}

/* ---- "Sezona" tab: current month gets a visible accent border ---------- */

.eatout-card.is-current-month {
  border: 1.5px solid var(--green);
}

.eatout-card .grocery-cat-header .idea-chip {
  margin-left: auto;
}

/* ---- Utility -------------------------------------------------------------- */

.is-hidden {
  display: none !important;
}

/* ---- Philosophy "lekar dana" card (Danas home view) ---------------------- */

.view-section {
  margin-top: 14px;
}

.philosophy-card {
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: 16px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.philosophy-icon-tile {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.philosophy-icon-tile .ico {
  width: 24px;
  height: 24px;
  stroke-width: 1.8;
  color: #fff;
}

.philosophy-body {
  flex: 1;
  min-width: 0;
}

.philosophy-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--purple);
  margin-bottom: 6px;
}

.philosophy-label .ico {
  width: 12px;
  height: 12px;
  stroke-width: 2.2;
}

.philosophy-text {
  font-size: 15px;
  line-height: 1.45;
  color: var(--label);
  margin: 0 0 6px;
}

.philosophy-source {
  font-size: 12.5px;
  color: var(--label-2);
}

/* ---- "Aktivni odmor" read-only cards in Vežbe tab ------------------------ */

.breathe-card.is-readonly {
  cursor: default;
}

.breathe-card.is-readonly:active {
  transform: none;
}

/* ---- Settings toggles + notes -------------------------------------------- */

.ios-switch.settings-switch {
  margin-left: auto;
  cursor: pointer;
}

.ios-switch.is-on {
  background: var(--green);
}

.ios-switch.is-on .switch-knob {
  transform: translateX(20px);
}

.settings-row-note {
  font-size: 12px;
  color: var(--label-2);
  line-height: 1.4;
  padding: 0 14px 12px;
  margin-top: -4px;
}

.settings-note {
  padding: 14px 16px 16px;
}

.settings-note-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--label);
  margin-bottom: 8px;
}

.settings-note-label .ico {
  width: 16px;
  height: 16px;
  color: var(--blue);
  stroke-width: 2;
}

.settings-note p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--label-2);
  margin: 0 0 8px;
}

.settings-note-medical {
  font-weight: 600;
  color: var(--red);
}

/* ---- Liquid Glass icon badges (iOS 26) ------------------------------------
   A diagonal specular highlight over the top-left plus a soft inner shadow
   along the bottom, layered on top of each tile's existing solid color
   (tile-orange etc. or an inline background), so every colored icon badge
   in the app reads as a glassy app-icon-style tile instead of a flat swatch.
   Placed last on purpose: background-image/box-shadow here must win the
   cascade over the earlier .tile-* / *-icon-tile background rules while
   leaving their background-color untouched.

   The corner shape is also swapped from a plain border-radius rectangle to
   a continuous "squircle" superellipse via an SVG mask — real iOS app-icon
   and glyph-badge corners are a superellipse, not a circular-arc rounded
   rect, and at these sizes (29–56px) the difference is what separates a
   web app icon from one that looks native. mask-size stretches the same
   100x100 path to any tile's box, so one mask serves every size; browsers
   without mask support silently fall back to each element's own
   border-radius (defined earlier per class). */
[class*="icon-tile"],
.calc-card-icon,
.idea-detail-icon,
.decomp-option-icon,
.water-mini-icon {
  background-image: linear-gradient(155deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.05) 45%, rgba(0, 0, 0, 0.05) 100%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.55), inset 0 -6px 10px rgba(0, 0, 0, 0.12);
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><path d='M50 0C15 0 0 15 0 50C0 85 15 100 50 100C85 100 100 85 100 50C100 15 85 0 50 0Z'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><path d='M50 0C15 0 0 15 0 50C0 85 15 100 50 100C85 100 100 85 100 50C100 15 85 0 50 0Z'/></svg>");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

/* ---- Reduced motion -------------------------------------------------------
   Apple's own apps disable non-essential animation when Reduce Motion is on
   (Settings ▸ Accessibility) — the tab-bar thumb glide, banner slide-in, and
   hard-stop pulse are all decorative, not load-bearing, so they're safe to
   cut to a plain state change. */
@media (prefers-reduced-motion: reduce) {
  .tab-bar-thumb,
  .tab-btn .ico,
  .segmented-thumb,
  .block-body,
  .decomp-overlay,
  .dd-overlay,
  .bw-overlay {
    transition-duration: 0.001ms !important;
  }
  .hardstop-banner {
    animation: none;
  }
  .hardstop-icon-tile {
    animation: none;
  }
}
