:root {
  color-scheme: light;
  --bg: #f1f1f1;
  --panel: #f7f7f7;
  --card: #fbfbfb;
  --text: #1f1f22;
  --muted: #707177;
  --line: #dedfe2;
  --line-soft: #ebebed;
  --green: #117c4c;
  --green-dark: #0d623c;
  --magenta: #d13bdf;
  --venue: var(--magenta);
  --venue-bg: rgba(209, 59, 223, 0.12);
  --shadow: 0 10px 24px rgba(22, 22, 25, 0.08);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
}

button,
input,
a {
  font: inherit;
}

button {
  border: 0;
}

svg {
  display: block;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.app-shell,
.boot-screen {
  width: 100%;
  min-height: 100dvh;
  background: var(--bg);
}

.boot-screen,
.error-screen {
  display: grid;
  place-items: center;
  padding: 28px;
  text-align: center;
}

.boot-card,
.error-screen {
  color: var(--text);
}

.boot-mark,
.profile-dot {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #54bd72;
  color: #17311f;
  font-weight: 800;
}

.boot-mark {
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  font-size: 1.35rem;
}

.schedule-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 94%, white);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.phone-safe-space {
  height: max(14px, env(safe-area-inset-top));
}

.topbar,
.date-actions,
.day-tabs,
.filter-bar,
.search-row,
.active-filters {
  padding-inline: 14px;
}

.topbar {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  min-height: 72px;
}

.topbar strong {
  justify-self: center;
  font-size: 1.35rem;
  letter-spacing: 0;
}

.profile-dot {
  justify-self: end;
  width: 48px;
  height: 48px;
  font-size: 1.85rem;
}

.icon-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f5f5f5;
  color: #202124;
  cursor: pointer;
}

.icon-button.ghost {
  border-color: transparent;
  background: transparent;
}

.icon-button.is-active {
  border-color: rgba(17, 124, 76, 0.28);
  background: rgba(17, 124, 76, 0.12);
  color: var(--green-dark);
}

.date-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding-bottom: 12px;
}

.date-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: clamp(1.18rem, 4.8vw, 1.45rem);
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.05;
  text-align: left;
}

.date-heading span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.date-heading svg {
  width: 24px;
  min-width: 24px;
}

.action-row {
  display: flex;
  gap: 8px;
}

.search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
}

.search-row input {
  width: 100%;
  min-width: 0;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--text);
  outline: none;
  padding: 0 13px;
}

.day-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding-bottom: 12px;
}

.day-tabs::-webkit-scrollbar,
.filter-bar::-webkit-scrollbar,
.active-filters::-webkit-scrollbar {
  display: none;
}

.day-tab,
.filter-pill {
  min-height: 58px;
  border-radius: 8px;
  background: #e8e8e8;
  color: #292a2d;
  cursor: pointer;
}

.day-tab {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  font-weight: 650;
}

.day-tab span {
  color: #55575c;
  font-size: 1.05rem;
}

.day-tab strong {
  font-size: 1.55rem;
  line-height: 1;
}

.day-tab.is-active {
  background: var(--green);
  color: white;
}

.day-tab.is-active span {
  color: rgba(255, 255, 255, 0.84);
}

.filter-bar {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: none;
}

.filter-pill {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 14px;
  color: #5a5b60;
  font-weight: 800;
  white-space: nowrap;
}

.filter-pill svg {
  width: 16px;
  height: 16px;
}

.filter-pill span {
  display: grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: var(--green);
  color: white;
  font-size: 0.76rem;
}

.filter-pill.is-active {
  background: rgba(17, 124, 76, 0.14);
  color: var(--green-dark);
}

.active-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: none;
}

.active-filters:empty {
  display: none;
}

.active-filters button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  border-radius: 999px;
  background: #fff;
  color: #34363a;
  cursor: pointer;
  padding: 0 11px;
  white-space: nowrap;
}

.active-filters span {
  color: var(--muted);
}

.schedule-main {
  padding: 12px 8px 34px;
}

.status-line {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0 6px 10px 92px;
  color: var(--muted);
  font-size: 0.79rem;
  white-space: nowrap;
}

.schedule-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.session-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.time-rail {
  padding-top: 19px;
  color: #67686d;
  font-size: 1.15rem;
  line-height: 1.1;
  text-align: center;
  white-space: pre-line;
}

.session-card {
  position: relative;
  display: grid;
  min-width: 0;
  grid-template-columns: 5px minmax(0, 1fr);
  gap: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--card);
  box-shadow: var(--shadow);
  cursor: pointer;
  padding: 16px 12px 16px 17px;
}

.session-row.past .session-card {
  opacity: 0.72;
}

.session-row.live .session-card {
  border-color: rgba(17, 124, 76, 0.32);
  box-shadow: 0 0 0 2px rgba(17, 124, 76, 0.08), var(--shadow);
}

.venue-hall {
  --venue: #117c4c;
  --venue-bg: rgba(17, 124, 76, 0.12);
}

.venue-workshop {
  --venue: #8b4cf6;
  --venue-bg: rgba(139, 76, 246, 0.13);
}

.venue-offsite {
  --venue: #b36b12;
  --venue-bg: rgba(179, 107, 18, 0.13);
}

.venue-networking {
  --venue: #0f7b83;
  --venue-bg: rgba(15, 123, 131, 0.13);
}

.venue-virtual {
  --venue: #5f6368;
  --venue-bg: rgba(95, 99, 104, 0.14);
}

.accent {
  width: 5px;
  height: 64px;
  border-radius: 999px;
  background: var(--venue);
}

.session-card-main {
  min-width: 0;
}

.session-meta-top,
.modal-scoreline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 9px;
}

.venue-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: var(--venue-bg);
  color: var(--venue);
  font-size: 0.74rem;
  font-weight: 850;
  padding: 0 9px;
  white-space: nowrap;
}

.star-rating {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #a1640a;
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.star-rating small {
  color: #66686d;
  font-size: 0.72rem;
}

.session-card header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  gap: 8px;
  align-items: start;
}

.session-card h2 {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #222326;
  font-size: clamp(1.14rem, 4.6vw, 1.36rem);
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.28;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.bookmark-button {
  display: inline-flex;
  min-width: 34px;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 8px;
  background: #f1f1f1;
  color: #98999f;
  cursor: pointer;
}

.bookmark-button svg {
  width: 20px;
  height: 20px;
}

.bookmark-button.is-saved {
  background: rgba(17, 124, 76, 0.12);
  color: var(--green);
}

.bookmark-button.is-saved svg {
  fill: currentColor;
}

.session-card dl {
  display: grid;
  gap: 7px;
  margin: 18px 0 0;
}

.session-card div,
.modal-facts p {
  min-width: 0;
}

.session-card dl div,
.modal-facts p {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
}

.session-card dt {
  color: #b7b8bd;
}

.session-card dt svg,
.modal-facts svg {
  width: 17px;
  height: 17px;
}

.session-card dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #494b50;
  font-size: 0.98rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-state {
  display: grid;
  gap: 7px;
  margin: 28px 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  padding: 24px;
  text-align: center;
}

.empty-state span {
  color: var(--muted);
}

.sheet-backdrop,
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  align-items: end;
  background: rgba(0, 0, 0, 0.28);
}

.sheet-backdrop {
  align-items: start;
  padding-top: max(8px, env(safe-area-inset-top));
}

.sheet,
.session-modal {
  width: 100%;
  max-height: 88dvh;
  overflow: auto;
  border-radius: 8px 8px 0 0;
  background: #fbfbfb;
  box-shadow: 0 -24px 70px rgba(0, 0, 0, 0.22);
}

.sheet {
  max-height: calc(100dvh - max(8px, env(safe-area-inset-top)));
  border-radius: 0 0 8px 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

.sheet-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line-soft);
  background: #fbfbfb;
  padding: 16px;
}

.sheet-header div {
  display: grid;
  gap: 3px;
}

.sheet-header span,
.modal-theme {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sheet-header strong {
  font-size: 1.2rem;
}

.sheet-body {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.sheet-category-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.sheet-category-tabs button {
  display: grid;
  min-height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #3a3c40;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 850;
  line-height: 1.1;
  padding: 6px;
}

.sheet-category-tabs button.is-active {
  border-color: rgba(17, 124, 76, 0.26);
  background: var(--green);
  color: #fff;
}

.sheet-category-tabs span {
  display: grid;
  min-width: 19px;
  height: 19px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 0.68rem;
}

.filter-section header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.filter-section h3 {
  margin: 0;
  font-size: 1rem;
}

.filter-section header button {
  background: transparent;
  color: var(--green);
  cursor: pointer;
  font-weight: 800;
}

.choice-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice-grid.is-speakers {
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.choice {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #33353a;
  cursor: pointer;
  padding: 0 11px;
  text-align: left;
}

.choice.is-selected {
  border-color: rgba(17, 124, 76, 0.28);
  background: var(--green);
  color: white;
}

.choice.speaker-choice {
  display: grid;
  max-width: 100%;
  min-height: 48px;
  gap: 3px;
  padding: 7px 10px;
  line-height: 1.18;
}

.speaker-choice .speaker-main,
.speaker-choice small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.speaker-choice .speaker-main {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 850;
}

.country-flag {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 18px;
  height: 12px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 2px;
  background: #e5eaef;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.65) inset;
}

.flag-ca {
  background: linear-gradient(90deg, #d52b1e 0 24%, #fff 24% 76%, #d52b1e 76%);
}

.flag-ca::after {
  position: absolute;
  inset: 3px 7px;
  border-radius: 1px;
  background: #d52b1e;
  content: "";
}

.flag-us {
  background: repeating-linear-gradient(180deg, #b22234 0 1px, #fff 1px 2px);
}

.flag-us::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 8px;
  height: 7px;
  background: #3c3b6e;
  content: "";
}

.flag-jp {
  background: #fff;
}

.flag-jp::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #bc002d;
  content: "";
  transform: translate(-50%, -50%);
}

.flag-world::after {
  position: absolute;
  inset: 2px 5px;
  border: 1px solid #4f9fb0;
  border-radius: 50%;
  content: "";
}

.speaker-choice small {
  color: var(--muted);
  font-size: 0.74rem;
}

.speaker-choice.is-selected small {
  color: rgba(255, 255, 255, 0.8);
}

.sheet-footer,
.modal-actions {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  border-top: 1px solid var(--line-soft);
  background: #fbfbfb;
  padding: 14px 16px max(14px, env(safe-area-inset-bottom));
}

.primary-action,
.secondary-action {
  display: inline-grid;
  min-height: 46px;
  place-items: center;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 850;
  text-decoration: none;
}

.primary-action {
  background: var(--green);
  color: white;
}

.secondary-action {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}

.preference-list {
  display: grid;
  gap: 4px;
  padding: 10px 16px 22px;
}

.preference-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  padding: 16px 0;
  text-align: left;
}

.preference-list span {
  display: grid;
  gap: 4px;
}

.preference-list small {
  color: var(--muted);
}

.preference-list i {
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: #d5d6da;
  position: relative;
}

.preference-list i::after {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  content: "";
  transition: transform 160ms ease;
}

.preference-list i.is-on {
  background: var(--green);
}

.preference-list i.is-on::after {
  transform: translateX(20px);
}

.modal-backdrop {
  align-items: center;
  padding: 18px;
}

.session-modal {
  border-radius: 8px;
  padding: 16px;
}

.session-modal > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.session-modal h2 {
  margin: 8px 0 16px;
  font-size: clamp(1.55rem, 7vw, 2.1rem);
  line-height: 1.1;
}

.modal-facts {
  display: grid;
  gap: 8px;
  border-radius: 8px;
  background: #f0f1f3;
  padding: 13px;
}

.modal-facts p {
  margin: 0;
  color: #3b3d42;
}

.dynam-note {
  display: grid;
  gap: 4px;
  margin: 12px 0 0;
  border-left: 4px solid var(--venue);
  border-radius: 8px;
  background: var(--venue-bg);
  color: #2f3135;
  line-height: 1.35;
  padding: 11px 12px;
}

.dynam-note strong {
  color: var(--text);
}

.modal-description {
  margin: 18px 0;
  color: #3f4146;
  font-size: 1rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.speaker-list {
  display: grid;
  gap: 10px;
  margin: 22px 0;
}

.speaker-list h3 {
  margin: 0;
}

.speaker-item {
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 10px;
}

.speaker-item img,
.speaker-item > span {
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.speaker-item img {
  object-fit: cover;
}

.speaker-item > span {
  display: grid;
  place-items: center;
  background: rgba(17, 124, 76, 0.14);
  color: var(--green-dark);
  font-weight: 850;
}

.speaker-item div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.speaker-item small {
  color: var(--muted);
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.modal-tags span {
  border-radius: 999px;
  background: #edf0ee;
  color: #34363a;
  padding: 7px 10px;
  font-size: 0.84rem;
  font-weight: 750;
}

.is-compact .session-card {
  padding-block: 12px;
}

.is-compact .session-card dl {
  gap: 4px;
  margin-top: 12px;
}

.is-compact .speaker-line {
  display: none;
}

@media (max-width: 340px) {
  .topbar,
  .date-actions,
  .day-tabs,
  .filter-bar,
  .search-row,
  .active-filters {
    padding-inline: 10px;
  }

  .date-actions {
    grid-template-columns: 1fr;
  }

  .action-row {
    justify-content: space-between;
  }

  .action-row .icon-button {
    flex: 1;
  }

  .session-row {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .status-line {
    padding-left: 66px;
  }

  .time-rail {
    font-size: 0.98rem;
  }
}

@media (max-width: 520px) {
  .phone-safe-space {
    height: max(8px, env(safe-area-inset-top));
  }

  .topbar,
  .date-actions,
  .day-tabs,
  .filter-bar,
  .search-row,
  .active-filters {
    padding-inline: 12px;
  }

  .topbar {
    grid-template-columns: 42px 1fr 42px;
    min-height: 58px;
  }

  .topbar strong {
    font-size: 1.15rem;
  }

  .profile-dot {
    width: 42px;
    height: 42px;
    font-size: 1.55rem;
  }

  .icon-button {
    width: 40px;
    height: 40px;
  }

  .date-heading {
    font-size: clamp(1.12rem, 5.2vw, 1.35rem);
  }

  .day-tabs {
    gap: 8px;
  }

  .day-tab {
    min-height: 52px;
  }

  .day-tab span {
    font-size: 0.95rem;
  }

  .day-tab strong {
    font-size: 1.42rem;
  }

  .filter-pill {
    min-height: 42px;
    padding: 0 12px;
  }

  .schedule-main {
    padding-inline: 6px;
  }

  .status-line {
    padding-left: 70px;
  }

  .session-row {
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 6px;
  }

  .time-rail {
    padding-top: 18px;
    font-size: 1.02rem;
  }

  .session-card {
    grid-template-columns: 5px minmax(0, 1fr);
    gap: 10px;
    padding: 14px 10px 14px 12px;
  }

  .session-card h2 {
    font-size: clamp(1.08rem, 5.7vw, 1.3rem);
    line-height: 1.22;
  }

  .session-card dd {
    font-size: 0.92rem;
  }

  .session-meta-top {
    gap: 6px;
    margin-bottom: 7px;
  }
}

@media (max-width: 410px) {
  .session-row {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .status-line {
    padding-left: 58px;
  }

  .venue-chip {
    min-height: 22px;
    font-size: 0.69rem;
    padding-inline: 7px;
  }

  .star-rating small {
    display: none;
  }

  .sheet-category-tabs {
    gap: 5px;
  }

  .sheet-category-tabs button {
    min-height: 38px;
    font-size: 0.72rem;
    padding-inline: 4px;
  }
}

@media (max-width: 340px) {
  .topbar,
  .date-actions,
  .day-tabs,
  .filter-bar,
  .search-row,
  .active-filters {
    padding-inline: 10px;
  }

  .session-row {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .date-actions {
    grid-template-columns: 1fr;
  }

  .action-row {
    justify-content: space-between;
  }

  .action-row .icon-button {
    flex: 1;
  }

  .status-line {
    padding-left: 52px;
  }

  .time-rail {
    font-size: 0.92rem;
  }

  .session-card {
    padding-inline: 10px 8px;
  }
}
