/* FastMode (scoped)
   All styles live under body.fm-page and .fm-* classes only.
*/

body.fm-page .fm-main {
  padding: 40px 0 70px;
}

/* The global header (.mainHeading) is sized for the homepage hero.
   FastMode uses the header only for logo/nav/banner, so shrink it to avoid a large empty gap. */
body.fm-page .mainHeading {
  min-height: auto;
  padding-bottom: 18px;
}

body.fm-page .fm-hero {
  padding: 28px 0 22px;
}

body.fm-page .fm-hero__card {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: calc(var(--fast-radius) + 6px);
  box-shadow: 0 20px 50px rgba(17, 24, 39, 0.08);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  overflow: hidden;
}

body.fm-page .fm-hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 22px;

}

/* Header orientation banner (calm strip) */
body.fm-page .fm-banner {
  margin-top: 12px;
  margin-bottom: 0;
  padding: 25px 16px;
  border-radius: var(--fast-radius);
  border: 1px solid rgba(124, 58, 237, 0.16);
  background: url('../Assets/purple.jpg') center / cover no-repeat;
  background-size: cover;
  background-position: center;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.06);
}

body.fm-page .fm-banner-eyebrow {
  margin: 0 0 6px 0;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.92);
}

body.fm-page .fm-banner-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
  color: #fff;
}

body.fm-page .fm-banner-sub {
  margin: 8px 0 0 0;
  font-size: 14px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.92);
}

@media (min-width: 760px) {
  body.fm-page .fm-banner {
    padding: 25px 20px;
  }

  body.fm-page .fm-banner-title {
    font-size: 19px;
  }
}


body.fm-page .fm-title {
  font-family: 'Righteous', cursive;
  font-size: clamp(34px, 7vw, 54px);
  margin: 0 0 10px 0;
  color: var(--fast-ink);
}

body.fm-page .fm-subtitle {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--fast-muted);
  max-width: 48ch;
}

body.fm-page .fm-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px;
  border-radius: 14px;
  border: 1px solid rgba(124, 58, 237, 0.20);
  background: rgba(249, 245, 255, 0.70);
}

body.fm-page .fm-status__meta {
  font-weight: 700;
  color: var(--fast-ink);
}

body.fm-page .fm-status__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.06em;
  border: 1px solid rgba(124, 58, 237, 0.30);
  background: var(--fast-gradient);
  color: #fff;
}

body.fm-page .fm-hero__lines {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

body.fm-page .fm-line {
  font-size: 15px;
  color: var(--fast-ink);
}

body.fm-page .fm-countdown {
  font-weight: 700;
}

body.fm-page .fm-muted {
  color: var(--fast-muted);
}

body.fm-page .fm-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 14px;
}

body.fm-page .fm-btn {
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 2px solid var(--fast-accent);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

body.fm-page .fm-btn--primary {
  background: var(--fast-gradient);
  color: #fff;
  box-shadow: 0 12px 24px rgba(124, 58, 237, 0.25);
}

body.fm-page .fm-btn--secondary {
  background: rgba(255, 255, 255, 0.65);
  color: var(--fast-accent);
}

body.fm-page .fm-btn--tertiary {
  background: rgba(124, 58, 237, 0.10);
  color: var(--fast-accent);
  border-color: rgba(124, 58, 237, 0.45);
}

@media (hover:hover) {
  body.fm-page .fm-btn:hover {
    transform: translateY(-2px);
  }
}

body.fm-page .fm-note {
  margin: 12px 0 0;
  color: var(--fast-muted);
  font-size: 13px;
}

body.fm-page .fm-section-head {
  margin: 26px 0 12px;
}

body.fm-page .fm-section-head--row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

body.fm-page .fm-section-title {
  font-family: 'Righteous', cursive;
  font-size: 26px;
  margin: 0;
  color: var(--fast-ink);
}

body.fm-page .fm-section-sub {
  margin: 6px 0 0;
  color: var(--fast-muted);
  font-size: 14px;
}

/* Shelf */
body.fm-page .fm-shelf {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 10px 2px 14px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

body.fm-page .fm-shelf::-webkit-scrollbar {
  height: 8px;
}

body.fm-page .fm-shelf::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, 0.25);
  border-radius: 999px;
}

body.fm-page .fm-daycard {
  scroll-snap-align: start;
  min-width: 150px;
  max-width: 160px;
  flex: 0 0 auto;
  border-radius: var(--fast-radius);
  border: 1px solid rgba(124, 58, 237, 0.18);
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.06);
  padding: 12px 12px;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

body.fm-page .fm-daycard:focus-visible {
  outline: 2px solid rgba(124, 58, 237, 0.75);
  outline-offset: 2px;
}

@media (hover:hover) {
  body.fm-page .fm-daycard:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(17, 24, 39, 0.09);
    border-color: rgba(124, 58, 237, 0.35);
  }
}

body.fm-page .fm-daycard__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

body.fm-page .fm-daycard__dow {
  font-weight: 800;
  color: var(--fast-ink);
}

body.fm-page .fm-daycard__date {
  margin-top: 10px;
  color: var(--fast-muted);
  font-size: 13px;
}

body.fm-page .fm-daycard__phase {
  margin-top: 6px;
  font-size: 12px;
  color: var(--fast-muted);
}

body.fm-page .fm-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  border: 1px solid rgba(124, 58, 237, 0.30);
  color: var(--fast-accent);
  background: rgba(124, 58, 237, 0.10);
}

body.fm-page .fm-badge--fast {
  background: rgba(17, 24, 39, 0.08);
  border-color: rgba(17, 24, 39, 0.18);
  color: var(--fast-ink);
}

body.fm-page .fm-badge--eat {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.25);
  color: #065F46;
}

body.fm-page .fm-badge--omad {
  background: rgba(124, 58, 237, 0.12);
  border-color: rgba(124, 58, 237, 0.25);
  color: var(--fast-accent);
}

body.fm-page .fm-daycard.is-today {
  border-color: rgba(124, 58, 237, 0.55);
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.22), 0 18px 44px rgba(124, 58, 237, 0.14);
}

body.fm-page .fm-daycard[aria-selected="true"] {
  border-color: rgba(124, 58, 237, 0.70);
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.22), 0 18px 44px rgba(124, 58, 237, 0.16);
}

/* Body cards */
body.fm-page .fm-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 12px;
}

body.fm-page .fm-card {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: var(--fast-radius);
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.06);
  padding: 14px;
}

body.fm-page .fm-card.is-current {
  border-color: rgba(124, 58, 237, 0.55);
}

body.fm-page .fm-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  color: var(--fast-ink);
}

body.fm-page .fm-card p {
  margin: 0 0 10px;
  color: var(--fast-muted);
  line-height: 1.55;
}

body.fm-page .fm-card ul {
  margin: 0 0 0 18px;
  color: var(--fast-ink);
}

body.fm-page .fm-safety {
  margin-top: 12px;
  padding: 12px 12px;
  border-radius: var(--fast-radius);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: rgba(127, 29, 29, 0.95);
  line-height: 1.5;
}

/* Month */
body.fm-page .fm-month__panel {
  margin-top: 12px;
}

body.fm-page .fm-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

body.fm-page .fm-calhead {
  font-weight: 800;
  color: var(--fast-muted);
  font-size: 12px;
  text-align: center;
  padding: 6px 0;
}

body.fm-page .fm-daybtn {
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(124, 58, 237, 0.18);
  background: rgba(255, 255, 255, 0.75);
  color: var(--fast-ink);
  font-weight: 800;
  cursor: pointer;
  position: relative;
}

body.fm-page .fm-daybtn[disabled] {
  opacity: 0.35;
  cursor: default;
}

body.fm-page .fm-daydot {
  position: absolute;
  left: 50%;
  bottom: 7px;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

body.fm-page .fm-daydot--fast { background: rgba(17,24,39,0.55); }
body.fm-page .fm-daydot--eat { background: rgba(16,185,129,0.75); }
body.fm-page .fm-daydot--omad { background: rgba(124,58,237,0.75); }

body.fm-page .fm-daybtn.is-selected {
  outline: 2px solid rgba(124, 58, 237, 0.7);
  outline-offset: 2px;
}

body.fm-page .fm-daybtn[aria-selected="true"] {
  outline: 2px solid rgba(124, 58, 237, 0.7);
  outline-offset: 2px;
}

body.fm-page .fm-daydetail {
  margin-top: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--fast-ink);
}

body.fm-page .fm-daydetail:empty {
  margin-top: 0;
}

/* Day Detail (Premium feature card) */
body.fm-page .fm-feature {
  position: relative;
  border-radius: calc(var(--fast-radius) + 6px);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(124, 58, 237, 0.18);
  box-shadow: 0 20px 50px rgba(17, 24, 39, 0.10);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  overflow: hidden;
  animation: fmDayDetailEnter 260ms ease-out both;
}

body.fm-page .fm-feature::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: var(--fast-gradient);
  opacity: 0.95;
}

body.fm-page .fm-feature__inner {
  padding: 16px 16px;
}

body.fm-page .fm-feature__header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

body.fm-page .fm-feature__title {
  margin: 0;
  font-family: 'Righteous', cursive;
  font-size: 22px;
  line-height: 1.1;
  color: var(--fast-ink);
}

body.fm-page .fm-feature__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

body.fm-page .fm-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: 0.06em;
  border: 1px solid rgba(124, 58, 237, 0.30);
  background: var(--fast-gradient);
  color: #fff;
}

body.fm-page .fm-pill--soft {
  background: rgba(124, 58, 237, 0.10);
  color: var(--fast-accent);
  border-color: rgba(124, 58, 237, 0.25);
  letter-spacing: 0.02em;
}

body.fm-page .fm-badge-today {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-weight: 900;
  color: var(--fast-ink);
  background: rgba(17, 24, 39, 0.06);
  border: 1px solid rgba(17, 24, 39, 0.14);
}

body.fm-page .fm-feature__grid {
  display: grid;
  gap: 12px;
}

body.fm-page .fm-block {
  border-radius: var(--fast-radius);
  border: 1px solid rgba(124, 58, 237, 0.14);
  background: rgba(255, 255, 255, 0.72);
  padding: 12px 12px;
}

body.fm-page .fm-block__title {
  margin: 0 0 8px 0;
  font-weight: 900;
  color: var(--fast-ink);
}

body.fm-page .fm-block__text {
  margin: 0;
  color: var(--fast-muted);
  line-height: 1.55;
}

body.fm-page .fm-metrics {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

body.fm-page .fm-metric {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px;
  align-items: start;
}

body.fm-page .fm-metric__k {
  font-weight: 900;
  color: var(--fast-ink);
}

body.fm-page .fm-metric__v {
  color: var(--fast-muted);
  line-height: 1.45;
}

body.fm-page .fm-feature__actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 12px;
}

@media (min-width: 760px) {
  body.fm-page .fm-feature__actions {
    grid-template-columns: 1fr 1fr;
  }
}

@keyframes fmDayDetailEnter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  body.fm-page .fm-feature {
    animation: none;
  }
}

/* Accordion */
body.fm-page .fm-details {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: var(--fast-radius);
  padding: 12px 14px;
  margin-bottom: 10px;
}

body.fm-page .fm-details summary {
  font-weight: 900;
  cursor: pointer;
}

body.fm-page .fm-details ul {
  margin: 10px 0 0 18px;
}

/* Modal */
body.fm-page .fm-modal[hidden] {
  display: none;
}

body.fm-page .fm-modal {
  position: fixed;
  inset: 0;
  z-index: 9998;
}

body.fm-page .fm-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.55);
}

body.fm-page .fm-modal__panel {
  gap: 12px;
  margin-bottom: 12px;
}

body.fm-page .fm-modal__title {
  font-family: 'Righteous', cursive;
  font-size: 22px;
  margin: 0;
  color: var(--fast-ink);
}

body.fm-page .fm-iconbtn {
  min-height: 44px;
  min-width: 44px;
  border-radius: 999px;
  border: 1px solid rgba(124, 58, 237, 0.25);
  background: rgba(124, 58, 237, 0.10);
  color: var(--fast-ink);
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
}

body.fm-page .fm-form {
  display: grid;
  gap: 12px;
  overflow: auto;
  padding-right: 2px;
}

body.fm-page .fm-field label {
  display: block;
  font-weight: 800;
  color: var(--fast-ink);
  margin-bottom: 6px;
}

body.fm-page .fm-field input[type="date"],
body.fm-page .fm-field input[type="time"] {
  width: 100%;
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(124, 58, 237, 0.25);
  padding: 10px 12px;
  font: inherit;
}

body.fm-page .fm-help {
  margin-top: 6px;
  color: var(--fast-muted);
  font-size: 12px;
}

body.fm-page .fm-fieldgrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

body.fm-page .fm-field--checkbox {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 10px;
}

body.fm-page .fm-form__actions {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}

body.fm-page .fm-a11y-live {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Desktop tweaks */
@media screen and (min-width: 769px) {
  body.fm-page .fm-hero__grid {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    padding: 28px;
  }

  body.fm-page .fm-actions {
    grid-template-columns: 1fr 1fr;
  }

  body.fm-page .fm-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  body.fm-page .fm-fieldgrid {
    grid-template-columns: 1fr 1fr;
  }
}
