:root {
  color-scheme: light;
  --ink: #050505;
  --paper: #fffaf2;
  --acid: #f7ff00;
  --pink: #ff3bd4;
  --cyan: #36ffdf;
  --green: #61ff5c;
  --red: #ff4b4b;
  --purple: #8d4cff;
  --line: rgba(5, 5, 5, 0.16);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--acid);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(90deg, rgba(255, 59, 212, 0.32) 0 16%, transparent 16% 84%, rgba(54, 255, 223, 0.36) 84%),
    repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.08) 0 12px, transparent 12px 24px),
    var(--acid);
}

.phone-stage {
  position: relative;
  width: min(100%, 430px);
  max-height: 920px;
  overflow: auto;
  border: 8px solid var(--ink);
  border-radius: 34px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.noise {
  position: sticky;
  top: 0;
  z-index: 6;
  height: 0;
  pointer-events: none;
}

.noise::before {
  content: "";
  position: absolute;
  inset: 0;
  height: 100vh;
  opacity: 0.07;
  background-image:
    linear-gradient(90deg, #000 1px, transparent 1px),
    linear-gradient(#000 1px, transparent 1px);
  background-size: 19px 19px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
  background: rgba(255, 250, 242, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 3px solid var(--ink);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 900;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 3px solid var(--ink);
  border-radius: 13px;
  background: var(--pink);
  color: #fff;
  font-size: 13px;
  box-shadow: 4px 4px 0 var(--ink);
}

.icon-button {
  width: 44px;
  height: 44px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--cyan);
  color: var(--ink);
  font-size: 24px;
  font-weight: 900;
}

.icon-button.is-spinning {
  animation: spin-refresh 700ms linear infinite;
}

.icon-button:disabled {
  cursor: wait;
  opacity: 0.8;
}

@keyframes spin-refresh {
  to {
    transform: rotate(360deg);
  }
}

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 22px 18px 18px;
  background:
    radial-gradient(circle at 88% 12%, var(--cyan) 0 16%, transparent 17%),
    linear-gradient(135deg, var(--acid), #fff44f 54%, var(--green));
  border-bottom: 3px solid var(--ink);
}

.kicker,
.section-label {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 310px;
  font-family: "Archivo Black", Inter, sans-serif;
  font-size: clamp(44px, 16vw, 62px);
  line-height: 0.88;
  text-transform: uppercase;
}

h2 {
  font-size: 20px;
  line-height: 1.05;
}

.hero-badge {
  align-self: end;
  display: grid;
  gap: 8px;
}

.hero-badge span {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: #fff;
  font-size: 30px;
  transform: rotate(7deg);
  box-shadow: 5px 5px 0 var(--ink);
}

.hero-badge span:nth-child(2) {
  background: var(--pink);
  transform: rotate(-8deg);
}

.hero-badge span:nth-child(3) {
  background: var(--cyan);
}

.search-panel,
.add-place-panel,
.rating-board,
.ratings-panel,
.content-grid,
.spotlight {
  padding: 18px;
  border-bottom: 3px solid var(--ink);
}

.search-panel .section-head {
  margin-bottom: 0;
}

.search-controls {
  margin-top: 14px;
}

.search-controls[hidden] {
  display: none;
}

.search-panel label {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 900;
}

.search-box {
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: #fff;
  box-shadow: 5px 5px 0 var(--ink);
}

.search-box span {
  text-align: center;
  font-size: 24px;
  font-weight: 900;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 15px 12px 15px 0;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
}

.filter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 74px;
  gap: 10px;
  margin-top: 12px;
}

.filter-row select,
.search-submit,
.place-form input,
.place-form select {
  width: 100%;
  min-width: 0;
  border: 3px solid var(--ink);
  border-radius: 16px;
  padding: 13px 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
  outline: 0;
  box-shadow: 4px 4px 0 var(--ink);
}

.search-submit {
  background: var(--green);
  cursor: pointer;
}

.search-submit:disabled {
  cursor: wait;
  opacity: 0.8;
}

.add-place-panel {
  background:
    linear-gradient(135deg, rgba(255, 59, 212, 0.22), rgba(54, 255, 223, 0.26)),
    var(--paper);
}

.panel-toggle,
.upload-toggle {
  border: 3px solid var(--ink);
  border-radius: 16px;
  padding: 11px 13px;
  background: var(--pink);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 4px 4px 0 var(--ink);
}

.panel-toggle {
  background: var(--cyan);
  color: var(--ink);
}

.panel-toggle[aria-expanded="true"],
.upload-toggle[aria-expanded="true"] {
  background: var(--ink);
  color: #fff;
}

.place-form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.place-form[hidden] {
  display: none;
}

.place-form .save-button {
  width: 100%;
  padding: 13px 14px;
  border-radius: 16px;
  background: var(--pink);
  color: #fff;
  box-shadow: 4px 4px 0 var(--ink);
}

.spotlight {
  width: 100%;
  border: 0;
  border-bottom: 3px solid var(--ink);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  background: var(--ink);
  color: #fff;
  text-align: left;
}

.spotlight p:last-child {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 13px;
  font-weight: 800;
}

.spotlight.is-empty {
  cursor: pointer;
}

.spotlight.is-empty .score-bubble {
  background: var(--cyan);
  color: var(--ink);
}

.score-bubble {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border: 3px solid #fff;
  border-radius: 28px;
  background: var(--pink);
  color: #fff;
  box-shadow: 5px 5px 0 #fff;
  transform: rotate(5deg);
}

.score-bubble span {
  font-size: 34px;
}

.score-bubble strong {
  font-size: 18px;
}

.selected-meta {
  max-width: 220px;
  margin: 7px 0 0;
  color: rgba(5, 5, 5, 0.62);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
}

.board-header,
.section-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.save-button,
.pill {
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 9px 12px;
  background: var(--green);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.emoji-option {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 3px solid var(--ink);
  border-radius: 17px;
  background: #fff;
  font-size: 28px;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 160ms ease, background 160ms ease;
}

.emoji-option[aria-checked="true"] {
  background: var(--cyan);
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 var(--ink);
}

textarea {
  width: 100%;
  min-height: 82px;
  margin-top: 14px;
  resize: vertical;
  border: 3px solid var(--ink);
  border-radius: 16px;
  padding: 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  outline: 0;
}

.places-list,
.saved-list,
.venue-ratings-list {
  display: grid;
  gap: 10px;
}

.place-card,
.saved-card,
.venue-rating-card {
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: #fff;
  box-shadow: 5px 5px 0 var(--ink);
}

.place-action {
  width: 100%;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 68px;
  gap: 12px;
  align-items: center;
  border: 0;
  padding: 10px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.place-photo {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: linear-gradient(135deg, var(--pink), var(--acid), var(--cyan));
  font-size: 24px;
}

.place-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.place-copy strong,
.saved-card strong {
  overflow: hidden;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.place-copy small,
.saved-card small {
  color: rgba(5, 5, 5, 0.62);
  font-weight: 800;
}

.place-action.is-selected {
  background: var(--cyan);
}

.place-score {
  display: grid;
  justify-items: center;
  gap: 1px;
  min-width: 0;
}

.place-vibe {
  font-size: 28px;
  line-height: 1;
}

.place-percent {
  font-size: 14px;
  font-weight: 900;
}

.place-count {
  max-width: 68px;
  overflow: hidden;
  color: rgba(5, 5, 5, 0.58);
  font-size: 9px;
  font-weight: 900;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.saved-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
}

.saved-card.vibe-card-1 {
  background: #fff;
}

.saved-card.vibe-card-2 {
  background: #36ffdf;
}

.saved-card.vibe-card-3 {
  background: #f7ff00;
}

.saved-card.vibe-card-4 {
  background: #ffb7ec;
}

.saved-card.vibe-card-5 {
  background: #c8ff9c;
}

.saved-list .saved-card:nth-child(5n + 1) {
  background: #fff;
}

.saved-list .saved-card:nth-child(5n + 2) {
  background: #36ffdf;
}

.saved-list .saved-card:nth-child(5n + 3) {
  background: #f7ff00;
}

.saved-list .saved-card:nth-child(5n + 4) {
  background: #ffb7ec;
}

.saved-list .saved-card:nth-child(5n + 5) {
  background: #c8ff9c;
}

.saved-card span {
  font-size: 34px;
}

.see-more-button {
  width: 100%;
  margin-top: 14px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  padding: 12px 14px;
  background: var(--green);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  box-shadow: 4px 4px 0 var(--ink);
}

.ratings-panel {
  background: var(--acid);
}

.venue-rating-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
}

.venue-rating-card span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: var(--cyan);
  font-size: 24px;
}

.venue-rating-card div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.venue-rating-card strong {
  font-size: 13px;
  font-weight: 900;
}

.venue-rating-card small {
  color: rgba(5, 5, 5, 0.68);
  font-weight: 900;
  line-height: 1.25;
}

.venue-rating-card button {
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 7px 9px;
  background: #fff;
  color: var(--ink);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.venue-rating-card button:disabled {
  cursor: default;
  opacity: 0.7;
}

.empty-state {
  margin: 0;
  padding: 16px;
  border: 3px dashed var(--ink);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 900;
}

.app-disclaimer {
  padding: 9px 14px 12px;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.58);
  font-size: 8px;
  font-weight: 700;
  line-height: 1.25;
}

@media (min-width: 760px) {
  .phone-stage {
    width: min(100%, 480px);
  }
}

@media (max-width: 390px) {
  .app-shell {
    padding: 0;
  }

  .phone-stage {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  h1 {
    font-size: 44px;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-badge {
    grid-template-columns: repeat(3, 58px);
  }
}
