@font-face { font-family: "ORA Inter"; src: url("../assets/fonts/Inter-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "ORA Inter"; src: url("../assets/fonts/Inter-Medium.ttf") format("truetype"); font-weight: 500 700; font-style: normal; font-display: swap; }
@font-face { font-family: "ORA Serif"; src: url("../assets/fonts/Georgia-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --ink: #0b0b08;
  --ink-soft: #17170f;
  --ink-glass: rgba(18, 18, 12, .78);
  --gold: #f5c45e;
  --gold-bright: #fff0b1;
  --gold-deep: #9d651c;
  --cream: #ffe9b1;
  --text: #f7e8c3;
  --muted: #cbb88d;
  --line: rgba(246, 194, 83, .46);
  --shadow: rgba(0, 0, 0, .65);

  /* Base defaults (optimized for regular web browsers: zero wasted gap at the top) */
  --topbar-top: 14px;
  --welcome-top: 66px;
  --context-card-top: 172px;
  --quick-actions-top: 258px;
  --goal-selector-top: 320px;
  --practice-zone-top: 372px;
  --content-shelf-top: 628px;
  --bottom-nav-bottom: 0px;
}

/* Telegram Mobile WebApp specific clearance: needed to clear native header buttons (✕ / •••) */
.is-mobile-telegram {
  --topbar-top: 94px;
  --welcome-top: 151px;
  --context-card-top: 226px;
  --quick-actions-top: 318px;
  --goal-selector-top: 388px;
  --practice-zone-top: 454px;
  --content-shelf-top: 728px;
  --bottom-nav-bottom: 8px;
}

@media (min-width: 501px) {
  :root {
    --topbar-top: 26px;
    --welcome-top: 90px;
    --context-card-top: 164px;
    --quick-actions-top: 246px;
    --goal-selector-top: 306px;
    --practice-zone-top: 356px;
    --content-shelf-top: 596px;
    --bottom-nav-bottom: 0px;
  }
  .content-shelf {
    height: 76px;
  }
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; padding: 0; background: #080704; color-scheme: dark; overflow-x: hidden !important; max-width: 100vw; }
body { overflow: hidden; background: #080704; color: var(--text); font-family: "ORA Inter", Arial, sans-serif; color-scheme: dark; }
button, input, textarea, select { font: inherit; }
input, textarea, select { font-size: 16px !important; touch-action: manipulation; }
button { border: 0; padding: 0; color: inherit; cursor: pointer; touch-action: manipulation; }
button:focus-visible, [role="slider"]:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }
.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; }
[hidden] { display: none !important; }

.app-shell { position: relative; width: 100%; height: 100%; height: 100dvh; min-height: 0; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; background: #080704; margin: 0; padding: 0; }
.is-browser .app-shell { overflow-y: hidden !important; }
.screen { --screen-scale: 1; position: absolute; z-index: 1; isolation: isolate; width: 430px; height: var(--screen-height, 764px); overflow: hidden; transform: scale(var(--screen-scale)); transform-origin: top left; border-radius: 28px; background: #080704; box-shadow: 0 26px 70px rgba(0,0,0,.7); }
.is-browser .screen,
body:not(.is-mobile-telegram) .screen {
  left: calc(max(0px, (100vw - 430px * var(--screen-scale, 1)) / 2));
  top: calc(max(0px, (100vh - 764px * var(--screen-scale, 1)) / 2));
}
.background--shell { z-index: 0; }
.is-telegram .status-bar { display: none !important; }
.is-telegram .screen {
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}
.is-telegram .screen > .background {
  display: none !important;
}

@media (max-width: 500px) {
  .status-bar { display: none !important; }
  .screen {
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }
  .screen > .background {
    display: none !important;
  }
}


.background, .background > img, .background__grade, .background__vignette { position: absolute; inset: 0; width: 100%; height: 100%; }
.background { z-index: -3; overflow: hidden; background: #0a0804; }
.background--shell { z-index: 0 !important; }
.background > img { object-fit: cover; object-position: center; opacity: .82; transition: opacity 300ms ease; }
.background__grade { background: linear-gradient(180deg, rgba(2,2,1,.38) 0%, rgba(9,7,3,.17) 27%, rgba(4,4,2,.36) 66%, rgba(3,3,1,.88) 100%), radial-gradient(circle at 52% 42%, transparent 0 26%, rgba(8,6,2,.24) 73%); mix-blend-mode: multiply; }
.background__vignette { background: linear-gradient(90deg, rgba(0,0,0,.45), transparent 28% 70%, rgba(0,0,0,.38)), linear-gradient(180deg, rgba(0,0,0,.3), transparent 22%); pointer-events: none; }

.status-bar { position: absolute; z-index: 4; top: 10px; left: 20px; right: 20px; display: flex; align-items: center; justify-content: space-between; color: #fff7df; font-size: 11px; font-weight: 700; text-shadow: 0 1px 4px #000; }
.status-bar__icons { display: flex; gap: 5px; align-items: center; }
.status-bar__icons > svg { width: 14px; height: 14px; stroke-width: 2.4; }
.signal { height: 13px; width: 16px; display: flex; align-items: end; gap: 1.5px; }
.signal i { width: 2px; border-radius: 2px; background: #fff7df; box-shadow: 0 0 4px rgba(255,231,170,.4); }
.signal i:nth-child(1) { height: 4px; }.signal i:nth-child(2) { height: 6px; }.signal i:nth-child(3) { height: 9px; }.signal i:nth-child(4) { height: 12px; }
.battery { display: grid; place-items: center; width: 20px; height: 10px; padding: 1px; border: 1px solid #fff7df; border-radius: 3px; position: relative; }.battery::after { content: ""; position: absolute; right: -3px; top: 2px; width: 2px; height: 4px; border-radius: 0 2px 2px 0; background: #fff7df; }.battery i { display: block; width: 13px; height: 5px; background: #fff7df; border-radius: 1px; }

.topbar { position: absolute; z-index: 5; top: var(--topbar-top, 94px); left: 18px; right: 18px; height: 50px; display: grid; grid-template-columns: 53px 1fr 53px; align-items: center; }
.image-control { width: 53px; height: 53px; border-radius: 50%; background: transparent; filter: drop-shadow(0 4px 8px rgba(0,0,0,.5)); transition: filter 140ms ease, transform 140ms ease; }
.image-control > img { display: block; width: 100%; height: 100%; object-fit: contain; }
.image-control:active, .quick-action:active, .side-control button:active, .nav-item:active, .command-orb:active, .context-card:active, .content-shelf:active { transform: scale(.98); filter: brightness(.88); }
.brand-logo { width: auto; height: 48px; max-height: 50px; object-fit: contain; justify-self: center; filter: drop-shadow(0 2px 10px rgba(255,191,62,.38)); }
.image-control--profile { justify-self: end; }

.welcome { position: absolute; z-index: 3; top: var(--welcome-top, 188px); left: 23px; right: 24px; display: flex; justify-content: space-between; align-items: flex-start; }
.welcome__copy h1 { margin: 0; color: #fff1c9; font: 400 22px/1.04 "ORA Serif", Georgia, serif; text-shadow: 0 2px 7px rgba(0,0,0,.8), 0 0 10px rgba(255,184,53,.16); }
.welcome__copy p { margin: 8px 0 0; color: #f3dca6; font-size: 9px; font-weight: 500; line-height: 1.33; text-shadow: 0 1px 4px #000; }
.weather { width: 102px; text-align: right; padding-top: 2px; color: var(--cream); text-shadow: 0 1px 5px #000; }
.weather__top { display: flex; justify-content: flex-end; align-items: center; gap: 4px; }.weather__top svg { width: 22px; height: 22px; color: #ffe29a; filter: drop-shadow(0 0 5px rgba(255,177,45,.56)); }.weather__top strong { font: 400 18px/1 "ORA Serif", Georgia, serif; }.weather > span { display: block; margin-top: 3px; font-size: 9px; }.weather > small { display: block; margin-top: 2px; color: rgba(255,239,205,.72); font-size: 6px; }

.context-card { position: absolute; z-index: 3; top: var(--context-card-top, 170px); left: 18px; width: 394px; height: 75px; overflow: hidden; border-radius: 18px; background: rgba(12,10,5,.48); box-shadow: 0 8px 24px rgba(0,0,0,.46); text-align: left; }
.context-card__art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; opacity: .92; }.context-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,8,3,.1), transparent 26% 66%, rgba(8,6,2,.2)); pointer-events: none; }
.context-card__content { position: absolute; z-index: 1; top: 15px; left: 83px; display: grid; gap: 2px; max-width: 202px; text-shadow: 0 1px 4px #000; }.context-card__overline { color: #f4c25a; font-size: 7px; letter-spacing: .09em; text-transform: uppercase; }.context-card__content strong { color: #fff0c6; font: 400 16px/1 "ORA Serif", Georgia, serif; }.context-card__content small { color: rgba(255,237,197,.75); font-size: 7px; line-height: 1.25; }

.quick-actions { position: absolute; z-index: 3; top: var(--quick-actions-top, 252px); left: 18px; width: 394px; display: flex; gap: 8px; }
.quick-action { position: relative; width: 193px; height: 57px; overflow: hidden; border-radius: 13px; background: transparent; transition: transform 120ms ease, filter 120ms ease; }.quick-action__art { display: block; width: 100%; height: 100%; object-fit: fill; transition: filter 180ms ease; }.quick-action--stories .quick-action__art { filter: brightness(.53) saturate(.72) sepia(.08); }.quick-action.is-selected .quick-action__art, .quick-action:hover .quick-action__art { filter: brightness(1.07) saturate(1.04) drop-shadow(0 0 7px rgba(255,197,79,.34)); }

.goal-selector { position: absolute; z-index: 11; top: var(--goal-selector-top, 316px); left: 103px; width: 224px; }.goal-selector__button { position: relative; width: 224px; height: 52px; overflow: hidden; border-radius: 22px; background: #30200b; text-align: center; box-shadow: 0 6px 18px rgba(0,0,0,.45); }.goal-selector__button > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; opacity: .92; }.goal-selector__button > span { position: relative; z-index: 1; display: grid; gap: 1px; padding: 12px 32px 7px; text-shadow: 0 1px 3px #2a1600; }.goal-selector__button small { color: #ffe7a5; font-size: 7px; line-height: 1; }.goal-selector__button strong { overflow: hidden; color: #fff5d1; font: 400 11px/1.1 "ORA Serif", Georgia, serif; white-space: nowrap; text-overflow: ellipsis; }.goal-selector__button > svg { position: absolute; z-index: 2; top: 18px; right: 17px; width: 15px; color: #fff0be; transition: transform 180ms ease; }.goal-selector.is-open .goal-selector__button > svg { transform: rotate(180deg); }
.goal-menu { position: absolute; top: 49px; left: 10px; right: 10px; display: grid; padding: 6px; border: 1px solid rgba(248,191,69,.66); border-radius: 14px; background: linear-gradient(160deg, rgba(48,36,15,.98), rgba(13,12,8,.99)); box-shadow: 0 15px 30px rgba(0,0,0,.6), 0 0 20px rgba(238,175,51,.13); opacity: 0; pointer-events: none; transform: translateY(-6px); transition: opacity 160ms ease, transform 160ms ease; }.goal-selector.is-open .goal-menu { opacity: 1; pointer-events: auto; transform: translateY(0); }.goal-menu button { padding: 8px; border-radius: 9px; background: transparent; color: #f7e4b2; font-size: 10px; text-align: left; }.goal-menu button:hover, .goal-menu button:focus-visible { background: rgba(239,182,58,.15); color: #fff6d4; }

.practice-zone { position: absolute; z-index: 2; top: var(--practice-zone-top, 370px); left: 0; width: 430px; height: 213px; }

.side-control { position: absolute; z-index: 4; width: 72px; height: 72px; }.side-control button { position: relative; display: block; width: 100%; height: 100%; border-radius: 50%; background: transparent; transition: transform 120ms ease, filter 120ms ease; }.side-control button > img:not(.side-control__portrait) { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 9px rgba(0,0,0,.58)); transition: filter 160ms ease; }.side-control.is-selected button > img:not(.side-control__portrait) { filter: brightness(1.16) drop-shadow(0 0 8px rgba(255,204,82,.84)) drop-shadow(0 0 17px rgba(230,150,35,.43)); }.body-control--lying { top: 8px; left: 18px; }.body-control--sitting { top: 70px; left: 9px; }.body-control--dynamic { top: 132px; left: 18px; }
.archetype-control { width: 69px; height: 79px; text-align: center; }.archetype-control--friend { top: 7px; right: 14px; }.archetype-control--coach { top: 68px; right: 4px; }.archetype-control--master { top: 129px; right: 14px; }.side-control__portrait { display: block; width: 62px; height: 62px; margin: 0 auto; border-radius: 50%; object-fit: cover; border: 2px solid rgba(174,111,27,.7); box-shadow: inset 0 0 0 2px rgba(0,0,0,.65), 0 5px 13px rgba(0,0,0,.65), 0 0 7px rgba(255,194,64,.17); }.archetype-control button::before { content: ""; position: absolute; z-index: 1; inset: -3px 0 13px; border: 2px solid #f5bd4c; border-radius: 50%; opacity: 0; pointer-events: none; transition: opacity 160ms ease; box-shadow: 0 0 12px rgba(255,207,79,.7), 0 0 26px rgba(219,140,34,.34); }.archetype-control button > img, .archetype-control button > span { position: relative; z-index: 2; }.archetype-control.is-selected button::before { opacity: 1; }.archetype-control span { display: block; margin-top: 1px; color: #f7e2aa; font-size: 7px; letter-spacing: .04em; text-shadow: 0 1px 4px #000; }.archetype-control.is-selected span { color: #fff2bd; text-shadow: 0 0 7px rgba(255,202,69,.65); }

.dial { position: absolute; z-index: 3; top: 22px; left: 119px; width: 192px; height: 192px; border-radius: 50%; touch-action: none; }
.dial__halo { position: absolute; inset: 4px; border-radius: 50%; background: radial-gradient(circle, rgba(239,182,69,.25), rgba(239,182,69,.08) 47%, transparent 72%); filter: blur(7px); }
.dial__rings, .dial__rings::before, .dial__rings::after { position: absolute; border: 1px solid rgba(252,203,92,.63); border-radius: 50%; }
.dial__rings { inset: 2px; box-shadow: 0 0 11px rgba(246,183,58,.5), inset 0 0 13px rgba(255,225,135,.18); }
.dial__rings::before { content: ""; inset: 7px; border-color: rgba(126,78,20,.95); }
.dial__rings::after { content: ""; inset: -5px; border-color: rgba(255,231,145,.28); }

.dial__portrait { position: absolute; z-index: 16 !important; top: 21px; left: 21px; width: 150px; height: 150px; overflow: hidden; border: 2px solid rgba(255,224,134,.87); border-radius: 50%; background: #171006; box-shadow: inset 0 0 0 3px rgba(84,51,9,.82), 0 0 11px rgba(255,193,61,.5), 0 8px 22px rgba(0,0,0,.62); pointer-events: auto; }
.dial__portrait > img { width: 100%; height: 100%; object-fit: cover; transition: opacity 180ms ease, filter 220ms ease; pointer-events: none; }
.dial__portrait-shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(8,5,2,.25) 60%, rgba(5,4,1,.9) 100%); pointer-events: none; }

/* Idle view: Entire circle is clickable to start meditation, with duration & ПУСК pill positioned in bottom half */
.dial__idle-view { position: absolute; inset: 0 !important; display: flex; align-items: flex-end !important; justify-content: center; background: transparent; border: 0; cursor: pointer; text-decoration: none; color: inherit; z-index: 10 !important; transition: transform 140ms ease, opacity 180ms ease; pointer-events: auto !important; touch-action: manipulation; user-select: none; -webkit-user-select: none; padding: 0 0 10px 0 !important; }
.dial__idle-view:hover .dial__idle-start-pill { transform: scale(1.06); border-color: rgba(255,235,160,.95); box-shadow: 0 0 16px rgba(255,210,90,.6), 0 4px 12px rgba(0,0,0,.7); }
.dial__idle-view:active .dial__idle-start-pill { transform: scale(.95); }
.dial__idle-center { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 3px; width: 100%; pointer-events: auto; }
.dial__idle-duration { display: block; color: #fff1bd; font: 400 16px/1.1 "ORA Serif", Georgia, serif; letter-spacing: .02em; text-shadow: 0 1px 4px #000, 0 0 10px rgba(246,186,58,.4); text-align: center; pointer-events: none; }
.dial__idle-start-pill { display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 3px 12px; border-radius: 12px; background: linear-gradient(145deg, rgba(48,32,12,.92), rgba(18,12,5,.96)); border: 1px solid rgba(255,220,135,.75); box-shadow: 0 0 10px rgba(246,186,58,.35), inset 0 1px 0 rgba(255,245,200,.3), 0 3px 8px rgba(0,0,0,.6); color: #fff1bd; font-size: 8px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease; pointer-events: none; }
.dial__idle-start-pill svg { display: block; flex-shrink: 0; filter: drop-shadow(0 0 3px rgba(255,205,80,.7)); }

/* Active Meditation Player View inside the central circle */
.dial__player-view { position: absolute; inset: 0; z-index: 6; opacity: 0; pointer-events: none; transition: opacity 200ms ease; }
.dial:not([data-meditation-state="idle"]) .dial__idle-view { opacity: 0; pointer-events: none; }
.dial:not([data-meditation-state="idle"]) .dial__player-view { opacity: 1; pointer-events: auto; }
.dial:not([data-meditation-state="idle"]) .dial__portrait > img { filter: brightness(.86) saturate(.9); }

.dial__player-bottom { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 3px; width: 100%; pointer-events: none; }
.dial__player-time-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.dial__player-countdown { display: block; color: #fff4ca; font: 400 18px/1 "ORA Serif", Georgia, serif; letter-spacing: .04em; text-shadow: 0 1px 5px #000, 0 0 14px rgba(248,189,67,.55); text-align: center; }
.dial__player-status-tag { display: block; margin-top: 1px; color: #ffe5a0; font-size: 8px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; text-shadow: 0 1px 3px #000; text-align: center; }

/* Prep loader runner inside dial during audio preparation & AI generation */
.dial__prep-loader {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
}
.dial__prep-label {
  display: block;
  color: #fff1bd;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-shadow: 0 1px 3px #000, 0 0 8px rgba(246, 186, 58, 0.45);
  animation: dialPrepTextPulse 1.8s ease-in-out infinite alternate;
}
.dial__prep-bar {
  position: relative;
  width: 68px;
  height: 3.5px;
  border-radius: 4px;
  background: rgba(38, 26, 8, 0.75);
  border: 1px solid rgba(249, 195, 76, 0.38);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.6), 0 0 6px rgba(246, 186, 58, 0.2);
}
.dial__prep-runner {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 28px;
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, #fff7d6 45%, #f5c45e 75%, transparent);
  box-shadow: 0 0 10px rgba(255, 230, 140, 0.95);
  animation: dialPrepRunnerSlide 1.5s ease-in-out infinite alternate;
}

@keyframes dialPrepRunnerSlide {
  0% { transform: translateX(-14px); }
  100% { transform: translateX(54px); }
}

@keyframes dialPrepTextPulse {
  0% { opacity: 0.78; }
  100% { opacity: 1; text-shadow: 0 1px 4px #000, 0 0 12px rgba(255, 220, 110, 0.8); }
}

/* Always keep live countdown timer and status tag visible in player mode */
.dial:not([data-meditation-state="idle"]) .dial__player-time-wrap {
  display: flex !important;
}

.dial__prep-loader {
  display: none !important;
}

#meditationAudio,
#meditationPreparationAudio {
  position: fixed;
  top: -9999px;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0.001;
  pointer-events: none;
}

.dial__waveform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 18px;
  min-height: 18px;
  pointer-events: none;
  margin-top: 2px;
}
.dial__waveform i {
  display: block;
  width: 2.5px;
  min-height: 3px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, #fff9d6, #e5aa3c);
  box-shadow: 0 0 5px rgba(245, 188, 61, 0.45);
}
.dial[data-meditation-state="paused"] .dial__waveform {
  opacity: .4;
}

/* Player controls bar placed OUTSIDE the avatar circle, directly below */
.dial-player-bar {
  position: absolute;
  z-index: 25;
  top: 220px;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
}

.screen:not([data-meditation-state="idle"]) .dial-player-bar {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

.player-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  touch-action: manipulation;
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 120ms ease, background 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 0;
}

.player-btn--stop {
  background: linear-gradient(145deg, rgba(46, 22, 12, .95), rgba(22, 10, 5, .98));
  border: 1.5px solid rgba(255, 175, 95, .7);
  box-shadow: 0 0 14px rgba(230, 110, 40, .28), inset 0 1px 0 rgba(255, 210, 160, .25), 0 5px 14px rgba(0,0,0,.65);
  color: #fce4b8;
}
.player-btn--stop:hover {
  transform: scale(1.08);
  border-color: rgba(255, 195, 120, .95);
  box-shadow: 0 0 18px rgba(240, 120, 50, .5);
}
.player-btn--stop:active {
  transform: scale(.93);
}

.player-btn--playpause {
  background: linear-gradient(145deg, rgba(58, 40, 14, .95), rgba(24, 16, 5, .98));
  border: 1.5px solid rgba(255, 225, 140, .85);
  box-shadow: 0 0 18px rgba(246, 186, 58, .4), inset 0 1px 0 rgba(255, 245, 200, .35), 0 5px 14px rgba(0,0,0,.65);
  color: #fff1be;
}
.player-btn--playpause:hover {
  transform: scale(1.08);
  box-shadow: 0 0 24px rgba(255, 210, 90, .7);
}
.player-btn--playpause:active {
  transform: scale(.93);
}

.player-icon-pause { display: none; gap: 3.5px; align-items: center; justify-content: center; }
.player-icon-pause i { display: block; width: 3.5px; height: 14px; border-radius: 2px; background: #fff0b4; box-shadow: 0 0 6px rgba(255,202,83,.55); }
.player-icon-play { display: none; width: 0; height: 0; margin-left: 3px; border-top: 7px solid transparent; border-bottom: 7px solid transparent; border-left: 12px solid #fff0b4; filter: drop-shadow(0 0 5px rgba(255,202,83,.55)); }
.player-icon-stop { display: block; width: 12px; height: 12px; border-radius: 2px; background: #ffb882; box-shadow: 0 0 7px rgba(255,160,80,.6); }

.screen[data-meditation-state="playing"] .dial-player-bar .player-icon-pause,
.dial[data-meditation-state="playing"] ~ .dial-player-bar .player-icon-pause,
.dial-player-bar[data-meditation-state="playing"] .player-icon-pause {
  display: flex;
}
.screen[data-meditation-state="paused"] .dial-player-bar .player-icon-play,
.dial[data-meditation-state="paused"] ~ .dial-player-bar .player-icon-play,
.dial-player-bar[data-meditation-state="paused"] .player-icon-play {
  display: block;
}
.screen[data-meditation-state="preparing"] .dial-player-bar .player-icon-pause,
.dial[data-meditation-state="preparing"] ~ .dial-player-bar .player-icon-pause,
.screen[data-meditation-state="loading"] .dial-player-bar .player-icon-pause,
.dial[data-meditation-state="loading"] ~ .dial-player-bar .player-icon-pause,
.dial-player-bar[data-meditation-state="preparing"] .player-icon-pause,
.dial-player-bar[data-meditation-state="loading"] .player-icon-pause {
  display: flex;
  opacity: .6;
}

/* Dial slider hit area: ONLY outer ring captures drag, hollow center passes through */
.dial__hit { position: absolute; z-index: 14; inset: -16px; border-radius: 50%; cursor: grab; touch-action: none; mask: radial-gradient(circle at center, transparent 72px, black 73px); -webkit-mask: radial-gradient(circle at center, transparent 72px, black 73px); }
.dial__hit[aria-disabled="true"] { pointer-events: none; cursor: default; }

.active-archetype { position: absolute; z-index: 5; top: 198px; left: 122px; width: 188px; text-align: center; text-shadow: 0 1px 4px #000; transition: opacity 160ms ease, transform 120ms ease; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.active-archetype:active { transform: scale(0.97); }
.active-archetype strong { display: block; color: #ffe7a5; font: 400 14px/1 "ORA Serif", Georgia, serif; letter-spacing: .08em; }
.active-archetype span { display: inline-flex; gap: 4px; align-items: center; margin-top: 4px; color: rgba(255,232,182,.72); font-size: 7px; }
.active-archetype i { width: 5px; height: 5px; border-radius: 50%; background: #55d288; box-shadow: 0 0 6px rgba(85,210,136,.72); }
.active-archetype.is-session-hidden { opacity: 0; pointer-events: none; }
.screen:not([data-meditation-state="idle"]) .active-archetype { opacity: 0 !important; pointer-events: none !important; }
.screen:not([data-meditation-state="idle"]) .goal-selector,
.screen[data-meditation-state="preparing"] .goal-selector,
.screen[data-meditation-state="loading"] .goal-selector,
.screen[data-meditation-state="starting"] .goal-selector,
.screen[data-meditation-state="playing"] .goal-selector,
.screen[data-meditation-state="paused"] .goal-selector,
.screen[data-meditation-state="finished"] .goal-selector,
.screen.has-modal-open .goal-selector,
.screen.is-fan-open .goal-selector,
.screen:has(.modal.is-open) .goal-selector,
.screen:has(.overlay.is-visible) .goal-selector,
.screen:has(.body-fan.is-open) .goal-selector,
.screen:has(.login-card:not([hidden])) .goal-selector,
.screen:has(.practice-mudra-card:not([hidden])) .goal-selector,
.body-fan.is-open ~ .goal-selector,
.goal-selector[hidden],
.goal-selector.is-hidden-by-modal {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

.meditation-dim { 
  position: absolute; 
  z-index: 20; 
  inset: 0; 
  background: rgba(1, 7, 10, .68); 
  backdrop-filter: blur(2.5px); 
  -webkit-backdrop-filter: blur(2.5px); 
  opacity: 0; 
  pointer-events: none; 
  transition: opacity 220ms ease; 
}
.screen:not([data-meditation-state="idle"]) .meditation-dim { 
  opacity: 1; 
  z-index: 20 !important;
  pointer-events: auto !important; 
}
.screen:not([data-meditation-state="idle"]) .practice-zone { 
  z-index: 25 !important; 
}
.screen:not([data-meditation-state="idle"]) .practice-zone > :not(#durationDial):not(.dial-player-bar):not(#practiceMudraCard) { 
  opacity: .22; 
  filter: brightness(.42) saturate(.45); 
  pointer-events: none !important;
  user-select: none !important;
}
.screen:not([data-meditation-state="idle"]) .practice-zone > #practiceMudraCard { 
  opacity: 1 !important; 
  filter: none !important; 
  pointer-events: auto !important;
}
.screen:not([data-meditation-state="idle"]) #durationDial,
.screen:not([data-meditation-state="idle"]) .dial-player-bar {
  position: relative;
  z-index: 30 !important;
  pointer-events: auto !important;
}
.screen:not([data-meditation-state="idle"]) #durationHit {
  pointer-events: none !important;
}

/* Strict layer isolation: when meditation is active, disable ALL lower layer elements */
.screen:not([data-meditation-state="idle"]) .topbar,
.screen:not([data-meditation-state="idle"]) .welcome,
.screen:not([data-meditation-state="idle"]) #journalCard,
.screen:not([data-meditation-state="idle"]) .quick-actions,
.screen:not([data-meditation-state="idle"]) .goal-selector,
.screen:not([data-meditation-state="idle"]) #calendarPrepBanner,
.screen:not([data-meditation-state="idle"]) .content-shelf,
.screen:not([data-meditation-state="idle"]) .bottom-nav,
.screen:not([data-meditation-state="idle"]) .side-control,
.screen:not([data-meditation-state="idle"]) .time-context-chips,
.screen:not([data-meditation-state="idle"]) .anketa-pill {
  pointer-events: none !important;
  user-select: none !important;
}
.body-fan {
  position: absolute;
  z-index: 105 !important;
  width: 0;
  height: 0;
  pointer-events: none;
}
.body-fan.is-open {
  pointer-events: auto;
}
.fan-option {
  position: absolute;
  left: -29px;
  top: -29px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 58px;
  height: 58px;
  padding: 3px 2px;
  box-sizing: border-box;
  border: 1.5px solid rgba(255, 215, 120, 0.95) !important;
  border-radius: 50% !important;
  background: radial-gradient(circle at 35% 25%, #754d17, #2b1d0a 65%, #120e06 100%) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.85), 0 0 18px rgba(246, 194, 83, 0.5), inset 0 1px 1px rgba(255, 243, 186, 0.6) !important;
  color: #fff4d1 !important;
  opacity: 0;
  transform: translate(0, 0) scale(0.55);
  transition: transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1), opacity 180ms ease, box-shadow 180ms ease, background 180ms ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}
.body-fan.is-open .fan-option {
  opacity: 1;
  transform: translate(calc(var(--x) * 1px), calc(var(--y) * 1px)) scale(1);
}
.fan-option:hover,
.fan-option:active {
  background: radial-gradient(circle at 35% 25%, #96631e, #3d280d 65%, #181207 100%) !important;
  border-color: #ffe699 !important;
  box-shadow: 0 0 24px rgba(255, 215, 120, 0.8), 0 8px 28px rgba(0, 0, 0, 0.9), inset 0 1px 2px #fff !important;
  transform: translate(calc(var(--x) * 1px), calc(var(--y) * 1px)) scale(1.06);
}
.fan-option svg {
  width: 20px !important;
  height: 20px !important;
  flex: 0 0 auto;
  stroke: #fed986 !important;
  stroke-width: 2.2 !important;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.9));
}
.fan-option span {
  display: block;
  max-width: 52px !important;
  font-family: inherit;
  font-size: 8.5px !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
  letter-spacing: -0.01em;
  text-align: center;
  color: #fff7db !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95), 0 0 2px rgba(0, 0, 0, 0.9) !important;
  word-break: normal;
  overflow-wrap: break-word;
}

/* Practice zone handling when fan is open */
.screen.is-fan-open .practice-zone {
  z-index: 101 !important;
}
.screen.is-fan-open .practice-zone > :not(.body-control) {
  opacity: 0.3 !important;
  filter: brightness(0.55) blur(1px) !important;
  transition: opacity 200ms ease, filter 200ms ease;
  pointer-events: none !important;
}
.screen.is-fan-open .body-control {
  z-index: 104 !important;
  transition: opacity 180ms ease, filter 180ms ease;
}
.screen.is-fan-open .body-control:not(.is-fan-active) {
  opacity: 0.45;
}
.screen.is-fan-open .body-control.is-fan-active {
  opacity: 1 !important;
}
.screen.is-fan-open .body-control.is-fan-active button > img:not(.side-control__portrait) {
  filter: brightness(1.28) drop-shadow(0 0 12px rgba(255, 204, 82, 0.95)) drop-shadow(0 0 22px rgba(230, 150, 35, 0.65)) !important;
}

.content-shelf { position: absolute; z-index: 3; top: var(--content-shelf-top, 591px); left: 18px; width: 394px; height: 79px; overflow: hidden; border: 1px solid rgba(246,189,74,.68); border-radius: 17px; background: #151007; box-shadow: inset 0 1px 0 rgba(255,237,166,.25), 0 9px 24px rgba(0,0,0,.55), 0 0 15px rgba(234,159,33,.15); text-align: left; }.content-shelf > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .78; }.content-shelf__shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6,5,2,.94) 0%, rgba(15,10,4,.77) 56%, rgba(8,5,1,.17)); }.content-shelf__copy { position: absolute; z-index: 1; top: 13px; left: 19px; right: 54px; display: grid; gap: 2px; text-shadow: 0 1px 4px #000; }.quote-mark { position: absolute; top: -10px; left: -5px; color: rgba(255,203,91,.7); font: 28px "ORA Serif", serif; }.content-shelf__copy strong { color: #fff1c5; font: 400 15px/1 "ORA Serif", Georgia, serif; }.content-shelf__copy small { color: rgba(255,235,192,.8); font-size: 7px; line-height: 1.25; }.content-shelf__arrow { position: absolute; z-index: 2; right: 16px; top: 24px; display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid rgba(255,218,126,.7); border-radius: 50%; background: rgba(35,24,7,.65); box-shadow: 0 0 10px rgba(248,186,55,.28); }.content-shelf__arrow svg { width: 16px; stroke: #ffebad; }

.bottom-nav { position: absolute; z-index: 7; bottom: var(--bottom-nav-bottom, -5px); left: 8px; width: 414px; height: 90px; }.bottom-nav__area { position: absolute; inset: 11px 0 0; width: 100%; height: 79px; object-fit: fill; filter: drop-shadow(0 -4px 13px rgba(0,0,0,.52)); pointer-events: none; }.nav-item { position: absolute; z-index: 2; top: 17px; width: 56px; height: 56px; border-radius: 50%; background: transparent; transition: transform 120ms ease, filter 120ms ease; cursor: pointer; -webkit-tap-highlight-color: transparent; }.nav-item img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 3px 5px rgba(0,0,0,.52)); pointer-events: none; }.nav-item--home { left: 14px; }.nav-item--sos { left: 87px; }.nav-item--calendar { right: 87px; }.nav-item--resource { right: 14px; }.command-orb { position: absolute; z-index: 4; top: -8px; left: 154px; width: 106px; height: 106px; overflow: hidden; border-radius: 50%; background: #050503; box-shadow: 0 8px 19px rgba(0,0,0,.72), 0 0 19px rgba(239,180,59,.5); transition: transform 120ms ease, filter 120ms ease; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }.command-orb picture, .command-orb img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }.command-orb::after { content: ""; position: absolute; inset: 4px; border: 1px solid rgba(255,234,161,.55); border-radius: 50%; box-shadow: 0 0 8px rgba(255,205,80,.65); pointer-events: none; }

.overlay { 
  position: absolute; 
  z-index: 100 !important; 
  inset: 0; 
  background: rgba(0,0,0,.62); 
  backdrop-filter: blur(2px); 
  opacity: 0; 
  pointer-events: none; 
  transition: opacity 220ms ease; 
}
.overlay.is-visible { 
  opacity: 1; 
  pointer-events: auto !important; 
}
.overlay.is-fan-overlay { 
  background: rgba(0,0,0,.39); 
}

/* Strict layer isolation: when ANY modal, drawer, menu or overlay is open, lower layer cannot receive clicks */
.screen.has-modal-open .topbar,
.screen.has-modal-open .welcome,
.screen.has-modal-open #journalCard,
.screen.has-modal-open .quick-actions,
.screen.has-modal-open .goal-selector,
.screen.has-modal-open .practice-zone,
.screen.has-modal-open .content-shelf,
.screen.has-modal-open .bottom-nav,
.screen.has-modal-open .calendar-prep-banner,
.screen.has-modal-open .time-context-chips,
.screen:has(.modal.is-open) .topbar,
.screen:has(.modal.is-open) .welcome,
.screen:has(.modal.is-open) #journalCard,
.screen:has(.modal.is-open) .quick-actions,
.screen:has(.modal.is-open) .goal-selector,
.screen:has(.modal.is-open) .practice-zone,
.screen:has(.modal.is-open) .content-shelf,
.screen:has(.modal.is-open) .bottom-nav,
.screen:has(.menu-panel.is-open) .topbar,
.screen:has(.menu-panel.is-open) .welcome,
.screen:has(.menu-panel.is-open) .practice-zone,
.screen:has(.menu-panel.is-open) .content-shelf,
.screen:has(.menu-panel.is-open) .bottom-nav,
.screen:has(.overlay.is-visible) .topbar,
.screen:has(.overlay.is-visible) .welcome,
.screen:has(.overlay.is-visible) #journalCard,
.screen:has(.overlay.is-visible) .quick-actions,
.screen:has(.overlay.is-visible) .goal-selector,
.screen:has(.overlay.is-visible) .practice-zone,
.screen:has(.overlay.is-visible) .content-shelf,
.screen:has(.overlay.is-visible) .bottom-nav {
  pointer-events: none !important;
  user-select: none !important;
}

.modal.is-open,
.menu-panel.is-open,
.login-card:not([hidden]),
#settingsRoute.is-open {
  pointer-events: auto !important;
}
.menu-panel { position: absolute; z-index: 105 !important; top: 0; bottom: 0; left: 0; width: 286px; padding: max(var(--topbar-top, 94px), 84px) 22px 25px; transform: translateX(-105%); border-right: 1px solid rgba(252,197,75,.74); background: linear-gradient(145deg, rgba(42,31,10,.98), rgba(12,11,7,.98) 70%); box-shadow: 15px 0 40px rgba(0,0,0,.55), inset -1px 0 0 rgba(255,230,151,.13); transition: transform 240ms ease; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; box-sizing: border-box; display: flex; flex-direction: column; }.menu-panel.is-open { transform: translateX(0); }.menu-panel__header { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }.wordmark { color: #ffe49c; font: 400 24px/1 "ORA Serif", Georgia, serif; letter-spacing: .18em; text-shadow: 0 0 10px rgba(255,192,52,.32); }.menu-panel__header button, .modal__close { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(249,195,76,.54); border-radius: 50%; background: rgba(62,43,11,.62); color: #ffe9ab; }.menu-panel > p { margin: 25px 0 18px; color: #f5dc9f; font: 400 20px "ORA Serif", Georgia, serif; flex-shrink: 0; }.menu-panel nav { display: grid; gap: 5px; flex-shrink: 0; }.menu-panel nav button, .menu-panel__logout { display: flex; gap: 12px; align-items: center; padding: 11px; border-radius: 11px; background: transparent; color: #e8d3a3; text-align: left; }.menu-panel nav button svg, .menu-panel__logout svg { width: 19px; color: #eab64f; }.menu-panel nav button.is-current, .menu-panel nav button:hover { background: linear-gradient(90deg, rgba(239,182,62,.2), transparent); color: #fff0bd; }.menu-panel__logout { position: relative; bottom: auto; left: auto; margin-top: 14px; margin-bottom: 24px; color: #f1c77a; cursor: pointer; flex-shrink: 0; }.menu-anketa-btn { display: flex; align-items: center; gap: 12px; width: 100%; box-sizing: border-box; padding: 11px 12px; margin: 10px 0 6px; border: 1px solid rgba(249, 195, 76, 0.45); border-radius: 12px; background: linear-gradient(90deg, rgba(239, 182, 62, 0.16), rgba(42, 31, 10, 0.45)); color: #fff0bd; font-family: inherit; font-size: 14px; font-weight: 500; text-align: left; cursor: pointer; transition: all 0.2s ease; flex-shrink: 0; }.menu-anketa-btn:hover { background: linear-gradient(90deg, rgba(239, 182, 62, 0.28), rgba(62, 43, 11, 0.65)); border-color: rgba(249, 195, 76, 0.75); box-shadow: 0 0 12px rgba(245, 158, 11, 0.22); color: #ffffff; }.menu-anketa-btn svg { width: 19px; height: 19px; color: #f59e0b; flex: 0 0 auto; }

.modal { position: absolute; z-index: 110 !important; left: 50%; right: auto; bottom: 18px; width: calc(100% - 32px); max-width: 398px; max-height: calc(100% - var(--topbar-top, 94px) - 20px); margin: 0; box-sizing: border-box; overflow-x: hidden; overflow-y: auto; display: grid; gap: 13px; padding: 22px 20px; border: 1px solid rgba(251,199,81,.75); border-radius: 23px; background: linear-gradient(145deg, rgba(55,39,12,.98), rgba(13,11,6,.99)); box-shadow: 0 18px 45px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,235,166,.22); opacity: 0; pointer-events: none; transform: translate(-50%, 24px) scale(.97); transition: opacity 200ms ease, transform 220ms ease; }.modal.is-open { opacity: 1; pointer-events: auto; transform: translate(-50%, 0) scale(1); }.modal__close { position: absolute; top: 14px; right: 14px; }.modal__eyebrow { color: #f5c15a; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }.own-goal-modal h2 { max-width: 260px; margin: 0; color: #fff0bf; font: 400 24px/1.12 "ORA Serif", Georgia, serif; }.own-goal-modal textarea { min-height: 92px; resize: none; padding: 12px; border: 1px solid rgba(250,199,86,.45); border-radius: 13px; outline: none; background: rgba(4,4,2,.48); color: #fff0c2; font-size: 16px; }.own-goal-modal textarea:focus { border-color: #ffdc7e; box-shadow: 0 0 0 2px rgba(247,191,67,.22); }.modal__primary { padding: 13px; border-radius: 13px; background: linear-gradient(135deg, #fff0af, #edb748 55%, #a66b1f); color: #171006; font-weight: 700; box-shadow: inset 0 1px 0 rgba(255,255,225,.66), 0 0 16px rgba(245,180,51,.28); }
.chat-modal {
  height: 84%;
  min-height: min(480px, calc(100% - var(--topbar-top, 94px) - 20px));
  max-height: calc(100% - var(--topbar-top, 94px) - 20px) !important;
  display: flex;
  flex-direction: column;
  padding: 16px 18px 20px;
  box-sizing: border-box;
  overflow: hidden !important;
}

.chat-modal .modal__close,
.chat-close-btn {
  position: static !important;
  top: auto !important;
  right: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 34px !important;
  height: 34px !important;
  border: 1px solid rgba(249,195,76,.54) !important;
  border-radius: 50% !important;
  background: rgba(62,43,11,.62) !important;
  color: #ffe9ab !important;
  box-shadow: none !important;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 120ms ease;
  padding: 0 !important;
}
.chat-modal .modal__close:active,
.chat-close-btn:active {
  transform: scale(0.94);
}
.chat-close-btn svg {
  width: 18px !important;
  height: 18px !important;
  stroke: #ffe9ab !important;
  stroke-width: 2.2 !important;
  display: block !important;
}
.chat-close-btn::before,
.chat-close-btn::after {
  display: none !important;
  content: none !important;
}

.chat-modal__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(246, 191, 75, 0.2);
  flex-shrink: 0;
}
.chat-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.call-badge-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 12px;
  background: rgba(85, 210, 136, 0.16);
  border: 1px solid rgba(85, 210, 136, 0.4);
  color: #55d288;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.call-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #55d288;
  box-shadow: 0 0 6px #55d288;
  animation: callDotPulse 1.4s infinite alternate;
}
@keyframes callDotPulse { from { opacity: 0.35; } to { opacity: 1; } }

.call-live-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 235, 185, 0.25);
  color: rgba(255, 235, 185, 0.75);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .03em;
  cursor: pointer;
  transition: all 180ms ease;
  -webkit-tap-highlight-color: transparent;
}
.call-live-toggle:active {
  transform: scale(0.95);
}
.call-live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 235, 185, 0.4);
  transition: all 180ms ease;
}
.call-live-toggle.is-active {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.65);
  color: #fca5a5;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.25);
}
.call-live-toggle.is-active .call-live-dot {
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
  animation: livePulseDot 1s infinite alternate;
}
.call-live-toggle.is-speaking {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.65);
  color: #fde68a;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}
.call-live-toggle.is-speaking .call-live-dot {
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
}
@keyframes livePulseDot {
  from { opacity: 0.4; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1.15); }
}

.chat-header-info strong {
  color: #ffedb8;
  font: 400 18px "ORA Serif", Georgia, serif;
}
.call-timer {
  color: #d8bf85;
  font-size: 11px;
  font-family: monospace, sans-serif;
  opacity: 0.85;
}

/* CALL VIEW STAGE */
.chat-call-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 4px;
  min-height: 0;
}
.call-avatar-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 140px;
  margin-top: 6px;
}
.call-portrait {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 3px solid #edb94c;
  object-fit: cover;
  box-shadow: 0 0 25px rgba(237, 185, 76, 0.4), 0 10px 30px rgba(0,0,0,.6);
  z-index: 2;
  transition: transform 220ms ease, box-shadow 220ms ease;
}
.call-pulse-ring, .call-pulse-ring-outer {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(249, 195, 76, 0.35);
  pointer-events: none;
}
.call-pulse-ring-outer {
  inset: -14px;
  border-color: rgba(249, 195, 76, 0.18);
}
.chat-modal.is-speaking .call-portrait {
  transform: scale(1.05);
  box-shadow: 0 0 35px rgba(255, 215, 95, 0.7), 0 12px 35px rgba(0,0,0,.7);
}
.chat-modal.is-speaking .call-pulse-ring {
  animation: callAuraPulse 1.2s ease-in-out infinite alternate;
}
.chat-modal.is-speaking .call-pulse-ring-outer {
  animation: callAuraPulseOuter 1.6s ease-in-out infinite alternate;
}
.chat-modal.is-recording .call-portrait {
  border-color: #55d288;
  box-shadow: 0 0 30px rgba(85, 210, 136, 0.55);
}
.chat-modal.is-recording .call-pulse-ring {
  border-color: rgba(85, 210, 136, 0.4);
  animation: callAuraPulse 0.9s ease-in-out infinite alternate;
}

@keyframes callAuraPulse {
  0% { transform: scale(0.96); opacity: 0.3; }
  100% { transform: scale(1.14); opacity: 0.85; border-color: rgba(255, 225, 120, 0.65); }
}
@keyframes callAuraPulseOuter {
  0% { transform: scale(0.98); opacity: 0.15; }
  100% { transform: scale(1.2); opacity: 0.45; }
}

.call-state-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}
.call-state-label {
  color: #ffe399;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .02em;
}

.call-subtitle-box {
  width: 100%;
  max-width: 320px;
  min-height: 52px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(20, 15, 6, 0.55);
  border: 1px solid rgba(247, 196, 78, 0.22);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.call-subtitle-box p {
  margin: 0;
  color: #fff2cb;
  font: 400 13px/1.4 "ORA Serif", Georgia, serif;
  font-style: italic;
  max-height: 72px;
  overflow-y: auto;
}

.call-actions-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  width: 100%;
  margin-top: 12px;
}
.call-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: #ffe8ab;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.call-btn span {
  font-size: 10px;
  letter-spacing: .04em;
  color: rgba(255, 235, 185, 0.75);
}
.call-btn--end svg {
  width: 24px;
  height: 24px;
  padding: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d33824, #9a1909);
  color: #fff;
  box-shadow: 0 4px 16px rgba(211, 56, 36, 0.55);
  transition: transform 120ms ease;
}
.call-btn--end:active svg { transform: scale(0.92); }

.call-btn--mic svg {
  width: 28px;
  height: 28px;
  padding: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffe89a, #e4a83a);
  color: #171006;
  box-shadow: 0 4px 20px rgba(245, 188, 61, 0.45);
  transition: transform 120ms ease, background 180ms ease, box-shadow 180ms ease;
}
.call-btn--mic:active svg { transform: scale(0.92); }
.chat-modal.is-recording .call-btn--mic svg {
  background: linear-gradient(135deg, #4bd184, #229955);
  color: #fff;
  box-shadow: 0 0 25px rgba(75, 209, 132, 0.7);
  animation: pulseRecording 1.1s infinite alternate;
}

.call-btn--switch svg {
  width: 22px;
  height: 22px;
  padding: 13px;
  border-radius: 50%;
  background: rgba(62, 43, 11, 0.7);
  border: 1px solid rgba(249, 195, 76, 0.45);
  color: #fedb88;
  transition: transform 120ms ease;
}
.call-btn--switch:active svg { transform: scale(0.92); }

/* MESSAGE VIEW */
.chat-message-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  padding-top: 6px;
}
.chat-call-view[hidden],
.chat-message-view[hidden],
.chat-call-view.is-hidden,
.chat-message-view.is-hidden,
.chat-message-view .call-actions-bar,
.chat-call-view[hidden] .call-actions-bar,
.is-hidden {
  display: none !important;
}

.chat-call-trigger-bar {
  display: flex;
  justify-content: center;
  margin-bottom: 2px;
  flex-shrink: 0;
}
.chat-call-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 14px;
  border: 1px solid rgba(249, 195, 76, 0.4);
  background: rgba(62, 43, 11, 0.55);
  color: #fedb88;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 120ms ease;
}
.chat-call-trigger-btn:active {
  transform: scale(0.96);
  background: rgba(85, 58, 14, 0.8);
}
.chat-call-trigger-btn svg {
  width: 13px;
  height: 13px;
  color: #4bd184;
}

.chat-back-to-call {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(75, 209, 132, 0.15);
  border: 1px solid rgba(75, 209, 132, 0.4);
  color: #6ee6a0;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
  flex-shrink: 0;
}
.chat-back-to-call svg { width: 16px; height: 16px; }

.waveform {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  min-height: 28px;
  gap: 4px;
  opacity: .75;
  margin: 2px 0 6px;
  transition: opacity 220ms ease;
}
.waveform i {
  display: block;
  width: 3px;
  min-height: 4px;
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(180deg, #fff9d6, #e5aa3c);
  box-shadow: 0 0 5px rgba(245, 188, 61, 0.4);
  transition: background 180ms ease, box-shadow 180ms ease;
}
.chat-modal.is-open .waveform i {
  animation: chatWaveStandby 1.9s ease-in-out infinite alternate;
}
.chat-modal.is-open .waveform i:nth-child(1),
.chat-modal.is-open .waveform i:nth-child(9) { animation-delay: 0s; }
.chat-modal.is-open .waveform i:nth-child(2),
.chat-modal.is-open .waveform i:nth-child(8) { animation-delay: .22s; }
.chat-modal.is-open .waveform i:nth-child(3),
.chat-modal.is-open .waveform i:nth-child(7) { animation-delay: .44s; }
.chat-modal.is-open .waveform i:nth-child(4),
.chat-modal.is-open .waveform i:nth-child(6) { animation-delay: .66s; }
.chat-modal.is-open .waveform i:nth-child(5) { animation-delay: .88s; }

.chat-modal.is-recording .waveform { opacity: 1; }
.chat-modal.is-recording .waveform i {
  animation: chatWaveRecording 0.62s ease-in-out infinite alternate !important;
  background: linear-gradient(180deg, #ffffff, #f7c04d);
  box-shadow: 0 0 8px rgba(255, 215, 95, 0.75);
}
.chat-modal.is-recording .waveform i:nth-child(1) { animation-delay: 0.05s !important; animation-duration: 0.52s !important; }
.chat-modal.is-recording .waveform i:nth-child(2) { animation-delay: 0.24s !important; animation-duration: 0.68s !important; }
.chat-modal.is-recording .waveform i:nth-child(3) { animation-delay: 0.12s !important; animation-duration: 0.46s !important; }
.chat-modal.is-recording .waveform i:nth-child(4) { animation-delay: 0.36s !important; animation-duration: 0.59s !important; }
.chat-modal.is-recording .waveform i:nth-child(5) { animation-delay: 0.00s !important; animation-duration: 0.44s !important; }
.chat-modal.is-recording .waveform i:nth-child(6) { animation-delay: 0.28s !important; animation-duration: 0.56s !important; }
.chat-modal.is-recording .waveform i:nth-child(7) { animation-delay: 0.16s !important; animation-duration: 0.64s !important; }
.chat-modal.is-recording .waveform i:nth-child(8) { animation-delay: 0.38s !important; animation-duration: 0.50s !important; }
.chat-modal.is-recording .waveform i:nth-child(9) { animation-delay: 0.20s !important; animation-duration: 0.58s !important; }

.chat-modal.is-speaking .waveform { opacity: 1; }
.chat-modal.is-speaking .waveform i {
  animation: chatWaveRecording 0.55s ease-in-out infinite alternate !important;
  background: linear-gradient(180deg, #ffffff, #ffe594) !important;
  box-shadow: 0 0 10px rgba(255, 230, 130, 0.85) !important;
}

@keyframes chatWaveStandby {
  0% { height: 4px; opacity: .45; }
  50% { height: 11px; opacity: .9; }
  100% { height: 5px; opacity: .55; }
}

@keyframes chatWaveRecording {
  0% { height: 4px; }
  35% { height: 14px; }
  75% { height: 26px; }
  100% { height: 18px; }
}

.chat-modal__messages {
  flex: 1;
  min-height: 140px;
  max-height: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px;
  border: 1px solid rgba(246,191,75,.24);
  border-radius: 13px;
  background: rgba(2,2,1,.38);
}
.chat-modal__messages p { max-width: 86%; margin: 0 0 9px; padding: 8px 10px; border-radius: 11px 11px 11px 2px; background: rgba(120,83,22,.28); color: #f2ddb0; font-size: 11px; line-height: 1.35; }
.chat-modal__messages p.is-user { margin-left: auto; border-radius: 11px 11px 2px 11px; background: rgba(229,170,55,.28); }
.chat-modal__input { display: flex; gap: 8px; flex-shrink: 0; }
.chat-modal__input input { min-width: 0; flex: 1; padding: 11px; border: 1px solid rgba(247,196,78,.44); border-radius: 11px; outline: none; background: rgba(1,1,1,.38); color: #fff0be; }
.chat-modal__input button { display: grid; place-items: center; width: 43px; border-radius: 11px; background: linear-gradient(135deg, #ffe89a, #e4a83a); color: #160e04; }
.chat-modal__input button svg { width: 19px; }
.chat-voice-btn { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 11px; border: 1px solid rgba(249, 195, 76, 0.45); background: rgba(62, 43, 11, 0.65) !important; color: #fedb88 !important; cursor: pointer; transition: all 140ms ease; }
.chat-voice-btn:hover { background: rgba(80, 55, 14, 0.85) !important; color: #fff0bd !important; }
.chat-modal.is-recording .chat-voice-btn { background: linear-gradient(135deg, #d44a2c, #b32a10) !important; border-color: #ff8b72 !important; color: #ffffff !important; box-shadow: 0 0 12px rgba(220, 60, 40, 0.65); animation: pulseRecording 1.2s ease-in-out infinite alternate; }
@keyframes pulseRecording { from { transform: scale(1); } to { transform: scale(1.08); } }

.toast { position: absolute; z-index: 30; bottom: 98px; left: 50%; max-width: 310px; padding: 9px 13px; border: 1px solid rgba(252,203,93,.65); border-radius: 20px; background: rgba(22,17,7,.92); box-shadow: 0 8px 21px rgba(0,0,0,.6); color: #fff0bf; font-size: 10px; opacity: 0; pointer-events: none; transform: translate(-50%, 10px); transition: opacity 180ms ease, transform 180ms ease; }.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.settings-page { position: absolute; z-index: 26; inset: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding: var(--topbar-top, 94px) 18px 32px; background: radial-gradient(circle at 78% 5%, rgba(132,88,22,.24), transparent 35%), radial-gradient(circle at 9% 74%, rgba(104,67,15,.17), transparent 38%), linear-gradient(165deg, #171106 0%, #080704 56%, #050503 100%); color-scheme: dark; opacity: 0; pointer-events: none; transform: translateX(22px); transition: opacity 190ms ease, transform 230ms ease; }
.settings-page::before { content: ""; position: fixed; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(255,221,137,.045), transparent 22% 77%, rgba(0,0,0,.4)); }
.settings-page.is-open { opacity: 1; pointer-events: auto; transform: translateX(0); }
.settings-page__header { position: relative; z-index: 1; display: grid; grid-template-columns: 96px 1fr 96px; align-items: center; min-height: 52px; margin-bottom: 12px; }
.settings-page__header > div { grid-column: 2; text-align: center; }
.settings-page__eyebrow { display: block; color: #dca843; font-size: 8px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }
.settings-page__header h1 { margin: 3px 0 0; color: #fff0bc; font: 400 25px/1 "ORA Serif", Georgia, serif; letter-spacing: .015em; text-shadow: 0 0 14px rgba(239,179,51,.23); }
.settings-page__back { grid-column: 1; grid-row: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px; width: 88px; min-height: max(45px, calc(45px * var(--inverse-screen-scale, 1))); border: 1px solid rgba(246,194,83,.48); border-radius: 22px; background: linear-gradient(145deg, rgba(70,48,13,.72), rgba(19,15,7,.84)); box-shadow: inset 0 1px 0 rgba(255,236,174,.13), 0 5px 14px rgba(0,0,0,.32); color: #ffecb2; font-size: 10px; font-weight: 700; }
.settings-page__back svg { width: 16px; height: 16px; }
.settings-page__back:active { transform: scale(.97); filter: brightness(.9); }
.settings-page__content { position: relative; z-index: 1; }
.settings-page__intro { max-width: 330px; margin: 14px auto 15px; color: rgba(246,225,177,.76); font-size: 11px; line-height: 1.45; text-align: center; }
.settings-list { display: grid; gap: 10px; }
.archetype-setting { display: grid; gap: 10px; padding: 12px; border: 1px solid rgba(237,181,66,.38); border-radius: 19px; background: linear-gradient(145deg, rgba(47,34,11,.78), rgba(12,10,6,.88)); box-shadow: inset 0 1px 0 rgba(255,239,184,.09), 0 9px 22px rgba(0,0,0,.3); }
.archetype-setting.is-active-archetype { border-color: rgba(255,207,91,.75); box-shadow: inset 0 1px 0 rgba(255,242,191,.15), 0 0 16px rgba(226,156,35,.13), 0 9px 22px rgba(0,0,0,.35); }
.archetype-setting__identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.archetype-setting__identity > img { width: 66px; height: 66px; flex: 0 0 auto; border: 2px solid rgba(238,184,73,.72); border-radius: 50%; object-fit: cover; box-shadow: inset 0 0 0 2px rgba(0,0,0,.48), 0 0 12px rgba(242,181,55,.2), 0 6px 14px rgba(0,0,0,.4); transition: opacity 130ms ease; }
.archetype-setting__identity > span { display: grid; min-width: 0; }
.archetype-setting__identity small { color: rgba(224,193,125,.69); font-size: 8px; letter-spacing: .1em; text-transform: uppercase; }
.archetype-setting__identity strong { margin-top: 2px; color: #fff0bb; font: 400 20px/1 "ORA Serif", Georgia, serif; }
.archetype-setting__identity em { width: fit-content; margin-top: 6px; padding: 3px 7px; border: 1px solid rgba(255,205,89,.35); border-radius: 10px; background: rgba(232,168,43,.1); color: #f5ce78; font-size: 7px; font-style: normal; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.gender-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; min-width: 0; margin: 0; padding: 0; border: 0; }
.gender-picker label { position: relative; min-width: 0; cursor: pointer; }
.gender-picker input { position: absolute; width: 1px; height: 1px; margin: -1px; opacity: .01; }
.gender-picker label > span { display: grid; place-items: center; min-height: max(45px, calc(45px * var(--inverse-screen-scale, 1))); padding: 8px 10px; border: 1px solid rgba(237,190,91,.28); border-radius: 13px; background: rgba(4,4,2,.45); color: rgba(246,226,183,.72); font-size: 10px; font-weight: 700; transition: border-color 150ms ease, background 150ms ease, color 150ms ease, box-shadow 150ms ease; }
.gender-picker input:checked + span { border-color: rgba(255,218,124,.9); background: linear-gradient(135deg, #ffe9a2, #e8ae3f 58%, #a86d20); box-shadow: inset 0 1px 0 rgba(255,255,224,.62), 0 0 15px rgba(238,176,49,.28); color: #171005; }
.gender-picker input:focus-visible + span { outline: 2px solid var(--gold-bright); outline-offset: 3px; }
.settings-save-status { min-height: 34px; margin: 12px 6px 0; color: rgba(232,207,153,.68); font-size: 9px; line-height: 1.35; text-align: center; }
.settings-save-status.is-error { color: #ffd190; }
.screen.is-settings-open .toast { bottom: 20px; }

@keyframes wave { to { height: 21px; box-shadow: 0 0 7px #f7c253; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }.dial__waveform i:nth-child(1), .dial__waveform i:nth-child(9) { height: 6px; }.dial__waveform i:nth-child(2), .dial__waveform i:nth-child(8) { height: 10px; }.dial__waveform i:nth-child(3), .dial__waveform i:nth-child(7) { height: 15px; }.dial__waveform i:nth-child(4), .dial__waveform i:nth-child(6) { height: 19px; }.dial__waveform i:nth-child(5) { height: 22px; } }

/* ORA MVP Features: Calendar, Gratitude, SOS, Stories, Resource */
.settings-calendar-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; margin-top: 14px; padding: 14px 16px; border: 1px solid rgba(247,196,78,.45); border-radius: 16px; background: rgba(35,26,9,.75); color: #ffeab0; text-align: left; cursor: pointer; }
.settings-calendar-link strong { display: block; font-size: 14px; color: #fff0bb; }
.settings-calendar-link small { display: block; font-size: 11px; color: rgba(235,210,157,.65); }
.settings-calendar-link svg { width: 20px; height: 20px; color: #ebb74e; flex-shrink: 0; }

/* ORA Calendar: Luxury Dark Obsidian & Amber Styling */
.calendar-page {
  position: absolute;
  z-index: 26;
  inset: 0;
  display: none;
  flex-direction: column;
  background: radial-gradient(circle at 50% 0%, #201708 0%, #0d0a04 42%, #050402 100%);
  color: #f7e8c3;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: var(--topbar-top, 94px) 16px 96px;
}
.calendar-page::-webkit-scrollbar { width: 4px; }
.calendar-page::-webkit-scrollbar-track { background: transparent; }
.calendar-page::-webkit-scrollbar-thumb { background: rgba(245, 196, 94, 0.25); border-radius: 4px; }
.calendar-page::-webkit-scrollbar-thumb:hover { background: rgba(245, 196, 94, 0.5); }
.calendar-page.is-open { display: flex; }
.screen.is-calendar-open .bottom-nav { z-index: 27; }

/* Header */
.calendar-page__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 4px;
}
.calendar-page__header > div {
  flex: 1;
  min-width: 0;
  text-align: center;
}
.calendar-page__header span {
  display: block;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold, #f5c45e);
  text-shadow: 0 0 10px rgba(245, 196, 94, 0.3);
}
.calendar-page__header h1 {
  margin: 2px 0 0;
  font: 400 20px/1.15 "ORA Serif", Georgia, serif;
  color: #fff1c9;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.75);
  text-transform: capitalize;
  letter-spacing: 0.01em;
}
.calendar-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 20px;
  border: 1px solid rgba(249, 195, 76, 0.35);
  background: rgba(30, 22, 8, 0.75);
  color: #ffeab0;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 140ms ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
.calendar-back svg { width: 14px; height: 14px; stroke-width: 2.2; flex-shrink: 0; }
.calendar-back:hover, .calendar-back:active {
  background: rgba(52, 38, 14, 0.9);
  border-color: #ffd87c;
  color: #fff6d9;
  transform: scale(0.97);
}
.calendar-settings-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(249, 195, 76, 0.35);
  background: rgba(30, 22, 8, 0.75);
  color: #ffeab0;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 140ms ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
.calendar-settings-button svg { width: 16px; height: 16px; stroke-width: 2.2; }
.calendar-settings-button:hover, .calendar-settings-button:active {
  background: rgba(52, 38, 14, 0.9);
  border-color: #ffd87c;
  color: #fff6d9;
  transform: scale(0.97);
}

/* Toolbar & Navigation */
.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.calendar-toolbar [data-calendar-prev],
.calendar-toolbar [data-calendar-next] {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(249, 195, 76, 0.28);
  background: rgba(22, 17, 7, 0.8);
  color: #f5ce78;
  cursor: pointer;
  transition: all 140ms ease;
}
.calendar-toolbar [data-calendar-prev] svg,
.calendar-toolbar [data-calendar-next] svg { width: 16px; height: 16px; stroke-width: 2.4; }
.calendar-toolbar [data-calendar-prev]:hover,
.calendar-toolbar [data-calendar-next]:hover,
.calendar-toolbar [data-calendar-prev]:active,
.calendar-toolbar [data-calendar-next]:active {
  background: rgba(45, 34, 13, 0.9);
  border-color: #f5c45e;
  color: #fff1c9;
  transform: scale(0.95);
}
.calendar-today {
  padding: 6px 12px;
  border-radius: 11px;
  border: 1px solid rgba(249, 195, 76, 0.35);
  background: rgba(30, 22, 9, 0.8);
  color: #ffe59c;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 140ms ease;
}
.calendar-today:hover, .calendar-today:active {
  background: linear-gradient(135deg, #f5c45e, #c68a28);
  color: #171005;
  border-color: #ffe9a2;
}
.calendar-views {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 12px;
  background: rgba(14, 11, 5, 0.85);
  border: 1px solid rgba(249, 195, 76, 0.22);
  gap: 2px;
}
.calendar-views button {
  padding: 5px 9px;
  border-radius: 9px;
  border: 0;
  background: transparent;
  color: #cbb88d;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: all 150ms ease;
}
.calendar-views button.is-active {
  background: linear-gradient(135deg, #ffe9a2, #e8ae3f 58%, #a86d20);
  color: #171005;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(232, 174, 63, 0.3);
}

/* Search & Filters */
.calendar-search {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
#calendarSearch {
  flex: 1;
  min-width: 0;
  padding: 9px 14px;
  border-radius: 14px;
  border: 1px solid rgba(249, 195, 76, 0.28);
  background: rgba(14, 11, 5, 0.75);
  color: #fff1c9;
  font-size: 12px;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
  backdrop-filter: blur(6px);
}
#calendarSearch::placeholder { color: rgba(203, 184, 141, 0.5); }
#calendarSearch:focus {
  border-color: #ffd87c;
  box-shadow: 0 0 0 2px rgba(245, 196, 94, 0.22);
}
.calendar-search [data-calendar-filter] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 13px;
  border-radius: 14px;
  border: 1px solid rgba(249, 195, 76, 0.28);
  background: rgba(24, 18, 8, 0.8);
  color: #f5ce78;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 140ms ease;
}
.calendar-search [data-calendar-filter] svg { width: 14px; height: 14px; stroke-width: 2.2; }
.calendar-search [data-calendar-filter]:hover,
.calendar-search [data-calendar-filter]:active {
  background: rgba(45, 33, 12, 0.9);
  border-color: #ffd87c;
  color: #fff1c9;
}
.calendar-filter-panel {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(249, 195, 76, 0.32);
  background: rgba(22, 17, 7, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 9px;
  animation: fadeIn 150ms ease;
}
.calendar-filter-panel label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #ffeab0;
  cursor: pointer;
}
.calendar-filter-panel input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--gold, #f5c45e);
  cursor: pointer;
}

/* Calendar Canvas & FullCalendar Integration */
.calendar-canvas {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(14, 11, 5, 0.65);
  border: 1px solid rgba(249, 195, 76, 0.26);
  padding: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 235, 160, 0.08);
  backdrop-filter: blur(10px);
  margin-bottom: 14px;
  transition: opacity 200ms ease;
}
.calendar-canvas.is-loading { opacity: 0.6; pointer-events: none; }

.calendar-fullcalendar {
  --fc-page-bg-color: transparent;
  --fc-neutral-bg-color: rgba(255, 255, 255, 0.03);
  --fc-neutral-text-color: #cbb88d;
  --fc-border-color: rgba(249, 195, 76, 0.16);
  --fc-button-text-color: #ffeab0;
  --fc-button-bg-color: rgba(32, 23, 9, 0.8);
  --fc-button-border-color: rgba(249, 195, 76, 0.35);
  --fc-button-hover-bg-color: rgba(50, 36, 12, 0.9);
  --fc-button-hover-border-color: #ffd87c;
  --fc-button-active-bg-color: #eab64f;
  --fc-button-active-border-color: #fff0bb;
  --fc-event-bg-color: rgba(245, 196, 94, 0.2);
  --fc-event-border-color: rgba(249, 195, 76, 0.5);
  --fc-event-text-color: #fff1c9;
  --fc-highlight-color: rgba(245, 196, 94, 0.12);
  --fc-today-bg-color: rgba(245, 196, 94, 0.06);
  --fc-now-indicator-color: #f5c45e;
  font-family: inherit;
}
.fc .fc-scrollgrid {
  border-color: rgba(249, 195, 76, 0.18) !important;
  border-radius: 12px;
  overflow: hidden;
}
.fc-theme-standard th, .fc-theme-standard td {
  border-color: rgba(249, 195, 76, 0.13) !important;
}
.fc .fc-col-header-cell {
  padding: 6px 0;
  background: rgba(28, 21, 9, 0.5);
  border-color: rgba(249, 195, 76, 0.15) !important;
}
.fc .fc-col-header-cell-cushion {
  color: #e5cc96;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
}
.fc .fc-daygrid-day-frame {
  padding: 3px 4px;
  min-height: 52px;
  transition: background 120ms ease;
  cursor: pointer;
}
.fc .fc-daygrid-day:hover .fc-daygrid-day-frame {
  background: rgba(249, 195, 76, 0.08);
}
.fc .fc-daygrid-day.is-selected {
  background: rgba(249, 195, 76, 0.16) !important;
}
.fc .fc-daygrid-day.is-selected .fc-daygrid-day-frame {
  box-shadow: inset 0 0 0 1.5px rgba(249, 195, 76, 0.7);
  border-radius: 8px;
}
.fc .fc-daygrid-day-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row;
}
.fc .fc-daygrid-day-number {
  color: #e8d7b3;
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
  padding: 2px 4px;
  border-radius: 6px;
}
.fc .fc-day-today .fc-daygrid-day-number {
  background: linear-gradient(135deg, #f5c45e, #ab7021);
  color: #140d02;
  font-weight: 800;
  border-radius: 50%;
  min-width: 19px;
  height: 19px;
  display: inline-grid;
  place-items: center;
  line-height: 1;
  box-shadow: 0 0 10px rgba(245, 196, 94, 0.4);
}
.fc .fc-day-other .fc-daygrid-day-number {
  color: rgba(203, 184, 141, 0.35);
}
.calendar-fullcalendar__counts {
  display: inline-flex;
  gap: 3px;
  margin-left: 2px;
}
.calendar-fullcalendar__counts i {
  font-style: normal;
  font-size: 8px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(249, 195, 76, 0.18);
  color: #ffd87c;
  border: 1px solid rgba(249, 195, 76, 0.28);
  line-height: 1.2;
}
.calendar-fullcalendar__entry {
  display: block;
  width: 100%;
  padding: 2px 5px;
  border-radius: 6px;
  font-size: 9px;
  line-height: 1.2;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.calendar-fullcalendar__entry.is-event {
  background: rgba(45, 32, 10, 0.85);
  border-left: 2px solid #f5c45e;
  color: #fff1c9;
}
.calendar-fullcalendar__entry.is-task {
  background: rgba(16, 36, 24, 0.85);
  border-left: 2px solid #4ade80;
  color: #d1fae5;
}
.calendar-fullcalendar__entry strong {
  font-weight: 600;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}
.calendar-fullcalendar__entry small {
  font-size: 7px;
  opacity: 0.75;
  display: block;
}
.fc .fc-list-day-cushion {
  background: rgba(35, 26, 10, 0.9) !important;
  color: #ffe8b3;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 10px;
}
.fc .fc-list-event {
  background: rgba(18, 14, 6, 0.6);
  color: #f5eedc;
  cursor: pointer;
  transition: background 120ms ease;
}
.fc .fc-list-event:hover td {
  background: rgba(249, 195, 76, 0.12) !important;
}
.fc .fc-list-event-dot { border-color: #f5c45e !important; }
.fc .fc-list-event-time { color: #f5ce78; font-size: 11px; font-weight: 600; }
.fc .fc-list-event-title { color: #fff1c9; font-size: 12px; }
.fc .fc-timegrid-slot-label-cushion { color: #cbb88d; font-size: 10px; }
.fc .fc-timegrid-slot { height: 26px !important; border-color: rgba(249, 195, 76, 0.1) !important; }
.fc .fc-timegrid-now-indicator-line { border-color: #f5c45e; border-width: 2px; }
.fc .fc-timegrid-now-indicator-arrow { border-color: #f5c45e; }

/* Custom Fallback Grid */
.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 700;
  color: #dfc58f;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.calendar-day {
  min-height: 52px;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid rgba(249, 195, 76, 0.14);
  background: rgba(18, 14, 6, 0.65);
  color: #eedab0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  cursor: pointer;
  transition: all 120ms ease;
}
.calendar-day:hover {
  background: rgba(35, 26, 11, 0.75);
  border-color: rgba(249, 195, 76, 0.4);
}
.calendar-day.is-selected {
  background: rgba(249, 195, 76, 0.2);
  border-color: #ffd87c;
  box-shadow: 0 0 10px rgba(245, 196, 94, 0.3);
}
.calendar-day.is-today .calendar-day__number {
  background: linear-gradient(135deg, #f5c45e, #ab7021);
  color: #140d02;
  font-weight: 800;
  border-radius: 50%;
  min-width: 19px;
  height: 19px;
  display: inline-grid;
  place-items: center;
  line-height: 1;
  box-shadow: 0 0 10px rgba(245, 196, 94, 0.4);
}
.calendar-day.is-other { opacity: 0.35; }
.calendar-day__number {
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  margin-bottom: 2px;
}
.calendar-day em {
  font-style: normal;
  font-size: 8px;
  color: #ffebbe;
  line-height: 1.15;
  margin-top: auto;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.calendar-day small { display: flex; gap: 2px; font-size: 7px; color: #ffd67c; }

/* Timeline & Schedule views */
.calendar-timeline { display: grid; gap: 10px; }
.calendar-timeline-day {
  padding: 10px;
  border-radius: 14px;
  background: rgba(18, 14, 6, 0.6);
  border: 1px solid rgba(249, 195, 76, 0.2);
}
.calendar-timeline-day button strong {
  color: #ffe6aa;
  font-size: 12px;
  text-transform: capitalize;
}
.calendar-time-grid {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  max-height: 280px;
  overflow-y: auto;
}
.calendar-time-grid > div {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: #cbb88d;
}
.calendar-schedule { display: grid; gap: 8px; }

/* Agenda Section (Selected Day & Events) */
.calendar-agenda {
  margin-top: 14px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(16, 12, 5, 0.75);
  border: 1px solid rgba(249, 195, 76, 0.28);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}
.calendar-agenda__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(249, 195, 76, 0.18);
  padding-bottom: 10px;
}
.calendar-agenda__heading span {
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold, #f5c45e);
  font-weight: 700;
}
.calendar-agenda__heading h2 {
  margin: 2px 0 0;
  font: 400 17px/1.2 "ORA Serif", Georgia, serif;
  color: #fff1c9;
  text-transform: capitalize;
}
.calendar-agenda__heading button,
.calendar-agenda [data-calendar-add] {
  padding: 6px 14px;
  border-radius: 12px;
  border: 1px solid rgba(249, 195, 76, 0.4);
  background: rgba(38, 28, 11, 0.85);
  color: #ffe59c;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 140ms ease;
}
.calendar-agenda__heading button:hover,
.calendar-agenda__heading button:active {
  background: linear-gradient(135deg, #f5c45e, #c68a28);
  color: #171005;
  border-color: #ffe9a2;
}
.calendar-empty {
  padding: 22px 10px;
  text-align: center;
  color: rgba(203, 184, 141, 0.6);
  font-size: 12px;
  font-style: italic;
}
.calendar-entry-list { display: grid; gap: 8px; }

/* Event Cards */
.calendar-entry.calendar-entry--event {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(249, 195, 76, 0.22);
  background: rgba(25, 18, 7, 0.75);
  color: #ffe8b7;
  text-align: left;
  cursor: pointer;
  transition: transform 120ms ease, background 140ms ease, border-color 140ms ease;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
}
.calendar-entry.calendar-entry--event.is-ora { border-left: 3px solid #f5c45e; }
.calendar-entry.calendar-entry--event.is-external { border-left: 3px solid #60a5fa; }
.calendar-entry.calendar-entry--event:hover,
.calendar-entry.calendar-entry--event:active {
  background: rgba(42, 30, 12, 0.88);
  border-color: rgba(255, 214, 120, 0.5);
  transform: translateY(-1px);
}
.calendar-entry.calendar-entry--event > span {
  font-size: 11px;
  font-weight: 700;
  color: #ffd67c;
  font-variant-numeric: tabular-nums;
}
.calendar-entry.calendar-entry--event strong {
  font-size: 13px;
  font-weight: 600;
  color: #fff3d0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.calendar-entry.calendar-entry--event small {
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(249, 195, 76, 0.2);
  font-size: 9px;
  color: #dfc58f;
  font-weight: 500;
}

/* Task Cards */
.calendar-entry.calendar-entry--task {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid rgba(74, 222, 128, 0.28);
  border-left: 3px solid #4ade80;
  background: rgba(14, 24, 18, 0.75);
  color: #e2fbe8;
  text-align: left;
  transition: all 140ms ease;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
}
.calendar-entry.calendar-entry--task.is-completed {
  opacity: 0.55;
  border-color: rgba(74, 222, 128, 0.15);
  background: rgba(10, 18, 14, 0.5);
}
.calendar-entry.calendar-entry--task.is-completed .calendar-task-copy strong {
  text-decoration: line-through;
  color: #94a3b8;
}
.calendar-task-check {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1.5px solid rgba(74, 222, 128, 0.65);
  background: rgba(0, 0, 0, 0.45);
  color: #4ade80;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 120ms ease;
}
.calendar-entry.calendar-entry--task.is-completed .calendar-task-check {
  background: #4ade80;
  color: #062413;
}
.calendar-task-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: transparent;
  border: 0;
  text-align: left;
  color: inherit;
  cursor: pointer;
}
.calendar-task-copy strong {
  font-size: 13px;
  font-weight: 500;
  color: #f0fdf4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.calendar-task-copy small {
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  font-size: 9px;
  color: #a7f3d0;
}

/* Undated Tasks Section */
.calendar-undated {
  margin-top: 14px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(16, 13, 6, 0.65);
  border: 1px dashed rgba(249, 195, 76, 0.3);
}
.calendar-undated > span {
  display: block;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--gold, #f5c45e);
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* Floating Action Button (FAB) */
.calendar-fab {
  position: absolute;
  right: 20px;
  bottom: 96px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255, 235, 160, 0.65);
  background: linear-gradient(135deg, #ffe594 0%, #e5a838 52%, #9d651c 100%);
  color: #150f03;
  font-size: 28px;
  font-weight: 300;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 22px rgba(229, 168, 56, 0.45), 0 2px 6px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  z-index: 28;
  transition: transform 160ms ease, box-shadow 160ms ease;
  line-height: 1;
}
.calendar-fab:hover, .calendar-fab:active {
  transform: scale(1.06) translateY(-2px);
  box-shadow: 0 10px 28px rgba(229, 168, 56, 0.65);
}

/* Notice Banner */
.calendar-notice {
  margin-top: 14px;
  padding: 11px 16px;
  border-radius: 14px;
  border: 1px solid rgba(249, 195, 76, 0.4);
  background: rgba(28, 21, 8, 0.92);
  color: #ffe6aa;
  font-size: 11px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
}

/* Add Choice Screen */
.calendar-form-page {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}
.calendar-form-page p {
  font-size: 13px;
  color: #eedab0;
  margin: 0 0 4px;
}
.calendar-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(249, 195, 76, 0.35);
  background: rgba(25, 18, 7, 0.75);
  color: #ffeab0;
  text-align: left;
  cursor: pointer;
  transition: all 140ms ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
.calendar-choice:hover, .calendar-choice:active {
  background: rgba(45, 32, 12, 0.88);
  border-color: #ffd87c;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(245, 196, 94, 0.22);
}
.calendar-choice svg {
  width: 22px;
  height: 22px;
  color: #f5c45e;
  flex-shrink: 0;
}
.calendar-choice span { flex: 1; }
.calendar-choice strong {
  display: block;
  font-size: 15px;
  color: #fff1c9;
  font-weight: 600;
}
.calendar-choice small {
  display: block;
  font-size: 11px;
  color: rgba(235, 210, 157, 0.68);
  margin-top: 2px;
}

/* Event & Task Forms */
.calendar-editor {
  display: grid;
  gap: 12px;
  margin-top: 8px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(249, 195, 76, 0.28);
  background: rgba(18, 14, 6, 0.78);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}
.calendar-editor label {
  display: grid;
  gap: 4px;
  font-size: 10px;
  color: #dfc58f;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.calendar-editor label.calendar-checkbox {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  text-transform: none;
  font-weight: 500;
  color: #ffe6aa;
  cursor: pointer;
  margin: 4px 0;
}
.calendar-editor label.calendar-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--gold, #f5c45e);
}
.calendar-editor input,
.calendar-editor select,
.calendar-editor textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(249, 195, 76, 0.35);
  border-radius: 12px;
  background: rgba(10, 8, 4, 0.7);
  color: #fff1c9;
  font-size: 16px !important;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
  touch-action: manipulation;
}
.calendar-editor input:focus,
.calendar-editor select:focus,
.calendar-editor textarea:focus {
  border-color: #ffd87c;
  box-shadow: 0 0 0 2px rgba(245, 196, 94, 0.25);
}
.calendar-editor textarea {
  min-height: 80px;
  resize: vertical;
  line-height: 1.4;
}
.calendar-editor__two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.calendar-editor small {
  font-size: 10px;
  color: rgba(203, 184, 141, 0.6);
  text-transform: none;
  font-weight: 400;
}
.calendar-link {
  display: inline-block;
  margin-top: 4px;
  color: #f5ce78;
  font-size: 12px;
  text-decoration: underline;
}
.calendar-attendees {
  display: grid;
  gap: 4px;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(10, 8, 4, 0.5);
  border: 1px solid rgba(249, 195, 76, 0.2);
}
.calendar-attendees strong { font-size: 11px; color: #ffe599; }
.calendar-attendees span { font-size: 11px; color: #eedab0; }
.calendar-attendees small { font-size: 9px; color: rgba(203, 184, 141, 0.6); }

.calendar-primary {
  width: 100%;
  margin-top: 8px;
  padding: 13px 20px;
  border-radius: 14px;
  border: 1px solid rgba(255, 235, 160, 0.6);
  background: linear-gradient(135deg, #ffe594 0%, #e5a838 52%, #9d651c 100%);
  color: #150f03;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(229, 168, 56, 0.35);
  transition: transform 140ms ease, filter 140ms ease;
}
.calendar-primary:active {
  transform: scale(0.98);
  filter: brightness(0.92);
}
.calendar-danger {
  width: 100%;
  margin-top: 10px;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid rgba(239, 68, 68, 0.4);
  background: rgba(45, 15, 15, 0.7);
  color: #fca5a5;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 140ms ease;
}
.calendar-danger:hover, .calendar-danger:active {
  background: rgba(70, 20, 20, 0.85);
  border-color: #ef4444;
}

/* Settings View */
.calendar-settings {
  display: grid;
  gap: 14px;
  margin-top: 6px;
}
.calendar-settings > p {
  font-size: 12px;
  color: #eedab0;
  line-height: 1.4;
  margin: 0;
}
.calendar-source {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(249, 195, 76, 0.25);
  background: rgba(20, 15, 6, 0.65);
  margin-bottom: 8px;
}
.calendar-source strong {
  display: block;
  font-size: 13px;
  color: #fff1c9;
}
.calendar-source small {
  display: block;
  font-size: 10px;
  color: rgba(203, 184, 141, 0.65);
}
.calendar-source span {
  font-size: 11px;
  color: #f5ce78;
}
.calendar-source label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #ffeab0;
  cursor: pointer;
}
.calendar-source input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--gold, #f5c45e);
}
.calendar-connections {
  display: grid;
  gap: 10px;
  margin-top: 8px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(249, 195, 76, 0.25);
  background: rgba(18, 14, 6, 0.65);
}
.calendar-connections h2 {
  margin: 0 0 4px;
  font: 400 16px/1.2 "ORA Serif", Georgia, serif;
  color: #ffe6aa;
}
.calendar-connection {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(10, 8, 4, 0.5);
  border: 1px solid rgba(249, 195, 76, 0.2);
}
.calendar-connection strong { display: block; font-size: 12px; color: #fff1c9; }
.calendar-connection small { display: block; font-size: 10px; color: #dfc58f; }
.calendar-connection button {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(249, 195, 76, 0.3);
  background: rgba(30, 22, 9, 0.7);
  color: #f5d489;
  font-size: 10px;
  cursor: pointer;
}
.calendar-conflicts {
  display: grid;
  gap: 10px;
  margin-top: 8px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(245, 158, 11, 0.4);
  background: rgba(35, 22, 6, 0.75);
}
.calendar-apple {
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(249, 195, 76, 0.2);
  background: rgba(15, 12, 5, 0.5);
  font-size: 11px;
  color: rgba(203, 184, 141, 0.7);
}
.calendar-apple strong { display: block; color: #ffe599; margin-bottom: 2px; }


.gratitude-prompt-box { padding: 10px 12px; border-radius: 12px; background: rgba(0,0,0,.35); font-size: 11px; color: #f3dfae; line-height: 1.5; }
.gratitude-prompt-box p { margin: 3px 0; }
.gratitude-modal textarea { width: 100%; min-height: 80px; padding: 10px; border: 1px solid rgba(249,195,76,.4); border-radius: 12px; background: rgba(0,0,0,.4); color: #fff0c0; font-size: 12px; }
.gratitude-rating-row { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: #f3dfae; margin: 4px 0; }
.rating-chips { display: flex; gap: 6px; }
.rating-chip { width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(249,195,76,.4); background: rgba(0,0,0,.4); color: #f3dfae; font-size: 11px; cursor: pointer; }
.rating-chip.is-selected { background: #eab64f; color: #171005; font-weight: 700; border-color: #ffd87d; }

/* Full-screen SOS & Resource Modals */
.sos-modal,
.resource-modal {
  position: absolute !important;
  z-index: 110 !important; /* ORA_MODAL_ABOVE_BACKDROP_V1 */
  inset: 0 !important;
  left: 0 !important;
  right: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  margin: 0 !important;
  border-radius: 0 !important;
  border: none !important;
  padding: max(calc(var(--topbar-top, 24px) + 14px), 36px) 20px max(calc(var(--bottom-nav-bottom, 0px) + 28px), 36px) !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  background: radial-gradient(circle at 50% 12%, rgba(42, 28, 10, 0.99), #0e0b06 65%, #050402 100%) !important;
  box-shadow: none !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  opacity: 0;
  pointer-events: none;
  transform: translateY(24px) scale(0.99) !important;
  transition: opacity 220ms ease, transform 240ms cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.sos-modal.is-open,
.resource-modal.is-open {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateY(0) scale(1) !important;
}

.screen:has(.sos-modal.is-open) .bottom-nav,
.screen:has(.resource-modal.is-open) .bottom-nav,
.screen.is-sos-open .bottom-nav,
.screen.is-resource-open .bottom-nav {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(24px) !important;
  transition: opacity 180ms ease, transform 180ms ease !important;
}

.sos-modal .modal__close,
.resource-modal .modal__close {
  position: absolute !important;
  top: max(calc(var(--topbar-top, 24px) + 8px), 24px) !important;
  right: 18px !important;
  z-index: 10 !important;
  display: grid !important;
  place-items: center !important;
  width: 36px !important;
  height: 36px !important;
  border: 1px solid rgba(249, 195, 76, 0.54) !important;
  border-radius: 50% !important;
  background: rgba(62, 43, 11, 0.75) !important;
  color: #ffe9ab !important;
  cursor: pointer !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
  transition: transform 120ms ease, background 120ms ease !important;
}

.sos-modal .modal__close:active,
.resource-modal .modal__close:active {
  transform: scale(0.92) !important;
  background: rgba(85, 58, 15, 0.9) !important;
}

.sos-modal .modal__close svg,
.resource-modal .modal__close svg {
  width: 18px !important;
  height: 18px !important;
  stroke: #ffe9ab !important;
  stroke-width: 2.2 !important;
}

.sos-modal .modal__eyebrow,
.resource-modal .modal__eyebrow {
  display: block !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase !important;
  color: #f5c15a !important;
  text-shadow: 0 0 10px rgba(245, 193, 90, 0.35) !important;
  margin-top: 4px !important;
  padding-right: 48px !important;
  flex-shrink: 0 !important;
}

.sos-modal h2,
.resource-modal h2 {
  margin: 0 !important;
  color: #fff0bf !important;
  font: 400 24px/1.2 "ORA Serif", Georgia, serif !important;
  letter-spacing: 0.02em !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6) !important;
  padding-right: 48px !important;
  flex-shrink: 0 !important;
}

/* SOS List & Items */
.sos-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  margin: 8px 0 14px 0 !important;
  max-height: none !important;
  overflow-y: visible !important;
  flex: 1 0 auto !important;
}

.sos-btn {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 14px 16px !important;
  border: 1px solid rgba(245, 160, 80, 0.45) !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg, rgba(50, 24, 12, 0.82), rgba(28, 14, 7, 0.92)) !important;
  color: #ffdcb5 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  text-align: left !important;
  cursor: pointer !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 220, 160, 0.12) !important;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, box-shadow 140ms ease !important;
  -webkit-tap-highlight-color: transparent !important;
}

.sos-btn:hover {
  background: linear-gradient(135deg, rgba(72, 34, 16, 0.9), rgba(42, 20, 10, 0.95)) !important;
  border-color: #f7a550 !important;
  box-shadow: 0 6px 18px rgba(245, 160, 80, 0.25) !important;
}

.sos-btn:active {
  transform: scale(0.98) !important;
}

.sos-hotline-box {
  margin-top: auto !important;
  padding: 14px 16px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(245, 160, 80, 0.25) !important;
  background: rgba(18, 12, 6, 0.8) !important;
  font-size: 11.5px !important;
  color: #e8cda0 !important;
  display: grid !important;
  gap: 6px !important;
  box-shadow: inset 0 1px 0 rgba(255, 220, 160, 0.08) !important;
  flex-shrink: 0 !important;
}

.sos-hotline-box small {
  color: #f5c15a !important;
  font-weight: 600 !important;
}

.sos-hotline-link {
  display: block;
  color: #ffe4a0 !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  padding: 3px 0;
  transition: color 0.15s ease;
}

.sos-hotline-link:hover {
  color: #ffffff !important;
  text-decoration: underline !important;
}

/* SOS Comment Box & Dictation */
.sos-comment-box {
  margin: 6px 0 10px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.sos-comment-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 160, 80, 0.12);
  border: 1px dashed rgba(245, 160, 80, 0.4);
  border-radius: 12px;
  padding: 10px 14px;
  color: #fed89a;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

.sos-comment-toggle:hover,
.sos-comment-toggle[aria-expanded="true"] {
  background: rgba(245, 160, 80, 0.22);
  border-color: rgba(245, 160, 80, 0.65);
  color: #fff0be;
}

.sos-comment-toggle svg {
  width: 16px;
  height: 16px;
  color: #f59e0b;
  flex-shrink: 0;
}

.sos-comment-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(20, 12, 6, 0.65);
  border: 1px solid rgba(245, 160, 80, 0.3);
  border-radius: 14px;
  padding: 10px 12px;
}

.sos-comment-input {
  width: 100%;
  box-sizing: border-box;
  background: transparent;
  border: none;
  outline: none;
  color: #fff0be;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.4;
  resize: none;
}

.sos-comment-input::placeholder {
  color: rgba(235, 195, 140, 0.5);
}

.sos-comment-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid rgba(245, 160, 80, 0.15);
  padding-top: 8px;
}

.sos-mic-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #ffdcb5;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sos-mic-btn svg {
  width: 14px;
  height: 14px;
  color: #f59e0b;
}

.sos-mic-btn.is-recording {
  background: rgba(239, 68, 68, 0.35);
  border-color: #ef4444;
  color: #ffffff;
}

.sos-comment-hint {
  font-size: 11px;
  color: rgba(232, 205, 160, 0.6);
}

/* Stories list (kept compact for dialog) */
.stories-list { display: grid; gap: 8px; margin: 8px 0; max-height: 240px; overflow-y: auto; }
.story-btn { padding: 10px 14px; border: 1px solid rgba(249,195,76,.35); border-radius: 12px; background: rgba(30,22,8,.6); color: #f9e3af; text-align: left; cursor: pointer; }
.story-btn strong { display: block; font-size: 13px; color: #fff0be; }
.story-btn small { display: block; font-size: 10px; color: #cbb483; margin-top: 2px; }

/* Resource Sections & Cards */
.resource-sections {
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  margin: 8px 0 16px 0 !important;
  max-height: none !important;
  overflow-y: visible !important;
  flex: 1 0 auto !important;
}

.resource-card {
  padding: 16px 18px !important;
  border: 1px solid rgba(249, 195, 76, 0.35) !important;
  border-radius: 16px !important;
  background: linear-gradient(135deg, rgba(32, 24, 10, 0.85), rgba(16, 12, 5, 0.92)) !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
  color: #eedab0 !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 235, 170, 0.12) !important;
}

.resource-card strong {
  display: block !important;
  margin-bottom: 6px !important;
  color: #ffe699 !important;
  font-size: 14px !important;
}

.resource-action-btn {
  margin-top: 10px !important;
  padding: 8px 16px !important;
  border: 1px solid rgba(249, 195, 76, 0.6) !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, rgba(55, 40, 15, 0.85), rgba(30, 22, 8, 0.95)) !important;
  color: #fff0c4 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
  transition: all 140ms ease !important;
}

.resource-action-btn:hover {
  background: linear-gradient(135deg, rgba(80, 58, 20, 0.95), rgba(45, 32, 12, 0.98)) !important;
  border-color: #fcd56b !important;
  box-shadow: 0 4px 14px rgba(249, 195, 76, 0.25) !important;
}

.resource-action-btn:active {
  transform: scale(0.97) !important;
}

.rhythm-bars { display: flex; gap: 12px; margin-top: 6px; font-size: 11px; color: #d6be8c; }
.rhythm-bars strong { display: inline; color: #ffe599; }

.jyotish-badge {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin: 10px 0 !important;
  font-size: 11.5px !important;
  color: #d6c092 !important;
}

.jyotish-badge span {
  padding: 5px 10px !important;
  border-radius: 9px !important;
  background: rgba(0, 0, 0, 0.5) !important;
  border: 1px solid rgba(249, 195, 76, 0.28) !important;
}

.jyotish-badge strong { display: inline; color: #ffe7a3; }

.jyotish-natal-box {
  margin-top: 10px !important;
  padding: 10px 12px !important;
  border-radius: 12px !important;
  background: rgba(45, 32, 10, 0.65) !important;
  border: 1px dashed rgba(249, 195, 76, 0.4) !important;
  font-size: 11.5px !important;
  color: #f7e0a8 !important;
}

/* Profile & Onboarding Modal */
.profile-modal {
  position: absolute !important;
  z-index: 110 !important;
  left: 50% !important;
  right: auto !important;
  bottom: 18px !important;
  width: calc(100% - 32px) !important;
  max-width: 398px !important;
  max-height: calc(100% - var(--topbar-top, 94px) - 20px) !important;
  margin: 0 !important;
  padding: 22px 20px !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  display: grid !important;
  gap: 10px !important;
  border: 1px solid rgba(251,199,81,.75) !important;
  border-radius: 23px !important;
  background: linear-gradient(145deg, rgba(55,39,12,.98), rgba(13,11,6,.99)) !important;
  box-shadow: 0 18px 45px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,235,166,.22) !important;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 24px) scale(.97) !important;
  transition: opacity 200ms ease, transform 220ms ease;
}
.profile-modal.is-open {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translate(-50%, 0) scale(1) !important;
}
.profile-modal h2 {
  margin: 0 !important;
  color: #fff0be !important;
  font: 400 22px/1.2 "ORA Serif", Georgia, serif !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8) !important;
}
.profile-modal .modal__eyebrow {
  color: #f5c15a !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
}
.profile-form {
  display: grid !important;
  gap: 8px !important;
  margin-top: 6px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
}
.profile-field {
  display: grid !important;
  gap: 3px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}
.profile-field label {
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #fed986 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8) !important;
}
.profile-field input, .profile-field select {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  padding: 10px 14px !important;
  border: 1.5px solid rgba(246, 194, 83, 0.55) !important;
  border-radius: 12px !important;
  background: rgba(14, 11, 5, 0.9) !important;
  color: #ffffff !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6) !important;
  outline: none !important;
  touch-action: manipulation;
}
.profile-field input[type="date"], .profile-field input[type="time"] {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  padding: 9px 12px !important;
  margin: 0 !important;
  color-scheme: dark !important;
  height: 42px !important;
  min-height: 42px !important;
  max-height: 42px !important;
  line-height: normal !important;
  text-align: left !important;
}
.profile-field input[type="date"]::-webkit-date-and-time-value,
.profile-field input[type="time"]::-webkit-date-and-time-value {
  display: block !important;
  text-align: left !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 22px !important;
  line-height: 22px !important;
}
.profile-field input[type="date"]::-webkit-calendar-picker-indicator,
.profile-field input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(0.8) sepia(1) saturate(5) hue-rotate(5deg);
  opacity: 0.7;
  cursor: pointer;
  margin: 0 0 0 auto !important;
}
.profile-field input:focus, .profile-field select:focus {
  border-color: #ffd87c !important;
  box-shadow: 0 0 0 2px rgba(247,191,67,.25) !important;
}
.profile-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}
.profile-check {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 11px !important;
  color: #e9d5a8 !important;
  cursor: pointer;
  margin-top: 4px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
.profile-check input {
  width: 16px !important;
  height: 16px !important;
  accent-color: #eab64f !important;
  flex-shrink: 0 !important;
}
.profile-account-box {
  display: grid !important;
  gap: 6px !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin-top: 4px !important;
  padding: 10px !important;
  border-radius: 12px !important;
  background: rgba(0,0,0,.35) !important;
  border: 1px solid rgba(249,195,76,.25) !important;
  overflow: hidden !important;
}
.profile-actions {
  display: grid !important;
  gap: 7px !important;
  margin-top: 10px !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
.profile-btn-primary {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  padding: 12px !important;
  border-radius: 13px !important;
  border: none !important;
  background: linear-gradient(135deg, #fff0af, #edb748 55%, #a66b1f) !important;
  color: #171006 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,225,.66), 0 0 16px rgba(245,180,51,.28) !important;
  transition: transform 120ms ease, background 200ms ease, opacity 150ms ease !important;
  touch-action: manipulation;
}
.profile-btn-primary:active { transform: scale(.98); }
.profile-btn-primary.is-loading {
  opacity: 0.88 !important;
  cursor: wait !important;
  pointer-events: none !important;
}
.profile-btn-primary.is-success {
  background: linear-gradient(135deg, #a7f3d0, #10b981 55%, #047857) !important;
  color: #064e3b !important;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.5) !important;
}

.profile-btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(23, 16, 6, 0.3);
  border-top-color: #171006;
  border-radius: 50%;
  animation: profileBtnSpin 0.65s linear infinite;
  flex-shrink: 0;
}
@keyframes profileBtnSpin {
  to { transform: rotate(360deg); }
}
.profile-btn-secondary {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  padding: 9px !important;
  border-radius: 11px !important;
  border: 1px solid rgba(249,195,76,.4) !important;
  background: rgba(30,22,8,.7) !important;
  color: #fedc93 !important;
  font-size: 11px !important;
  cursor: pointer;
  touch-action: manipulation;
}
.profile-btn-secondary:active { transform: scale(.98); }

/* Post-meditation Reflection Modal (Анкета на выходе) */
.reflection-modal { left: 50% !important; right: auto !important; width: calc(100% - 32px) !important; max-width: 398px !important; max-height: calc(100% - var(--topbar-top, 94px) - 20px) !important; margin: 0 !important; box-sizing: border-box; overflow-x: hidden !important; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.reflection-scale { display: flex; justify-content: space-between; gap: 4px; margin: 8px 0; width: 100%; box-sizing: border-box; }
.reflection-scale-btn { flex: 1; height: 32px; border-radius: 8px; border: 1px solid rgba(249,195,76,.35); background: rgba(0,0,0,.4); color: #edd8a6; font-size: 11px; font-weight: 600; cursor: pointer; transition: background 120ms, border-color 120ms; touch-action: manipulation; }
.reflection-scale-btn.is-selected { background: #eab64f; color: #151005; border-color: #ffe39a; font-weight: 700; box-shadow: 0 0 10px rgba(234,182,79,.4); }
.reflection-input { width: 100%; box-sizing: border-box; min-height: 64px; padding: 10px; border: 1px solid rgba(249,195,76,.4); border-radius: 12px; background: rgba(0,0,0,.4); color: #fff0c0; font-size: 16px; resize: none; margin: 4px 0 6px; outline: none; touch-action: manipulation; }
.reflection-input:focus { border-color: #ffd87c; }
.reflection-actions { display: grid; gap: 7px; margin-top: 6px; width: 100%; box-sizing: border-box; }

/* Diary, Stats, Archive Modals */
.diary-modal, .stats-modal, .archive-modal {
  left: 50% !important;
  right: auto !important;
  width: calc(100% - 32px) !important;
  max-width: 398px !important;
  max-height: calc(100% - var(--topbar-top, 94px) - 20px) !important;
  margin: 0 !important;
  box-sizing: border-box;
  overflow-x: hidden !important;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.diary-entry-card, .archive-item-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(249, 195, 76, 0.22);
  box-sizing: border-box;
}
.diary-entry-header, .archive-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}
.diary-entry-date, .archive-item-date {
  color: rgba(246, 225, 177, 0.65);
}
.diary-entry-score {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 8px;
  background: rgba(234, 182, 79, 0.18);
  border: 1px solid rgba(234, 182, 79, 0.4);
  color: #fedb88;
  font-weight: 700;
  font-size: 10px;
}
.diary-entry-text {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  color: #fff0c8;
}
.archive-item-title {
  color: #fff0bd;
  font-weight: 600;
  font-size: 13px;
}
.archive-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: rgba(246, 225, 177, 0.75);
}
.archive-item-action {
  align-self: flex-start;
  margin-top: 4px;
  padding: 4px 11px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(234, 182, 79, 0.25), rgba(120, 80, 20, 0.35));
  border: 1px solid rgba(249, 195, 76, 0.45);
  color: #ffe6a3;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 120ms ease;
  touch-action: manipulation;
}
.archive-item-action:active {
  transform: scale(0.96);
}
.stats-weekday-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 2px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(249, 195, 76, 0.15);
  font-size: 10px;
  color: rgba(246, 225, 177, 0.7);
}
.stats-weekday-item.is-today {
  border-color: rgba(249, 195, 76, 0.7);
  background: rgba(234, 182, 79, 0.15);
  color: #fff0bd;
  font-weight: 700;
}
.stats-weekday-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}
.stats-weekday-item.has-practice .stats-weekday-dot {
  background: #f5c15a;
  box-shadow: 0 0 6px #f5c15a;
}




/* --- AUTH, CABINET & ANKETA OVERLAY STYLES --- */
.login-card { position: absolute; z-index: 110 !important; top: max(78px, var(--topbar-top, 94px)); left: 50% !important; right: auto !important; width: calc(100% - 32px) !important; max-width: 398px !important; transform: translateX(-50%) !important; display: grid; gap: 10px; padding: 16px 16px 14px; border: 1px solid rgba(251,199,81,.75); border-radius: 23px; background: linear-gradient(145deg, rgba(55,39,12,.98), rgba(13,11,6,.99)); box-shadow: 0 18px 45px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,235,166,.22); color-scheme: dark; box-sizing: border-box !important; overflow-x: hidden !important; }
.login-card .modal__close { position: absolute; top: 12px; right: 12px; }
.login-card h2 { margin: 0; color: #fff0bf; font: 400 22px/1.12 "ORA Serif", Georgia, serif; }
.login-card__status { min-height: 16px; margin: 0; color: #f3dca6; font-size: 12px; line-height: 1.35; }
.login-card__status.is-error { color: #ffb4a2; }
.login-card__status.is-ok { color: #d8f5c8; }
.login-card__form { display: grid; gap: 10px; width: 100%; box-sizing: border-box; }
.login-card__field { display: grid; gap: 4px; color: #f5c15a; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; width: 100%; min-width: 0; box-sizing: border-box; }
.login-card__field input { width: 100% !important; min-width: 0 !important; max-width: 100% !important; box-sizing: border-box !important; padding: 11px 12px; border: 1px solid rgba(250,199,86,.45); border-radius: 13px; outline: none; background: rgba(4,4,2,.48); color: #fff0c2; font-size: 16px; letter-spacing: normal; text-transform: none; }
.login-card__field input:focus { border-color: #ffdc7e; box-shadow: 0 0 0 2px rgba(247,191,67,.22); }
.login-card.is-signed-in .login-card__form { display: none; }


.cabinet-page .screen { --screen-scale: min(1, calc(100vw / 430), calc(100vh / 764)); left: calc((100vw - 430px * var(--screen-scale)) / 2); top: calc((100vh - 764px * var(--screen-scale)) / 2); }
.cabinet-card h1 { margin: 0; color: #fff0bf; font: 400 22px/1.12 "ORA Serif", Georgia, serif; }
.cabinet-card__value { display: block; color: #fff0c2; font-size: 14px; font-weight: 400; letter-spacing: normal; text-transform: none; }
.cabinet-card__home { color: #f5c15a; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; }
.cabinet-card__home:focus-visible { outline: 2px solid #fff0b1; outline-offset: 3px; }

.login-card #playMeditation { margin-top: 2px; }

.login-card__switch { justify-self: start; margin: 0; padding: 0; border: 0; background: transparent; color: #f5c15a; font: 600 13px/1.2 Inter, sans-serif; cursor: pointer; }
.login-card__back-to-profile { margin-top: 6px !important; color: #f7ca6d !important; font-size: 12px !important; text-decoration: underline !important; cursor: pointer !important; }
.login-card[hidden] { display: none !important; }
.login-card__form[hidden] { display: none; }

.login-card__hint { margin: 0; color: #f3dca6; font-size: 13px; }
/* Closed: small #anketaOpen in topbar beside logo. Open: #launchRest full-screen. */
.topbar__brand { justify-self: center; display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; }
.topbar__brand .brand-logo { justify-self: unset; flex: 0 0 auto; }
#anketaOpen.anketa-open-btn {
  position: static; z-index: 1; top: auto; right: auto; left: auto;
  flex: 0 0 auto; width: auto; max-width: 118px; margin: 0; padding: 6px 9px;
  border: 1px solid rgba(251,199,81,.7); border-radius: 11px;
  background: linear-gradient(135deg, #fff0af, #edb748 55%, #a66b1f);
  box-shadow: inset 0 1px 0 rgba(255,255,225,.55), 0 3px 10px rgba(0,0,0,.4);
  color: #171006; font: 700 9px/1.15 Inter, sans-serif; letter-spacing: .01em;
  text-align: center; cursor: pointer; white-space: nowrap;
}
#anketaOpen[hidden],
.menu-anketa-btn[hidden],
#anketaOpen.is-hidden,
.menu-anketa-btn.is-hidden {
  display: none !important;
}
#launchRest {
  position: absolute; inset: 0; z-index: 28;
  max-width: 430px; margin: 0 auto;
  border-radius: 28px;
  overflow: auto; overscroll-behavior: contain;
  display: grid; gap: 18px; align-content: start;
  padding: var(--topbar-top, 94px) 22px 36px;
  box-sizing: border-box;
  background: linear-gradient(165deg, rgba(55,39,12,.985), rgba(13,11,6,.995) 55%, rgba(8,6,3,.998));
  box-shadow: inset 0 1px 0 rgba(255,235,166,.18);
}
#launchRest[hidden] { display: none !important; }
#launchRest .anketa-close-btn { position: absolute; top: max(16px, calc(var(--topbar-top, 94px) + 4px)); right: 18px; z-index: 2; font-size: 22px; line-height: 1; }
#launchRest #launchHome { display: grid; gap: 22px; padding-top: 8px; max-width: 420px; width: 100%; margin: 0 auto; }
#launchRest .anketa-title {
  margin: 8px 0 0; padding-right: 40px;
  color: #fff0bf; font: 400 34px/1.12 "ORA Serif", Georgia, serif;
}
#launchRest .anketa-why {
  margin: 0; color: #f3dca6; font: 400 15px/1.5 Inter, sans-serif;
  letter-spacing: normal; text-transform: none;
}
#launchRest #anketaLater { margin: 0; justify-self: start; }
#launchRest .anketa-field { display: grid; gap: 8px; margin: 0; }
#launchRest .anketa-field__label {
  color: #fff0c2; font: 600 15px/1.3 Inter, sans-serif;
  letter-spacing: normal; text-transform: none;
}
#launchRest .anketa-field input {
  width: 100%; padding: 13px 14px;
  border: 1px solid rgba(250,199,86,.45); border-radius: 13px;
  outline: none; background: rgba(4,4,2,.48); color: #fff0c2;
  font: 400 15px/1.3 Inter, sans-serif; letter-spacing: normal; text-transform: none;
}
#launchRest .anketa-field input:focus {
  border-color: #ffdc7e; box-shadow: 0 0 0 2px rgba(247,191,67,.22);
}
#launchRest .anketa-field__hint {
  color: #d8c08a; font: 400 13px/1.45 Inter, sans-serif;
  letter-spacing: normal; text-transform: none; font-weight: 400;
}
#launchRest .anketa-block {
  display: grid; gap: 12px; margin: 6px 0 0; padding-top: 8px;
  border-top: 1px solid rgba(251,199,81,.22);
}
#launchRest .anketa-block__title {
  margin: 0; color: #fff0bf;
  font: 400 22px/1.2 "ORA Serif", Georgia, serif;
}
#launchRest .anketa-block__text {
  margin: 0; color: #f3dca6;
  font: 400 14px/1.5 Inter, sans-serif;
  letter-spacing: normal; text-transform: none;
}
#launchRest .anketa-field textarea {
  width: 100%; min-height: 88px; resize: vertical; padding: 13px 14px;
  border: 1px solid rgba(250,199,86,.45); border-radius: 13px;
  outline: none; background: rgba(4,4,2,.48); color: #fff0c2;
  font: 400 15px/1.4 Inter, sans-serif; letter-spacing: normal; text-transform: none;
}
#launchRest .anketa-field textarea:focus {
  border-color: #ffdc7e; box-shadow: 0 0 0 2px rgba(247,191,67,.22);
}





/* ==========================================================================
   Meditation Library & Generation UI
   ========================================================================== */
.topbar__brand {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
}
.topbar-meditation-lib-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 215, 120, 0.45);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(65, 46, 16, 0.85), rgba(22, 17, 8, 0.95));
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 235, 166, 0.2);
  color: #fff0be;
  font: 600 11px/1 Inter, sans-serif;
  cursor: pointer;
  transition: all 160ms ease;
}
.topbar-meditation-lib-btn[hidden],
#meditationLibraryBtn[hidden],
#menuMeditationLibrary[hidden] {
  display: none !important;
}
.topbar-meditation-lib-btn svg {
  width: 14px;
  height: 14px;
  color: #ffdc7e;
}
.topbar-meditation-lib-btn:hover {
  border-color: rgba(255, 225, 140, 0.8);
  background: linear-gradient(135deg, rgba(85, 60, 20, 0.9), rgba(32, 25, 12, 0.98));
  transform: translateY(-1px);
}
.topbar-meditation-lib-btn:active {
  transform: scale(0.96);
}

.meditation-library-modal {
  max-width: 440px !important;
  width: 94%;
  max-height: calc(100% - var(--topbar-top, 94px) - 20px) !important;
  padding: 20px 18px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}
.meditation-library-modal h2 {
  margin: 2px 0 0;
  color: #fff0bf;
  font: 400 24px/1.15 "ORA Serif", Georgia, serif;
}
.meditation-library-modal .modal__hint {
  margin: 0;
  color: rgba(245, 220, 165, 0.75);
  font: 400 11px/1.4 Inter, sans-serif;
}
.med-library-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.med-tabs {
  display: flex;
  gap: 6px;
  background: rgba(10, 8, 4, 0.6);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 215, 120, 0.15);
}
.med-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: rgba(245, 220, 165, 0.7);
  font: 600 11px/1 Inter, sans-serif;
  cursor: pointer;
  transition: all 140ms ease;
}
.med-tab:hover {
  color: #fff0be;
  background: rgba(255, 215, 120, 0.08);
}
.med-tab.is-active {
  background: linear-gradient(135deg, rgba(80, 56, 18, 0.8), rgba(40, 30, 10, 0.9));
  border-color: rgba(255, 215, 120, 0.5);
  color: #fff0be;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 235, 166, 0.2);
}
.med-tab__count {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.4);
  font-size: 10px;
  opacity: 0.9;
}
.med-btn-generate {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 14px;
  border: 1px solid rgba(255, 215, 120, 0.6);
  border-radius: 12px;
  background: linear-gradient(135deg, #fff0af, #edb748 55%, #a66b1f);
  color: #171006;
  font: 700 13px/1 Inter, sans-serif;
  box-shadow: 0 4px 16px rgba(245, 180, 51, 0.28), inset 0 1px 0 rgba(255, 255, 225, 0.6);
  cursor: pointer;
  transition: all 160ms ease;
}
.med-btn-generate svg {
  width: 16px;
  height: 16px;
}
.med-btn-generate:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 20px rgba(245, 180, 51, 0.4);
}
.med-btn-generate:active {
  transform: scale(0.98);
}
.med-btn-generate:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.med-library-toolbar-btns {
  display: flex;
  gap: 8px;
  width: 100%;
}
.med-gen-chips--systems {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.med-gen-chip--system {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 3px;
  padding: 8px 10px;
  border-radius: 10px;
}
.med-gen-chip--system .system-chip-title {
  font-weight: 700;
  font-size: 11px;
}
.med-gen-chip--system .system-chip-sub {
  font-size: 9px;
  line-height: 1.25;
  opacity: 0.75;
}
.med-badge--system-suno {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fde68a;
}
.med-badge--system-eleven {
  background: rgba(168, 85, 247, 0.2);
  border-color: rgba(168, 85, 247, 0.5);
  color: #e9d5ff;
}
.med-badge--system-grok {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.5);
  color: #bfdbfe;
}
.med-badge--system-edge {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.5);
  color: #a7f3d0;
}
.med-badge--system-gemini {
  background: rgba(14, 165, 233, 0.2);
  border-color: rgba(14, 165, 233, 0.5);
  color: #bae6fd;
}
.med-badge--system-yandex {
  background: rgba(234, 179, 8, 0.2);
  border-color: rgba(234, 179, 8, 0.5);
  color: #fef08a;
}
.med-badge--system-qwen {
  background: rgba(217, 70, 239, 0.2);
  border-color: rgba(217, 70, 239, 0.5);
  color: #f5d0fe;
}

.med-system-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 9px 12px;
  margin-bottom: 12px;
  background: rgba(22, 16, 8, 0.75);
  border: 1px solid rgba(249, 195, 76, 0.22);
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.med-system-filter-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 235, 180, 0.7);
  font-weight: 700;
}
.med-system-filter-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.med-system-filter-chips::-webkit-scrollbar { display: none; }
.med-sys-filter-chip {
  padding: 6px 11px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #d1d5db;
  font: 600 11px/1.2 Inter, sans-serif;
  cursor: pointer;
  white-space: nowrap;
  transition: all 140ms ease;
}
.med-sys-filter-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.med-sys-filter-chip.is-active {
  background: rgba(245, 196, 94, 0.22);
  border-color: rgba(245, 196, 94, 0.65);
  color: #fff1c9;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(245, 196, 94, 0.25);
}
.med-sys-filter-chip.med-sys-filter--suno.is-active {
  background: rgba(245, 158, 11, 0.25);
  border-color: #f59e0b;
  color: #fde68a;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.35);
}
.med-sys-filter-chip.med-sys-filter--elevenlabs.is-active {
  background: rgba(168, 85, 247, 0.25);
  border-color: #a855f7;
  color: #e9d5ff;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.35);
}
.med-sys-filter-chip.med-sys-filter--grok.is-active {
  background: rgba(59, 130, 246, 0.25);
  border-color: #3b82f6;
  color: #bfdbfe;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.35);
}
.med-sys-filter-chip.med-sys-filter--edge.is-active {
  background: rgba(16, 185, 129, 0.25);
  border-color: #10b981;
  color: #a7f3d0;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.35);
}
.med-sys-filter-chip.med-sys-filter--gemini.is-active {
  background: rgba(14, 165, 233, 0.25);
  border-color: #0ea5e9;
  color: #bae6fd;
  box-shadow: 0 0 12px rgba(14, 165, 233, 0.35);
}
.med-sys-filter-chip.med-sys-filter--yandex.is-active {
  background: rgba(234, 179, 8, 0.25);
  border-color: #eab308;
  color: #fef08a;
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.35);
}

.med-generator-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 13px;
  border-radius: 14px;
  background: rgba(20, 15, 8, 0.9);
  border: 1px solid rgba(255, 215, 120, 0.28);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.med-gen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 215, 120, 0.12);
  padding-bottom: 6px;
}
.med-gen-header h4 {
  margin: 0;
  font: 600 12px/1.3 Inter, sans-serif;
  color: #fff0bf;
  letter-spacing: 0.2px;
}
.med-gen-close-btn {
  background: transparent;
  border: none;
  color: rgba(245, 220, 165, 0.6);
  font-size: 13px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}
.med-gen-close-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}
.med-gen-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.med-gen-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.med-gen-label {
  font: 600 10px/1 Inter, sans-serif;
  color: rgba(245, 220, 165, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.med-gen-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.med-gen-chip {
  padding: 5px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 215, 120, 0.18);
  background: rgba(0, 0, 0, 0.35);
  color: rgba(245, 220, 165, 0.75);
  font: 500 10px/1 Inter, sans-serif;
  cursor: pointer;
  transition: all 120ms ease;
}
.med-gen-chip:hover {
  border-color: rgba(255, 215, 120, 0.4);
  color: #fff0be;
}
.med-gen-chip.is-selected {
  background: linear-gradient(135deg, rgba(90, 62, 20, 0.85), rgba(50, 36, 12, 0.95));
  border-color: rgba(255, 215, 120, 0.65);
  color: #fff0be;
  box-shadow: inset 0 1px 0 rgba(255, 235, 166, 0.25);
}
.med-gen-input,
.med-gen-select {
  width: 100%;
  padding: 7px 9px;
  border-radius: 8px;
  border: 1px solid rgba(255, 215, 120, 0.25);
  background: rgba(10, 8, 4, 0.75);
  color: #fff0bf;
  font: 400 11px/1.3 Inter, sans-serif;
  box-sizing: border-box;
}
.med-gen-input:focus,
.med-gen-select:focus {
  outline: none;
  border-color: #ffd875;
}
.med-gen-quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 3px;
}
.med-quick-tag {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(255, 215, 120, 0.08);
  border: 1px solid rgba(255, 215, 120, 0.15);
  color: rgba(245, 220, 165, 0.7);
  font: 400 9px/1 Inter, sans-serif;
  cursor: pointer;
}
.med-quick-tag:hover {
  background: rgba(255, 215, 120, 0.2);
  color: #fff0be;
}
.med-btn-start-gen {
  margin-top: 2px;
}

.med-library-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  max-height: 52vh;
  padding-right: 4px;
  overscroll-behavior: contain;
}
.med-library-list::-webkit-scrollbar {
  width: 4px;
}
.med-library-list::-webkit-scrollbar-thumb {
  background: rgba(255, 215, 120, 0.25);
  border-radius: 4px;
}

.med-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 215, 120, 0.2);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(35, 26, 12, 0.7), rgba(16, 13, 7, 0.85));
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: all 160ms ease;
}
.med-card:hover {
  border-color: rgba(255, 215, 120, 0.4);
}
.med-card.is-active-track {
  border-color: #ffd875;
  box-shadow: 0 0 14px rgba(255, 200, 70, 0.25), inset 0 1px 0 rgba(255, 235, 166, 0.2);
}
.med-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.med-card__top-badges {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.med-card__title-box {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}
.med-card__title {
  margin: 0;
  color: #fff0bf;
  font: 600 13px/1.3 Inter, sans-serif;
}
.med-card__creator-meta {
  font: 500 10.5px/1.3 Inter, sans-serif;
  color: rgba(147, 197, 253, 0.9);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  margin: 1px 0 2px;
  letter-spacing: 0.01em;
}
.med-card__creator-text {
  min-width: 0;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.med-card__creator-meta strong {
  color: #bfdbfe;
  font-weight: 600;
}
.med-card__gen-time {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fde68a;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  flex-shrink: 0;
}
.med-chip--creator {
  color: #93c5fd !important;
  background: rgba(30, 58, 138, 0.25) !important;
  border-color: rgba(147, 197, 253, 0.35) !important;
  font-size: 9.5px !important;
}
.med-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border-radius: 8px;
  font: 700 9px/1 Inter, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.med-badge--new {
  background: rgba(255, 215, 120, 0.2);
  color: #ffe599;
  border: 1px solid rgba(255, 215, 120, 0.5);
  box-shadow: 0 0 8px rgba(255, 215, 120, 0.2);
}
.med-badge--old {
  background: rgba(140, 130, 115, 0.18);
  color: #c4baab;
  border: 1px solid rgba(140, 130, 115, 0.3);
}
.med-badge--tier-free {
  background: rgba(80, 200, 120, 0.15);
  color: #98e8af;
  border: 1px solid rgba(80, 200, 120, 0.45);
}
.med-badge--tier-standart {
  background: rgba(255, 195, 60, 0.2);
  color: #ffdf85;
  border: 1px solid rgba(255, 195, 60, 0.55);
}
.med-badge--tier-plus {
  background: linear-gradient(135deg, rgba(220, 110, 255, 0.25), rgba(255, 180, 50, 0.25));
  color: #ffe6ff;
  border: 1px solid rgba(235, 150, 255, 0.6);
  box-shadow: 0 0 8px rgba(220, 110, 255, 0.25);
}
.med-gen-chips--tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.med-gen-chip--tier {
  padding: 7px 8px;
  text-align: left;
  display: flex;
  flex-direction: column;
}
.tier-chip-title {
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.02em;
}
.tier-chip-sub {
  font-size: 8px;
  line-height: 1.15;
  opacity: 0.72;
  margin-top: 3px;
}

.med-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.med-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 215, 120, 0.12);
  color: rgba(245, 225, 185, 0.85);
  font: 500 10px/1 Inter, sans-serif;
}

.med-card__player-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(8, 6, 3, 0.5);
  border: 1px solid rgba(255, 215, 120, 0.1);
}
.med-play-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 215, 120, 0.5);
  background: linear-gradient(135deg, rgba(80, 56, 18, 0.9), rgba(35, 26, 10, 0.95));
  color: #fff0be;
  cursor: pointer;
  transition: all 140ms ease;
  flex-shrink: 0;
}
.med-play-btn svg {
  width: 14px;
  height: 14px;
}
.med-play-btn:hover {
  transform: scale(1.06);
  border-color: #ffd875;
}
.med-player-track {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.med-player-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}
.med-player-bar-fill {
  width: 0%;
  height: 100%;
  background: #f5c15a;
  transition: width 100ms linear;
}
.med-player-time {
  display: flex;
  justify-content: space-between;
  font: 400 9px/1 Inter, sans-serif;
  color: rgba(245, 220, 165, 0.6);
}

.med-card__actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.med-card__subactions {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}
.med-btn-select {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 215, 120, 0.35);
  background: rgba(255, 215, 120, 0.1);
  color: #fff0be;
  font: 600 11px/1 Inter, sans-serif;
  cursor: pointer;
  transition: all 140ms ease;
}
.med-btn-select:hover {
  background: rgba(255, 215, 120, 0.22);
  border-color: #ffd875;
}
.med-btn-select.is-selected {
  background: rgba(80, 200, 120, 0.2);
  border-color: rgba(80, 200, 120, 0.6);
  color: #88ffb0;
}
.med-btn-status-toggle {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px 9px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.3);
  color: rgba(245, 220, 165, 0.7);
  font: 500 10px/1 Inter, sans-serif;
  cursor: pointer;
  transition: all 140ms ease;
}
.med-btn-status-toggle:hover {
  color: #fff0be;
  border-color: rgba(255, 215, 120, 0.3);
}
.med-btn-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 90, 90, 0.3);
  background: rgba(220, 40, 40, 0.12);
  color: #ff9494;
  font: 500 10px/1 Inter, sans-serif;
  cursor: pointer;
  transition: all 140ms ease;
}
.med-btn-delete:hover {
  background: rgba(220, 40, 40, 0.25);
  border-color: rgba(255, 90, 90, 0.6);
  color: #ffb3b3;
}

.med-library-loading,
.med-library-empty {
  padding: 24px 16px;
  text-align: center;
  color: rgba(245, 220, 165, 0.7);
  font: 400 13px/1.4 Inter, sans-serif;
}

/* Meditation Download to Telegram Bot Button Styles */
.med-card__primary-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.med-btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 215, 120, 0.45);
  background: linear-gradient(135deg, rgba(85, 60, 20, 0.85), rgba(30, 22, 10, 0.95));
  color: #fff1be;
  font: 600 11px/1 Inter, sans-serif;
  cursor: pointer;
  white-space: nowrap;
  transition: all 140ms ease;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 235, 166, 0.2);
}

.med-btn-download:hover {
  background: linear-gradient(135deg, rgba(115, 80, 25, 0.95), rgba(45, 32, 15, 0.98));
  border-color: #ffd875;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(245, 180, 51, 0.4);
}

.med-btn-download:active {
  transform: scale(0.97);
}

.med-btn-download.is-loading {
  opacity: 0.65;
  pointer-events: none;
}

.med-btn-download svg {
  width: 13px;
  height: 13px;
  color: #ffd875;
  flex-shrink: 0;
}

.player-btn--download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 215, 120, 0.5) !important;
  background: linear-gradient(135deg, rgba(75, 52, 18, 0.9), rgba(28, 20, 8, 0.98)) !important;
  color: #ffd875 !important;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 235, 166, 0.25) !important;
  transition: all 160ms ease;
}

.player-btn--download:hover {
  border-color: #ffd875 !important;
  background: linear-gradient(135deg, rgba(105, 75, 24, 0.95), rgba(38, 28, 12, 1)) !important;
  color: #ffffff !important;
  transform: scale(1.06);
}

.player-btn--download:active {
  transform: scale(0.96);
}

.player-btn--download.is-loading {
  opacity: 0.65;
  pointer-events: none;
}

.player-btn--download svg {
  width: 18px;
  height: 18px;
  color: inherit;
}

/* ==========================================================================
   ORA Entrance Preloader (Meditative Intertwining Wave Animation)
   ========================================================================== */
.app-preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: radial-gradient(circle at 50% 45%, #181308 0%, #0c0a06 45%, #050402 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              visibility 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  user-select: none;
  -webkit-user-select: none;
  pointer-events: auto;
}

.app-preloader.is-loaded {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.04);
  pointer-events: none;
}

.preloader-glow {
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239, 182, 62, 0.22) 0%, rgba(200, 130, 30, 0.08) 45%, transparent 70%);
  filter: blur(28px);
  animation: preloaderAuraPulse 4s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes preloaderAuraPulse {
  0% { transform: scale(0.85); opacity: 0.55; }
  100% { transform: scale(1.2); opacity: 0.95; }
}

.preloader-stage {
  position: relative;
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preloader-waves-svg {
  position: absolute;
  inset: -20px;
  width: calc(100% + 40px);
  height: calc(100% + 40px);
  pointer-events: none;
  overflow: visible;
  z-index: 1;
}

.preloader-waves-svg--front {
  z-index: 3;
}

.wave-ring-1 {
  transform-origin: 160px 160px;
  animation: preloaderRotateRing1 12s linear infinite;
}

.wave-ring-2 {
  transform-origin: 160px 160px;
  animation: preloaderRotateRing2 16s linear infinite reverse;
}

.wave-ring-3 {
  transform-origin: 160px 160px;
  animation: preloaderPulseRing3 6s ease-in-out infinite alternate;
}

@keyframes preloaderRotateRing1 {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.04); }
  100% { transform: rotate(360deg) scale(1); }
}

@keyframes preloaderRotateRing2 {
  0% { transform: rotate(0deg) scale(1.03); }
  50% { transform: rotate(180deg) scale(0.97); }
  100% { transform: rotate(360deg) scale(1.03); }
}

@keyframes preloaderPulseRing3 {
  0% { transform: rotate(0deg) scale(0.94); opacity: 0.4; }
  50% { transform: rotate(45deg) scale(1.06); opacity: 0.85; }
  100% { transform: rotate(90deg) scale(0.96); opacity: 0.5; }
}

.wave-flow-1 {
  stroke-dasharray: 80 160;
  animation: preloaderWaveFlow1 4s linear infinite;
}

.wave-flow-2 {
  stroke-dasharray: 100 140;
  animation: preloaderWaveFlow2 5s linear infinite;
}

.wave-flow-3 {
  stroke-dasharray: 60 180;
  animation: preloaderWaveFlow3 4.5s linear infinite reverse;
}

@keyframes preloaderWaveFlow1 {
  0% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -480; }
}

@keyframes preloaderWaveFlow2 {
  0% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 480; }
}

@keyframes preloaderWaveFlow3 {
  0% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -480; }
}

.preloader-logo-wrap {
  position: relative;
  z-index: 2;
  width: 175px;
  height: 175px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: preloaderLogoBreathing 3.6s ease-in-out infinite;
}

.preloader-logo-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 14px rgba(255, 191, 62, 0.42)) drop-shadow(0 0 28px rgba(246, 189, 74, 0.25));
}

@keyframes preloaderLogoBreathing {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 2px 14px rgba(255, 191, 62, 0.4)) drop-shadow(0 0 22px rgba(246, 189, 74, 0.2));
  }
  50% {
    transform: scale(1.045);
    filter: drop-shadow(0 3px 20px rgba(255, 203, 91, 0.65)) drop-shadow(0 0 35px rgba(246, 189, 74, 0.45));
  }
}

.preloader-shimmer {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 30% 30%, rgba(255, 255, 255, 0.35) 0%, rgba(255, 230, 160, 0.15) 35%, transparent 65%);
  mix-blend-mode: overlay;
  pointer-events: none;
  animation: preloaderShimmerSweep 4.5s ease-in-out infinite;
}

@keyframes preloaderShimmerSweep {
  0% { transform: rotate(0deg) scale(0.9); opacity: 0.3; }
  50% { transform: rotate(180deg) scale(1.1); opacity: 0.7; }
  100% { transform: rotate(360deg) scale(0.9); opacity: 0.3; }
}

.preloader-meta {
  position: relative;
  z-index: 4;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.preloader-text {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ebd197;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9), 0 0 12px rgba(246, 189, 74, 0.28);
  animation: preloaderTextPulse 2.8s ease-in-out infinite alternate;
}

@keyframes preloaderTextPulse {
  0% { opacity: 0.65; transform: translateY(0); }
  100% { opacity: 1; transform: translateY(-1px); }
}

.preloader-progress-track {
  width: 180px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 230, 160, 0.14);
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6), 0 0 8px rgba(0, 0, 0, 0.4);
}

.preloader-progress-indicator {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0%;
  border-radius: 4px;
  background: linear-gradient(90deg, #d4932c 0%, #f6c253 70%, #fff3cf 100%);
  box-shadow: 0 0 10px rgba(246, 194, 83, 0.8);
  transition: width 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.preloader-progress-indicator::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.65) 50%, transparent 100%);
  animation: preloaderSweep 1.6s ease-in-out infinite;
}

@keyframes preloaderSweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.preloader-percent {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(246, 215, 148, 0.9);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  min-width: 38px;
  font-variant-numeric: tabular-nums;
}

/* Menu Tier Switcher (Suno V6 / Grok Voice) */
.menu-tier-box {
  margin: 18px 0 14px;
  padding: 12px;
  background: rgba(255, 230, 151, 0.05);
  border: 1px solid rgba(249, 195, 76, 0.28);
  border-radius: 14px;
}
.menu-tier-box__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.menu-tier-box__title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #e8d3a3;
}
.menu-tier-box__active-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.25);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.4);
}
.menu-tier-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.menu-tier-card {
  background: rgba(20, 15, 6, 0.65);
  border: 1.5px solid rgba(249, 195, 76, 0.2);
  border-radius: 10px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}
.menu-tier-card:hover {
  background: rgba(255, 230, 151, 0.08);
  border-color: rgba(249, 195, 76, 0.45);
}
.menu-tier-card.is-active {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.16);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.15);
}
.menu-tier-card[data-tier="grok"].is-active {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.14);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.15);
}
.menu-tier-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.menu-tier-card__badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 6px;
}
.badge-suno { background: rgba(245, 158, 11, 0.3); color: #fef08a; }
.badge-grok { background: rgba(56, 189, 248, 0.25); color: #bae6fd; }
.badge-local { background: rgba(167, 139, 250, 0.22); color: #ddd6fe; }
.menu-tier-card[data-tier="ora_local"].is-active {
  border-color: #a78bfa;
  background: rgba(167, 139, 250, 0.14);
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.15);
}
#localVoiceStatus { margin: 0; }
.menu-tier-card__price {
  font-size: 11px;
  flex-shrink: 0;
  font-weight: 700;
  color: #6ee7b7;
}
.menu-tier-card__name {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}
.menu-tier-card__sub {
  display: block;
  font-size: 11px;
  color: #d1d5db;
  line-height: 1.3;
}

/* ==========================================================================
   Player Like Button & Favorites Modal (Project Bible Sections 6, 20 & 22)
   ========================================================================== */
.player-btn--like {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 215, 120, 0.5) !important;
  background: linear-gradient(135deg, rgba(75, 52, 18, 0.9), rgba(28, 20, 8, 0.98)) !important;
  color: #ffd875 !important;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 235, 166, 0.25) !important;
  transition: all 160ms ease;
}
.player-btn--like:hover {
  border-color: #ffd875 !important;
  background: linear-gradient(135deg, rgba(105, 75, 24, 0.95), rgba(38, 28, 12, 1)) !important;
  color: #ff6b81 !important;
  transform: scale(1.06);
}
.player-btn--like:active {
  transform: scale(0.96);
}
.player-btn--like.is-liked {
  border-color: #ff6b81 !important;
  background: linear-gradient(135deg, rgba(140, 30, 50, 0.92), rgba(60, 15, 25, 0.98)) !important;
  color: #ff6b81 !important;
  box-shadow: 0 0 16px rgba(255, 107, 129, 0.4), inset 0 1px 0 rgba(255, 200, 210, 0.4) !important;
}
.player-btn--like svg {
  width: 19px;
  height: 19px;
  color: inherit;
  transition: fill 160ms ease;
}
.player-btn--like.is-liked svg {
  fill: #ff6b81;
}

/* Favorites Modal & Cards */
.favorites-modal {
  max-height: 80% !important;
  display: flex !important;
  flex-direction: column !important;
}
.favorites-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}
.fav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(249, 195, 76, 0.3);
  background: linear-gradient(135deg, rgba(35, 26, 12, 0.85), rgba(18, 13, 6, 0.95));
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: border-color 0.18s ease;
}
.fav-item:hover {
  border-color: rgba(249, 195, 76, 0.65);
}
.fav-item-info {
  flex: 1 1 auto;
  min-width: 0;
}
.fav-item-title {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: #fff0bd;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}
.fav-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #c5a86d;
}
.fav-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.fav-play-btn {
  padding: 7px 12px;
  border-radius: 9px;
  border: 1px solid rgba(249, 195, 76, 0.6);
  background: linear-gradient(135deg, #fff0af, #edb748 60%, #a66b1f);
  color: #171006;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.fav-play-btn:hover {
  transform: scale(1.04);
  box-shadow: 0 0 10px rgba(245, 180, 51, 0.4);
}
.fav-remove-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 107, 129, 0.4);
  background: rgba(45, 15, 20, 0.6);
  color: #ff6b81;
  cursor: pointer;
  transition: all 0.15s ease;
}
.fav-remove-btn:hover {
  background: rgba(140, 30, 50, 0.8);
  color: #ffffff;
}
.fav-empty-state {
  text-align: center;
  padding: 30px 16px;
  color: #d1b884;
}
.fav-empty-state svg {
  width: 44px;
  height: 44px;
  color: rgba(249, 195, 76, 0.4);
  margin-bottom: 12px;
}
.fav-empty-state p {
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

/* МАК-карта дня (Проективная колода ORA) */
.mak-resource-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mak-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mak-card-tag {
  font-size: 10px;
  color: #f59e0b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.mak-card-body {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: radial-gradient(circle at 20% 50%, rgba(55, 40, 16, 0.9), rgba(18, 14, 6, 0.95));
  border: 1px solid rgba(251, 199, 81, 0.3);
}
.mak-card-symbol {
  font-size: 26px;
  color: #ffd875;
  text-shadow: 0 0 12px rgba(245, 180, 51, 0.6);
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}
.mak-card-prompt {
  font-size: 13.5px;
  font-style: italic;
  color: #fff0bd;
  line-height: 1.45;
  margin: 0;
}
.mak-reflection-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.mak-reflection-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(249, 195, 76, 0.35);
  background: rgba(8, 6, 3, 0.6);
  color: #fff0c2;
  font-size: 13px;
  font-family: inherit;
  resize: none;
}
.mak-reflection-input:focus {
  outline: none;
  border-color: #ffd875;
  box-shadow: 0 0 0 2px rgba(245, 180, 51, 0.2);
}
.mak-reflection-actions {
  display: flex;
  gap: 8px;
}
.mak-save-btn {
  flex: 1;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(249, 195, 76, 0.6);
  background: linear-gradient(135deg, rgba(239, 182, 62, 0.35), rgba(75, 52, 18, 0.8));
  color: #fff0bd;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.mak-save-btn:hover {
  background: linear-gradient(135deg, rgba(239, 182, 62, 0.55), rgba(105, 75, 24, 0.95));
  color: #ffffff;
}

/* ============================================================
   МУДРА ПРАКТИКИ (Раздел 38.2 Библии проекта & mudras.md)
   ============================================================ */
.player-btn--mudra {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(30, 22, 10, 0.85);
  border: 1.5px solid rgba(246, 194, 83, 0.5);
  color: #fff0bd;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}
.player-btn--mudra:hover,
.player-btn--mudra:active {
  transform: scale(1.06);
  border-color: #ffd875;
  box-shadow: 0 0 16px rgba(245, 180, 51, 0.4);
}
.player-btn--mudra.is-active {
  border-color: #ffe082;
  background: rgba(80, 55, 18, 0.9);
  box-shadow: 0 0 18px rgba(255, 215, 105, 0.55);
}
.player-icon-mudra {
  font-size: 18px;
  line-height: 1;
}

.practice-mudra-card {
  position: absolute;
  z-index: 45;
  bottom: 248px;
  left: 18px;
  right: 18px;
  background: linear-gradient(160deg, rgba(26, 19, 8, 0.98), rgba(12, 9, 4, 0.99)) !important;
  border: 1.5px solid rgba(255, 215, 120, 0.75) !important;
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.95), 0 0 28px rgba(246, 194, 83, 0.35) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 13px 15px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  box-sizing: border-box;
  opacity: 1 !important;
  filter: none !important;
}
.practice-mudra-card[hidden] {
  display: none !important;
}
.practice-mudra-card.is-collapsed {
  padding: 9px 15px;
}
.practice-mudra-card.is-collapsed .practice-mudra-card__body {
  display: none;
}
.practice-mudra-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.practice-mudra-card__title {
  font-size: 14px;
  font-weight: 700;
  color: #fff6d9 !important;
  font-family: "ORA Serif", Georgia, serif;
  display: flex;
  align-items: center;
  gap: 7px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95);
  letter-spacing: 0.01em;
}
.practice-mudra-card__controls {
  display: flex;
  align-items: center;
  gap: 5px;
}
.practice-mudra-btn-toggle,
.practice-mudra-btn-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 215, 120, 0.35);
  color: #fff0be !important;
  font-size: 13px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.practice-mudra-btn-toggle:hover,
.practice-mudra-btn-close:hover {
  background: rgba(246, 194, 83, 0.35);
  color: #ffffff !important;
  border-color: rgba(255, 215, 120, 0.7);
}
.practice-mudra-card__body {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}
.practice-mudra-card__badge-wrap {
  display: flex;
}
.practice-mudra-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 8px;
  background: rgba(245, 180, 51, 0.28) !important;
  color: #ffe699 !important;
  border: 1px solid rgba(255, 215, 120, 0.6) !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}
.practice-mudra-card__desc {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: #ffffff !important;
  font-weight: 400;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95);
}

/* ============================================================
   СКАЗКА О ТЕБЕ (Разделы 4 и 22 Библии проекта)
   ============================================================ */
.story-custom-card {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(40, 30, 12, 0.75), rgba(16, 13, 6, 0.85));
  border: 1px solid rgba(246, 194, 83, 0.35);
  display: grid;
  gap: 8px;
}
.story-custom-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.story-custom-header strong {
  font-size: 14px;
  color: #fff1c7;
  font-family: "ORA Serif", Georgia, serif;
}
.story-tier-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: linear-gradient(135deg, #f5c45e, #c48b26);
  color: #1a1204;
  letter-spacing: 0.05em;
}
.story-custom-hint {
  margin: 0;
  font-size: 11px;
  color: rgba(255, 237, 195, 0.75);
  line-height: 1.35;
}
.story-input-wrap {
  position: relative;
  display: flex;
}
.story-custom-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 40px 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(246, 194, 83, 0.35);
  background: rgba(10, 8, 4, 0.65);
  color: #fff0bd;
  font-size: 12px;
  resize: none;
  font-family: inherit;
}
.story-custom-textarea:focus {
  outline: none;
  border-color: #ffd875;
  box-shadow: 0 0 0 2px rgba(245, 180, 51, 0.25);
}
.story-mic-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(246, 194, 83, 0.2);
  border: 1px solid rgba(246, 194, 83, 0.4);
  color: #ffe7a5;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.story-mic-btn:hover {
  background: rgba(246, 194, 83, 0.35);
  color: #ffffff;
}
.story-mic-btn.is-recording {
  background: rgba(239, 68, 68, 0.85);
  border-color: #f87171;
  color: #ffffff;
  animation: pulse-glow 1.2s infinite;
}
.story-custom-generate-btn {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(246, 194, 83, 0.6);
  background: linear-gradient(135deg, rgba(245, 196, 94, 0.4), rgba(95, 68, 22, 0.85));
  color: #fff2c4;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.story-custom-generate-btn:hover {
  background: linear-gradient(135deg, rgba(245, 196, 94, 0.6), rgba(125, 88, 28, 0.95));
  color: #ffffff;
}

/* ============================================================
   БАЛАНС И ТОКЕНЫ (Разделы 4, 11, 24, 25 Библии проекта)
   ============================================================ */
.balance-card {
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(45, 34, 14, 0.85), rgba(15, 12, 6, 0.92));
  border: 1px solid rgba(246, 194, 83, 0.35);
  display: grid;
  gap: 10px;
  margin-top: 10px;
}
.balance-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.balance-card__label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 237, 195, 0.7);
}
.balance-card__tier {
  font-size: 15px;
  color: #f5c45e;
  font-family: "ORA Serif", Georgia, serif;
}
.balance-card__credits {
  text-align: right;
}
.balance-card__amount {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: #fff1c7;
  font-family: "ORA Serif", Georgia, serif;
  line-height: 1;
}
.balance-card__unit {
  display: block;
  font-size: 10px;
  color: rgba(255, 237, 195, 0.7);
}
.balance-card__info {
  margin: 0;
  font-size: 10.5px;
  color: rgba(255, 237, 195, 0.75);
  line-height: 1.35;
  border-top: 1px solid rgba(246, 194, 83, 0.15);
  padding-top: 8px;
}
.balance-tabs {
  display: flex;
  gap: 6px;
  margin: 12px 0 8px;
}
.balance-tab {
  flex: 1;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(246, 194, 83, 0.25);
  background: rgba(18, 14, 8, 0.6);
  color: rgba(255, 237, 195, 0.7);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.balance-tab.is-active {
  background: rgba(245, 180, 51, 0.25);
  border-color: rgba(246, 194, 83, 0.6);
  color: #fff1c7;
}
.token-expenses-list {
  display: grid;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 2px;
}
.token-expense-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(246, 194, 83, 0.18);
}
.token-expense-item__action {
  font-size: 12px;
  font-weight: 600;
  color: #fff0bd;
}
.token-expense-item__meta {
  display: block;
  font-size: 10px;
  color: rgba(255, 237, 195, 0.6);
  margin-top: 2px;
}
.token-expense-item__cost {
  font-size: 13px;
  font-weight: 700;
  color: #f59e0b;
}
.tiers-pricing-list {
  display: grid;
  gap: 8px;
}
.tier-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(18, 14, 8, 0.7);
  border: 1px solid rgba(246, 194, 83, 0.25);
}
.tier-price-row.is-recommended {
  border-color: #f5c45e;
  background: linear-gradient(135deg, rgba(48, 36, 15, 0.85), rgba(22, 17, 8, 0.95));
}
.tier-price-row strong {
  display: block;
  font-size: 12.5px;
  color: #fff1c7;
}
.tier-price-row small {
  display: block;
  font-size: 10px;
  color: #f5c45e;
}
.tier-desc {
  font-size: 11px;
  color: rgba(255, 237, 195, 0.75);
  text-align: right;
  max-width: 140px;
}

/* ============================================================
   ГОРИЗОНТЫ ЦЕЛЕЙ & МИКРОФОН ДНЕВНИКА
   ============================================================ */
.goal-horizon-chips {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}
.goal-horizon-chip {
  flex: 1;
  padding: 6px 4px;
  border-radius: 8px;
  border: 1px solid rgba(246, 194, 83, 0.25);
  background: rgba(18, 14, 8, 0.6);
  color: rgba(255, 237, 195, 0.7);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}
.goal-horizon-chip.is-selected {
  background: rgba(245, 180, 51, 0.25);
  border-color: rgba(246, 194, 83, 0.6);
  color: #fff1c7;
}

.diary-mic-btn {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(246, 194, 83, 0.2);
  border: 1px solid rgba(246, 194, 83, 0.4);
  color: #ffe7a5;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.diary-mic-btn:hover {
  background: rgba(246, 194, 83, 0.35);
  color: #ffffff;
}
.diary-mic-btn.is-recording {
  background: rgba(239, 68, 68, 0.85);
  border-color: #f87171;
  color: #ffffff;
  animation: pulse-glow 1.2s infinite;
}

/* ==========================================================================
   Модуль «Сновидения» (Юнгианский анализ снов по Карлу Юнгу)
   ========================================================================== */

.dreams-modal {
  max-width: 520px;
  width: 92%;
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 20px;
  background: rgba(18, 18, 24, 0.96);
  border: 1px solid rgba(246, 194, 83, 0.35);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.75), 0 0 24px rgba(246, 194, 83, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #f3f4f6;
  padding: 24px 20px;
}

.dream-resource-card {
  border-color: rgba(168, 85, 247, 0.35) !important;
  background: linear-gradient(135deg, rgba(30, 22, 45, 0.85) 0%, rgba(18, 14, 28, 0.85) 100%) !important;
}

.dream-resource-card .mak-card-tag {
  background: rgba(168, 85, 247, 0.25);
  color: #e9d5ff;
  border-color: rgba(168, 85, 247, 0.45);
}

.dreams-tabs {
  display: flex;
  gap: 8px;
  margin: 16px 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
}

.dreams-tab {
  flex: 1;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.dreams-tab.is-active {
  background: rgba(246, 194, 83, 0.18);
  border-color: rgba(246, 194, 83, 0.55);
  color: #fff1c7;
}

.dreams-history-count {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #d1d5db;
}

.dreams-tab.is-active .dreams-history-count {
  background: rgba(246, 194, 83, 0.35);
  color: #ffffff;
}

.dream-input-box {
  margin-bottom: 16px;
}

.dream-input-label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #d1d5db;
  margin-bottom: 6px;
  font-weight: 600;
}

.dream-textarea-wrap {
  position: relative;
  width: 100%;
}

.dream-textarea {
  width: 100%;
  box-sizing: border-box;
  background: rgba(10, 10, 15, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 12px 42px 12px 14px;
  font-size: 14px;
  line-height: 1.5;
  color: #f3f4f6;
  resize: vertical;
  min-height: 96px;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dream-textarea:focus {
  outline: none;
  border-color: rgba(246, 194, 83, 0.65);
  box-shadow: 0 0 0 2px rgba(246, 194, 83, 0.2);
}

.dream-mic-btn {
  position: absolute;
  right: 10px;
  bottom: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(246, 194, 83, 0.22);
  border: 1px solid rgba(246, 194, 83, 0.45);
  color: #ffe7a5;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dream-mic-btn:hover {
  background: rgba(246, 194, 83, 0.38);
  color: #ffffff;
}

.dream-mic-btn.is-recording {
  background: rgba(239, 68, 68, 0.9);
  border-color: #f87171;
  color: #ffffff;
  animation: pulse-glow 1.2s infinite;
}

.dream-emotions-section {
  margin-bottom: 16px;
}

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

.dream-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 6px 11px;
  font-size: 12px;
  color: #d1d5db;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dream-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.dream-chip.is-selected {
  background: rgba(246, 194, 83, 0.22);
  border-color: rgba(246, 194, 83, 0.6);
  color: #fff1c7;
  font-weight: 500;
}

.dream-options-row {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.dream-option-col {
  flex: 1;
}

.dream-select {
  width: 100%;
  background: rgba(10, 10, 15, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 13px;
  color: #f3f4f6;
  outline: none;
}

.dream-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.dream-analyze-btn {
  width: 100%;
  background: linear-gradient(135deg, #f6c253 0%, #d49a24 100%);
  color: #1a1204;
  border: none;
  border-radius: 14px;
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(246, 194, 83, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dream-analyze-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(246, 194, 83, 0.45);
}

.dream-cost-hint {
  font-size: 11px;
  color: #9ca3af;
}

/* Loading state */
.dreams-loading-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 16px;
  text-align: center;
}

.dreams-loader-spinner {
  position: relative;
  width: 72px;
  height: 72px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dreams-loader-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(246, 194, 83, 0.15);
  border-top-color: #f6c253;
  animation: spin 1.4s linear infinite;
}

.dreams-loader-symbol {
  font-size: 26px;
  animation: pulse-glow 2s ease-in-out infinite;
}

.dreams-loading-title {
  font-size: 16px;
  color: #fff1c7;
  margin-bottom: 8px;
}

.dreams-loading-sub {
  font-size: 13px;
  color: #9ca3af;
  max-width: 360px;
  font-style: italic;
  line-height: 1.4;
}

/* Result view */
.dream-result-summary {
  background: rgba(246, 194, 83, 0.08);
  border: 1px solid rgba(246, 194, 83, 0.25);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.dream-result-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.dream-result-tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(246, 194, 83, 0.2);
  color: #f6c253;
  font-weight: 600;
}

.dream-result-emotions {
  font-size: 11px;
  color: #d1d5db;
}

.dream-result-quote {
  font-size: 13px;
  line-height: 1.45;
  color: #e5e7eb;
  font-style: italic;
  margin: 0;
}

.dream-steps-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.dream-step-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 14px;
  transition: border-color 0.2s ease;
}

.dream-step-card:hover {
  border-color: rgba(246, 194, 83, 0.3);
}

.dream-step-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.dream-step-badge {
  font-size: 11px;
  font-weight: 700;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(246, 194, 83, 0.2);
  color: #f6c253;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dream-step-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff1c7;
}

.dream-step-body {
  font-size: 13px;
  line-height: 1.55;
  color: #d1d5db;
  white-space: pre-line;
}

.dream-recommended-practice {
  background: linear-gradient(135deg, rgba(246, 194, 83, 0.12) 0%, rgba(212, 154, 36, 0.08) 100%);
  border: 1px solid rgba(246, 194, 83, 0.35);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 16px;
}

.dream-practice-header {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #f6c253;
  font-size: 13px;
  margin-bottom: 4px;
}

#dreamPracticeDesc {
  font-size: 13px;
  color: #f3f4f6;
  margin: 0 0 10px;
  line-height: 1.4;
}

.dream-start-practice-btn {
  background: rgba(246, 194, 83, 0.22);
  border: 1px solid rgba(246, 194, 83, 0.5);
  border-radius: 10px;
  color: #fff1c7;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.dream-start-practice-btn:hover {
  background: rgba(246, 194, 83, 0.35);
  color: #ffffff;
}

.dream-result-actions {
  display: flex;
  gap: 10px;
}

.dream-btn-secondary,
.dream-btn-outline {
  flex: 1;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dream-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f3f4f6;
}

.dream-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
}

.dream-btn-outline {
  background: transparent;
  border: 1px solid rgba(246, 194, 83, 0.35);
  color: #ffe7a5;
}

.dream-btn-outline:hover {
  background: rgba(246, 194, 83, 0.15);
}

/* History view */
.dreams-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 55vh;
  overflow-y: auto;
}

.dreams-history-empty {
  text-align: center;
  padding: 32px 16px;
  color: #9ca3af;
  font-size: 13px;
}

.dreams-history-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dreams-history-card:hover {
  border-color: rgba(246, 194, 83, 0.35);
  background: rgba(255, 255, 255, 0.07);
}

.dreams-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.dreams-history-date {
  font-size: 11px;
  color: #9ca3af;
}

.dreams-history-emotions {
  font-size: 11px;
  color: #f6c253;
}

.dreams-history-snippet {
  font-size: 13px;
  color: #e5e7eb;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================================================
   Модуль «Благодарность и Намерения» (Расширенный функционал)
   ========================================================================== */

.gratitude-tabs {
  display: flex;
  gap: 8px;
  margin: 14px 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
}

.gratitude-tab {
  flex: 1;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 500;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.gratitude-tab.is-active {
  background: rgba(246, 194, 83, 0.18);
  border-color: rgba(246, 194, 83, 0.55);
  color: #fff1c7;
}

.gratitude-hint {
  font-size: 13px;
  color: #d1d5db;
  line-height: 1.45;
  margin-bottom: 12px;
}

.gratitude-field-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #f6c253;
  margin-bottom: 6px;
  font-weight: 600;
}

.gratitude-intention-select-wrap {
  margin-bottom: 12px;
}

.gratitude-select {
  width: 100%;
  background: rgba(10, 10, 15, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  color: #f3f4f6;
  outline: none;
}

.gratitude-input-wrap {
  position: relative;
  width: 100%;
  margin-bottom: 14px;
}

.gratitude-textarea {
  width: 100%;
  box-sizing: border-box;
  background: rgba(10, 10, 15, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 12px 42px 12px 14px;
  font-size: 14px;
  line-height: 1.5;
  color: #f3f4f6;
  resize: vertical;
  min-height: 84px;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.gratitude-textarea:focus {
  outline: none;
  border-color: rgba(246, 194, 83, 0.65);
}

.gratitude-mic-btn {
  position: absolute;
  right: 10px;
  bottom: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(246, 194, 83, 0.2);
  border: 1px solid rgba(246, 194, 83, 0.4);
  color: #ffe7a5;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gratitude-mic-btn:hover {
  background: rgba(246, 194, 83, 0.35);
  color: #ffffff;
}

.gratitude-mic-btn.is-recording {
  background: rgba(239, 68, 68, 0.9);
  border-color: #f87171;
  color: #ffffff;
  animation: pulse-glow 1.2s infinite;
}

.gratitude-prompt-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gratitude-prompt-item {
  font-size: 13px;
  line-height: 1.4;
  color: #e5e7eb;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.gratitude-prompt-num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(246, 194, 83, 0.2);
  color: #f6c253;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.gratitude-weekly-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}

.gratitude-weekly-q {
  background: rgba(246, 194, 83, 0.08);
  border: 1px solid rgba(246, 194, 83, 0.2);
  border-radius: 14px;
  padding: 12px 14px;
}

.gratitude-weekly-tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(246, 194, 83, 0.25);
  color: #f6c253;
  font-weight: 700;
  display: inline-block;
  margin-bottom: 6px;
}

.gratitude-weekly-q p {
  font-size: 13px;
  line-height: 1.45;
  color: #fff1c7;
  margin: 0;
  font-weight: 500;
}

/* ==========================================================================
   Модуль «Колесо баланса» (20 сфер жизни)
   ========================================================================== */

.wheel-resource-card {
  border-color: rgba(56, 189, 248, 0.35) !important;
  background: linear-gradient(135deg, rgba(14, 28, 48, 0.85) 0%, rgba(10, 18, 32, 0.85) 100%) !important;
}

.wheel-resource-card .mak-card-tag {
  background: rgba(56, 189, 248, 0.22);
  color: #bae6fd;
  border-color: rgba(56, 189, 248, 0.45);
}

.wheel-modal {
  max-width: 540px;
  width: 92%;
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 20px;
  background: rgba(18, 18, 24, 0.96);
  border: 1px solid rgba(246, 194, 83, 0.35);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.75), 0 0 24px rgba(246, 194, 83, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #f3f4f6;
  padding: 24px 20px;
}

.wheel-categories {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.wheel-category {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
}

.wheel-category-title {
  font-size: 13px;
  color: #fff1c7;
  margin: 0 0 10px;
  font-weight: 600;
}

.wheel-spheres-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wheel-sphere-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wheel-sphere-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #d1d5db;
}

.wheel-sphere-val {
  color: #f6c253;
  font-size: 13px;
  min-width: 18px;
  text-align: right;
}

.wheel-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
  transition: background 0.15s ease;
}

.wheel-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #f6c253;
  cursor: pointer;
  box-shadow: 0 0 6px rgba(246, 194, 83, 0.6);
  transition: transform 0.15s ease;
}

.wheel-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.wheel-result-summary {
  background: rgba(246, 194, 83, 0.08);
  border: 1px solid rgba(246, 194, 83, 0.25);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.wheel-score-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(246, 194, 83, 0.15);
  border: 2px solid rgba(246, 194, 83, 0.5);
  flex-shrink: 0;
  text-align: center;
  padding: 4px;
}

.wheel-score-num {
  font-size: 24px;
  font-weight: 700;
  color: #fff1c7;
  line-height: 1;
}

.wheel-score-badge small {
  font-size: 8px;
  color: #d1d5db;
  text-transform: uppercase;
  margin-top: 2px;
  line-height: 1.1;
}

.wheel-points-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.wheel-point-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wheel-point-tag {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 1px 6px;
  border-radius: 4px;
  width: fit-content;
  font-weight: 700;
}

.wheel-point-tag--strength {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
}

.wheel-point-tag--focus {
  background: rgba(234, 179, 8, 0.2);
  color: #fef08a;
}

.wheel-point-row strong {
  font-size: 13px;
  color: #f3f4f6;
}

.wheel-feedback-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
}

.wheel-feedback-header {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #f6c253;
  font-size: 13px;
  margin-bottom: 8px;
}

.wheel-feedback-text {
  font-size: 13px;
  line-height: 1.55;
  color: #e5e7eb;
  white-space: pre-line;
  margin: 0;
}

.wheel-result-actions {
  display: flex;
  gap: 10px;
}

/* Semantic Diary Classifier Suggestion Banner */
.diary-semantic-suggestion {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(246, 194, 83, 0.12) 0%, rgba(217, 119, 6, 0.08) 100%);
  border: 1px solid rgba(246, 194, 83, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  animation: diarySuggestionSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes diarySuggestionSlideIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.diary-suggestion-content {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.diary-suggestion-icon {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
}

.diary-suggestion-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.diary-suggestion-text strong {
  font-size: 12px;
  color: #fff0bd;
  font-weight: 600;
}

.diary-suggestion-text p {
  font-size: 11px;
  color: rgba(246, 225, 177, 0.82);
  margin: 0;
  line-height: 1.35;
}

.diary-suggestion-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.diary-suggest-action-btn {
  padding: 5px 12px;
  border-radius: 8px;
  background: linear-gradient(135deg, #f6c253 0%, #d97706 100%);
  color: #121008;
  font-size: 11px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}

.diary-suggest-action-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.diary-suggest-action-btn:active {
  transform: translateY(0);
}

.diary-suggest-dismiss-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(246, 225, 177, 0.7);
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
}

.diary-suggest-dismiss-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   Calendar Proactive Prep Banner (Section 8 p. 22, Section 38 p. 6)
   ========================================================================== */
.calendar-prep-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 6px 18px 10px;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(38, 28, 12, 0.92) 0%, rgba(20, 15, 6, 0.88) 100%);
  border: 1px solid rgba(246, 194, 83, 0.38);
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.42), 0 0 12px rgba(246, 194, 83, 0.12);
  animation: calendarPrepFadeIn 0.3s ease-out;
}

@keyframes calendarPrepFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.calendar-prep-banner[hidden] {
  display: none !important;
}

.calendar-prep-banner__icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.calendar-prep-banner__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.calendar-prep-banner__title {
  font-size: 12px;
  font-weight: 600;
  color: #fff0bd;
  line-height: 1.3;
}

.calendar-prep-banner__text {
  font-size: 11px;
  color: rgba(255, 237, 197, 0.85);
  margin: 0;
  line-height: 1.35;
}

.calendar-prep-banner__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
}

.calendar-prep-btn {
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.calendar-prep-btn--tune {
  background: linear-gradient(135deg, #f6c253 0%, #d97706 100%);
  color: #121008;
  border: none;
}

.calendar-prep-btn--tune:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.calendar-prep-btn--dismiss {
  background: transparent;
  color: rgba(255, 237, 197, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.calendar-prep-btn--dismiss:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* ==========================================================================
   Practice Format Switcher in Left Slider Menu (#menuPanel)
   ========================================================================== */
.menu-practice-format {
  margin: 0 0 16px;
  padding: 12px;
  background: rgba(255, 230, 151, 0.05);
  border: 1px solid rgba(249, 195, 76, 0.28);
  border-radius: 14px;
  box-sizing: border-box;
}

.menu-practice-format__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.menu-practice-format__title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #e8d3a3;
}

.menu-practice-format__badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.22);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.38);
}

/* Luxury Segmented Slider Switch */
.menu-segmented-switch {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 38px;
  background: rgba(14, 11, 6, 0.85);
  border: 1px solid rgba(246, 194, 83, 0.28);
  border-radius: 19px;
  padding: 2px;
  box-sizing: border-box;
  overflow: hidden;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.65);
}

.menu-segmented-switch__pill {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 2px;
  width: calc(50% - 2px);
  border-radius: 17px;
  background: linear-gradient(135deg, rgba(246, 194, 83, 0.38) 0%, rgba(180, 110, 20, 0.48) 100%);
  border: 1px solid #f6c253;
  box-shadow: 0 0 12px rgba(246, 194, 83, 0.3), inset 0 1px 0 rgba(255, 241, 180, 0.4);
  transition: transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  z-index: 1;
}

.menu-segmented-switch.is-story .menu-segmented-switch__pill {
  transform: translateX(100%);
}

.menu-segmented-switch__btn {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 100%;
  background: transparent;
  border: 0;
  color: rgba(255, 237, 197, 0.65);
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: color 180ms ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.menu-segmented-switch__btn svg {
  width: 14px;
  height: 14px;
  stroke-width: 2;
  transition: transform 180ms ease, stroke 180ms ease;
}

.menu-segmented-switch__btn.is-active {
  color: #fff4d1;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(246, 194, 83, 0.4);
}

.menu-segmented-switch__btn.is-active svg {
  transform: scale(1.1);
  stroke: #fed679;
}

.menu-format-hint {
  margin-top: 8px;
  font-size: 10px;
  color: rgba(245, 220, 159, 0.7);
  text-align: center;
  line-height: 1.3;
}

.menu-format-label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #f4c25a;
  font-weight: 600;
  margin-bottom: 6px;
}

.menu-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.menu-chip {
  padding: 5px 9px;
  border-radius: 10px;
  background: rgba(20, 16, 7, 0.7);
  border: 1px solid rgba(246, 194, 83, 0.22);
  color: rgba(255, 237, 197, 0.75);
  font-family: inherit;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.menu-chip:hover {
  border-color: rgba(246, 194, 83, 0.45);
  color: #fff;
}

.menu-chip.is-active {
  background: linear-gradient(135deg, rgba(246, 194, 83, 0.28) 0%, rgba(180, 110, 20, 0.32) 100%);
  border-color: #f6c253;
  color: #fff2cc;
  box-shadow: 0 0 8px rgba(246, 194, 83, 0.25);
  font-weight: 600;
}

/* ==========================================================================
   Settings Switches & Toggles
   ========================================================================== */
.settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  margin-top: 10px;
  background: rgba(20, 15, 6, 0.55);
  border: 1px solid rgba(246, 194, 83, 0.18);
  border-radius: 14px;
}

.settings-toggle-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.settings-toggle-info strong {
  font-size: 13px;
  font-weight: 600;
  color: #fff0c6;
}

.settings-toggle-info small {
  font-size: 11px;
  color: rgba(255, 237, 197, 0.65);
  line-height: 1.3;
}

.settings-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.settings-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.settings-switch__slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.16);
  transition: 0.3s;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-switch__slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: #ffeed0;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.settings-switch input:checked + .settings-switch__slider {
  background: linear-gradient(135deg, #f6c253 0%, #d97706 100%);
  border-color: #f6c253;
}

.settings-switch input:checked + .settings-switch__slider::before {
  transform: translateX(20px);
  background-color: #181206;
}

/* ==========================================================================
   Goal Selector & Dropdown Menu Overlay Z-Index & Visibility Fix
   ========================================================================== */
.goal-selector {
  z-index: 9 !important;
}
.goal-selector.is-open {
  z-index: 45 !important;
}
.goal-menu {
  z-index: 50 !important;
  min-width: 220px;
  background: linear-gradient(160deg, rgba(34, 24, 10, 0.98), rgba(15, 11, 5, 0.99)) !important;
  border: 1.5px solid rgba(248, 191, 69, 0.85) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.88), 0 0 28px rgba(238, 175, 51, 0.35) !important;
  padding: 8px !important;
  border-radius: 16px !important;
}
.goal-menu button {
  padding: 10px 14px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #fff4d1 !important;
  border-radius: 10px !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8) !important;
  transition: all 140ms ease !important;
}
.goal-menu button:hover,
.goal-menu button:focus-visible {
  background: rgba(246, 194, 83, 0.24) !important;
  color: #ffffff !important;
}


/* ORA_PLAYER_CONTROLS_UNDER_AVATAR_V1: preserve COD3 layers; anchor controls below the avatar. */
.screen:not([data-meditation-state="idle"]) .dial-player-bar { position: absolute; }

/* ORA_GRATITUDE_LAYOUT_20261019_V1: readable prompts, complete rating and scrollable form. */
#gratitudeModal { top: 12px; bottom: auto; max-height: calc(100% - 24px); gap: 12px; }
#gratitudeModal .modal__eyebrow { padding-right: 32px; line-height: 1.5; }
#gratitudeModal h2 { margin: 0; padding-right: 18px; color: #fff0bf; font: 400 23px/1.2 "ORA Serif", Georgia, serif; }
#gratitudeModal .gratitude-tabs { margin: 0 0 4px; gap: 6px; }
#gratitudeModal .gratitude-tab { min-width: 0; padding: 9px 5px; line-height: 1.35; }
#gratitudeModal .gratitude-prompt-box { padding: 12px; gap: 12px; }
#gratitudeModal .gratitude-prompt-item { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; }
#gratitudeModal .gratitude-prompt-copy { display: grid; gap: 3px; min-width: 0; }
#gratitudeModal .gratitude-prompt-copy strong { color: #fff0bf; }
#gratitudeModal .gratitude-prompt-copy span { line-height: 1.5; }
#gratitudeModal .gratitude-rating-row { display: grid; grid-template-columns: minmax(0, 1fr); justify-content: stretch; width: 100%; gap: 9px; margin: 14px 0; }
#gratitudeModal .rating-chips { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); width: 100%; min-width: 0; gap: 7px; }
#gratitudeModal .rating-chip { width: 100%; min-height: 40px; height: auto; border-radius: 12px; font-size: 14px; }
#gratitudeModal .modal__primary { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 44px; }
#gratitudeModal .gratitude-textarea { box-sizing: border-box; padding-right: 46px; font-size: 14px; line-height: 1.5; }

/* ORA_UI_SOUND_TOGGLE_V1: interface sounds only; independent from meditation audio. */
.ui-sound-toggle { position: absolute; right: 53px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid rgba(242,204,128,.38); color: rgba(247,220,161,.72); background: linear-gradient(145deg,rgba(93,69,32,.42),rgba(17,18,17,.55)); box-shadow: inset 0 1px 0 rgba(255,234,185,.14); cursor: pointer; }
.ui-sound-toggle[aria-pressed="true"] { color: #ffe5a4; border-color: rgba(247,209,121,.75); box-shadow: inset 0 1px 0 rgba(255,234,185,.18),0 0 10px rgba(238,184,78,.15); }
.ui-sound-toggle .sound-waves { display: none; }
.ui-sound-toggle[aria-pressed="true"] .sound-waves { display: inline; }
.ui-sound-toggle[aria-pressed="true"] .sound-muted { display: none; }
.ui-sound-toggle:focus-visible { outline: 2px solid #ffe5a4; outline-offset: 3px; }
