:root {
  color-scheme: light;
  --ink: rgb(0 0 0 / .88);
  --ink-2: rgb(0 0 0 / .58);
  --line: rgb(0 0 0 / .12);
  --paper: #fff;
  --ground: #f4f4f2;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.4 "Avenir Next", Avenir, "Segoe UI", sans-serif;
}
aside { padding: 24px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
h1 { font-size: 28px; font-weight: 600; letter-spacing: -.01em; margin: 0 0 4px; }
p { margin: 0; }
header p, #place, #thin, footer { color: var(--ink-2); font-size: 13px; }
a { color: inherit; }
.switch { display: flex; gap: 4px; }
.switch button {
  flex: 1; min-height: 36px; font: inherit; font-size: 14px; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 4px; cursor: pointer;
}
.switch button[aria-pressed="true"] { background: #000; border-color: #000; color: #fff; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid #000; outline-offset: 2px; }
ol { list-style: none; margin: 0; padding: 0; }
li label {
  display: grid; grid-template-columns: 18px 12px 1fr auto; gap: 8px; align-items: center;
  min-height: 32px; cursor: pointer;
}
li input { margin: 0; width: 16px; height: 16px; accent-color: #000; }
.swatch { width: 12px; height: 12px; border-radius: 2px; }
.count { font-variant-numeric: tabular-nums; }
#thin { color: var(--ink); }
footer { margin-top: auto; display: grid; gap: 2px; }
main { position: relative; overflow: hidden; background: var(--ground); perspective: 2400px; }
#stack {
  position: absolute; left: 50%; top: 50%; transform-style: preserve-3d;
}
.plane {
  position: absolute; transform-style: preserve-3d; background: rgb(255 255 255 / .74);
  outline: 1px solid rgb(0 0 0 / .22);
}
.plane canvas { display: block; width: 100%; height: 100%; }
.plane .tag {
  position: absolute; left: 100%; bottom: 0; padding-left: 12px; white-space: nowrap;
  font-size: 15px; color: var(--ink);
}
.plane .tag b { font-weight: 600; font-variant-numeric: tabular-nums; }
.flat .plane { background: none; outline: none; }
.flat .plane .tag { display: none; }
.flat .plane:first-child { background: var(--paper); outline: 1px solid rgb(0 0 0 / .22); }
#status { position: absolute; left: 20px; top: 16px; color: var(--ink-2); font-size: 13px; }
@media (max-width: 760px) {
  html, body { height: auto; }
  body { display: flex; flex-direction: column-reverse; }
  main { height: 62vh; width: 100%; }
  aside { padding: 16px; }
  .plane .tag { font-size: 26px; }
  .plane .tag span { display: none; }
}
