/* Design tokens mirror wreplace2/components/shared/theme/colors.ts */
:root {
  --background: #3c169d;
  --screen-top: #6d35e8;
  --screen-middle: #4318b0;
  --screen-bottom: #2a0d73;
  --white: #ffffff;
  --subtitle: #e6e3ef;
  --footer: #c9c2db;

  --card: #ffffff;
  --card-bottom: #f4efff;
  --card-lip: #b9a7e8;
  --title: #3d1ba0;
  --text: #4b4468;
  --muted: #6b6385;
  --panel: #ece5fc;
  --panel-lip: #d3c6f2;

  --pill: #f8f4ff;
  --pill-shadow: #b99cf0;
  --pill-text: #4318b0;
  --icon-purple: #9167f4;
  --icon-blue: #568eff;
  --icon-yellow: #fabe33;
  --icon-pink: #f7619f;

  --primary-top: #fff3a6;
  --primary-middle: #ffd43b;
  --primary-bottom: #ffb300;
  --button-shadow: #c98a00;
  --button-text: #3a1a00;

  --sticker-bg: #fff3c4;
  --sticker-border: #e0a93b;
  --sticker-text: #a66e0a;

  --font-display: "Lilita One", system-ui, sans-serif;
  --font-body: "Fredoka", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--white);
  background-color: var(--background);
  background-image: linear-gradient(180deg, var(--screen-top) 0, var(--screen-top) 180px, var(--screen-middle) 55%, var(--screen-bottom) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* Spiral backdrop, a CSS take on bg-spiral.png */
body::before {
  content: "";
  position: fixed;
  left: 50%;
  top: 200px;
  width: 1800px;
  height: 1800px;
  margin: -900px 0 0 -900px;
  pointer-events: none;
  z-index: 0;
  background:
    repeating-conic-gradient(from 0deg, rgba(198, 194, 214, 0.07) 0deg 12.857deg, transparent 12.857deg 25.714deg);
  -webkit-mask-image: radial-gradient(circle, #000 0, #000 20%, rgba(0, 0, 0, 0.6) 35%, transparent 60%);
  mask-image: radial-gradient(circle, #000 0, #000 20%, rgba(0, 0, 0, 0.6) 35%, transparent 60%);
  animation: spin 60s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { body::before { animation: none; } }

.page {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 16px 48px;
}

/* Header */
.header {
  display: flex;
  justify-content: center;
  padding-bottom: 8px;
}
.header img { width: 126px; height: auto; display: block; }

.hero { text-align: center; margin: 28px 0 24px; }
.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(32px, 8vw, 44px);
  line-height: 1.1;
  color: var(--white);
  text-shadow: 0 3px 0 rgba(20, 4, 70, 0.35);
}
.hero p {
  margin: 12px auto 0;
  max-width: 480px;
  color: var(--subtitle);
}

/* Pills (Welcome screen) */
.pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px 0 4px;
  border-radius: 16px;
  background: var(--pill);
  box-shadow: 0 3px 0 var(--pill-shadow);
  color: var(--pill-text);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.pill .dot {
  width: 24px;
  height: 24px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 12px;
}
.pill[aria-current="page"] { outline: 3px solid var(--primary-middle); outline-offset: 1px; }

/* Content card (Save My Spot form card) */
.card {
  background: linear-gradient(180deg, var(--card) 0, var(--card-bottom) 100%);
  color: var(--text);
  border-radius: 24px;
  padding: 28px 22px;
  box-shadow: 0 6px 0 var(--card-lip), 0 18px 32px -10px rgba(20, 4, 70, 0.6);
}
@media (min-width: 600px) { .card { padding: 40px 44px; } }

.meta {
  display: inline-block;
  margin: 0 0 20px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 2px solid var(--sticker-border);
  background: var(--sticker-bg);
  color: var(--sticker-text);
  font-size: 13px;
  font-weight: 600;
}

.card h2 {
  margin: 32px 0 8px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.2;
  color: var(--title);
  scroll-margin-top: 16px;
}
.card h2:first-of-type { margin-top: 8px; }
.card h3 {
  margin: 20px 0 6px;
  font-size: 17px;
  font-weight: 600;
  color: var(--title);
}
.card p { margin: 0 0 12px; }
.card ul { margin: 0 0 12px; padding-left: 22px; }
.card li { margin-bottom: 6px; }
.card li::marker { color: var(--icon-purple); }
.card strong { font-weight: 600; color: #2e1a6b; }
.card a { color: var(--pill-text); font-weight: 500; text-decoration-thickness: 2px; text-underline-offset: 2px; }

.summary {
  margin: 0 0 8px;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 3px 0 var(--panel-lip);
}
.summary p:last-child, .summary ul:last-child { margin-bottom: 0; }

.toc { margin: 20px 0 0; padding: 0; list-style: none; columns: 2 220px; column-gap: 24px; }
.toc li { margin: 0 0 4px; break-inside: avoid; }
.toc a { text-decoration: none; color: var(--muted); font-weight: 500; }
.toc a:hover { color: var(--pill-text); }

.table-wrap { overflow-x: auto; margin: 0 0 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid #ddd3f5; }
th { color: var(--title); font-weight: 600; background: var(--panel); }
th:first-child { border-top-left-radius: 10px; }
th:last-child { border-top-right-radius: 10px; }

.placeholder {
  background: var(--sticker-bg);
  color: var(--sticker-text);
  border: 1px dashed var(--sticker-border);
  border-radius: 6px;
  padding: 0 4px;
  font-weight: 600;
}

/* Yellow app button */
.button {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 53px;
  margin-bottom: 5px;
  border-radius: 18px;
  background: linear-gradient(180deg, var(--primary-top) 0, var(--primary-middle) 48%, var(--primary-bottom) 100%);
  box-shadow: 0 5px 0 var(--button-shadow), 0 12px 18px -6px rgba(20, 4, 70, 0.6), inset 0 2px 0 rgba(255, 255, 255, 0.75), inset 0 -2px 0 rgba(150, 100, 0, 0.25);
  color: var(--button-text);
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.5px;
  text-decoration: none;
  transition: transform 80ms, box-shadow 80ms;
}
.button:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--button-shadow), inset 0 2px 0 rgba(255, 255, 255, 0.75); }

.links { display: grid; gap: 18px; max-width: 420px; margin: 0 auto; }

/* Footer */
.footer {
  margin-top: 32px;
  text-align: center;
  font-size: 12px;
  color: var(--footer);
}
.footer a { color: var(--white); font-weight: 500; text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer nav { display: flex; justify-content: center; gap: 16px; margin-bottom: 8px; font-size: 14px; }
