:root {
  --bg: #ffe8f3;
  --bg-accent: #ffd8eb;
  --panel: #fff7fb;
  --panel-border: #ffd1e5;
  --text: #3b1c32;
  --muted: #6d4257;
  --accent: #ff7fb6;
  --accent-strong: #ff4f93;
  --shadow: rgba(206, 93, 143, 0.28);
  --radius: 18px;
  --max-width: 1080px;
  --transition: 200ms ease;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 181, 213, 0.65), transparent 26%),
    radial-gradient(circle at 85% 15%, rgba(255, 200, 230, 0.6), transparent 24%),
    radial-gradient(circle at 30% 85%, rgba(255, 190, 210, 0.42), transparent 26%),
    linear-gradient(145deg, var(--bg), var(--bg-accent));
  color: var(--text);
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

a {
  color: inherit;
}

.site-header {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 22px clamp(18px, 4vw, 32px) 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}

.site-nav {
  display: flex;
  gap: 10px;
}

.nav-link {
  text-decoration: none;
  color: var(--muted);
  padding: 9px 14px;
  border-radius: 999px;
  transition: background-color var(--transition), color var(--transition), transform var(--transition);
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.8);
  outline: none;
  transform: translateY(-1px);
}

.page {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(18px, 4vw, 32px);
}

.page--hero {
  display: grid;
  align-items: center;
  justify-items: center;
  min-height: calc(100vh - 180px);
}

.card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(255, 240, 246, 0.96));
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px var(--shadow);
  padding: clamp(22px, 4vw, 42px);
  backdrop-filter: blur(8px);
  max-width: 820px;
  width: min(100%, 820px);
}

.hero-card h1 {
  margin: 0 0 14px;
  font-size: clamp(2.1rem, 4vw, 2.9rem);
  line-height: 1.1;
  text-align: center;
}

.eyebrow {
  margin: 0 0 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

.lede {
  margin: 0 0 20px;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--muted);
  text-align: center;
}

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
  justify-content: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 111, 174, 0.12);
  color: var(--text);
  border: 1px solid rgba(255, 111, 174, 0.28);
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 700;
  text-decoration: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
  box-shadow: 0 12px 30px rgba(255, 111, 174, 0.32);
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(255, 79, 147, 0.4);
  outline: none;
}

.button:active {
  transform: translateY(1px);
  opacity: 0.92;
}

.button--ghost {
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  border-color: var(--panel-border);
  box-shadow: none;
}

.button--ghost:hover,
.button--ghost:focus-visible {
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
}

.site-footer {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px clamp(18px, 4vw, 32px) 32px;
  color: var(--muted);
}

.page > header,
.page > .page-header {
  text-align: center;
  margin-bottom: 24px;
}

.page h1 {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.page p {
  margin: 0;
  color: var(--muted);
}

/* Gallery */
.gallery-header {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}

.gallery-description {
  margin: 0 0 20px;
  color: var(--muted);
}

.gallery-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.gallery-item {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
}

.gallery-item img {
  display: block;
  width: 100%;
  height: auto;
}

.gallery-caption {
  padding: 12px 14px;
  color: var(--muted);
  font-weight: 600;
}

/* Drawing page */
.drawing-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) 1fr;
  gap: 18px;
  align-items: start;
}

@media (max-width: 800px) {
  .drawing-layout {
    grid-template-columns: 1fr;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

.toolbox {
  padding: 16px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
  display: grid;
  gap: 14px;
}

.toolbox h2 {
  margin: 0;
  font-size: 1.1rem;
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.swatch {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 2px solid transparent;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.swatch:focus-visible,
.swatch:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

.swatch.is-active {
  border-color: var(--accent-strong);
}

.control-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.control-row label {
  font-weight: 600;
  color: var(--muted);
}

.canvas-shell {
  background: #ffffff;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
  padding: 12px;
}

#drawing-canvas {
  width: 100%;
  height: 520px;
  border-radius: 10px;
  display: block;
  touch-action: none;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.button--subtle {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--panel-border);
  box-shadow: none;
}

.button--subtle:hover,
.button--subtle:focus-visible {
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

/* Cookie clicker */
.milestone-banner {
  display: none;
  width: min(100%, 820px);
  margin: 0 auto 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 111, 174, 0.18), rgba(255, 255, 255, 0.9));
  border: 1px solid var(--panel-border);
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.06);
}

.milestone-banner.is-visible {
  display: block;
}

.clicker-card {
  text-align: center;
  display: grid;
  gap: 16px;
  justify-items: center;
}

.clicker-layout {
  display: grid;
  gap: 18px;
  width: 100%;
}

@media (min-width: 900px) {
  .clicker-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    align-items: stretch;
  }
}

.counter {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 800;
  color: var(--text);
}

.count {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
}

.count-label {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cookie-button {
  border: 2px solid var(--panel-border);
  border-radius: 16px;
  background: var(--panel);
  padding: 12px;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
}

.cookie-button:hover,
.cookie-button:focus-visible {
  transform: translateY(-2px) scale(1.02);
  border-color: var(--accent);
  box-shadow: 0 16px 40px rgba(255, 111, 174, 0.25);
  outline: none;
}

.cookie-button img {
  display: block;
  width: min(240px, 60vw);
  height: auto;
}

.helper {
  color: var(--muted);
  margin: 0;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  width: 100%;
  text-align: left;
}

.stat {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 111, 174, 0.08);
  border: 1px solid rgba(255, 111, 174, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.stat-label {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 800;
}

.store {
  display: grid;
  gap: 14px;
  align-self: stretch;
}

.store-header {
  text-align: center;
}

@media (min-width: 900px) {
  .store {
    grid-template-rows: auto 1fr;
    height: 100%;
  }
}

.store-header h2 {
  margin: 2px 0 6px;
  text-align: center;
}

.store-columns {
  display: grid;
  gap: 14px;
}

@media (min-width: 900px) {
  .store-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.store-group {
  display: grid;
  gap: 10px;
}

.store-group-heading h3 {
  margin: 0 0 6px;
}

.store-group-heading p {
  margin: 0;
}


.store-list {
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

.store-item {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas:
    "thumb thumb"
    "meta actions";
  gap: 12px;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  align-items: start;
}

@media (max-width: 640px) {
  .store-item {
    grid-template-columns: 1fr;
    grid-template-areas:
      "thumb"
      "meta"
      "actions";
  }
}

.store-thumb {
  grid-area: thumb;
  width: 100%;
  aspect-ratio: 16 / 7;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  background: white;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.store-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.store-meta {
  grid-area: meta;
  display: grid;
  gap: 6px;
  align-self: start;
  min-width: 0;
}

.store-meta h4 {
  margin: 0;
  font-size: 1.05rem;
}

.store-meta p {
  margin: 0;
}

.store-details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.store-badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 111, 174, 0.12);
  border: 1px solid rgba(255, 111, 174, 0.3);
  font-size: 0.85rem;
  font-weight: 700;
}


.store-actions {
  grid-area: actions;
  display: grid;
  gap: 6px;
  justify-items: stretch;
  text-align: right;
  min-width: 0;
}

.store-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 229, 243, 0.86));
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
  width: 100%;
}

.store-action:hover,
.store-action:focus-visible {
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.store-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.store-cost {
  color: var(--muted);
  font-weight: 700;
}

.store-count {
  font-weight: 800;
}
