#toghu-rescue {
  width: 100%;
  padding-top: 6px;
  border-top: 1px solid var(--line);
  color: var(--ink);
}
.toghu-rescue-offer,
.toghu-patch-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
}
.toghu-rescue-offer strong {
  font-size: 13px;
  flex: 1 1 auto;
}
#toghu-rescue button {
  min-height: 40px;
  padding: 5px 10px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}
#toghu-rescue #toghu-unpick,
#toghu-rescue #toghu-unpick-confirm {
  background: #273b47;
  color: #fff3d5;
  border-color: #273b47;
}
#toghu-unpick-cost,
.toghu-patch-description span {
  margin: 3px 0 0;
  font-size: 11px;
  line-height: 1.35;
}
.toghu-patch-description { display: grid; }
.toghu-patch-description strong { font-size: 13px; }
.toghu-patch-actions { margin-top: 5px; }
#toghu-patch-picker:not([hidden]) ~ #toghu-finish-weave { margin-top: 4px; }
#toghu-rescue #toghu-finish-weave {
  padding: 3px 0;
  min-height: 32px;
  border: 0;
  background: transparent;
  text-decoration: underline;
}

#toghu-patch-prev, #toghu-patch-next { min-width: 40px; }

/* A pocket for the earned bead; a diamond cut remains legible without motion. */
.toghu-bead {
  width: 100%; border-top: 1px solid var(--line); padding-top: 6px; color: var(--ink);
}
.toghu-bead-bar { display: flex; align-items: center; gap: 8px; }
.toghu-bead-copy { flex: 1; min-width: 0; }
.toghu-bead-copy strong, .toghu-bead-copy span, #toghu-bead-target { display: block; }
.toghu-bead-copy strong { font-size: 13px; }
.toghu-bead-copy span { font-size: 11px; line-height: 1.35; }
.toghu-bead-token {
  display: block; width: 24px; height: 26px; flex: none;
  clip-path: polygon(50% 0%,98% 43%,51% 100%,0% 44%);
  background: conic-gradient(from 230deg at 43% 44%,#c68c31 0 15%,#fff4bf 15% 35%,#e2b453 35% 61%,#8d5c21 61% 79%,#e9af48 79%);
}
.toghu-bead[data-stage="locked"] .toghu-bead-token { width: 17px; height: 18px; filter: grayscale(.7); opacity: .6; }
.toghu-bead[data-stage="glowing"] .toghu-bead-token { background: conic-gradient(from 230deg at 43% 44%,#d69a2e 0 15%,#fff9dc 15% 35%,#f5d27a 35% 61%,#b97625 61% 79%,#f5bb50 79%); }
.toghu-bead button { min-height: 40px; padding: 4px 11px; border: 1px solid #9b7f4c; background: #fff9e8; color: #3b311f; font: inherit; font-size: 12px; font-weight: 700; border-radius: 7px; }
.toghu-bead #toghu-bead-aim, .toghu-bead #toghu-bead-confirm { background: #ffe1a0; }
.toghu-bead .toghu-bead-axes, .toghu-bead .toghu-bead-actions { display: flex; gap: 5px; flex-wrap: wrap; }
.toghu-bead-axes { padding-top: 4px; }
.toghu-bead-axes button { min-height: 34px; }
.toghu-bead-axes button[aria-pressed="true"] { background: #423629; color: #fff6d7; }
#toghu-bead-target { padding: 5px 0; font-size: 12px; color: #4d3c24; }
#toghu-finish-weave { min-height: 34px; border: 0; background: transparent; font: inherit; font-size: 12px; text-decoration: underline; color: var(--ink); cursor: pointer; }

/* Phones, polish 7 November 2026: the goal, the bead and the unpick offer stay compact, so the loom
   and the tray of pieces always fit on the screen together. */
@media (max-width: 760px) {
  body[data-game="toghu-tiles"] .solo-progress { padding: 6px 10px; gap: 3px 10px; margin-bottom: 6px; }
  body[data-game="toghu-tiles"] .solo-progress-copy { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 7px; }
  body[data-game="toghu-tiles"] .solo-progress-title { font-size: 13px; }
  .toghu-bead, #toghu-rescue { padding-top: 4px; }
  .toghu-bead-copy span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .toghu-bead-token { width: 18px; height: 20px; }
  .toghu-bead button, #toghu-rescue button { min-height: 36px; }
  .toghu-rescue-offer { flex-wrap: nowrap; }
  #toghu-unpick-cost { margin-top: 1px; font-size: 10px; }
  #toghu-finish-weave { min-height: 28px; }
}
