:root {
  --ink: #f6f0e6;
  --text: #f6f0e6;
  --muted: #b8aa99;
  --paper: #0f0c12;
  --paper-soft: #17121a;
  --night: #0b0b12;
  --night-2: #171019;
  --line: rgba(246, 240, 230, 0.14);
  --line-dark: rgba(246, 240, 230, 0.16);
  --blue: #00a3ff;
  --blue-deep: #0066cc;
  --amber: #f1b531;
  --red: #e14b3b;
  --green: #10b981;
  --danger: #d92d42;
  --radius: 24px;
  --shadow: 0 22px 60px rgba(9, 7, 5, 0.22);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Inter", "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 16% 2%, rgba(0, 163, 255, 0.28), transparent 27rem),
    radial-gradient(circle at 94% 10%, rgba(241, 181, 49, 0.18), transparent 22rem),
    linear-gradient(180deg, #08080f 0%, #151019 48%, #0f0c12 100%);
}

body::before {
  content: none;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.app-shell {
  width: min(100%, 1060px);
  margin: 0 auto;
  padding:
    max(22px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(48px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
}

.hero {
  position: relative;
  min-height: 268px;
  padding: 16px 0 22px;
  display: grid;
  align-content: end;
  color: var(--ink);
  animation: riseIn 0.42s ease both;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 1px;
  background: linear-gradient(90deg, var(--blue), rgba(246, 240, 230, 0.24), var(--amber));
}

.hero-brand {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 13px;
  margin-bottom: 18px;
}

.hero-brand::after {
  content: "";
  grid-column: 1 / -1;
  height: 2px;
  margin-top: 4px;
  background: linear-gradient(90deg, var(--blue), rgba(246, 240, 230, 0.2), var(--amber));
}

.brand-logo-wrap {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(246, 240, 230, 0.24);
  border-radius: 14px;
  background: rgba(246, 240, 230, 0.08);
  backdrop-filter: blur(14px);
}

.brand-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
}

.hero-title {
  margin: 0;
  font-family: "Unbounded", "Manrope", sans-serif;
  font-size: clamp(31px, 9vw, 74px);
  line-height: 0.92;
  letter-spacing: 0;
  text-transform: uppercase;
  text-wrap: balance;
}

.sub {
  max-width: 680px;
  margin: 8px 0 0;
  color: rgba(246, 240, 230, 0.78);
  font-size: clamp(15px, 2.2vw, 18px);
  line-height: 1.45;
}

.community-line {
  max-width: 720px;
  margin: 12px 0 0;
  color: #fff9ef;
  font-size: clamp(16px, 2.6vw, 22px);
  font-weight: 800;
  line-height: 1.35;
}

.admin-open-status {
  min-height: 20px;
  margin: 12px 0 0;
  color: #a7e4ff;
  font-size: 13px;
  font-weight: 800;
}

.nav-row {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.top-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  padding: 6px;
  border: 1px solid rgba(246, 240, 230, 0.16);
  border-radius: 18px;
  background: rgba(246, 240, 230, 0.08);
  backdrop-filter: blur(18px);
}

button,
.admin-btn {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 10px 14px;
  color: var(--ink);
  background: rgba(246, 240, 230, 0.08);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

button:hover {
  border-color: rgba(0, 102, 204, 0.28);
  background: rgba(246, 240, 230, 0.14);
  transform: translateY(-1px);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(0, 163, 255, 0.34);
  outline-offset: 2px;
}

.top-nav-item {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  padding: 9px 11px;
  color: rgba(246, 240, 230, 0.78);
  background: transparent;
  font-size: 13px;
  white-space: normal;
}

.top-nav-item:hover {
  color: #fff;
  background: rgba(246, 240, 230, 0.1);
  transform: none;
}

.top-nav-item.active {
  color: #061018;
  background: linear-gradient(135deg, #8adeff, var(--blue));
  box-shadow: 0 14px 34px rgba(0, 163, 255, 0.22);
}

.account-chip {
  display: inline-flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-color: rgba(246, 240, 230, 0.16);
  border-radius: 18px;
  color: var(--ink);
  background: rgba(246, 240, 230, 0.1);
  backdrop-filter: blur(18px);
}

.account-chip span:first-child {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #061018;
  background: linear-gradient(135deg, #8adeff, var(--blue));
  font-size: 12px;
  font-weight: 900;
}

.account-chip.active {
  color: #061018;
  background: linear-gradient(135deg, #8adeff, var(--blue));
}

.panel {
  position: relative;
  margin-top: 14px;
  padding: clamp(16px, 3vw, 24px);
  border: 1px solid rgba(246, 240, 230, 0.13);
  border-radius: var(--radius);
  background: rgba(22, 17, 26, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  animation: riseIn 0.36s ease both;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  border-radius: var(--radius) 0 0 var(--radius);
  background: linear-gradient(180deg, var(--blue), var(--amber));
  opacity: 0.9;
}

.page-section[hidden],
#admin-area[hidden],
.account-panel[hidden],
.account-form[hidden],
.profile-card[hidden],
.google-signin-wrap[hidden],
.account-code-panel[hidden],
.admin-login-panel[hidden],
.admin-section[hidden] {
  display: none;
}

#group-panel {
  animation-delay: 0.04s;
}

#attendees-panel {
  animation-delay: 0.08s;
}

#summary-panel {
  animation-delay: 0.12s;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

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

h2,
h3 {
  color: var(--ink);
}

h2 {
  margin: 0 0 12px;
  font-size: clamp(20px, 3vw, 25px);
  line-height: 1.1;
}

h3 {
  margin: 0 0 10px;
  font-size: 17px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue-deep);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.48;
}

.error {
  color: var(--danger);
}

.primary {
  width: 100%;
  margin-top: 12px;
  border: 0;
  color: #061018;
  background: linear-gradient(135deg, #8adeff, var(--blue));
  box-shadow: 0 16px 34px rgba(0, 102, 204, 0.22);
  padding: 13px 16px;
}

.primary:hover {
  background: linear-gradient(135deg, #b7eeff, #26afff);
}

.primary:disabled {
  cursor: not-allowed;
  color: rgba(246, 240, 230, 0.34);
  background: rgba(246, 240, 230, 0.09);
  box-shadow: none;
  transform: none;
}

.danger-btn {
  border-color: rgba(217, 45, 66, 0.28);
  color: #8d1829;
  background: rgba(217, 45, 66, 0.08);
}

label {
  display: grid;
  gap: 7px;
  color: rgba(246, 240, 230, 0.86);
  font-size: 13px;
  font-weight: 850;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(246, 240, 230, 0.14);
  border-radius: 16px;
  padding: 13px 14px;
  color: var(--text);
  background: rgba(246, 240, 230, 0.08);
  font: inherit;
}

select {
  color-scheme: dark;
}

textarea {
  min-height: 132px;
  resize: vertical;
  line-height: 1.45;
}

input::placeholder,
textarea::placeholder {
  color: rgba(246, 240, 230, 0.46);
}

input[type="file"]::file-selector-button {
  border: 0;
  border-radius: 12px;
  margin-right: 10px;
  padding: 9px 11px;
  color: var(--ink);
  background: rgba(246, 240, 230, 0.14);
  font: inherit;
  font-weight: 900;
}

.grid-2,
.grid-3,
.admin-grid2,
.admin-grid3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.event-grid,
.attendees,
.admin-cards {
  display: grid;
  gap: 10px;
}

.event-card {
  position: relative;
  overflow: hidden;
  text-align: left;
  border: 1px solid rgba(246, 240, 230, 0.14);
  border-radius: 20px;
  padding: 16px 16px 18px;
  background:
    linear-gradient(135deg, rgba(246, 240, 230, 0.1), rgba(0, 163, 255, 0.035)),
    var(--paper-soft);
}

.event-card::after {
  content: "";
  position: absolute;
  inset: 12px 12px auto auto;
  width: 58px;
  height: 58px;
  border: 1px dashed rgba(225, 75, 59, 0.52);
  border-radius: 50%;
  opacity: 0.65;
  transform: rotate(-11deg);
}

.event-card:hover {
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
}

.event-card.active {
  border-color: rgba(0, 102, 204, 0.46);
  background:
    linear-gradient(135deg, rgba(0, 163, 255, 0.18), rgba(241, 181, 49, 0.08)),
    var(--paper-soft);
  box-shadow: inset 0 0 0 1px rgba(0, 163, 255, 0.16), 0 18px 38px rgba(0, 102, 204, 0.14);
}

.event-title {
  margin: 0;
  max-width: calc(100% - 52px);
  font-size: 18px;
  font-weight: 900;
}

.event-meta {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.event-price {
  display: inline-flex;
  margin: 13px 0 0;
  padding: 7px 10px;
  border-radius: 999px;
  color: #8adeff;
  background: rgba(0, 163, 255, 0.12);
  font-size: 12px;
  font-weight: 900;
}

.account-panel {
  z-index: 20;
  background: rgba(18, 14, 22, 0.96);
}

.account-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button {
  display: inline-grid;
  width: 38px;
  min-height: 38px;
  place-items: center;
  border-radius: 50%;
  padding: 0;
  font-size: 23px;
  line-height: 1;
}

.account-form,
.account-actions,
.account-code-panel,
.google-signin-wrap {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.profile-card,
.summary-card,
.terms-box,
.attendee-row,
.admin-login-panel,
.admin-block,
.admin-card {
  border: 1px solid rgba(246, 240, 230, 0.13);
  border-radius: 20px;
  background: rgba(246, 240, 230, 0.07);
}

.profile-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 14px;
  padding: 15px;
}

.profile-label {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.profile-value {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-weight: 850;
}

.account-divider {
  display: flex;
  align-items: center;
  width: 100%;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.account-divider::before,
.account-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.account-divider span {
  padding: 0 10px;
}

.attendee-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 13px;
}

.attendee-repost {
  display: grid;
  grid-column: 1 / -1;
  gap: 10px;
  padding-top: 4px;
}

.attendee-repost label,
.terms-accept {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  line-height: 1.42;
}

.attendee-repost input[type="checkbox"],
.terms-accept input {
  width: auto;
  margin-top: 2px;
  accent-color: var(--blue);
}

.summary-card,
.terms-box {
  padding: 15px;
  line-height: 1.54;
}

.summary-card hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 12px 0;
}

.terms-box {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.terms-box summary {
  cursor: pointer;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.terms-document {
  max-height: 300px;
  overflow: auto;
  margin-top: 12px;
  padding: 13px;
  border-radius: 16px;
  color: rgba(246, 240, 230, 0.82);
  background: rgba(6, 5, 9, 0.36);
  font-size: 13px;
  line-height: 1.5;
}

.terms-document p {
  margin: 0 0 10px;
}

.terms-document ol {
  margin: 0;
  padding-left: 20px;
}

.terms-document li + li {
  margin-top: 8px;
}

.main-panel {
  overflow: hidden;
  padding: 0;
  background: #100d12;
}

.main-panel::before {
  display: none;
}

.main-carousel {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: calc(var(--radius) - 2px) calc(var(--radius) - 2px) 0 0;
  background: #0d0c12;
}

.main-carousel-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.main-carousel-track::-webkit-scrollbar {
  display: none;
}

.main-carousel-slide {
  display: block;
  scroll-snap-align: start;
  color: inherit;
  text-decoration: none;
}

.main-carousel-slide img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #111113;
}

.main-carousel-dots {
  position: absolute;
  left: 50%;
  bottom: 14px;
  display: flex;
  gap: 7px;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(8, 8, 15, 0.52);
  transform: translateX(-50%);
  backdrop-filter: blur(10px);
}

.main-carousel-dots span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(246, 240, 230, 0.44);
}

.main-carousel-dots span.active {
  width: 20px;
  background: var(--blue);
}

.main-copy {
  padding: clamp(18px, 4vw, 34px);
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(16, 13, 18, 0.94), #100d12),
    #100d12;
}

.main-copy h2 {
  color: var(--ink);
}

.main-copy p:not(.eyebrow),
.contact-panel p:not(.eyebrow) {
  margin: 11px 0 0;
  color: rgba(246, 240, 230, 0.78);
  line-height: 1.68;
}

.main-copy .eyebrow {
  color: #8adeff;
}

.contact-panel {
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(0, 163, 255, 0.14), rgba(241, 181, 49, 0.1)),
    #100d12;
}

.contact-panel::before {
  background: linear-gradient(180deg, var(--amber), var(--blue));
}

.contact-panel h2 {
  color: var(--ink);
}

.contact-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 16px;
}

.contact-links a {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--line-dark);
  border-radius: 18px;
  padding: 12px 14px;
  color: var(--ink);
  background: rgba(246, 240, 230, 0.08);
  font-size: 14px;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}

.contact-links a:hover {
  border-color: rgba(0, 163, 255, 0.46);
  background: rgba(0, 163, 255, 0.14);
}

.contact-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: currentColor;
}

.payment-links {
  margin-top: 12px;
  border: 1px solid rgba(0, 102, 204, 0.18);
  border-radius: 18px;
  padding: 13px;
  background: rgba(0, 163, 255, 0.08);
}

.payment-links-title {
  margin: 0 0 8px;
  color: #8adeff;
  font-size: 13px;
  font-weight: 900;
}

.payment-link-row {
  display: flex;
  align-items: stretch;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.payment-link-row a {
  min-width: 0;
  color: #8adeff;
  text-decoration: none;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.copy-pay-link {
  min-height: 36px;
  font-size: 12px;
  padding: 7px 10px;
}

.admin-login-panel,
.admin-block {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 15px;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
  padding: 2px 0 8px;
  scrollbar-width: thin;
}

.admin-tab {
  flex: 0 0 auto;
  white-space: nowrap;
  background: rgba(246, 240, 230, 0.08);
}

.admin-tab.active {
  border-color: rgba(0, 102, 204, 0.36);
  background: rgba(0, 163, 255, 0.1);
}

.admin-card {
  padding: 14px;
}

.admin-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.admin-card-title {
  margin: 0;
  font-size: 14px;
  font-weight: 900;
}

.admin-card-meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.admin-inline-actions,
.admin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-actions {
  margin-top: 12px;
}

.admin-inline-actions button {
  min-height: 36px;
  padding: 7px 10px;
  font-size: 12px;
}

.admin-locked .admin-tabs,
.admin-locked .admin-section,
.admin-locked #admin-refresh-all {
  display: none;
}

@media (min-width: 680px) {
  .nav-row {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .top-nav {
    display: flex;
    width: fit-content;
  }

  .account-chip {
    width: auto;
    min-width: 124px;
  }

  .grid-2,
  .admin-grid2,
  .attendee-row,
  .profile-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .contact-links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .payment-link-row {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
  }

  .copy-pay-link {
    flex: 0 0 auto;
  }
}

@media (min-width: 920px) {
  .hero {
    min-height: 330px;
  }

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

  .hero-brand::after {
    grid-column: auto;
    margin-top: 0;
  }

  .main-panel:not([hidden]) {
    display: grid;
    grid-template-columns: minmax(0, 1.06fr) minmax(360px, 0.94fr);
  }

  .main-carousel {
    border-radius: calc(var(--radius) - 2px) 0 0 calc(var(--radius) - 2px);
  }

  .main-carousel-track,
  .main-carousel-slide {
    height: 100%;
  }

  .main-carousel-slide img {
    height: 100%;
    min-height: 560px;
    aspect-ratio: auto;
  }

  .main-copy {
    display: grid;
    align-content: center;
    padding: 38px;
  }

  .account-panel {
    position: sticky;
    top: max(12px, env(safe-area-inset-top));
    max-width: 660px;
    margin-left: auto;
  }
}

@media (max-width: 520px) {
  body {
    background:
      radial-gradient(circle at 12% 0%, rgba(0, 163, 255, 0.28), transparent 18rem),
      linear-gradient(180deg, #08080f 0%, #151019 27rem, #0f0c12 100%);
  }

  body::before {
    content: none;
  }

  .app-shell {
    padding-top: max(24px, calc(env(safe-area-inset-top) + 14px));
    padding-bottom: max(54px, calc(env(safe-area-inset-bottom) + 28px));
  }

  .hero {
    min-height: 312px;
  }

  .hero-brand {
    gap: 10px;
  }

  .brand-logo-wrap {
    width: 34px;
    height: 34px;
    border-radius: 11px;
  }

  .brand-logo {
    width: 24px;
    height: 24px;
  }

  .hero-title {
    font-size: clamp(30px, 9.2vw, 42px);
  }

  .panel {
    border-radius: 22px;
  }

  .panel::before {
    width: 3px;
  }

  .panel-head {
    align-items: flex-start;
  }

  .main-carousel-slide img {
    aspect-ratio: 4 / 3.18;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
