:root {
  --bg: #F4F2EC;
  --surface: #FFFFFF;
  --ink: #12203A;
  --ink-soft: #4A5567;
  --muted: #8A8F98;
  --line: #E2E0D8;
  --accent: #E0692F;
  --accent-soft: #FBE7DB;
  --track-plenary: #12203A;
  --track-bridges: #2E6E62;
  --track-posters: #8A5FA8;
  --track-damping: #C0862B;
  --track-buildings: #2E6E62;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.app {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  padding-bottom: 76px;
}

header.top {
  padding: 22px 20px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

header.top .eyebrow {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 4px;
}

header.top h1 {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}

.day-tabs {
  display: flex;
  gap: 8px;
  padding: 14px 20px;
  overflow-x: auto;
}

.day-tab {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 20px;
  white-space: nowrap;
  cursor: pointer;
}

.day-tab.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

main {
  flex: 1;
  padding: 4px 20px 20px;
}

#programme-list {
  margin: 0 -20px;
}

.view { display: none; }
.view.active { display: block; }

.session-card {
  display: flex;
  gap: 0;
  align-items: stretch;
  cursor: pointer;
}

.session-thumb {
  flex-shrink: 0;
  width: 76px;
  align-self: stretch;
  object-fit: cover;
  display: block;
}

.session-thumb-fallback {
  background: rgba(255,255,255,0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.session-body {
  flex: 1;
  min-width: 0;
  padding: 14px 20px 14px 14px;
}

.session-card .meta {
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  margin: 4px 0 0;
}

.session-card .title {
  font-size: 14.5px;
  font-weight: 600;
  margin: 0 0 4px;
  line-height: 1.35;
  color: #fff;
}

.session-card .speakers {
  font-size: 12.5px;
  color: rgba(255,255,255,0.9);
  margin: 0;
}

.speaker-card {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 10px;
}

.avatar-img {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
  border: 2px solid #fff;
}

.avatar-fallback {
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  flex-shrink: 0;
}

.avatar-fallback.on-color {
  background: rgba(255,255,255,0.25);
  color: #fff;
}

.speaker-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.avatar-stack {
  display: flex;
}

.avatar-stack .avatar-img,
.avatar-stack .avatar-fallback {
  margin-left: -6px;
  border: 2px solid var(--surface);
}

.avatar-stack .avatar-img:first-child,
.avatar-stack .avatar-fallback:first-child {
  margin-left: 0;
}

.header-hero {
  width: 100%;
  aspect-ratio: 16/7;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius);
  margin-top: 12px;
  display: none;
}

.speaker-card .name {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 2px;
}

.speaker-card .aff {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0;
}

.map-wrap {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  aspect-ratio: 4/3;
  overflow: hidden;
}

.map-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  padding: 20px;
}

.map-pin {
  position: absolute;
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.map-pin .dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
}

.map-pin .label {
  font-size: 11px;
  background: var(--ink);
  color: #fff;
  padding: 2px 7px;
  border-radius: 8px;
  margin-top: 4px;
  white-space: nowrap;
}

.notif-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
}

.notif-card .time {
  font-size: 11px;
  color: var(--muted);
  margin: 0 0 4px;
}

.notif-card .text {
  font-size: 13.5px;
  margin: 0;
  line-height: 1.4;
}

.enable-push {
  display: block;
  width: 100%;
  padding: 12px;
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  cursor: pointer;
}

.enable-push.on {
  background: var(--track-bridges);
}

.empty {
  color: var(--muted);
  font-size: 13.5px;
  text-align: center;
  padding: 40px 20px;
}

nav.bottom {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 520px;
  display: flex;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
}

nav.bottom .nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--muted);
  font-size: 10.5px;
  padding: 4px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
}

nav.bottom .nav-item.active {
  color: var(--accent);
}

nav.bottom svg {
  width: 21px;
  height: 21px;
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(18, 32, 58, 0.4);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 50;
}

.sheet-backdrop.open {
  display: flex;
}

.sheet {
  background: var(--surface);
  width: 100%;
  max-width: 520px;
  border-radius: 18px 18px 0 0;
  padding: 20px;
  max-height: 70vh;
  overflow-y: auto;
}

.sheet h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.sheet .meta {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0 0 12px;
}

.sheet .close {
  display: block;
  width: 100%;
  padding: 10px;
  background: var(--bg);
  border: none;
  border-radius: 10px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-soft);
  cursor: pointer;
}
