.memory-layout { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }
.memory-console { width: 280px; max-width: 100%; flex: none; }
.memory-scoreboard { display: flex; align-items: center; justify-content: space-between; background: var(--face); box-shadow: var(--sunken); padding: 8px; margin-bottom: 9px; }
.memory-scoreboard img { image-rendering: pixelated; }
.memory-meter { display: grid; gap: 2px; text-align: center; }
.memory-meter > span { color: #333; font-size: 10px; }
.memory-meter output { min-width: 58px; padding: 3px 4px; background: #180000; color: #ff4b4b; box-shadow: inset 1px 1px #808080, inset -1px -1px #fff; font: 600 29px/1 var(--pixel); }
.memory-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 5px; background: var(--face); box-shadow: var(--sunken); min-height: 276px; }
.memory-card { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; width: 100%; aspect-ratio: 1; border: 0; padding: 3px; background: var(--face); box-shadow: var(--raised); color: #000080; font: inherit; touch-action: manipulation; }
.memory-card svg { width: 28px; height: 28px; flex: none; }
.memory-card span { font: 10px/1.1 Tahoma, sans-serif; }
.memory-card .memory-fingerprint { color: #444; font: 9px/1 monospace; }
.memory-card[data-state="sealed"]:active { box-shadow: var(--pressed); }
.memory-card[data-state="revealed"] { background: #fff; box-shadow: var(--sunken); }
.memory-card[data-state="matched"] { background: #d6e8d0; box-shadow: var(--sunken); }
.memory-card:focus-visible { outline: 2px dotted #000080; outline-offset: -4px; }
.memory-reset { width: 100%; margin-top: 9px; }
.memory-instructions { flex: 1 1 170px; min-width: 0; color: #333; font-size: 12px; }
.memory-instructions h3 { color: #000080; font: 600 21px/1.2 var(--pixel); margin: 0 0 10px; }
.memory-instructions p { margin: 0 0 10px; }
.memory-tip { font-size: 11px; }
.memory-instructions kbd { border: 1px solid #808080; padding: 0 3px; background: #dfdfdf; font: inherit; }
.memory-proof { border: 1px solid #aaa; padding: 8px; background: #eee; font-size: 11px; }
.memory-proof summary { cursor: pointer; color: #000080; }
.memory-proof p { margin: 8px 0 0; }
.memory-proof dl { margin-bottom: 0; }
.memory-proof dt { margin-top: 8px; font-weight: bold; }
.memory-proof dd { margin: 3px 0 0; overflow-wrap: anywhere; font: 11px/1.5 monospace; }
.memory-status { margin: 14px 0 0; padding-top: 10px; border-top: 1px solid #d4d4d4; color: #555; font-size: 11px; }
@media (max-width: 600px) {
  .memory-layout { justify-content: center; gap: 14px; }
  .memory-instructions { flex-basis: 100%; }
  .memory-reset { min-height: 44px; }
}
