/* ==========================================================================
   Studio shell: the sliding stage (gallery <-> writing), the story gallery,
   the "start from scratch" wizard, and the "weave from my assets" canvas.
   The studio lives on the parchment surface; these screens theme accordingly.
   ========================================================================== */

/* -------------------------------- Slide stage ----------------------------- */
.studio-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.studio-screen {
  position: absolute;
  inset: 0;
  transform: translateX(100%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.42s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.28s ease;
  will-change: transform;
}

/* The three "entry" screens share the left-hand slot. */
.studio-screen[data-screen="gallery"],
.studio-screen[data-screen="wizard"],
.studio-screen[data-screen="weave"] {
  transform: translateX(0);
  overflow-y: auto;
}

.studio-screen.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Writing workspace slides in from the right; sits off-screen right by default. */
.studio-screen[data-screen="write"] {
  transform: translateX(100%);
}
.studio-stage.show-write .studio-screen[data-screen="write"] {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
/* When the workspace is on stage, push the active entry screen off to the left. */
.studio-stage.show-write .studio-screen.is-active {
  transform: translateX(-100%);
}

/* #root keeps its own grid layout; inset:0 sizes it inside the stage. */
#root.studio-screen {
  width: 100%;
  height: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .studio-screen { transition: opacity 0.2s ease; }
}

/* ------------------------------ Shared surface ---------------------------- */
.studio-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 40px 80px;
}

.studio-head {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.studio-head__intro { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.studio-head h1 {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.05;
}
.studio-head .hint { color: var(--ink-soft); font-size: 14px; }
.studio-head__spacer { flex: 1; }
.studio-head__toggle { align-self: center; margin-left: auto; }

/* Parchment re-theme of the night sky toggle when it lives on the studio chart. */
#studio-gallery .skytoggle__opt { color: rgba(58, 40, 18, 0.55); }
#studio-gallery .skytoggle__opt:hover { color: rgba(36, 24, 10, 0.9); background: rgba(64, 43, 18, 0.06); }
#studio-gallery .skytoggle__opt.is-active { color: rgba(36, 24, 10, 0.95); background: rgba(64, 43, 18, 0.1); }
#studio-gallery .skytoggle__edge { stroke: rgba(64, 43, 18, 0.28); }
#studio-gallery .skytoggle__node { fill: rgba(64, 43, 18, 0.45); }
#studio-gallery .skytoggle__node--dim { fill: rgba(64, 43, 18, 0.28); }
#studio-gallery .skytoggle__node--bright { fill: rgba(86, 61, 27, 0.75); filter: none; }
#studio-gallery .skytoggle__node--shine { fill: rgba(36, 24, 10, 0.85); filter: none; }
#studio-gallery .skytoggle__halo { fill: rgba(64, 43, 18, 0.06); stroke: rgba(64, 43, 18, 0.22); }
#studio-gallery .skytoggle__spark { stroke: rgba(64, 43, 18, 0.4); }
#studio-gallery .skytoggle__opt.is-active .skytoggle__edge { stroke: rgba(64, 43, 18, 0.55); }
#studio-gallery .skytoggle__opt.is-active .skytoggle__node,
#studio-gallery .skytoggle__opt.is-active .skytoggle__node--bright,
#studio-gallery .skytoggle__opt.is-active .skytoggle__node--shine { fill: rgba(36, 24, 10, 0.9); filter: none; }
#studio-gallery .skytoggle__opt.is-active .skytoggle__node--dim { fill: rgba(64, 43, 18, 0.45); }
#studio-gallery .skytoggle__opt.is-active .skytoggle__halo { fill: rgba(64, 43, 18, 0.1); stroke: rgba(64, 43, 18, 0.35); animation: none; }
#studio-gallery .skytoggle__opt.is-active .skytoggle__spark { stroke: rgba(36, 24, 10, 0.75); animation: none; }
#studio-gallery .skytoggle__link {
  background: linear-gradient(90deg, rgba(64, 43, 18, 0.12), rgba(64, 43, 18, 0.28), rgba(64, 43, 18, 0.12));
}
#studio-gallery .skytoggle__link::before { background: rgba(64, 43, 18, 0.35); }
#studio-gallery .skytoggle__link::after {
  background: radial-gradient(circle, rgba(36, 24, 10, 0.85) 0%, rgba(86, 61, 27, 0.7) 45%, transparent 72%);
  box-shadow: none;
  animation: none;
}
#studio-gallery .skytoggle__trail {
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(64, 43, 18, 0.28) 12%,
    rgba(64, 43, 18, 0.28) 88%,
    transparent 100%);
}
#studio-gallery .skytoggle__trail::after {
  background: radial-gradient(circle, rgba(36, 24, 10, 0.85) 0%, rgba(86, 61, 27, 0.7) 45%, transparent 72%);
  box-shadow: none;
  animation: none;
}

.studio-backbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 40px 0;
  max-width: 1180px;
  margin: 0 auto;
}

/* ------------------- Gallery: aged chart parchment ----------------------- */
/* Matches the story constellation (entry-tree) chart: a darker, stained
   vellum sheet with fibre/grain/stain noise and a heavy corner vignette. */
#studio-gallery {
  background-color: #b69a67;
  background-image:
    var(--paper-fibre),
    var(--paper-grain),
    var(--paper-stain),
    radial-gradient(115% 105% at 50% 40%, rgba(224, 201, 150, 0.5), rgba(150, 116, 60, 0) 55%),
    radial-gradient(150% 138% at 50% 46%, transparent 28%, rgba(86, 61, 27, 0.52) 74%, rgba(46, 31, 13, 0.8) 100%),
    radial-gradient(42% 36% at 9% 11%, rgba(64, 43, 18, 0.36), transparent 60%),
    radial-gradient(40% 36% at 92% 90%, rgba(56, 37, 15, 0.42), transparent 60%),
    linear-gradient(180deg, rgba(46, 31, 13, 0.36), transparent 15%, transparent 85%, rgba(46, 31, 13, 0.42));
  background-size: 240px 240px, 140px 140px, 700px 700px, auto, auto, auto, auto, auto;
  background-repeat: repeat, repeat, repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat;
  color: rgba(42, 28, 12, 0.92);
}
/* Faint foxing flecks, same idea as .entry-tree::after. */
#studio-gallery::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 18% 22%, rgba(58, 39, 17, .34), transparent 60%),
    radial-gradient(1.2px 1.2px at 72% 34%, rgba(70, 48, 20, .28), transparent 60%),
    radial-gradient(1.7px 1.7px at 44% 78%, rgba(50, 33, 13, .3), transparent 60%),
    radial-gradient(1.2px 1.2px at 84% 66%, rgba(60, 40, 18, .26), transparent 60%);
  opacity: .5;
}
#studio-gallery > * { position: relative; z-index: 1; }

#studio-gallery .studio-head h1 { color: rgba(36, 24, 10, 0.94); }
#studio-gallery .studio-head .hint { color: rgba(58, 40, 18, 0.72); }
#studio-gallery .sg-figure__title { color: rgba(36, 24, 10, 0.92); }
#studio-gallery .sg-figure__meta { color: rgba(58, 40, 18, 0.62); }
#studio-gallery .studio-empty h2 { color: rgba(36, 24, 10, 0.94); }
#studio-gallery .studio-empty p { color: rgba(58, 40, 18, 0.72); }

/* Reuse the shared top navigation, re-themed for the aged chart. */
#studio-gallery .topnav {
  background: linear-gradient(180deg, rgba(182, 154, 103, 0.92), rgba(166, 136, 88, 0.55));
  border-bottom: 1px solid rgba(86, 61, 27, 0.28);
  backdrop-filter: blur(8px);
}
#studio-gallery .topnav__brand { color: rgba(36, 24, 10, 0.94); }
#studio-gallery .topnav__link { color: rgba(58, 40, 18, 0.78); }
#studio-gallery .topnav__link:hover {
  background: rgba(86, 61, 27, 0.12);
  color: rgba(36, 24, 10, 0.96);
}
#studio-gallery .topnav__link.is-active { background: var(--night); color: var(--gold-bright); }
#studio-gallery .topnav__settings { color: rgba(58, 40, 18, 0.72); }
#studio-gallery .topnav__settings:hover { color: rgba(36, 24, 10, 0.96); }

/* --------------------------- Gallery (sky charts) ------------------------- */
/* Stories are drawn as bare constellation sketches on the parchment — no card
   chrome, just ink line-art with a caption, like an astronomer's chart. */
.sg-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 40px 30px;
  margin-top: 34px;
}

.sg-figure {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  position: relative;
}
.sg-figure__plate {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
}
.sg-figure__plate::before {
  /* faint ink wash that blooms on hover */
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(46, 31, 13, 0.12), transparent 68%);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.sg-figure:hover .sg-figure__plate::before { opacity: 1; }

/* The gallery reuses the community's constellation shape (miniConstellation),
   rendered in its flat "ink on parchment" variant. */
.sg-figure__plate .minicon--ink {
  width: 100%;
  height: 100%;
  color: rgba(42, 28, 12, 0.88);
  overflow: visible;
  transition: transform 0.4s var(--ease);
}
.sg-figure:hover .minicon--ink { transform: scale(1.05); }
.minicon--ink .minicon__line { opacity: 0.45; transition: opacity 0.35s var(--ease); }
.minicon--ink .minicon__star {
  fill: none;
  stroke: currentColor;
  opacity: 0.78;
  transition: opacity 0.35s var(--ease);
}
.minicon--ink .minicon__star.is-root { stroke: var(--gold-deep); opacity: 1; }
.sg-figure:hover .minicon--ink .minicon__line { opacity: 0.78; }
.sg-figure:hover .minicon--ink .minicon__star { opacity: 1; }

/* Published stories light up in their community hue — a living constellation
   rather than a bare ink sketch. Keep CSS off `filter` so the SVG sketch
   wobble (url(#miniconSketch-*)) isn't overridden. */
.sg-figure--published .minicon--ink { color: hsl(var(--hue, 45), 68%, 46%); }
.sg-figure--published .minicon--ink .minicon__line { opacity: 0.7; }
.sg-figure--published .minicon--ink .minicon__star { opacity: 0.95; }
.sg-figure--published .minicon--ink .minicon__star.is-root {
  stroke: hsl(var(--hue, 45), 82%, 58%);
}
.sg-figure--published .sg-figure__plate::before {
  background: radial-gradient(circle, hsla(var(--hue, 45), 80%, 60%, 0.16), transparent 66%);
  opacity: 1;
}
.sg-figure--published:hover .minicon--ink .minicon__line { opacity: 0.85; }

/* Hover reveal: an ink panel that wells up over the sketch, carrying the
   latest passage and (for published stories) a community badge. */
.sg-figure__reveal {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--parchment-edge);
  background:
    radial-gradient(120% 90% at 50% 0%, hsla(var(--hue, 45), 40%, 22%, 0.35), transparent 70%),
    linear-gradient(180deg, rgba(26, 21, 14, 0.95), rgba(26, 21, 14, 0.9));
  box-shadow: 0 22px 46px -22px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.sg-figure:hover .sg-figure__reveal,
.sg-figure:focus-visible .sg-figure__reveal {
  opacity: 1;
  transform: none;
}

.sg-figure__badge {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-ui);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: hsl(var(--hue, 45), 70%, 74%);
}
.sg-figure__badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: hsl(var(--hue, 45), 82%, 60%);
  box-shadow: 0 0 7px hsla(var(--hue, 45), 85%, 62%, 0.85);
}

.sg-figure__excerpt {
  margin: 0;
  font-family: var(--font-body, var(--font-ui));
  font-size: 12.5px;
  line-height: 1.55;
  text-align: left;
  color: rgba(244, 234, 209, 0.82);
  display: -webkit-box;
  -webkit-line-clamp: 6;
  line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sg-figure__excerpt.is-empty {
  text-align: center;
  font-style: italic;
  color: rgba(244, 234, 209, 0.5);
}

.sg-figure__caption { display: flex; flex-direction: column; gap: 3px; max-width: 100%; }
.sg-figure__title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sg-figure__meta {
  font-family: var(--font-ui);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}

/* The "start new story" figure: a dashed astrolabe ring with a plus. */
.sg-figure--new .sg-figure__ring {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 1.5px dashed rgba(86, 61, 27, 0.45);
  display: grid;
  place-items: center;
  color: rgba(58, 40, 18, 0.72);
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease), transform 0.35s var(--ease);
}
.sg-figure--new:hover .sg-figure__ring {
  border-color: var(--gold-deep);
  color: rgba(36, 24, 10, 0.92);
  transform: scale(1.06);
}
.sg-figure--new .sg-figure__ring .icon { width: 30px; height: 30px; }

.studio-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--ink-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.studio-empty img { width: 56px; height: 56px; opacity: 0.85; }
.studio-empty h2 { font-family: var(--font-display); font-size: 28px; color: var(--ink); }

/* ----------------------------- New-story chooser -------------------------- */
.newstory-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 6px;
}
@media (max-width: 620px) {
  .newstory-choices { grid-template-columns: 1fr; }
}
.newstory-choice {
  appearance: none;
  text-align: left;
  border: 1px solid var(--parchment-edge);
  background: var(--parchment-raised);
  border-radius: 14px;
  padding: 22px 20px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.newstory-choice:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: var(--shadow-lg);
}
.newstory-choice__icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--night); color: var(--gold-bright);
}
.newstory-choice__icon .icon { width: 24px; height: 24px; }
.newstory-choice h3 { font-family: var(--font-display); font-size: 20px; color: var(--ink); }
.newstory-choice p { font-size: 13px; color: var(--ink-soft); line-height: 1.5; }

/* --------------------------------- Wizard --------------------------------- */
.wiz {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 32px 80px;
}
.wiz__steps {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}
.wiz__step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  opacity: 0.7;
}
.wiz__step-num {
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--parchment-sunk); color: var(--ink-soft);
  font-size: 12px;
}
.wiz__step.is-active { opacity: 1; color: var(--ink); }
.wiz__step.is-active .wiz__step-num { background: var(--night); color: var(--gold-bright); }
.wiz__step.is-done .wiz__step-num { background: var(--gold); color: var(--night); }
.wiz__step-sep { width: 22px; height: 1px; background: var(--parchment-edge); }

.wiz__panel { display: flex; flex-direction: column; gap: 4px; }
.wiz__panel h2 {
  font-family: var(--font-display); font-size: 30px; color: var(--ink); margin-bottom: 2px;
}
.wiz__panel > .hint { color: var(--ink-soft); margin-bottom: 14px; }

.wiz__list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.wiz__row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--parchment-edge);
  border-radius: 12px;
  background: var(--parchment-raised);
}
.wiz__row-star { color: var(--gold); display: grid; place-items: center; }
.wiz__row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wiz__row-name { font-weight: 600; color: var(--ink); }
.wiz__row-sub { font-size: 12px; color: var(--ink-soft); }
.wiz__empty {
  padding: 22px; text-align: center; color: var(--ink-soft);
  border: 1px dashed var(--parchment-edge); border-radius: 12px;
}

.wiz__foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--parchment-edge);
}
.wiz__foot .grow { flex: 1; }

/* ---------------------------------- Weave --------------------------------- */
.weave {
  display: grid;
  grid-template-columns: 300px 1fr;
  height: 100%;
  min-height: 0;
}
.weave__palette {
  border-right: 1px solid var(--parchment-edge);
  background: linear-gradient(180deg, var(--parchment-raised), var(--parchment));
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.weave__palette-head {
  padding: 18px 18px 10px;
  display: flex; flex-direction: column; gap: 4px;
}
.weave__palette-head h2 { font-family: var(--font-display); font-size: 22px; color: var(--ink); }
.weave__palette-head .hint { font-size: 12px; color: var(--ink-soft); }
.weave__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 0 16px 10px;
  padding: 4px;
  border: 1px solid var(--parchment-edge);
  border-radius: 10px;
  background: rgba(64, 43, 18, 0.04);
}
.weave__tab {
  appearance: none;
  border: 0;
  border-radius: 7px;
  padding: 7px 8px;
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.weave__tab:hover { color: var(--ink); background: rgba(64, 43, 18, 0.06); }
.weave__tab.is-active {
  color: var(--ink);
  background: var(--parchment);
  box-shadow: 0 1px 0 rgba(64, 43, 18, 0.08);
}
.weave__palette-search { padding: 0 16px 10px; }
.weave__palette-list {
  flex: 1; overflow-y: auto; padding: 4px 12px 16px;
  display: flex; flex-direction: column; gap: 6px;
}
.weave__pchar {
  appearance: none; text-align: left; width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--parchment-edge);
  border-radius: 10px;
  background: var(--parchment);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.weave__pchar:hover { border-color: var(--gold); }
.weave__pchar.is-picked { opacity: 0.45; cursor: default; }
.weave__pchar.is-selected {
  border-color: var(--gold);
  background: rgba(231, 201, 116, 0.12);
}
.weave__pchar-star { color: var(--gold); display: grid; place-items: center; flex: none; }
.weave__pchar-body { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.weave__pchar-name { font-weight: 600; color: var(--ink); font-size: 14px; }
.weave__pchar-sub {
  font-size: 11.5px; color: var(--ink-soft);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.weave__stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.weave__canvas {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 0%, var(--night-raised), var(--night));
}
.weave__hud {
  position: absolute; top: 16px; left: 20px; right: 20px;
  pointer-events: none; z-index: 2;
  display: flex; flex-direction: column; gap: 8px; align-items: flex-start;
}
.weave__hud h3 { font-family: var(--font-display); font-size: 20px; color: var(--night-text); }
.weave__hud > p { font-size: 12.5px; color: var(--night-text-soft); }
.weave__world-chip {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(360px, 100%);
  margin-top: 4px;
  padding: 7px 8px 7px 10px;
  border: 1px solid rgba(231, 201, 116, 0.35);
  border-radius: 999px;
  background: rgba(12, 16, 28, 0.55);
  color: var(--night-text);
  backdrop-filter: blur(6px);
}
.weave__world-chip.hidden { display: none; }
.weave__world-chip-icon {
  color: var(--gold);
  display: grid; place-items: center; flex: none;
}
.weave__world-chip-icon .icon { width: 14px; height: 14px; }
.weave__world-chip-body {
  min-width: 0;
  display: flex; flex-direction: column; gap: 0;
  line-height: 1.15;
}
.weave__world-chip-label {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--night-text-soft);
}
.weave__world-chip-title {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.weave__world-chip-clear {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--night-text-soft);
  cursor: pointer;
  display: grid; place-items: center;
  padding: 2px;
  border-radius: 999px;
}
.weave__world-chip-clear:hover { color: var(--night-text); background: rgba(255, 255, 255, 0.08); }
.weave__world-chip-clear .icon { width: 14px; height: 14px; }
.weave__empty {
  position: absolute; inset: 0;
  display: grid; place-items: center; text-align: center;
  color: var(--night-text-soft); padding: 24px;
  pointer-events: none;
}
.weave__bar {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--parchment-edge);
  background: linear-gradient(180deg, var(--parchment-raised), var(--parchment));
}
.weave__bar .grow { flex: 1; }
.weave__bar .weave__count { font-size: 13px; color: var(--ink-soft); }

@media (max-width: 900px) {
  .weave { grid-template-columns: 1fr; grid-template-rows: 40% 60%; }
  .weave__palette { border-right: none; border-bottom: 1px solid var(--parchment-edge); }
}
