/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Design tokens ── */
:root {
  --ground:  #f4e9dd;
  --text:    #2b1a17;
  --accent:  #6a1f2a;
  --terra:   #c48a6a;
  --warm:    #ffe7c2;
  --beige:   #d8c2a7;
  --mid:     #b8a89a;
  --dark:    #2b1a17;
  --ff-d: 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
  --ff-b: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ff-m: 'Courier New', Courier, monospace;
}

/* ── Base ── */
body {
  background: var(--ground);
  color: var(--text);
  font-family: var(--ff-b);
  min-height: 100vh;
}

/* ── Auth gate ── */
.auth-gate {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--ground);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
}
.auth-card {
  background: #fff;
  border: 1px solid var(--beige);
  border-radius: 1rem;
  padding: 3rem 2.5rem;
  width: 100%; max-width: 400px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
}
.auth-logo { width: 110px; height: auto; object-fit: contain; }
.auth-title {
  font-family: var(--ff-d); font-size: 1.7rem; font-style: italic;
  color: var(--dark); line-height: 1.2;
}
.auth-sub { font-size: .88rem; color: var(--mid); line-height: 1.6; max-width: 28ch; }
.auth-sub-expired { color: var(--accent); }
#auth-form-wrap { width: 100%; display: flex; flex-direction: column; gap: .75rem; }
.auth-input {
  width: 100%; padding: .85rem 1rem;
  border: 1px solid var(--beige); border-radius: .5rem;
  font-family: var(--ff-m); font-size: 1.1rem; letter-spacing: .18em; text-align: center;
  background: var(--ground); color: var(--dark);
  outline: none; transition: border-color .2s;
  text-transform: uppercase;
}
.auth-input:focus { border-color: var(--terra); }
.auth-submit-btn { width: 100%; }
.auth-error { font-size: .8rem; color: var(--accent); line-height: 1.5; }

/* ── Nav ── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(244, 233, 221, 0.94);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--beige);
  display: flex; align-items: center; justify-content: space-between;
  padding: .8rem 2rem; gap: 1rem;
}
.nav-logo {
  font-family: var(--ff-d); font-size: 1.2rem; color: var(--text);
  text-decoration: none; font-style: italic; white-space: nowrap; flex-shrink: 0;
}
.nav-logo em { font-size: .78rem; color: var(--terra); font-style: normal; margin-left: .4rem; letter-spacing: .04em; }
.nav-right { display: flex; align-items: center; gap: 1rem; }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  font-size: .82rem; color: var(--text); text-decoration: none;
  letter-spacing: .04em; text-transform: uppercase; font-family: var(--ff-m);
  opacity: .65; transition: opacity .2s;
}
.nav-links a:hover { opacity: 1; }
.back-btn {
  display: none; background: none; border: 1px solid var(--beige); color: var(--text);
  font-family: var(--ff-m); font-size: .8rem; padding: .4rem .9rem;
  border-radius: 2rem; cursor: pointer; letter-spacing: .04em; transition: background .2s;
}
.back-btn:hover { background: var(--beige); }
.back-btn.visible { display: inline-block; }

/* ── View system ── */
.view { display: none; }
.view.active { display: block; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ── HOME — Hero ── */
.hero {
  display: grid; grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 57px);
}
.hero-swatches {
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr);
  gap: 0; height: 100%;
}
.hero-swatches .swatch-tile { aspect-ratio: auto; }
/* ── Swatch navigation tiles ── */
.swatch-tile {
  aspect-ratio: 1;
  display: flex; flex-direction: column;
  padding: 1.25rem; cursor: pointer;
  border: none; text-align: center; font-family: inherit;
  transition: transform .18s, box-shadow .18s;
  color: var(--text); text-decoration: none;
  overflow: hidden; position: relative;
}
.swatch-tile:hover { transform: scale(1.04); z-index: 2; box-shadow: 0 8px 28px rgba(0,0,0,.2); }
.swatch-tile .tile-num {
  font-family: var(--ff-m); font-size: .62rem; letter-spacing: .08em;
  color: rgba(43,26,23,.4); margin-bottom: .5rem;
}
.swatch-tile .tile-visual {
  flex: 1; display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.swatch-tile .tile-title {
  font-family: var(--ff-d); font-size: 1rem; font-style: italic;
  margin-bottom: .2rem; color: var(--text);
}
.swatch-tile:hover .tile-title::after { content: ' →'; }
.swatch-tile .tile-desc {
  font-size: .72rem; line-height: 1.4; color: rgba(43,26,23,.6);
}
.swatch-tile.st-dark .tile-num  { color: rgba(255,255,255,.45); }
.swatch-tile.st-dark .tile-title { color: #fff; }
.swatch-tile.st-dark .tile-desc  { color: rgba(255,255,255,.7); }
.swatch-tile.st-dark .tile-vis-q { color: rgba(255,255,255,.5); }
.hero-panel {
  display: flex; flex-direction: column; justify-content: center;
  padding: 2rem 2rem 2rem 2.5rem; border-right: 1px solid var(--beige);
}
.eyebrow {
  font-family: var(--ff-m); font-size: .87rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--terra); margin-bottom: 1.2rem;
}
.hero-title {
  font-family: var(--ff-d); font-size: clamp(2.2rem, 4vw, 3.8rem);
  line-height: 1.0; font-style: italic; margin-bottom: .75rem;
}
.hero-body { font-size: 1rem; line-height: 1.7; color: var(--mid); margin-bottom: 1rem; }
.cta-btn {
  display: inline-block; background: var(--accent); color: #fff; border: none;
  font-family: var(--ff-m); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase;
  padding: .85rem 2rem; border-radius: 2rem; cursor: pointer; transition: background .2s;
  align-self: flex-start;
}
.cta-btn:hover { background: #8a2535; }
.cta-btn:disabled { opacity: .5; cursor: default; }

/* ── Spotify band ── */
.spotify-band {
  display: flex; align-items: center; gap: 1.25rem;
  padding: 1.5rem 3rem;
  border-top: 1px solid var(--beige); border-bottom: 1px solid var(--beige);
  background: rgba(255,255,255,.4);
  text-decoration: none; color: var(--dark);
  transition: background .2s;
}
.spotify-band:hover { background: rgba(255,255,255,.7); }
.spotify-logo { width: 52px; height: 52px; object-fit: contain; border-radius: 50%; }
.spotify-text {
  font-family: var(--ff-d); font-size: 1.3rem; font-style: italic; color: var(--dark);
  flex: 1;
}
.spotify-note { font-family: var(--ff-m); font-size: .68rem; letter-spacing: .06em; color: var(--terra); text-transform: uppercase; }

/* ── HOME — Tiles ── */
.tiles-wrap { padding: 4rem 3rem; border-top: 1px solid var(--beige); }
.tiles-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; margin-top: 2rem; }
.tile {
  background: #fff; border: 1px solid var(--beige); border-radius: .75rem;
  padding: 2rem 1.75rem 1.75rem; cursor: pointer;
  transition: transform .2s, box-shadow .2s; text-align: left; width: 100%; font-family: inherit;
}
.tile:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(43, 26, 23, .1); border-color: var(--terra); }
.tile:focus-visible { outline: 2px solid var(--terra); outline-offset: 2px; }
.tile:hover .tile-title::after { content: ' →'; color: var(--terra); }
.tile-num { font-family: var(--ff-m); font-size: .68rem; color: var(--mid); letter-spacing: .08em; margin-bottom: 1.25rem; }
.tile-visual { height: 72px; display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem; }
.tile-vis-wheel {
  width: 96px; height: 96px; border-radius: 50%;
  background: conic-gradient(hsl(0,70%,50%) 0deg 60deg, hsl(60,80%,52%) 60deg 120deg, hsl(120,55%,38%) 120deg 180deg, hsl(200,65%,38%) 180deg 240deg, hsl(240,60%,42%) 240deg 300deg, hsl(30,10%,15%) 300deg 360deg);
  box-shadow: 0 2px 12px rgba(0,0,0,.15);
}
.tile-vis-q { font-family: var(--ff-d); font-size: 5.25rem; color: var(--accent); font-style: italic; line-height: 1; opacity: .8; }
.tile-vis-spark {
  width: 96px; height: 96px; border-radius: 50%;
  background: conic-gradient(var(--accent) 0deg 60deg, var(--terra) 60deg 120deg, var(--warm) 120deg 180deg, var(--beige) 180deg 240deg, var(--mid) 240deg 300deg, var(--dark) 300deg 360deg);
  box-shadow: 0 2px 12px rgba(0,0,0,.15);
}
.tile-title { font-family: var(--ff-d); font-size: 1.3rem; font-style: italic; margin-bottom: .5rem; color: var(--text); }
.tile-desc { font-size: .83rem; line-height: 1.6; color: var(--mid); }

/* ── VIEW headers ── */
.view-header { padding: 3rem 3rem 2rem; border-bottom: 1px solid var(--beige); }
.view-title { font-family: var(--ff-d); font-size: 2.2rem; font-style: italic; margin-top: .4rem; }
.view-sub { font-size: .88rem; color: var(--mid); margin-top: .4rem; line-height: 1.6; }

/* ── MIX view ── */
.mixer-layout { display: grid; grid-template-columns: 290px 1fr; gap: 3rem; padding: 2.5rem 3rem; align-items: start; }
.picker-label { font-family: var(--ff-m); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--mid); margin-bottom: .5rem; }
#hexCanvas { display: block; cursor: crosshair; border-radius: 6px; border: 1px solid var(--beige); }
.color-compare { display: flex; gap: .5rem; margin-top: 1rem; align-items: flex-start; }
.color-col { flex: 1; display: flex; flex-direction: column; gap: .35rem; }
.color-col-label { font-family: var(--ff-m); font-size: .63rem; color: var(--mid); letter-spacing: .06em; text-transform: uppercase; }
.color-swatch { height: 64px; border-radius: 6px; border: 1px solid rgba(0,0,0,.08); background: var(--beige); transition: background .15s; }
.color-col-hex { font-family: var(--ff-m); font-size: .78rem; display: block; }
.color-arrow { font-size: 1.1rem; color: var(--mid); padding: .25rem; margin-top: 1.6rem; }
.match-chip { display: inline-flex; align-items: center; gap: .35rem; font-family: var(--ff-m); font-size: .65rem; letter-spacing: .06em; text-transform: uppercase; padding: .3rem .7rem; border-radius: 1rem; margin-top: .8rem; }
.match-chip::before { content: '●'; font-size: .5rem; }
.match-chip.great  { background: #e8f5e9; color: #2e7d32; }
.match-chip.good   { background: #fff3e0; color: #b45309; }
.match-chip.approx { background: #fce4ec; color: #880e4f; }
.kit-legend { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--beige); }
.legend-label { font-family: var(--ff-m); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--mid); margin-bottom: .75rem; }
.legend-dots { display: flex; flex-wrap: wrap; gap: .55rem; }
.dot-item { display: flex; align-items: center; gap: .35rem; font-family: var(--ff-m); font-size: .7rem; color: var(--text); }
.dot { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid rgba(0,0,0,.12); flex-shrink: 0; }
.recipe-title { font-family: var(--ff-d); font-size: 1.4rem; font-style: italic; margin-bottom: .6rem; }
.recipe-text { font-size: .92rem; line-height: 1.75; color: var(--text); margin-bottom: 1.75rem; min-height: 3rem; }
.recipe-bar-row { display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; }
.rbd { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid rgba(0,0,0,.12); flex-shrink: 0; }
.rbn { font-size: .75rem; font-family: var(--ff-m); color: var(--text); width: 94px; flex-shrink: 0; }
.rbt { flex: 1; height: 7px; background: rgba(0,0,0,.07); border-radius: 4px; overflow: hidden; }
.rbf { height: 100%; border-radius: 4px; transition: width .25s ease; }
.rbp { font-size: .7rem; font-family: var(--ff-m); color: var(--mid); width: 34px; text-align: right; flex-shrink: 0; }
.recipe-note { font-size: .8rem; color: var(--mid); line-height: 1.65; margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--beige); }

/* ── Flow: shared (Inspire + Spark) ── */
.flow-container { padding: 2.5rem 3rem; max-width: 680px; }

.flow-step-num { font-family: var(--ff-m); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--mid); margin-bottom: .75rem; }
.flow-question { font-family: var(--ff-d); font-size: 1.5rem; font-style: italic; margin-bottom: 1.75rem; line-height: 1.3; }
.flow-subq { font-size: 1.2rem; margin-top: 1.75rem; }

.option-grid { display: flex; flex-wrap: wrap; gap: .65rem; margin-bottom: 1.75rem; }
.option-btn {
  background: #fff; border: 1px solid var(--beige); color: var(--dark);
  font-family: var(--ff-b); font-size: .88rem; padding: .65rem 1.15rem;
  border-radius: 2rem; cursor: pointer; transition: border-color .15s, background .15s, color .15s;
}
.option-btn:hover { border-color: var(--terra); }
.option-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.flow-other-input {
  width: 100%; padding: .75rem 1rem; margin-bottom: 1.75rem;
  border: 1px solid var(--beige); border-radius: .5rem;
  font-family: var(--ff-b); font-size: .9rem; background: #fff;
  outline: none; transition: border-color .2s;
}
.flow-other-input:focus { border-color: var(--terra); }
.flow-hint { font-size: .8rem; color: var(--terra); margin: -.75rem 0 .75rem; }
.topic-presets { margin-top: 0; }
.inspire-img-loading { padding: 1.5rem 0; margin: 0; }

.flow-nav { display: flex; align-items: center; gap: 1rem; }
.flow-next-btn {
  background: var(--accent); color: #fff; border: none;
  font-family: var(--ff-m); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase;
  padding: .8rem 1.75rem; border-radius: 2rem; cursor: pointer; transition: background .2s;
}
.flow-next-btn:hover:not(:disabled) { background: #8a2535; }
.flow-next-btn:disabled { opacity: .4; cursor: default; }
.flow-ghost-btn {
  background: none; border: 1px solid var(--beige); color: var(--dark);
  font-family: var(--ff-m); font-size: .78rem; letter-spacing: .04em;
  padding: .7rem 1.25rem; border-radius: 2rem; cursor: pointer; transition: background .2s;
}
.flow-ghost-btn:hover { background: var(--beige); }

/* Loading */
.flow-loading { padding: 4rem 0; text-align: center; }
.flow-spinner {
  display: inline-block; width: 36px; height: 36px;
  border: 3px solid var(--beige); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .75s linear infinite; margin-bottom: 1.25rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
.flow-loading-text { font-family: var(--ff-d); font-size: 1rem; font-style: italic; color: var(--mid); }

/* Error */
.flow-error { padding: 3rem 0; }
.flow-error p { font-size: .9rem; color: var(--accent); line-height: 1.6; }

/* ── Inspire result ── */
.inspire-result { padding-top: .5rem; }
.result-label { font-family: var(--ff-m); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--terra); margin-bottom: 1rem; }
.result-card {
  background: #fff; border: 1px solid var(--beige); border-radius: .75rem;
  padding: 2rem 2rem 2rem; margin-bottom: 2rem;
}
.result-text { font-family: var(--ff-d); font-size: 1.05rem; line-height: 1.85; color: var(--dark); }
.result-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }

/* ── Spark card deck ── */
.spark-deck { padding-top: .5rem; }
.spark-progress { font-family: var(--ff-m); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--mid); margin-bottom: 1.25rem; }
.spark-card {
  background: #fff; border: 1px solid var(--beige); border-radius: .75rem;
  padding: 2.5rem 2rem; margin-bottom: 1.75rem; min-height: 140px;
  display: flex; align-items: center; justify-content: center;
}
.spark-card-text { font-family: var(--ff-d); font-size: 1.15rem; line-height: 1.75; color: var(--dark); text-align: center; }
.spark-deck-nav { display: flex; flex-direction: column; align-items: flex-start; gap: .75rem; }

/* ── Hero logo ── */
.hero-logo {
  width: 240px; height: 240px; object-fit: contain;
  margin-bottom: 1.25rem;
}

/* ── Mobile lang button in hero ── */
.lang-btn-hero {
  display: none; align-self: flex-end;
  margin-bottom: .75rem;
}

/* ── Lang toggle button ── */
.lang-btn {
  background: none; border: 1px solid var(--beige); color: var(--text);
  font-family: var(--ff-m); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  padding: .35rem .8rem; border-radius: 2rem; cursor: pointer; transition: background .2s;
  flex-shrink: 0;
}
.lang-btn:hover { background: var(--beige); }

/* ── Inspire: image generation ── */
.inspire-image-wrap { margin: 1.5rem 0; }
.inspire-img-btn { font-size: .8rem; }
.inspire-img {
  display: block; width: 100%; border-radius: .75rem;
  margin-top: 1.25rem; border: 1px solid var(--beige);
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
}
.inspire-img-full {
  display: block; width: 100%; border-radius: .75rem;
  margin-bottom: 1.5rem; border: 1px solid var(--beige);
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
}
.inspire-img-note {
  font-family: var(--ff-m); font-size: .72rem; color: var(--mid); letter-spacing: .04em;
}
.inspire-again-note {
  font-family: var(--ff-m); font-size: .7rem; color: var(--mid);
  font-style: italic; margin-top: .5rem;
}

/* ── Upload area (Share your moment) ── */
.upload-area {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 160px;
  border: 2px dashed var(--beige); border-radius: .75rem;
  background: #fff; cursor: pointer; margin-bottom: 1.25rem;
  transition: border-color .2s, background .2s;
}
.upload-area:hover { border-color: var(--terra); background: var(--warm); }
.upload-area-inner {
  font-family: var(--ff-d); font-size: 1rem; font-style: italic;
  color: var(--mid); text-align: center; padding: 2rem;
}
.file-input-hidden { display: none; }
.upload-preview { margin-bottom: 1.25rem; }
.upload-preview-img {
  display: block; max-width: 100%; max-height: 340px; object-fit: contain;
  border-radius: .75rem; border: 1px solid var(--beige); margin-bottom: .75rem;
}
.upload-change { margin-top: 0; }

/* Share: optional details */
.share-field-label {
  font-family: var(--ff-m); font-size: .72rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--mid); margin: 1.25rem 0 .5rem;
}
.share-occ-grid { margin-bottom: .25rem; }
.share-textarea {
  width: 100%; padding: .75rem 1rem; margin-bottom: .5rem;
  border: 1px solid var(--beige); border-radius: .5rem;
  font-family: var(--ff-b); font-size: .9rem; background: #fff;
  outline: none; transition: border-color .2s; resize: vertical;
}
.share-textarea:focus { border-color: var(--terra); }

/* Share: consent checkbox */
.consent-wrap { margin: 1.5rem 0 .5rem; }
.consent-label {
  display: flex; align-items: flex-start; gap: .65rem;
  font-size: .88rem; line-height: 1.5; color: var(--text); cursor: pointer;
}
.consent-label input[type="checkbox"] {
  flex-shrink: 0; width: 16px; height: 16px; margin-top: .15rem;
  accent-color: var(--accent); cursor: pointer;
}

/* Share: success screen */
.share-success { text-align: center; padding-top: .5rem; }
.share-success-img {
  display: block; max-width: 100%; max-height: 360px; object-fit: contain;
  border-radius: .75rem; border: 1px solid var(--beige); margin: 0 auto 1.75rem;
}
.share-success-title {
  font-family: var(--ff-d); font-size: 1.6rem; font-style: italic;
  color: var(--dark); margin-bottom: .5rem;
}
.share-success-sub { font-size: .9rem; color: var(--mid); margin-bottom: 1.5rem; }

/* Tile visual: share */
.tile-vis-share {
  font-family: var(--ff-d); font-size: 5.25rem; color: var(--terra);
  font-style: italic; line-height: 1; opacity: .8;
}
.tile-vis-music { font-size: 4.5rem; color: var(--terra); opacity: .8; }
.tile-spotify { grid-column: 1 / -1; text-decoration: none; color: inherit; }

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--beige); padding: 2rem 3rem;
  text-align: center;
}
.footer-text {
  font-family: var(--ff-d); font-size: .88rem; color: var(--mid); font-style: italic;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-panel { border-right: none; padding: 2.5rem 2rem; }
  .hero-swatches { grid-template-columns: repeat(3, 1fr); padding: 2rem; border-top: 1px solid var(--beige); }
  .tiles-grid { grid-template-columns: 1fr; }
  .tiles-wrap { padding: 2.5rem 2rem; }
  .view-header { padding: 2rem 2rem 1.5rem; }
  .mixer-layout { grid-template-columns: 1fr; padding: 2rem; }
  .flow-container { padding: 2rem 2rem; }
  .spotify-band { padding: 1.25rem 2rem; }
}
@media (max-width: 600px) {
  .lang-btn:not(.lang-btn-hero) { display: none; }
  .lang-btn-hero { display: block; }
  .nav { padding: .6rem .75rem .4rem; flex-wrap: wrap; gap: .2rem 0; }
  .nav-logo { width: 100%; }
  .nav-right { width: 100%; flex-wrap: wrap; gap: .3rem; }
  .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: .2rem .4rem; width: 100%; }
  .nav-links a { font-size: .68rem; letter-spacing: .02em; line-height: 1.3; text-align: center; padding: .3rem .2rem; opacity: .75; }
  .hero-swatches { grid-template-columns: 1fr 1fr; grid-template-rows: auto; height: auto; padding: 0; }
  .hero-swatches .swatch-tile { aspect-ratio: 1; }
  .swatch-tile { padding: 0.85rem 0.75rem; }
  .swatch-tile .tile-visual { flex: 0 0 auto; height: 72px; }
  .swatch-tile .tile-title { font-size: .88rem; }
  .swatch-tile .tile-desc { display: none; }
  .tile-vis-wheel, .tile-vis-spark { width: 66px; height: 66px; }
  .tile-vis-q, .tile-vis-share { font-size: 3.75rem; }
  .hero-panel { padding: 2rem 1rem; }
  .hero-title { font-size: 2.8rem; }
  .tiles-wrap { padding: 2rem 1rem; }
  .flow-container { padding: 1.5rem 1rem; }
  .spotify-band { padding: 1rem; gap: .75rem; }
  .spotify-text { font-size: 1.1rem; }
  .auth-card { padding: 2.5rem 1.5rem; }
}

/* ── Gallery tile visual ── */
.tile-vis-gallery {
  width: 80px; height: 80px;
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr;
  gap: 3px; border-radius: 6px; overflow: hidden;
}
.tile-vis-gallery span {
  display: block;
  background: rgba(255,255,255,0.22);
  border-radius: 2px;
}
.tile-vis-gallery span:nth-child(1) { background: rgba(255,255,255,0.35); }
.tile-vis-gallery span:nth-child(3) { background: rgba(255,255,255,0.18); }

/* ── Gallery view ── */
.gallery-container {
  padding: 0 2.5rem 3rem;
  max-width: 1100px;
}

.gallery-filters {
  display: flex; flex-wrap: wrap; gap: .5rem;
  padding: 1.25rem 0 1.5rem;
  align-items: center;
}

.gallery-filter-sep {
  display: block; width: 1px; height: 1.25rem;
  background: var(--beige); margin: 0 .25rem;
}

.gallery-filter-btn {
  padding: .35rem .85rem;
  border: 1px solid var(--beige);
  border-radius: 100px;
  background: transparent;
  color: var(--text);
  font-size: .8rem; font-family: var(--ff-b);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.gallery-filter-btn:hover { border-color: var(--terra); color: var(--accent); }
.gallery-filter-btn.active {
  background: var(--accent); border-color: var(--accent); color: #fff;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.gallery-card {
  background: #fff;
  border-radius: .75rem;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(43,26,23,.08);
  transition: transform .15s, box-shadow .15s;
}
.gallery-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(43,26,23,.13); }

.gallery-img {
  width: 100%; aspect-ratio: 1/1;
  object-fit: cover; display: block;
}

.gallery-card-body { padding: .75rem 1rem .9rem; }

.gallery-badge {
  display: inline-block;
  font-size: .7rem; letter-spacing: .04em; text-transform: uppercase;
  color: var(--accent); background: var(--warm);
  border-radius: 100px; padding: .15rem .55rem;
  margin-bottom: .45rem;
}

.gallery-quote {
  font-size: .82rem; font-style: italic; color: var(--text);
  line-height: 1.45; margin-bottom: .35rem; word-break: break-word;
}

.gallery-name {
  font-size: .75rem; color: var(--mid);
}

.gallery-loading, .gallery-empty {
  padding: 2.5rem 0;
  color: var(--mid); font-size: .9rem; font-style: italic;
}

/* ── Footer feedback button ── */
.footer-feedback-btn {
  display: inline-block;
  margin-top: .5rem;
  padding: .45rem 1.1rem;
  border: none;
  border-radius: 100px;
  background: var(--accent);
  color: #fff;
  font-size: .8rem; font-family: var(--ff-m);
  letter-spacing: .06em; text-transform: uppercase;
  cursor: pointer;
  transition: background .15s;
}
.footer-feedback-btn:hover { background: #8a2535; }

/* ── Feedback modal ── */
.feedback-overlay {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(43,26,23,.5);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
}

.feedback-modal {
  background: var(--ground);
  border: 1px solid var(--beige);
  border-radius: 1rem;
  padding: 2.5rem 2rem;
  max-width: 380px; width: 100%;
  text-align: center;
  position: relative;
}

.feedback-close {
  position: absolute; top: .9rem; right: 1rem;
  background: none; border: none; cursor: pointer;
  font-size: 1.3rem; color: var(--mid); line-height: 1;
}
.feedback-close:hover { color: var(--text); }

.feedback-modal-title {
  font-family: var(--ff-d); font-size: 1.4rem; font-style: italic;
  color: var(--dark); margin-bottom: .5rem;
}

.feedback-modal-sub {
  font-size: .88rem; color: var(--mid); line-height: 1.6;
  margin-bottom: 1.5rem;
}

.feedback-modal-cta {
  display: inline-block;
  padding: .65rem 1.5rem;
  background: var(--accent); color: #fff;
  border-radius: .5rem; text-decoration: none;
  font-size: .9rem; font-weight: 600;
  transition: opacity .15s;
}
.feedback-modal-cta:hover { opacity: .85; }

/* ── Share textarea ── */
.share-textarea {
  width: 100%;
  padding: .6rem .75rem;
  border: 1px solid var(--beige);
  border-radius: .5rem;
  background: #fff;
  color: var(--text);
  font-family: var(--ff-b); font-size: .88rem;
  resize: vertical; min-height: 72px;
  margin-bottom: .75rem;
  transition: border-color .15s;
}
.share-textarea:focus { outline: none; border-color: var(--terra); }

@media (max-width: 600px) {
  .gallery-container { padding: 0 1rem 2rem; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .75rem; }
}
