/* St. Edward Kanban — skeuomorphic corkboard.
   The design target is the photo of the physical board in the parish office:
   aluminum frame, cork, lined index cards in four card-stock colors, pushpins,
   orange sticky column headers, handwritten marker lettering. */

* { box-sizing: border-box; }

:root {
  --wall: #a9b3bf;
  --cork: #b78d5f;
  --marker: #26292e;
  --orange: #ffb01f;
  --hand: "Patrick Hand", "Comic Sans MS", cursive;
  --marker-font: "Caveat", "Comic Sans MS", cursive;
}

html, body {
  margin: 0;
  min-height: 100%;
  background: linear-gradient(180deg, #b4bdc9, var(--wall));
  font-family: var(--hand);
  color: var(--marker);
}

/* ---------- frame + cork ---------- */

.board-frame {
  max-width: 1280px;
  margin: 24px auto 48px;
  padding: 10px;
  border-radius: 6px;
  background: linear-gradient(175deg, #f4f5f7 0%, #d4d6da 30%, #b7b9bf 70%, #dcdee2 100%);
  box-shadow: 0 18px 40px rgba(30, 34, 40, 0.45), 0 2px 6px rgba(30, 34, 40, 0.3);
}

.board {
  position: relative;
  border-radius: 2px;
  padding: 18px 20px 96px;
  background-color: var(--cork);
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(255, 244, 214, 0.18), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='340' height='340'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.055' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.30 0 0 0 0 0.18 0 0 0 0 0.08 0 0 0 0.18 0'/%3E%3C/filter%3E%3Crect width='340' height='340' filter='url(%23m)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4'/%3E%3CfeColorMatrix values='0 0 0 0 0.36 0 0 0 0 0.24 0 0 0 0 0.12 0 0 0 0.42 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  box-shadow: inset 0 0 60px rgba(70, 42, 16, 0.5), inset 0 0 8px rgba(70, 42, 16, 0.6);
}

/* ---------- pushpins ---------- */

.pin {
  position: absolute;
  top: -9px;
  left: 50%;
  width: 17px;
  height: 17px;
  margin-left: -9px;
  border-radius: 50%;
  z-index: 2;
  box-shadow: 0 1px 1px rgba(255, 255, 255, 0.5) inset,
              2px 7px 4px -3px rgba(40, 20, 5, 0.45);
  background-image:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0) 42%),
    radial-gradient(circle at 50% 115%, rgba(0, 0, 0, 0.3), transparent 55%);
}
.pin::after { /* the little needle shadow slipping under the card */
  content: "";
  position: absolute;
  left: 7px;
  top: 15px;
  width: 3px;
  height: 5px;
  background: rgba(40, 20, 5, 0.35);
  border-radius: 2px;
}
.p0 { background-color: #d43c3c; }
.p1 { background-color: #3c6bd4; }
.p2 { background-color: #3cae5c; }
.p3 { background-color: #e8c93c; }
.p4 { background-color: #f0eeea; }
.p5 { background-color: #9c46c9; }

/* ---------- header ---------- */

.board-top {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 18px;
}

.title-tape {
  margin: 0;
  font-family: var(--marker-font);
  font-weight: 700;
  font-size: 34px;
  line-height: 1;
  padding: 8px 22px 10px;
  background: rgba(250, 247, 238, 0.92);
  transform: rotate(-1.2deg);
  box-shadow: 2px 3px 8px rgba(40, 20, 5, 0.35);
  position: relative;
}
.title-tape::before, .title-tape::after { /* masking tape corners */
  content: "";
  position: absolute;
  top: -8px;
  width: 46px;
  height: 18px;
  background: rgba(255, 253, 240, 0.55);
  box-shadow: 0 1px 3px rgba(40, 20, 5, 0.2);
  transform: rotate(-4deg);
}
.title-tape::before { left: -14px; }
.title-tape::after { right: -14px; transform: rotate(5deg); }

.legend {
  display: flex;
  flex-direction: column;
  transform: rotate(0.8deg);
  box-shadow: 2px 4px 9px rgba(40, 20, 5, 0.4);
  margin-left: auto;
}
.legend-strip {
  border: 0;
  cursor: pointer;
  font-family: var(--hand);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 14px;
  background: var(--stock);
  color: var(--marker);
  text-align: left;
}
.legend-strip.off {
  filter: saturate(0.15) brightness(0.82);
  text-decoration: line-through;
}

.whoami {
  font-size: 16px;
  background: rgba(250, 247, 238, 0.9);
  color: var(--marker);
  padding: 5px 12px 6px;
  transform: rotate(0.6deg);
  box-shadow: 2px 3px 6px rgba(40, 20, 5, 0.35);
  white-space: nowrap;
  align-self: flex-start;
}
.whoami a { color: inherit; }

/* ---------- columns ---------- */

.columns {
  display: flex;
  gap: 34px;
  align-items: flex-start;
  justify-content: center;
}
.column { flex: 1; min-width: 0; }
.column.wide { flex: 0 1 800px; text-align: center; }
/* Backlog reads like the corkboard: top to bottom, RIGHT to left. Multicol
   fills the first column at the right edge (rtl), i.e. nearest W.I.P.,
   highest priority first, at any responsive column count. */
.column.wide .cards {
  display: block;
  columns: 178px;
  column-gap: 16px;
  direction: rtl;
  padding-top: 10px;
}
.column.wide .cards .card {
  direction: ltr;
  width: 100%;
  margin: 0 0 20px;
  break-inside: avoid;
}

/* W.I.P. is the display case: recessed, felt-lined, lit from above.
   The one place on the board with depth — where the action is. */
.column.wip {
  flex: 0 0 258px;
  padding: 12px 18px 20px;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% -5%, rgba(255, 220, 150, 0.3), transparent 60%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.03) 0 2px, transparent 2px 4px),
    repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.05) 0 2px, transparent 2px 4px),
    #3a5a44;
  border: 7px solid transparent;
  border-image: repeating-linear-gradient(115deg, #8a5a33 0 6px, #74492a 6px 8px, #5f3c1a 8px 12px) 7;
  box-shadow: inset 0 4px 18px rgba(0, 0, 0, 0.45), 2px 6px 14px rgba(40, 20, 5, 0.4);
}
.column.wip .cards { justify-content: center; }

.col-header, .shelf-label {
  position: relative;
  display: inline-block;
  margin: 0 0 20px;
  font-family: var(--marker-font);
  font-weight: 700;
  font-size: 30px;
  line-height: 1;
  padding: 10px 26px 12px;
  background: var(--orange);
  color: #262014;
  transform: rotate(-0.8deg);
  box-shadow: 2px 4px 9px rgba(40, 20, 5, 0.4);
}

/* ---------- cards ---------- */

.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 16px;
  align-content: flex-start;
  min-height: 120px;
  padding-top: 10px; /* room for pins */
}

.card {
  position: relative;
  width: 178px;
  min-height: 104px;
  padding: 14px 12px 8px;
  background-color: var(--stock);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.22), rgba(0, 0, 0, 0.03)),
    linear-gradient(to bottom, transparent 34px, rgba(203, 94, 84, 0.55) 34px,
      rgba(203, 94, 84, 0.55) 35.5px, transparent 35.5px),
    repeating-linear-gradient(to bottom,
      transparent 0, transparent 25px,
      rgba(75, 110, 160, 0.28) 25px, rgba(75, 110, 160, 0.28) 26px);
  background-position: 0 0, 0 0, 0 35px;
  transform: rotate(var(--tilt, 0deg));
  box-shadow: 1px 4px 7px rgba(40, 20, 5, 0.38);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  text-align: left;
}
.card h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 400;
  line-height: 26px; /* sits on the ruling */
  overflow-wrap: anywhere; /* "Contracts/Subscriptions" must fold, not fall off */
}
.card footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  font-size: 14px;
  line-height: 26px;
  color: rgba(38, 41, 46, 0.75);
}
.card .owner { color: #8a2424; }
.card .dod-mark { color: #1d5c33; }
.card .blocked-word { color: #a11f14; }

.card.dim { opacity: 0.28; }

/* an empty slot chalked where the next card goes */
.add-card {
  margin-top: 14px;
  width: 178px;
  min-height: 84px;
  border: 2px dashed rgba(255, 250, 235, 0.55);
  border-radius: 2px;
  transform: rotate(-0.6deg);
  background: rgba(255, 250, 235, 0.08);
  color: rgba(255, 250, 235, 0.9);
  font-family: var(--hand);
  font-size: 15px;
  padding: 6px 14px;
  cursor: pointer;
}
.add-card:hover { background: rgba(255, 250, 235, 0.18); }

/* old pin holes where cards used to hang */
.cards:not(:has(.card))::before {
  content: "";
  width: 5px;
  height: 5px;
  margin: 28px 0 0 42px;
  border-radius: 50%;
  background: rgba(55, 32, 12, 0.6);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.5),
              47px 9px 0 rgba(55, 32, 12, 0.45),
              116px 3px 0 rgba(55, 32, 12, 0.5);
}

/* ---------- shelves (Side Quests / Ambiguous) ---------- */

.shelves {
  display: flex;
  gap: 40px;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px dashed rgba(255, 250, 235, 0.35);
}
.shelf { flex: 1; }

.shelf-label { font-size: 24px; padding: 8px 18px 10px; }
.label-sidequests {
  background: #f5eeaa;
  color: #e0559a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.label-ambiguous {
  background: #f5eeaa;
  color: #7a2f4f;
}
.label-ambiguous::after { /* the small white card pinned over the sticky */
  content: "";
  position: absolute;
  inset: 4px 6px;
  background: #fffdf6;
  z-index: -1;
}

/* ---------- quote sticky: the always-sixth card in the W.I.P. case ---------- */

.quote-sticky {
  position: relative;
  display: block;
  margin: 22px auto 0;
  width: 200px;
  padding: 16px 14px 12px;
  background: #ffab1a;
  font-family: var(--marker-font);
  font-weight: 500;
  font-size: 18.5px;
  line-height: 1.25;
  text-align: left;
  transform: rotate(1.6deg);
  box-shadow: 2px 5px 10px rgba(40, 20, 5, 0.42);
}
.quote-sticky .attribution { display: block; text-align: right; margin-top: 4px; }

/* ---------- modal: the card in your hand ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(35, 24, 12, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop[hidden] { display: none; }

.modal-card { width: min(560px, 94vw); perspective: 1400px; }

.flipper {
  position: relative;
  height: 340px;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.4, 0.1, 0.2, 1.1);
}
.modal-card.flipped .flipper { transform: rotateY(180deg); }

.face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  padding: 30px 24px 16px;
  background-color: var(--stock, #f5eeaa);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0.03)),
    repeating-linear-gradient(to bottom,
      transparent 0, transparent 31px,
      rgba(75, 110, 160, 0.3) 31px, rgba(75, 110, 160, 0.3) 32px);
  background-position: 0 0, 0 24px; /* rules under the text baselines */
  box-shadow: 3px 8px 20px rgba(20, 12, 4, 0.5);
}
.face.back {
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  gap: 0;
  /* mirror the light: rotateY flips the front's shadow direction */
  box-shadow: -3px 8px 20px rgba(20, 12, 4, 0.5);
}

.face textarea, .face input {
  width: 100%;
  border: 0;
  background: transparent;
  font-family: var(--hand);
  color: var(--marker);
  resize: none;
  outline: none;
}
.face.front #m-title {
  font-size: 27px;
  line-height: 32px;
  height: 100px;
}
.front-meta {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
}
.front-meta input { width: 110px; border-bottom: 1px solid rgba(38, 41, 46, 0.4); }

.cat-picker { display: flex; gap: 8px; }
.cat-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(38, 41, 46, 0.25);
  background: var(--stock);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.cat-dot.sel { border-color: #26292e; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.7); }
.cat-dot.sel::after { content: "✓"; font-size: 14px; color: #26292e; }

.move-wrap {
  font-family: var(--hand);
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.move-wrap select {
  font-family: var(--hand);
  font-size: 16px;
  padding: 5px 26px 5px 8px;
  border: 0;
  border-radius: 3px;
  background: rgba(250, 247, 238, 0.92)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2326292e' stroke-width='1.6' fill='none'/%3E%3C/svg%3E")
    no-repeat right 8px center;
  box-shadow: 0 2px 5px rgba(20, 12, 4, 0.4);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.face.back h3 {
  margin: 0;
  font-family: var(--marker-font);
  font-weight: 700;
  font-size: 21px;
  line-height: 32px;
}
/* 32px-multiple heights land each written line on a printed rule */
#m-dod { flex: none; height: 128px; font-size: 17px; line-height: 32px; }
#m-notes { flex: none; height: 64px; font-size: 17px; line-height: 32px; }

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.modal-actions button { white-space: nowrap; }
.modal-actions .spacer { flex: 1; }
.move-wrap { flex-basis: 100%; justify-content: flex-end; }
.modal-actions button {
  font-family: var(--hand);
  font-size: 16px;
  padding: 7px 16px;
  border: 0;
  border-radius: 3px;
  cursor: pointer;
  background: rgba(250, 247, 238, 0.92);
  box-shadow: 0 2px 5px rgba(20, 12, 4, 0.4);
}
.modal-actions .primary { background: var(--orange); font-weight: 700; }
.modal-actions .danger { background: #e2b8b8; }

/* ---------- login + flashes ---------- */

.login-wall {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-card {
  position: relative;
  max-width: 420px;
  padding: 34px 30px 28px;
  background: #f5eeaa;
  transform: rotate(-1deg);
  box-shadow: 3px 10px 24px rgba(30, 24, 12, 0.5);
  font-size: 18px;
}
.login-card h1 { font-family: var(--marker-font); font-size: 36px; margin: 0 0 10px; }
.ms-button {
  display: inline-block;
  margin-top: 14px;
  padding: 10px 20px;
  background: #2f2f2f;
  color: #fff;
  text-decoration: none;
  border-radius: 3px;
  font-size: 17px;
}

.flash-stack { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 200; }
.flash {
  background: #fffdf6;
  border-left: 6px solid #d43c3c;
  padding: 10px 18px;
  margin-bottom: 8px;
  box-shadow: 0 4px 12px rgba(20, 12, 4, 0.35);
  font-size: 16px;
}

/* ---------- interaction feel ---------- */

.card { transition: transform 0.15s ease, box-shadow 0.15s ease; }
.card:hover {
  transform: rotate(var(--tilt, 0deg)) translateY(-2px);
  box-shadow: 2px 7px 12px rgba(40, 20, 5, 0.42);
}
.card:focus-visible, .legend-strip:focus-visible, .add-card:focus-visible,
.brass-link:focus-visible, button:focus-visible, select:focus-visible {
  outline: 3px solid #26292e;
  outline-offset: 2px;
  box-shadow: 0 0 0 6px #fff3c4;
}
.card.won { animation: fly-off 0.85s ease forwards; }
@keyframes fly-off {
  30% { transform: rotate(var(--tilt, 0deg)) scale(1.12); }
  100% { transform: translateY(-70px) rotate(8deg) scale(0.4); opacity: 0; }
}

/* the team rule made visible: untouched cards age on the board */
.card.age-1 { filter: saturate(0.8) sepia(0.15); }
.card.age-2 { filter: saturate(0.55) sepia(0.35) brightness(0.96); }
.card.age-2::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  border-style: solid;
  border-width: 0 0 16px 16px;
  border-color: transparent transparent rgba(120, 95, 45, 0.35) transparent;
}

/* ---------- the red sticker (blocked) ---------- */

.sticker-blocked {
  display: inline-block;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff7a6d, #c92318 65%);
  box-shadow: 0 1px 3px rgba(40, 20, 5, 0.4);
}
.card .sticker-blocked {
  position: absolute;
  top: 8px;
  left: 8px;
}
.blocked-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 15.5px;
  line-height: 32px;
  white-space: nowrap;
}
.blocked-row input { border-bottom: 1px solid rgba(38, 41, 46, 0.35); font-size: 15.5px; }
/* the red sticker on the card back stays pale until a reason is written */
.blocked-row:has(input:placeholder-shown) .sticker-blocked {
  opacity: 0.35;
  filter: saturate(0.3);
}

/* ---------- WIP limit ---------- */

.limit-note {
  font-size: 15px;
  font-family: var(--hand);
  vertical-align: middle;
  opacity: 0.75;
  margin-left: 6px;
}
.col-header.shake { animation: headshake 0.5s ease 2; }
@keyframes headshake {
  0%, 100% { transform: rotate(-0.8deg); }
  25% { transform: rotate(-3deg) translateX(-4px); }
  75% { transform: rotate(1.6deg) translateX(4px); }
}
.full-stamp {
  position: absolute;
  z-index: 60;
  top: 120px;
  left: 0;
  right: 0;
  width: max-content;
  margin: 0 auto;
  padding: 8px 18px 10px;
  border: 4px solid #c92318;
  border-radius: 6px;
  color: #c92318;
  font-family: var(--marker-font);
  font-weight: 700;
  font-size: 34px;
  line-height: 0.9;
  text-align: center;
  transform: rotate(-12deg) scale(0.6);
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: multiply;
}
.full-stamp small { display: block; font-size: 15px; letter-spacing: 0.04em; }
.full-stamp.show { animation: stamp-hit 1.4s ease forwards; }
@keyframes stamp-hit {
  0% { opacity: 0; transform: rotate(-12deg) scale(1.7); }
  12% { opacity: 0.9; transform: rotate(-12deg) scale(1); }
  80% { opacity: 0.9; }
  100% { opacity: 0; transform: rotate(-12deg) scale(1); }
}
.column { position: relative; }

/* ---------- winning ---------- */

.win-prompt {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(35, 24, 12, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.win-prompt[hidden] { display: none; }
.win-prompt-card {
  position: relative;
  width: min(420px, 92vw);
  padding: 30px 24px 14px;
  background: #f5eeaa;
  box-shadow: 3px 8px 20px rgba(20, 12, 4, 0.5);
  transform: rotate(-0.8deg);
  font-size: 17px;
}
.win-prompt-card h3 { margin: 0 0 10px; font-family: var(--marker-font); font-size: 26px; }
.win-prompt-card label { display: block; }
.win-prompt-card #w-whose { margin: 0 0 6px; }
.modal-actions .quiet {
  background: transparent;
  box-shadow: none;
  text-decoration: underline;
  color: rgba(38, 41, 46, 0.7);
  font-size: 14px;
  padding-left: 0;
}
.win-prompt-card input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(38, 41, 46, 0.4);
  background: transparent;
  font-family: var(--hand);
  font-size: 19px;
  outline: none;
}
.pin.gold { background-color: #d9a520; }

.modal-actions .claim { background: #f3dfa0; font-weight: 700; }

.confetti {
  position: fixed;
  z-index: 130;
  width: 9px;
  height: 13px;
  pointer-events: none;
}

/* ---------- brass link ---------- */

.brass-link {
  display: inline-block;
  padding: 4px 12px 5px;
  margin-right: 10px;
  background: linear-gradient(175deg, #e6c968, #b3902f 55%, #d1af4a);
  border-radius: 3px;
  box-shadow: 0 2px 4px rgba(20, 12, 4, 0.45), inset 0 1px 0 rgba(255, 245, 210, 0.7);
  color: #3d2e08 !important;
  text-decoration: none;
  font-size: 15px;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 0 rgba(255, 245, 210, 0.5);
}
.brass-link:hover { filter: brightness(1.07); }

/* ---------- the trophy room: mahogany, brass, prestige ---------- */

body:has(.wall) {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='w'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.012 0.28' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 0.16 0 0 0 0 0.07 0 0 0 0 0.04 0 0 0 0.35 0'/%3E%3C/filter%3E%3Crect width='260' height='260' filter='url(%23w)'/%3E%3C/svg%3E"),
    repeating-linear-gradient(90deg,
      rgba(0, 0, 0, 0.3) 0 2px, rgba(255, 200, 140, 0.06) 2px 3px,
      transparent 3px 176px),
    radial-gradient(ellipse at 50% 0%, rgba(255, 200, 120, 0.14), transparent 55%),
    linear-gradient(180deg, #5a2c1e, #482114 55%, #351710);
}

.wall {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 26px 80px;
  min-height: 100vh;
}
.wall-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 40px;
}

.trophy-sign {
  margin: 0;
  padding: 12px 34px 14px;
  background: linear-gradient(180deg, #401b10, #2c1109);
  border: 3px solid;
  border-image: linear-gradient(175deg, #e6c968, #8a6d1d 60%, #d1af4a) 1;
  box-shadow: 0 6px 18px rgba(10, 4, 2, 0.6), inset 0 1px 0 rgba(255, 220, 160, 0.15);
  color: #e9c76a;
  font-family: Copperplate, "Copperplate Gothic Light", Georgia, serif;
  font-size: 30px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.8), 0 -1px 0 rgba(255, 230, 170, 0.25);
}

.wall-empty {
  max-width: 430px;
  margin: 80px auto;
  text-align: center;
  font-size: 19px;
  color: #e3cdaa;
}
.wall-empty .hook {
  display: block;
  width: 26px;
  height: 26px;
  margin: 0 auto 14px;
  border: 5px solid #b3902f;
  border-top-color: transparent;
  border-radius: 50%;
  transform: rotate(45deg);
}

.fy-plaques {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: -14px 0 44px;
}
.fy-plaque {
  padding: 7px 22px 8px;
  background: linear-gradient(175deg, #e6c968, #b3902f 55%, #d1af4a);
  border-radius: 3px;
  box-shadow: 0 3px 6px rgba(20, 12, 4, 0.45), inset 0 1px 0 rgba(255, 245, 210, 0.7),
              inset 0 -1px 0 rgba(90, 65, 10, 0.4);
  color: #3d2e08;
  font-family: Copperplate, "Copperplate Gothic Light", Georgia, serif;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(255, 245, 210, 0.5);
}

.office { margin-bottom: 60px; }
.rail-run {
  position: relative;
  width: 100%; /* every rail spans the room; two trophies get the same rail as four */
  padding-top: 30px; /* room for the picture light */
}
/* an overflow rail below the first: same wood, no plate, no lamp */
.rail-run.rail-more { padding-top: 6px; margin-top: 10px; }
.rail-run.rail-more::before, .rail-run.rail-more::after { display: none; }
.rail-run::before { /* brass picture-light hood over each person's wall */
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  width: 130px;
  height: 15px;
  margin-left: -65px;
  border-radius: 4px 4px 62px 62px / 4px 4px 13px 13px;
  background: linear-gradient(180deg, #f0d47e, #b3902f 55%, #8a6d1d);
  box-shadow: 0 3px 8px rgba(10, 4, 2, 0.6), inset 0 1px 0 rgba(255, 245, 210, 0.7);
}
.rail-run::after { /* its warm pool of light on the paneling */
  content: "";
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: min(520px, 100%);
  height: 260px;
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 214, 140, 0.22), transparent 65%);
  pointer-events: none;
}
.rail {
  position: relative;
  z-index: 1;
  height: 26px;
  border-radius: 3px;
  background:
    repeating-linear-gradient(92deg, rgba(30, 14, 6, 0.25) 0 3px, transparent 3px 14px),
    linear-gradient(180deg, #7a4526, #5c2f16 60%, #401d0c);
  box-shadow: 0 5px 12px rgba(10, 4, 2, 0.55), inset 0 1px 0 rgba(255, 210, 150, 0.35);
}
.nameplate {
  position: absolute;
  left: 18px;
  top: -14px;
  padding: 6px 26px 7px;
  background:
    radial-gradient(circle 2.5px at 9px 50%, #6e5510 40%, transparent 45%),
    radial-gradient(circle 2.5px at calc(100% - 9px) 50%, #6e5510 40%, transparent 45%),
    linear-gradient(175deg, #e6c968, #b3902f 55%, #d1af4a);
  border-radius: 3px;
  box-shadow: 0 3px 6px rgba(20, 12, 4, 0.45), inset 0 1px 0 rgba(255, 245, 210, 0.7);
  color: #3d2e08;
  font-family: Copperplate, "Copperplate Gothic Light", Georgia, serif;
  font-size: 17px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.nameplate small {
  margin-left: 10px;
  font-family: var(--hand);
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: none;
  opacity: 0.8;
}

.hung-cards {
  display: flex;
  flex-wrap: nowrap; /* every card hangs from real rail; long walls scroll */
  gap: 26px 20px;
  padding: 34px 10px 4px;
}
.trophy-card::before { /* the brass wire it hangs from */
  content: "";
  position: absolute;
  top: -35px;
  left: 50%;
  width: 2px;
  height: 36px;
  background: linear-gradient(rgba(240, 212, 126, 0.75), rgba(179, 144, 47, 0.55));
  box-shadow: 0 0 3px rgba(10, 4, 2, 0.5);
  transform-origin: bottom;
  transform: translateX(-50%) rotate(calc(var(--tilt, 0deg) * -1));
}
.trophy-card {
  position: relative;
  width: 200px;
  min-height: 110px;
  padding: 16px 12px 26px;
  background-color: var(--stock);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.28), rgba(0, 0, 0, 0.03)),
    repeating-linear-gradient(to bottom,
      transparent 0, transparent 25px,
      rgba(75, 110, 160, 0.25) 25px, rgba(75, 110, 160, 0.25) 26px);
  transform: rotate(var(--tilt, 0deg));
  box-shadow: 1px 5px 9px rgba(30, 24, 12, 0.4);
}
.trophy-card h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 400;
  line-height: 26px;
  overflow-wrap: anywhere;
}
.trophy-dod {
  margin: 0;
  font-size: 13.5px;
  line-height: 26px;
  color: rgba(38, 41, 46, 0.7);
  max-height: 78px;
  overflow: hidden;
}
.date-tag {
  position: absolute;
  right: -8px;
  bottom: -10px;
  padding: 3px 10px 3px 16px;
  background: #e8d9b0;
  border-radius: 3px;
  box-shadow: 0 2px 4px rgba(30, 24, 12, 0.35);
  transform: rotate(3deg);
  font-size: 13px;
  color: #5c4a22;
}
.date-tag::before { /* punched hole with string */
  content: "";
  position: absolute;
  left: 5px;
  top: 50%;
  width: 5px;
  height: 5px;
  margin-top: -3px;
  border-radius: 50%;
  background: rgba(30, 24, 12, 0.35);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.4);
}

/* ---------- calm motion for those who ask ---------- */

@media (prefers-reduced-motion: reduce) {
  .card, .flipper { transition: none; }
  .card.won, .col-header.shake, .full-stamp.show { animation: none; }
  .full-stamp.show { opacity: 0.9; }
  .card.won { opacity: 0; }
}

/* ---------- small screens ---------- */

@media (max-width: 900px) {
  .board-frame { margin: 8px; }
  .board { padding: 14px 12px 120px; }
  .board-top { flex-wrap: wrap; }
  .columns, .shelves { flex-direction: column; }
  .column.wide, .column.wip { flex: 1; }
  .column.wip .card, .shelf-cards .card { width: 47%; min-width: 150px; }
  .quote-sticky { position: static; margin-top: 24px; transform: rotate(1deg); }
}
