/* --- The word card (029 § 4): the tile as the child sees it, its
   sound beside it, then picture, kind and pages. Rare and destructive
   actions live behind "…". --- */
.wc-sheet { gap: 16px; position: relative; }
.wc-head { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.wc-added { font-weight: 700; font-size: 17px; color: #2e7d32; margin-right: auto; }
.wc-added b { color: var(--ink-text); }
.wc-rolelab { color: var(--muted); font-size: 14px; margin-right: auto; }
.wc-rolelab:empty { display: none; }
.wc-added:not([hidden]) + .wc-rolelab { margin-right: 0; }
.wc-more {
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: var(--tray); color: var(--ink); font-size: 20px; line-height: 1;
  font-weight: 700; cursor: pointer; flex: none;
}
.wc-done { width: auto; padding: 8px 22px; font-size: 16px; }
.wc-menu:not([hidden]) {
  position: absolute; top: 64px; right: 20px; z-index: 2;
  display: flex; flex-direction: column; min-width: 200px;
  background: #fff; border: 2px solid var(--line); border-radius: 12px;
  box-shadow: 0 8px 24px rgba(30, 26, 20, 0.18); overflow: hidden;
}
.wc-menu button {
  border: none; background: none; text-align: left; font: inherit;
  font-size: 16px; font-weight: 700; padding: 12px 16px; cursor: pointer; color: var(--ink);
}
.wc-menu button:hover { background: var(--tray); }
.wc-menu button.danger { color: #c62828; }

/* Hero: the real tile (label strip on top, picture on white, role border). */
.wc-hero { display: flex; gap: 18px; align-items: center; }
.wc-tile {
  width: 148px; height: 148px; flex: none;
  border-radius: 14px; border: 4px solid var(--rb, var(--edge));
  background: #fff; overflow: hidden;
  display: flex; flex-direction: column;
}
.wc-tile .wc-label {
  flex: none; height: 38%; width: 100%; resize: none; overflow: hidden;
  background: var(--rf, var(--press-f)); color: var(--ink-text);
  border: none; border-radius: 0; padding: 6px 8px 0; text-align: center;
  font-family: var(--word-font); font-weight: 700; font-size: 18px; line-height: 1.1;
  hyphens: auto; overflow-wrap: break-word;
}
.wc-tile .wc-label:not(:disabled):hover,
.wc-tile .wc-label:focus { outline: 2px dashed var(--ink-text); outline-offset: -4px; }
.wc-tile .wc-label:disabled { color: var(--ink-text); opacity: 1; }
#wc-pic {
  flex: 1; min-height: 0; width: 100%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--word-font); font-weight: 700; font-size: 44px; color: var(--muted);
  padding: 6%; overflow: hidden;
}
#wc-pic img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
#wc-pic.photo { padding: 0; }
#wc-pic.photo img { width: 100%; height: 100%; object-fit: cover; }
#wc-pic.drawing {
  background: linear-gradient(100deg, #fff 30%, var(--tray) 50%, #fff 70%);
  background-size: 300% 100%;
  animation: wc-shimmer 1.4s linear infinite;
}
@keyframes wc-shimmer { from { background-position: 100% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { #wc-pic.drawing { animation: none; background: var(--tray); } }

.wc-sound { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.wc-play {
  width: 56px; height: 56px; border-radius: 50%;
  border: 2px solid var(--ink); background: var(--ink); color: var(--cream);
  font-size: 20px; cursor: pointer;
}
.wc-voice { font-size: 15px; color: var(--ink-text); font-weight: 700; }
.wc-voice.busy { color: var(--muted); }
.wc-voicebtns { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; }

/* Sections share one rhythm: a small label, then the controls. */
.wc-sec:not([hidden]) { display: flex; flex-direction: column; gap: 10px; }
.wc-lab { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.wc-picstate { font-size: 15px; color: var(--ink-text); }
.wc-picrow { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.wc-others { display: flex; gap: 8px; flex-wrap: wrap; }
.wc-thumb {
  width: 56px; height: 56px; padding: 3px; border-radius: 10px;
  border: 2px solid var(--line); background: #fff; cursor: pointer;
}
.wc-thumb:hover { border-color: var(--ink-text); }
.wc-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.wc-chipbtn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 2px solid var(--line); border-radius: 999px; background: #fff;
  font: inherit; font-size: 15px; font-weight: 700; color: var(--ink);
  padding: 7px 14px; cursor: pointer;
}
.wc-chipbtn:hover { border-color: var(--muted); }
.wc-chipbtn.lead { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.wc-describe { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wc-describe .wc-lab { flex-basis: 100%; }
.wc-describe input[type="text"] { flex: 1; min-width: 180px; font-size: 16px; padding: 9px 12px; }
.wc-describe .btn { width: auto; padding: 9px 16px; font-size: 15px; }
.wc-describe .btn:disabled { opacity: 0.45; cursor: default; }
.wc-fine { font-size: 13px; margin-top: -4px; }
.wc-fine:empty { display: none; }

.wc-where { border-top: 2px solid var(--tray); padding-top: 14px; }
.wc-kindwrap:not([hidden]), .wc-pages { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; position: relative; }
.wc-kindwrap .wc-lab, .wc-pages .wc-lab { min-width: 44px; }
.wc-kindchip, .wc-kindopt {
  display: inline-flex; align-items: center; gap: 8px;
  border: 2px solid var(--line); border-radius: 999px; background: #fff;
  font: inherit; font-size: 15px; font-weight: 700; color: var(--ink-text);
  padding: 6px 14px 6px 10px; cursor: pointer;
}
.wc-kindchip::before, .wc-kindopt::before {
  content: ""; width: 14px; height: 14px; border-radius: 50%;
  background: var(--rf); border: 3px solid var(--rb);
}
.wc-kindchip::after { content: "▾"; color: var(--muted); font-size: 12px; }
.wc-kindmenu:not([hidden]) {
  flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0 2px 52px;
}
.wc-pages #wc-groups { display: contents; }
#wc-groups, #wc-grouplist { display: flex; flex-wrap: wrap; gap: 8px; }

#wc-libpics { display: flex; flex-wrap: wrap; gap: 6px; }
#wc-libpics button {
  width: 56px; height: 56px; padding: 3px;
  border: 2px solid var(--line); border-radius: 10px; background: #fff;
}
#wc-libpics button.sel { border-color: var(--ink-text); }
#wc-libpics img { width: 100%; height: 100%; object-fit: contain; display: block; }
.wchip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 2px solid var(--muted);
  border-radius: 999px;
  background: var(--tray);
  color: var(--neutral-text);
  font-weight: 700;
  font-size: 15px;
  padding: 5px 12px;
}
.wchip .glyph {
  width: 22px; height: 22px; margin-left: -4px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; overflow: hidden;
}
.wchip .glyph img { width: 100%; height: 100%; object-fit: cover; }
.wchip .glyph img.gicon { object-fit: contain; }
.wchip .x {
  width: 20px; height: 20px; border-radius: 50%;
  border: none; background: var(--ink); color: var(--cream);
  font-size: 12px; line-height: 1; padding: 0;
}
/* 027 B9: Add to other boards — pick named destinations. */
.wchips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
#boards-list .wchip { cursor: pointer; background: #fff; }
#boards-list .wchip[aria-pressed="true"] { border-color: var(--ink-text); background: var(--tray); }

@media (max-width: 520px) {
  .wc-tile { width: 120px; height: 120px; }
  .wc-hero { gap: 12px; }
}
