:root {
  color-scheme: light;
  --bg: #f6f5fb;
  --surface: #ffffff;
  --ink: #09090b;
  --muted: #5d5d66;
  --soft: #ecebf3;
  --line: rgba(9, 9, 11, 0.1);
  --pink: #ff38b6;
  --blue: #5fc7ff;
  --violet: #7e6bff;
  --lemon: #e7ff2f;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  background: var(--bg);
  color: var(--ink);
  letter-spacing: 0;
  overflow-x: hidden;
}

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

button {
  color: inherit;
}

.app-frame {
  min-height: 100vh;
  padding-bottom: calc(92px + var(--safe-bottom));
  background:
    radial-gradient(circle at 82% -10%, rgba(255, 56, 182, 0.18), transparent 32%),
    linear-gradient(180deg, #fbfaff 0%, var(--bg) 360px);
}

.content {
  width: min(980px, 100%);
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px 12px;
  background: rgba(246, 245, 251, 0.86);
  backdrop-filter: blur(20px);
}

.brand-lockup,
.event-preview-copy,
.event-poster-button,
.back-button,
.info-row,
.album-card button,
.bottom-nav button,
.sheet-backdrop {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  padding: 0;
  text-align: left;
}

.page {
  padding: 12px 24px 24px;
}

.rave-wordmark {
  display: inline-block;
  color: var(--ink);
  font-weight: 1000;
  line-height: 0.9;
  text-transform: uppercase;
  letter-spacing: 0;
}

.logo-small {
  font-size: 28px;
}

.logo-card,
.logo-detail,
.logo-empty {
  pointer-events: none;
}

.logo-card {
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 1;
  font-size: 48px;
}

.logo-detail {
  position: absolute;
  left: 18px;
  top: 18px;
  z-index: 1;
  font-size: 54px;
}

.logo-album,
.logo-empty {
  font-size: 42px;
}

.event-feed,
.orders,
.album-list {
  display: grid;
  gap: 30px;
}

.event-preview {
  display: grid;
  gap: 16px;
}

.event-poster-button {
  position: relative;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border-radius: 22px;
  background: #09090b;
  box-shadow: 0 16px 42px rgba(28, 23, 48, 0.14);
}

.event-poster-button img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: min(76vh, 680px);
  margin: 0 auto;
  object-fit: contain;
  filter: saturate(1.35) contrast(1.04);
}

.event-poster-button::after,
.detail-poster::after,
.album-card button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 56, 182, 0.24), rgba(95, 199, 255, 0.1));
  pointer-events: none;
}

.event-preview-copy {
  display: grid;
  gap: 10px;
  padding: 0;
  text-align: left;
}

.event-preview-copy h2,
.event-detail h1,
.page-title {
  margin: 0;
  font-size: 32px;
  line-height: 1.04;
  font-weight: 1000;
  text-transform: uppercase;
}

.event-preview-copy time,
.event-detail time {
  display: block;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.1;
}

.event-preview-copy p,
.event-detail .lead,
.empty-state p,
.checkout-card p,
.legal-card p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.42;
}

.event-preview-copy strong {
  display: block;
  font-size: 28px;
  line-height: 1;
}

.event-preview-cta {
  margin-top: -4px;
}

.back-button {
  position: relative;
  width: 42px;
  height: 42px;
  margin: 2px 0 18px -12px;
}

.back-button::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 11px;
  width: 16px;
  height: 16px;
  border-left: 4px solid #2d2d32;
  border-bottom: 4px solid #2d2d32;
  transform: rotate(45deg);
}

.screen-title {
  position: absolute;
  left: 50%;
  top: 74px;
  transform: translateX(-50%);
  font-size: 18px;
  font-weight: 900;
}

.event-detail {
  display: grid;
  gap: 20px;
}

.detail-poster {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #09090b;
  box-shadow: 0 16px 42px rgba(28, 23, 48, 0.14);
}

.detail-poster img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: min(76vh, 760px);
  margin: 0 auto;
  object-fit: contain;
  filter: saturate(1.35) contrast(1.04);
}

.detail-text {
  display: grid;
  gap: 20px;
}

.detail-text p {
  margin: 0;
  color: #3f3f46;
  font-size: 21px;
  line-height: 1.34;
}

.lineup {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lineup span {
  padding: 9px 12px;
  border-radius: 999px;
  background: #ffffff;
  color: #202026;
  font-size: 13px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px var(--line);
}

.sticky-buy {
  position: sticky;
  bottom: calc(86px + var(--safe-bottom));
  z-index: 10;
  margin-top: 22px;
  padding: 10px 0;
  background: linear-gradient(180deg, transparent, var(--bg) 18%);
}

.primary,
.secondary {
  min-height: 58px;
  border: 0;
  border-radius: 14px;
  padding: 0 22px;
  font-size: 18px;
  font-weight: 1000;
  cursor: pointer;
}

.primary {
  color: #ffffff;
  background: linear-gradient(90deg, var(--violet), var(--blue));
  box-shadow: 0 14px 26px rgba(95, 199, 255, 0.25);
}

.secondary {
  color: var(--ink);
  background: var(--soft);
}

.wide {
  width: 100%;
}

.page-title {
  margin-bottom: 26px;
}

.empty-state,
.order-card,
.menu-card,
.legal-card,
.checkout-card {
  border-radius: 26px;
  background: var(--surface);
  box-shadow: 0 18px 48px rgba(28, 23, 48, 0.1);
}

.empty-state {
  display: grid;
  justify-items: start;
  gap: 14px;
  padding: 24px;
}

.empty-state h2,
.checkout-card h2,
.order-card h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.08;
}

.order-card {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.order-head,
.ticket-qr,
.checkout-title,
.tier-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.order-head span,
.ticket-qr small,
.tier-summary span {
  display: block;
  color: var(--muted);
}

.status-pill {
  padding: 8px 10px;
  border-radius: 999px;
  background: #eefaff;
  color: #0677a7;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.ticket-qr {
  justify-content: flex-start;
  padding: 12px;
  border-radius: 18px;
  background: #f6f5fb;
}

.ticket-qr img {
  width: 112px;
  height: 112px;
  border-radius: 14px;
  background: white;
}

.album-card button {
  position: relative;
  width: 100%;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 10px;
  padding: 18px;
  overflow: hidden;
  border-radius: 22px;
  background-position: center;
  background-size: cover;
  text-align: left;
  box-shadow: 0 16px 42px rgba(28, 23, 48, 0.14);
}

.album-card button > * {
  position: relative;
  z-index: 1;
}

.album-card span {
  color: #ffffff;
  font-size: 30px;
  font-weight: 1000;
  line-height: 1;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.58);
}

.album-card small {
  color: var(--lemon);
  font-size: 16px;
  font-weight: 1000;
}

.menu-card {
  overflow: hidden;
}

.info-row {
  width: 100%;
  min-height: 76px;
  display: grid;
  grid-template-columns: 52px 1fr 22px;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.info-row:last-child {
  border-bottom: 0;
}

.info-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #ff9f3f, var(--pink));
  color: #ffffff;
  font-size: 24px;
  font-weight: 1000;
}

.info-row span:nth-child(2) {
  font-size: 20px;
}

.info-row i {
  width: 12px;
  height: 12px;
  border-right: 3px solid #b8b8c2;
  border-top: 3px solid #b8b8c2;
  transform: rotate(45deg);
}

.legal-card {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.sheet,
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.sheet {
  display: grid;
  align-items: end;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 9, 11, 0.42);
}

.checkout-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  padding: 20px 20px calc(20px + var(--safe-bottom));
  border-radius: 26px 26px 0 0;
}

.checkout-title span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.checkout-title button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--soft);
  font-size: 24px;
  cursor: pointer;
}

.tier-summary {
  padding: 14px;
  border-radius: 16px;
  background: var(--soft);
}

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

.ticket-tier-option {
  min-height: 62px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: var(--soft);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.ticket-tier-option.active {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(95, 199, 255, 0.16);
}

.ticket-tier-option:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.ticket-tier-option span {
  display: grid;
  gap: 3px;
}

.ticket-tier-option small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.ticket-tier-option em {
  font-style: normal;
  color: var(--muted);
}

.checkout-row {
  display: grid;
  grid-template-columns: 1fr 96px;
  gap: 10px;
}

input,
select {
  width: 100%;
  min-height: 54px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: var(--ink);
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--blue);
}

.lightbox {
  overflow: auto;
  padding: 24px;
  background: var(--bg);
}

.photo-grid {
  columns: 3 260px;
  column-gap: 12px;
}

.photo-grid img {
  width: 100%;
  margin: 0 0 12px;
  border-radius: 18px;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: max(10px, var(--safe-bottom));
  z-index: 30;
  width: min(560px, calc(100% - 20px));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 6px;
  transform: translateX(-50%);
  border: 1px solid rgba(9, 9, 11, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 40px rgba(28, 23, 48, 0.16);
  backdrop-filter: blur(20px);
}

.bottom-nav button {
  min-height: 58px;
  display: grid;
  place-items: center;
  gap: 4px;
  border-radius: 12px;
  color: #777681;
  font-size: 12px;
}

.bottom-nav button.active {
  background: var(--ink);
  color: #ffffff;
  font-weight: 900;
}

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

.nav-calendar::before,
.nav-ticket::before,
.nav-photo::before,
.nav-info::before,
.nav-calendar::after,
.nav-ticket::after,
.nav-photo::after,
.nav-info::after {
  content: "";
  position: absolute;
}

.nav-calendar::before {
  inset: 3px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.nav-calendar::after {
  left: 6px;
  right: 6px;
  top: 9px;
  border-top: 2px solid currentColor;
  box-shadow: 0 5px 0 currentColor;
}

.nav-ticket::before {
  inset: 4px 2px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.nav-ticket::after {
  top: 8px;
  bottom: 8px;
  left: 10px;
  border-left: 2px dashed currentColor;
}

.nav-photo::before {
  inset: 4px 2px 3px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.nav-photo::after {
  left: 8px;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.nav-info::before {
  left: 10px;
  top: 8px;
  bottom: 4px;
  border-left: 3px solid currentColor;
}

.nav-info::after {
  left: 9px;
  top: 4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.skeleton {
  min-height: 160px;
  border-radius: 22px;
  background: linear-gradient(90deg, #eeeef5, #ffffff, #eeeef5);
  background-size: 220% 100%;
  animation: shimmer 1.4s infinite;
}

.event-skeleton {
  min-height: 320px;
  margin-top: 18px;
}

@keyframes shimmer {
  to {
    background-position: -220% 0;
  }
}

#toast {
  position: fixed;
  left: 50%;
  bottom: 100px;
  z-index: 70;
  max-width: calc(100% - 32px);
  padding: 13px 16px;
  border-radius: 16px;
  background: var(--ink);
  color: #ffffff;
  font-weight: 900;
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: 0.18s ease;
  pointer-events: none;
}

#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 620px) {
  .topbar {
    padding: 14px 24px 10px;
  }

  .page {
    padding: 10px 24px 24px;
  }

  .event-preview-copy h2,
  .event-detail h1,
  .page-title {
    font-size: 30px;
  }

  .event-preview-copy time,
  .event-detail time {
    font-size: 23px;
  }

  .detail-text p {
    font-size: 20px;
  }

  .sticky-buy {
    bottom: calc(84px + var(--safe-bottom));
  }

  .checkout-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 390px) {
  .page {
    padding-inline: 18px;
  }

  .topbar {
    padding-inline: 18px;
  }

  .event-preview-copy h2,
  .event-detail h1,
  .page-title {
    font-size: 27px;
  }
}
