/* The memory panel (mem.js), on the emulator page and on usb.html. The colors come from the
   page's tokens (--bg, --panel, --fg, --muted, --line, --accent, --warn). */
.mem { display: flex; flex-direction: column; min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.mem[hidden] { display: none; }
.mem-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px; border-bottom: 1px solid var(--line); }
.mem-tabs { display: flex; gap: 2px; background: var(--bg); border-radius: 6px; padding: 2px; }
.mem-tabs button { border: 0; background: none; padding: 3px 9px; font-size: 13px; color: var(--muted); }
.mem-tabs button[aria-selected="true"] { background: var(--line); color: var(--fg); }
.mem-goto { width: 92px; font: 12px ui-monospace, monospace; padding: 4px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); }
.mem-head .mem-save { margin-left: auto; padding: 3px 9px; font-size: 13px; }
.mem-info, .mem-foot { padding: 4px 10px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.mem-foot { border-top: 1px solid var(--line); font-family: ui-monospace, monospace; min-height: 27px; }
.hexwrap { position: relative; flex: 1 1 0; min-height: 320px; width: calc(75ch + 36px); overflow: auto; font: 11.5px/16px ui-monospace, SFMono-Regular, Menlo, monospace; }
.hexspacer { width: 1px; }
.mem pre.hex { position: absolute; top: 0; left: 0; margin: 0; padding: 0 8px; max-height: none; overflow: visible; font: inherit; white-space: pre; color: var(--fg); }
.hex i { font-style: normal; border-radius: 2px; }
.hex .ad { color: var(--muted); }
.hex .as { color: #b5b5ae; }
.hex .z { color: #5d5d58; }
.hex .h3 { background: var(--accent); color: #111; }
.hex .h2 { background: rgba(157, 146, 255, .45); }
.hex .h1 { background: rgba(157, 146, 255, .18); }
.hex #mem-flash { outline: 2px solid var(--warn); }
