:root {
  --bg: #120f1d;
  --bg-soft: #1d1929;
  --panel: #fff4dd;
  --panel-2: #f7e4bd;
  --ink: #2a1b22;
  --muted: #715d57;
  --text: #fff7e8;
  --gold: #e7b85e;
  --red: #9d2c26;
  --red-2: #d64a32;
  --blue: #263f5f;
  --green: #58785a;
  --shadow: 0 18px 44px rgba(0, 0, 0, .28);
  --radius: 8px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 0%, rgba(157, 44, 38, .28), transparent 30rem),
    linear-gradient(145deg, #0d1221 0%, var(--bg) 48%, #23131e 100%);
  letter-spacing: 0;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

button,
input {
  font: inherit;
}

.site-shell {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 18px 14px 86px;
}

.site-header {
  padding: 18px 4px 14px;
}

.site-header h1 {
  margin: 0;
  font-size: clamp(2rem, 12vw, 4.2rem);
  line-height: .98;
  color: #fff0cb;
  text-wrap: balance;
}

.site-header p {
  margin: 10px 0 0;
  color: #efd7a5;
  font-weight: 700;
}

.home-hero {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  margin: -18px -14px 16px;
  background: #150f1e;
}

.home-hero img,
.home-hero video {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.02);
}

.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 8, 16, .08) 0%, rgba(12, 8, 18, .22) 45%, rgba(18, 15, 29, .88) 100%),
    linear-gradient(90deg, rgba(18, 15, 29, .74) 0%, rgba(18, 15, 29, .25) 58%, rgba(18, 15, 29, .7) 100%);
}

.home-hero__overlay {
  position: absolute;
  right: 18px;
  bottom: 30px;
  left: 18px;
  z-index: 1;
}

.home-hero h1 {
  max-width: 9em;
  margin: 0;
  color: #fff0cb;
  font-size: clamp(2.5rem, 15vw, 5.6rem);
  line-height: .95;
  text-shadow: 0 4px 22px rgba(0, 0, 0, .62);
  text-wrap: balance;
}

.home-hero p {
  max-width: 22em;
  margin: 12px 0 0;
  color: #ffe6ad;
  font-size: clamp(1rem, 4.5vw, 1.45rem);
  font-weight: 900;
  line-height: 1.45;
  text-shadow: 0 3px 14px rgba(0, 0, 0, .74);
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-cta {
  display: inline-grid;
  place-items: center;
  min-width: 132px;
  min-height: 46px;
  padding: 9px 16px;
  color: #fff8e8;
  border: 1px solid rgba(255, 230, 173, .72);
  border-radius: 0;
  text-align: center;
  text-decoration: none;
  font-size: .92rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .55);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .24);
}

.hero-cta--ghost {
  background: rgba(12, 9, 16, .28);
}

.hero-cta--primary {
  background: rgba(157, 44, 38, .92);
  border-color: rgba(255, 230, 173, .36);
}

.hero-cta small {
  display: block;
  margin-top: 3px;
  color: rgba(255, 248, 232, .82);
  font-size: .72rem;
  font-weight: 800;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.back-link {
  color: #ffe6ad;
  text-decoration: none;
  font-weight: 800;
}

.profile-strip {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.avatar {
  width: 58px;
  height: 58px;
  border: 3px solid #f0c875;
  border-radius: 50%;
  object-fit: cover;
  background: #f3d8a1;
}

.profile-strip strong {
  display: block;
  font-size: 1.05rem;
}

.profile-strip small,
.muted {
  color: var(--muted);
}

.stamp-counter {
  min-width: 66px;
  padding: 9px 10px;
  color: #fff6dd;
  background: var(--red);
  border-radius: var(--radius);
  text-align: center;
  font-weight: 900;
}

.booth-map {
  position: relative;
  overflow: hidden;
  width: 100%;
  margin: 18px 0;
  border: 2px solid rgba(255, 240, 203, .42);
  border-radius: var(--radius);
  background-color: #251d2c;
  box-shadow: var(--shadow);
}

.section-title {
  margin: 26px 2px 12px;
  color: #ffe1a1;
  font-size: 1.1rem;
}

.area-tile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.area-tile {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 1;
  color: #fff8df;
  background: #201827;
  border: 2px solid rgba(255, 240, 203, .32);
  border-radius: var(--radius);
  text-decoration: none;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .24);
}

.area-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .28s ease;
}

.area-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9, 7, 14, .12) 0%, rgba(9, 7, 14, .18) 42%, rgba(9, 7, 14, .82) 100%);
}

.area-tile span {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  z-index: 1;
  display: block;
  font-size: clamp(1rem, 5vw, 1.45rem);
  font-weight: 900;
  line-height: 1.25;
  text-shadow: 0 3px 14px rgba(0, 0, 0, .74);
  overflow-wrap: anywhere;
}

.area-tile:active img,
.area-tile:hover img {
  transform: scale(1.04);
}

.notice {
  margin: 18px 0 0;
  padding: 12px;
  color: #f6e5bd;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 240, 203, .18);
  border-radius: var(--radius);
  font-size: .88rem;
  line-height: 1.7;
}

.booth-map {
  aspect-ratio: 4 / 3;
  background: #201827;
}

.booth-map__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.booth-map__scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(circle at var(--focus-x, 50%) var(--focus-y, 50%), transparent 0 56px, rgba(7, 6, 12, .68) 84px),
    rgba(7, 6, 12, .32);
  pointer-events: none;
}

.map-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  left: 10px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.map-action {
  min-height: 42px;
  display: inline-grid;
  place-items: center;
  max-width: 47%;
  padding: 8px 11px;
  color: #fff8e8;
  background: rgba(13, 10, 18, .72);
  border: 1px solid rgba(255, 230, 173, .56);
  border-radius: var(--radius);
  text-align: center;
  text-decoration: none;
  font-size: clamp(.75rem, 3.2vw, .9rem);
  font-weight: 900;
  line-height: 1.2;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .32);
  backdrop-filter: blur(8px);
  pointer-events: auto;
}

.map-action--stamps {
  background: rgba(157, 44, 38, .84);
  border-color: rgba(255, 230, 173, .36);
}

.fallback-map {
  display: grid;
  min-height: 260px;
  place-items: center;
  align-content: center;
  gap: 8px;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.04) 0 1px, transparent 1px 70px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 1px, transparent 1px 70px),
    linear-gradient(145deg, #17162a, #351827);
}

.fallback-map strong {
  color: #ffe1a1;
  font-size: 1.4rem;
}

.fallback-map span {
  color: #f6e5bd;
  font-size: .9rem;
}

.empty-state {
  grid-column: 1 / -1;
  margin: 0;
  padding: 18px;
  color: #f6e5bd;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 240, 203, .18);
  border-radius: var(--radius);
  text-align: center;
}

.empty-state--map {
  position: absolute;
  right: 16px;
  bottom: 16px;
  left: 16px;
}

.booth-button {
  position: absolute;
  z-index: 1;
  width: clamp(66px, 18vw, 92px);
  height: clamp(66px, 18vw, 92px);
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  padding: 4px;
  color: transparent;
  background:
    conic-gradient(from 20deg, #ff6b6b, #ffd166, #6ee7b7, #60a5fa, #c084fc, #ff6b6b);
  cursor: pointer;
  box-shadow:
    0 12px 26px rgba(0, 0, 0, .42),
    0 0 0 3px rgba(255, 248, 223, .48),
    0 0 22px rgba(255, 209, 102, .34);
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}

.booth-button:hover,
.booth-button:focus-visible,
.booth-button.is-active {
  transform: translate(-50%, -50%) scale(1.06);
  filter: saturate(1.08);
}

.booth-button.is-active {
  z-index: 4;
  box-shadow:
    0 14px 30px rgba(0, 0, 0, .5),
    0 0 0 4px rgba(255, 248, 223, .64),
    0 0 34px rgba(255, 209, 102, .72);
}

.booth-button img {
  width: 100%;
  height: 100%;
  margin: 0;
  border: 3px solid #fff8df;
  border-radius: 50%;
  background: #fff3d7;
  object-fit: cover;
}

.booth-map.is-dense .booth-button {
  width: 58px;
  height: 58px;
  padding: 3px;
}

.booth-button.is-visited img {
  border-color: #fff8df;
}

.booth-button.is-done {
  background: linear-gradient(135deg, #6f6b67, #b7b1a8);
  box-shadow:
    0 10px 22px rgba(0, 0, 0, .36),
    0 0 0 3px rgba(236, 231, 222, .46);
}

.booth-button.is-done img {
  border-color: #ece7de;
  filter: grayscale(.18) saturate(.78);
}

.booth-popover {
  position: absolute;
  z-index: 5;
  width: min(68vw, 270px);
  padding: 13px;
  color: #fff8e8;
  background:
    linear-gradient(145deg, rgba(16, 13, 23, .92), rgba(48, 20, 29, .86));
  border: 1px solid rgba(255, 230, 173, .28);
  border-radius: var(--radius);
  box-shadow:
    0 18px 38px rgba(0, 0, 0, .48),
    inset 0 1px 0 rgba(255, 255, 255, .12);
  backdrop-filter: blur(10px);
}

.booth-popover::before {
  content: "";
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  background: rgba(22, 14, 24, .92);
  border: 1px solid rgba(255, 230, 173, .28);
  transform: translateY(-50%) rotate(45deg);
}

.booth-popover.is-right::before {
  left: -10px;
  border-top: 0;
  border-right: 0;
}

.booth-popover.is-left::before {
  right: -10px;
  border-bottom: 0;
  border-left: 0;
}

.booth-popover strong {
  display: block;
  color: #fff3d2;
  font-size: 1rem;
  line-height: 1.38;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .38);
}

.booth-popover__status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-bottom: 9px;
  padding: 4px 9px;
  color: #24151c;
  background: linear-gradient(135deg, #ffe19b, #e7b85e);
  border-radius: 999px;
  font-size: .72rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.booth-popover.is-commented .booth-popover__status {
  color: #f3eee6;
  background: linear-gradient(135deg, rgba(111, 107, 103, .94), rgba(183, 177, 168, .76));
  border: 1px solid rgba(236, 231, 222, .34);
}

.booth-popover span {
  display: block;
  margin: 6px 0 12px;
  color: rgba(255, 248, 232, .74);
  font-size: .82rem;
  line-height: 1.35;
}

.booth-popover .btn {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  color: #24151c;
  background:
    linear-gradient(135deg, #ffe19b 0%, #e7b85e 48%, #f7d987 100%);
  border: 1px solid rgba(255, 246, 218, .42);
  box-shadow:
    0 10px 18px rgba(0, 0, 0, .24),
    inset 0 1px 0 rgba(255, 255, 255, .46);
  letter-spacing: 0;
}

.booth-popover .btn:hover,
.booth-popover .btn:focus-visible {
  filter: brightness(1.04);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 760px;
  margin: 0 auto;
  padding: 8px;
  background: rgba(16, 13, 27, .96);
  border-top: 1px solid rgba(255, 240, 203, .22);
  backdrop-filter: blur(10px);
}

.bottom-nav a {
  min-height: 44px;
  display: grid;
  place-items: center;
  color: #eed8a9;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: .78rem;
  font-weight: 900;
}

.bottom-nav a[aria-current="page"] {
  color: #1e1721;
  background: #f1c66b;
}

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

.btn {
  min-height: 48px;
  border: 0;
  border-radius: var(--radius);
  padding: 11px 14px;
  color: #fff8e8;
  background: var(--red);
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

.btn.secondary {
  color: var(--ink);
  background: #ead8b4;
}

.btn.danger {
  background: #6d2020;
}

dialog {
  width: min(92vw, 430px);
  color: var(--ink);
  background: var(--panel);
  border: 0;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(5, 4, 9, .7);
}

dialog h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

dialog p {
  line-height: 1.65;
}

.form-stack {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-weight: 900;
}

input {
  width: 100%;
  min-height: 46px;
  border: 2px solid #d6b470;
  border-radius: var(--radius);
  padding: 9px 11px;
  color: var(--ink);
  background: #fffaf0;
}

.stamp-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.benefit-panel {
  display: grid;
  gap: 10px;
  margin: 16px 0 18px;
}

.benefit-current,
.benefit-next {
  padding: 14px;
  color: #fff8e8;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 240, 203, .2);
  border-radius: var(--radius);
}

.benefit-current small {
  display: block;
  margin-bottom: 6px;
  color: #e7b85e;
  font-weight: 900;
}

.benefit-current strong {
  display: block;
  color: #fff0cb;
  font-size: 1.15rem;
  line-height: 1.3;
}

.benefit-current span {
  display: block;
  margin-top: 6px;
  color: rgba(255, 248, 232, .78);
  font-size: .85rem;
  line-height: 1.55;
}

.benefit-next {
  color: #24151c;
  background: linear-gradient(135deg, #ffe19b, #e7b85e);
  border-color: rgba(255, 246, 218, .42);
  font-weight: 900;
  line-height: 1.45;
}

.stamp-card {
  position: relative;
  overflow: hidden;
  min-height: 178px;
  aspect-ratio: 1;
  color: #fff8e8;
  background: #14101c;
  border: 1px solid rgba(255, 240, 203, .26);
  border-radius: var(--radius);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .32);
}

.stamp-card__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1) contrast(.98) brightness(.9);
  transform: scale(1.01);
}

.stamp-card__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 6, 12, .88) 0%, rgba(7, 6, 12, .58) 38%, transparent 66%),
    linear-gradient(180deg, rgba(7, 6, 12, .08) 0%, rgba(7, 6, 12, .36) 100%);
}

.stamp-card__meta {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  z-index: 1;
  color: #fff8e8;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .72);
  background: linear-gradient(180deg, rgba(7, 6, 12, .18), transparent);
}

.stamp-card__meta strong {
  display: -webkit-box;
  color: #fff8e8;
  font-size: .84rem;
  font-weight: 900;
  line-height: 1.3;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.stamp-card__meta span {
  display: block;
  margin-top: 5px;
  color: rgba(255, 248, 232, .78);
  font-size: .7rem;
  font-weight: 800;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stamp-mark {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: clamp(74px, 24vw, 104px);
  height: auto;
  transform: rotate(-9deg);
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .34));
}

.suggestion-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.suggestion-card {
  position: relative;
  overflow: hidden;
  min-height: 132px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff8e8;
  background: #201827;
  border: 1px solid rgba(255, 240, 203, .22);
  border-radius: var(--radius);
  text-decoration: none;
  box-shadow: 0 12px 24px rgba(0, 0, 0, .24);
}

.suggestion-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(.68) saturate(.9);
}

.suggestion-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(7, 6, 12, .88) 100%);
}

.suggestion-card span,
.suggestion-card small {
  position: relative;
  z-index: 1;
  display: block;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .72);
}

.suggestion-card span {
  font-size: .78rem;
  font-weight: 900;
  line-height: 1.3;
}

.suggestion-card small {
  margin-top: 4px;
  color: rgba(255, 248, 232, .74);
  font-size: .66rem;
  line-height: 1.25;
}

.profile-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  color: var(--ink);
  background: var(--panel);
  border-radius: var(--radius);
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 82px;
  z-index: 20;
  transform: translateY(12px);
  opacity: 0;
  padding: 10px 14px;
  color: #24151c;
  background: #ffe3a3;
  border-radius: var(--radius);
  font-weight: 900;
  transition: .2s ease;
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.stamp-burst {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  pointer-events: none;
  animation: fadeStamp 3.15s linear forwards;
}

.stamp-burst__sheet {
  position: relative;
  width: min(78vw, 340px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.stamp-burst__paper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, .36));
  animation: sheetIn .55s ease-out both;
}

.stamp-burst__mark {
  position: absolute;
  width: 46.4%;
  height: auto;
  opacity: 0;
  margin-top: 8%;
  transform: rotate(-12deg) scale(1.55);
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .28));
  animation: stampIn 1.05s cubic-bezier(.16, 1.08, .34, 1) 1.05s both;
}

@keyframes sheetIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes stampIn {
  0% { opacity: 0; transform: rotate(-12deg) scale(1.55); }
  60% { opacity: 1; transform: rotate(-12deg) scale(1); }
  100% { opacity: 1; transform: rotate(-12deg) scale(1); }
}

@keyframes fadeStamp {
  0% { opacity: 1; }
  82% { opacity: 1; }
  100% { opacity: 0; }
}

@media (min-width: 700px) {
  .site-shell {
    padding-top: 28px;
  }

  .area-tile-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 420px) {
  .profile-strip {
    grid-template-columns: 48px 1fr;
  }

  .profile-strip .stamp-counter {
    grid-column: 1 / -1;
  }

  .home-hero {
    min-height: 430px;
  }

  .home-hero img,
  .home-hero video {
    min-height: 430px;
  }

  .home-hero__actions {
    gap: 8px;
  }

  .hero-cta {
    min-width: 126px;
    padding-inline: 12px;
  }
}
