/* Place Value online (assets/play/placevalue.js): number card, place value chart with blocks, expanded form, number chips */
.pv-main { display: grid; gap: 12px; }
.pv-top { display: flex; justify-content: center; }
.pv-target { display: inline-flex; align-items: baseline; gap: 10px; padding: 6px 22px; border-radius: 16px; background: #fff;
  box-shadow: 0 0 0 3px var(--navy), 0 5px 0 var(--navy); }
.pv-target small { font: 800 1rem var(--display, sans-serif); color: var(--muted); }
.pv-target b { font: 800 2.6rem/1.1 var(--display, sans-serif); color: var(--navy); letter-spacing: .02em; }
/* the chart: one column per place, biggest place on the left */
.pv-chart { display: grid; grid-template-columns: repeat(var(--k), minmax(0, 1fr)); gap: 8px; }
.pv-col { --c: #12a1dc; display: grid; grid-template-rows: auto auto 1fr auto; border-radius: 14px; background: #fff8e7; overflow: hidden;
  box-shadow: 0 0 0 3px var(--navy), 0 5px 0 var(--navy); text-align: center; transition: transform .2s; }
.pv-head { background: var(--c); color: #fff; font: 800 .95rem/1.1 var(--display, sans-serif); padding: 7px 4px;
  min-height: 2.2em; display: flex; align-items: center; justify-content: center; }  /* all headers the same height */
.pv-digit { font: 800 2.4rem/1.15 var(--display, sans-serif); color: var(--c); min-height: 1.2em; }
.pv-blocks { width: 100%; max-width: 130px; margin: 0 auto; aspect-ratio: 1; display: block; padding: 0 6px; box-sizing: border-box; }
.pv-val { font: 800 1rem/1.2 var(--display, sans-serif); color: var(--navy); min-height: 1.6em; padding: 3px 2px 6px; }
.pv-col.pv-off { opacity: .35; }
.pv-col.pv-zero .pv-digit { color: var(--muted); }
.pv-col.pv-zero .pv-val { color: var(--muted); font-size: .85rem; }
.pv-col.pv-full .pv-digit { animation: pop .3s ease-out; }
.pv-col.pv-now { transform: translateY(-4px); box-shadow: 0 0 0 4px var(--c), 0 0 0 7px var(--navy), 0 8px 0 var(--navy); }
.pv-col.pv-now .pv-digit { text-decoration: underline; text-decoration-thickness: 4px; text-underline-offset: 6px; }
/* blocks: cubes, rods and flats in the column color, disks with their value */
.pv-cube { fill: var(--c); stroke: var(--navy); stroke-width: .5; }
.pv-grid { stroke: var(--navy); stroke-width: .18; opacity: .55; }
.pv-disk { fill: var(--c); stroke: var(--navy); stroke-width: .55; }
.pv-dtxt { fill: #fff; font-family: var(--display, sans-serif); font-weight: 800; }
.pv-b { animation: pv-in .3s ease-out both; transform-box: fill-box; transform-origin: center; }
@keyframes pv-in { from { opacity: 0; transform: scale(.4); } }
/* expanded form */
.pv-eq { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; font: 800 1.5rem var(--display, sans-serif); color: var(--navy); }
.pv-eq i { font-style: normal; color: var(--muted); }
.pv-box { min-width: 2.6em; height: 1.6em; padding: 0 6px; border: 3px dashed #9aa8bb; border-radius: 10px; display: inline-flex;
  align-items: center; justify-content: center; background: #fff; }
.pv-box.pv-in { border: 3px solid var(--navy); animation: pop .3s ease-out; }
.pv-eq.pv-eqdone b { color: #fff; background: #22b573; border-radius: 10px; padding: 0 10px; box-shadow: 0 0 0 3px var(--navy); }
/* chips and choices */
.pv-pad { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; min-height: 64px; }
.pv-q { width: 100%; margin: 0; text-align: center; font: 800 1.25rem var(--display, sans-serif); color: var(--navy); }
.pv-q b { font-size: 1.6rem; text-decoration: underline; }
.pv-build .pv-q b { text-decoration: none; }
.pv-q.pv-bad { color: #c62828; font-size: 1.05rem; }
.pv-q.pv-good { font-size: 1.6rem; color: #1b8a4b; }
.pv-q.pv-good b { text-decoration: none; }
.pv-grp { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.pv-next { min-width: 240px; }
.pv-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pv-chip { min-width: 92px; min-height: 56px; font: 800 1.45rem var(--display, sans-serif); border-radius: 14px;
  box-shadow: 0 0 0 3px var(--navy), 0 5px 0 var(--navy); }
.pv-chip:active { transform: translateY(3px); box-shadow: 0 0 0 3px var(--navy), 0 2px 0 var(--navy); }
.pv-chip.pv-used { opacity: .18; box-shadow: 0 0 0 3px #9aa8bb; }  /* stays in place: the other chips do not jump */
.pv-chip.pv-no { opacity: .4; text-decoration: line-through; animation: shake .35s; }
.pv-glow { animation: pv-glow 1s ease-in-out 4; }
@keyframes pv-glow { 50% { background: var(--yellow); box-shadow: 0 0 0 4px #e0a800; } }
.pv-fly { position: fixed; z-index: 50; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--yellow);
  box-shadow: 0 0 0 3px var(--navy); font: 800 1.4rem var(--display, sans-serif); color: var(--navy); pointer-events: none;
  transition: transform .36s ease-in, opacity .36s ease-in; }
.pv-ctrl { display: flex; justify-content: center; }
@media (max-width: 600px) {
  .pv-chart { gap: 5px; }
  .pv-head { font-size: .72rem; padding: 6px 2px; }
  .pv-digit { font-size: 1.9rem; }
  .pv-val { font-size: .85rem; }
  .pv-target b { font-size: 2.1rem; }
  .pv-eq { font-size: 1.15rem; }
  .pv-chip { min-width: 78px; min-height: 52px; font-size: 1.25rem; }
  .pv-blocks { max-width: 92px; padding: 0 4px; }  /* the whole game fits a phone screen better */
  .pv-q { font-size: 1.1rem; }
}
/* the board must not jump when Arco's sentence gets longer or shorter */
.game[data-game="placevalue"] .g-say { min-height: 84px; }
@media (max-width: 600px) { .game[data-game="placevalue"] .g-say { min-height: 104px; } }
