/* /community, /decks and /decks/<id>: on top of learn.css, same tokens
   (community spec section 9: visual first, minimal copy). */

/* ---------- Chips ---------- */
.deck-chips,
.deck-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-block: 6px 14px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 6px 14px;
  border: var(--border);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
  font: 700 1rem/1 var(--font-body);
  color: var(--ink);
  cursor: default;
}
.chip--level {
  background: var(--sun);
}
button.chip {
  cursor: pointer;
  transition:
    transform 90ms ease,
    box-shadow 90ms ease;
}
button.chip:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
}
button.chip[aria-pressed="true"] {
  background: var(--mint);
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}
button.chip:focus-visible {
  outline: 3px solid var(--coral-deep);
  outline-offset: 3px;
}
@media (min-width: 640px) {
  .chip {
    min-height: 36px;
    font-size: 0.92rem;
  }
}

/* ---------- Sticker tiles (shared) ---------- */
.sticker-letter {
  display: grid;
  place-items: center;
  font: 400 2.4rem/1 var(--font-display);
  color: var(--coral-deep);
  background: var(--paper);
}

/* ---------- Doors: hub cards and catalog cards ---------- */
.doors {
  display: grid;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.doors--2,
.doors--3,
.doors--grid {
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .doors--2,
  .doors--grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .doors--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 900px) {
  .doors--2 {
    grid-template-columns: repeat(2, minmax(0, 420px));
  }
  .doors--3 {
    grid-template-columns: repeat(3, minmax(0, 380px));
  }
}
@media (min-width: 980px) {
  .doors--grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.door {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  padding: 14px 14px 18px;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  color: inherit;
  text-decoration: none;
  transition:
    transform 90ms ease,
    box-shadow 90ms ease;
}
.door:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow);
}
.door:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}
.door:focus-visible {
  outline: 3px solid var(--coral-deep);
  outline-offset: 4px;
}
.door-window {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: var(--border);
  border-radius: var(--radius-sm);
}
.door-window--coral {
  background: var(--coral-100);
}
.door-window--mint {
  background: var(--mint-100);
}
.door-window--sun {
  background: var(--sun-100);
}
.door-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  font: 400 1.6rem/1.05 var(--font-display);
}
.door-title::after {
  content: "→";
  font: 800 1.25rem/1 var(--font-body);
}
.door-line {
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.45;
  text-wrap: pretty;
}
@media (min-width: 640px) {
  .door-line {
    font-size: 0.95rem;
  }
}

/* Cover: a fan of stickers (Get a deck door and catalog cards). */
.fan {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding-inline: 8%;
}
.fan-tile {
  display: block;
  flex: 0 1 auto;
  width: 30%;
  max-width: 108px;
  aspect-ratio: 1;
  margin-inline: -4%;
  padding: 7%;
  border: var(--border);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  box-sizing: border-box;
}
.fan-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.fan-tile.sticker-letter {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
}
.fan-tile:nth-child(1) {
  transform: rotate(-9deg) translateY(10px);
}
.fan-tile:nth-child(2) {
  transform: rotate(-4deg) translateY(-4px);
}
.fan-tile:nth-child(3) {
  transform: translateY(-10px);
  z-index: 1;
}
.fan-tile:nth-child(4) {
  transform: rotate(4deg) translateY(-4px);
}
.fan-tile:nth-child(5) {
  transform: rotate(9deg) translateY(10px);
}

/* Publish: the drawn tray. */
.door-art {
  width: 55%;
  height: auto;
}

/* Make a deck: the real wordbook screen in a drawn phone frame, rising from the bottom. */
.door-phone {
  position: absolute;
  top: 12%;
  width: 56%;
  height: auto;
  border: var(--border);
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  box-shadow: 6px 6px 0 var(--ink);
  background: var(--paper);
}

.deck-card[hidden] {
  display: none;
}
.deck-empty {
  color: var(--ink-faint);
}

/* ---------- Hub hero: copy left, a spill of stickers right ---------- */
.hub-head-inner {
  display: grid;
  gap: 24px;
  align-items: center;
}
@media (min-width: 900px) {
  .hub-head-inner {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  }
}
.hub-spill {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 0;
  max-width: 520px;
  margin-inline: auto;
}
.spill-tile {
  display: block;
  margin: 0 -6px;
}
.spill-tile img,
.spill-tile .sticker-letter {
  width: 104px;
  height: 104px;
  padding: 8px;
  border: var(--border);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  object-fit: contain;
}
.spill-tile:nth-child(8n + 1) {
  transform: rotate(-7deg);
}
.spill-tile:nth-child(8n + 2) {
  transform: rotate(5deg) translateY(10px);
}
.spill-tile:nth-child(8n + 3) {
  transform: rotate(-3deg) translateY(-6px);
}
.spill-tile:nth-child(8n + 4) {
  transform: rotate(8deg) translateY(4px);
}
.spill-tile:nth-child(8n + 5) {
  transform: rotate(4deg) translateY(-8px);
}
.spill-tile:nth-child(8n + 6) {
  transform: rotate(-6deg) translateY(6px);
}
.spill-tile:nth-child(8n + 7) {
  transform: rotate(3deg);
}
.spill-tile:nth-child(8n + 8) {
  transform: rotate(-5deg) translateY(8px);
}
@media (max-width: 519px) {
  .spill-tile img,
  .spill-tile .sticker-letter {
    width: 76px;
    height: 76px;
    padding: 6px;
    border-radius: 14px;
  }
  .spill-tile:nth-child(n + 7) {
    display: none;
  }
}

/* ---------- Deck page hero ---------- */
.deck-hero-inner {
  display: grid;
  gap: 28px;
  align-items: center;
}
@media (min-width: 900px) {
  .deck-hero-inner {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  }
}
.deck-collage {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 0;
  max-width: 460px;
  margin-inline: auto;
}
.collage-tile {
  display: block;
  margin: 0 -8px;
}
.collage-tile img,
.deck-collage-letter {
  width: 120px;
  height: 120px;
  padding: 10px;
  border: var(--border);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  object-fit: contain;
}
.deck-collage-letter {
  display: grid;
  place-items: center;
  font: 400 3.2rem/1 var(--font-display);
  color: var(--coral-deep);
}
.collage-tile:nth-child(6n + 1) {
  transform: rotate(-6deg) translateY(6px);
}
.collage-tile:nth-child(6n + 2) {
  transform: rotate(4deg) translateY(-8px);
}
.collage-tile:nth-child(6n + 3) {
  transform: rotate(-3deg) translateY(4px);
}
.collage-tile:nth-child(6n + 4) {
  transform: rotate(5deg) translateY(-2px);
}
.collage-tile:nth-child(6n + 5) {
  transform: rotate(-5deg) translateY(8px);
}
.collage-tile:nth-child(6n + 6) {
  transform: rotate(3deg) translateY(-6px);
}
@media (max-width: 519px) {
  .collage-tile img,
  .deck-collage-letter {
    width: 86px;
    height: 86px;
    padding: 7px;
    border-radius: 16px;
  }
  .deck-collage-letter {
    font-size: 2.4rem;
  }
}

.deck-get {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  margin-top: clamp(18px, 3vw, 28px);
}
.btn.deck-download {
  background: var(--coral);
  font-size: 1.15rem;
  padding: 0 24px;
  min-height: 56px;
}
.deck-size {
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.14);
  font-size: 0.8em;
  font-weight: 600;
}
.deck-install-note {
  margin: 0 0 8px;
  font-weight: 700;
  color: var(--ink-soft);
}
.deck-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.deck-badges .store-badge img {
  height: 40px;
}

/* ---------- Deck page body ---------- */
.deck-howto {
  display: grid;
  gap: 14px;
}
@media (min-width: 640px) {
  .deck-howto {
    grid-template-columns: 1fr 1fr;
  }
}
.deck-howto-card h3 {
  margin: 0;
  font: 400 1.4rem/1.1 var(--font-display);
}
.deck-howto-card p {
  margin: 0;
}
.deck-hint {
  color: var(--ink-faint);
  font-size: 1rem;
}
.deck-meta {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
  font-weight: 600;
}
@media (min-width: 640px) {
  .deck-hint {
    font-size: 0.92rem;
  }
}

/* Sample cards: the app's wordbook tile. */
.deck-samples {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 760px) {
  .deck-samples {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.deck-sample {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 12px 16px;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.deck-sample-sticker,
.deck-sample-letter {
  width: 112px;
  height: 112px;
  object-fit: contain;
}
.deck-sample-letter {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--coral-100);
  font: 400 3.4rem/1 var(--font-display);
  color: var(--coral-deep);
}
.deck-sample-word {
  font-weight: 800;
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}
.deck-sample-gloss {
  color: var(--ink-soft);
  font-size: 1rem;
  overflow-wrap: anywhere;
}
@media (min-width: 640px) {
  .deck-sample-gloss {
    font-size: 0.92rem;
  }
}

.deck-about p {
  max-width: 68ch;
}
.deck-changes summary {
  cursor: pointer;
  font-weight: 700;
}
.deck-share {
  margin-top: 18px;
}

/* ---------- /community/make: two ways, two image-first cards ---------- */
.make-ways {
  display: grid;
  gap: 20px;
}
@media (min-width: 760px) {
  .make-ways {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
}
.make-way {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 14px 18px;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}
.make-way-window {
  aspect-ratio: 5 / 3;
}
.make-way-title {
  margin: 4px 0 0;
  font: 400 1.6rem/1.05 var(--font-display);
}
.make-way-line {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.45;
  text-wrap: pretty;
}
.make-way-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}
.make-way > .make-way-btn {
  margin-top: auto;
  align-self: flex-start;
}
.make-way-btn {
  min-height: 44px;
}

/* The three taps, icon and label only. */
.make-taps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.make-tap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.make-tap-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: var(--border);
  border-radius: 14px;
  background: var(--sun-100);
  color: var(--ink);
}
.make-tap-icon svg {
  width: 26px;
  height: 26px;
}
.make-grid {
  display: grid;
  grid-template-columns: repeat(3, 8px);
  gap: 3px;
}
.make-grid span {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--ink);
}
.make-grid span:nth-child(1),
.make-grid span:nth-child(5) {
  background: var(--coral);
}
.make-grid span:nth-child(2),
.make-grid span:nth-child(6) {
  background: var(--mint-deep);
}
.make-grid span:nth-child(3),
.make-grid span:nth-child(4) {
  background: var(--sun-deep);
}
.make-tap-label {
  font: 700 0.9rem/1.2 var(--font-body);
}
.make-tap-n {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-right: 6px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-size: 0.75rem;
  vertical-align: 2px;
}
.make-install {
  margin-top: 26px;
}

/* Wordbook tiles from real stickers: a fan for the wordbook, a reply row under the ask. */
.sticker-tiles {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sticker-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 30%;
  padding: 8px 6px 8px;
  border: var(--border);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
}
.sticker-tile img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
}
.sticker-tile b {
  max-width: 100%;
  overflow: hidden;
  font: 400 0.78rem/1.15 var(--font-display);
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sticker-tile i {
  color: var(--ink-soft);
  font-size: 0.66rem;
  font-style: normal;
}
/* The fan: five tiles, the outer ones tilted and tucked behind, like the deck doors. */
.sticker-tiles--fan {
  position: absolute;
  inset: 0;
  align-items: center;
  padding: 0 4%;
}
.sticker-tiles--fan .sticker-tile {
  width: 27%;
  margin: 0 -3.5%;
  transform-origin: bottom center;
}
.sticker-tiles--fan .sticker-tile:nth-child(1) {
  transform: rotate(-14deg) translateY(10%);
  z-index: 1;
}
.sticker-tiles--fan .sticker-tile:nth-child(2) {
  transform: rotate(-7deg) translateY(4%);
  z-index: 2;
}
.sticker-tiles--fan .sticker-tile:nth-child(3) {
  z-index: 3;
  background: var(--coral-100);
}
.sticker-tiles--fan .sticker-tile:nth-child(4) {
  transform: rotate(7deg) translateY(4%);
  z-index: 2;
}
.sticker-tiles--fan .sticker-tile:nth-child(5) {
  transform: rotate(14deg) translateY(10%);
  z-index: 1;
}

/* The conversation: the ask as a pill, the cards as the reply. */
.make-chat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 88%;
}
.make-bubble {
  display: block;
  padding: 9px 14px;
  border: var(--border);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
  font: 600 0.82rem/1.3 var(--font-body);
}
.make-bubble--ask {
  align-self: flex-end;
  max-width: 88%;
  border-bottom-right-radius: 4px;
  background: var(--sun);
}
.make-bubble--ask b {
  color: var(--coral-deep);
}
.sticker-tiles--reply {
  gap: 6px;
  align-self: flex-start;
  width: 90%;
}
.sticker-tiles--reply .sticker-tile {
  width: 26%;
  padding: 6px 4px;
}

/* ---------- The whole deck: tools, tiles, dialog ---------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.deck-breakdown {
  margin: 4px 0 16px;
  color: var(--ink-soft);
  font-weight: 600;
}
.deck-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 18px;
}
.deck-search {
  flex: 1 1 240px;
}
.deck-search input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: var(--border);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
  font: 600 1rem/1 var(--font-body);
  color: var(--ink);
}
.deck-search input:focus-visible {
  outline: 3px solid var(--coral-deep);
  outline-offset: 3px;
}
.deck-tools .deck-filters {
  margin: 0;
}
.deck-shown {
  margin: 0;
  color: var(--ink-faint);
  font-size: 0.95rem;
}
.deck-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 640px) {
  .deck-tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 980px) {
  .deck-tiles {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
.deck-tile {
  position: relative;
}
.deck-tile[hidden] {
  display: none;
}
.deck-tile-open {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  height: 100%;
  padding: 12px 10px 14px;
  border: var(--border);
  border-radius: var(--radius-sm);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  font: inherit;
  color: inherit;
  text-align: center;
  cursor: pointer;
  transition:
    transform 90ms ease,
    box-shadow 90ms ease;
}
.deck-tile-open:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--ink);
}
.deck-tile-open:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}
.deck-tile-open:focus-visible {
  outline: 3px solid var(--coral-deep);
  outline-offset: 3px;
}
.deck-tile-sticker,
.deck-tile-letter {
  width: 80px;
  height: 80px;
  object-fit: contain;
}
.deck-tile-letter {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--coral-100);
  font: 400 2.4rem/1 var(--font-display);
  color: var(--coral-deep);
}
.deck-tile-word {
  font-weight: 800;
  font-size: 1rem;
  overflow-wrap: anywhere;
}
.deck-tile-gloss {
  color: var(--ink-soft);
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}
.deck-say {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--sun);
  color: var(--ink);
  cursor: pointer;
  vertical-align: middle;
}
.deck-say svg {
  width: 18px;
  height: 18px;
}
.deck-say:hover {
  background: var(--sun-deep);
}
.deck-say:focus-visible {
  outline: 3px solid var(--coral-deep);
  outline-offset: 2px;
}
.deck-tile-say {
  position: absolute;
  top: 8px;
  right: 8px;
}
.no-speech .deck-say {
  display: none;
}

.deck-dialog {
  width: min(92vw, 520px);
  padding: 22px 22px 18px;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-lg);
  color: var(--ink);
}
.deck-dialog::backdrop {
  background: rgba(26, 21, 18, 0.55);
}
.deck-dialog-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.deck-dialog-sticker,
.deck-dialog-letter {
  width: 160px;
  height: 160px;
  object-fit: contain;
}
.deck-dialog-letter {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--coral-100);
  font: 400 5rem/1 var(--font-display);
  color: var(--coral-deep);
}
.deck-dialog-word {
  margin: 6px 0 0;
  font: 400 2.1rem/1.1 var(--font-display);
}
.deck-dialog-gloss {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.deck-dialog-say {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 4px 0 0;
}
.deck-dialog-reading {
  color: var(--ink-faint);
}
.deck-dialog-pos {
  padding: 4px 10px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  font-size: 0.85rem;
  font-weight: 700;
}
/* The app's BrutalIconChip: paper face, ink border, hard shadow; filled when "on". */
.deck-chip {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
  color: var(--ink);
  cursor: pointer;
  transition:
    transform 90ms ease,
    box-shadow 90ms ease;
}
.deck-chip svg {
  width: 20px;
  height: 20px;
}
.deck-chip:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}
.deck-chip:focus-visible {
  outline: 3px solid var(--coral-deep);
  outline-offset: 2px;
}
.deck-chip--on {
  background: var(--coral);
  color: var(--paper);
}
.deck-dialog-pronounce,
.deck-example-say {
  background: var(--sun);
}

/* Examples: heading with the two reading chips, then one row per sentence. */
.deck-examples {
  width: 100%;
  margin-top: 16px;
  text-align: left;
}
.deck-examples-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.deck-examples-title {
  margin: 0;
  font: 400 1.25rem/1.1 var(--font-display);
}
.deck-examples-controls {
  display: flex;
  gap: 8px;
}
.deck-example {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 12px 12px 14px;
  margin-bottom: 10px;
  border: var(--border);
  border-radius: var(--radius-sm);
  background: var(--sun-100);
}
.deck-example-text {
  flex: 1 1 auto;
  min-width: 0;
}
.deck-example-say {
  flex-shrink: 0;
  margin-top: 2px;
}
.deck-example-source {
  margin: 0;
  font-size: calc(1.15rem * var(--example-scale, 1));
  font-weight: 500;
  line-height: 1.6;
}
.deck-example-target {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: calc(1rem * var(--example-scale, 1));
  font-style: italic;
  line-height: 1.5;
}
.deck-examples[data-scale="small"] {
  --example-scale: 0.9;
}
.deck-examples[data-scale="medium"] {
  --example-scale: 1;
}
.deck-examples[data-scale="large"] {
  --example-scale: 1.2;
}
.deck-examples.translations-hidden .deck-example-target {
  display: none;
}

/* Words: the spoken or tapped one fills like the app's highlight block. */
.deck-word {
  display: inline;
  padding: 0 3px;
  border: 0;
  border-radius: 6px;
  background: none;
  font: inherit;
  color: inherit;
}
.deck-word-wrap {
  padding: 0 3px;
  white-space: nowrap;
}
.deck-word-wrap .deck-word {
  padding: 0;
}
.deck-word--tappable {
  cursor: pointer;
}
.deck-word--tappable:hover {
  background: var(--sun);
}
.deck-word.is-spoken,
.deck-word--selected {
  background: var(--coral);
  color: var(--paper);
  box-shadow: 0 0 0 2px var(--ink);
}

/* The meaning dock, under the tapped word's sentence. */
.deck-dock {
  position: relative;
  margin: 6px 0 12px;
  padding: 12px 14px;
  border: var(--border);
  border-radius: var(--radius-sm);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  --tail-x: 24px;
}
/* The tail: an ink triangle with a paper one on top, aimed at the tapped word. */
.deck-dock::before,
.deck-dock::after {
  content: "";
  position: absolute;
  left: var(--tail-x);
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-style: solid;
}
.deck-dock::before {
  top: -13px;
  border-width: 0 12px 13px 12px;
  border-color: transparent transparent var(--ink) transparent;
}
.deck-dock::after {
  top: -9px;
  border-width: 0 9px 10px 9px;
  border-color: transparent transparent var(--paper) transparent;
}
.deck-dock[hidden] {
  display: none;
}
.deck-dock-word {
  margin: 0;
  font-weight: 800;
}
.deck-dock-meanings {
  margin: 4px 0 0;
  color: var(--ink-soft);
}
.deck-dock-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 0;
}
.deck-dock-chip {
  padding: 2px 8px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--mint-100);
  font-size: 0.8rem;
  font-weight: 700;
}

.deck-dialog-nav {
  margin: 16px 0 10px;
  color: var(--ink-faint);
  font-size: 0.9rem;
  text-align: center;
}
@media (max-width: 639px) {
  .deck-dialog-nav {
    display: none;
  }
}
.deck-dialog-close {
  display: block;
  margin-inline: auto;
}
.deck-whatsnew-title {
  margin: 18px 0 6px;
  font: 400 1.3rem/1.1 var(--font-display);
}
.deck-whatsnew {
  max-width: 68ch;
  padding-left: 20px;
}

/* ---------- Catalog tools: search, chip groups, sort ---------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.deck-catalog-tools {
  margin: 18px 0 10px;
}
.deck-sort {
  flex: 0 0 auto;
}
.deck-sort select {
  min-height: 48px;
  padding: 0 40px 0 16px;
  border: var(--border);
  border-radius: 999px;
  background: var(--paper)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1512' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 14px center / 16px;
  box-shadow: 3px 3px 0 var(--ink);
  font: 700 1rem/1 var(--font-body);
  color: var(--ink);
  appearance: none;
  cursor: pointer;
}
.deck-sort select:focus-visible {
  outline: 3px solid var(--coral-deep);
  outline-offset: 3px;
}
.deck-filter-groups {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}
.deck-filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
}
.deck-filter-group .deck-filters {
  margin: 0;
}
.deck-filter-label {
  flex: 0 0 100%;
  font: 700 0.85rem/1 var(--font-body);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
@media (min-width: 640px) {
  .deck-filter-label {
    flex: 0 0 96px;
  }
}
.deck-catalog-head .deck-shown {
  margin: 4px 0 0;
}
.link-button {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--coral-deep);
  text-decoration: underline;
  cursor: pointer;
}
.deck-first {
  padding: 28px 24px;
  border: var(--border);
  border-radius: 24px;
  background: var(--sun-100);
  box-shadow: 6px 6px 0 var(--ink);
}
.deck-first h2 {
  margin: 0 0 8px;
  font: 400 1.6rem/1.15 var(--font-display);
}
.deck-first p {
  margin: 0;
  color: var(--ink-soft);
}
.deck-first a {
  color: var(--coral-deep);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Hub: the spill of real stickers and the door windows ---------- */
.hub-door-window {
  aspect-ratio: 5 / 3;
}
.sticker-tiles--spill {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  max-width: 520px;
  margin-inline: auto;
  padding: 12px 6px;
}
.sticker-tiles--spill .sticker-tile {
  width: auto;
}
.sticker-tiles--spill .sticker-tile:nth-child(8n + 1) {
  transform: rotate(-7deg);
}
.sticker-tiles--spill .sticker-tile:nth-child(8n + 2) {
  transform: rotate(5deg) translateY(10px);
}
.sticker-tiles--spill .sticker-tile:nth-child(8n + 3) {
  transform: rotate(-3deg) translateY(-6px);
}
.sticker-tiles--spill .sticker-tile:nth-child(8n + 4) {
  transform: rotate(8deg) translateY(4px);
}
.sticker-tiles--spill .sticker-tile:nth-child(8n + 5) {
  transform: rotate(4deg) translateY(-4px);
}
.sticker-tiles--spill .sticker-tile:nth-child(8n + 6) {
  transform: rotate(-6deg) translateY(8px);
}
.sticker-tiles--spill .sticker-tile:nth-child(8n + 7) {
  transform: rotate(6deg);
}
.sticker-tiles--spill .sticker-tile:nth-child(8n + 8) {
  transform: rotate(-4deg) translateY(6px);
}
.hub-spill .sticker-tiles--spill {
  padding-top: 0;
}
.make-publish {
  max-width: 60ch;
  margin: 22px 0 0;
  font-weight: 600;
}
.make-publish a {
  color: var(--coral-deep);
}
