:root {
  --cream: #FAF7F0;
  --sage: #3B5E4D;
  --gold: #E8B84B;
  --ink: #22252A;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 1.05rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}
h1, h2, .subtitle {
  font-family: Georgia, "Noto Serif", "Times New Roman", serif;
  line-height: 1.2;
}
h1 { font-size: clamp(2rem, 7vw, 3.2rem); margin: .2em 0; }
h2 { color: var(--sage); font-size: clamp(1.5rem, 5vw, 2.1rem); margin: 0 0 .3em; }
img, canvas { display: block; max-width: 100%; height: auto; }
.wrap { max-width: 960px; margin: 0 auto; padding: 2.5rem 1.25rem; }
section + section { border-top: 2px dashed rgba(59, 94, 77, .25); }

.hero { background: var(--sage); color: var(--cream); text-align: center; }
.hero-grid { display: grid; gap: 2rem; align-items: center; }
.cover { width: min(320px, 80%); margin: 0 auto; border-radius: 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.series { font-weight: 600; letter-spacing: .05em; text-transform: uppercase; font-size: .85rem; margin: 0; }
.subtitle { font-size: 1.4rem; font-style: italic; margin: 0; }
.author { margin: .5rem 0 1.5rem; }

.btn {
  display: inline-block;
  min-height: 44px;
  padding: .65rem 1.3rem;
  border: 0;
  border-radius: 999px;
  background: var(--sage);
  color: var(--cream);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn-gold { background: var(--gold); color: var(--ink); }
.hero .btn-gold { font-size: 1.2rem; padding: .85rem 2rem; }
.btn:hover { filter: brightness(1.08); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.btn-gold:focus-visible { outline-color: var(--ink); }

.bonus { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.bonus figure { margin: 0; text-align: center; }
.bonus img { margin: 0 auto 1rem; border: 1px solid #ddd5c3; border-radius: 6px; background: #fff; box-shadow: 0 4px 14px rgba(34, 37, 42, .1); }

.swatches { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0; }
.swatches button {
  width: 44px;
  height: 44px;
  border: 3px solid var(--cream);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--ink);
  cursor: pointer;
}
.swatches [aria-pressed="true"] { box-shadow: 0 0 0 3px var(--ink), 0 0 0 6px var(--gold); }
#art {
  width: 100%;
  max-width: 560px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(34, 37, 42, .1);
  cursor: crosshair;
  touch-action: manipulation;
}
#msg { color: #8a2c2c; min-height: 1.6em; margin: .5rem 0; }
.tools { display: flex; gap: .8rem; flex-wrap: wrap; }

footer { background: var(--ink); color: var(--cream); text-align: center; padding: 1.5rem 1rem; font-size: .9rem; }

@media (min-width: 720px) {
  .hero { text-align: left; }
  .hero-grid { grid-template-columns: 2fr 3fr; }
  .cover { width: 100%; }
}
