/* mobility.css — the mobility corner and its panel (mobility upgrade, owner 2026-10-24;
 * mobilityRoom.js + mobilityPanel.js).
 *
 * The panel is the owner's pick 2A: the cardio panel's look — cream ground, a square
 * umber pixel border, tan rows with a hard inset shade, letter-spaced heading. Blue is
 * mobility's colour everywhere (the board's rest-day blue). Colours are the skin's palette
 * tokens with their literal fallbacks, like cardio.css. No dashed borders (B58).
 *
 * Motion rule, same as art.css: the only animation (the actor's fade) sits inside
 * `prefers-reduced-motion: no-preference`; outside it the corner is a still picture.
 */

/* ---- the screen: the corner full width on top, the panel under it ---- */
.mr-screen {
  position: relative; min-height: 100vh; background: #22362c;
  margin: calc(-1 * env(safe-area-inset-top)) 0 0; padding-bottom: calc(env(safe-area-inset-bottom) + 24px);
}
.mr-scene { container-type: inline-size; }
.mr-view { --art-px: calc(100cqw / 256); position: relative; overflow: hidden; background: #22362c; }
.mr-canvas {
  position: relative; background-repeat: no-repeat; background-size: 100% 100%;
  image-rendering: pixelated;
}
.mr-actor { position: absolute; background-repeat: no-repeat; image-rendering: pixelated; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  .mr-actor { transition: opacity .3s; }
  .mr-actor.out { opacity: 0; }
}
.mr-back { z-index: 6; }

/* ---- the panel ---- */
.mp-panel {
  position: relative; z-index: 4; margin: -14px 8px 0;
  color: var(--tol-umber, #3a2c23); background: var(--tol-cream, #f8f3e4);
  border: 3px solid var(--tol-umber, #3a2c23); box-shadow: 4px 4px 0 rgba(10, 6, 4, .55);
}
.mp-head { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 6px 0 12px;
  border-bottom: 2px solid var(--tol-umber, #3a2c23); }
.mp-title { font-size: 13px; font-weight: 900; letter-spacing: 2px; }
.mp-date { flex: 1; text-align: right; font-size: 10px; font-weight: 800; letter-spacing: 1px; color: var(--tol-wood-dark, #8a5a35); }
.mp-pencil { flex: 0 0 auto; width: 32px; height: 30px; padding: 0; font: inherit; font-size: 15px; font-weight: 900;
  color: var(--tol-umber, #3a2c23); background: var(--tol-warm-tan, #e3d5b8); border: 2px solid var(--tol-umber, #3a2c23);
  box-shadow: inset 0 -2px 0 rgba(138, 90, 53, .35); }
.mp-pencil:active { background: var(--tol-wood-light, #c9975b); }
.mp-body { padding: 10px 12px 14px; }
.mp-lbl { font-size: 9.5px; font-weight: 900; letter-spacing: 1.4px; text-transform: uppercase; color: var(--tol-wood-dark, #8a5a35); }

/* this week — plain blue blocks (owner: no stamps) */
.mp-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin: 4px 0 10px; }
.mp-day { display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 9px; font-weight: 900; color: var(--tol-wood-dark, #8a5a35); }
.mp-day i { display: block; width: 100%; height: 22px; background: var(--tol-warm-tan, #e3d5b8); border: 2px solid var(--tol-umber, #3a2c23); }
.mp-day.on i { background: var(--rest, #4a7fa5); }
.mp-day.today i { box-shadow: 0 0 0 2px var(--tol-cream, #f8f3e4), 0 0 0 4px var(--terra, #c96a4b); }
.mp-count { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.mp-count b { font-size: 13px; }

/* the rows (owner's 3C) */
.mp-rows { display: flex; flex-direction: column; gap: 7px; }
.mp-row { background: var(--tol-warm-tan, #e3d5b8); border: 2px solid var(--tol-umber, #3a2c23);
  box-shadow: inset 0 -3px 0 rgba(138, 90, 53, .35); }
.mp-row.done { background: #d3e1ec; }
.mp-rbar { display: flex; align-items: center; gap: 10px; padding: 6px 8px; cursor: pointer;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.mp-row.edit .mp-rbar { background: #f1e3c4; }
.mp-ic { flex: 0 0 54px; height: 54px; display: flex; align-items: center; justify-content: center; }
.mp-icimg { image-rendering: pixelated; max-width: 54px; max-height: 54px; object-fit: contain; pointer-events: none; }
.mp-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.mp-name { font-size: 13px; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-meta { font-size: 9.5px; font-weight: 700; color: #6d5848; }
.mp-chip { align-self: flex-start; margin-top: 2px; padding: 0 5px; font-size: 8.5px; font-weight: 900; letter-spacing: .4px;
  color: var(--tol-wood-dark, #8a5a35); background: var(--tol-cream, #f8f3e4); border: 1px solid var(--tol-wood-dark, #8a5a35); }
.mp-chip.fade { opacity: .45; }
.mp-ok { flex: 0 0 38px; width: 38px; height: 38px; padding: 0; font: inherit; font-size: 17px; font-weight: 900; color: #fff;
  background: var(--tol-cream, #f8f3e4); border: 2px solid var(--tol-umber, #3a2c23); }
.mp-row.done .mp-ok { background: var(--rest, #4a7fa5); }
.mp-ok:disabled { opacity: .35; }
.mp-row.locked .mp-name { opacity: .7; }

/* press-and-hold bar: Rename · Cancel · Delete (cardio's) */
.mp-editbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0 8px 8px; background: #f1e3c4; }
.mp-eb { flex: 1; min-width: 64px; padding: 8px; font: inherit; font-size: 11px; font-weight: 900; color: var(--tol-umber, #3a2c23);
  background: var(--tol-cream, #f8f3e4); border: 2px solid var(--tol-umber, #3a2c23); }
.mp-eb.quiet { border-color: rgba(58, 44, 35, .4); color: #6d5848; }
.mp-eb.del { flex: 0 0 auto; color: #fff; background: var(--alert, #bb4733); border-color: #7a2a1d; }
.mp-ask { flex: 1 0 100%; font-size: 11px; font-weight: 700; line-height: 1.4; }
.mp-input { flex: 1 1 140px; min-width: 0; padding: 8px 9px; font: inherit; font-size: 13px; color: var(--tol-umber, #3a2c23);
  background: #fff; border: 2px solid var(--tol-umber, #3a2c23); border-radius: 0; }

/* the open row */
.mp-drawer { padding: 2px 10px 12px; border-top: 2px solid rgba(58, 44, 35, .25); background: #f3ead6; }
.mp-drawer .ce-swrow { margin: 8px 0 6px; }
.mp-cues { margin: 6px 0 8px; font-size: 11px; line-height: 1.45; white-space: pre-line; }
.mp-locked { margin-top: 8px; font-size: 11px; font-style: italic; line-height: 1.45; color: #6d5848; }

.mp-tvrow { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin: 6px 0 10px; }
.mp-tv { position: relative; width: 116px; height: 66px; padding: 0; display: flex; align-items: center; justify-content: center;
  background: #2a1d14; border: 3px solid var(--tol-wood-dark, #8a5a35); box-shadow: 2px 2px 0 rgba(58, 44, 35, .35); cursor: pointer; }
.mp-tv.off { cursor: default; }
.mp-tvimg { width: 50px; height: 44px; image-rendering: pixelated; pointer-events: none; }
.mp-tv.off .mp-tvimg { opacity: .35; }
.mp-tvlbl { position: absolute; bottom: 3px; left: 0; right: 0; text-align: center; font-size: 8px; font-weight: 900; letter-spacing: 1px; color: #e8c48f; }
.mp-iframe { flex: 1 0 100%; width: 100%; aspect-ratio: 16 / 9; border: 3px solid var(--tol-wood-dark, #8a5a35); background: #000; }
.mp-vedit { flex: 1 0 100%; display: flex; gap: 6px; }

.mp-hold { display: flex; gap: 10px; align-items: stretch; margin: 4px 0; }
.mp-clock { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 4px 10px; background: #fff;
  border: 2px solid var(--tol-umber, #3a2c23); }
.mp-clockn { font-size: 24px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.mp-go { flex: 0 0 124px; padding: 0 6px; font: inherit; font-size: 13px; font-weight: 900; letter-spacing: 1px; color: #fff;
  background: var(--rest, #4a7fa5); border: 3px solid var(--tol-umber, #3a2c23); box-shadow: 3px 3px 0 rgba(58, 44, 35, .35); }
.mp-go.run { background: var(--terra, #c96a4b); }
.mp-go:active { transform: translateY(1px); }
.mp-iph { margin: 0 0 6px; font-size: 9.5px; color: #8a7a6a; }
.mp-ruler { margin: 2px 0 10px; }

.mp-hist { margin-top: 4px; }
.mp-histin { display: flex; gap: 12px; align-items: flex-end; margin-top: 4px; }
.mp-bars { flex: 0 0 auto; display: flex; gap: 4px; align-items: flex-end; min-width: 60px; height: 56px; padding: 0 2px;
  border-bottom: 2px solid var(--tol-umber, #3a2c23); }
.mp-bars i { width: 12px; background: var(--rest, #4a7fa5); border: 1px solid #2c4f6c; }
.mp-bars i.t { background: var(--terra, #c96a4b); border-color: #7a2a1d; }
.mp-notes { flex: 1; min-width: 0; font-size: 10px; line-height: 1.4; color: #5a4636; }
.mp-notes div { padding: 2px 0; border-bottom: 1px solid rgba(58, 44, 35, .15); }
.mp-empty { font-size: 10px; font-style: italic; color: #8a7a6a; }
.mp-note { width: 100%; min-height: 46px; margin-top: 8px; padding: 7px 9px; font: inherit; font-size: 12px; line-height: 1.4;
  color: var(--tol-umber, #3a2c23); background: #fff; border: 2px solid var(--tol-umber, #3a2c23); border-radius: 0; resize: vertical; }

/* add a stretch, finish */
.mp-add { padding: 12px; font: inherit; font-size: 12px; font-weight: 900; color: var(--tol-wood-dark, #8a5a35);
  background: var(--tol-cream, #f8f3e4); border: 2px solid #c9b391; }
.mp-addbox { display: flex; flex-wrap: wrap; gap: 6px; }
.mp-finish { width: 100%; margin-top: 12px; padding: 14px; font: inherit; font-size: 14px; font-weight: 900; letter-spacing: 1px;
  color: #fff; background: var(--rest, #4a7fa5); border: 3px solid var(--tol-umber, #3a2c23); box-shadow: 3px 3px 0 rgba(58, 44, 35, .35); }
.mp-finish.done { background: var(--accent, #5d9d61); }
.mp-finish:disabled { color: #8a7a6a; background: var(--tol-warm-tan, #e3d5b8); box-shadow: none; }
