/* Rajdhani — the typeface used on summercontrast.org (self-hosted for offline).
   Only weights 500–700 are shipped: nothing renders at 400. */
@font-face {
  font-family: 'Rajdhani';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/rajdhani-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Rajdhani';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/rajdhani-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Rajdhani';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/rajdhani-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Rajdhani';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/rajdhani-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Rajdhani';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/rajdhani-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Rajdhani';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/rajdhani-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── themes ─────────────────────────────────────────────── */
:root {
  --bg: #f6f1e7;          /* poster paper */
  --bg-translucent: rgba(246, 241, 231, .88);
  --text: #221c12;
  --muted: #8a7f6c;
  --accent: #ff2727;      /* burnt orange, poster headline color */
  --line: #ddd4c2;
  --line-strong: #221c12;
  --dim: .38;
  --stage-oak: #b34a1e;
  --stage-paradiso: #a07714;
  --stage-slap: #5a4fd0;
  --stage-tribes: #33723f;
  --stage-chill: #22728f;
  --stage-festival: #b3355e;
  --fab-bg: var(--bg);
  --fab-shadow: 0 6px 24px rgba(0, 0, 0, .18);
}
@media (prefers-color-scheme: dark) {
:root {
  --bg: #14110c;
  --bg-translucent: rgba(20, 17, 12, .88);
  --text: #f2ead9;
  --muted: #94886f;
  --accent: #e8b23f;
  --line: #2c2619;
  --line-strong: #f2ead9;
  --dim: .34;
  --stage-oak: #e0663a;
  --stage-paradiso: #e8b23f;
  --stage-slap: #9d93ff;
  --stage-tribes: #6fbf7f;
  --stage-chill: #5fb8d9;
  --stage-festival: #f06f96;
  --fab-bg: #262013; /* raised surface — dark shadows vanish on a dark page */
  --fab-shadow: 0 0 0 1px rgba(242, 234, 217, .12), 0 10px 30px rgba(0, 0, 0, .65);
}
.act .star { color: #453d2c; }
}

* { box-sizing: border-box; }

html { scroll-padding-top: 120px; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Rajdhani', 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
}

body {
  max-width: 640px;
  margin: 0 auto;
  padding: env(safe-area-inset-top) 18px calc(120px + env(safe-area-inset-bottom));
}

button {
  font-family: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

/* ── header ─────────────────────────────────────────────── */
.top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 26px 0 14px;
}
.brand {
  text-align: center;
  flex: 1;
}

.brand h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  line-height: .95;
  letter-spacing: .12em;
  text-transform: uppercase;

}
.brand .dates {
  display: block;
  margin-top: 6px;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--accent);
}
/* ── share section (footer) ─────────────────────────────── */
.foot {
  text-align: center;
  padding: 32px 0;
}

.foot p {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: .1em;
}

.foot h2 {
  margin-top: 40px;
  margin-bottom: 16px;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text);
}
.foot > svg {
  display: block;
  margin: 32px auto;
  max-width: 100%;
  height: auto;
  color: var(--text);
}

.feedback-link {
  margin-top: 22px;
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}

/* ── feedback modal ─────────────────────────────────────── */
.modal {
  margin: auto;
  width: min(88vw, 380px);
  padding: 26px 24px 22px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line-strong);
}
.modal::backdrop {
  background: rgba(0, 0, 0, .55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.modal h2 {
  margin: 0 0 4px;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.modal p {
  margin: 0 0 16px;
  font-size: .92rem;
  font-weight: 500;
  color: var(--muted);
}
.modal textarea {
  width: 100%;
  resize: vertical;
  font: inherit;
  font-weight: 500;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line-strong);
  padding: 10px 12px;
}
.modal textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.modal-actions {
  display: flex;
  gap: 22px;
  align-items: baseline;
  margin-top: 18px;
}
.modal-action {
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}
.modal-action:disabled { opacity: .6; cursor: default; }
.modal-ghost {
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
}
.modal-success {
  margin: 26px 0 !important;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700 !important;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent) !important;
}

/* ── floating favourites button ─────────────────────────── */
.fab {
  position: fixed;
  right: 18px;
  bottom: max(18px, env(safe-area-inset-bottom, 0px));
  z-index: 20;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  font-size: 2rem;
  line-height: 1;
  color: var(--accent);
  background: var(--fab-bg);
  box-shadow: var(--fab-shadow);
}
.fab[aria-pressed="true"] {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}
.fab-left {
  right: auto;
  left: 18px;
}
.fab-left svg { display: block; margin: 0 auto; }

/* ── marquee banner (set via telegram /addbanner) ───────── */
.marquee {
  display: grid;
  grid-template-rows: 0fr; /* collapsed; .open grows to content height */
  margin: 0 -18px;
  background: var(--accent);
  color: var(--bg);
  transition: grid-template-rows .4s ease, margin-bottom .4s ease;
}
.marquee.open {
  grid-template-rows: 1fr;
  margin-bottom: 6px;
}
.marquee-inner {
  overflow: hidden;
  min-height: 0;
  white-space: nowrap;
}
.marquee-track {
  display: inline-block;
  white-space: nowrap;
  padding: 8px 0;
  /* movement is driven by JS (rAF) — CSS keyframes flicker in WebKit here */
  will-change: transform;
  transform: translate3d(0, 0, 0);
}
.marquee-track span {
  padding-right: 3em;
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}

/* ── sticky nav: days + stages ──────────────────────────── */
/* installed on iOS the page runs edge-to-edge: mask the status-bar strip
   so list content can't scroll through behind it */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: env(safe-area-inset-top, 0px);
  z-index: 30;
  background: var(--bg-translucent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.nav {
  position: sticky;
  top: env(safe-area-inset-top, 0px); /* stick below the notch/status bar */
  z-index: 10;
  margin: 0 -18px;
  padding: 0 18px;
}
/* blur lives on a layer behind the content: animating children (the marquee)
   inside a backdrop-filtered element makes Safari flicker their text */
.nav::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--bg-translucent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.day-tabs {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  margin: 0 -18px;
  padding: 8px 18px 0;
  border-bottom: 1px solid var(--line);
}
.day-tabs::-webkit-scrollbar { display: none; }
.day-tabs button {
  flex: 0 0 auto;
  padding: 6px 0 10px;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}
.day-tabs button .dow {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: .2em;
}
.day-tabs button.active {
  color: var(--text);
  font-weight: 700;
  border-bottom-color: var(--accent);
}
.day-tabs button.active .dow { font-weight: 700; }

.stage-chips {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  margin: 0 -18px;
  padding: 12px 18px 0;
  border-bottom: 1px solid var(--line);
}
.stage-chips::-webkit-scrollbar { display: none; }
.stage-chips button {
  flex: 0 0 auto;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  padding-bottom: 9px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.stage-chips button.active {
  color: var(--text);
  font-weight: 700;
  border-bottom-color: var(--accent);
}

/* ── notification banner ────────────────────────────────── */
.banner {
  display: flex;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line-strong);
  padding: 12px;
  margin: 16px 0 0;
  font-size: .9rem;
  font-weight: 500;
}
.banner button {
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .09em;
  padding: 4px 8px;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.banner button.ghost { color: var(--muted); border: none; }

/* ── timetable rows ─────────────────────────────────────── */

.act {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 -18px;
  padding: 16px 12px 16px 16px;
  border-bottom: 1px solid var(--line);
}
.act.past { opacity: var(--dim); }
@keyframes act-flash {
  0%, 100% { background: transparent; }
  25% { background: color-mix(in srgb, var(--accent) 18%, transparent); }
}
.act.flash { animation: act-flash 1.6s ease 2; }
.act.live {
  border-left: 4px solid var(--accent);
  padding-left: 12px; /* 18px minus the border so columns stay aligned */
}

.act .when {
  flex: 0 0 64px;
  text-align: left;
  font-variant-numeric: tabular-nums;
}
.act .when .start {
  display: block;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.1;
}
.act .when .end {
  display: block;
  margin-top: 2px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--muted);
}

.act .who { flex: 1; min-width: 0; }
.act .who .name {
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: .04em;
  text-transform: uppercase;
  overflow-wrap: break-word;
}
.act .who .stage {
  margin-top: 2px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--stage, var(--muted));
}
.act .who .live-tag {
  margin-top: 8px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  letter-spacing: .12em;
}
.act.live .when .start { color: var(--accent); }

.act .star {
  flex: 0 0 auto;
  align-self: center;
  width: 44px;
  height: 44px;
  font-size: 1.5rem;
  color: var(--line);
  text-align: center;
}
.act .star.on { color: var(--accent); }

.empty {
  text-align: center;
  color: var(--muted);
  padding: 64px 0;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-size: .9rem;
}

/* ── footer ─────────────────────────────────────────────── */
.foot {
  color: var(--muted);
  font-size: .85rem;
  font-weight: 500;
}
.foot code {
  font-family: ui-monospace, monospace;
  font-size: .8rem;
  border: 1px solid var(--line);
  padding: 0 4px;
}

.hidden { display: none !important; }
