/* =====================================================================
   Kindergarten remix boards (js/remix-kinder.js). Every class is rk-*,
   so nothing here reaches another game's puzzles. Colours come from the
   theme variables, so the boards follow whichever game draws them.
   ===================================================================== */

/* ------------------------------------------------------------- shared */
@keyframes rk-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px) rotate(-2deg); }
  40% { transform: translateX(6px) rotate(2deg); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
@keyframes rk-glow {
  0%, 100% { box-shadow: 0 0 0 3px rgba(255, 201, 60, 0.55), 0 0 14px rgba(255, 201, 60, 0.6); }
  50% { box-shadow: 0 0 0 6px rgba(255, 201, 60, 0.9), 0 0 26px rgba(255, 201, 60, 0.9); }
}
@keyframes rk-pop {
  0% { transform: scale(0.85); }
  60% { transform: scale(1.08); }
  100% { transform: scale(1); }
}
.rk-shake { animation: rk-shake 0.45s ease; }
.rk-glow { animation: rk-glow 1.1s ease-in-out infinite; border-color: var(--gold) !important; }
.rk-pop { animation: rk-pop 0.35s ease; }

.stage-board .stimulus mark,
.rk-hunt mark,
.rk-ladder mark,
.rk-ticket mark {
  background: var(--gold);
  color: var(--ink);
  border-radius: 6px;
  padding: 0 0.06em;
}

.rk-note,
.rk-count {
  margin: 0;
  text-align: center;
  font-size: clamp(0.85rem, 2.6vw, 1.15rem);
  color: var(--ink);
  min-height: 1.3em;
}
.rk-count b { color: var(--gold-deep); font-size: 1.2em; }

/* stage tiles in the controls row wrap like ordinary answer tiles */
.choices.stage-controls { flex-wrap: wrap; gap: clamp(6px, 1.8vw, 14px); }
.choices.stage-controls .tile.rk-pic { --t: calc(var(--tile) * 0.8); width: var(--t); height: var(--t); }
.choices.stage-controls .tile.rk-pic .face { font-size: clamp(2rem, 7vw, 3.2rem); }
.choices.stage-controls .tile.used { opacity: 0.25; filter: grayscale(0.8); box-shadow: none; }

/* ---------------------------------------------------------- sound hunt */
.rk-hunt { display: flex; flex-direction: column; align-items: center; gap: clamp(4px, 1vh, 10px); width: 100%; }
.rk-scene {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(6px, 1.6vw, 12px);
  width: min(620px, 100%);
}
.rk-card {
  font: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: clamp(4px, 1vw, 8px) 2px;
  background: linear-gradient(180deg, #fff, var(--parchment-2, #f4f4f4));
  border: 4px solid var(--parchment-edge);
  border-radius: 18px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.15);
  transition: transform 0.1s ease, opacity 0.3s ease;
}
.rk-card:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15); }
.rk-card .rk-face { font-size: clamp(1.9rem, 6.6vw, 3rem); line-height: 1.1; }
.rk-card .rk-cap { font-size: clamp(0.85rem, 2.6vw, 1.2rem); color: var(--ink); letter-spacing: 0.03em; }
.rk-card.found { border-color: var(--green); background: linear-gradient(180deg, #eaffef, #c7f5d8); }
.rk-card.nope { opacity: 0.4; filter: grayscale(0.8); }

/* ---------------------------------------------------------- word ladder */
.rk-ladder {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 clamp(10px, 3vw, 20px);
  border-left: 8px solid var(--wood);
  border-right: 8px solid var(--wood);
  border-radius: 6px;
  min-width: min(360px, 90%);
}
.rk-rung {
  display: grid;
  grid-template-columns: 2.2em 1fr 1.6em;
  align-items: center;
  gap: 10px;
  padding: clamp(3px, 0.8vh, 8px) 8px;
  border-bottom: 6px solid var(--wood);
  font-size: clamp(1.2rem, 4.6vw, 2.1rem);
  color: var(--ink);
  opacity: 0.5;
}
.rk-rung:last-child { border-bottom: none; }
.rk-rung.now { opacity: 1; background: rgba(255, 201, 60, 0.22); border-radius: 10px; }
.rk-rung.done { opacity: 1; }
.rk-rung-pic { font-size: 1.1em; text-align: center; }
.rk-rung-word { letter-spacing: 0.06em; }
.rk-rung-tok { font-size: 0.8em; }

/* ---------------------------------------------------------------- bingo */
.rk-bingo { display: flex; align-items: center; justify-content: center; gap: clamp(10px, 3vw, 26px); flex-wrap: wrap; }
.rk-ticket {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 18px;
  border-radius: 14px;
  background: #fff;
  border: 4px dashed var(--parchment-edge);
  min-width: 7em;
}
.rk-ticket-tag { font-size: clamp(0.75rem, 2.2vw, 0.95rem); opacity: 0.7; }
.rk-ticket-word { font-size: clamp(1.8rem, 7vw, 3rem); letter-spacing: 0.05em; color: var(--ink); }
.rk-bingo.won .rk-ticket { border-style: solid; border-color: var(--green); }
.rk-card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(4px, 1.2vw, 8px); }
.rk-cell {
  font: inherit;
  cursor: pointer;
  position: relative;
  width: clamp(62px, 15vw, 96px);
  height: clamp(62px, 15vw, 96px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 4px solid var(--parchment-edge);
  background: #fff;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.15);
}
.rk-cell .rk-face { font-size: clamp(1.8rem, 6vw, 2.8rem); }
.rk-cell .rk-chip {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.4rem, 5vw, 2.2rem);
  background: rgba(255, 255, 255, 0.35);
  border-radius: 10px;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.2s ease, transform 0.25s ease;
}
.rk-cell .rk-cap {
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.85rem;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  padding: 0 6px;
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  white-space: nowrap;
}
.rk-cell.peek .rk-cap { opacity: 1; }
.rk-cell.marked .rk-chip { opacity: 1; transform: scale(1); }
.rk-cell.marked .rk-face { opacity: 0.55; }
.rk-cell.bingo { border-color: var(--green); background: #d9f7e2; }

/* ------------------------------------------------------ sentence tiles */
.drag-item.rk-word {
  --w: auto;
  width: auto;
  min-width: calc(var(--tile) * 0.62);
  height: calc(var(--tile) * 0.62);
  padding: 0 0.5em;
}
.drag-item.rk-word .text { font-size: clamp(1.05rem, 3.6vw, 1.7rem); white-space: nowrap; }
.play-screen:has(.rk-word) .slot {
  width: auto;
  min-width: calc(var(--tile) * 0.95);
  height: calc(var(--tile) * 0.7);
  padding: 0 4px;
}
.play-screen:has(.rk-word) .choices.style-picture .tile .face { font-size: clamp(1.7rem, 6vw, 2.8rem); white-space: nowrap; }

/* ---------------------------------------------------------- number bond */
.rk-bond { display: flex; flex-direction: column; align-items: center; width: min(460px, 100%); }
.rk-whole,
.rk-part {
  border-radius: 50%;
  border: 5px solid var(--parchment-edge);
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}
.rk-whole { width: clamp(64px, 16vw, 96px); height: clamp(64px, 16vw, 96px); }
.rk-whole b { font-size: clamp(1.8rem, 6.5vw, 2.8rem); line-height: 1; }
.rk-whole small { font-size: 0.75rem; opacity: 0.7; }
.rk-bond-lines { width: 70%; height: clamp(16px, 4vh, 30px); }
.rk-bond-lines line { stroke: var(--parchment-edge); stroke-width: 3; vector-effect: non-scaling-stroke; }
.rk-parts { display: flex; justify-content: space-between; width: 100%; gap: 12px; }
.rk-part { width: clamp(104px, 28vw, 160px); height: clamp(104px, 28vw, 160px); padding: 6px; gap: 2px; }
.rk-part b { font-size: clamp(1.4rem, 5vw, 2.2rem); line-height: 1; color: var(--gold-deep); }
.rk-dots { display: flex; flex-wrap: wrap; justify-content: center; max-width: 88%; line-height: 1; }
.rk-dots i { font-style: normal; font-size: clamp(0.8rem, 2.8vw, 1.25rem); }
.rk-part.rk-open { border-style: dashed; }
.rk-part.good { border-style: solid; border-color: var(--green); background: #eaffef; }
.rk-part.bad { border-color: var(--red); background: #ffecea; }

/* ------------------------------------------------------ ten-frame flash */
.rk-flash { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.rk-frame {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 8px;
  background: var(--wood);
  border-radius: 14px;
}
.rk-frame > span {
  width: clamp(44px, 11vw, 70px);
  height: clamp(44px, 11vw, 70px);
  background: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rk-frame > span i { font-style: normal; font-size: clamp(1.4rem, 5vw, 2.3rem); }
.rk-cover {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(2.4rem, 9vw, 4rem);
  background: repeating-linear-gradient(135deg, var(--parchment-edge) 0 16px, #fff 16px 32px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.rk-flash.covered .rk-cover { opacity: 1; }
.rk-flash.solved .rk-frame { outline: 4px solid var(--green); }
.rk-peek { font-size: clamp(0.95rem, 3vw, 1.3rem); padding: 0.4em 1em; align-self: center; }

/* ---------------------------------------------------------------- shop */
.rk-shop {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "goods tray" "purse purse" "note note";
  gap: clamp(6px, 1.4vh, 12px) clamp(10px, 3vw, 22px);
  align-items: center;
  width: min(600px, 100%);
}
.rk-goods { grid-area: goods; position: relative; display: flex; flex-direction: column; align-items: center; }
.rk-goods-e { font-size: clamp(2.6rem, 10vw, 4.4rem); line-height: 1; }
.rk-tag {
  margin-top: 4px;
  background: var(--gold);
  color: var(--ink);
  font-weight: bold;
  font-size: clamp(1.2rem, 4.4vw, 1.9rem);
  padding: 0 0.5em;
  border-radius: 8px 20px 20px 8px;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.15);
}
.rk-tray {
  grid-area: tray;
  min-height: clamp(70px, 14vh, 110px);
  border: 4px dashed var(--parchment-edge);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.6);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rk-tray-label { font-size: clamp(0.9rem, 2.8vw, 1.2rem); text-align: center; }
.rk-tray-label b { font-size: 1.3em; color: var(--gold-deep); }
.rk-tray-coins,
.rk-purse { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; }
.rk-purse { grid-area: purse; padding: 6px; border-radius: 16px; background: rgba(0, 0, 0, 0.05); min-height: 3.2em; }
.rk-shop .rk-note { grid-area: note; }
.rk-coin {
  font: inherit;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  border: 3px solid rgba(0, 0, 0, 0.25);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.18), 0 3px 0 rgba(0, 0, 0, 0.18);
  color: #3a2410;
}
.rk-coin.penny { width: clamp(40px, 9vw, 54px); height: clamp(40px, 9vw, 54px); background: radial-gradient(circle at 35% 30%, #f3b27a, #b8662f); font-size: clamp(0.8rem, 2.4vw, 1rem); }
.rk-coin.nickel { width: clamp(50px, 11vw, 66px); height: clamp(50px, 11vw, 66px); background: radial-gradient(circle at 35% 30%, #f4f6f8, #9aa3ad); font-size: clamp(0.95rem, 2.8vw, 1.2rem); }
.rk-shop.paid .rk-tray { border-style: solid; border-color: var(--green); background: #eaffef; }

/* ------------------------------------------------------------ number path */
.rk-path { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; }
.rk-trail { margin: 0; font-size: clamp(1rem, 3.2vw, 1.4rem); color: var(--gold-deep); font-weight: bold; min-height: 1.3em; text-align: center; }
.rk-hops { display: inline-flex; gap: 8px; }
.rk-hops i { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--gold-deep); background: #fff; }
.rk-hops i.on { background: var(--gold); }
.rk-stones { display: grid; grid-template-columns: repeat(var(--cols, 5), auto); gap: clamp(4px, 1.2vw, 10px); }
.rk-stone {
  font: inherit;
  cursor: pointer;
  position: relative;
  width: clamp(44px, 10.5vw, 66px);
  height: clamp(40px, 9vw, 58px);
  border-radius: 50% 50% 46% 46%;
  border: 3px solid #8a8f98;
  background: radial-gradient(circle at 40% 30%, #eef0f3, #b8bec7);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.2);
  color: var(--ink);
  font-size: clamp(0.95rem, 3vw, 1.35rem);
  font-weight: bold;
}
.rk-stone.blank { visibility: hidden; }
.rk-stone.lit { background: radial-gradient(circle at 40% 30%, #fff6c9, var(--gold)); border-color: var(--gold-deep); }
.rk-stone.start { background: radial-gradient(circle at 40% 30%, #e6fff0, #7fd9a0); border-color: var(--green); }
.rk-tok { position: absolute; top: -0.9em; right: -0.35em; font-size: 1.25em; pointer-events: none; }

/* ---------------------------------------------------------------- tally */
.rk-tally { font-size: 1rem; display: flex; flex-direction: column; gap: 4px; background: #fff; border-radius: 14px; padding: 6px 12px; border: 3px solid var(--parchment-edge); }
.rk-tally-title { margin: 0; font-size: clamp(0.8rem, 2.4vw, 1rem); text-align: center; opacity: 0.75; }
.rk-tally-row { display: flex; align-items: center; gap: 10px; border-top: 2px solid rgba(0, 0, 0, 0.08); padding-top: 3px; }
.rk-tally-row:first-of-type { border-top: none; }
.rk-tally-e { font-size: clamp(1.4rem, 5vw, 2.2rem); width: 1.4em; text-align: center; }
.rk-marks { display: flex; gap: clamp(8px, 2vw, 14px); min-height: clamp(26px, 6vw, 36px); align-items: center; }
.rk-gate { position: relative; display: inline-flex; gap: clamp(4px, 1vw, 6px); height: clamp(24px, 6vw, 34px); padding: 0 2px; }
.rk-gate i { width: 3px; height: 100%; background: var(--ink); border-radius: 2px; }
.rk-gate b {
  position: absolute;
  left: -4px;
  right: -4px;
  top: 50%;
  height: 3px;
  background: var(--red);
  transform: rotate(-28deg);
  border-radius: 2px;
}

/* --------------------------------------------------------- count in groups */
.rk-groups { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(6px, 1.6vw, 12px); max-width: 680px; }
.rk-group {
  font: inherit;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 8px 8px;
  border-radius: 16px;
  border: 3px dashed var(--parchment-edge);
  background: rgba(255, 255, 255, 0.7);
}
.rk-group-items { display: flex; flex-wrap: wrap; justify-content: center; gap: 1px; line-height: 1; }
.rk-group-items i { font-style: normal; font-size: clamp(1.4rem, 4.6vw, 2.3rem); }
.rk-step-10 .rk-group-items i { font-size: clamp(0.9rem, 2.8vw, 1.35rem); }
.rk-step-10 .rk-group { width: 100%; max-width: 520px; }
.rk-step-5 .rk-group-items { max-width: 4.2em; }
.rk-group-n {
  position: absolute;
  top: -0.7em;
  right: -0.5em;
  min-width: 1.6em;
  padding: 0 0.3em;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-weight: bold;
  font-size: clamp(0.95rem, 3vw, 1.3rem);
  opacity: 0;
  transform: scale(0.3);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.rk-group.lit { border-style: solid; border-color: var(--green); background: #eaffef; }
.rk-group.lit .rk-group-n { opacity: 1; transform: scale(1); }

/* -------------------------------------------------------------- dominoes */
.rk-dom {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 5px;
  background: #fffdf7;
  border: 2px solid var(--ink);
  border-radius: 8px;
  font-size: clamp(14px, 3.4vw, 22px);
}
.rk-dom-bar { width: 2px; align-self: stretch; background: var(--ink); opacity: 0.6; }
.rk-pips { position: relative; width: 1.9em; height: 1.9em; display: inline-block; }
.rk-pips i { position: absolute; width: 0.42em; height: 0.42em; border-radius: 50%; background: var(--ink); transform: translate(-50%, -50%); left: 50%; top: 50%; }
.rk-pips.p2 i:nth-child(1), .rk-pips.p3 i:nth-child(1), .rk-pips.p4 i:nth-child(1), .rk-pips.p5 i:nth-child(1), .rk-pips.p6 i:nth-child(1) { left: 20%; top: 20%; }
.rk-pips.p2 i:nth-child(2), .rk-pips.p3 i:nth-child(3), .rk-pips.p4 i:nth-child(4), .rk-pips.p5 i:nth-child(5), .rk-pips.p6 i:nth-child(6) { left: 80%; top: 80%; }
.rk-pips.p4 i:nth-child(2), .rk-pips.p5 i:nth-child(2), .rk-pips.p6 i:nth-child(2) { left: 80%; top: 20%; }
.rk-pips.p4 i:nth-child(3), .rk-pips.p5 i:nth-child(4), .rk-pips.p6 i:nth-child(5) { left: 20%; top: 80%; }
.rk-pips.p6 i:nth-child(3) { left: 20%; top: 50%; }
.rk-pips.p6 i:nth-child(4) { left: 80%; top: 50%; }
.drag-item.rk-dom-tile { --w: auto; width: auto; padding: 4px; }
.drag-item.rk-dom-tile .face { font-size: 1rem; line-height: 0; }
.play-screen:has(.rk-dom-tile) .slot { width: auto; min-width: calc(var(--tile) * 0.88); height: calc(var(--tile) * 0.6); position: relative; }
.play-screen:has(.rk-dom-tile) .slot-row { row-gap: 2.2em; }

/* ---------------------------------------------------------------- memory */
.rk-memory { display: grid; grid-template-columns: repeat(var(--cols, 4), auto); gap: clamp(6px, 1.6vw, 12px); }
.rk-mem {
  font: inherit;
  cursor: pointer;
  position: relative;
  width: clamp(64px, 15vw, 104px);
  height: clamp(74px, 17vw, 118px);
  border-radius: 14px;
  border: 4px solid var(--parchment-edge);
  background: linear-gradient(160deg, var(--parchment-edge), #b3202d);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.2);
  padding: 0;
}
.rk-back,
.rk-front { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-radius: 10px; }
.rk-back { font-size: clamp(1.8rem, 6vw, 2.6rem); }
.rk-front { background: #fff; opacity: 0; transition: opacity 0.2s ease; color: var(--ink); }
.rk-front b { font-size: clamp(1.1rem, 4vw, 1.8rem); white-space: nowrap; }
.rk-mem.up .rk-front,
.rk-mem.matched .rk-front { opacity: 1; }
.rk-mem.matched { border-color: var(--green); }
.rk-mem.matched .rk-front { background: #eaffef; }
.rk-mini { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; padding: 2px; background: var(--wood); border-radius: 4px; }
.rk-mini i { width: clamp(6px, 1.5vw, 10px); height: clamp(6px, 1.5vw, 10px); background: #fff; border-radius: 2px; }
.rk-mini i.on { background: var(--red); border-radius: 50%; }

/* ---------------------------------------------------------------- shapes */
.rk-shape { width: 1.45em; height: 1.45em; display: block; }
.rk-shape circle,
.rk-shape ellipse,
.rk-shape polygon { fill: var(--fill, #4dabf7); stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; }
.rk-sides { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rk-big-shape { width: clamp(170px, 42vw, 280px); height: clamp(170px, 42vw, 280px); overflow: visible; }
.rk-body { fill: var(--fill); fill-opacity: 0.3; stroke: none; }
.rk-edge { cursor: pointer; }
.rk-hit { stroke: transparent; stroke-width: 18; stroke-linecap: round; }
.rk-side { stroke: var(--ink); stroke-width: 4; stroke-linecap: round; pointer-events: none; transition: stroke 0.2s ease, stroke-width 0.2s ease; }
.rk-edge.lit .rk-side { stroke: var(--gold-deep); stroke-width: 7; }
.rk-edge.rk-glow { animation: none; }
.rk-edge.rk-glow .rk-side { stroke: var(--gold); stroke-width: 7; stroke-dasharray: 6 5; }
.rk-edge-n { font-size: 11px; font-weight: bold; fill: var(--ink); text-anchor: middle; pointer-events: none; }
.rk-sides.solved .rk-body { fill-opacity: 0.55; }

/* ------------------------------------------------------------- pattern fix */
.rk-fix { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(3px, 1vw, 8px); max-width: 700px; }
.rk-piece {
  font: inherit;
  cursor: pointer;
  width: clamp(40px, 9.5vw, 64px);
  height: clamp(40px, 9.5vw, 64px);
  border-radius: 12px;
  border: 3px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.8);
  font-size: clamp(1.5rem, 5.4vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  position: relative;
}
.rk-piece.ok::after { content: "✓"; position: absolute; right: 2px; bottom: 0; font-size: 0.45em; color: var(--green); font-weight: bold; }
.rk-piece.found { border-color: var(--gold-deep); background: #fff6c9; color: var(--gold-deep); font-weight: bold; }

/* ----------------------------------------------------------- pattern twins */
.rk-twin { display: flex; gap: clamp(4px, 1.4vw, 12px); font-size: 1rem; }
.rk-twin-col { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.rk-twin-col b { font-weight: normal; font-size: clamp(1.6rem, 6vw, 2.6rem); }
.rk-twin-col small { font-weight: bold; color: var(--gold-deep); font-size: clamp(0.95rem, 3vw, 1.3rem); }
.play-screen:has(.rk-twin) .tile.group { width: auto; min-width: clamp(120px, 30vw, 220px); height: auto; min-height: clamp(62px, 13vw, 90px); padding: 6px 10px; }
.play-screen:has(.rk-twin) .tile.group .items { flex-wrap: nowrap; gap: 3px; }
.play-screen:has(.rk-twin) .tile.group .item { font-size: clamp(1rem, 3.4vw, 1.7rem); }

/* ------------------------------------------------------------------ club */
.rk-club { display: flex; gap: clamp(8px, 2.4vw, 18px); font-size: 1rem; flex-wrap: wrap; justify-content: center; }
.rk-club-box { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 16px; border: 4px solid var(--green); background: #eaffef; }
.rk-club-box.out { border-color: #c9b79a; background: rgba(0, 0, 0, 0.05); border-style: dashed; }
.rk-club-tag { font-size: clamp(0.8rem, 2.4vw, 1rem); }
.rk-club-items { display: flex; gap: 6px; }
.rk-club-items i { font-style: normal; font-size: clamp(1.7rem, 6vw, 2.6rem); line-height: 1.1; }
.play-screen:has(.rk-club) .tile.picword { width: auto; min-width: clamp(96px, 20vw, 150px); padding: 6px 10px; }
.play-screen:has(.rk-club) .tile.picword .face { font-size: clamp(1.8rem, 6vw, 2.6rem); }

/* ------------------------------------------------------------ tap in order */
.rk-order-slots { display: flex; gap: clamp(6px, 1.6vw, 12px); justify-content: center; flex-wrap: wrap; }
.rk-oslot { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.rk-oslot small { font-size: clamp(0.75rem, 2.3vw, 1rem); opacity: 0.8; }
.rk-oslot b {
  width: clamp(56px, 13vw, 90px);
  height: clamp(56px, 13vw, 90px);
  border-radius: 16px;
  border: 4px dashed var(--parchment-edge);
  background: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.8rem, 6vw, 2.8rem);
  font-weight: normal;
}
.rk-oslot.filled b { border-style: solid; border-color: var(--green); background: #eaffef; animation: rk-pop 0.3s ease; }

/* ----------------------------------------------------------- three homes */
.drag-stage .stimulus:has(.rk-home) { width: 100%; }
.bucket.rk-home { max-width: 240px; }
.bucket.rk-home .bucket-label { flex-wrap: wrap; text-align: center; }

/* ----------------------------------------------------------- two chains */
.slot-row.frame:has(.rk-chain-lock) .slot { --w: calc(var(--tile) * 0.62); }
.slot-row.frame:has(.rk-chain-lock) .drag-item { --w: calc(var(--tile) * 0.56); }

/* ================================================= phone held sideways */
@media (max-height: 520px) {
  .rk-scene { grid-template-columns: repeat(8, minmax(0, 1fr)); width: 100%; }
  .rk-card .rk-face { font-size: clamp(1.4rem, 7vh, 2.2rem); }
  .rk-card .rk-cap { font-size: clamp(0.62rem, 2.4vh, 0.9rem); }
  .rk-rung { font-size: clamp(0.95rem, 5vh, 1.5rem); padding: 1px 8px; border-bottom-width: 4px; }
  .rk-cell { width: clamp(42px, 12vh, 70px); height: clamp(42px, 12vh, 70px); }
  .rk-cell .rk-face { font-size: clamp(1.3rem, 6vh, 2rem); }
  .rk-ticket-word { font-size: clamp(1.3rem, 8vh, 2.2rem); }
  .rk-whole { width: clamp(44px, 13vh, 70px); height: clamp(44px, 13vh, 70px); }
  .rk-whole b { font-size: clamp(1.2rem, 6vh, 2rem); }
  .rk-part { width: clamp(70px, 22vh, 120px); height: clamp(70px, 22vh, 120px); }
  .rk-bond-lines { height: 10px; }
  .rk-frame > span { width: clamp(32px, 10vh, 54px); height: clamp(32px, 10vh, 54px); }
  .rk-frame > span i { font-size: clamp(1rem, 6vh, 1.8rem); }
  .rk-shop { grid-template-columns: auto 1fr 1.4fr; grid-template-areas: "goods tray purse" "note note note"; }
  .rk-goods-e { font-size: clamp(1.8rem, 10vh, 3rem); }
  .rk-coin.penny { width: clamp(30px, 9vh, 44px); height: clamp(30px, 9vh, 44px); }
  .rk-coin.nickel { width: clamp(38px, 11vh, 54px); height: clamp(38px, 11vh, 54px); }
  .rk-stone { width: clamp(34px, 9vh, 52px); height: clamp(28px, 7.4vh, 44px); font-size: clamp(0.8rem, 3.4vh, 1.1rem); }
  .rk-stones { grid-template-columns: repeat(var(--lcols, 10), auto); }
  .rk-tally-e { font-size: clamp(1rem, 5vh, 1.6rem); }
  .rk-gate { height: clamp(16px, 5vh, 26px); }
  .rk-marks { min-height: 0; }
  .rk-mem { width: clamp(62px, 20vh, 86px); height: clamp(62px, 20vh, 86px); }
  .rk-front b { font-size: clamp(0.85rem, 4.6vh, 1.2rem); }
  .rk-mini i { width: clamp(5px, 1.6vh, 8px); height: clamp(5px, 1.6vh, 8px); }
  .rk-memory { grid-template-columns: repeat(8, auto); }
  .rk-big-shape { width: clamp(120px, 42vh, 200px); height: clamp(120px, 42vh, 200px); }
  .rk-piece { width: clamp(32px, 10vh, 52px); height: clamp(32px, 10vh, 52px); font-size: clamp(1.2rem, 6vh, 2rem); }
  .rk-oslot b { width: clamp(44px, 14vh, 70px); height: clamp(44px, 14vh, 70px); font-size: clamp(1.3rem, 7vh, 2.2rem); }
  .rk-club-items i { font-size: clamp(1.2rem, 7vh, 2rem); }
  .rk-twin-col b { font-size: clamp(1.1rem, 6.4vh, 1.8rem); }
  .rk-twin-col small { font-size: clamp(0.7rem, 3.4vh, 1rem); }
  .play-screen:has(.rk-twin) .tile.group { min-width: 0; min-height: clamp(38px, 12vh, 58px); padding: 3px 8px; }
  .play-screen:has(.rk-twin) .tile.group .item { font-size: clamp(0.8rem, 4.6vh, 1.2rem); }
  .play-screen:has(.rk-twin) .choices { gap: 8px; }
  .rk-group-items i { font-size: clamp(0.9rem, 4.4vh, 1.4rem); }
  .rk-step-10 .rk-group-items i { font-size: clamp(0.7rem, 3.4vh, 1.1rem); }
}

@media (max-width: 520px) {
  .rk-scene { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rk-stones { gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .rk-shake, .rk-glow, .rk-pop, .rk-oslot.filled b { animation: none; }
  .rk-glow { box-shadow: 0 0 0 5px rgba(255, 201, 60, 0.9); }
  .rk-cover, .rk-front, .rk-cell .rk-chip, .rk-group-n { transition: none; }
}
