/* ══ Library in the Totem system (docs/design/totem/) ══
   Standalone: covers everything library.js and shared/dialog.js render.
   Painted scrap-wood offcuts on a gesso ground. Wood holds content,
   paint means something: signal red is Host (the one red action),
   yellow is the selected chip, green marks done. Motion is the 120ms
   interaction-only ease from shared/totem.css. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--t-body, 'DM Sans', Arial, sans-serif);
  background: var(--t-gesso, #F2EEE5);
  color: var(--t-ink, #2A2620);
  min-height: 100vh;
}

a { color: var(--t-ink, #2A2620); }
a:hover { color: var(--t-red, #E5482B); }

.page {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  padding: 26px 32px 40px;
}

/* ── Header: block wordmark + quiet return link ── */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.wordmark {
  display: flex;
  gap: 5px;
  align-items: flex-end;
  text-decoration: none;
}

.wordmark span {
  display: inline-block;
  font-family: var(--t-display, 'Bricolage Grotesque', sans-serif);
  font-weight: 800;
  font-size: 17px;
  padding: 4px 8px 6px;
  box-shadow: 0 2px 4px rgba(50, 35, 15, 0.30);
  transform: rotate(var(--rot, 0deg));
}

.wm-jam {
  background: var(--t-birch, #E3C8A0);
  background-image: var(--t-grain);
  color: var(--t-ink, #2A2620);
  --rot: -2deg;
}

.wm-yard {
  background: var(--t-red, #E5482B);
  color: var(--t-paper, #FDF9F0);
  --rot: 1.5deg;
}

.back-link {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--t-muted-caps, #8A7B62);
  text-decoration: none;
}

.back-link:hover { color: var(--t-ink, #2A2620); }

/* ── The headline ── */
.spoken {
  font-family: var(--t-display, 'Bricolage Grotesque', sans-serif);
  font-weight: 800;
  font-size: clamp(26px, 3.4vw, 34px);
  line-height: 1.12;
  color: var(--t-ink, #2A2620);
  max-width: 640px;
  text-wrap: balance;
  margin-bottom: 20px;
}

/* ── Motion: pieces lift on hover, 120ms, interaction-only ── */
.snap { transition: transform 120ms cubic-bezier(0.4, 0, 0.2, 1); }

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

/* Painted action pieces (shared look for card actions and dialogs) */
.game-card-actions a,
.game-card-actions button,
.recipe-cancel-btn,
.recipe-create-btn,
#build-your-own-btn,
.owner-bar-exit,
.class-line-change,
.teacher-setup-save,
.teacher-setup-skip {
  border: none;
  text-decoration: none;
  background: var(--t-paper, #FDF9F0);
  color: var(--t-ink, #2A2620);
  box-shadow: 0 3px 4px rgba(50, 35, 15, 0.20);
  padding: 8px 14px 9px;
  font-family: var(--t-display, 'Bricolage Grotesque', sans-serif);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transform: rotate(var(--rot, 0deg));
  transition: transform 120ms cubic-bezier(0.4, 0, 0.2, 1);
}

.game-card-actions a:hover,
.game-card-actions button:hover,
.recipe-cancel-btn:hover,
.recipe-create-btn:hover:not(:disabled),
#build-your-own-btn:hover,
.owner-bar-exit:hover,
.class-line-change:hover,
.teacher-setup-save:hover,
.teacher-setup-skip:hover {
  transform: rotate(var(--rot, 0deg)) translateY(-4px);
  color: var(--t-ink, #2A2620);
}

/* ── Search + goal chips ── */
#library-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

#library-controls[hidden] { display: none; }

/* The search is a sanded plank with a pencil line */
#library-search {
  flex: 1 1 220px;
  max-width: 320px;
  border: none;
  background: var(--t-sanded, #EAD9BA);
  background-image: var(--t-grain);
  border-bottom: 3px dashed rgba(110, 75, 40, 0.45);
  padding: 11px 14px 9px;
  font-family: var(--t-body, 'DM Sans', Arial, sans-serif);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--t-ink, #2A2620);
  transform: rotate(0.4deg);
}

#library-search::placeholder { color: #8A7455; font-weight: 500; }

#library-search:focus {
  outline: none;
  box-shadow: inset 0 0 0 3px var(--t-ink, #2A2620);
}

#goal-chips,
#time-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.goal-chip {
  border: none;
  background: var(--t-paper, #FDF9F0);
  box-shadow: 0 3px 4px rgba(50, 35, 15, 0.18);
  padding: 9px 14px 11px;
  font-family: var(--t-display, 'Bricolage Grotesque', sans-serif);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--t-muted-caps, #8A7B62);
  cursor: pointer;
  transition: transform 120ms cubic-bezier(0.4, 0, 0.2, 1);
}

.goal-chip:nth-child(odd) { transform: rotate(-0.8deg); }
.goal-chip:nth-child(even) { transform: rotate(0.7deg); }

.goal-chip:nth-child(odd):hover { transform: rotate(-0.8deg) translateY(-4px); }
.goal-chip:nth-child(even):hover { transform: rotate(0.7deg) translateY(-4px); }

/* Selected chip is a yellow painted chip: yellow = now */
.goal-chip.active {
  background: var(--t-yellow, #FFC800);
  background-image: var(--t-grain);
  color: var(--t-ink, #2A2620);
}

/* ── Messages ── */
#loading-message,
#error-message,
.empty-message {
  font-size: 1rem;
  font-weight: 500;
  color: var(--t-muted, #6B6250);
  text-align: center;
  margin: 40px 0 8px;
}

/* ── Sections ── */
#library-grid {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.games-section-heading {
  font-family: var(--t-body, 'DM Sans', Arial, sans-serif);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--t-muted-caps, #8A7B62);
  margin: 10px 0 -6px;
}

.games-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}

/* ── Activity cards: paper boards on the gesso ── */
.game-card {
  position: relative;
  background: var(--t-paper, #FDF9F0);
  box-shadow: 0 4px 6px rgba(50, 35, 15, 0.20);
  padding: 22px 24px 20px;
  display: flex;
  flex-direction: column;
}

.games-section-grid > .game-card:nth-child(3n+1) { transform: rotate(-0.4deg); }
.games-section-grid > .game-card:nth-child(3n+2) { transform: rotate(0.3deg); }
.games-section-grid > .game-card:nth-child(3n) { transform: rotate(0.5deg); }

/* Your own copies sit on birch */
.game-card-user {
  background: var(--t-birch, #E3C8A0);
  background-image: var(--t-grain);
}

/* Fresh-copy highlight: where ?highlight= lands after Customize saves a
   copy. A brief flash draws the eye, then the outline stays put. */
.game-card-highlight {
  outline: 3px solid var(--t-ink, #2A2620);
  outline-offset: 3px;
  animation: card-highlight-flash 1.1s steps(2, end) 2;
}
@keyframes card-highlight-flash {
  50% { outline-color: rgba(42, 38, 32, 0.15); }
}
@media (prefers-reduced-motion: reduce) {
  .game-card-highlight { animation: none; }
}

.game-card-name {
  font-family: var(--t-display, 'Bricolage Grotesque', sans-serif);
  font-weight: 800;
  font-size: 21px;
  line-height: 1.16;
  color: var(--t-ink, #2A2620);
  margin-bottom: 6px;
}

.game-card-description {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--t-muted, #6B6250);
  margin-bottom: 12px;
}

.library-card .game-card-description { min-height: 3.6em; flex: 1; }

.game-card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.game-card-meta-badge {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--t-muted-caps, #8A7B62);
}

.game-card-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.game-card-tag {
  background: var(--t-gesso, #F2EEE5);
  padding: 3px 9px 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--t-muted, #6B6250);
}

.game-card-no-winner {
  align-self: flex-start;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--t-muted-caps, #8A7B62);
}

/* ── Card actions: Host is the one signal-red block ── */
.game-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
  align-items: center;
}

.game-card-host {
  background: var(--t-red, #E5482B) !important;
  color: var(--t-paper, #FDF9F0) !important;
  --rot: -0.8deg;
  clip-path: polygon(2% 8%, 98% 0, 100% 90%, 0 100%);
}

.game-card-host:hover {
  color: var(--t-paper, #FDF9F0) !important;
}

.library-host {
  font-size: 14px !important;
  padding: 10px 18px 12px !important;
}

/* Untouched activities show one door: Customize takes the red block
   that Host wears once the activity has been tried. */
.game-card-actions .game-card-customize-only {
  background: var(--t-red, #E5482B);
  color: var(--t-paper, #FDF9F0);
  --rot: -0.8deg;
  clip-path: polygon(2% 8%, 98% 0, 100% 90%, 0 100%);
  font-size: 14px;
  padding: 10px 18px 12px;
}

.game-card-actions .game-card-customize-only:hover {
  color: var(--t-paper, #FDF9F0);
}

.game-card-fav {
  font-family: var(--t-body, 'DM Sans', Arial, sans-serif) !important;
  font-size: 15px !important;
  line-height: 1;
  padding: 7px 11px !important;
}

/* A favorited heart sits on yellow: marked as yours */
.game-card-fav.is-fav {
  background: var(--t-yellow, #FFC800);
  background-image: var(--t-grain);
  color: var(--t-ink, #2A2620);
}

.game-card-actions .game-card-delete {
  margin-left: auto;
  font-family: var(--t-body, 'DM Sans', Arial, sans-serif) !important;
  font-weight: 700;
  font-size: 12px !important;
  color: var(--t-muted, #6B6250);
  box-shadow: 0 2px 3px rgba(50, 35, 15, 0.16);
}

.game-card-delete:hover { color: var(--t-ink, #2A2620); }

/* Put in the shed: quiet like Delete, but it isn't destructive */
.game-card-actions .game-card-share,
.game-card-actions .game-card-shed {
  font-family: var(--t-body, 'DM Sans', Arial, sans-serif) !important;
  font-weight: 700;
  font-size: 12px !important;
  color: var(--t-muted, #6B6250);
  box-shadow: 0 2px 3px rgba(50, 35, 15, 0.16);
}

.game-card-share:hover,
.game-card-shed:hover { color: var(--t-ink, #2A2620); }

/* Owner curation star */
.game-card-star {
  align-self: flex-start;
  margin-top: 12px;
  border: none;
  background: var(--t-paper, #FDF9F0);
  box-shadow: 0 2px 3px rgba(50, 35, 15, 0.20);
  padding: 7px 14px 8px;
  font-family: var(--t-body, 'DM Sans', Arial, sans-serif);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--t-ink, #2A2620);
  cursor: pointer;
  transition: transform 120ms cubic-bezier(0.4, 0, 0.2, 1);
}

.game-card-star:hover { transform: translateY(-3px); }

.game-card-star.is-featured {
  background: var(--t-ink, #2A2620);
  color: var(--t-paper, #FDF9F0);
}

/* ── Owner bar: the ink panel ── */
.owner-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--t-ink, #2A2620);
  transform: rotate(0.25deg);
  box-shadow: 0 4px 6px rgba(50, 35, 15, 0.28);
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--t-paper, #FDF9F0);
}

.owner-bar a { color: var(--t-yellow, #FFC800); }
.owner-bar a:hover { color: var(--t-paper, #FDF9F0); }

/* ── Search rescue: honest any-subject note ── */
.search-rescue {
  background: var(--t-paper, #FDF9F0);
  transform: rotate(-0.3deg);
  box-shadow: 0 4px 6px rgba(50, 35, 15, 0.18);
  padding: 18px 24px;
}

.search-rescue-head {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.search-rescue-body {
  font-weight: 500;
  color: var(--t-muted, #6B6250);
  margin-bottom: 8px;
}

.search-rescue-link { font-weight: 700; }

/* ── Teacher setup card + class line ── */
/* The first-visit strip (2026-09-02, slimmed from a tall card): one paper
   ribbon, the four workflow marks reading left to right, the guide link
   and a Got it at the far end. Wraps to two or three lines on narrow
   screens and stays short either way. */
.teacher-setup-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 22px;
  background: var(--t-paper, #FDF9F0);
  transform: rotate(-0.25deg);
  box-shadow: 0 4px 6px rgba(50, 35, 15, 0.20);
  padding: 10px 18px 10px 20px;
  margin-bottom: 22px;
}

.teacher-setup-title {
  font-family: var(--t-body, 'DM Sans', Arial, sans-serif);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--t-muted-caps, #8A7B62);
  margin: 0;
  white-space: nowrap;
}

/* Icon rows (2026-08-27, replaces the bullet list): one drawn mark + one
   short line each, same idiom as the designer's plan-intro dialog. */
.setup-intro-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
}

.setup-intro-row p {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--t-ink, #2A2620);
}

.teacher-setup-card .su-mark {
  width: 28px;
  height: 28px;
  transform: scale(0.8);
  transform-origin: center;
}

.teacher-setup-tail {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

/* (moved to /shared/make-it-yours.css on 2026-09-07) */

.su-mark {
  position: relative;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 3px rgba(50,35,15,0.22);
}

/* The projector: a paper screen on a green board */
.su-mark-board {
  background: var(--t-green, #2E9E44);
  transform: rotate(-1.3deg);
}

.su-mark-board::after {
  content: '';
  width: 22px;
  height: 15px;
  background: var(--t-paper, #FDF9F0);
}

/* Pick & customize: a paper card with pencil lines, on magenta */
.su-mark-pick {
  background: var(--t-magenta, #B0197E);
  transform: rotate(1.2deg);
}

.su-mark-pick::after {
  content: '';
  width: 22px;
  height: 15px;
  background:
    linear-gradient(var(--t-ink, #2A2620), var(--t-ink, #2A2620)) 4px 4px / 14px 2px no-repeat,
    linear-gradient(var(--t-ink, #2A2620), var(--t-ink, #2A2620)) 4px 9px / 9px 2px no-repeat,
    var(--t-paper, #FDF9F0);
}

/* The room code: four little letter blocks on yellow */
.su-mark-code {
  background: var(--t-yellow, #FFC800);
  background-image: var(--t-grain);
  transform: rotate(1.1deg);
}

.su-mark-code::after {
  content: '';
  width: 9px;
  height: 9px;
  background: var(--t-ink, #2A2620);
  transform: translate(-6px, -6px);
  box-shadow: 12px 0 0 var(--t-ink, #2A2620),
              0 12px 0 var(--t-ink, #2A2620),
              12px 12px 0 var(--t-ink, #2A2620);
}

/* Preview: a play wedge on cyan */
.su-mark-play {
  background: var(--t-cyan, #1BA9C4);
  transform: rotate(-0.9deg);
}

.su-mark-play::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 13px solid var(--t-paper, #FDF9F0);
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  margin-left: 3px;
}

/* "Something else" popup: one question, one box */
.subject-other-modal { max-width: 400px; }

.subject-other-modal h2 { margin: 0 0 6px; }

.subject-other-hint {
  color: #6B6250;
  margin: 0 0 14px;
}

.subject-other-input {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  font-size: 16px;
  border: 2px solid var(--t-ink, #2A2620);
  background: #fff;
  caret-color: var(--t-ink, #2A2620);
}

.subject-other-save-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.teacher-setup-guide-link {
  font-weight: 700;
  white-space: nowrap;
}

.teacher-setup-ask {
  font-weight: 500;
  color: var(--t-ink, #2A2620);
  margin: 12px 0 4px;
}

/* (moved to /shared/make-it-yours.css on 2026-09-07) */

.teacher-setup-save {
  background: var(--t-red, #E5482B);
  color: var(--t-paper, #FDF9F0);
  --rot: -0.8deg;
  clip-path: polygon(2% 8%, 98% 0, 100% 90%, 0 100%);
  padding: 10px 24px 12px;
}

.teacher-setup-save:hover { color: var(--t-paper, #FDF9F0); }

.teacher-setup-skip {
  font-family: var(--t-body, 'DM Sans', Arial, sans-serif);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}

.class-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-weight: 500;
  color: var(--t-muted, #6B6250);
  margin: 0 0 16px;
}

.class-line-change {
  font-family: var(--t-body, 'DM Sans', Arial, sans-serif);
  font-weight: 700;
  font-size: 12px;
  padding: 5px 12px 6px;
  text-transform: none;
  letter-spacing: 0;
}

/* ── Builder doorway: the dashed drop slot ── */
.builder-doorway {
  margin-top: 48px;
  text-align: center;
  padding: 8px;
}

.builder-doorway p {
  margin: 0 0 12px;
  font-weight: 500;
  color: var(--t-muted, #6B6250);
}

#build-your-own-btn {
  font-size: 13px;
  padding: 14px 28px;
  background: var(--t-gesso, #F2EEE5);
  border: 3px dashed rgba(110, 75, 40, 0.35);
  box-shadow: none;
  color: var(--t-muted-caps, #766A52);
}

#build-your-own-btn:hover {
  color: var(--t-ink, #2A2620);
  border-color: rgba(110, 75, 40, 0.6);
}

.privacy-footnote {
  text-align: center;
  margin-top: 28px;
  font-size: 0.9rem;
  font-weight: 500;
}

.privacy-footnote a { color: var(--t-muted-caps, #8A7B62); font-weight: 700; }
.privacy-footnote a:hover { color: var(--t-ink, #2A2620); }

/* (moved to /shared/make-it-yours.css on 2026-09-07) */

/* The doors that close a Make it yours dialog live in
   /shared/make-it-yours-doors.css (a preferred path since 2026-09-07). */

/* ── The yard (Totem 9g): three goal piles, painted labels below ──
   Chunky planks (CAPS name over a small meta line) on one plinth, no
   base board; the pile's label is a painted box underneath. Long names
   wrap to two lines at most, then cut off. */
.pile-shelf {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-around;
  gap: 44px 40px;
  padding: 24px 0 8px;
}

.pile-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* One flat shadow per pile; pieces inside cast none */
.pile {
  width: 214px;
  display: flex;
  flex-direction: column;
  align-items: center;
  filter: drop-shadow(5px 8px 0 rgba(80, 60, 30, 0.14));
}

/* The row wrapper carries the hover: it never moves or clips, so the
   pulled-out plank cannot jitter at the seam between two planks. */
.plank-row {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: -4px;
}

.plank-row:first-child { margin-top: 0; }

.plank {
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 12px 16px 14px;
  clip-path: polygon(0 6%, 100% 0, 98% 100%, 2% 94%);
  text-align: left;
  transition: transform 120ms cubic-bezier(0.4, 0, 0.2, 1);
}

.plank-top {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
  max-width: 100%;
}

/* Long titles get two lines at most, then cut off */
.plank-name {
  font-family: var(--t-display, 'Bricolage Grotesque', sans-serif);
  font-weight: 800;
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* The hook line: what the activity is for, readable without opening it */
.plank-hook {
  font-family: var(--t-body, 'DM Sans', Arial, sans-serif);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
  opacity: 0.82;
  margin-top: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.plank-meta {
  font-family: var(--t-body, 'DM Sans', Arial, sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.65;
}

/* Widths vary a touch (scrap wood is never uniform), tilt alternates;
   hover pulls the plank out of the pile. */
.plank-row:nth-child(even) .plank { width: 91%; }
.plank-row:nth-child(3n) .plank { width: 96%; }
.plank-row:nth-child(odd) .plank { transform: rotate(-1.2deg); }
.plank-row:nth-child(even) .plank { transform: rotate(1.1deg); }
.plank-row:nth-child(odd):hover .plank,
.plank-row:nth-child(odd):focus-within .plank { transform: rotate(-1.2deg) translateX(12px); }
.plank-row:nth-child(even):hover .plank,
.plank-row:nth-child(even):focus-within .plank { transform: rotate(1.1deg) translateX(12px); }

/* The overflow plank: quiet sanded wood, part of the pile */
.plank.plank-more {
  align-items: center;
  background: var(--t-sanded, #EAD9BA);
  background-image: var(--t-grain);
  color: var(--t-muted-wood, #6B4E2A);
  font-family: var(--t-display, 'Bricolage Grotesque', sans-serif);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 9px 16px 11px;
}

/* Painted by position: a wood/paint mix, no signal red (that is the
   popup's Customize/Host block) */
.plank-tone-0 { background: var(--t-yellow, #FFC800); background-image: var(--t-grain); color: var(--t-ink, #2A2620); }
.plank-tone-1 { background: var(--t-birch, #E3C8A0); background-image: var(--t-grain); color: var(--t-ink, #2A2620); }
.plank-tone-2 { background: var(--t-cyan, #1BA9C4); color: var(--t-paper, #FDF9F0); }
.plank-tone-3 { background: var(--t-pine, #D2B285); background-image: var(--t-grain); color: var(--t-ink, #2A2620); }
.plank-tone-4 { background: var(--t-green, #22A05A); color: var(--t-paper, #FDF9F0); }
.plank-tone-5 { background: var(--t-oak, #C29A67); background-image: var(--t-grain); color: var(--t-paper, #FDF9F0); }
.plank-tone-6 { background: var(--t-magenta, #B0197E); color: var(--t-paper, #FDF9F0); }
.plank-tone-7 { background: var(--t-orange, #F08C1E); color: var(--t-paper, #FDF9F0); }

.plank-fav { font-size: 12px; }

/* The single plinth is the whole footing (no base board, owner's call) */
.pile-plinth { width: 60%; height: 34px; margin-top: -2px; }

/* Painted label boxes below the piles (9g): a color per mood */
.pile-tag {
  margin-top: 14px;
  font-family: var(--t-display, 'Bricolage Grotesque', sans-serif);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 14px 7px;
  box-shadow: 0 2px 3px rgba(50, 35, 15, 0.25);
}

.pile-tag-connect { background: var(--t-yellow, #FFC800); background-image: var(--t-grain); color: var(--t-ink, #2A2620); transform: rotate(-1deg); }
.pile-tag-think { background: var(--t-green, #22A05A); color: var(--t-paper, #FDF9F0); transform: rotate(1deg); }
.pile-tag-play { background: var(--t-sanded, #EAD9BA); background-image: var(--t-grain); color: var(--t-ink, #2A2620); transform: rotate(-1deg); }
.pile-tag-mine { background: var(--t-birch, #E3C8A0); background-image: var(--t-grain); color: var(--t-ink, #2A2620); transform: rotate(0.8deg); }

/* ── My yard: recents, hearts, and your copies on one long board ── */
.myyard-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 14px;
}

.myyard {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  filter: drop-shadow(5px 8px 0 rgba(80, 60, 30, 0.14));
}

.myyard-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: center;
  gap: 0 6px;
  max-width: 820px;
}

.plank-mini {
  border: none;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 8px 14px 10px;
  margin-bottom: -3px;
  clip-path: polygon(0 8%, 100% 0, 99% 94%, 1% 100%);
  font-family: var(--t-display, 'Bricolage Grotesque', sans-serif);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform 120ms cubic-bezier(0.4, 0, 0.2, 1);
}

.plank-mini:nth-child(odd) { transform: rotate(-1deg); }
.plank-mini:nth-child(even) { transform: rotate(0.8deg); }
.plank-mini:nth-child(odd):hover,
.plank-mini:nth-child(odd):focus-visible { transform: rotate(-1deg) translateY(-4px); }
.plank-mini:nth-child(even):hover,
.plank-mini:nth-child(even):focus-visible { transform: rotate(0.8deg) translateY(-4px); }

.plank-mini .plank-name {
  display: block;
  -webkit-line-clamp: unset;
  font-size: 13px;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.myyard-board {
  width: min(100%, 860px);
  height: 14px;
  background: var(--t-base, #8F6438);
  background-image: var(--t-grain);
}

/* ── The shed: put-away activities behind one quiet line ── */
.myyard-note {
  margin: 8px 0 0;
  max-width: 520px;
  text-align: center;
  font-family: var(--t-body, 'DM Sans', Arial, sans-serif);
  font-size: 12px;
  color: var(--t-muted-caps, #8A7B62);
}

.shed-toggle {
  border: none;
  background: none;
  cursor: pointer;
  margin-top: 8px;
  padding: 4px 10px;
  font-family: var(--t-body, 'DM Sans', Arial, sans-serif);
  font-size: 13px;
  font-weight: 700;
  color: var(--t-muted, #6B6250);
}

.shed-toggle:hover,
.shed-toggle:focus-visible { color: var(--t-ink, #2A2620); }

.shed-row {
  margin-top: 6px;
  opacity: 0.7;
}

/* ── The plank popup ── */
.activity-dialog { max-width: 460px; }

.activity-dialog-name {
  display: inline-block;
  font-family: var(--t-display, 'Bricolage Grotesque', sans-serif);
  font-weight: 800;
  font-size: 24px;
  line-height: 1.1;
  color: var(--t-paper, #FDF9F0);
  background: var(--t-magenta, #B0197E);
  padding: 3px 14px 7px;
  transform: rotate(-1.2deg);
  box-shadow: 0 3px 4px rgba(50, 35, 15, 0.28);
  margin: 0 44px 12px 0;
}

.activity-dialog-meta {
  font-size: 13px;
  font-weight: 700;
  color: var(--t-muted-caps, #8A7B62);
  margin-bottom: 10px;
}

.activity-dialog-desc {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.55;
  color: var(--t-ink, #2A2620);
}

.activity-dialog-actions { margin-top: 18px; }

/* The plank hover card lives in /shared/hover-card.css (shared with the
   home shelf). */

@media (max-width: 700px) {
  .page { padding: 20px 16px 32px; }
  .wordmark span { font-size: 14px; padding: 3px 6px 5px; }
  .games-section-grid { grid-template-columns: 1fr; }
  .pile-shelf { gap: 30px 24px; justify-content: center; }
}

/* Small text on the bright paints reads in ink (contrast 5.4, 4.5 and 6.1
   to 1 on cyan, green, orange); magenta keeps paper at full opacity (6.1).
   Names stay paper: at their size the lower large-text bar applies. */
.plank-tone-2 .plank-meta, .plank-tone-4 .plank-meta, .plank-tone-7 .plank-meta,
.plank-tone-2 .plank-hook, .plank-tone-4 .plank-hook, .plank-tone-7 .plank-hook {
  color: #1A1612;
  opacity: 1;
}
.plank-tone-6 .plank-meta, .plank-tone-6 .plank-hook { opacity: 1; }
