@font-face {
  font-family: 'Hanken Grotesk';
  src: url('./assets/hanken.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('./assets/plexmono-bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  --font-sans: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Architectural room colors — bold, saturated, unmistakable */
  --c-all: #0D1B3E;
  --c-all-tint: #EFF3FB;
  --c-orion: #0B3BA8;
  --c-orion-bright: #60A5FA;
  --c-orion-tint: #EEF4FF;
  --c-hydra: #046C4E;
  --c-hydra-bright: #34D399;
  --c-hydra-tint: #ECFDF5;
  --c-hercules: #B42318;
  --c-hercules-bright: #F87171;
  --c-hercules-tint: #FEF2F2;
  --c-lyra: #B45309;
  --c-lyra-bright: #FBBF24;
  --c-lyra-tint: #FFFBEB;
  --c-ara: #6D28D9;
  --c-ara-bright: #C084FC;
  --c-ara-tint: #F5F3FF;
  --c-garden: #166534;
  --c-garden-bright: #4ADE80;
  --c-garden-tint: #F0FDF4;

  --stage-bg: var(--c-all);
  --room-accent: var(--c-all);
  --room-tint: var(--c-all-tint);

  --ink: #0F141E;
  --ink-2: #465063;
  --line: #E4E7EE;
  --surface: #FFFFFF;
}

body[data-active-room="orion"] { --stage-bg: var(--c-orion); --room-accent: var(--c-orion); --room-tint: var(--c-orion-tint); }
body[data-active-room="hydra"] { --stage-bg: var(--c-hydra); --room-accent: var(--c-hydra); --room-tint: var(--c-hydra-tint); }
body[data-active-room="hercules"] { --stage-bg: var(--c-hercules); --room-accent: var(--c-hercules); --room-tint: var(--c-hercules-tint); }
body[data-active-room="lyra"] { --stage-bg: var(--c-lyra); --room-accent: var(--c-lyra); --room-tint: var(--c-lyra-tint); }
body[data-active-room="ara"] { --stage-bg: var(--c-ara); --room-accent: var(--c-ara); --room-tint: var(--c-ara-tint); }
body[data-active-room="garden"] { --stage-bg: var(--c-garden); --room-accent: var(--c-garden); --room-tint: var(--c-garden-tint); }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  background: var(--stage-bg);
}

html[data-text-size="large"] {
  font-size: 18px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px));
}

.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;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 200;
  padding: 10px 14px;
  background: #FFFFFF;
  color: var(--ink);
  font-weight: 700;
  border-radius: 8px;
}

/* =========================================================
   COLOR-WORLD TAKEOVER CHROME (Mockup A + Flush Full-Width Tabs)
   ========================================================= */
.agenda-chrome {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--stage-bg);
  color: #FFFFFF;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background-color 0.2s ease;
}

.app-topbar {
  max-width: 720px;
  margin: 0 auto;
  padding: 12px 14px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.app-topbar__brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.app-topbar h1 {
  margin: 0;
  font-size: clamp(1.45rem, 6vw, 1.95rem);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #FFFFFF;
  white-space: nowrap;
}

.app-topbar__sub {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
  white-space: nowrap;
}

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

.btn-pdf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.btn-pdf:hover {
  background: rgba(255, 255, 255, 0.28);
}

.btn-icon {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.82rem;
}
.btn-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.btn-icon[aria-expanded="true"],
.btn-icon[aria-pressed="true"] {
  background: #FFFFFF;
  color: var(--stage-bg);
}

/* Compact Day Segmented Switch + Agora */
.day-bar {
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 14px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.day-bar[hidden] {
  display: none;
}

.days {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  flex: 1;
  background: rgba(0, 0, 0, 0.24);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

.days button {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 7px 6px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
}

.days button[aria-pressed="true"] {
  background: #FFFFFF;
  color: var(--stage-bg);
  font-weight: 800;
}

.btn-now {
  border: 0;
  background: #FFFFFF;
  color: var(--stage-bg);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0 13px;
  height: 36px;
  border-radius: 999px;
  cursor: pointer;
  flex-shrink: 0;
}

/* =========================================================
   EDGE-TO-EDGE FULL-WIDTH ARCHITECTURAL ROOM TABS
   100% horizontal fill · Bold unmistakable color stripe per room
   ========================================================= */
.room-tabs {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(var(--tab-count, 5), minmax(0, 1fr));
  gap: 0;
  align-items: stretch;
  background: rgba(0, 0, 0, 0.2);
}
.room-tabs[hidden] {
  display: none;
}

.room-tab {
  position: relative;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  border-top: 5px solid var(--tab-stripe, #FFFFFF);
  background: transparent;
  color: #FFFFFF;
  font-family: inherit;
  padding: 9px 2px 10px;
  min-height: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.room-tab:last-child {
  border-right: 0;
}

/* Distinct vibrant top color bars so every room is obvious at a glance */
.room-tab[data-room-key="all"]      { --tab-stripe: #FFFFFF; --tab-fg: var(--c-all); }
.room-tab[data-room-key="orion"]    { --tab-stripe: var(--c-orion-bright); --tab-fg: var(--c-orion); }
.room-tab[data-room-key="hydra"]    { --tab-stripe: var(--c-hydra-bright); --tab-fg: var(--c-hydra); }
.room-tab[data-room-key="hercules"] { --tab-stripe: var(--c-hercules-bright); --tab-fg: var(--c-hercules); }
.room-tab[data-room-key="lyra"]     { --tab-stripe: var(--c-lyra-bright); --tab-fg: var(--c-lyra); }
.room-tab[data-room-key="ara"]      { --tab-stripe: var(--c-ara-bright); --tab-fg: var(--c-ara); }
.room-tab[data-room-key="garden"]   { --tab-stripe: var(--c-garden-bright); --tab-fg: var(--c-garden); }

.room-tab__name {
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.015em;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-tab__count {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0.86;
  line-height: 1;
}

/* Active tab merges directly into the white schedule canvas below */
.room-tab[aria-selected="true"] {
  background: #FFFFFF;
  color: var(--tab-fg, var(--ink));
  border-top-color: var(--tab-fg, var(--ink));
  border-right-color: transparent;
}
.room-tab[aria-selected="true"] .room-tab__count {
  opacity: 1;
  color: var(--tab-fg, var(--ink));
}

/* =========================================================
   MAIN SCHEDULE CANVAS — Crisp White Hairline List (Zero AI Cards)
   ========================================================= */
.app-shell {
  max-width: 720px;
  margin: 0 auto;
  background: var(--surface);
  min-height: 60vh;
}

.search-drawer {
  padding: 14px 16px;
  background: #F4F6FA;
  border-bottom: 1px solid var(--line);
}
.search-drawer__grid {
  display: grid;
  gap: 10px;
}
.search-field {
  display: grid;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-2);
}
.search-field input,
.search-field select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1.5px solid #CBD2DF;
  border-radius: 8px;
  background: #FFFFFF;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.94rem;
}
.search-drawer__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 2px;
}
.btn-clear {
  border: 1.5px solid var(--ink);
  background: #FFFFFF;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.btn-site-link {
  color: var(--room-accent);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

.saved-intro {
  padding: 16px 16px 12px;
  border-bottom: 2px solid var(--ink);
}
.saved-intro h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
}
.saved-intro p {
  margin: 4px 0 0;
  font-size: 0.86rem;
  color: var(--ink-2);
}

.notice {
  margin: 12px 16px;
  padding: 12px 14px;
  background: #FEF3C7;
  color: #78350F;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 600;
}

.loading {
  padding: 36px 16px;
  text-align: center;
  color: var(--ink-2);
  font-weight: 600;
}

.day-divider {
  margin: 0;
  padding: 14px 16px 8px;
  font-size: 0.86rem;
  font-weight: 800;
  text-transform: capitalize;
  color: var(--room-accent);
  background: #F4F6FA;
  border-bottom: 1px solid var(--line);
}

/* Time Groups */
.time-group {
  margin: 0;
}

.time-slot-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 16px;
  background: #F5F7FA;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
}
body[data-single-room="true"] .time-slot-bar {
  display: none;
}
.time-group.is-now .time-slot-bar {
  display: flex;
  background: var(--room-tint);
  color: var(--room-accent);
}

/* Individual Lecture Row — High Density, Bold Color Signals, Zero Boxes */
.activity {
  border-bottom: 1px solid var(--line);
  background: #FFFFFF;
}

.activity[data-room-key="orion"]    { --row-color: var(--c-orion); --row-tint: var(--c-orion-tint); }
.activity[data-room-key="hydra"]    { --row-color: var(--c-hydra); --row-tint: var(--c-hydra-tint); }
.activity[data-room-key="hercules"] { --row-color: var(--c-hercules); --row-tint: var(--c-hercules-tint); }
.activity[data-room-key="lyra"]     { --row-color: var(--c-lyra); --row-tint: var(--c-lyra-tint); }
.activity[data-room-key="ara"]      { --row-color: var(--c-ara); --row-tint: var(--c-ara-tint); }
.activity[data-room-key="garden"]   { --row-color: var(--c-garden); --row-tint: var(--c-garden-tint); }

.activity.is-now {
  background: var(--row-tint, var(--room-tint));
}

.activity-row {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) 44px;
  align-items: start;
  gap: 10px;
  padding: 12px 10px 12px 16px;
}

.activity-lead {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding-top: 1px;
}

.activity-time {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--row-color, var(--room-accent));
}

.activity-end {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink-2);
}

/* Bold, unmistakable solid-color room pill in Todas view */
.room-badge {
  display: inline-block;
  margin-bottom: 4px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: #FFFFFF;
  background: var(--c-all);
}
.room-badge[data-room-key="orion"]    { background: var(--c-orion); }
.room-badge[data-room-key="hydra"]    { background: var(--c-hydra); }
.room-badge[data-room-key="hercules"] { background: var(--c-hercules); }
.room-badge[data-room-key="lyra"]     { background: var(--c-lyra); }
.room-badge[data-room-key="ara"]      { background: var(--c-ara); }
.room-badge[data-room-key="garden"]   { background: var(--c-garden); }

/* Hide redundant room pill when already inside that single room's full color world */
body[data-single-room="true"] .room-badge {
  display: none;
}

.activity-main {
  min-width: 0;
  cursor: pointer;
}
.activity-main:focus-visible {
  outline: 2px solid var(--row-color, var(--room-accent));
  outline-offset: 3px;
  border-radius: 4px;
}

.activity-module-line {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--row-color, var(--room-accent));
  margin-bottom: 2px;
}

.activity-title {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.26;
  font-weight: 800;
  letter-spacing: -0.014em;
  color: var(--ink);
}

.activity-meta {
  margin-top: 4px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.speaker-name {
  font-size: 0.82rem;
  line-height: 1.28;
  font-weight: 500;
  color: var(--ink-2);
}

.tap-chevron {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--row-color, var(--room-accent));
  white-space: nowrap;
  flex-shrink: 0;
}

.change-note {
  margin: 6px 0 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: #9A3412;
}

.activity-extra {
  padding: 0 16px 12px 86px;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--ink-2);
}
.activity-extra p {
  margin: 3px 0;
}

/* 44x44 Save Star Button */
.save-button {
  width: 44px;
  height: 44px;
  margin-top: -6px;
  border: 0;
  background: transparent;
  color: #8A94A6;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  border-radius: 999px;
}
.save-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linejoin: round;
}
.save-button[aria-pressed="true"] {
  color: var(--row-color, var(--room-accent));
}
.save-button[aria-pressed="true"] svg {
  fill: currentColor;
}

/* Empty State */
.empty {
  padding: 40px 20px;
  text-align: center;
}
.empty h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 800;
}
.empty p {
  margin: 0 0 16px;
  font-size: 0.9rem;
  color: var(--ink-2);
}
.empty button {
  border: 0;
  background: var(--room-accent);
  color: #FFFFFF;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 11px 18px;
  border-radius: 999px;
  cursor: pointer;
}

/* Help Footer */
.help {
  padding: 20px 16px 28px;
  border-top: 1px solid var(--line);
  background: #F8F9FB;
  font-size: 0.84rem;
  color: var(--ink-2);
}
.help__status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.btn-refresh {
  border: 1.5px solid #CBD2DF;
  background: #FFFFFF;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.help details summary {
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  padding: 4px 0;
}
.help__body {
  padding-top: 8px;
}
.help__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.help__links a {
  color: var(--room-accent);
  font-weight: 700;
}
.help__note {
  margin: 12px 0 0;
  font-size: 0.78rem;
}

/* Feedback Toast */
.feedback {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(82px + env(safe-area-inset-bottom, 0px));
  max-width: 440px;
  margin: 0 auto;
  z-index: 90;
  background: #111216;
  color: #FFFFFF;
  padding: 11px 14px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);
}
.feedback[hidden] {
  display: none;
}
.feedback button {
  border: 0;
  background: #FFFFFF;
  color: #111216;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
}

/* =========================================================
   FLOATING NATIVE iOS CAPSULE DOCK (Mockup A)
   ========================================================= */
.bottom-nav {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 80;
  pointer-events: none;
}

.bottom-nav__inner {
  pointer-events: auto;
  max-width: 420px;
  height: 54px;
  margin: 0 auto;
  padding: 5px;
  background: #111216;
  border-radius: 999px;
  display: grid;
  grid-template-columns: 1.22fr 1.05fr 0.78fr;
  gap: 4px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.bottom-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  text-decoration: none;
  color: #E2E6F0;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.bottom-nav svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.bottom-nav a em {
  font-style: normal;
  font-weight: 800;
}

.bottom-nav a[aria-current="page"] {
  background: #FFFFFF;
  color: var(--room-accent);
  font-weight: 800;
}
