body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 92% 8%, rgba(95, 120, 137, 0.13), transparent 24rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.25), transparent 46%),
    var(--paper);
}

.dashboard-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
}

.side-rail {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 32px 26px;
  border-right: 1px solid var(--line);
  background: rgba(250, 248, 242, 0.66);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 15px 15px 15px 4px;
  background: var(--moss-deep);
  transform: rotate(-4deg);
}

.brand__mark span {
  width: 17px;
  height: 23px;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-left-width: 5px;
  border-radius: 8px 9px 9px 4px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-family: var(--font-display);
  font-size: 1.16rem;
  letter-spacing: 0.01em;
}

.brand small {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 0.72rem;
}

.rail-date {
  margin-top: 86px;
}

.rail-date__day {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-size: clamp(4rem, 7vw, 5.4rem);
  font-weight: 560;
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.rail-date__month {
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.date-nav {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 6px;
  margin-top: 28px;
}

.date-nav button {
  min-height: 42px;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
}

.date-nav__button:first-child {
  border-radius: 50% 10px 10px 50%;
}

.date-nav__button:last-child {
  border-radius: 10px 50% 50% 10px;
}

.date-nav__today {
  border-radius: 10px;
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 680;
}

.rail-legend {
  display: grid;
  gap: 11px;
  margin-top: 42px;
  color: var(--ink-soft);
  font-size: 0.76rem;
}

.rail-legend span {
  display: flex;
  align-items: center;
  gap: 9px;
}

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

.legend-dot--moss { background: var(--moss); }
.legend-dot--mist { background: var(--mist); }
.legend-dot--honey { background: var(--honey); }

.rail-footer {
  display: grid;
  gap: 6px;
  margin-top: auto;
}

.rail-link {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 10px 0;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.75rem;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.dashboard-main {
  width: min(1380px, 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0 auto;
  padding: 24px clamp(28px, 4vw, 70px) 28px;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  margin-bottom: 20px;
}

.topbar h1 {
  margin: 7px 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.2vw, 2.15rem);
  font-weight: 620;
  letter-spacing: -0.035em;
}

.topbar__status {
  display: flex;
  align-items: center;
  gap: 20px;
}

.live-clock {
  min-width: 126px;
  color: var(--ink);
  font-family: var(--font-data);
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  font-weight: 520;
  line-height: 1;
  letter-spacing: -0.07em;
  text-align: right;
}

.urgent-banner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
  padding: 17px 20px;
  border: 1px solid color-mix(in srgb, var(--coral) 25%, var(--line));
  border-radius: var(--radius-md);
  background: var(--coral-wash);
}

.urgent-banner__signal {
  width: 16px;
  height: 54px;
  border-radius: var(--radius-round);
  background: var(--coral);
  box-shadow: 0 0 0 7px rgba(190, 91, 79, 0.09);
}

.urgent-banner h2,
.urgent-banner p {
  margin: 0;
}

.urgent-banner h2 {
  margin-top: 3px;
  font-size: 1.05rem;
}

.urgent-banner p:not(.eyebrow) {
  margin-top: 3px;
  color: var(--coral-deep);
  font-size: 0.82rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(320px, 0.82fr);
  gap: 20px;
}

.now-card,
.next-card,
.schedule-card {
  border: 1px solid rgba(214, 211, 200, 0.85);
  box-shadow: var(--shadow-small);
}

.now-card {
  position: relative;
  min-height: 270px;
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: center;
  gap: clamp(20px, 3vw, 42px);
  padding: clamp(28px, 4vw, 50px);
  overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) 10px;
  background:
    radial-gradient(circle at 22% 50%, rgba(223, 233, 223, 0.85), transparent 31%),
    var(--paper-soft);
}

.now-card::after {
  content: "";
  position: absolute;
  right: -45px;
  bottom: -85px;
  width: 210px;
  height: 210px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.now-card__halo {
  position: relative;
  width: 142px;
  height: 142px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--moss) 28%, var(--line));
  border-radius: 50%;
  background: repeating-conic-gradient(from -12deg, var(--moss) 0 2deg, transparent 2deg 12deg);
}

.now-card__halo::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: var(--paper-soft);
  box-shadow: inset 0 0 0 1px var(--line);
}

.now-card__halo span {
  position: relative;
  width: 51px;
  height: 68px;
  border: 6px solid var(--moss-deep);
  border-right-width: 2px;
  border-radius: 24px 12px 12px 24px;
}

.now-card--busy .now-card__halo {
  background: repeating-conic-gradient(from -12deg, var(--mist) 0 2deg, transparent 2deg 12deg);
}

.now-card--busy .now-card__halo span {
  border-color: var(--mist);
}

.now-card__time {
  margin: 12px 0 0;
  color: var(--moss);
  font-family: var(--font-data);
  font-size: 0.84rem;
  font-weight: 700;
}

.now-card h2 {
  max-width: 680px;
  margin: 12px 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 3.4vw, 3.3rem);
  font-weight: 620;
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.now-card__meta {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 0.87rem;
}

.availability {
  position: absolute;
  top: 22px;
  right: 22px;
  padding: 7px 11px;
  border-radius: var(--radius-round);
  background: var(--moss-wash);
  color: var(--moss-deep);
  font-size: 0.72rem;
  font-weight: 720;
}

.now-card--busy .availability {
  background: var(--mist-wash);
  color: var(--mist);
}

.next-card {
  min-height: 270px;
  display: flex;
  flex-direction: column;
  padding: 28px;
  border-radius: var(--radius-lg) 10px var(--radius-lg) var(--radius-lg);
  background: var(--ink);
  color: var(--paper-soft);
}

.next-card .eyebrow {
  color: #aeb8b0;
}

.next-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.next-card__countdown {
  color: var(--honey);
  font-family: var(--font-data);
  font-size: 0.75rem;
}

.next-card__body {
  margin: auto 0;
}

.next-card__body time {
  color: var(--honey);
  font-family: var(--font-data);
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
}

.next-card h2 {
  margin: 12px 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.25vw, 2.1rem);
  font-weight: 570;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.next-card__body p {
  margin: 10px 0 0;
  color: #aeb8b0;
  font-size: 0.82rem;
}

.next-card__line {
  height: 4px;
  overflow: hidden;
  border-radius: var(--radius-round);
  background: #465049;
}

.next-card__line span {
  display: block;
  width: 34%;
  height: 100%;
  border-radius: inherit;
  background: var(--honey);
  transition: width 500ms var(--ease);
}

.next-card--soon .next-card__line span { width: 72%; }
.next-card--imminent .next-card__line span { width: 94%; background: #e98369; }

.schedule-card {
  margin-top: 18px;
  padding: 26px;
  border-radius: 12px var(--radius-lg) var(--radius-lg) var(--radius-lg);
  background: rgba(250, 248, 242, 0.8);
}

.schedule-card__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.schedule-card h2 {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.schedule-summary {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--font-data);
  font-size: 0.76rem;
}

.day-ribbon {
  margin-top: 28px;
}

.day-ribbon__track {
  display: grid;
  grid-template-columns: repeat(48, 1fr);
  gap: 2px;
  height: 18px;
  padding: 3px;
  border-radius: var(--radius-round);
  background: var(--paper-deep);
}

.ribbon-cell {
  min-width: 0;
  border-radius: 2px;
  background: rgba(85, 112, 90, 0.22);
}

.ribbon-cell--busy { background: var(--mist); }
.ribbon-cell--current { box-shadow: 0 0 0 2px var(--honey); }

.day-ribbon__labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: #8c938c;
  font-family: var(--font-data);
  font-size: 0.62rem;
}

.schedule-list {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}

.schedule-item {
  display: grid;
  grid-template-columns: 120px 14px minmax(240px, max-content) minmax(120px, 1fr);
  align-items: center;
  gap: 16px;
  min-height: 58px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
}

.schedule-item:last-child {
  border-bottom: 0;
}

.schedule-item__time {
  font-family: var(--font-data);
  font-size: 0.78rem;
  font-weight: 650;
}

.schedule-item__signal {
  width: 5px;
  height: 34px;
  border-radius: var(--radius-round);
  background: var(--mist);
}

.schedule-item--current .schedule-item__signal { background: var(--honey); }

.schedule-item__title {
  min-width: 0;
  overflow: hidden;
  font-size: 0.9rem;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-item__meta {
  color: var(--ink-soft);
  font-size: 0.73rem;
  text-align: left;
}

.empty-state {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  color: var(--ink-soft);
}

.empty-state__mark {
  width: 34px;
  height: 34px;
  border: 7px solid var(--moss-wash);
  border-radius: 50%;
  background: var(--moss);
}

.empty-state p { margin: 0; }

.stale-note {
  margin: 14px 0 0;
  color: var(--coral-deep);
  font-size: 0.75rem;
  text-align: center;
}

.settings-copy {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.6;
}

@media (max-width: 960px) {
  .dashboard-shell { grid-template-columns: 1fr; }
  .side-rail {
    position: static;
    height: auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    padding: 18px 24px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .rail-date, .date-nav, .rail-legend { display: none; }
  .rail-footer { display: flex; gap: 6px; margin: 0; }
  .rail-link {
    width: auto;
    min-width: max-content;
    padding: 8px 10px;
    white-space: nowrap;
  }
  .dashboard-main {
    min-height: calc(100vh - 87px);
    justify-content: flex-start;
    padding-top: 18px;
  }
  .hero-grid { grid-template-columns: 1fr 0.94fr; }
  .now-card,
  .next-card { min-height: 210px; }
  .now-card {
    grid-template-columns: 72px 1fr;
    gap: 16px;
    padding: 20px;
  }
  .now-card__halo { width: 72px; height: 72px; }
  .now-card__halo span { width: 27px; height: 37px; border-width: 4px; }
  .now-card::after { display: none; }
  .now-card h2 { font-size: clamp(1.5rem, 3.8vw, 1.9rem); }
  .now-card__meta { margin-top: 10px; }
  .next-card { padding: 22px; }
}

@media (max-width: 720px) {
  .hero-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .side-rail { grid-template-columns: 1fr; }
  .rail-footer { display: none; }
  .dashboard-main { padding: 16px; }
  .topbar { align-items: flex-start; }
  .topbar__status { display: grid; justify-items: end; gap: 8px; }
  .sync-pill { display: none; }
  .now-card { grid-template-columns: 1fr; }
  .now-card__halo { width: 92px; height: 92px; }
  .now-card__halo span { width: 34px; height: 46px; border-width: 4px; }
  .availability { top: 16px; right: 16px; }
  .schedule-card { padding: 22px 18px; }
  .schedule-card__header { align-items: flex-start; }
  .schedule-summary { max-width: 130px; text-align: right; }
  .schedule-item { grid-template-columns: 88px 7px minmax(0, 1fr); gap: 10px; }
  .schedule-item__meta { display: none; }
  .urgent-banner { grid-template-columns: auto 1fr; }
  .urgent-banner .button { grid-column: 1 / -1; }
}
