:root {
  --bg: #100c1c; --card: #1d1630; --line: #ffffff17; --text: #f4eefa; --muted: #b9adc8;
  --pink: #ff80bd; --teal: #5fe3d0; color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--pink); }
img { max-width: 100%; }

.info-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px max(16px, env(safe-area-inset-left)); background: #100c1ce6; backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.info-back { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-weight: 750; }
.info-back img { border-radius: 10px; }
.info-nav { display: flex; gap: 4px; }
.info-nav a { padding: 6px 14px; border-radius: 99px; color: var(--text); text-decoration: none; font-weight: 600; }
.info-nav a[aria-current="page"] { background: var(--pink); color: #1b0f1a; }

.info-main { max-width: 1100px; margin: 0 auto; padding: 18px 16px 60px; outline: none; }
h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); margin: 6px 0 8px; }
h2 { font-size: 1.15rem; margin: 26px 0 12px; }
.lead, .muted { color: var(--muted); }
.accent { color: var(--pink); margin: 0 0 4px; }
.empty { color: var(--muted); text-align: center; padding: 40px 0; }
.crumb { display: inline-block; margin-bottom: 4px; text-decoration: none; font-weight: 600; }

.cover-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 18px; }
.cover { display: block; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); transition: transform .2s; }
.cover:hover, .cover:focus-visible { transform: translateY(-3px); }
.cover img { display: block; width: 100%; height: auto; }

.info-search { width: 100%; max-width: 420px; margin: 6px 0 10px; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); font: inherit; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; scrollbar-width: none; }
.chips button { flex: none; border: 1px solid var(--line); border-radius: 99px; padding: 7px 14px; background: var(--card); color: var(--text); font: 600 .88rem system-ui; cursor: pointer; }
.chips button[aria-pressed="true"] { background: var(--pink); color: #1b0f1a; border-color: transparent; }

.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tile-grid.wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 10px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--card); color: var(--text); font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.tile:hover, .tile:focus-visible { border-color: var(--pink); }
.tile img { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; border-radius: 10px; background: #0003; }
.tile-grid.wide .tile img { object-fit: cover; }
.tile small { color: var(--muted); }
.station img { aspect-ratio: 1; object-fit: cover; }
.logo-missing { display: grid; place-items: center; aspect-ratio: 1; font-size: 2.4rem; background: #0003; border-radius: 10px; }

.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 16px; margin-bottom: 26px; }
.people.big { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.person { display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0; color: var(--text); font: 600 .85rem system-ui; cursor: pointer; }
.person img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); box-shadow: 0 4px 12px #0007; }
.person.big img { width: 104px; height: 104px; }

.progress { color: var(--teal); font-weight: 700; margin: 0 0 6px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px; }
.card { display: flex; flex-direction: column; gap: 3px; padding: 0; background: none; border: 0; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.card img { width: 100%; aspect-ratio: 1 / 2; object-fit: cover; border-radius: 10px; filter: grayscale(.85) brightness(.75); transition: filter .2s; }
.card.owned img, .card:hover img { filter: none; }
.card small { color: var(--muted); }

.station-head { display: flex; gap: 16px; align-items: center; }
.station-head img { width: 110px; height: 110px; border-radius: 20px; object-fit: cover; flex: none; }
.episodes { list-style: none; padding: 0; display: grid; gap: 8px; }
.episodes a { display: block; padding: 12px 14px; border-radius: 12px; background: var(--card); text-decoration: none; color: var(--text); font-weight: 600; }
.tracks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 6px; }
.tracks li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--card); }
.num { width: 26px; text-align: right; color: var(--muted); font: .8rem ui-monospace, monospace; flex: none; }
.song { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.song b, .song small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song small { color: var(--muted); }
.btn { flex: none; padding: 6px 10px; border-radius: 99px; font: 700 .78rem system-ui; text-decoration: none; }
.btn.spotify { background: #1ed760; color: #08140c; }
.btn.youtube { background: #ff2a2a; color: #fff; }

.app-list { display: grid; gap: 12px; }
.app { display: flex; gap: 14px; padding: 14px; border-radius: 16px; background: var(--card); }
.app img { width: 60px; height: 60px; border-radius: 50%; flex: none; }
.app h2 { margin: 0 0 2px; }
.app p { margin: 2px 0; }

.sim-intro { max-width: 460px; margin: 40px auto; text-align: center; }
.sim-icon { font-size: 4rem; margin: 0; }
.warning { padding: 14px 16px; border-radius: 16px; background: var(--card); text-align: left; }
.primary, .secondary { display: inline-block; border: 0; border-radius: 99px; padding: 11px 22px; font: 700 1rem system-ui; text-decoration: none; cursor: pointer; }
.primary { background: var(--pink); color: #1b0f1a; }
.primary.big { display: block; padding: 16px; font-size: 1.15rem; }
.secondary { background: var(--card); color: var(--text); border: 1px solid var(--line); }

.info-dialog { width: min(560px, calc(100% - 24px)); max-height: calc(100dvh - 40px); padding: 22px; border: 1px solid var(--line);
  border-radius: 22px; background: #181226; color: var(--text); overflow: auto; }
.info-dialog::backdrop { background: #000a; }
.info-dialog h2 { margin: 12px 0 2px; font-size: 1.4rem; }
.info-dialog h3 { margin: 18px 0 6px; font-size: 1rem; }
.info-close { position: sticky; top: 0; float: right; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #ffffff1c; color: var(--text); font-size: 1.3rem; cursor: pointer; z-index: 2; }
.hero { display: block; width: 100%; max-height: 300px; object-fit: cover; border-radius: 14px; }
.hero.contain { object-fit: contain; background: #0003; }
.avatar { display: block; width: 120px; height: 120px; margin: 0 auto; border-radius: 50%; object-fit: cover; }
.pill { display: inline-block; padding: 3px 12px; border-radius: 99px; background: var(--pink); color: #1b0f1a; font-weight: 700; font-size: .8rem; }
.stat { display: grid; grid-template-columns: 110px 1fr 34px; align-items: center; gap: 10px; margin: 6px 0; }
.stat meter { width: 100%; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 14px 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.photos figure { margin: 0; }
.photos img { border-radius: 10px; aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.photos figcaption { color: var(--muted); font-size: .78rem; }
.actions { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }

.card-editions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0; font-weight: 600; }
.card-editions select { max-width: 100%; min-height: 44px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--text); font: inherit; }
.flip { width: min(260px, 70vw); aspect-ratio: 1 / 2; margin: 0 auto; perspective: 1200px; cursor: pointer; }
.flip-inner { position: relative; width: 100%; height: 100%; transition: transform .6s; transform-style: preserve-3d; }
.flip.turned .flip-inner { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 14px; overflow: hidden; }
.face img { width: 100%; height: 100%; object-fit: contain; }
.face.back { transform: rotateY(180deg); }
.generic-back { display: grid; place-items: center; width: 100%; height: 100%; background: repeating-linear-gradient(45deg, #2a1d44 0 12px, #241838 12px 24px);
  border: 6px solid #ff80bd55; border-radius: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
@media (prefers-reduced-motion: reduce) { .flip-inner, .cover { transition: none; } }
@media (max-width: 520px) { .station-head { flex-direction: column; align-items: flex-start; } .tracks li { flex-wrap: wrap; } .song { flex-basis: calc(100% - 40px); } }
.card-pending { display: grid; place-items: center; aspect-ratio: 1 / 2; border-radius: 10px; border: 1px dashed #ffffff33; color: var(--muted); font-size: .8rem; text-align: center; padding: 8px; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 99px; background: #ffffff1c; color: var(--muted); font-size: .72rem; font-weight: 700; }
.badge.ok { background: #1f6b4d; color: #d9ffe9; }
.badge.warn { background: #6b551f; color: #fff3d2; }
.sources { font-size: .8rem; color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 0 0 12px; color: var(--muted); font-size: .88rem; }
.filters select { margin-left: 6px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; }
.filters .check { display: flex; align-items: center; gap: 6px; }
.photo-pending { display: grid; place-items: center; aspect-ratio: 16 / 10; border-radius: 10px; border: 1px dashed #ffffff33; color: var(--muted); font-size: .8rem; }
.photo-pending.hero { max-height: 200px; }
.small { font-size: .8rem; }
.link { background: none; border: 0; padding: 0; color: var(--pink); font: inherit; text-decoration: underline; cursor: pointer; }
.generic-back { padding: 16px; text-align: center; line-height: 1.4; }

/* Desktop: bigger section covers and tiles so the hub doesn't look tiny on a wide screen. */
@media (min-width: 900px) {
  .info-main { max-width: 1320px; padding: 28px 32px 80px; }
  .cover-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; margin-top: 26px; }
  .cover { border-radius: 28px; }
  .tile-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
  .tile-grid.wide { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .tile { padding: 12px; font-size: 1.05rem; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px; }
  .people.big { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .person.big img { width: 132px; height: 132px; }
  h2 { font-size: 1.35rem; }
}

/* Field guide */
.info-language { color: inherit; background: transparent; border: 1px solid #635370; border-radius: 6px; padding: 5px 8px; font: inherit; font-size: .77rem; cursor: pointer; }
.guide-controls { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem; margin: 1rem 0 1.25rem; }
.guide-controls > label { display: grid; gap: .35rem; font-size: .83rem; font-weight: 600; color: #e2d9e7; }
.guide-controls select { min-height: 42px; max-width: 100%; border: 1px solid #5c486a; border-radius: 9px; padding: .5rem .7rem; background: #21182d; color: #fff; font: inherit; }
.guide-platform, .guide-layout { display: flex; flex-wrap: wrap; min-inline-size: 0; gap: 4px; margin: 0; padding: 4px; border: 1px solid #3b2c4a; border-radius: 11px; background: #1c1627; }
.guide-platform label, .guide-layout label, .guide-controls > .guide-spoiler { display: inline-flex; align-items: center; gap: .4rem; min-height: 36px; padding: .35rem .7rem; cursor: pointer; border-radius: 7px; color: #f6eefb; font-size: .85rem; font-weight: 650; }
.guide-platform label:has(:checked), .guide-layout label:has(:checked) { background: #593750; }
.guide-platform label:focus-within, .guide-layout label:focus-within { outline: 2px solid #f4a1c1; outline-offset: -2px; }
.guide-platform input, .guide-layout input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.guide-controls > .guide-spoiler { min-height: 46px; border: 1px solid #3b2c4a; background: #21182d; }
.guide-spoiler input { accent-color: #ef92b2; }
.guide-platform img, .guide-reward img { width: 1.25rem; height: 1.25rem; object-fit: contain; }
.guide-notice { margin: 0 0 1.2rem; border-left: 3px solid #ef92b2; border-radius: 0 9px 9px 0; padding: .8rem .95rem; color: #e5d9e9; background: #21182d; }
.guide-results, .guide-deck { display: grid; gap: .8rem; align-items: start; }
.guide-group > h2 { color: #f8e7f6; margin: .5rem 0 .75rem; letter-spacing: -.02em; }
.guide-group + .guide-group { margin-top: .65rem; }
.guide-missions .guide-deck, .guide-cheats .guide-deck, .guide-achievements { grid-template-columns: repeat(auto-fit, minmax(min(100%, 285px), 1fr)); align-items: stretch; }
.guide-animals { grid-template-columns: repeat(auto-fill, minmax(min(100%, 175px), 1fr)); }
.guide-icon-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 112px), 1fr)); }
.guide-entry { color: #fff; overflow: hidden; border: 1px solid #3b2d49; border-radius: 14px; background: #1c1628; min-width: 0; }
.guide-entry h2 { color: #fff; font-size: 1rem; margin: 0; line-height: 1.3; }
.guide-entry p { color: #ded2e2; margin: .4rem 0 0; line-height: 1.48; overflow-wrap: anywhere; }
.guide-copy { min-width: 0; padding: .85rem .95rem; }
.guide-tile { display: block; padding: 0; align-self: stretch; text-align: left; cursor: pointer; font: inherit; }
.guide-tile:hover, .guide-tile:focus-visible { border-color: #cb7da4; }
.guide-tile-text { display: flex; flex-direction: column; min-height: 58px; gap: .25rem; padding: .65rem .7rem; line-height: 1.25; }
.guide-tile-text strong { font-size: .92rem; }
.guide-tile-text small { color: #ceb7d4; }
.guide-animal-image, .guide-picture, .guide-dialog-picture { display: block; width: 100%; padding: 0; overflow: hidden; border: 0; background: #30243c; }
.guide-animal-image { aspect-ratio: 4 / 3; }
.guide-animal-image img, .guide-picture img, .guide-dialog-picture img { display: block; width: 100%; height: 100%; object-fit: cover; }
.guide-icon-art { display: flex; justify-content: center; align-items: center; gap: 5px; }
.guide-icon-art img { width: 34px; height: 34px; object-fit: contain; }
.guide-icon-row { display: flex; align-items: center; padding-left: .85rem; }
.guide-icon-row .guide-icon-art { min-width: 44px; min-height: 44px; border-radius: 9px; background: #30243c; padding-inline: 6px; }
.guide-icon-grid .guide-icon-art { aspect-ratio: 2 / 1; background: #2c2138; }
.guide-icon-grid .guide-tile-text { min-height: 48px; text-align: center; }
.guide-icon-grid .guide-tile-text strong { font-size: .82rem; }
.guide-dialog-icons { padding: .85rem; border-radius: 12px; background: #2c2138; }
.guide-dialog-icons img { width: 52px; height: 52px; }
.guide-dialog-picture { cursor: zoom-in; border-radius: 12px; margin-bottom: .8rem; }
.guide-dialog-picture img { object-fit: contain; max-height: 55vh; }
.guide-achievement { display: flex; align-items: center; gap: .25rem; padding-left: .75rem; }
.guide-picture { cursor: zoom-in; aspect-ratio: 16 / 9; }
.guide-achievement .guide-picture { flex: 0 0 68px; aspect-ratio: 1; border-radius: 9px; }
.guide-platinum { grid-column: 1 / -1; border-color: #976384; background: linear-gradient(110deg, #3d2742, #23192f 72%); padding: .5rem 0 .5rem .85rem; }
.guide-platinum .guide-picture { flex-basis: 90px; }
.guide-platinum h2 { font-size: 1.2rem; }
.guide-reward { display: inline-flex; gap: .25rem; align-items: center; margin-bottom: .3rem; color: #f6a8c5; font-size: .78rem; font-weight: 750; }
.guide-reward img { border-radius: 3px; }
.guide-score { color: #c2edac; font-size: .86rem; }
.guide-score img { width: 1.1rem; height: 1.1rem; }
.guide-mission .guide-copy { padding: .9rem 1rem 1rem; }
.guide-mission h2 { font-size: 1.12rem; }
.guide-meta { display: flex; flex-wrap: wrap; gap: .35rem; }
.guide-meta span { border-radius: 5px; background: #392840; color: #f0c2de; font-size: .75rem; padding: .13rem .4rem; }
.guide-links { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .75rem; margin-top: .7rem; }
.guide-cheat .guide-copy { padding: .95rem; }
.guide-sequence { display: flex; flex-wrap: wrap; gap: .28rem; padding: .55rem 0 .6rem; }
.guide-sequence kbd { display: inline-grid; place-items: center; width: 1.85rem; height: 1.95rem; border: 1px solid #6b4d78; box-shadow: inset 0 -2px #362743; border-radius: 6px; font: 700 1.03rem system-ui; color: #fff; background: #4c3557; }
.guide-unlock { border-top: 1px solid #473453; padding-top: .65rem; }
.guide-unlock strong { display: block; font-size: .76rem; color: #f0a8c8; }
.guide-unlock p { font-size: .9rem; margin-top: .17rem; }
.guide-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 500px) {
  .guide-animals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide-icon-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.guide-group > .guide-chapter {
  position: sticky;
  top: 56px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: .2rem 0 .35rem;
  padding: .25rem 0;
  background: var(--bg);
  color: var(--text);
  font-size: 1.04rem;
  line-height: 1.25;
}
.guide-chapter span {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-width: 0;
  padding: .42rem .82rem .42rem .68rem;
  border: 1px solid #ff80bd42;
  border-radius: 999px;
  background: #ff80bd20;
  overflow-wrap: anywhere;
}
.guide-chapter span::before {
  content: "";
  flex: 0 0 6px;
  height: 6px;
  margin-inline: 4px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 0 4px #ff80bd29;
}
.guide-chapter::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, #ff80bd4d, transparent);
}
.guide-photo-credit {
  display: block;
  width: fit-content;
  margin: .35rem .95rem 0 auto;
  color: #c3bcc8;
  font-size: .72rem;
  text-decoration: none;
}
.guide-photo-credit:hover { text-decoration: underline; }
.guide-mission .guide-photo-credit + .guide-copy { padding-top: .38rem; }

.info-dialog.info-sheet {
  inset: auto 0 0;
  width: min(560px, 100%);
  max-height: min(85dvh, 690px);
  margin: 0 auto;
  padding: 26px 20px max(24px, env(safe-area-inset-bottom));
  border-radius: 24px 24px 0 0;
  background: #20182df7;
}
.info-sheet::before {
  content: "";
  position: absolute;
  top: 8px;
  left: calc(50% - 17px);
  width: 34px;
  height: 4px;
  border-radius: 999px;
  background: #9a8ba5;
  pointer-events: none;
}
.info-sheet h2 { text-align: center; }
.info-sheet .guide-meta { justify-content: center; }
.guide-sheet-copy { margin-bottom: 0; padding: .9rem; border-radius: 14px; background: #30243c; }
.photo-trigger { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.photo-dialog {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #09070c;
  color: var(--text);
}
.photo-dialog[open] { display: flex; flex-direction: column-reverse; }
.photo-bar {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 10px max(12px, env(safe-area-inset-left));
  background: #181222;
}
.photo-bar h2 { margin: 0; font-size: 1rem; line-height: 1.2; }
.photo-controls { display: flex; gap: 6px; }
.photo-controls button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 10px;
  background: #30243c;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
}
.photo-controls button:disabled { opacity: .5; }
.photo-viewport {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  touch-action: none;
  cursor: zoom-in;
}
.photo-viewport.is-zoomed { cursor: grab; }
.photo-viewport.is-zoomed:active { cursor: grabbing; }
.photo-viewport img {
  position: absolute;
  inset: 0 auto auto 0;
  max-width: none;
  transform-origin: top left;
  pointer-events: none;
  user-select: none;
}

/* Tattoo line art is drawn in black on transparent: show it on paper. */
.tile img.custom-light { background: #ece8f1; object-fit: contain; }
.tile img.custom-art { aspect-ratio: 1; object-fit: cover; }
.tile img.custom-art.custom-light { object-fit: contain; }
.custom-viewer { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; margin-top: 8px; }
.custom-viewer img { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 14px; touch-action: pan-y; user-select: none; }
.custom-viewer img.custom-light { background: #ece8f1; }
.cv-nav { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.cv-nav:hover, .cv-nav:focus-visible { border-color: var(--pink); }

.customization-cover { position: relative; }
.customization-cover > .customization-clothing-accent {
  position: absolute;
  width: 23%;
  left: 82%;
  top: 79%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.clothing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 136px), 1fr));
  gap: 12px;
}
.clothing-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: start;
  text-decoration: none;
}
.clothing-card:hover, .clothing-card:focus-visible { border-color: var(--pink); }
.clothing-card:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; }
.clothing-card-art {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-width: 0;
  background: #ebe6f2;
  color: #504859;
}
.clothing-card-art.is-outfit { background: #211d28; color: #ded5e8; }
.clothing-card-art .clothing-art {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  padding: 10px;
}
.clothing-card-art.is-outfit .clothing-art { padding: 0; }
.clothing-no-photo { font-size: 0.82rem; }
.clothing-caption {
  display: grid;
  align-content: start;
  gap: 3px;
  padding: 10px 11px;
  min-height: 3.65rem;
  overflow-wrap: anywhere;
}
.clothing-caption strong { font-size: 0.91rem; line-height: 1.28; }
.clothing-caption small { color: var(--muted); font-variant-numeric: tabular-nums; }
.clothing-more { margin: 16px auto 0; }
@media (min-width: 650px) {
  .clothing-grid { grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 16px; }
  .clothing-caption strong { font-size: 1rem; }
}
#info-dialog-body > .clothing-art {
  display: block;
  max-height: min(48vh, 460px);
  width: 100%;
  object-fit: contain;
}

.clothing-detail {
  display: grid;
  gap: 20px;
  align-items: start;
}
.clothing-detail-art {
  display: grid;
  place-items: center;
  min-height: 100px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--card);
}
.clothing-detail-art img {
  display: block;
  width: 100%;
  max-height: 410px;
  object-fit: contain;
}
.outfit-pieces h2 { margin: 0 0 12px; }
.outfit-pieces h3 { margin: 14px 0 8px; font-size: 0.95rem; }
.outfit-pieces-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 92px), 1fr));
  gap: 8px;
}
.outfit-pieces-grid .clothing-card { border-radius: 11px; }
.outfit-pieces-grid .clothing-caption { padding: 7px; min-height: 0; }
.outfit-pieces-grid .clothing-caption strong { font-size: 0.75rem; }
.outfit-pieces-grid .clothing-art { padding: 5px; }
@media (min-width: 680px) {
  .clothing-detail { grid-template-columns: minmax(200px, 300px) minmax(0, 1fr); }
  .clothing-detail:not(.is-outfit) { grid-template-columns: minmax(200px, 360px) minmax(0, 1fr); }
  .outfit-pieces-grid { grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); }
}
.outfit-gallery {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}
.outfit-gallery-photo {
  flex: 0 0 88%;
  scroll-snap-align: start;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.outfit-gallery-photo img { height: 100%; }

.outfit-gallery { min-width: 0; }
.clothing-acquisition { list-style: none; padding: 0; margin: 8px 0 16px; }
.clothing-acquisition li { display: grid; gap: 4px; border-top: 1px solid var(--line); padding: 10px 0; }
.clothing-acquisition span { color: var(--muted); }
.clothing-acquisition a { justify-self: start; }

.clothing-item-nav { display: flex; justify-content: space-between; gap: 8px; margin: 10px 0 16px; }
.clothing-item-nav :is(a, button) {
  display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--card);
  color: var(--text); font: inherit; text-decoration: none;
}
.clothing-item-nav :is(a, button):focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.clothing-item-nav button:not(:disabled) { cursor: pointer; }
.clothing-item-nav button:disabled { opacity: .45; }
.clothing-item-nav span[aria-hidden] { font-size: 1.4em; line-height: 1; }
.clothing-item-nav :last-child > span[aria-hidden] { order: 1; }

/* Four links (Feed, Mapa, Info, language) fit on phones: keep the logo, drop its word. */
.info-back { min-width: 0; flex: none; }
@media (max-width: 640px) {
  .info-back span { display: none; }
  .info-nav a { padding: 6px 10px; }
}
