/* Final layout. Source order preserves responsive and state overrides. */
* { box-sizing: border-box; }
html,
body,
button,
input,
select,
textarea,
dialog { font-family: var(--font-apple); }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--ink); font-size: var(--text-body); font-weight: var(--weight-regular); line-height: var(--line-height); }
button,
input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.app-shell { min-height: 100dvh; }
.content { width: min(100%, 520px); margin: 0 auto; padding: calc(100px + env(safe-area-inset-top)) 18px 0; }
.floating-top { position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); width: min(100%, 520px); display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.floating-top button { pointer-events: auto; }
.module-pill { height: 46px; padding: 0 10px 0 8px; display: flex; align-items: center; gap: 5px; color: var(--ink); font-size: var(--text-display); font-weight: var(--weight-bold); }
.module-pill img { width: 22px; height: 22px; object-fit: contain; }
.module-pill img.switcher { width: 14px; height: 20px; margin-left: 1px; }
.account-button { width: 46px; height: 46px; padding: 11px; }
.account-button img { width: 100%; height: 100%; object-fit: contain; }
.hero-card { color: var(--white); padding: 18px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.date-display strong { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.hero-card.today { color: var(--today); }
.hero-card.today .hero-study,
.hero-card.today .hero-study strong { color: var(--today); }
.hero-card.today .hero-study span { opacity: 1; }
.hero-card.today .hero-study { border-bottom-color: var(--today-divider); }
.hero-card h1 { margin: 2px 0 9px; }
.hero-card h1 span { display: block; }
.hero-learning { width: 100%; padding: 4px 10px; background: var(--glass-surface); }
.hero-study { width: 100%; min-height: 29px; border: 0; border-bottom: 1px solid var(--glass-separator); padding: 4px 2px; color: var(--white); background: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; font-size: var(--text-body); font-weight: var(--weight-regular); }
.hero-study:last-child { border-bottom: 0; }
.hero-study span { opacity: .8; }
.hero-study strong { min-width: 0; color: var(--white); font-size: inherit; font-weight: var(--weight-medium); text-align: right; }
.card { background: var(--white); border-radius: 18px; box-shadow: var(--shadow); }
.content > .card,
.content > .two-column { margin-top: 20px; }
.week-card { padding: 22px 16px 20px; display: flex; flex-direction: column; }
.card-title-row { min-height: 26px; display: flex; align-items: center; gap: 8px; }
.card-title-row h2 { margin: 0; }
.week-card h3,
.mini-card h3 { margin: 2px 0 0; font-size: var(--text-body); line-height: var(--line-height); font-weight: var(--weight-bold); }
.muted { color: var(--secondary); }
.small { font-size: var(--text-small); }
.week-card p { margin: 2px 0 0; }
.badge { flex: 0 0 auto; min-width: 42px; min-height: 20px; padding: 2px 6px; background: var(--countdown-bg); color: var(--countdown-text); text-align: center; font-size: var(--text-small); font-weight: var(--weight-medium); line-height: var(--line-height); font-variant-numeric: tabular-nums; }
.badge.is-empty { visibility: hidden; }
.week-events { display: flex; flex-direction: column; gap: 8px; }
.week-event { padding: 0; overflow: hidden; text-align: center; }
.week-event:only-child { padding: 0; display: flex; flex-direction: column; }
.week-event-main { padding: 10px 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.week-event:only-child .week-event-main { padding: 12px 18px 10px; }
.week-event h3 { margin: 0; text-align: center; }
.week-title-line { display: block; }
.week-title-line + .week-title-line { margin-top: 2px; }
.week-meta { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.week-hebrew-date { margin: 0; }
.week-countdown { color: var(--green); }
.week-time-grid { margin-top: 0; overflow: hidden; border-top: 1px solid var(--separator); border-radius: 0; background: var(--soft-green); display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0; }
.week-time-tile { min-width: 0; min-height: 58px; padding: 9px 7px; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.week-time-tile:nth-child(even) { border-left: 1px solid var(--separator); }
.week-time-tile:nth-child(n + 3) { border-top: 1px solid var(--separator); }
.week-time-tile span { font-weight: 600; }
.week-time-tile strong { color: var(--blue); font-weight: var(--weight-medium); font-variant-numeric: tabular-nums; white-space: nowrap; }
.week-event:only-child .week-time-grid { margin-top: 0; }
.week-time-tile:last-child:nth-child(odd) { grid-column: 1 / -1; align-items: center; text-align: center; }
.week-time-tile:last-child:nth-child(odd) { border-left: 0; }
.list-card { padding: 12px 16px; }
.text-action { border: 0; padding: 5px 0 5px 10px; color: var(--blue); background: none; }
#holidays-list { display: grid; gap: 8px; margin-top: 12px; }
.appointment-tabs { min-width: 0; margin-top: 10px; overflow: hidden; display: flex; justify-content: flex-start; gap: 7px; }
.appointment-tabs.is-spread { justify-content: space-between; }
.appointment-tab { flex: 0 0 auto; border: 0; color: var(--blue); background: var(--soft-blue); font-size: var(--text-body); font-weight: var(--weight-medium); line-height: var(--line-height); display: flex; align-items: center; justify-content: center; }
.appointment-tab-label { min-width: 0; }
.appointment-tab[aria-selected="true"] { color: var(--white); background: var(--brand-gradient); }
.appointment-tab[hidden] { display: none; }
.holiday-detail { min-width: 0; }
.holiday-item { min-height: 56px; padding: 7px 8px; background: var(--soft-blue); }
.holiday-compact-range { min-height: 42px; padding: 7px 6px; display: grid; place-items: center; color: var(--secondary); font-size: var(--text-body); font-weight: var(--weight-medium); line-height: var(--line-height); text-align: center; font-variant-numeric: tabular-nums; }
.holiday-item.active .holiday-compact-range { color: var(--white); }
.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: stretch; }
.mini-card { min-width: 0; min-height: 150px; padding: 14px; display: flex; flex-direction: column; align-items: stretch; }
.mini-card > strong { display: block; font-size: var(--text-body); font-weight: var(--weight-medium); margin-top: 8px; }
.mini-card > strong + strong { margin-top: 4px; }
.rosh-heading-row h2 { white-space: nowrap; letter-spacing: -.2px; }
.date-lines { min-width: 0; min-height: 69px; padding: 7px 5px; font-size: var(--text-body); font-weight: var(--weight-medium); line-height: var(--line-height); font-variant-numeric: tabular-nums; }
.date-lines span { display: block; white-space: nowrap; }
.birkat-dates { margin-top: 8px; }
.birkat-note { margin-top: 0; }
.zmanim-card { overflow: hidden; padding: 8px 0 10px; }
.zmanim-head { padding: 0 16px; }
#zmanim-list { display: grid; gap: 2px; padding: 0 8px; }
.zman-row { min-height: 32px; margin: 0; padding: 0 10px; display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--ink); font-size: var(--text-body); }
.zman-row strong { flex: 0 0 auto; min-width: 44px; text-align: right; font-weight: var(--weight-medium); font-variant-numeric: tabular-nums; }
.zman-row.current { min-height: 34px; }
.brand-lockup { display: flex; justify-content: center; align-items: center; margin: 18px auto 0; }
.brand-lockup img { display: block; width: 100%; max-width: 100%; height: auto; object-fit: contain; }
.date-bar { position: fixed; z-index: 40; left: 50%; transform: translateX(-50%); border: 1px solid var(--brand-border); background: var(--brand-gradient); display: grid; grid-template-columns: 42px 42px 1fr 42px 42px; align-items: center; gap: 0; }
.date-bar > button { border: 0; background: none; padding: 0; }
.date-bar > button:not(.date-display) { width: 38px; height: 38px; background: var(--brand-control); display: grid; place-items: center; }
.date-bar img { width: 24px; height: 22px; object-fit: contain; }
.date-display { min-width: 0; height: 48px; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.date-display strong { max-width: 100%; color: var(--white); font-size: var(--text-main-date); font-weight: var(--weight-medium); font-variant-numeric: tabular-nums; text-shadow: var(--shadow-date-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.date-display strong.today { color: var(--today); }
.date-bar.changed .date-display,
.hero-hebrew-date.changed { animation: date-confirm .38s ease-out; }
@keyframes date-confirm { 0% { transform: scale(.92); opacity: .45; } 65% { transform: scale(1.035); opacity: 1; } 100% { transform: scale(1); } }
dialog { width: min(calc(100% - 20px),500px); padding: 0; border: 0; border-radius: 26px; background: var(--white); box-shadow: var(--shadow-dialog); }
dialog::backdrop { background: var(--dialog-backdrop); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.date-sheet { padding: 10px 16px calc(16px + env(safe-area-inset-bottom)); }
.sheet-handle { width: 38px; height: 5px; margin: 0 auto 12px; border-radius: 999px; background: var(--sheet-handle); }
.sheet-title { min-height: 36px; display: grid; grid-template-columns: 42px 1fr 42px; align-items: center; gap: 6px; }
.sheet-title h2 { margin: 0; font-size: var(--text-display); font-weight: var(--weight-bold); line-height: var(--line-height); text-align: center; }
.sheet-title button { height: 34px; border: 0; color: var(--blue); background: var(--badge); font-size: var(--text-body); font-weight: var(--weight-medium); }
.sheet-close { width: 34px; border-radius: 50%; color: var(--secondary) !important; font-size: var(--text-display); line-height: 1; }
.calendar-toggle { width: min(280px,100%); margin: 14px auto 10px; padding: 3px; border-radius: 12px; background: var(--toggle-surface); display: grid; grid-template-columns: 1fr 1fr; }
.calendar-toggle button { min-height: 34px; border: 0; border-radius: 9px; color: var(--secondary); background: transparent; font-size: var(--text-body); font-weight: var(--weight-medium); }
.calendar-toggle button[aria-selected="true"] { color: var(--blue); background: var(--white); box-shadow: var(--shadow-control); }
.wheel-picker { position: relative; height: 220px; margin: 4px 0 14px; overflow: hidden; border: 1px solid var(--separator); border-radius: 18px; background: var(--picker-surface); display: grid; grid-template-columns: .8fr 1.45fr 1fr; }
.wheel-picker::before,
.wheel-picker::after { content: ""; position: absolute; z-index: 4; left: 0; right: 0; height: 78px; pointer-events: none; }
.wheel-picker::before { top: 0; background: linear-gradient(to bottom,var(--picker-surface) 18%,var(--picker-fade-clear)); }
.wheel-picker::after { bottom: 0; background: linear-gradient(to top,var(--picker-surface) 18%,var(--picker-fade-clear)); }
.wheel-selection { position: absolute; z-index: 1; left: 10px; right: 10px; top: 88px; height: 44px; border-radius: 12px; background: var(--picker-selection); pointer-events: none; }
.wheel { position: relative; z-index: 2; height: 220px; overflow-x: hidden; overflow-y: auto; padding: 88px 0; scrollbar-width: none; scroll-snap-type: y mandatory; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.wheel::-webkit-scrollbar { display: none; }
.wheel-item { width: 100%; height: 44px; display: block; scroll-snap-align: center; border: 0; padding: 0 5px; color: var(--picker-muted); background: transparent; font-size: var(--text-body); line-height: 44px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .52; }
.wheel-item.selected { color: var(--ink); font-size: var(--text-display); font-weight: var(--weight-medium); opacity: 1; }
.sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sheet-actions button { min-height: 44px; border: 0; border-radius: 12px; background: var(--soft-blue); color: var(--blue); font-size: var(--text-body); font-weight: var(--weight-medium); }
.sheet-actions button:last-child { background: var(--blue); color: var(--white); }
.sheet-actions button:disabled { opacity: .42; }
.toast { position: fixed; z-index: 80; left: 50%; bottom: calc(82px + env(safe-area-inset-bottom)); transform: translate(-50%,16px); padding: 10px 16px; border-radius: 999px; background: var(--toast-surface); color: var(--white); font-size: var(--text-body); font-weight: var(--weight-medium); opacity: 0; pointer-events: none; transition: .22s ease; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
@media (min-width: 700px) {
  .app-shell { width: 520px; margin: 0 auto; }
}
@media (max-width: 430px) {
  .rosh-heading-row h2 { letter-spacing: -.25px; }
}
@media (max-width: 365px) {
  .two-column { gap: 8px; }
  .mini-card { padding: 11px; }
  .holiday-item { padding-left: 9px; padding-right: 8px; }
  .date-bar { grid-template-columns: 38px 38px 1fr 38px 38px; }
  .sheet-title { grid-template-columns: 42px 1fr 42px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
.content { padding-left: 0; padding-right: 0; }
.hero-card,
.content > .card,
.mini-card { border-radius: 0; box-shadow: none; }
.date-bar > button:not(.date-display),
.hero-learning,
.badge { border-radius: 10px; }
.week-event,
.week-time-tile { border-radius: 10px; }
.holiday-item { border-radius: 10px; }
.date-lines,
.zman-row { border-radius: 10px; }
.module-pill,
.account-button,
.date-bar,
.week-event.active,
.appointment-tab[aria-selected="true"] { box-shadow: none; }
.zman-row.current { box-shadow: none; }
.brand-lockup { margin-left: 18px; margin-right: 18px; }
@media (min-width: 700px) {
  .app-shell { box-shadow: none; }
}
@media (max-width: 365px) {
  .content { padding-left: 0; padding-right: 0; }
  .brand-lockup { margin-left: 12px; margin-right: 12px; }
}
.floating-top { top: 0; height: calc(70px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 18px 0; background: var(--white); border-bottom: 1px solid var(--separator); }
.module-pill,
.account-button { border: 0; border-radius: 0; background: transparent; }
.date-bar { bottom: 0; width: min(100%,520px); height: calc(64px + env(safe-area-inset-bottom)); padding: 0 12px env(safe-area-inset-bottom); border-width: 1px 0 0; border-radius: 0; }
.bottom-spacer { height: calc(84px + env(safe-area-inset-bottom)); }
.hero-french-date { border: 0; border-radius: 9px; padding: 3px 8px; color: var(--white); background: none; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.hero-hebrew-date { border: 0; border-radius: 9px; color: var(--white); background: none; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.hero-french-date { margin-bottom: 7px; }
.hero-hebrew-date { margin-top: 7px; margin-bottom: 0; }
.hero-french-date.today,
.hero-hebrew-date.today { color: var(--today); }
.hero-french-date:focus-visible,
.hero-hebrew-date:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.hero-french-date.changed { animation: date-confirm .38s ease-out; }
.card-title-row { position: relative; justify-content: center; text-align: center; }
.card-title-row h2 { width: 100%; text-align: center; }
.section-title-stack > span,
.section-title-stack > small { display: block; }
.card-title-row > .text-action { margin-top: 5px; padding-left: 0; }
.list-card > .card-title-row,
.zmanim-head { flex-direction: column; }
.zmanim-head { height: auto; }
.mini-card { text-align: center; }
@media (max-width: 430px) {
  .card-title-row h2 { font-size: 24px; }
  .section-title-stack > small { font-size: 15px; }
}
@media (max-width: 365px) {
  .floating-top { padding-left: 12px; padding-right: 12px; }
  .date-bar { width: 100%; }
}
.hero-card h1,
.card-title-row h2 { font-family: var(--font-display); font-size: 32px; line-height: 1.125; font-weight: 600; letter-spacing: .002em; }
.hero-card h1 span + span,
.section-title-stack > small { margin-top: 3px; font-family: var(--font-display); font-size: 19px; line-height: 1.2105263158; font-weight: 400; letter-spacing: .012em; }
.card-title-row h2,
.section-title-stack > small { color: var(--headline); }
.hero-french-date { font-family: var(--font-text); font-size: 17px; line-height: 1.4705882353; font-weight: 400; letter-spacing: -.022em; }
.text-action { font-family: var(--font-text); font-size: 17px; line-height: 1.4705882353; font-weight: 400; letter-spacing: -.022em; }
#rosh-duration,
#birkat-duration { font-family: var(--font-text); font-size: 17px; line-height: 1.4705882353; font-weight: 400; letter-spacing: -.022em; }
.mini-card .card-title-row h2 { font-size: 22px; line-height: 1.0909090909; letter-spacing: .011em; }
.mini-card .section-title-stack > small { font-size: 17px; line-height: 1.2353641176; letter-spacing: -.022em; }
@media (max-width: 365px) {
  .hero-card h1,
  .card-title-row h2 { font-size: 30px; }
  .hero-card h1 span + span,
  .section-title-stack > small { font-size: 18px; }
  .mini-card .card-title-row h2 { font-size: 20px; }
  .mini-card .section-title-stack > small { font-size: 16px; }
}
.hero-card { height: 304px; min-height: 304px; }
.hero-card .hero-date-title { margin: 0; }
.hero-date-title .hero-french-date { margin: 0; padding: 0; font: inherit; font-size: clamp(21px,6.4vw,28px); color: var(--white); letter-spacing: inherit; line-height: inherit; white-space: nowrap; }
.hero-hebrew-date { margin: 2px 0 0; padding: 0; font-family: var(--font-display); font-size: 19px; line-height: 1.2105263158; font-weight: 400; letter-spacing: .012em; }
.hero-special { width: 100%; color: var(--today); font-family: var(--font-text); font-size: 17px; line-height: 1.2352941176; font-weight: 600; letter-spacing: -.022em; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.hero-special span { display: block; }
.hero-special span + span { margin-top: 2px; }
.hero-card.today .hero-date-title .hero-french-date,
.hero-card.today .hero-hebrew-date { color: var(--today); }
.hero-card.today .hero-special { color: var(--white); }
@media (max-width: 365px) {
  .hero-card { height: 320px; min-height: 320px; }
  .hero-hebrew-date { font-size: 18px; }
  .hero-special { font-size: 16px; }
}
.hero-card { padding-top: 26px; padding-bottom: 26px; justify-content: space-between; }
.hero-card .hero-date-title,
.hero-hebrew-date,
.hero-special,
.hero-learning { flex: 0 0 auto; }
.hero-special { min-height: 0; margin: 0; }
.hero-learning { margin-top: 0; border: 1px solid var(--glass-separator); }
.hero-date-title .hero-french-date,
.hero-hebrew-date { text-decoration: none; }
@media (max-width: 365px) {
  .hero-card { padding-top: 28px; padding-bottom: 28px; }
  .hero-special { min-height: 0; }
}
.card:not(.zmanim-card) { height: 304px; min-height: 304px; }
.mini-card { justify-content: space-between; }
@media (max-width: 365px) {
  .card:not(.zmanim-card) { height: 320px; min-height: 320px; }
}
.week-time-grid .week-time-tile { border-radius: 0; }
.week-event:not(:only-child) .week-event-main { padding: 4px 8px; }
.week-event:not(:only-child) h3,
.week-event:not(:only-child) .week-title-lead { font-size: 16px; }
.week-event:not(:only-child) .week-meta { margin-top: 2px; gap: 1px; }
.week-event:not(:only-child) .week-hebrew-date { font-size: 13px; }
.week-event:not(:only-child) .week-countdown { font-size: 15px; }
.week-event:not(:only-child) .week-time-tile { min-height: 30px; padding: 3px 5px; }
.week-event:not(:only-child) .week-time-tile span,
.week-event:not(:only-child) .week-time-tile strong { margin-top: 0; font-size: 12px; }
.week-events { margin-left: auto; margin-right: auto; }
.week-time-tile span,
.week-time-tile strong { font-family: var(--font-text); font-size: var(--text-body); line-height: var(--line-height); letter-spacing: normal; }
.week-title-line { max-width: 100%; overflow-wrap: anywhere; }
.week-meta { margin-top: 6px; gap: 5px; }
.week-countdown { font-family: var(--font-display); font-size: 19px; line-height: 1.2105263158; font-weight: 400; letter-spacing: .012em; }
.week-time-tile { padding-top: 7px; padding-bottom: 7px; }
.week-time-tile strong { margin-top: 2px; }
@media (max-width: 365px) {
  .week-events { width: calc(100% - 24px); }
  .week-time-tile span,
  .week-time-tile strong { font-size: var(--text-body); }
}
.week-card.has-multiple { height: auto; min-height: 304px; }
.week-card.has-multiple .week-events { margin-top: 18px; flex: 0 0 auto; justify-content: flex-start; }
.week-card.has-multiple .week-event,
.week-card.has-multiple .week-event.active { min-height: 150px; box-shadow: none; }
.week-card.has-multiple .week-event-main { min-height: 94px; padding: 10px 18px 8px; justify-content: center; }
.week-card.has-multiple .week-event h3,
.week-card.has-multiple .week-title-lead,
.week-card.has-multiple .week-special,
.week-card.has-multiple .week-title-tail,
.week-card.has-multiple .week-title-separator,
.week-card.has-multiple .week-hebrew-date,
.week-card.has-multiple .week-countdown { font-size: 19px; }
.week-card.has-multiple .week-countdown { min-width: 0; min-height: 0; padding: 0; background: transparent; }
.week-card.has-multiple .week-time-tile { min-height: 48px; padding: 7px 5px; }
.week-card.has-multiple .week-time-tile span,
.week-card.has-multiple .week-time-tile strong { margin-top: 0; font-size: var(--text-body); }
.week-time-tile.is-continuation strong { line-height: var(--line-height); white-space: normal; }
@media (max-width: 365px) {
  .week-card.has-multiple { min-height: 320px; }
  .week-card.has-multiple .week-events { width: calc(100% - 24px); }
}
.week-title-primary,
.week-parasha-line { display: block; }
.week-parasha-line { margin-top: 2px; color: var(--green); }
.week-card { padding-top: 24px; padding-bottom: 24px; }
.week-event:only-child .week-event-main { min-height: 0; padding-top: 10px; padding-bottom: 8px; }
.week-event:only-child .week-time-tile { min-height: 48px; }
@media (max-width: 365px) {
  .week-card { padding-top: 26px; padding-bottom: 26px; }
}
.week-card { justify-content: flex-start; }
.week-card .section-title-stack > small { margin-top: 10px; }
.week-events { min-height: 0; margin-top: 0; flex: 1 1 auto; justify-content: center; }
.week-event:only-child { flex: 0 0 auto; }
.week-event:only-child .week-event-main { flex: 1 1 auto; justify-content: center; }
html,
body,
.app-shell { background: var(--bg); }
.hero-card { background: var(--brand-gradient); }
.week-event:only-child { min-height: 150px; }
.week-time-tile.is-today { background: var(--green); color: var(--white); }
@media (min-width: 700px) {
  body { background: linear-gradient(135deg, var(--desktop-bg-start), var(--desktop-bg-end)); }
}
.week-event h3,
.week-title-lead,
.week-special,
.week-title-tail,
.week-title-separator,
.week-hebrew-date { font-family: var(--font-display); font-size: 19px; line-height: 1.2105263158; font-weight: 400; letter-spacing: .012em; }
.week-event h3,
.week-title-lead,
.week-special,
.week-title-tail { color: var(--headline); }
.week-hebrew-date { color: var(--secondary); }
.week-title-separator { color: var(--green); }
@media (max-width: 365px) {
  .week-event h3,
  .week-title-lead,
  .week-special,
  .week-title-tail,
  .week-title-separator,
  .week-hebrew-date,
  .week-countdown { font-size: 18px; }
}
.hero-special .hero-parasha-line,
.week-event .week-parasha-line { display: flex; align-items: center; justify-content: center; gap: 5px; }
.hero-special .hero-parasha-line > span,
.week-event .week-parasha-line > span { display: inline; color: var(--green); }
.week-event .week-parasha-line > .parasha-bullet { color: var(--headline); }
.content { padding-top: calc(70px + env(safe-area-inset-top)); }
.week-events,
.week-card.has-multiple .week-events { width: 100%; }
.top-actions { display: flex; align-items: center; gap: 6px; pointer-events: auto; }
.location-button { height: 46px; border: 0; padding: 0 4px; color: var(--secondary); background: transparent; display: inline-flex; align-items: center; gap: 4px; font-size: var(--text-body); font-weight: var(--weight-medium); }
.location-button img { width: 17px; height: 17px; object-fit: contain; }
.location-button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.hero-special .hero-parasha-line,
.hero-special .hero-parasha-line > .parasha-label,
.hero-special .hero-parasha-line > .parasha-bullet,
.hero-special .hero-parasha-line > .parasha-name { color: var(--white); }
.hero-card.today .hero-special .hero-parasha-line,
.hero-card.today .hero-special .hero-parasha-line > .parasha-label,
.hero-card.today .hero-special .hero-parasha-line > .parasha-bullet,
.hero-card.today .hero-special .hero-parasha-line > .parasha-name { color: var(--today); }
.list-card .card-title-row { justify-content: center; text-align: center; }
.appointment-tabs { align-items: stretch; }
.appointment-tab { width: clamp(78px,22vw,88px); min-height: 58px; padding: 7px 6px; border-radius: 10px; flex-direction: column; gap: 3px; white-space: normal; text-align: center; }
.appointment-tab-label { display: -webkit-box; overflow: hidden; font-size: 13px; line-height: 1.08; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.week-event,
.week-event.active,
.week-card.has-multiple .week-event { background: var(--active); }
.week-event .week-time-grid,
.week-card.has-multiple .week-event .week-time-grid { background: var(--soft-green); }
.week-event .week-title-separator,
.week-event .week-parasha-line,
.week-event .week-countdown,
.week-event .week-time-tile strong { color: var(--green); }
.week-countdown { min-width: 0; min-height: 0; margin: 0 0 7px; padding: 0; border-radius: 0; background: transparent; text-align: center; }
.week-card.has-multiple .week-events { gap: 22px; }
.week-card.has-multiple .week-event { display: flex; flex-direction: column; }
.week-card.has-multiple .week-event-main { flex: 1 1 auto; }
.week-card.has-multiple .week-time-grid { margin-top: auto; flex: 0 0 auto; }
.week-event .week-time-tile.is-today { background: var(--green); }
.week-event .week-time-tile.is-today,
.week-event .week-time-tile.is-today span,
.week-event .week-time-tile.is-today strong { color: var(--white); }
.list-card .holiday-item.active { background: var(--blue-strong); }
.green-pair { position: relative; box-sizing: border-box; height: 304px; min-height: 304px; gap: 0; padding: 22px 0; border-radius: 0; background: var(--white); box-shadow: none; overflow: hidden; }
.green-pair::after { content: ''; position: absolute; top: 34px; bottom: 34px; left: 50%; width: 1px; background: var(--green); opacity: .22; pointer-events: none; }
.green-panel,
.green-panel.active { min-height: 0; padding: 0 18px; border-radius: 0; background: var(--white); box-shadow: none; color: var(--ink); text-align: center; display: grid; justify-content: stretch; grid-template-rows: 28px 23px 25px minmax(0, 1fr) 22px 15px; row-gap: 6px; }
.green-panel .card-title-row { min-height: 28px; padding: 0; align-items: center; }
.green-panel .card-title-row h2,
.green-panel.active .card-title-row h2 { color: var(--headline); font-size: 23px; line-height: 1.08; font-weight: 600; text-align: center; white-space: nowrap; }
.green-duration,
.green-panel.active .green-duration { margin-top: 0; color: var(--secondary); font-size: 17px; line-height: 1.25; font-weight: 400; }
.green-context,
.green-panel.active .green-context { min-height: 23px; margin-top: 0; color: var(--green); font-size: 20px; line-height: 1.15; font-weight: 400; }
.green-molad,
.green-panel.active .green-molad { width: 100%; min-height: 15px; margin-top: 0; color: var(--green); font-size: 12px; line-height: 1.2; letter-spacing: -.02em; white-space: nowrap; }
.green-panel .date-lines { min-height: 0; height: 100%; margin-top: 0; padding: 14px 8px; border-radius: 12px; background: var(--soft-green); color: var(--green); display: flex; flex-direction: column; justify-content: center; gap: 7px; font-size: 14px; line-height: 1.2; font-weight: 600; overflow: hidden; }
.green-panel.active .date-lines { min-height: 0; height: 100%; margin-top: 0; padding: 14px 8px; border-radius: 12px; display: flex; flex-direction: column; justify-content: center; gap: 7px; font-size: 14px; line-height: 1.2; font-weight: 600; overflow: hidden; }
#rosh-card .date-lines,
#birkat-card .date-lines { margin-top: 0; }
.green-panel.active .date-lines { background: var(--green); color: var(--white); }
.green-panel .date-lines > span,
.green-panel.active .date-lines > span,
.green-panel .birkat-note,
.green-panel.active .birkat-note { color: inherit; }
.green-date-entry { min-height: 17px; display: flex !important; align-items: baseline; justify-content: center; gap: 4px; }
.green-date-copy { white-space: nowrap; }
.green-evening { color: inherit; font-size: inherit; line-height: inherit; font-weight: 400; white-space: nowrap; }
.green-countdown { min-height: 25px; margin-top: 0; margin-bottom: 0; color: var(--green); font-family: var(--font-display); font-size: 19px; line-height: 1.25; font-weight: 400; text-align: center; }
.green-countdown.is-empty { visibility: hidden; }
@media (max-width: 430px) {
  #birkat-card .card-title-row h2 { font-size: 19px; letter-spacing: -.025em; }
}
@media (max-width: 365px) {
  .green-pair { height: 320px; min-height: 320px; padding: 24px 0; }
  .green-panel,
  .green-panel.active { padding-left: 11px; padding-right: 11px; }
  .green-panel .card-title-row h2,
  .green-panel.active .card-title-row h2 { font-size: 22px; }
  #birkat-card .card-title-row h2 { font-size: 17px; letter-spacing: -.04em; }
  .green-context,
  .green-panel.active .green-context { font-size: 18px; }
  .green-panel .date-lines,
  .green-panel.active .date-lines { padding-left: 6px; padding-right: 6px; font-size: 13px; }
  .green-molad,
  .green-panel.active .green-molad { font-size: 11px; }
}
.zmanim-card { background: var(--white); padding-top: 45px; padding-bottom: 24px; }
.zmanim-head { min-height: auto; padding-top: 0; padding-bottom: 30px; }
.zmanim-head .section-title-stack > small { margin-top: 10px; }
.zman-row strong { color: var(--blue); }
.zman-entry:nth-child(odd) .zman-row { background: var(--soft-blue); }
.zman-entry .zman-row.current { background: var(--blue-strong); color: var(--white); }
.zman-row.current strong { color: var(--white); }
.zman-entry { position: relative; min-width: 0; display: grid; grid-template-columns: 20px minmax(0, 1fr); column-gap: 6px; align-items: stretch; }
.zman-entry .zman-row { min-width: 0; grid-column: 2; grid-row: 1; }
.zman-entry.has-timeline-point::before { content: ''; position: absolute; left: 9px; top: 0; bottom: -2px; width: 2px; background: var(--separator); pointer-events: none; }
.zman-entry.is-first-time::before { top: 50%; }
.zman-entry.is-last-time::before { bottom: 50%; }
.zman-marker { position: relative; z-index: 1; grid-column: 1; grid-row: 1; align-self: center; justify-self: center; width: 8px; height: 8px; border: 1px solid var(--blue-light); border-radius: 50%; background: var(--blue-light); pointer-events: none; }
.zman-entry.is-current .zman-marker { border-color: var(--blue-strong); background: var(--blue-strong); }
.zman-entry.is-upcoming .zman-marker { border-color: var(--blue-strong); background: var(--white); }
.zman-entry.is-current .zman-marker::after { content: ''; position: absolute; inset: -5px; border: 1.5px solid var(--blue-strong); border-radius: 50%; animation: zman-marker-pulse 2.4s ease-in-out infinite; }
@keyframes zman-marker-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.22); }
}
@media (prefers-reduced-motion: reduce) {
  .zman-entry.is-current .zman-marker::after { animation: none; }
}
.zman-durations { margin: 24px 8px 0; display: grid; grid-template-columns: 20px minmax(0, 1fr); column-gap: 6px; row-gap: 20px; }
.zman-durations[hidden] { display: none; }
.zman-durations::before { content: ''; grid-column: 2; grid-row: 1; height: 1px; background: var(--separator); }
.zman-duration-icon { grid-column: 1; grid-row: 2; align-self: center; justify-self: center; display: block; width: 18px; height: 20px; color: var(--blue); }
.zman-durations-box { min-width: 0; grid-column: 2; grid-row: 2; padding: 6px 10px; border-radius: 10px; background: var(--picker-surface); display: grid; gap: 2px; }
.zman-duration-row { min-width: 0; min-height: 32px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--ink); font-size: var(--text-body); line-height: var(--line-height); }
.zman-duration-row strong { flex: 0 0 auto; min-width: 44px; color: var(--blue); text-align: right; font-weight: var(--weight-medium); font-variant-numeric: tabular-nums; }
.zmanim-customize { display: block; margin: 20px auto 0; padding: 2px 0; color: var(--blue); font-size: 16px; font-weight: 400; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.appointments-card { padding-top: 24px; padding-bottom: 24px; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; }
.appointments-card > .card-title-row { flex: 0 0 auto; padding: 0; }
.appointments-card .appointment-tabs,
.appointments-card #holidays-list { width: 100%; min-width: 0; margin: 0 auto; flex: 0 0 auto; }
.appointments-card .appointment-tabs { overflow: hidden; align-items: center; justify-content: center; column-gap: 8px; }
.appointments-card .appointment-tabs.is-pair { justify-content: space-evenly; column-gap: 0; }
.appointments-card .appointment-tabs.is-spread { justify-content: space-between; }
.appointments-card .appointment-tab { width: auto; min-height: 34px; padding: 6px 9px; border: 1px solid transparent; border-radius: 10px; flex: 0 0 auto; flex-direction: row; gap: 4px; white-space: nowrap; color: var(--blue); background: var(--soft-blue); font-size: var(--text-body); line-height: var(--line-height); font-weight: var(--weight-medium); box-shadow: none; }
.appointments-card .appointment-tab-label { display: inline; overflow: visible; -webkit-line-clamp: unset; font: inherit; white-space: nowrap; }
.appointments-card .appointment-tab-countdown { flex: 0 0 auto; font: inherit; white-space: nowrap; }
.appointments-card .appointment-tab[aria-selected="true"] { color: var(--white); background: var(--blue-strong); box-shadow: none; }
.appointments-card .appointment-tab:focus-visible { outline: 2px solid var(--blue); outline-offset: -3px; }
.appointments-card .holiday-item { min-height: 108px; padding: 14px 12px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--blue); background: var(--soft-blue); text-align: center; font-size: var(--text-body); line-height: var(--line-height); }
.appointments-card .holiday-compact-range { min-height: 0; padding: 0; display: block; color: inherit; font: inherit; }
.appointments-card .holiday-hebrew-range { color: inherit; }
.appointments-card .holiday-duration { color: var(--secondary); font-weight: 400; }
.appointments-card .holiday-item.active { color: var(--white); background: var(--blue-strong); }
.appointments-card .holiday-item.active .holiday-duration { color: var(--white); }
.appointments-card .appointment-see-all { align-self: center; flex: 0 0 auto; margin: 0; padding: 2px 0; color: var(--blue); font-size: 16px; line-height: 1.25; font-weight: 400; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.green-pair .green-panel,
.green-pair .green-panel.active { height: auto; min-width: 0; min-height: 0; }
.green-pair .date-lines { width: 100%; }
#rosh-dates { display: grid; grid-template-columns: minmax(0, 1fr) auto auto minmax(0, 1fr); grid-auto-rows: min-content; align-content: center; align-items: baseline; column-gap: 0; row-gap: 7px; }
#rosh-dates .green-date-entry { display: contents !important; }
#rosh-dates .green-date-copy { grid-column: 2; justify-self: start; }
#rosh-dates .green-evening { grid-column: 3; justify-self: start; margin-left: 4px; }
@media (max-width: 430px) {
  .green-pair .green-panel,
  .green-pair .green-panel.active { padding-left: 12px; padding-right: 12px; }
  .green-pair .green-panel .card-title-row h2,
  .green-pair .green-panel.active .card-title-row h2 { font-size: 19px; letter-spacing: -.025em; }
  .green-pair .date-lines { padding-left: 5px; padding-right: 5px; font-size: 13px; }
}
@media (max-width: 365px) {
  .green-pair .green-panel,
  .green-pair .green-panel.active { padding-left: 6px; padding-right: 6px; }
  .green-pair .green-panel .card-title-row h2,
  .green-pair .green-panel.active .card-title-row h2 { font-size: 17px; letter-spacing: -.04em; }
  .green-pair .date-lines { padding-left: 3px; padding-right: 3px; font-size: 12px; }
}
