:root {
  --ivory: #f4efe6;
  --cream: #f7f1e6;
  --oak: #cdae83;
  --oak-deep: #b89462;
  --oak-ink: #6a4e2e;
  --ink: #2a2118;
  --sage: #7e9274;
  --sage-deep: #5f7358;
  --teal: #5d7d78;
  --teal-soft: #c5d4cf;
  --terra: #c9785c;
  --brass: #b89454;
  --paper: #fffaf2;
  --shadow: rgba(42, 33, 24, 0.18);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --card-w: 78px;
  --card-h: 104px;
  --peek: 38px;
  --mini-w: 52px;
  --mini-h: 68px;
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Source Han Sans SC", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #8a6a42;
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
  color: inherit;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
}

button:disabled {
  opacity: 0.38;
  cursor: default;
}

#app {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--safe-t) var(--safe-r) var(--safe-b) var(--safe-l);
  background:
    radial-gradient(ellipse 80% 40% at 50% 0%, rgba(255, 246, 220, 0.35), transparent 55%),
    linear-gradient(180deg, #d7c09a 0%, #b08958 48%, #8d6740 100%);
}

#stage {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 430px;
  max-height: 932px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 30% at 50% 0%, rgba(255, 250, 240, 0.45), transparent 60%),
    linear-gradient(180deg, #e6d3b0 0%, #cbb089 28%, #a98456 100%);
  box-shadow: 0 18px 50px rgba(42, 33, 24, 0.28);
}

.landscape {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #2a2118;
  color: #f7f1e6;
  text-align: center;
  font-size: 18px;
  line-height: 1.5;
}

.landscape[hidden] { display: none; }

.screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  min-height: 0;
}

.screen.on { display: flex; }

#title {
  background:
    radial-gradient(ellipse 80% 36% at 50% 12%, rgba(255, 250, 240, 0.7), transparent 58%),
    linear-gradient(180deg, #efe3cc 0%, #d7c09a 46%, #c4a06d 100%);
}

.title-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 18px 8px;
  min-height: 0;
}

.eyebrow {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.28em;
  color: var(--oak-ink);
  font-weight: 600;
}

#wordmark {
  margin: 0;
  font-size: 42px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #3a2a18;
  text-shadow: 0 2px 0 rgba(255, 250, 240, 0.65);
}

.how {
  margin: 0;
  text-align: center;
  font-size: 16px;
  line-height: 1.45;
  color: #5a4330;
  font-weight: 600;
}

.demo {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255, 250, 240, 0.55);
  border: 1.5px solid rgba(184, 148, 84, 0.45);
  border-radius: 18px;
  box-shadow: 0 8px 18px rgba(42, 33, 24, 0.08);
}

.demo-card {
  width: 72px;
  height: 96px;
  border-radius: 12px;
  background: linear-gradient(180deg, #fffdf8, #f3e6d0);
  border: 1px solid #e0cda8;
  box-shadow: 0 6px 0 rgba(90, 62, 32, 0.12), 0 10px 16px var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 6px 8px;
}

.demo-card .art,
.card .art,
.mini .art,
.ghost .art {
  display: block;
  width: 100%;
  flex: 1;
  background-image: url("assets/object_atlas.jpg");
  background-size: 400% 300%;
  background-repeat: no-repeat;
  pointer-events: none;
}

.demo-card b,
.card b,
.mini b,
.ghost b {
  display: block;
  font-size: 13px;
  line-height: 1.1;
  font-weight: 700;
  color: #4a3420;
  text-align: center;
}

.demo-arrow {
  font-size: 15px;
  font-weight: 800;
  color: var(--oak-ink);
}

.demo-bin {
  min-width: 76px;
  min-height: 84px;
  border-radius: 14px;
  border: 1.5px dashed rgba(94, 115, 88, 0.7);
  background: rgba(126, 146, 116, 0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #3f513a;
  font-weight: 700;
}

.demo-bin small { font-size: 15px; }

.title-panel {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px 22px calc(18px + var(--safe-b));
}

.level-picks {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  max-width: 320px;
  margin-top: 4px;
}

.level-pick {
  width: 44px;
  height: 44px;
  border-radius: 22px;
  background: rgba(255, 250, 240, 0.78);
  border: 1.5px solid rgba(184, 148, 84, 0.55);
  color: #4a3420;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 2px 0 rgba(120, 84, 28, 0.16);
}

.level-pick:focus-visible,
.icon-btn:focus-visible,
.cta:focus-visible,
.btn:focus-visible {
  outline: 3px solid #e8c56a;
  outline-offset: 2px;
}

.cta,
.btn {
  min-height: 54px;
  min-width: 168px;
  padding: 0 22px;
  border-radius: 28px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.cta {
  min-width: 230px;
  background: linear-gradient(180deg, #7f9a74, #5f7358);
  color: #f7faf4;
  box-shadow: 0 4px 0 #4a5c44, 0 10px 18px rgba(42, 33, 24, 0.18);
}

.fine {
  margin: 0;
  font-size: 13px;
  color: #6a5340;
}

#play {
  background: transparent;
}

.hud {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 8px 12px 0;
}

.pill,
.next-cat {
  margin: 0;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #f3d27a, #e0b45a);
  color: #4a3210;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 2px 0 rgba(120, 84, 28, 0.25);
}

#hud-title {
  margin: 0;
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #3a2a18;
}

.hud-tools {
  display: flex;
  gap: 6px;
}

.icon-btn {
  width: 48px;
  height: 48px;
  border-radius: 24px;
  background: rgba(255, 250, 240, 0.72);
  border: 1.5px solid rgba(184, 148, 84, 0.55);
  color: #4a3420;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-btn svg {
  width: 22px;
  height: 22px;
  display: block;
}
.icon-btn svg[hidden] {
  display: none !important;
}

.hint {
  flex: 0 0 auto;
  margin: 6px 14px 8px;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 18px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #5a4330;
  background: rgba(255, 250, 240, 0.78);
  border: 1px solid rgba(205, 174, 131, 0.65);
}

.settled {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0 12px 6px;
}

.settled[hidden] { display: none; }

.settled-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px 0 4px;
  border-radius: 16px;
  background: rgba(255, 250, 240, 0.8);
  border: 1px solid rgba(126, 146, 116, 0.45);
  font-size: 12px;
  font-weight: 700;
  color: var(--sage-deep);
  white-space: nowrap;
}

.settled-chip .art {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 6px;
}

.drawer {
  flex: 0 0 auto;
  padding: 0 16px;
}

.drawer-frame {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, #e8d2a8 0%, #cdae83 40%, #b89568 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 240, 0.7),
    inset 0 -2px 0 rgba(90, 62, 32, 0.18),
    0 10px 18px rgba(42, 33, 24, 0.16);
  border: 2px solid #a98456;
}

.drawer[data-pocket="off"] .drawer-frame {
  grid-template-columns: 1fr 1fr;
}

.drawer[data-pocket="on"] .drawer-frame {
  grid-template-columns: 1.16fr 1fr;
  grid-template-rows: minmax(96px, 1fr) auto;
}

.drawer[data-pocket="on"] #comp-0 { grid-row: 1 / 3; }
.drawer[data-pocket="on"] #comp-1 { grid-column: 2; }
.drawer[data-pocket="on"] #pocket { grid-column: 2; }

.comp,
.pocket {
  min-height: 112px;
  border-radius: 14px;
  padding: 8px 8px 10px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 6px;
  border: 1.5px solid rgba(90, 62, 32, 0.18);
}

.comp {
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.35), rgba(166, 124, 72, 0.12)),
    #d7b888;
}

.pocket {
  min-height: 96px;
  background:
    linear-gradient(180deg, rgba(232, 244, 238, 0.4), rgba(64, 96, 92, 0.16)),
    #6e8c86;
  border-color: rgba(36, 64, 60, 0.28);
  border-bottom-left-radius: 28px;
  border-bottom-right-radius: 28px;
}

.pocket[hidden] { display: none; }

.comp-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 22px;
  font-size: 13px;
  font-weight: 800;
  color: #4a3420;
}

.pocket .comp-label { color: #f4faf7; }

.comp.bound-tea { box-shadow: inset 0 0 0 2px rgba(94, 125, 120, 0.55); }
.comp.bound-bake { box-shadow: inset 0 0 0 2px rgba(201, 120, 92, 0.5); }
.comp.bound-breakfast { box-shadow: inset 0 0 0 2px rgba(184, 148, 84, 0.55); }
.comp.bound-cold { box-shadow: inset 0 0 0 2px rgba(96, 132, 168, 0.5); }

.comp.wild {
  background:
    linear-gradient(180deg, #f7e7b4 0%, #e4c56f 52%, #c9a24a 100%);
  border: 1.5px solid #b89454;
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 240, 0.75),
    0 3px 0 rgba(120, 84, 28, 0.22);
}

.comp.wild .comp-label { color: #4a3210; }

.comp.wild .socket {
  border-color: rgba(90, 62, 32, 0.38);
  background: rgba(255, 250, 240, 0.38);
}

.comp.wild.bound-tea { box-shadow: inset 0 0 0 2px rgba(94, 125, 120, 0.7), 0 3px 0 rgba(120, 84, 28, 0.22); }
.comp.wild.bound-bake { box-shadow: inset 0 0 0 2px rgba(201, 120, 92, 0.7), 0 3px 0 rgba(120, 84, 28, 0.22); }
.comp.wild.bound-breakfast { box-shadow: inset 0 0 0 2px rgba(166, 118, 48, 0.75), 0 3px 0 rgba(120, 84, 28, 0.22); }
.comp.wild.bound-cold { box-shadow: inset 0 0 0 2px rgba(96, 132, 168, 0.7), 0 3px 0 rgba(120, 84, 28, 0.22); }

.comp.closed {
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.2), rgba(90, 62, 32, 0.1)),
    #c4a87a;
  opacity: 0.88;
}

.comp-done {
  flex: 1;
  min-height: var(--mini-h);
  border-radius: 12px;
  border: 1.5px dashed rgba(90, 62, 32, 0.28);
  background: rgba(90, 62, 32, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #6a5340;
}

.done-check {
  width: 22px;
  height: 22px;
  border-radius: 11px;
  background: rgba(90, 62, 32, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}

.comp-done b {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.sockets,
.pocket-well {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  min-height: var(--mini-h);
}

.socket {
  flex: 1 1 0;
  min-width: 0;
  height: var(--mini-h);
  border-radius: 10px;
  border: 1.5px dashed rgba(90, 62, 32, 0.28);
  background: rgba(90, 62, 32, 0.08);
}

.mini {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  max-width: var(--mini-w);
}

.pocket-well {
  flex: 1;
  min-height: var(--mini-h);
  border-radius: 12px;
  border: 1.5px dashed rgba(244, 250, 247, 0.45);
  background: rgba(20, 40, 38, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
}

.socket.on,
.pocket-well.on,
.comp.drop-ok,
.pocket.drop-ok {
  border-style: solid;
  box-shadow: 0 0 0 2px rgba(126, 186, 120, 0.9), 0 0 16px rgba(170, 220, 140, 0.55);
}

.comp.drop-bad,
.pocket.drop-bad,
.column.drop-bad,
.comp.wild.drop-bad {
  animation: shake 180ms ease-in-out;
}

.mini,
.card,
.ghost {
  background: linear-gradient(180deg, #fffdf8, #f3e6d0);
  border: 1px solid #e0cda8;
  box-shadow: 0 4px 0 rgba(90, 62, 32, 0.12), 0 8px 12px var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 4px 6px;
}

.mini {
  height: var(--mini-h);
  border-radius: 10px;
}

.mini b { font-size: 10px; }

.next-cat {
  align-self: center;
  margin: 8px 0 4px;
  background: linear-gradient(180deg, #efe3cc, #e2d0ae);
  box-shadow: none;
  color: #5a4330;
}

.next-cat[hidden] { display: none; }

.mat {
  flex: 1;
  min-height: 0;
  margin: 6px 6px 0;
  padding: 12px 6px 18px;
  overflow: hidden;
  border-radius: 22px 22px 18px 18px;
  background-color: #7e9274;
  background-image:
    linear-gradient(180deg, rgba(244, 239, 230, 0.08), rgba(36, 48, 36, 0.08)),
    url("assets/linen.jpg");
  background-size: auto, 220px 220px;
  box-shadow: inset 0 1px 0 rgba(255, 250, 240, 0.25), 0 8px 16px rgba(42, 33, 24, 0.12);
  position: relative;
  display: flex;
  flex-direction: column;
}

.comp.wild.drop-ok {
  box-shadow:
    0 0 0 2px rgba(126, 186, 120, 0.95),
    0 0 16px rgba(170, 220, 140, 0.55),
    0 3px 0 rgba(120, 84, 28, 0.22);
}

.comp.wild.teach {
  box-shadow:
    0 0 0 3px rgba(232, 197, 106, 0.95),
    0 8px 16px var(--shadow);
}

.mat::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 6px;
  height: 8px;
  border-radius: 8px;
  background: radial-gradient(circle at 8px 4px, transparent 6px, rgba(244, 239, 230, 0.55) 7px);
  background-size: 16px 8px;
  pointer-events: none;
  opacity: 0.7;
}

.columns {
  flex: 1;
  width: 100%;
  min-height: 0;
  height: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  align-items: start;
  padding: 8px 2px;
}

.columns[data-cols="3"] {
  grid-template-columns: repeat(3, 1fr);
  width: 92%;
  margin: 0 auto;
}

.column {
  position: relative;
  min-height: 120px;
  min-width: 0;
}

.column.retired {
  min-height: 88px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.retired-pad {
  width: 78%;
  min-width: 52px;
  min-height: 76px;
  margin-top: 6px;
  border-radius: 14px;
  border: 1.5px dashed rgba(244, 239, 230, 0.38);
  background: rgba(28, 40, 28, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: rgba(244, 239, 230, 0.78);
  pointer-events: none;
}

.retired-check {
  width: 22px;
  height: 22px;
  border-radius: 11px;
  background: rgba(244, 239, 230, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}

.retired-pad b {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.column.drop-ok {
  background: rgba(255, 250, 240, 0.18);
  border-radius: 14px;
  box-shadow: inset 0 0 0 2px rgba(244, 239, 230, 0.55);
}

.column.retired.drop-ok {
  background: none;
  box-shadow: none;
}

.card {
  width: var(--card-w);
  max-width: calc(100% - 2px);
  height: var(--card-h);
  border-radius: 12px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  touch-action: none;
}

.card b { font-size: 13px; }

.card.selected {
  outline: 3px solid #e8c56a;
  z-index: 8 !important;
  transform: translateX(-50%) translateY(-6px) scale(1.04);
}

.card.blocked {
  cursor: default;
}

.dock {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px calc(12px + var(--safe-b));
}

.dock .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.dock .btn svg {
  width: 20px;
  height: 20px;
  display: block;
}
.pocket-well .card {
  position: relative;
  left: auto;
  transform: none;
  width: var(--mini-w);
  height: var(--mini-h);
}
.pocket-well .card b { font-size: 10px; }
.card.teach {
  box-shadow: 0 0 0 3px rgba(232, 197, 106, 0.95), 0 8px 16px var(--shadow);
}
.comp.teach {
  box-shadow: 0 0 0 3px rgba(126, 186, 120, 0.95);
}
.btn-ghost {
  background: rgba(255, 250, 240, 0.82);
  color: #7a4a28;
  border: 1.5px solid rgba(201, 120, 92, 0.55);
  box-shadow: 0 3px 0 rgba(122, 74, 40, 0.16);
}

.btn-fill {
  background: linear-gradient(180deg, #7f9a74, #5f7358);
  color: #f7faf4;
  box-shadow: 0 3px 0 #4a5c44;
}

.toast {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 88px;
  z-index: 30;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(42, 33, 24, 0.92);
  color: #fff6e8;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.toast[hidden] { display: none; }

.ghost {
  position: absolute;
  width: var(--card-w);
  height: var(--card-h);
  border-radius: 12px;
  z-index: 40;
  pointer-events: none;
  opacity: 0.96;
  transform: scale(1.06);
}

.ghost[hidden] { display: none; }

.overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(42, 33, 24, 0.42);
}

.overlay[hidden] { display: none; }

.sheet {
  width: min(320px, 100%);
  background: #fffaf2;
  border-radius: 22px;
  padding: 22px 18px 18px;
  text-align: center;
  box-shadow: 0 18px 40px rgba(42, 33, 24, 0.28);
}

.sheet h3 {
  margin: 0 0 8px;
  font-size: 24px;
  color: #3a2a18;
}

.sheet p {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.45;
  color: #5a4330;
  font-weight: 600;
}

.ov-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ov-actions .btn,
.ov-actions .cta {
  width: 100%;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  30% { transform: translateX(-6px) rotate(-2deg); }
  60% { transform: translateX(6px) rotate(2deg); }
}

@media (max-width: 370px) {
  :root {
    --card-w: 68px;
    --card-h: 92px;
    --peek: 32px;
    --mini-w: 42px;
    --mini-h: 56px;
  }
  .drawer { padding: 0 12px; }
  .mat { margin-left: 4px; margin-right: 4px; }
  .drawer-frame { padding: 8px; gap: 6px; }
  .comp-label { font-size: 12px; }
  .level-pick { width: 42px; height: 42px; }
}

@media (min-width: 390px) {
  :root {
    --card-w: 82px;
    --card-h: 110px;
    --peek: 40px;
    --mini-w: 54px;
    --mini-h: 72px;
  }
}

@media (min-width: 430px) {
  :root {
    --card-w: 88px;
    --card-h: 116px;
  }
}

@media (max-height: 780px) {
  :root {
    --card-w: clamp(70px, 19.5vw, 78px);
    --card-h: clamp(94px, 25.5vw, 104px);
    --peek: 30px;
    --mini-w: 44px;
    --mini-h: 56px;
  }
  #wordmark { font-size: 36px; }
  .hud { min-height: 48px; padding-top: 6px; }
  .hint { margin-top: 4px; margin-bottom: 5px; min-height: 34px; padding-top: 7px; padding-bottom: 7px; font-size: 13px; }
  .settled { padding-bottom: 4px; }
  .drawer-frame { padding: 7px; gap: 6px; }
  .drawer[data-pocket="on"] .drawer-frame {
    grid-template-rows: 96px 56px;
  }
  .comp { min-height: 88px; padding: 6px; gap: 4px; }
  .pocket { min-height: 56px; padding: 5px 6px; gap: 6px; }
  .drawer[data-pocket="on"] #pocket {
    flex-direction: row;
    align-items: center;
  }
  .drawer[data-pocket="on"] #pocket .comp-label {
    flex: 0 0 64px;
    min-height: 0;
  }
  .drawer[data-pocket="on"] #pocket .pocket-well {
    min-height: 44px;
    height: 44px;
  }
  .drawer[data-pocket="on"] #pocket .card {
    width: 34px;
    height: 44px;
    padding: 2px 2px 3px;
  }
  .drawer[data-pocket="on"] #pocket .card b { font-size: 8px; }
  .next-cat { margin-top: 5px; margin-bottom: 2px; min-height: 32px; }
  .mat { margin-top: 4px; padding-top: 8px; padding-bottom: 14px; }
  .columns { gap: 10px; padding-top: 4px; }
  .retired-pad { min-height: 58px; }
  .dock { padding-top: 8px; padding-bottom: calc(10px + var(--safe-b)); }
}

@media (prefers-reduced-motion: reduce) {
  .card, .comp, .pocket, .column, .ghost, .toast {
    transition: none !important;
    animation: none !important;
  }
}

@media (orientation: landscape) and (max-height: 500px) {
  #app { display: none; }
  .landscape { display: flex; }
}

.art[data-k="teacup"] { background-position: 0% 0%; }
.art[data-k="tea_tin"] { background-position: 33.333% 0%; }
.art[data-k="teapot"] { background-position: 66.666% 0%; }
.art[data-k="flour"] { background-position: 100% 0%; }
.art[data-k="whisk"] { background-position: 0% 50%; }
.art[data-k="rolling_pin"] { background-position: 33.333% 50%; }
.art[data-k="bread"] { background-position: 66.666% 50%; }
.art[data-k="jam"] { background-position: 100% 50%; }
.art[data-k="cereal"] { background-position: 0% 100%; }
.art[data-k="milk"] { background-position: 33.333% 100%; }
.art[data-k="butter"] { background-position: 66.666% 100%; }
.art[data-k="yogurt"] { background-position: 100% 100%; }
