/* Fonts are self-hosted, so visitors never contact Google (faster, and no visitor data goes to a third party).
 * Cormorant Garamond and Figtree, SIL Open Font License 1.1 (licenses in fonts/OFL-*.txt). Latin + Latin Extended only. */
/* Cormorant Garamond latin-ext */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/cormorant-garamond-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Cormorant Garamond latin */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/cormorant-garamond-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Cormorant Garamond latin-ext */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/cormorant-garamond-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Cormorant Garamond latin */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/cormorant-garamond-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Cormorant Garamond latin-ext */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/cormorant-garamond-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Cormorant Garamond latin */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/cormorant-garamond-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Figtree latin-ext */
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/figtree-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Figtree latin */
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/figtree-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Figtree latin-ext */
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/figtree-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Figtree latin */
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/figtree-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Figtree latin-ext */
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/figtree-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Figtree latin */
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/figtree-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Figtree latin-ext */
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/figtree-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Figtree latin */
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/figtree-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Color the Museum — each book is a gallery room; the hero is the studio. */
:root {
  /* brand colors from the Mimir Edition logo (C · Book monogram) */
  --brand-green: #1f3a2e;
  --brand-gold: #b8913f;
  --brand-cream: #f4efe3;
  --brand-ink: #1c1c1a;

  --wall: var(--brand-green); /* hero; each book room sets its own wall from its cover */
  --wall-deep: #172c23;
  --gilt: #c9a24e;          /* logo gold, lifted slightly so it reads on the green walls */
  --gilt-soft: #e2c98b;
  --paper: var(--brand-cream);
  --ink: var(--brand-ink);
  --on-wall: #ece5d2;
  --on-wall-muted: #b9c4b9;

  --display: 'Cormorant Garamond', Garamond, 'Palatino Linotype', Palatino, serif;
  --body: 'Figtree', 'Segoe UI', system-ui, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.75rem;
  --step-3: clamp(2.2rem, 4vw, 3rem);
  --step-4: clamp(3.2rem, 8vw, 6.4rem);

  --gutter: clamp(16px, 4vw, 56px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 84px; }   /* anchors land below the sticky header */
body {
  margin: 0;
  overflow-x: clip;                  /* the turning 3D books must never cause sideways scroll */
  background: var(--wall);
  color: var(--on-wall);
  font: 400 var(--step-0)/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--gilt-soft); }
:focus-visible { outline: 3px solid var(--gilt); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); color: var(--ink); padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; }

/* ---------- header: cream like the logo, so the monogram shows in its true colors ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px var(--gutter);
  background: color-mix(in srgb, var(--brand-cream) 94%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid color-mix(in srgb, var(--brand-gold) 45%, transparent);
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--brand-ink); text-decoration: none; flex: none; }
.brand-mark { width: clamp(42px, 5vw, 56px); height: auto; aspect-ratio: 590 / 575; flex: none; }
.brand-word { display: grid; font-family: var(--display); font-weight: 600; font-size: clamp(1.75rem, 2.6vw, 2.25rem); line-height: 0.9; }
.brand-word small { font-size: 0.36em; font-weight: 600; letter-spacing: 0.45em; text-transform: uppercase; color: var(--brand-green); margin-top: 4px; }
.top nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px clamp(16px, 3vw, 40px); }
.top nav a { color: var(--brand-green); text-decoration: none; font-weight: 600; font-size: clamp(1rem, 1.4vw, 1.2rem); padding: 6px 0; }
.top nav a:hover { color: var(--brand-gold); }
/* language menu: the button reads like the other links; the list drops down under it */
.lang-menu { position: relative; }
.lang-menu[hidden] { display: none; }
.lang-menu summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 6px 0;
  color: var(--brand-green); font-weight: 600; font-size: clamp(1rem, 1.4vw, 1.2rem);
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary::after { content: ''; width: 7px; height: 7px; margin-top: -4px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform 160ms ease; }
.lang-menu[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.lang-menu summary:hover { color: var(--brand-gold); }
.lang-menu .ls-short { display: none; }
.lang-list {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 30; min-width: 170px; margin: 0; padding: 6px; list-style: none;
  background: var(--brand-cream); border: 1px solid color-mix(in srgb, var(--brand-gold) 55%, transparent); border-radius: 10px;
  box-shadow: 0 14px 30px -10px rgba(0, 0, 0, 0.35);
}
.top nav .lang-list a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 6px; font-size: 1rem; }
.top nav .lang-list a:hover { background: color-mix(in srgb, var(--brand-gold) 18%, transparent); color: var(--brand-green); }
.top nav .lang-list a[aria-current]::after { content: '✓'; color: var(--brand-gold); font-weight: 700; }

/* ---------- hero / studio ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  grid-template-areas: "text studio" "book studio" "news studio";
  grid-template-rows: auto auto auto;
  gap: clamp(20px, 3vw, 36px) clamp(28px, 5vw, 80px);
  align-content: center;
  padding: clamp(28px, 4vw, 56px) var(--gutter) clamp(56px, 8vw, 96px);
  max-width: 1360px; margin: 0 auto;
}
.hero-text { grid-area: text; max-width: 36rem; align-self: end; }
.studio { grid-area: studio; align-self: center; }
.eyebrow { margin: 0 0 4px; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gilt-soft); }

/* the books next to the studio; the one being colored is highlighted */
.from-book { grid-area: book; align-self: start; max-width: 36rem; }
.from-book[hidden] { display: none; }
.from-shelf { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 8px; }
.from-card {
  display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px 14px; align-items: center;
  padding: 12px; border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--gilt) 30%, transparent);
  background: color-mix(in srgb, black 12%, transparent);
  transition: border-color 160ms ease, background 160ms ease;
}
.from-card.is-current { border-color: var(--gilt); background: color-mix(in srgb, var(--gilt) 12%, transparent); }
.from-cover { display: block; padding: 0; border: 0; background: none; cursor: pointer; aspect-ratio: 300 / 388; box-shadow: 4px 8px 14px -6px rgba(0, 0, 0, 0.6); border-radius: 2px 4px 4px 2px; overflow: hidden; }
.from-card.is-current .from-cover, .from-cover:disabled { cursor: default; }
.from-cover img { width: 100%; height: 100%; object-fit: cover; }
.from-card:not(.is-current) .from-cover:hover:not(:disabled) { transform: translateY(-2px); }
.from-flag { margin: 0 0 4px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gilt-soft); }
.from-title { margin: 0; font-family: var(--display); font-weight: 600; font-size: 1.3rem; line-height: 1.1; }
.from-title a { color: var(--paper); text-decoration: none; }
.from-title a:hover { text-decoration: underline; text-decoration-color: var(--gilt); }
.from-series { margin: 4px 0 0; font-size: 0.8rem; color: var(--on-wall-muted); }
.from-links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.from-links > * { flex: 1 1 auto; text-align: center; }
.from-links .tool, .from-links .buy-main { padding: 9px 12px; font-size: 0.8rem; }
.buy-small { padding: 11px 16px; font-size: var(--step--1); line-height: 1; }
.hero h1 {
  font-family: var(--display); font-weight: 600;
  font-size: var(--step-4); line-height: 0.92; letter-spacing: -0.01em;
  margin: 0 0 0.35em; color: var(--paper);
}
.lede { font-size: var(--step-1); line-height: 1.5; margin: 0 0 1.2em; color: var(--on-wall); }
.how { margin: 0 0 1.4em; color: var(--on-wall-muted); }

.picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }   /* two pages per book, one row each */
.pick {
  display: grid; grid-template-columns: 44px auto; align-items: center; gap: 10px;
  padding: 6px 14px 6px 6px; border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--gilt) 35%, transparent);
  background: transparent; color: var(--on-wall); font: 500 var(--step--1)/1.3 var(--body);
  cursor: pointer; text-align: left;
}
.pick img { width: 44px; height: 56px; object-fit: cover; object-position: top; background: var(--paper); border-radius: 4px; }
.pick small { display: block; color: var(--on-wall-muted); font-weight: 400; }
.pick[aria-pressed="true"] { border-color: var(--gilt); background: color-mix(in srgb, var(--gilt) 14%, transparent); }
.picker:not(.open) .pick.extra, .picker.open .pick-more { display: none; }
.pick-more {
  grid-column: 1 / -1; justify-self: start; padding: 6px 2px; border: 0; background: none; cursor: pointer;
  color: var(--gilt); font: 600 var(--step--1)/1.3 var(--body); text-decoration: underline; text-underline-offset: 3px;
}

.studio { display: grid; grid-template-columns: auto auto; gap: clamp(16px, 2vw, 28px); align-items: center; justify-content: center; min-width: 0; }

/* gilt picture frame: layered borders rather than an image */
.frame {
  margin: 0; width: min(100%, 500px, calc((100svh - 190px) / 1.62));
  padding: clamp(10px, 1.6vw, 18px);
  background: linear-gradient(145deg, #e9cf86, #b48a35 45%, #f0d999 70%, #a77d2c);
  border-radius: 6px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.55), inset 0 0 0 2px rgba(255, 240, 200, 0.45);
}
.canvas-wrap {
  position: relative; background: var(--paper);
  box-shadow: inset 0 0 0 6px #2a2318, inset 0 0 0 7px rgba(255,255,255,.2);
  padding: clamp(10px, 2vw, 22px);
}
/* zoom: the canvas scales inside a clipping box; one finger scrolls the page until the picture is zoomed */
.zoom-box { position: relative; overflow: hidden; }
#paint { width: 100%; height: auto; display: block; touch-action: pan-y; transform-origin: 0 0; }
.zoom-box.zoomed #paint, .zoom-box.brush #paint { touch-action: none; }   /* painting: fingers paint instead of scrolling */
.zoom-tools { position: absolute; right: clamp(14px, 2.4vw, 26px); bottom: clamp(14px, 2.4vw, 26px); display: grid; gap: 6px; z-index: 2; }
.zoom-btn {
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer; padding: 0;
  font: 600 1.3rem/1 var(--body); color: var(--ink);
  background: color-mix(in srgb, var(--paper) 90%, transparent); border: 1px solid color-mix(in srgb, var(--ink) 30%, transparent);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.zoom-btn:disabled { opacity: 0.35; cursor: default; }
.loading { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--ink); font-size: var(--step--1); }
.loading[hidden] { display: none; }
.loading-note { padding: 0 12%; text-align: center; font-weight: 600; background: color-mix(in srgb, var(--paper) 82%, transparent); }
.frame figcaption { margin-top: 10px; text-align: center; color: #2a2318; font-size: var(--step--1); font-weight: 600; }
.frame figcaption span { font-weight: 400; }

.tray { display: grid; gap: 22px; justify-items: center; }
.swatches { display: grid; grid-template-columns: repeat(2, 38px); gap: 12px; justify-content: center; }
/* tools: Brush / Fill, then the brush sizes */
.tool-modes { display: flex; border: 1px solid color-mix(in srgb, var(--on-wall) 35%, transparent); border-radius: 999px; padding: 3px; }
.mode { border: 0; background: none; color: var(--on-wall); font: 600 var(--step--1)/1 var(--body); padding: 9px 14px; border-radius: 999px; cursor: pointer; }
.mode[aria-checked="true"] { background: var(--gilt); color: var(--ink); }
.brush-sizes { display: flex; gap: 8px; }
.brush-sizes[hidden] { display: none; }
.size { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; padding: 0;
  background: transparent; border: 1px solid color-mix(in srgb, var(--on-wall) 35%, transparent); }
.size span { width: var(--d); height: var(--d); border-radius: 50%; background: var(--on-wall); }
.size[aria-checked="true"] { border-color: var(--gilt); box-shadow: 0 0 0 2px var(--gilt); }
.swatch {
  width: 38px; height: 38px; border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.25); cursor: pointer; padding: 0;
  background: var(--c);
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.12);
  transition: transform 120ms ease;
}
.swatch[aria-checked="true"] { transform: scale(1.18); border-color: var(--paper); box-shadow: 0 0 0 3px var(--gilt), inset 0 -5px 0 rgba(0,0,0,.12); }
.swatch-eraser { background: repeating-linear-gradient(45deg, #fff 0 6px, #e6e1d4 6px 12px); }

.tools { display: grid; gap: 10px; justify-items: stretch; }
.tool {
  font: 600 var(--step--1)/1 var(--body);
  padding: 11px 16px; border-radius: 8px; cursor: pointer;
  color: var(--on-wall); background: transparent;
  border: 1px solid color-mix(in srgb, var(--on-wall) 35%, transparent);
}
.tool:hover:not(:disabled) { border-color: var(--gilt); color: var(--paper); }
.tool:disabled { opacity: 0.4; cursor: default; }
.tool-save { background: var(--gilt); color: var(--ink); border-color: var(--gilt); }
.tool-save:hover:not(:disabled) { background: var(--gilt-soft); color: var(--ink); }

/* ---------- book rooms ---------- */
.room {
  background: var(--room, var(--wall));
  border-top: 1px solid color-mix(in srgb, var(--gilt) 35%, transparent);
  padding: clamp(56px, 8vw, 110px) var(--gutter);
}
.room-inner {
  max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 96px); align-items: center;
}
.room .book-title { font-family: var(--display); font-weight: 600; font-size: var(--step-3); line-height: 1.05; margin: 0 0 0.2em; color: var(--paper); }
.room .subtitle { margin: 0 0 1.2em; color: var(--gilt-soft); font-size: var(--step-1); }
.room .blurb p { margin: 0 0 1em; max-width: 60ch; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 22px; margin: 1.6em 0; padding: 1em 0; border-block: 1px solid color-mix(in srgb, var(--gilt) 30%, transparent); }
.facts dt { color: var(--on-wall-muted); font-size: var(--step--1); padding-top: 2px; }
.facts dd { margin: 0; font-weight: 500; }

.buy { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 1.4em; }
.buy-main {
  display: inline-block; padding: 14px 22px; border-radius: 8px;
  background: var(--gilt); color: var(--ink); font-weight: 700; text-decoration: none;
}
.buy-main:hover { background: var(--gilt-soft); }
/* "Other countries": a dropdown of the other Amazon stores, styled like the language menu */
.store-menu { position: relative; }
.store-menu summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 10px 2px;
  color: var(--gilt-soft); font-weight: 600; font-size: var(--step--1);
}
.store-menu summary::-webkit-details-marker { display: none; }
.store-menu summary::after { content: ''; width: 6px; height: 6px; margin-top: -3px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform 160ms ease; }
.store-menu[open] summary::after { transform: rotate(-135deg); margin-top: 3px; }
.store-menu summary:hover { color: var(--paper); }
.menu-list {
  position: absolute; left: 0; top: calc(100% + 6px); z-index: 30; min-width: 250px; max-height: min(60vh, 420px); overflow-y: auto;
  margin: 0; padding: 6px; list-style: none;
  background: var(--brand-cream); border: 1px solid color-mix(in srgb, var(--brand-gold) 55%, transparent); border-radius: 10px;
  box-shadow: 0 14px 30px -10px rgba(0, 0, 0, 0.45);
}
.menu-list a { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 8px 12px; border-radius: 6px; color: var(--brand-green); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.menu-list a small { color: color-mix(in srgb, var(--brand-ink) 55%, transparent); font-weight: 400; font-size: 0.8rem; }
.menu-list a:hover { background: color-mix(in srgb, var(--brand-gold) 18%, transparent); }

/* 3D book */
.stage { display: grid; justify-items: center; gap: 14px; }
.book3d { perspective: 1800px; width: min(78%, 360px); aspect-ratio: 8.5 / 11; cursor: grab; touch-action: pan-y; user-select: none; }
.book3d:active { cursor: grabbing; }
.book {
  --w: 100%; position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  transform: rotateX(4deg) rotateY(var(--ry, -28deg));
  transition: transform 700ms cubic-bezier(.2, .7, .2, 1);
}
.book.dragging { transition: none; }
.face { position: absolute; inset: 0; backface-visibility: hidden; background-size: cover; background-position: center; }
.face-front { transform: translateZ(var(--half-t)); box-shadow: inset 4px 0 8px rgba(0,0,0,.25); }
.face-back { transform: rotateY(180deg) translateZ(var(--half-t)); }
.face-spine { width: var(--t); left: calc(50% - var(--half-t)); transform: rotateY(-90deg) translateZ(var(--half-w)); }
.face-edge { width: var(--t); left: calc(50% - var(--half-t)); transform: rotateY(90deg) translateZ(calc(var(--half-w) - 2px));
  background: repeating-linear-gradient(90deg, #f4efe2 0 2px, #ddd6c4 2px 3px); }
.face-top, .face-bottom { height: var(--t); top: calc(50% - var(--half-t)); background: repeating-linear-gradient(0deg, #f4efe2 0 2px, #ddd6c4 2px 3px); }
.face-top { transform: rotateX(90deg) translateZ(var(--half-h)); }
.face-bottom { transform: rotateX(-90deg) translateZ(var(--half-h)); }
.shadow { width: 70%; height: 22px; margin-top: -6px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0,0,0,.45), transparent); }

/* lettered cover for books without cover images yet */
.lettered { background: var(--room); display: grid; place-items: center; padding: 10%; }
.lettered::before { content: ''; position: absolute; inset: 6%; border: 2px solid var(--gilt); border-radius: 4px; }
.lettered span { font-family: var(--display); color: var(--paper); font-size: clamp(1.4rem, 3.4vw, 2.4rem); text-align: center; line-height: 1.1; }

/* look inside: framed pages on the gallery wall */
.inside { max-width: 1240px; margin: clamp(48px, 6vw, 80px) auto 0; }
.inside h4 { font-family: var(--display); font-weight: 600; font-size: var(--step-2); margin: 0 0 18px; color: var(--paper); }
.wall {
  display: grid; align-items: start; grid-auto-flow: column; grid-auto-columns: clamp(150px, 18vw, 210px);
  gap: clamp(16px, 2.4vw, 32px); overflow-x: auto; padding: 8px 4px 22px;
  scroll-snap-type: x mandatory; scrollbar-color: var(--gilt) transparent;
}
.thumb {
  scroll-snap-align: start; padding: 0; border: 0; background: none; cursor: zoom-in; text-align: left; color: inherit; font: inherit;
  display: flex; flex-direction: column; justify-content: flex-start; align-self: start;   /* frames line up even when titles wrap */
}
.thumb .mat { display: block; padding: 7px; background: linear-gradient(145deg, #e9cf86, #b48a35 50%, #e8cd85); border-radius: 3px; box-shadow: 0 16px 30px -14px rgba(0,0,0,.6); }
.thumb img { width: 100%; height: auto; aspect-ratio: 8.5 / 11; object-fit: cover; background: #fff; }
.thumb .t { display: block; margin-top: 10px; font-size: var(--step--1); font-weight: 600; line-height: 1.3; }
.thumb .m { display: block; font-size: 0.8rem; color: var(--on-wall-muted); }
.thumb:hover .mat { transform: translateY(-3px); transition: transform 160ms ease; }

/* ---------- series bands: cream like the logo, each one opens a series ---------- */
.series-band { background: var(--paper); color: var(--ink); padding: clamp(48px, 7vw, 88px) var(--gutter); text-align: center; border-top: 4px solid var(--brand-gold); }
.series-band-inner { max-width: 44rem; margin: 0 auto; }
.series-band .eyebrow { color: color-mix(in srgb, var(--brand-gold) 70%, black); }
.series-band h2 { font-family: var(--display); font-weight: 600; font-size: var(--step-4); line-height: 0.95; margin: 0.1em 0 0.2em; color: var(--brand-green); }
.series-tagline { font-family: var(--display); font-size: var(--step-2); font-style: italic; margin: 0 0 0.8em; color: var(--brand-ink); }
.series-band p:not(.eyebrow):not(.series-tagline) { margin: 0 auto 0.8em; max-width: 38rem; font-size: var(--step-0); }

/* links between the home page and the book pages */
.book-link { margin: 1.2em 0 0; font-weight: 600; }
.all-books { max-width: 1240px; margin: clamp(32px, 4vw, 56px) auto 0; }
.all-books .tool { display: inline-block; text-decoration: none; }

/* ---------- free page signup ---------- */
.signup { background: var(--paper); color: var(--ink); padding: clamp(48px, 7vw, 88px) var(--gutter); text-align: center; border-top: 4px solid var(--brand-gold); }
.signup[hidden] { display: none; }
.signup-inner { max-width: 36rem; margin: 0 auto; }
.signup h2 { font-family: var(--display); font-weight: 600; font-size: var(--step-3); line-height: 1.1; margin: 0 0 0.4em; color: var(--brand-green); }
.signup form { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 1.4em 0 0.8em; }
.signup textarea { flex: 1 1 100%; min-height: 64px; resize: vertical; padding: 12px 16px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--brand-green) 40%, transparent); font: inherit; background: #fff; color: var(--ink); }
.signup form[hidden] { display: none; }
.signup input { flex: 1 1 240px; min-width: 0; padding: 13px 16px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--brand-green) 40%, transparent); font: inherit; background: #fff; color: var(--ink); }
.signup .buy-main { border: 0; cursor: pointer; font: 700 var(--step-0)/1 var(--body); width: auto; }
.signup-fine { font-size: var(--step--1); color: color-mix(in srgb, var(--ink) 70%, transparent); margin: 0; }
.signup-done { font-weight: 600; color: var(--brand-green); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* the same form as a card next to the coloring studio, on the green wall */
.signup-card {
  grid-area: news; align-self: start; max-width: 36rem; text-align: left;
  padding: 18px 20px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--gilt) 30%, transparent);
  background: color-mix(in srgb, black 12%, transparent); color: var(--on-wall); border-top-width: 1px;
}
.signup-card h2 { font-size: var(--step-2); color: var(--paper); margin-bottom: 0.25em; }
.signup-card p { font-size: var(--step--1); margin: 0; }
.signup-card form { justify-content: stretch; margin: 12px 0 8px; gap: 8px; }
.signup-card textarea { min-height: 52px; }
.signup-card input { flex: 1 1 180px; }
.signup-card .buy-main { font-size: var(--step--1); padding: 12px 18px; }
.signup-card .signup-fine { color: var(--on-wall-muted); font-size: 0.8rem; }
.signup-card .signup-done { color: var(--gilt-soft); margin-top: 8px; }

/* ---------- questions ---------- */
.faq { background: var(--wall); padding: clamp(56px, 8vw, 100px) var(--gutter); }
.faq-inner { max-width: 46rem; margin: 0 auto; }
.faq h2 { font-family: var(--display); font-weight: 600; font-size: var(--step-3); margin: 0 0 0.6em; color: var(--paper); text-align: center; }
.qa { border-bottom: 1px solid color-mix(in srgb, var(--gilt) 35%, transparent); }
.qa summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; font-weight: 600; font-size: var(--step-1); color: var(--paper); }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: '+'; color: var(--gilt); font-size: 1.5rem; line-height: 1; transition: transform 160ms ease; }
.qa[open] summary::after { transform: rotate(45deg); }
.qa p { margin: 0 0 18px; color: var(--on-wall); max-width: 60ch; }

/* ---------- about + footer ---------- */
.about { background: var(--paper); color: var(--ink); padding: clamp(56px, 8vw, 100px) var(--gutter); border-top: 1px solid color-mix(in srgb, var(--brand-gold) 45%, transparent); }
.about-inner { max-width: 40rem; margin: 0 auto; }
.about h2 { font-family: var(--display); font-weight: 600; font-size: var(--step-3); margin: 0 0 0.5em; color: var(--brand-green); text-align: center; }
.lockup { display: grid; justify-items: center; margin: 0 auto clamp(36px, 5vw, 56px); color: var(--brand-ink); }
.lockup-mark { width: clamp(96px, 14vw, 132px); height: auto; aspect-ratio: 590 / 575; margin-bottom: 18px; }
.lockup-name { font-family: var(--display); font-weight: 600; font-size: clamp(2.6rem, 6vw, 3.4rem); line-height: 1; }
.lockup-sub { font-family: var(--display); font-weight: 500; font-size: 0.95rem; letter-spacing: 0.5em; margin-right: -0.5em; text-transform: uppercase; color: var(--brand-green); margin-top: 8px; }
.about p { margin: 0 0 1em; font-size: var(--step-1); line-height: 1.55; }
.foot { background: var(--wall-deep); padding: 32px var(--gutter); font-size: var(--step--1); color: var(--on-wall-muted); }
.foot p { margin: 0 0 6px; max-width: 1240px; margin-inline: auto; }

/* ---------- page-turning preview ---------- */
.stage-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.inside-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 20px; margin-bottom: 18px; }
.inside-head h4 { margin: 0; }

.fb {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  color: var(--on-wall);
  background: radial-gradient(ellipse at 50% 42%, color-mix(in srgb, var(--room, var(--wall)) 92%, white), color-mix(in srgb, var(--room, var(--wall)) 62%, black));
}
.fb[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.fb::backdrop { background: #000; }
.fb-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px var(--gutter) 6px; }
.fb-title { font-family: var(--display); font-weight: 600; font-size: var(--step-1); margin: 0; color: var(--paper); }
.fb-status { margin: 2px 0 0; font-size: var(--step--1); color: var(--on-wall-muted); min-height: 1.5em; }
.fb-actions { display: flex; gap: 10px; align-items: center; }
.fb-x {
  width: 42px; height: 42px; border-radius: 50%; cursor: pointer; font-size: 26px; line-height: 1;
  color: var(--paper); background: rgba(0, 0, 0, 0.25); border: 1px solid color-mix(in srgb, var(--gilt) 50%, transparent);
}
.fb-stage { display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; align-items: center; min-height: 0; padding: 4px 6px; touch-action: pan-y; }
.fb-desk { display: grid; place-items: center; height: 100%; min-height: 0; }
.fb-nav {
  justify-self: center; width: 50px; height: 50px; border-radius: 50%; cursor: pointer;
  font-size: 32px; line-height: 1; color: var(--paper); background: rgba(0, 0, 0, 0.22);
  border: 1px solid color-mix(in srgb, var(--gilt) 50%, transparent);
}
.fb-nav:disabled { opacity: 0.25; cursor: default; }

.fb-book { position: relative; width: calc(var(--pw) * 2); height: var(--ph); perspective: 2600px; transition: transform 600ms ease; }
.fb-book::before { content: ''; position: absolute; top: 1%; bottom: 0; left: 0; right: 0; box-shadow: 0 30px 50px -16px rgba(0, 0, 0, 0.65); transition: left 600ms ease, right 600ms ease; }
.fb-book[data-state="closed"]::before { left: 50%; }
.fb-book[data-state="back"]::before { right: 50%; }
.fb-book[data-state="closed"] { transform: translateX(calc(var(--pw) * -0.5)); }
.fb-book[data-state="back"] { transform: translateX(calc(var(--pw) * 0.5)); }
.leaf {
  position: absolute; top: 0; left: 50%; width: 50%; height: 100%;
  transform-origin: left center; transform-style: preserve-3d;
  transition: transform 900ms cubic-bezier(.35, .05, .2, 1);
}
.leaf.flipped { transform: rotateY(-180deg); }
.side { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.side-b { transform: rotateY(180deg); }
.pg { position: absolute; inset: 0; background: #fff; overflow: hidden; color: var(--ink); }
.pg img { width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.pg-right::after, .pg-left::after { content: ''; position: absolute; inset: 0; pointer-events: none; }
.pg-right::after { background: linear-gradient(90deg, rgba(0, 0, 0, 0.16), transparent 7%); }
.pg-left::after { background: linear-gradient(270deg, rgba(0, 0, 0, 0.16), transparent 7%); }
.pg-cover { border-radius: 0 3px 3px 0; }
.pg-blank p { position: absolute; left: 12%; right: 12%; bottom: 9%; margin: 0; text-align: center; font-size: clamp(10px, calc(var(--pw) * 0.03), 13px); font-style: italic; color: #8d8f84; }
.pg-end { display: grid; place-content: center; justify-items: center; gap: 12px; padding: 12%; text-align: center; }
.pg-end p { margin: 0; }
.pg-end-big { font-family: var(--display); font-size: clamp(1.3rem, calc(var(--pw) * 0.075), 2.4rem); line-height: 1.15; color: var(--wall); }

.fb-single { position: relative; width: var(--pw); height: var(--ph); }
.fb.is-single .fb-book, .fb:not(.is-single) .fb-single { display: none; }
.pg-solo { box-shadow: 0 24px 40px -18px rgba(0, 0, 0, 0.6); animation: fb-in 220ms ease; }
@keyframes fb-in { from { opacity: 0; transform: translateX(10px); } }

.fb-strip { display: flex; gap: 10px; overflow-x: auto; padding: 10px var(--gutter) 18px; scrollbar-color: var(--gilt) transparent; }
.st { flex: 0 0 auto; display: flex; gap: 1px; padding: 3px; border: 2px solid transparent; border-radius: 6px; background: rgba(0, 0, 0, 0.22); cursor: pointer; }
.st[aria-selected="true"] { border-color: var(--gilt); }
.st img, .st span { width: 32px; height: 42px; object-fit: cover; background: var(--paper); display: block; }
.st .st-empty { background: transparent; }
.st .st-end { display: grid; place-items: center; color: var(--wall); font-weight: 700; }

.fb-zoomview { position: fixed; inset: 0; z-index: 5; overflow: auto; display: grid; justify-items: center; align-content: start; padding: 64px 16px 32px; background: rgba(4, 14, 11, 0.95); cursor: zoom-out; }
.fb-zoomview[hidden] { display: none; }
.fb-zoomview img { width: min(100%, 980px); height: auto; background: var(--paper); }
.fb-zoomview .fb-x { position: fixed; top: 14px; right: 16px; }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .fb-stage { grid-template-columns: 44px minmax(0, 1fr) 44px; padding: 0; }
  .fb-nav { width: 40px; height: 40px; font-size: 26px; }
}
@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "text" "studio" "book" "news"; }
  .signup-card { max-width: 40rem; width: 100%; justify-self: center; }
  .hero-text, .from-book { max-width: 40rem; width: 100%; justify-self: center; }
  .frame { width: min(100%, 540px); }
  .studio { grid-template-columns: minmax(0, 1fr); justify-items: center; width: 100%; }
  .swatches { grid-template-columns: repeat(6, 38px); }
  .tools { display: flex; flex-wrap: wrap; justify-content: center; }
}
@media (max-width: 860px) {
  .room-inner { grid-template-columns: minmax(0, 1fr); }
  .room .info { max-width: 40rem; justify-self: center; }
}
@media (max-width: 560px) {
  .top nav > a:first-child { display: none; }
  .top nav { flex-wrap: nowrap; gap: 14px; }
  .lang-menu .ls-long { display: none; }
  .lang-menu .ls-short { display: inline; }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .facts dd { margin-bottom: 8px; }
  .buy-main { width: 100%; text-align: center; }
  .from-links .buy-main { width: auto; }
  .from-shelf { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .swatches { grid-template-columns: repeat(6, 34px); gap: 10px; }
  .swatch { width: 34px; height: 34px; }
  .fb-zoom-btn { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .book, .swatch, .thumb .mat, .leaf, .fb-book { transition: none !important; }
  .pg-solo { animation: none; }
}

/* prerendered copy of the books (for search engines), shown for a moment before app.js draws the live version */
.room .info > img { width: 140px; height: auto; margin-bottom: 18px; box-shadow: 6px 10px 18px -6px rgba(0, 0, 0, 0.6); }
.room .info > ul { padding-left: 1.2em; color: var(--on-wall-muted); }
