:root {
  --paper: #f8f7f2;
  --ink: #111111;
  --yellow: #ffea00;
  --yellow-deep: #ffd900;
  --line: rgba(17, 17, 17, 0.12);
  --soft: rgba(255, 255, 255, 0.12);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  display: flex;
  justify-content: center;
  background: #090909;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

.app {
  width: min(430px, 100vw);
  min-height: 100svh;
  background: #090909;
  position: relative;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03), 0 24px 80px rgba(0, 0, 0, 0.5);
}

.screen[hidden] {
  display: none !important;
}

.phone-shell {
  min-height: 100svh;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.location-shell {
  position: relative;
  padding: 14px 12px 12px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.92), transparent 20%),
    radial-gradient(circle at 90% 12%, rgba(255, 232, 96, 0.46), transparent 24%),
    radial-gradient(circle at 50% 78%, rgba(255, 189, 45, 0.2), transparent 32%),
    linear-gradient(180deg, #fffdf4 0%, #fff2b7 42%, #ffd95c 100%);
}

.location-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.26), transparent 35%),
    radial-gradient(circle at 18% 28%, rgba(255, 255, 255, 0.28), transparent 10%);
  pointer-events: none;
}

.location-shell > * {
  position: relative;
  z-index: 1;
}

.location-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.location-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-transform: uppercase;
  letter-spacing: -0.05em;
}

.location-brand strong {
  font-size: 28px;
  line-height: 0.95;
  color: #111;
  text-shadow: 0 1px 0 rgba(255,255,255,0.5);
}

.location-brand span {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: rgba(17, 17, 17, 0.58);
}

.location-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(17, 17, 17, 0.09);
  background: rgba(255, 255, 255, 0.68);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.location-search {
  appearance: none;
  width: 100%;
  margin: 0 0 12px;
  padding: 14px 14px;
  border: 1px solid rgba(17, 17, 17, 0.10);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--ink);
  outline: none;
  box-shadow: 0 14px 24px rgba(17, 17, 17, 0.08);
  backdrop-filter: blur(14px);
}

.location-search::placeholder {
  color: rgba(17, 17, 17, 0.48);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.location-recent {
  appearance: none;
  position: relative;
  width: 100%;
  text-align: left;
  margin: 0 0 12px;
  padding: 12px 12px 12px 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(17, 17, 17, 0.10);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(17, 17, 17, 0.78);
  font-size: 11px;
  line-height: 1.35;
  cursor: pointer;
  box-shadow: 0 16px 26px rgba(17, 17, 17, 0.08);
  backdrop-filter: blur(12px);
}

.location-recent:hover,
.location-recent:focus-visible {
  transform: translateY(-1px);
  outline: none;
  box-shadow: 0 18px 32px rgba(17, 17, 17, 0.10);
}

.location-recent::after {
  content: "Open";
  position: absolute;
  right: 12px;
  top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 234, 0, 0.82);
  border: 1px solid rgba(17, 17, 17, 0.08);
  color: #111;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.location-recent strong {
  display: block;
  margin-top: 4px;
  padding-right: 76px;
  font-size: 16px;
  letter-spacing: -0.03em;
  color: #111;
  text-transform: none;
  line-height: 1.12;
}

.location-recent-kicker,
.location-recent-meta {
  display: block;
  max-width: calc(100% - 84px);
  padding-right: 76px;
}

.location-recent-kicker {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(17, 17, 17, 0.62);
}

.location-recent-meta {
  margin-top: 4px;
  font-size: 9px;
  letter-spacing: 0.10em;
  color: rgba(17, 17, 17, 0.48);
}

.location-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.location-list li {
  margin: 0;
}

.location-list button {
  appearance: none;
  width: 100%;
  border: 1px solid rgba(17, 17, 17, 0.12);
  background: rgba(255, 255, 255, 0.58);
  border-radius: 18px;
  padding: 13px 14px;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.location-list button:hover,
.location-list button:focus-visible {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.42);
  border-color: rgba(17, 17, 17, 0.16);
  outline: none;
}

.location-list li.active button {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 20px rgba(17, 17, 17, 0.08);
}

.location-name {
  display: block;
  font-size: 16px;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: -0.03em;
}

.location-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 66px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.06);
  border: 1px solid rgba(17, 17, 17, 0.08);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.location-empty {
  display: none;
  margin-top: 10px;
  padding: 12px 12px;
  border-radius: 18px;
  border: 1px dashed rgba(17, 17, 17, 0.18);
  background: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  line-height: 1.35;
}

.location-empty.visible {
  display: block;
}

.location-foot {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(17, 17, 17, 0.08);
  font-size: 11px;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(17, 17, 17, 0.72);
}

.home-shell {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.12), transparent 34%),
    radial-gradient(circle at top right, rgba(255, 235, 0, 0.12), transparent 28%),
    linear-gradient(180deg, #101114 0%, #0a0a0c 100%);
  color: #fff;
}

.home-topbar {
  appearance: none;
  width: 100%;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 10px;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.menu-icon {
  width: 22px;
  height: 16px;
  display: grid;
  gap: 3px;
  flex: 0 0 auto;
}

.menu-icon span {
  display: block;
  height: 3px;
  border-radius: 999px;
  background: #fff;
}

.home-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  line-height: 0.9;
  margin-right: auto;
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.07em;
}

.home-brand-title {
  display: block;
  font-size: 22px;
  line-height: 0.95;
}

.home-brand small {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.74);
  letter-spacing: 0.10em;
}

.home-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex: 0 0 auto;
  min-width: 92px;
}

.home-progress-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.76);
}

.home-progress-track {
  width: 92px;
  height: 4px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.home-progress-fill {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffeb00, #fff8b8);
  box-shadow: 0 0 12px rgba(255, 235, 0, 0.5);
  transition: width 180ms ease;
}

.story-stage {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px 14px;
  touch-action: none;
}

.story-card {
  width: min(100%, 390px);
  position: relative;
}

.story-visual {
  position: relative;
  height: calc(100svh - 124px);
  min-height: 470px;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, var(--bg-a, #d9f7be), var(--bg-b, #efffe6));
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.story-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.story-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 420ms ease, transform 520ms ease;
}

.story-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.story-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.story-slide.is-active img {
  animation: zoomPan 3.3s ease-in-out both;
}

@keyframes zoomPan {
  0% { transform: scale(1); }
  100% { transform: scale(1.08); }
}

.story-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 35%),
    radial-gradient(circle at 24% 22%, rgba(255, 255, 255, 0.58), transparent 26%),
    radial-gradient(circle at 82% 6%, rgba(255, 255, 255, 0.32), transparent 28%);
  mix-blend-mode: screen;
  z-index: 1;
}

.story-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.08), transparent 46%),
    radial-gradient(circle at 55% 55%, rgba(255, 255, 255, 0.1), transparent 38%);
  z-index: 1;
}

.story-dots {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 16px;
  display: flex;
  gap: 6px;
  z-index: 3;
}

.story-dot {
  flex: 1 1 0;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.26);
  overflow: hidden;
}

.story-dot.is-active {
  background: linear-gradient(90deg, #ffeb00, #fff8c2);
  box-shadow: 0 0 10px rgba(255, 235, 0, 0.45);
}

.story-badge {
  position: absolute;
  left: 16px;
  top: 28px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.46);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.art-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(16px);
  z-index: 0;
}

.story-haze {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.08), transparent 40%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.04));
  z-index: 0;
}

.story-visual .art-blob,
.story-visual .story-haze {
  pointer-events: none;
}

.story-visual .art-blob {
  z-index: 1;
}

.story-visual .story-haze {
  z-index: 2;
}

.story-visual::before,
.story-visual::after {
  pointer-events: none;
}

.story-card,
.story-visual,
.story-slide,
.story-slide img {
  user-select: none;
  -webkit-user-drag: none;
}

.speaker-button {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: 74px;
  height: 74px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.26);
  z-index: 3;
}

.speaker-button.is-on {
  background: var(--yellow);
  color: #111;
  border-color: rgba(17, 17, 17, 0.1);
  box-shadow: 0 0 0 12px rgba(255, 234, 0, 0.16), 0 10px 30px rgba(0, 0, 0, 0.24);
}

.speaker-button:focus-visible,
.home-topbar:focus-visible {
  outline: 4px solid rgba(255, 234, 0, 0.62);
  outline-offset: 4px;
}

.speaker-icon {
  width: 30px;
  height: 22px;
  position: relative;
  display: block;
}

.speaker-icon .speaker-body {
  position: absolute;
  left: 0;
  top: 4px;
  width: 10px;
  height: 14px;
  background: currentColor;
  clip-path: polygon(0 35%, 55% 35%, 100% 0, 100% 100%, 55% 65%, 0 65%);
}

.speaker-icon .speaker-wave {
  position: absolute;
  inset: 0;
  border: 2px solid currentColor;
  border-left-color: transparent;
  border-top-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  opacity: 0.95;
}

.speaker-icon .wave-one {
  left: 11px;
  top: 1px;
  width: 10px;
  height: 20px;
}

.speaker-icon .wave-two {
  left: 16px;
  top: -1px;
  width: 14px;
  height: 24px;
}

.speaker-button:not(.is-on) .speaker-wave,
.speaker-button:not(.is-on) .speaker-body {
  opacity: 0.35;
}

.speaker-button:not(.is-on) .speaker-icon::after {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  top: 9px;
  height: 2px;
  background: currentColor;
  transform: rotate(-35deg);
  border-radius: 999px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 720px) {
  body {
    display: block;
  }

  .app {
    width: 100vw;
    box-shadow: none;
  }

  .location-shell {
    padding: 12px 10px 10px;
  }

  .location-brand strong {
    font-size: 26px;
  }

  .location-search {
    padding: 12px 12px;
    font-size: 13px;
  }

  .location-list button {
    padding: 12px 13px;
  }

  .location-name {
    font-size: 15px;
  }

  .location-foot,
  .location-recent,
  .location-empty {
    font-size: 10px;
  }

  .home-topbar {
    padding: 10px 10px 8px;
  }

  .home-brand {
    font-size: 16px;
  }

  .home-brand-title {
    font-size: 20px;
  }

  .home-progress-track {
    width: 78px;
  }

  .story-stage {
    padding: 4px 6px 12px;
  }

  .story-card {
    width: 100%;
  }

  .story-visual {
    height: calc(100svh - 112px);
    min-height: 430px;
    border-radius: 22px;
  }

  .story-slide.is-active img {
    animation-duration: 3.1s;
  }

  .speaker-button {
    width: 68px;
    height: 68px;
    bottom: 14px;
  }
}
