:root {
  color-scheme: dark;
  --bg: #07080c;
  --ink: #f7fbff;
  --muted: rgba(220, 242, 255, 0.72);
  --soft: rgba(255, 235, 0, 0.12);
  --line: rgba(255, 235, 0, 0.44);
  --panel: rgba(13, 16, 20, 0.88);
  --panel-solid: #11131a;
  --cyan: #00f0ff;
  --pink: #ff2bd6;
  --green: #39ff88;
  --yellow: #ffeb00;
  --violet: #8c5cff;
  --coral: #ff3434;
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

[data-festival-hide-base44="true"] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 6px),
    linear-gradient(135deg, rgba(255, 235, 0, 0.10), transparent 28%),
    linear-gradient(315deg, rgba(0, 240, 255, 0.14), transparent 32%),
    var(--bg);
  color: var(--ink);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

body.map-expanded {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.onboarding {
  position: relative;
  min-height: 100svh;
  min-height: 100dvh;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: max(18px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  background:
    linear-gradient(132deg, rgba(255, 232, 31, 0.19), transparent 30%),
    linear-gradient(300deg, rgba(0, 229, 255, 0.18), transparent 38%),
    linear-gradient(180deg, #11141d 0%, #090a10 100%);
}

.onboarding-map {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.75;
}

.onboarding-map::before {
  content: "";
  position: absolute;
  inset: 7% 9% 14%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 44%;
  transform: rotate(-9deg);
  box-shadow:
    inset 0 0 0 16px rgba(255, 255, 255, 0.22),
    0 0 40px rgba(0, 122, 255, 0.12);
}

.onboarding-map::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(60, 60, 67, 0.055) 1px, transparent 1px),
    linear-gradient(0deg, rgba(60, 60, 67, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at center, black, transparent 72%);
}

.constellation {
  position: absolute;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.34), transparent);
  transform: rotate(-18deg);
}

.c1 {
  width: 180px;
  left: 12%;
  top: 21%;
}

.c2 {
  width: 240px;
  right: 9%;
  top: 36%;
}

.c3 {
  width: 160px;
  left: 24%;
  bottom: 18%;
}

.auth-card {
  position: relative;
  z-index: 2;
  width: min(520px, 100%);
  padding: 18px;
  display: grid;
  gap: 16px;
  background:
    linear-gradient(135deg, rgba(255, 232, 31, 0.10), transparent 30%),
    rgba(10, 13, 22, 0.86);
  border: 1px solid rgba(255, 232, 31, 0.36);
  border-radius: var(--radius);
  backdrop-filter: blur(22px);
  box-shadow:
    0 28px 72px rgba(0, 0, 0, 0.50),
    inset 0 0 0 1px rgba(0, 229, 255, 0.10);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}

.auth-kicker,
.brand,
.toolbar,
.button-row,
.auth-actions,
.group-share,
.top-meta {
  display: flex;
  align-items: center;
}

.auth-kicker {
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.yang-link {
  min-height: 40px;
  padding: 0 12px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 232, 31, 0.52);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 232, 31, 0.18), rgba(0, 229, 255, 0.10));
  color: var(--yellow);
  font-size: 11px;
  font-weight: 950;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: 0 10px 24px rgba(255, 232, 31, 0.10);
}

.yang-link.compact {
  min-height: 34px;
}

h1,
h2,
p {
  margin: 0;
}

.auth-card h1 {
  max-width: 13ch;
  font-size: clamp(36px, 11vw, 56px);
  line-height: 0.95;
  letter-spacing: 0;
}

.friend-note,
.sync-badge {
  margin: -4px 0 -6px;
  width: fit-content;
  padding: 7px 10px;
  border: 1px solid rgba(0, 229, 255, 0.36);
  border-radius: 8px;
  background: rgba(0, 229, 255, 0.10);
  color: var(--cyan);
  font-size: 12px;
  font-weight: 850;
}

.sync-badge {
  margin: -2px 0 0;
  border-color: rgba(255, 232, 31, 0.42);
  background: rgba(255, 232, 31, 0.10);
  color: var(--yellow);
  text-transform: uppercase;
}

.auth-copy {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.auth-grid,
.field-stack,
.form-grid,
.friend-list,
.parsed-list {
  display: grid;
  gap: 10px;
}

.auth-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(255, 235, 0, 0.28);
  border-radius: var(--radius);
  background: rgba(0, 240, 255, 0.08);
}

.auth-tabs button {
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
}

.auth-tabs button.active {
  background: var(--yellow);
  color: #090a10;
  box-shadow: 0 0 18px rgba(255, 232, 31, 0.24);
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.group-entry {
  display: grid;
  grid-column: 1 / -1;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.group-mode {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  padding: 3px;
  border-radius: var(--radius);
  background: rgba(0, 229, 255, 0.10);
}

.group-mode button {
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.group-mode button.active {
  background: var(--yellow);
  color: #090a10;
  box-shadow: 0 0 18px rgba(255, 232, 31, 0.22);
}

.group-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.group-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 8px;
}

.saved-group-panel {
  display: grid;
  grid-column: 1 / -1;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(255, 235, 0, 0.34);
  border-radius: var(--radius);
  background: rgba(255, 235, 0, 0.08);
}

.saved-group-title {
  color: var(--yellow);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.saved-group-button {
  min-height: 36px;
  border: 1px solid rgba(0, 240, 255, 0.30);
  border-radius: 7px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  text-align: left;
}

.saved-group-button strong {
  min-width: 0;
  overflow: hidden;
  color: #ffffff;
  font-size: 12px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-group-button span {
  color: var(--yellow);
  font-size: 10px;
  font-weight: 950;
}

.icon-mini {
  width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.10);
  color: var(--ink);
}

.icon-mini svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.verification-panel {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(173, 255, 104, 0.28);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(173, 255, 104, 0.14), rgba(83, 226, 255, 0.10));
}

.verification-panel.active {
  box-shadow: 0 0 0 1px rgba(173, 255, 104, 0.22), 0 18px 44px rgba(83, 226, 255, 0.16);
}

.verification-panel strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 11px;
  background: rgba(5, 9, 18, 0.72);
  color: var(--ink);
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(98, 231, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(98, 231, 255, 0.13);
}

input::placeholder,
textarea::placeholder {
  color: rgba(251, 251, 255, 0.42);
}

input[type="file"] {
  padding: 9px;
}

select option {
  color: #111423;
}

textarea {
  resize: vertical;
  line-height: 1.4;
}

.photo-card,
.profile-grid {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 14px;
  align-items: center;
}

.photo-upload {
  min-width: 0;
}

.large-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 3px solid var(--cyan);
  color: #071017;
  background: linear-gradient(135deg, var(--cyan), var(--yellow));
  font-size: 22px;
  font-weight: 950;
  box-shadow: 0 0 28px rgba(98, 231, 255, 0.24);
}

.large-avatar img,
.pin-head img,
.mini-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.action-button,
.text-button {
  min-height: 44px;
  border-radius: var(--radius);
  font-weight: 900;
}

.action-button {
  border: 0;
  padding: 0 16px;
  background: var(--yellow);
  color: #08090d;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
}

.action-button.secondary {
  background: rgba(0, 229, 255, 0.10);
  color: var(--ink);
  border: 1px solid var(--line);
}

.action-button.danger {
  color: #ffd7d7;
  border-color: rgba(255, 73, 73, 0.44);
  background: rgba(255, 73, 73, 0.10);
}

.action-button:disabled {
  opacity: 0.62;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0 4px;
}

.auth-actions,
.button-row {
  gap: 10px;
  flex-wrap: wrap;
}

.muted,
.progress-line {
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
}

.app-shell {
  min-height: 100svh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background:
    linear-gradient(140deg, rgba(255, 232, 31, 0.10), transparent 40%),
    linear-gradient(310deg, rgba(0, 229, 255, 0.12), transparent 38%),
    var(--bg);
}

.topbar {
  z-index: 20;
  margin: max(12px, env(safe-area-inset-top)) 12px 0;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  background:
    linear-gradient(135deg, rgba(255, 232, 31, 0.09), transparent 32%),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(18px);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(0, 240, 255, 0.12) inset;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}

.brand {
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.brand h1 {
  font-size: 18px;
  line-height: 1.1;
}

.brand p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-meta {
  gap: 8px;
  min-width: 0;
  flex: 0 1 auto;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.toolbar {
  gap: 8px;
}

.group-code-chip {
  min-height: 40px;
  min-width: 142px;
  max-width: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 5px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: 6px;
  align-items: center;
  background: rgba(5, 9, 18, 0.72);
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(31, 35, 45, 0.10);
}

.group-code-chip span,
.group-code-chip strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-code-chip span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  line-height: 1.05;
  text-transform: uppercase;
}

.group-code-chip strong {
  overflow: visible;
  text-overflow: clip;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.02em;
  line-height: 1.05;
}

.group-chip {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 5px 10px;
  display: grid;
  align-content: center;
  gap: 1px;
  background: rgba(118, 118, 128, 0.12);
  color: var(--ink);
  text-align: left;
}

.group-chip span {
  font-size: 12px;
  font-weight: 950;
}

.group-chip small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.icon-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(118, 118, 128, 0.12);
  color: var(--ink);
}

.icon-button svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.icon-button.primary {
  background: var(--yellow);
  color: #090a10;
  border-color: transparent;
}

.icon-button.live.active {
  background: rgba(173, 255, 104, 0.22);
  border-color: rgba(173, 255, 104, 0.74);
  color: var(--green);
  box-shadow: 0 0 18px rgba(173, 255, 104, 0.18);
  animation: live-button-glow 1.35s ease-in-out infinite;
}

.icon-button.live.fresh {
  background: var(--green);
  color: #061017;
  border-color: transparent;
}

.icon-button.live.starting svg {
  animation: pulse-ring 1s ease-in-out infinite;
}

.icon-button.ghost {
  background: rgba(255, 255, 255, 0.08);
}

.map-shell {
  position: relative;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 4px 10px;
  overflow: hidden;
}

.map {
  --expanded-list-width: clamp(132px, 27vw, 212px);
  --expanded-list-gap: 8px;
  position: relative;
  width: min(96vw, 62svh, 660px);
  aspect-ratio: 1080 / 1390;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 22px;
  background: #050611;
  box-shadow:
    0 22px 60px rgba(31, 35, 45, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  cursor: zoom-in;
  touch-action: manipulation;
}

.map.expanded {
  position: fixed;
  left: 50%;
  top: 50%;
  width: min(
    calc(100vw - 16px),
    calc((100svh - max(16px, env(safe-area-inset-top)) - max(16px, env(safe-area-inset-bottom))) * 860 / 1390 + var(--expanded-list-width) + var(--expanded-list-gap))
  );
  height: min(
    calc(100svh - max(16px, env(safe-area-inset-top)) - max(16px, env(safe-area-inset-bottom))),
    calc((100vw - 16px - var(--expanded-list-width) - var(--expanded-list-gap)) * 1390 / 860)
  );
  z-index: 4000;
  max-width: none;
  aspect-ratio: auto;
  border-radius: 24px;
  cursor: default;
  transform: translate(-50%, -50%);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.50),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.map::before {
  content: "";
  position: absolute;
  inset: -8px;
  z-index: -1;
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(0, 122, 255, 0.14), transparent 34%),
    linear-gradient(320deg, rgba(52, 199, 89, 0.16), transparent 38%);
  filter: blur(12px);
}

.official-map,
.map-scene,
.apple-map-layer,
.map-glass,
.route-layer,
.stage-layer,
.pin-layer {
  position: absolute;
  inset: 0;
}

.official-map {
  z-index: 1;
  overflow: hidden;
  border-radius: inherit;
  background: #050611;
}

.official-map img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: fill;
  filter: saturate(1.05) contrast(1.08) brightness(1.03);
  opacity: 1;
}

.map.expanded .official-map img {
  width: calc(1080 / 860 * 100%);
  height: 100%;
  object-fit: fill;
  object-position: left top;
}

.map.expanded .official-map {
  right: calc(var(--expanded-list-width) + var(--expanded-list-gap));
}

.map.expanded .route-layer,
.map.expanded .stage-layer,
.map.expanded .pin-layer {
  right: auto;
  width: calc((100% - var(--expanded-list-width) - var(--expanded-list-gap)) * 1080 / 860);
}

.official-map::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04), transparent 24%, transparent 78%, rgba(5, 7, 18, 0.10)),
    radial-gradient(circle at 50% 52%, transparent 0 60%, rgba(5, 7, 18, 0.13) 100%);
}

.apple-map-layer {
  display: none;
  z-index: 2;
  overflow: hidden;
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease;
}

.map.has-apple-map .apple-map-layer {
  opacity: 1;
  pointer-events: auto;
}

.map.has-apple-map .map-scene {
  opacity: 0;
  pointer-events: none;
}

.apple-map-layer > * {
  width: 100%;
  height: 100%;
}

.map-scene {
  display: none;
  z-index: 2;
  overflow: hidden;
  border-radius: inherit;
  background: transparent;
  perspective: 900px;
  mix-blend-mode: screen;
  opacity: 0.58;
  pointer-events: none;
}

.map-plane {
  position: absolute;
  inset: 5% -15% 6%;
  transform: rotateX(58deg) rotateZ(-9deg) scale(1.16);
  transform-origin: 50% 58%;
  border-radius: 34%;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.28) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.24) 1px, transparent 1px);
  background-size: 60px 60px, 60px 60px;
  box-shadow:
    0 46px 62px rgba(61, 76, 92, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.map-glass {
  z-index: 3;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 20%, transparent 78%, rgba(5, 7, 18, 0.16)),
    radial-gradient(circle at 50% 58%, transparent 0 66%, rgba(5, 7, 18, 0.18) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.34),
    inset 0 0 34px rgba(0, 0, 0, 0.10);
}

.map-grass,
.map-road,
.map-building {
  position: absolute;
  display: block;
}

.map-grass {
  border-radius: 45%;
  background: rgba(126, 211, 137, 0.22);
}

.map-grass.g1 {
  left: 2%;
  top: 8%;
  width: 34%;
  height: 28%;
}

.map-grass.g2 {
  right: 7%;
  top: 22%;
  width: 30%;
  height: 24%;
}

.map-grass.g3 {
  left: 14%;
  bottom: 8%;
  width: 36%;
  height: 20%;
}

.map-road {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    inset 0 0 0 2px rgba(197, 206, 216, 0.76),
    0 7px 13px rgba(82, 98, 114, 0.18);
}

.map-road.freeway {
  left: -9%;
  top: 47%;
  width: 118%;
  height: 32px;
  transform: rotate(7deg);
}

.map-road.main {
  left: 45%;
  top: 5%;
  width: 34px;
  height: 91%;
  transform: rotate(-3deg);
}

.map-road.cross {
  left: 8%;
  top: 29%;
  width: 84%;
  height: 24px;
  transform: rotate(-20deg);
}

.map-road.loop {
  left: 18%;
  top: 18%;
  width: 62%;
  height: 57%;
  border: 22px solid #ffffff;
  background: transparent;
  box-shadow:
    inset 0 0 0 2px #cfd6de,
    0 9px 16px rgba(82, 98, 114, 0.14);
}

.map-building {
  width: 54px;
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(249, 251, 253, 0.90), rgba(205, 215, 225, 0.74));
  box-shadow:
    0 9px 0 rgba(185, 197, 208, 0.64),
    0 18px 20px rgba(79, 96, 112, 0.18);
}

.map-building.b1 { left: 18%; top: 18%; }
.map-building.b2 { left: 72%; top: 25%; }
.map-building.b3 { left: 30%; top: 55%; }
.map-building.b4 { left: 62%; top: 63%; }
.map-building.b5 { left: 14%; top: 76%; }

.route-layer {
  display: none;
  z-index: 4;
  pointer-events: none;
}

.route-line {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 18 16;
  opacity: 0.34;
  filter: drop-shadow(0 0 8px currentColor);
}

.route-line.selected {
  stroke-width: 12;
  opacity: 0.74;
}

.stage-layer,
.pin-layer {
  z-index: 5;
}

.pin-layer {
  pointer-events: none;
}

.map-expand-button,
.map-close-button {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 30;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(60, 60, 67, 0.16);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(31, 35, 45, 0.18);
  backdrop-filter: blur(14px);
}

.map-expanded .map-expand-button {
  display: none;
}

.map-close-button {
  background: rgba(5, 7, 18, 0.72);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.22);
}

.map-expand-button svg,
.map-close-button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.expanded-friend-list {
  display: none;
}

.map.expanded .expanded-friend-list {
  position: absolute;
  top: 54px;
  right: 8px;
  bottom: 8px;
  z-index: 45;
  width: var(--expanded-list-width);
  display: grid;
  align-content: start;
  gap: 7px;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid rgba(255, 235, 0, 0.50);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 235, 0, 0.12), transparent 42%),
    rgba(5, 7, 18, 0.88);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.36),
    inset 0 0 0 1px rgba(0, 240, 255, 0.12);
  backdrop-filter: blur(16px);
}

.expanded-friend-title {
  color: var(--yellow);
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.expanded-friend-row {
  min-width: 0;
  min-height: 42px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  display: grid;
  grid-template-columns: 28px auto minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  text-align: left;
}

.expanded-friend-row.active {
  border-color: var(--friend-color);
  box-shadow: 0 0 18px color-mix(in srgb, var(--friend-color), transparent 58%);
}

.expanded-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--friend-color);
  border: 2px solid #ffffff;
  color: #071017;
  font-size: 9px;
  font-weight: 950;
  box-shadow: 0 0 12px color-mix(in srgb, var(--friend-color), transparent 48%);
}

.expanded-friend-name {
  min-width: 0;
  overflow: hidden;
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expanded-grid-badge,
.now-grid {
  display: inline-grid;
  place-items: center;
  border-radius: 5px;
  background: var(--yellow);
  color: #050611;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.expanded-grid-badge {
  min-width: 34px;
  padding: 6px 6px;
  font-size: 12px;
}

.stage-marker {
  position: absolute;
  width: 92px;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: auto;
  cursor: pointer;
}

.stage-marker.label-only {
  width: auto;
  min-width: 74px;
  cursor: default;
}

.stage-marker.label-only .stage-photo,
.stage-marker.label-only .stage-artist {
  display: none !important;
}

.stage-marker.label-only .stage-name {
  max-width: 118px;
  padding: 5px 8px;
  background: rgba(6, 8, 12, 0.92);
  border-color: rgba(255, 235, 0, 0.62);
}

.stage-photo {
  width: 34px;
  height: 34px;
  margin: 0 auto 4px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--stage-art);
  border: 2px solid #ffffff;
  color: white;
  font-size: 9px;
  font-weight: 950;
  box-shadow:
    0 8px 18px rgba(31, 35, 45, 0.20),
    0 0 0 5px color-mix(in srgb, var(--stage-color), transparent 78%);
}

.stage-photo.artist-active {
  border-radius: 50%;
  font-size: 8px;
  letter-spacing: 0;
  overflow: hidden;
  background: var(--stage-art);
}

.stage-photo.artist-active img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  grid-area: 1 / 1;
}

.stage-marker:focus-visible .stage-photo,
.stage-marker:hover .stage-photo {
  border-color: var(--yellow);
  transform: translateY(-1px);
  box-shadow:
    0 0 0 4px rgba(255, 235, 0, 0.18),
    0 0 22px rgba(0, 240, 255, 0.42);
}

.stage-name {
  display: inline-block;
  max-width: 92px;
  padding: 4px 7px;
  border-radius: 4px;
  background: rgba(6, 8, 12, 0.88);
  border: 1px solid rgba(255, 235, 0, 0.52);
  color: var(--yellow);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

.stage-artist {
  display: inline-block;
  max-width: 112px;
  margin-top: 3px;
  padding: 3px 6px;
  border-radius: 4px;
  background: rgba(5, 7, 18, 0.72);
  border: 1px solid rgba(0, 240, 255, 0.36);
  color: #ffffff;
  font-size: 8px;
  font-weight: 900;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 6px 14px rgba(31, 35, 45, 0.18);
}

.map.expanded .stage-artist {
  max-width: 148px;
  font-size: 10px;
  white-space: normal;
}

.friend-pin,
.bucket-pin {
  position: absolute;
  pointer-events: auto;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  transform: translate(-50%, -50%);
  transition:
    left 1650ms cubic-bezier(.25, .8, .24, 1),
    top 1650ms cubic-bezier(.25, .8, .24, 1),
    transform 180ms ease;
  display: grid;
  justify-items: center;
  gap: 2px;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.friend-pin.dragging,
.bucket-pin.dragging {
  z-index: 80;
  cursor: grabbing;
  transition: none;
}

.friend-pin {
  width: 58px;
}

.friend-pin.selected {
  transform: translate(-50%, -50%) scale(1.05);
  z-index: 10;
}

.bucket-pin {
  width: 72px;
  z-index: 11;
}

.bucket-pin.selected {
  transform: translate(-50%, -50%) scale(1.05);
}

.bucket-name {
  max-width: 76px;
  min-height: 16px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(5, 7, 18, 0.84);
  border: 1px solid rgba(255, 235, 0, 0.58);
  color: var(--yellow);
  font-size: 8px;
  font-weight: 950;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 0 16px rgba(255, 235, 0, 0.22);
}

.bucket-stack {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.95), transparent 0 10px),
    linear-gradient(135deg, var(--yellow), var(--cyan));
  border: 3px solid #ffffff;
  color: #050611;
  box-shadow:
    0 0 0 3px rgba(255, 235, 0, 0.28),
    0 12px 24px rgba(0, 0, 0, 0.34),
    0 0 22px rgba(0, 240, 255, 0.34);
}

.bucket-count {
  position: relative;
  z-index: 2;
  font-size: 16px;
  font-weight: 950;
  line-height: 1;
}

.bucket-small {
  position: absolute;
  bottom: -5px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--friend-color, var(--cyan));
  border: 2px solid #ffffff;
  color: #071017;
  font-size: 7px;
  font-weight: 950;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.28);
}

.bucket-small.one {
  left: -4px;
}

.bucket-small.two {
  right: -4px;
}

.friend-pin.live .pin-head {
  box-shadow:
    0 0 0 4px rgba(173, 255, 104, 0.18),
    0 0 24px rgba(173, 255, 104, 0.42);
}

.friend-pin.live .pin-head::after {
  content: none;
}

.pin-name {
  max-width: 62px;
  min-height: 15px;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(60, 60, 67, 0.18);
  color: rgba(17, 17, 20, 0.88);
  font-size: 8px;
  font-weight: 950;
  line-height: 1.1;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(31, 35, 45, 0.14);
}

.pin-grid {
  display: none;
  min-width: 30px;
  padding: 3px 7px;
  border-radius: 4px;
  background: rgba(5, 7, 18, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #ffffff;
  font-size: 8px;
  font-weight: 950;
  line-height: 1.05;
  box-shadow: 0 5px 14px rgba(31, 35, 45, 0.18);
}

.friend-pin.selected .pin-grid,
.map.expanded .pin-grid {
  display: inline-block;
}

.friend-pin.selected .pin-grid {
  order: -1;
  min-width: 58px;
  padding: 6px 10px;
  background: var(--yellow);
  color: #090a10;
  border-color: rgba(255, 255, 255, 0.70);
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0.02em;
  box-shadow:
    0 0 0 3px rgba(255, 235, 0, 0.26),
    0 0 24px rgba(255, 235, 0, 0.34),
    0 10px 24px rgba(0, 0, 0, 0.36);
}

.map.expanded .friend-pin.selected .pin-grid {
  min-width: 70px;
  font-size: 22px;
}

.pin-person {
  display: none;
  width: 0;
  height: 0;
}

.pin-body,
.pin-status {
  display: none;
}

.pin-head {
  position: relative;
  z-index: 2;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid #ffffff;
  outline: 2px solid var(--friend-color);
  background: var(--friend-color);
  color: #071017;
  font-size: 9px;
  font-weight: 950;
  box-shadow:
    0 6px 14px rgba(31, 35, 45, 0.24),
    0 0 12px color-mix(in srgb, var(--friend-color), transparent 32%);
}

.selected .pin-head {
  width: 34px;
  height: 34px;
  border-width: 3px;
}

.map.expanded .friend-pin {
  width: 70px;
}

.map.expanded .bucket-pin {
  width: 84px;
}

.map.expanded .bucket-stack {
  width: 54px;
  height: 54px;
}

.map.expanded .pin-name {
  max-width: 78px;
  min-height: 17px;
  padding: 3px 7px;
  font-size: 9px;
}

.map.expanded .pin-head {
  width: 34px;
  height: 34px;
  border-width: 3px;
}

.map.expanded .selected .pin-head {
  width: 40px;
  height: 40px;
}

.pin-head img,
.mini-avatar img,
.expanded-avatar img,
.large-avatar img,
.bucket-small img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pin-body {
  position: relative;
  width: 30px;
  height: 27px;
  margin-top: -1px;
}

.pin-torso,
.pin-arm,
.pin-leg {
  position: absolute;
  left: 50%;
  width: 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--friend-color), white 18%);
  box-shadow: 0 0 8px color-mix(in srgb, var(--friend-color), transparent 30%);
  transform-origin: top center;
}

.pin-torso {
  top: 0;
  height: 15px;
  transform: translateX(-50%);
}

.pin-arm {
  top: 4px;
  height: 14px;
}

.pin-arm.left {
  transform: translateX(-50%) rotate(42deg);
}

.pin-arm.right {
  transform: translateX(-50%) rotate(-42deg);
}

.pin-leg {
  top: 13px;
  height: 16px;
}

.pin-leg.left {
  transform: translateX(-50%) rotate(28deg);
}

.pin-leg.right {
  transform: translateX(-50%) rotate(-28deg);
}

.walking .pin-arm.left,
.walking .pin-leg.right {
  animation: step-forward 420ms ease-in-out infinite;
}

.walking .pin-arm.right,
.walking .pin-leg.left {
  animation: step-back 420ms ease-in-out infinite;
}

.pin-status {
  width: 108px;
  min-height: 18px;
  padding: 3px 6px;
  border-radius: var(--radius);
  background: rgba(5, 7, 18, 0.70);
  color: rgba(255, 255, 255, 0.76);
  font-size: 9px;
  font-weight: 750;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.selected .pin-status {
  display: block;
}

.timeline-panel {
  position: relative;
  z-index: 20;
  margin: 0 12px max(12px, env(safe-area-inset-bottom));
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(255, 235, 0, 0.10), transparent 22%),
    linear-gradient(315deg, rgba(0, 240, 255, 0.13), transparent 34%),
    rgba(6, 8, 13, 0.94);
  border: 1px solid rgba(255, 235, 0, 0.58);
  border-radius: var(--radius);
  backdrop-filter: blur(18px);
  box-shadow:
    0 -14px 34px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(0, 240, 255, 0.16),
    0 0 28px rgba(0, 240, 255, 0.18);
}

.now-card {
  min-height: 52px;
  margin-bottom: 10px;
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  align-items: start;
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(0, 240, 255, 0.16), transparent 46%),
    rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(0, 240, 255, 0.24);
}

.eyebrow {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.now-card strong {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  font-size: 16px;
  overflow: visible;
  white-space: normal;
}

.now-grid {
  min-width: 38px;
  padding: 5px 7px;
  font-size: 12px;
}

.location-status {
  display: block;
  margin-top: 3px;
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
  overflow: visible;
  white-space: normal;
}

.now-card > span {
  max-width: 100%;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  overflow: visible;
  white-space: normal;
}

.timeline-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.current-location-switch {
  min-height: 34px;
  border: 1px solid rgba(0, 240, 255, 0.28);
  border-radius: var(--radius);
  padding: 0 4px 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(6, 8, 13, 0.86);
  color: rgba(247, 251, 255, 0.86);
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.current-location-switch.active {
  color: var(--ink);
}

.switch-track {
  position: relative;
  width: 46px;
  height: 28px;
  flex: 0 0 46px;
  border-radius: 999px;
  background: #d1d1d6;
  box-shadow: inset 0 0 0 1px rgba(60, 60, 67, 0.12);
  transition: background 180ms ease;
}

.switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 5px rgba(31, 35, 45, 0.26);
  transition: transform 180ms ease;
}

.current-location-switch.active .switch-track {
  background: #34c759;
}

.current-location-switch.active .switch-thumb {
  transform: translateX(18px);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 3px;
  border-radius: var(--radius);
  background: rgba(3, 5, 10, 0.92);
  border: 1px solid rgba(255, 235, 0, 0.42);
  box-shadow: inset 0 0 18px rgba(0, 240, 255, 0.10);
}

.segmented button {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: rgba(247, 251, 255, 0.82);
  font-size: 13px;
  font-weight: 900;
}

.segmented button.active {
  background: var(--yellow);
  border-color: rgba(255, 255, 255, 0.74);
  color: #050611;
  box-shadow:
    0 0 0 1px rgba(0, 240, 255, 0.28),
    0 0 18px rgba(255, 235, 0, 0.28);
}

output {
  position: absolute;
  left: clamp(38px, var(--time-progress, 0%), calc(100% - 38px));
  top: -6px;
  min-width: 74px;
  padding: 4px 7px;
  border-radius: 4px;
  background: var(--yellow);
  border: 1px solid rgba(255, 255, 255, 0.72);
  color: #050611;
  text-align: center;
  font-weight: 950;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  transform: translateX(-50%);
  box-shadow:
    0 0 18px rgba(255, 235, 0, 0.28),
    0 5px 14px rgba(0, 0, 0, 0.28);
  pointer-events: none;
}

.time-slider-wrap {
  position: relative;
  margin-top: 14px;
  padding-top: 20px;
}

.time-range {
  width: 100%;
  margin: 0 0 3px;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  accent-color: var(--cyan);
  cursor: pointer;
}

.time-range::-webkit-slider-runnable-track {
  height: 9px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--pink), var(--yellow) var(--time-progress, 0%), rgba(255, 255, 255, 0.18) var(--time-progress, 0%));
  border: 1px solid rgba(0, 240, 255, 0.46);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.20);
}

.time-range::-webkit-slider-thumb {
  appearance: none;
  width: 24px;
  height: 24px;
  margin-top: -8px;
  border-radius: 50%;
  background: var(--cyan);
  border: 3px solid #ffffff;
  box-shadow:
    0 0 0 3px rgba(0, 240, 255, 0.24),
    0 0 22px rgba(0, 240, 255, 0.42);
}

.time-range::-moz-range-track {
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(0, 240, 255, 0.46);
}

.time-range::-moz-range-progress {
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--pink), var(--yellow));
}

.time-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--cyan);
  border: 3px solid #ffffff;
}

.timeline-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.friend-strip {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.friend-strip::-webkit-scrollbar {
  display: none;
}

.friend-chip,
.friend-row {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
}

.friend-chip {
  width: 180px;
  flex: 0 0 180px;
  border: 0;
  border-radius: var(--radius);
  padding: 7px;
  background: rgba(255, 255, 255, 0.08);
  text-align: left;
}

.friend-chip.active {
  background: rgba(255, 255, 255, 0.18);
}

.mini-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--friend-color);
  color: #071017;
  font-size: 11px;
  font-weight: 950;
  border: 2px solid var(--friend-color);
}

.chip-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.chip-name,
.chip-status {
  display: block;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.chip-name {
  font-size: 12px;
  font-weight: 950;
}

.chip-status {
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
}

.bucket-subtitle {
  margin: -8px 0 0;
  padding: 8px 10px;
  border-radius: 4px;
  background: rgba(255, 235, 0, 0.12);
  border: 1px solid rgba(255, 235, 0, 0.46);
  color: var(--yellow);
  font-size: 12px;
  font-weight: 950;
  line-height: 1.25;
  letter-spacing: 0;
}

.bucket-list {
  display: grid;
  gap: 8px;
}

.bucket-row {
  width: 100%;
  border: 1px solid rgba(0, 240, 255, 0.20);
  border-radius: var(--radius);
  padding: 8px;
  background: rgba(255, 255, 255, 0.07);
  text-align: left;
}

.bucket-row.active {
  border-color: var(--yellow);
  box-shadow: 0 0 18px rgba(255, 235, 0, 0.18);
}

.bucket-row-grid {
  flex: 0 0 auto;
  padding: 6px 8px;
  border-radius: 4px;
  background: var(--yellow);
  color: #050611;
  font-size: 15px;
  font-weight: 950;
}

dialog {
  width: min(560px, calc(100vw - 24px));
  max-height: min(82svh, 760px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--panel-solid);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.58);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(5px);
}

.sheet {
  margin: 0;
  padding: 14px;
  display: grid;
  gap: 14px;
}

.sheet.tall {
  max-height: 82svh;
  overflow: auto;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sheet h2 {
  font-size: 20px;
  letter-spacing: 0;
}

.sheet h3 {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.profile-group-panel,
.schedule-upload-card,
.schedule-source,
.friend-detail-card,
.stage-detail-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 235, 0, 0.08), transparent 36%),
    rgba(255, 255, 255, 0.06);
}

.schedule-upload-card {
  border-color: rgba(255, 235, 0, 0.42);
  background:
    linear-gradient(135deg, rgba(255, 235, 0, 0.16), rgba(0, 240, 255, 0.08)),
    rgba(6, 8, 13, 0.82);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.schedule-upload-card strong {
  color: var(--ink);
  font-size: 16px;
}

.schedule-upload-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.schedule-upload-card input[type="file"] {
  width: 100%;
  min-height: 44px;
  padding: 10px;
  border: 1px dashed rgba(255, 235, 0, 0.44);
  border-radius: 4px;
  background: rgba(5, 9, 18, 0.72);
  color: var(--ink);
}

.schedule-source strong,
.friend-detail-card strong {
  display: block;
  font-size: 15px;
}

.schedule-source p,
.friend-detail-card small,
.stage-detail-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.friend-detail-card,
.stage-detail-card {
  grid-template-columns: 88px 1fr;
  align-items: center;
}

.stage-detail-photo {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 3px solid var(--yellow);
  background: var(--stage-art);
  color: #08090d;
  font-size: 20px;
  font-weight: 950;
  box-shadow:
    0 0 0 5px rgba(255, 235, 0, 0.12),
    0 0 32px rgba(0, 240, 255, 0.24);
}

.stage-detail-photo img,
.stage-set-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-grid-badge {
  width: fit-content;
  margin-top: 8px;
  display: block;
  padding: 7px 10px;
  border: 1px solid rgba(0, 240, 255, 0.50);
  border-radius: 4px;
  background: var(--yellow);
  color: #08090d;
  font-size: 24px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0.02em;
  box-shadow: 0 0 24px rgba(255, 235, 0, 0.20);
}

.friend-schedule-day {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(118, 118, 128, 0.08);
}

.friend-schedule-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.friend-schedule-day-header strong {
  font-size: 14px;
}

.friend-schedule-day-header span,
.friend-schedule-empty {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.friend-schedule-empty {
  margin: 0;
}

.friend-schedule-event {
  padding: 8px;
  background: rgba(255, 255, 255, 0.56);
}

.stage-set-list {
  display: grid;
  gap: 8px;
}

.stage-set-row {
  width: 100%;
  min-height: 54px;
  padding: 8px;
  border: 1px solid rgba(0, 240, 255, 0.22);
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  text-align: left;
}

.stage-set-row.active {
  border-color: var(--yellow);
  background:
    linear-gradient(90deg, rgba(255, 235, 0, 0.16), rgba(0, 240, 255, 0.08)),
    rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 22px rgba(255, 235, 0, 0.12);
}

.stage-set-thumb {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--stage-art);
  border: 2px solid rgba(255, 235, 0, 0.76);
}

.crop-sheet {
  gap: 16px;
}

.crop-preview {
  display: grid;
  place-items: center;
  padding: 12px;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.86) 0 45%, rgba(0, 122, 255, 0.10) 46%, transparent 58%),
    rgba(118, 118, 128, 0.10);
}

#photoCropCanvas {
  width: min(300px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  cursor: grab;
  touch-action: none;
  box-shadow:
    0 12px 28px rgba(31, 35, 45, 0.18),
    0 0 0 6px rgba(255, 255, 255, 0.76),
    0 0 0 7px rgba(60, 60, 67, 0.12);
}

#photoCropCanvas:active {
  cursor: grabbing;
}

.friend-list.compact {
  max-height: 240px;
  overflow: auto;
}

.manager-list {
  gap: 8px;
}

.group-share {
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.group-share span {
  font-weight: 950;
  letter-spacing: 0.04em;
}

.friend-row,
.parsed-event {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: rgba(255, 255, 255, 0.07);
}

.friend-row {
  text-align: left;
}

.friend-row.has-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.friend-row-main {
  min-width: 0;
  border: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  background: transparent;
  color: inherit;
  text-align: left;
}

.remove-friend-button {
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid rgba(255, 52, 52, 0.56);
  border-radius: 4px;
  background: rgba(255, 52, 52, 0.14);
  color: #ffd6d6;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.manager-pill {
  margin-left: 6px;
  display: inline-flex;
  vertical-align: middle;
  padding: 2px 5px;
  border: 1px solid rgba(255, 235, 0, 0.48);
  border-radius: 4px;
  color: var(--yellow);
  font-size: 8px;
  font-weight: 950;
  text-transform: uppercase;
}

.friend-row.active {
  background: rgba(255, 255, 255, 0.16);
}

.parsed-event strong,
.parsed-event span {
  display: block;
}

.parsed-event strong {
  font-size: 13px;
}

.parsed-event span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.ocr-text {
  min-height: 160px;
}

.admin-sheet {
  width: min(980px, calc(100vw - 20px));
  max-height: min(88svh, 840px);
  overflow: auto;
}

.admin-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.admin-stat,
.admin-group-card,
.admin-member-row {
  border: 1px solid rgba(255, 235, 0, 0.36);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 235, 0, 0.08), transparent 38%),
    rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(0, 240, 255, 0.08);
}

.admin-stat {
  min-height: 72px;
  padding: 10px;
  display: grid;
  align-content: center;
  gap: 2px;
}

.admin-stat strong {
  color: var(--yellow);
  font-size: 23px;
  font-weight: 950;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.admin-stat span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-section {
  display: grid;
  gap: 10px;
}

.admin-group-list,
.admin-member-list {
  display: grid;
  gap: 8px;
}

.admin-group-card {
  min-height: 64px;
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(150px, 1.1fr) minmax(180px, 1fr) minmax(170px, 0.9fr) auto;
  gap: 8px;
  align-items: center;
}

.admin-group-title,
.admin-member-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.admin-group-title strong,
.admin-member-copy strong {
  min-width: 0;
  overflow: hidden;
  color: #ffffff;
  font-size: 13px;
  font-weight: 950;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-group-title span,
.admin-member-copy span,
.admin-member-copy small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-meta {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.admin-chip {
  min-height: 24px;
  max-width: 100%;
  padding: 6px 7px;
  border: 1px solid rgba(0, 240, 255, 0.32);
  border-radius: 5px;
  background: rgba(0, 240, 255, 0.10);
  color: rgba(247, 251, 255, 0.88);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.admin-action {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid rgba(255, 235, 0, 0.46);
  border-radius: 5px;
  background:
    linear-gradient(135deg, rgba(255, 235, 0, 0.16), rgba(0, 240, 255, 0.08)),
    rgba(5, 7, 18, 0.80);
  color: var(--yellow);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.admin-action.danger {
  border-color: rgba(255, 52, 52, 0.56);
  background: rgba(255, 52, 52, 0.16);
  color: #ffd6d6;
}

.admin-member-row {
  min-height: 58px;
  padding: 9px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1.1fr) minmax(150px, 0.85fr) auto;
  gap: 9px;
  align-items: center;
}

.admin-member-row.removed {
  opacity: 0.58;
}

.admin-member-row .mini-avatar {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
}

@media (min-width: 760px) {
  .topbar,
  .timeline-panel {
    margin-left: auto;
    margin-right: auto;
    width: min(960px, calc(100vw - 32px));
  }

  .map {
    width: min(72vw, 68svh, 760px);
  }
}

@media (max-width: 760px) {
  .admin-sheet {
    max-height: 92svh;
  }

  .admin-toolbar,
  .admin-group-card,
  .admin-member-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .admin-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .auth-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar {
    align-items: center;
  }

  .top-meta {
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
  }

  .group-code-chip {
    min-width: 132px;
    max-width: none;
  }

  .group-chip {
    display: none;
  }
}

@media (max-width: 430px), (max-height: 760px) {
  .onboarding {
    min-height: 100dvh;
    overflow-y: auto;
    padding: max(8px, env(safe-area-inset-top)) 10px calc(max(8px, env(safe-area-inset-bottom)) + 18px);
    place-items: start center;
  }

  .auth-card {
    width: min(420px, 100%);
    max-height: none;
    overflow: visible;
    padding: 12px;
    gap: 9px;
    border-radius: 14px;
    box-shadow: 0 18px 44px rgba(31, 35, 45, 0.14);
  }

  .auth-kicker {
    gap: 7px;
    font-size: 10px;
  }

  .auth-card .yang-link {
    min-height: 30px;
    padding: 0 8px;
    font-size: 10px;
  }

  .auth-card h1 {
    max-width: none;
    font-size: clamp(28px, 8vw, 34px);
    line-height: 0.98;
  }

  .auth-copy {
    font-size: 12px;
    line-height: 1.3;
  }

  .friend-note {
    margin: -2px 0 -4px;
    padding: 6px 9px;
    font-size: 10px;
    line-height: 1.2;
  }

  .sync-badge {
    margin-top: -3px;
    padding: 5px 8px;
    font-size: 9px;
    line-height: 1.1;
  }

  .auth-grid,
  .field-stack,
  .friend-list,
  .parsed-list {
    gap: 8px;
  }

  label,
  .group-entry {
    gap: 4px;
    font-size: 11px;
  }

  .group-mode button {
    min-height: 30px;
    font-size: 11px;
  }

  .group-hint {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.2;
  }

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

  input,
  select,
  textarea {
    min-height: 38px;
    border-radius: 12px;
    padding: 8px 10px;
  }

  .icon-mini {
    width: 38px;
    min-height: 38px;
    border-radius: 12px;
  }

  .photo-card {
    grid-template-columns: 60px 1fr;
    gap: 10px;
  }

  .large-avatar {
    width: 60px;
    height: 60px;
    font-size: 16px;
    border-width: 2px;
  }

  input[type="file"] {
    min-height: 38px;
    padding: 7px;
  }

  .action-button,
  .text-button {
    min-height: 40px;
    border-radius: 12px;
  }

  .muted,
  .progress-line {
    min-height: 14px;
  }
}

@media (max-height: 680px) {
  .auth-card {
    gap: 7px;
    padding: 10px;
  }

  .auth-card h1 {
    font-size: 26px;
  }

  .auth-copy {
    font-size: 10px;
    line-height: 1.2;
  }

  .photo-card {
    grid-template-columns: 54px 1fr;
  }

  .large-avatar {
    width: 54px;
    height: 54px;
  }
}

@media (max-height: 620px) {
  .auth-kicker,
  .group-entry > span,
  .group-hint {
    display: none;
  }

  .auth-card {
    gap: 6px;
  }

  .auth-card h1 {
    font-size: 22px;
    line-height: 1.02;
  }

  .auth-grid,
  .field-stack {
    gap: 6px;
  }

  input,
  select,
  textarea,
  .icon-mini {
    min-height: 34px;
  }

  .group-mode button {
    min-height: 28px;
  }

  .photo-card {
    grid-template-columns: 46px 1fr;
    gap: 8px;
  }

  .large-avatar {
    width: 46px;
    height: 46px;
    font-size: 13px;
  }

  input[type="file"] {
    min-height: 34px;
    padding: 5px;
  }

  .action-button,
  .text-button {
    min-height: 36px;
  }

  .muted,
  .progress-line {
    min-height: 0;
  }
}

@media (max-width: 430px) {
  .app-shell {
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .topbar {
    margin: max(6px, env(safe-area-inset-top)) 8px 0;
    padding: 6px;
    gap: 6px;
    flex-wrap: nowrap;
    border-radius: 16px;
  }

  .brand {
    gap: 6px;
    flex: 1 1 auto;
    max-width: 122px;
  }

  .brand h1 {
    display: none;
  }

  .brand p {
    display: none;
  }

  .yang-link {
    min-height: 31px;
    padding: 0 8px;
    font-size: 8px;
    line-height: 1.05;
  }

  .top-meta {
    flex: 0 0 auto;
    gap: 5px;
  }

  .toolbar {
    gap: 5px;
  }

  .group-code-chip {
    min-height: 32px;
    width: clamp(132px, 38vw, 170px);
    max-width: none;
    padding: 3px 4px 3px 7px;
    grid-template-columns: minmax(0, 1fr);
    border-radius: 12px;
  }

  .group-code-chip span {
    font-size: 8px;
  }

  .group-code-chip strong {
    font-size: 10px;
  }

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

  .icon-button svg {
    width: 17px;
    height: 17px;
  }

  .map-shell {
    padding: 2px 6px;
  }

  .map {
    width: min(97vw, 53svh, 500px);
    border-radius: 18px;
  }

  .timeline-panel {
    margin: 0 8px max(6px, env(safe-area-inset-bottom));
    padding: 8px;
    border-radius: 14px;
  }

  .now-card {
    min-height: 0;
    margin-bottom: 6px;
    padding: 6px 8px;
    grid-template-columns: 1fr;
    gap: 4px;
    align-items: start;
  }

  .now-card .eyebrow {
    display: none;
  }

  .now-card > div {
    min-width: 0;
    display: grid;
    gap: 2px;
  }

  .now-card strong,
  .location-status,
  .now-card > span {
    min-width: 0;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.15;
  }

  .now-card strong {
    flex: 0 1 auto;
    font-size: 12px;
  }

  .location-status {
    margin: 0;
    font-size: 10px;
  }

  .now-card > span {
    font-size: 10px;
    text-align: left;
  }

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

  .current-location-switch {
    min-height: 28px;
    border-radius: 12px;
    padding: 0 3px 0 7px;
    gap: 5px;
    font-size: 10px;
  }

  .switch-track {
    width: 38px;
    height: 23px;
    flex-basis: 38px;
  }

  .switch-thumb {
    width: 19px;
    height: 19px;
  }

  .current-location-switch.active .switch-thumb {
    transform: translateX(15px);
  }

  .segmented {
    padding: 2px;
    border-radius: 12px;
  }

  .segmented button {
    min-height: 28px;
    font-size: 11px;
  }

  .time-slider-wrap {
    margin-top: 8px;
    padding-top: 16px;
  }

  output {
    top: -3px;
    min-width: 58px;
    padding: 3px 5px;
    font-size: 10px;
  }

  .timeline-labels {
    font-size: 9px;
  }

  .friend-strip {
    display: none;
  }

  .stage-name {
    max-width: 82px;
    padding: 3px 5px;
    font-size: 8px;
  }

  .stage-artist {
    max-width: 92px;
    padding: 2px 5px;
    font-size: 7px;
  }

  .friend-pin {
    width: 50px;
  }

  .pin-name {
    max-width: 54px;
    font-size: 7px;
  }

  .pin-head {
    width: 25px;
    height: 25px;
    font-size: 8px;
  }

  .selected .pin-head {
    width: 30px;
    height: 30px;
  }

  .admin-sheet {
    width: calc(100vw - 14px);
    padding: 10px;
    gap: 10px;
  }

  .admin-stat {
    min-height: 58px;
    padding: 8px;
  }

  .admin-stat strong {
    font-size: 19px;
  }

  .admin-action {
    min-height: 28px;
    padding: 0 7px;
    font-size: 9px;
  }

}

@media (max-width: 340px) {
  .auth-grid {
    grid-template-columns: 1fr;
  }
}

@keyframes pulse-ring {
  0% {
    opacity: 0.8;
    transform: scale(0.88);
  }

  100% {
    opacity: 0;
    transform: scale(1.35);
  }
}

@keyframes live-button-glow {
  0%,
  100% {
    box-shadow:
      0 0 0 0 rgba(57, 255, 136, 0.24),
      0 0 18px rgba(173, 255, 104, 0.22);
    transform: scale(1);
  }

  50% {
    box-shadow:
      0 0 0 7px rgba(57, 255, 136, 0.08),
      0 0 28px rgba(173, 255, 104, 0.38);
    transform: scale(1.04);
  }
}

@keyframes walk-bob {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-2px);
  }
}

@keyframes step-forward {
  0%,
  100% {
    transform: translateX(-50%) rotate(34deg);
  }

  50% {
    transform: translateX(-50%) rotate(-34deg);
  }
}

@keyframes step-back {
  0%,
  100% {
    transform: translateX(-50%) rotate(-34deg);
  }

  50% {
    transform: translateX(-50%) rotate(34deg);
  }
}
