:root {
  --bg: #1b1733;
  --bg-check: #211c3f;
  --dark: #0d0b1a;
  --light: #f4f1e8;
  --text: #f4f1e8;
  --muted: #a9a6d1;
  --win-top: #3b44a6;
  --win-bottom: #1f2466;
  --slot: #efe8d6;
  --slot-ink: #2a2440;
  --yellow: #ffd34e;
  --pink: #ff5d8f;
  --green: #4cbf62;
  --px: 4px; /* one "pixel" of border */
  --pixel-font: "Press Start 2P", monospace;
  --body-font: "Pixelify Sans", "Courier New", monospace;
  /* Noireplume brand */
  --brand-font: "Rokkitt", Georgia, serif;
  --brand-green: #6b8451;
  --brand-black: #000;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  color: var(--text);
  font-family: var(--body-font);
  font-size: 17px;
  line-height: 1.4;
  background: repeating-conic-gradient(var(--bg-check) 0 25%, var(--bg) 0 50%) 0 0 / 32px 32px;
  background-color: var(--bg);
}

button { font: inherit; color: inherit; }

/* Notched pixel outline: four flat shadows leave the corners empty. */
.px-outline {
  box-shadow:
    0 calc(var(--px) * -1) 0 0 var(--dark),
    0 var(--px) 0 0 var(--dark),
    calc(var(--px) * -1) 0 0 0 var(--dark),
    var(--px) 0 0 0 var(--dark);
}

/* ---------- Header ---------- */

.top {
  position: relative;
  text-align: center;
  padding: 28px 16px 6px;
}
.top h1 {
  margin: 0;
  font-family: var(--pixel-font);
  font-weight: 400;
  font-size: clamp(22px, 4.6vw, 38px);
  line-height: 1.25;
  color: var(--yellow);
  letter-spacing: 2px;
  text-shadow: 4px 4px 0 var(--pink), 8px 8px 0 var(--dark);
}
.tagline {
  margin: 16px 0 0;
  font-family: var(--pixel-font);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--muted);
  text-transform: uppercase;
}
.tagline .blink { color: var(--yellow); }

.sound-toggle {
  position: absolute;
  top: 14px;
  right: 16px;
}

.blink { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Noireplume branding ---------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
}
.brand-logo { display: block; flex: none; }
.brand-logo img { display: block; width: 76px; height: 76px; }
.brand-logo:hover img { filter: drop-shadow(0 0 6px rgba(255, 211, 78, 0.6)); }
.brand-text { text-align: left; }
.by {
  margin: 6px 0 0 4px;
  font-family: var(--pixel-font);
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
}
.by a {
  font-family: var(--brand-font);
  font-size: 20px;
  font-weight: 700;
  text-transform: none;
  color: var(--light);
  text-decoration: none;
  border-bottom: 2px solid var(--brand-green);
}
.by a:hover { color: var(--yellow); }

.site-foot {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px 48px;
}
.window.brand-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 22px;
  background: var(--brand-black);
}
.brand-card-logo { width: 72px; height: 72px; flex: none; }
.brand-card p { margin: 0; flex: 1; font-size: 17px; }
.brand-card strong {
  font-family: var(--brand-font);
  font-size: 21px;
  color: #fff;
}
.motto {
  display: block;
  margin-top: 4px;
  font-family: var(--brand-font);
  font-style: italic;
  font-size: 18px;
  color: var(--muted);
}
.btn.btn-brand { flex: none; background: var(--brand-green); color: #fff; }
.btn.btn-brand:hover { background: #82a064; }

.share-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  padding: 6px 12px 6px 6px;
  color: var(--text);
  text-decoration: none;
  background: var(--brand-black);
  box-shadow: 0 0 0 var(--px) var(--dark);
  font-size: 15px;
}
.share-brand img { width: 40px; height: 40px; flex: none; }
.share-brand strong { font-family: var(--brand-font); font-size: 18px; }
.share-brand:hover { color: var(--yellow); }

@media (max-width: 700px) {
  .brand-card { flex-wrap: wrap; justify-content: center; text-align: center; }
}

/* ---------- Layout ---------- */

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 32px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 24px 48px;
  align-items: start;
}

/* ---------- Windows (RPG menu boxes) ---------- */

.window {
  position: relative;
  background: linear-gradient(var(--win-top), var(--win-bottom));
  border: var(--px) solid var(--light);
  box-shadow:
    0 calc(var(--px) * -1) 0 0 var(--dark),
    0 var(--px) 0 0 var(--dark),
    calc(var(--px) * -1) 0 0 0 var(--dark),
    var(--px) 0 0 0 var(--dark),
    calc(var(--px) * 3) calc(var(--px) * 3) 0 0 rgba(0, 0, 0, 0.35);
}

.window-title {
  position: absolute;
  top: -15px;
  left: 14px;
  padding: 4px 8px;
  font-family: var(--pixel-font);
  font-size: 10px;
  color: var(--dark);
  background: var(--yellow);
  border: 3px solid var(--dark);
}

/* ---------- Stage ---------- */

.stage-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  position: sticky;
  top: 16px;
}

.stage-card {
  position: relative;
  /* Shrink to fit the window height while keeping the stage's shape */
  width: min(100%, 500px, calc((100vh - 300px) * 1160 / 1620));
  aspect-ratio: 1160 / 1620;
  background: var(--slot);
  border: var(--px) solid var(--light);
  box-shadow:
    0 0 0 var(--px) var(--dark),
    0 0 0 calc(var(--px) * 2) var(--win-top),
    0 0 0 calc(var(--px) * 3) var(--dark),
    calc(var(--px) * 5) calc(var(--px) * 5) 0 0 rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
/* Faint scanlines over the screen (not included in saved pictures) */
.stage-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(rgba(0, 0, 0, 0.05) 0 2px, transparent 2px 4px);
}
#stage { display: block; width: 100%; height: 100%; }

#char {
  transform-box: view-box;
  transform-origin: 2290px 3058px;
  animation: breathe 3.6s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: scale(1, 1); }
  50% { transform: scale(1.012, 0.986); }
}

/* "Loves it!" double jump */
#jumper {
  transform-box: view-box;
  transform-origin: 2290px 3058px;
}
#jumper.jump { animation: jump 1.1s ease-in-out; }
@keyframes jump {
  0%   { transform: translateY(0) scale(1, 1); }
  10%  { transform: translateY(0) scale(1.08, 0.9); }
  28%  { transform: translateY(-410px) scale(0.95, 1.06); }
  45%  { transform: translateY(0) scale(1.06, 0.92); }
  60%  { transform: translateY(-237px) scale(0.97, 1.04); }
  78%  { transform: translateY(0) scale(1.04, 0.95); }
  100% { transform: translateY(0) scale(1, 1); }
}

/* Pixel hearts floating up around Archi */
.fx-heart {
  opacity: 0;
  animation: heart-float 1.8s steps(9, end) forwards;
  animation-delay: var(--delay, 0s);
}
@keyframes heart-float {
  0%   { opacity: 0; transform: translateY(86px); }
  15%  { opacity: 1; }
  75%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-560px); }
}

/* Chunky, stepped "pop" when something is put on */
.pop {
  transform-box: fill-box;
  transform-origin: center;
  animation: pop 0.32s steps(4, end);
}
@keyframes pop {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); }
}
.fade { animation: fade 0.3s steps(3, end); }
@keyframes fade { from { opacity: 0; } }

/* ---------- Dialogue box ---------- */

.dialog {
  width: min(100%, 500px);
  min-height: 84px;
  padding: 22px 18px 14px;
  font-size: 18px;
}
.dialog p { margin: 0; padding-right: 18px; }
.dialog .next {
  position: absolute;
  right: 12px;
  bottom: 8px;
  font-size: 14px;
  color: var(--yellow);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

/* ---------- Pixel buttons ---------- */

.btn {
  cursor: pointer;
  padding: 12px 14px;
  font-family: var(--pixel-font);
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--dark);
  background: var(--light);
  border: none;
  box-shadow:
    0 calc(var(--px) * -1) 0 0 var(--dark),
    0 var(--px) 0 0 var(--dark),
    calc(var(--px) * -1) 0 0 0 var(--dark),
    var(--px) 0 0 0 var(--dark),
    inset calc(var(--px) * -1) calc(var(--px) * -1) 0 0 rgba(0, 0, 0, 0.28),
    inset var(--px) var(--px) 0 0 rgba(255, 255, 255, 0.6);
}
.btn:hover { background: var(--yellow); }
.btn:active {
  transform: translateY(2px);
  box-shadow:
    0 calc(var(--px) * -1) 0 0 var(--dark),
    0 var(--px) 0 0 var(--dark),
    calc(var(--px) * -1) 0 0 0 var(--dark),
    var(--px) 0 0 0 var(--dark),
    inset var(--px) var(--px) 0 0 rgba(0, 0, 0, 0.28);
}
.btn-primary { background: var(--green); color: var(--dark); }
.btn-primary:hover { background: #7be08c; }
.btn-small { padding: 8px 10px; font-size: 9px; }
.btn-share { background: var(--pink); color: var(--dark); }
.btn-share:hover { background: #ff8fb0; }
a.btn { display: inline-block; text-decoration: none; }

/* ---------- Status (stats) window ---------- */

.side {
  display: flex;
  flex-direction: column;
  gap: 32px;
  min-width: 0;
}

.status { padding: 26px 16px 16px; }

.status-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
  font-family: var(--pixel-font);
}
.level {
  flex: none;
  padding: 5px 7px;
  font-size: 10px;
  color: var(--dark);
  background: var(--light);
}
.level.level-up { animation: level-up 0.9s steps(1) 2; }
@keyframes level-up {
  0%, 50% { background: var(--yellow); }
  25%, 75% { background: var(--pink); }
}
.rank {
  font-size: 12px;
  line-height: 1.5;
  color: var(--yellow);
  text-transform: uppercase;
}

.stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.stat {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 26px 32px;
  align-items: center;
  gap: 8px;
}
.stat-name {
  font-family: var(--pixel-font);
  font-size: 9px;
  text-transform: uppercase;
}
.bar {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 3px;
  height: 14px;
  padding: 2px;
  background: var(--dark);
}
.seg { background: rgba(244, 241, 232, 0.12); }
.seg.on { background: var(--stat-color); }
.seg.gain { background: var(--green); animation: blink 0.6s steps(1) infinite; }
.seg.loss { background: transparent; box-shadow: inset 0 0 0 2px var(--pink); }
.stat-val {
  font-family: var(--pixel-font);
  font-size: 10px;
  text-align: right;
}
.delta {
  font-family: var(--pixel-font);
  font-size: 9px;
}
.delta.up { color: var(--green); }
.delta.down { color: var(--pink); }

.status-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 12px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: var(--px) dashed rgba(244, 241, 232, 0.35);
}
.power {
  font-family: var(--pixel-font);
  font-size: 10px;
  text-transform: uppercase;
}
.power b { color: var(--yellow); font-weight: 400; }
.compare { color: var(--muted); font-size: 15px; }

/* ---------- Share window ---------- */

.share-dialog {
  position: fixed; /* .window sets relative; the dialog needs to float */
  width: min(720px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow: visible;
  padding: 30px 20px 20px;
  color: var(--text);
}
.share-dialog::backdrop {
  background: rgba(13, 11, 26, 0.75);
}
.share-dialog[open] { animation: fade 0.2s steps(3, end); }

.share-close {
  position: absolute;
  top: 10px;
  right: 10px;
}

.share-body {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  max-height: calc(100vh - 110px);
  max-height: calc(100dvh - 110px);
  overflow-y: auto;
  padding: 6px;
}

.share-preview {
  display: grid;
  place-items: center;
  aspect-ratio: 1160 / 1620;
  background: var(--slot);
  color: var(--slot-ink);
  box-shadow: 0 0 0 var(--px) var(--dark);
  text-align: center;
}
.share-preview img { width: 100%; height: 100%; display: block; }
.share-preview img[hidden] { display: none; }
.share-preview p { margin: 0; padding: 12px; }

.share-options {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}
.share-options > .btn { text-align: left; }

.share-label {
  margin: 6px 0 -6px;
  font-family: var(--pixel-font);
  font-size: 9px;
  color: var(--yellow);
  text-transform: uppercase;
}

.share-link-row { display: flex; gap: 12px; align-items: center; }
.share-link-row input {
  flex: 1;
  min-width: 0;
  padding: 8px;
  font: inherit;
  font-size: 15px;
  color: var(--slot-ink);
  background: var(--slot);
  border: none;
  box-shadow: 0 0 0 var(--px) var(--dark);
}

.share-socials { display: flex; flex-wrap: wrap; gap: 14px; }
.btn.btn-ig {
  color: #fff;
  background: linear-gradient(135deg, #feda75, #fa7e1e 30%, #d62976 60%, #962fbf 85%, #4f5bd5);
}
.btn.btn-ig:hover { filter: brightness(1.1); }
.btn.btn-ig:disabled { filter: grayscale(1); opacity: 0.6; cursor: wait; }
.btn.btn-x { color: #fff; background: #000; }
.btn.btn-x:hover { background: #333; }

.share-hint { margin: 4px 0 0; font-size: 15px; color: var(--muted); }
.share-status { margin: 0; min-height: 1.4em; color: var(--yellow); }

/* ---------- Wardrobe ---------- */

.wardrobe { padding: 26px 16px 18px; }

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px 6px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: var(--px) dashed rgba(244, 241, 232, 0.35);
}
.tab {
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 6px 8px 18px;
  font-family: var(--pixel-font);
  font-size: 10px;
  text-transform: uppercase;
  text-align: left;
  color: var(--muted);
  background: transparent;
  border: none;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--yellow); }
.tab[aria-selected="true"]::before {
  content: "▶";
  position: absolute;
  left: 2px;
  font-size: 9px;
  animation: blink 0.8s steps(1) infinite;
}
.tab .icon {
  width: 22px;
  height: 22px;
  flex: none;
  display: grid;
  place-items: center;
  --icon-accent: var(--pink);
}
.tab .icon svg { width: 100%; height: 100%; display: block; }
.tab .dot {
  width: 6px;
  height: 6px;
  margin-left: -2px;
  flex: none;
  background: var(--pink);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 14px;
  padding: 4px;
}

/* Inventory slots */
.tile {
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 6px 8px;
  color: var(--slot-ink);
  background: var(--slot);
  border: none;
  box-shadow:
    0 calc(var(--px) * -1) 0 0 var(--dark),
    0 var(--px) 0 0 var(--dark),
    calc(var(--px) * -1) 0 0 0 var(--dark),
    var(--px) 0 0 0 var(--dark),
    inset var(--px) var(--px) 0 0 rgba(0, 0, 0, 0.14),
    inset calc(var(--px) * -1) calc(var(--px) * -1) 0 0 rgba(255, 255, 255, 0.7);
}
.tile:hover {
  box-shadow:
    0 calc(var(--px) * -1) 0 0 var(--yellow),
    0 var(--px) 0 0 var(--yellow),
    calc(var(--px) * -1) 0 0 0 var(--yellow),
    var(--px) 0 0 0 var(--yellow),
    inset var(--px) var(--px) 0 0 rgba(0, 0, 0, 0.14),
    inset calc(var(--px) * -1) calc(var(--px) * -1) 0 0 rgba(255, 255, 255, 0.7);
}
.tile[aria-pressed="true"] { background: var(--yellow); }
.tile[aria-pressed="true"]::after {
  content: "E";
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  font-family: var(--pixel-font);
  font-size: 9px;
  color: var(--light);
  background: var(--pink);
  border: 2px solid var(--dark);
}
.tile svg, .tile .none-icon {
  width: 100%;
  aspect-ratio: 1;
  display: block;
}
.tile .none-icon {
  display: grid;
  place-items: center;
  font-family: var(--pixel-font);
  font-size: 26px;
  color: #b9ad99;
}
.tile .name {
  font-size: 15px;
  text-align: center;
  line-height: 1.15;
}

.tab:focus-visible, .tile:focus-visible, .btn:focus-visible {
  outline: 3px dashed var(--yellow);
  outline-offset: 7px;
}

/* Hidden SVG used to measure item sizes for thumbnails */
.measurer {
  position: absolute;
  width: 10px; height: 10px;
  left: -9999px; top: 0;
  visibility: hidden;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  max-width: calc(100vw - 48px);
  padding: 12px 16px;
  font-size: 17px;
}

/* ---------- Small screens ---------- */

@media (max-width: 900px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
    padding: 12px 16px 36px;
    gap: 28px;
  }
  .stage-wrap { position: static; }
  .stage-card { width: min(100%, 360px, calc(56vh * 1160 / 1620)); }
  .grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
  .sound-toggle { position: static; margin-top: 14px; }
}

@media (max-width: 620px) {
  .share-body { grid-template-columns: minmax(0, 1fr); }
  .share-preview { width: min(100%, 200px); justify-self: center; }
}

@media (max-width: 420px) {
  .tabs { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .btn { font-size: 10px; padding: 11px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  #jumper.jump { animation: none; }
  .fx-heart { animation: none; opacity: 1; }
  #char, .pop, .fade, .blink, .tab[aria-selected="true"]::before, .seg.gain, .level.level-up { animation: none; }
}

/* ---------- Phones (portrait): the wardrobe is a drawer at the bottom of the screen ---------- */

.drawer-handle { display: none; }

@media (max-width: 900px) and (orientation: portrait) {
  :root {
    --drawer-h: 50dvh; /* open drawer; Archi and the buttons fit in the half above */
    --drawer-peek: 96px; /* closed drawer: handle + tab row */
    --band-h: clamp(220px, calc(100dvh - var(--drawer-h) - 100px), 340px);
  }

  body { padding-bottom: calc(var(--drawer-peek) + 12px); }

  .top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px 6px;
    text-align: left;
  }
  .top h1 {
    font-size: 17px;
    letter-spacing: 1px;
    text-shadow: 2px 2px 0 var(--pink), 4px 4px 0 var(--dark);
  }
  .tagline { display: none; }
  .sound-toggle { position: static; margin: 0; flex: none; }
  .brand { gap: 8px; min-width: 0; }
  .brand-logo img { width: 44px; height: 44px; }
  .by { margin: 4px 0 0 2px; font-size: 8px; }
  .by a { font-size: 15px; }

  /* Archi on the left, dialogue + buttons on the right */
  .stage-wrap {
    height: var(--band-h);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 18px 16px;
    align-items: stretch;
  }
  .stage-card {
    grid-row: 1 / span 2;
    align-self: start;
    width: min(50vw, calc((var(--band-h) - 12px) * 1160 / 1620));
  }
  .dialog {
    width: auto;
    min-height: 0;
    padding: 16px 8px 8px 10px;
    font-size: 14px;
    line-height: 1.3;
    display: flex;
    flex-direction: column;
  }
  .dialog p {
    flex: 1;
    min-height: 0;
    overflow-y: auto; /* only the text scrolls, so the name tag stays visible */
    padding-right: 4px;
  }
  .dialog .window-title { top: -13px; left: 8px; font-size: 8px; }
  .dialog .next { display: none; }
  .actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 0 4px 4px;
  }
  .actions .btn { padding: 5px 4px; font-size: 8px; }
  .long { display: none; }

  /* The drawer */
  .wardrobe {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: 0;
    z-index: 10;
    height: var(--drawer-h);
    display: flex;
    flex-direction: column;
    padding: 0 8px;
    border-bottom: none;
    transform: translateY(calc(100% - var(--drawer-peek)));
    transition: transform 0.25s ease-out;
  }
  .wardrobe.open { transform: none; }

  .drawer-handle {
    display: flex;
    flex: none;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 30px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    touch-action: none; /* dragging the handle moves the drawer, not the page */
  }
  .drawer-handle .grip {
    width: 48px;
    height: 6px;
    background: var(--light);
    box-shadow: 0 0 0 2px var(--dark);
  }
  .drawer-handle:focus-visible { outline: 3px dashed var(--yellow); outline-offset: -3px; }

  /* Tabs in one swipeable row */
  .tabs {
    flex: none;
    display: flex;
    flex-wrap: nowrap;
    gap: 2px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    margin: 0 0 8px;
    padding: 2px 2px 8px;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab {
    flex: none;
    scroll-snap-align: start;
    padding: 8px 8px 8px 16px;
    font-size: 9px;
  }

  .grid {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    align-content: start;
    padding: 6px 6px 16px;
  }
  /* Closed: the items are off screen, so keep them out of the tab order too */
  .wardrobe:not(.open) .grid { visibility: hidden; transition: visibility 0s 0.25s; }

  .toast { z-index: 20; }

  @media (prefers-reduced-motion: reduce) {
    .wardrobe { transition: none; }
  }
}
