:root {
  --bg: #0b0b14;
  --card: #161625;
  --card2: #1e1e33;
  --line: #2a2a44;
  --text: #f1f1f7;
  --dim: #9a9ab5;
  --warn: #ffb020;
  --accent: #ff2e93;
  /* stage colors, in schedule.json "stages" order */
  --st0: #ff2e93; /* Kinetic Field */
  --st1: #22d3ee; /* Circuit Grounds */
  --st2: #4ade80; /* Neon Garden */
  --st3: #c084fc; /* Stereo Bloom */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }

header {
  position: sticky; top: 0; z-index: 5;
  background: var(--bg);
  padding: calc(10px + env(safe-area-inset-top)) 16px 8px;
  border-bottom: 1px solid var(--line);
}
h1 { margin: 0; font-size: 20px; letter-spacing: .5px; }
#status { color: var(--dim); font-size: 13px; min-height: 18px; }

main { padding: 12px 16px 24px; max-width: 640px; margin: 0 auto; }
h2 { font-size: 20px; margin: 8px 0 12px; }
h3 { font-size: 15px; margin: 22px 0 8px; text-transform: uppercase; letter-spacing: 1px; }
.hint { color: var(--dim); margin: 6px 0 14px; }

nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  display: flex; background: #11111d; border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
nav a {
  flex: 1; text-align: center; padding: 18px 0; color: var(--dim);
  text-decoration: none; font-weight: 600;
}
nav a.on { color: var(--text); box-shadow: inset 0 3px 0 var(--accent); }
nav a.off { opacity: .35; pointer-events: none; }

/* People */
.person {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; min-height: 56px; margin-bottom: 8px; padding: 12px 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; text-align: left;
}
.person.me { border-color: var(--accent); }
.person small { color: var(--dim); }
form.add { display: flex; gap: 8px; margin-top: 18px; }
form.add input {
  flex: 1; min-width: 0; min-height: 52px; padding: 0 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
}
.btn {
  min-height: 52px; padding: 0 18px; border: 0; border-radius: 12px;
  background: var(--accent); color: #fff; font-weight: 700;
}

/* Day tabs */
.days { display: flex; gap: 6px; margin-bottom: 12px; }
.day {
  flex: 1; min-height: 48px; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; font-weight: 600;
}
.day.on { background: var(--text); color: var(--bg); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.toolbar .btn { min-height: 44px; }

/* Stage color hooks */
.st0 { --sc: var(--st0); } .st1 { --sc: var(--st1); }
.st2 { --sc: var(--st2); } .st3 { --sc: var(--st3); }
h3.stagehead { color: var(--sc); }

/* My picks */
.pick {
  background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--sc);
  border-radius: 12px; padding: 10px 12px; margin-bottom: 8px;
}
.pick.clashing { border-color: var(--warn); border-left-color: var(--sc); }
.pick .row { display: flex; justify-content: space-between; gap: 8px; }
.time { color: var(--dim); font-size: 14px; font-variant-numeric: tabular-nums; }
.artist { font-weight: 700; }
.stage { color: var(--sc); font-size: 14px; }
.x {
  width: 48px; height: 48px; flex: none; border-radius: 10px;
  background: var(--card2); border: 1px solid var(--line); font-size: 22px;
}
.clash { color: var(--warn); font-size: 14px; margin-top: 4px; }
.note {
  width: 100%; margin-top: 8px; min-height: 44px; padding: 0 12px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; font-size: 16px;
}

/* Set browser */
.set {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px;
  width: 100%; min-height: 56px; margin-bottom: 6px; padding: 10px 12px;
  background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--sc);
  border-radius: 10px; text-align: left;
}
.set .mark {
  grid-row: 1 / span 2; grid-column: 2; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; border: 2px solid var(--line); font-weight: 700;
}
.set.on { background: var(--card2); border-color: var(--sc); }
.set.on .mark { background: var(--sc); border-color: var(--sc); color: var(--bg); }
.badge { color: var(--warn); font-size: 13px; font-weight: 600; }

/* Group view */
.seg {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; margin-bottom: 10px; scroll-margin-top: 90px;
}
.seg.hl { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.segtime { font-weight: 700; font-variant-numeric: tabular-nums; margin-bottom: 6px; }
.slot { border-left: 4px solid var(--sc); padding: 4px 0 4px 10px; margin: 6px 0; }
.slot b { color: var(--sc); }
.names { font-size: 16px; }
.names .w { color: var(--warn); }
.free { color: var(--dim); font-size: 14px; margin-top: 6px; }

#toast {
  position: fixed; left: 16px; right: 16px; bottom: calc(80px + env(safe-area-inset-bottom));
  background: var(--card2); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; text-align: center; opacity: 0; pointer-events: none; transition: opacity .2s;
}
#toast.show { opacity: 1; }
