/* Den raude tråden: stats and the timer on top, the board, the basket of squares beside it (below on phones). */
.td { padding-top: 12px }
.td-top { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 10px 24px; max-width: 980px; margin: 0 auto 12px }
.td-stats { grid-template-columns: repeat(3, auto); gap: 2px 26px }
.td-stats small { font-size: 15px; color: var(--ink-3); font-weight: 600 }
.td-len.reached dd { color: var(--w-raud) }
.td-timer { flex: 1; min-width: 220px; max-width: 420px; display: grid; gap: 4px }
.td-timer-bar { height: 8px; border-radius: 4px; background: var(--linen-2); overflow: hidden }
.td-timer-bar span { display: block; height: 100%; background: var(--w-raud); transform-origin: left; transition: transform .2s linear }
#timer-text { font: 600 14px Barlow, sans-serif; color: var(--ink-2); min-height: 1.4em }
.td-main { display: grid; grid-template-columns: 1fr 220px; gap: 18px; max-width: 980px; margin: 0 auto; align-items: start }
.td-board { position: relative; display: flex; justify-content: center }
#board { image-rendering: pixelated; touch-action: none; border-radius: 2px; box-shadow: 0 2px 3px rgba(42, 35, 31, .18), 0 14px 30px rgba(42, 35, 31, .2); cursor: pointer }
.td-side { display: grid; gap: 12px }
.td-queue { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: center }
.td-queue canvas { width: 100%; aspect-ratio: 1; image-rendering: pixelated; border-radius: 2px; opacity: .8 }
.td-queue canvas.first { grid-column: span 2; width: 72%; margin: 0 auto; opacity: 1; box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--sign-blue) }
.td-hurry { width: 100% }
.td-done-cloth { margin: 10px 0 4px; padding: 10px; border-radius: 8px; background: var(--linen) }
#done-cloth { width: 100%; height: auto; image-rendering: pixelated }

@media (max-width: 760px) {
  .is-game .foot { display: none }
  .td { padding: 8px 8px 0 }
  .td-top { margin-bottom: 8px; gap: 6px 14px }
  .td-stats dd { font-size: 19px }
  .td-timer { min-width: 100%; order: 2 }
  .td-main { grid-template-columns: 1fr; gap: 10px }
  .td-side { grid-template-columns: auto 1fr; align-items: center }
  .td-fact-panel { display: none }
  .td-queue-panel { padding: 8px 10px; display: flex; align-items: center; gap: 10px }
  .td-queue-panel h2 { margin: 0; writing-mode: vertical-rl; transform: rotate(180deg); font-size: 11px }
  .td-queue { display: flex; gap: 6px }
  .td-queue canvas { width: 34px }
  .td-queue canvas:nth-child(5) { display: none }
  .td-queue canvas.first { width: 50px; margin: 0 4px 0 0 }
  .td-hurry { width: auto; padding: 0 14px; min-height: 52px; font-size: 15px }
}
