:root {
  --bg-light: #fff1f7;
  --bg-pink: #f6bfdc;
  --bg-rose: #b35b8b;
  --bg-deep: #3b1029;

  --text: #25121d;
  --muted: #6f4a5e;

  --panel: rgba(255, 255, 255, 0.72);
  --panel-strong: rgba(255, 255, 255, 0.88);
  --panel-soft: rgba(255, 232, 243, 0.38);

  --line: rgba(86, 31, 60, 0.16);
  --accent: #9f2f6d;
  --accent-dark: #641641;
  --accent-soft: rgba(159, 47, 109, 0.12);

  --shadow: 0 24px 70px rgba(61, 16, 43, 0.18);
  --shadow-strong: 0 28px 80px rgba(61, 16, 43, 0.24);

  --radius-lg: 30px;
  --radius-md: 24px;
  --radius-pill: 999px;

  --page-width: 1120px;
  --image-stage-width: 980px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.62), transparent 24rem),
    radial-gradient(circle at 88% 18%, rgba(255, 196, 224, 0.64), transparent 28rem),
    linear-gradient(145deg, var(--bg-light) 0%, var(--bg-pink) 38%, var(--bg-rose) 68%, var(--bg-deep) 100%);
  color: var(--text);
  font-family: "Trebuchet MS", "Avenir Next", "Segoe UI", Arial, sans-serif;
}

img {
  max-width: 100%;
}

button,
select {
  font: inherit;
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border: 0;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #b43a7a, #741849);
  color: #fff7fb;
  font-weight: 900;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(116, 24, 73, 0.28);
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    filter 140ms ease;
}

button:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 18px 44px rgba(116, 24, 73, 0.34);
}

button:active {
  transform: translateY(0);
}

.page-shell {
  width: min(var(--page-width), calc(100% - 36px));
  margin: 0 auto;
  padding: 30px 0 48px;
}

.hero {
  padding: 42px 0 28px;
}

.hero.compact {
  padding: 18px 0 22px;
}

.eyebrow,
.card-kicker {
  margin: 0 0 12px;
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 920px;
  margin: 0;
  color: var(--text);
  font-size: clamp(2.25rem, 6vw, 4.9rem);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.hero-text {
  max-width: 760px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.62;
}

/* Navigation */

.top-nav,
.app-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 8px 0 22px;
}

.top-nav a,
.app-actions a,
.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 15px;
  border: 1px solid rgba(159, 47, 109, 0.2);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.62);
  color: var(--accent-dark);
  text-decoration: none;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(61, 16, 43, 0.1);
  transition:
    transform 140ms ease,
    background 140ms ease,
    box-shadow 140ms ease;
}

.top-nav a:hover,
.app-actions a:hover,
.nav-button:hover {
  transform: translateY(-2px);
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(61, 16, 43, 0.16);
}

/* Home page */

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.app-card,
.controls-panel,
.quote-panel,
.roadmap-panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(145deg, var(--panel-strong), var(--panel));
  color: var(--text);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.app-card {
  display: block;
  padding: 28px;
  text-decoration: none;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.app-card:hover {
  transform: translateY(-4px);
  border-color: rgba(159, 47, 109, 0.38);
  box-shadow: var(--shadow-strong);
}

.app-card h2 {
  margin: 0 0 10px;
  font-size: 1.65rem;
  letter-spacing: -0.03em;
}

.app-card p {
  color: var(--muted);
  line-height: 1.55;
}

.app-card span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 800;
}

/* Controls */

.controls-panel {
  padding: 20px;
  margin-bottom: 24px;
}

.controls-panel label {
  display: block;
  margin-bottom: 9px;
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

select {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid rgba(159, 47, 109, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--text);
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

/* Quotes page */

.quote-layout {
  display: grid;
  grid-template-columns: minmax(280px, 430px) 1fr;
  gap: 22px;
  align-items: stretch;
}

.quote-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 420px;
  padding: 28px;
}

.quote {
  color: var(--text);
  font-size: clamp(1.45rem, 4vw, 2.45rem);
  line-height: 1.18;
  letter-spacing: -0.035em;
  overflow-wrap: break-word;
}

.author {
  margin-top: 18px;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 700;
  overflow-wrap: break-word;
}

.quote-panel button {
  align-self: flex-start;
  margin-top: 24px;
}

.quote-image-stage {
  width: min(100%, var(--image-stage-width));
  height: min(72vh, 680px);
  margin: 24px auto 0;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(86, 31, 60, 0.18);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.58), var(--panel-soft)),
    rgba(255, 255, 255, 0.52);
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(14px);
}

.quote-image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  border-radius: 20px;
  box-shadow: 0 18px 48px rgba(61, 16, 43, 0.2);
}

.quote-image[src=""],
.quote-image:not([src]) {
  display: none;
}

/* Art References page */

.reference-display {
  margin-top: 24px;
}

.reference-stage {
  width: min(100%, var(--image-stage-width));
  height: min(72vh, 680px);
  margin: 0 auto;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(86, 31, 60, 0.18);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.58), var(--panel-soft)),
    rgba(255, 255, 255, 0.52);
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(14px);
}

.reference-image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  border-radius: 20px;
  box-shadow: 0 18px 48px rgba(61, 16, 43, 0.2);
}

.reference-image[src=""],
.reference-image:not([src]),
#reference-image[hidden],
#reference-empty[hidden] {
  display: none !important;
}

.empty-state {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  text-align: center;
}

.empty-card {
  max-width: 390px;
  padding: 28px 24px;
  border: 1px solid rgba(159, 47, 109, 0.14);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.48);
  box-shadow: 0 18px 46px rgba(61, 16, 43, 0.08);
}

.empty-card h2 {
  margin: 0 0 10px;
  color: var(--accent-dark);
  font-size: 1.15rem;
}

.empty-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

/* Legacy art metadata suppression */

.reference-meta,
#reference-meta,
#reference-title,
#reference-notes {
  display: none !important;
}

/* Responsive layout */

@media (max-width: 820px) {
  .quote-layout {
    grid-template-columns: 1fr;
  }

  .quote-panel,
  .quote-image-stage,
  .reference-stage {
    min-height: 320px;
  }

  .quote-image-stage,
  .reference-stage {
    height: min(64vh, 520px);
    padding: 10px;
  }
}

@media (max-width: 520px) {
  .page-shell {
    width: min(100% - 24px, var(--page-width));
    padding-top: 20px;
  }

  .hero {
    padding: 30px 0 22px;
  }

  .hero.compact {
    padding: 14px 0 18px;
  }

  .hero h1 {
    font-size: clamp(2rem, 14vw, 3.6rem);
  }

  .controls-panel,
  .quote-panel,
  .app-card {
    border-radius: 22px;
  }

  .button-row {
    gap: 10px;
  }

  button {
    min-height: 42px;
    padding: 10px 15px;
  }

  .empty-card {
    padding: 22px 18px;
  }
}