:root {
  --paper: #f4f0e6;
  --sheet: #fffcf5;
  --ink: #302c26;
  --quiet: #716b60;
  --muted: #918a7e;
  --line: #ddd4c5;
  --leaf: #466453;
  --leaf-light: #e5ebdf;
  --wood: #a7794e;
  --toast: #cd9359;
  --alert: #b34c37;
  --amber: #b57c22;
  --focus: #c77931;
  --cell: #e8e6d9;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font:
    15px/1.65 system-ui,
    -apple-system,
    "Malgun Gothic",
    "Apple SD Gothic Neo",
    sans-serif;
  word-break: keep-all;
}
button,
input {
  font: inherit;
}
button {
  color: inherit;
  border: 1px solid var(--line);
  background: var(--sheet);
  border-radius: 9px;
  min-height: 44px;
  padding: 10px 18px;
  font-weight: 650;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
button:hover {
  border-color: var(--leaf);
}
button:active {
  transform: translateY(1px);
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button.primary {
  background: var(--leaf);
  color: var(--sheet);
  border-color: var(--leaf);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
canvas:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
img {
  object-fit: contain;
  max-width: 100%;
}
[hidden] {
  display: none !important;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.skip {
  position: fixed;
  top: -100px;
  left: 12px;
  background: var(--sheet);
  padding: 12px;
  z-index: 20;
}
.skip:focus {
  top: 12px;
}
.site-header {
  max-width: 1080px;
  margin: auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 700;
  text-decoration: none;
  font-size: 13px;
}
.brand img {
  width: 30px;
  height: 30px;
}
.back {
  font-size: 12px;
  color: var(--quiet);
}
main {
  max-width: 980px;
  margin: auto;
  padding: 24px;
}
.game-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.game-nav a {
  padding: 6px 12px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 12px;
  color: var(--quiet);
}
.game-nav a[aria-current] {
  background: var(--leaf-light);
  color: var(--leaf);
  font-weight: 700;
}
.page-title {
  font-size: clamp(24px, 4vw, 32px);
  line-height: 1.3;
  letter-spacing: -1.1px;
  margin: 0 0 10px;
}
.page-copy {
  color: var(--quiet);
  margin: 0 0 24px;
}
.game-panel {
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  scroll-margin-top: 12px;
}
.panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  color: var(--quiet);
}
.panel-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sound {
  font-size: 11px;
  padding: 4px 9px;
  min-height: 32px;
  border-radius: 6px;
}
.game-content {
  position: relative;
  min-height: 360px;
}
.intro {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 24px;
  align-items: center;
  padding: 44px;
}
.intro h2 {
  font-size: 26px;
  line-height: 1.4;
  letter-spacing: -0.8px;
  margin: 0 0 12px;
}
.intro p {
  color: var(--quiet);
  margin: 0 0 24px;
  max-width: 440px;
}
.intro img {
  width: 240px;
  height: 240px;
}
.intro-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.intro small {
  display: block;
  margin-top: 18px;
  font-size: 12px;
  color: var(--quiet);
}
.loading {
  padding: 70px 30px;
  text-align: center;
}
.loading p {
  color: var(--quiet);
}
.round-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 26px 16px;
}
.round-head h2 {
  font-size: 20px;
  line-height: 1.35;
  margin: 0 0 5px;
  letter-spacing: -0.5px;
}
.round-head p {
  font-size: 12px;
  margin: 0;
  color: var(--quiet);
}
.round-counter {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--quiet);
  font-variant-numeric: tabular-nums;
}
.game-message {
  min-height: 26px;
  text-align: center;
  font-size: 12px;
  color: var(--alert);
  padding: 4px 14px;
}
.play-canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 640/430;
  touch-action: none;
  cursor: crosshair;
  border-radius: 14px;
  background: #ede5d5;
}
.cut-wrap {
  padding: 0 24px;
}
.cut-help {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  color: var(--quiet);
  font-size: 12px;
}
.key-controls {
  margin: 0 24px 20px;
  font-size: 12px;
  color: var(--quiet);
}
summary {
  cursor: pointer;
  font-weight: 600;
}
details p {
  font-size: 13px;
  color: var(--quiet);
}
.key-inputs {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 12px;
}
.key-inputs label {
  display: flex;
  gap: 8px;
  align-items: center;
}
.key-inputs input {
  width: 110px;
  accent-color: var(--leaf);
}
.review {
  border-top: 1px solid var(--line);
  padding: 20px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--leaf-light);
}
.review h3 {
  margin: 0 0 4px;
  font-size: 19px;
}
.review p {
  margin: 0;
  color: var(--quiet);
  font-size: 12px;
}
.review strong {
  font-size: 30px;
  font-variant-numeric: tabular-nums;
}
.review-actions {
  display: flex;
  justify-content: flex-end;
  padding: 16px 24px 22px;
}
.half-values {
  display: flex;
  justify-content: center;
  gap: 40px;
  align-items: center;
  padding: 10px 0 14px;
  font-variant-numeric: tabular-nums;
}
.half-values b {
  font-size: 24px;
}
.half-values small {
  display: block;
  color: var(--quiet);
  font-size: 11px;
}
.bag-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 1fr);
  gap: 28px;
  padding: 0 26px 22px;
  align-items: start;
}
.bag-case {
  position: relative;
  background: #c1c9b3;
  padding: 17px;
  border: 1px solid #8e9b7e;
  border-radius: 20px;
  box-shadow: inset 0 0 0 6px #cbd1c0;
}
.bag-handle {
  width: 72px;
  height: 16px;
  border: 5px solid #87957a;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  margin: 0 auto 2px;
}
.bag-board {
  display: grid;
  position: relative;
  isolation: isolate;
  grid-template-columns: repeat(var(--cols), 1fr);
  aspect-ratio: var(--ratio);
  background: #e8e6da;
  border: 1px solid #a7b195;
  border-radius: 6px;
  overflow: hidden;
  touch-action: manipulation;
}
.bag-cell {
  padding: 0;
  min-height: 0;
  border-radius: 0;
  border: 0;
  border-right: 1px solid #c8cdba;
  border-bottom: 1px solid #c8cdba;
  background: transparent;
  z-index: 0;
}
.bag-cell:hover {
  background: #d7ddca;
}
.packed {
  position: absolute;
  min-height: 0;
  padding: 5px;
  border: 1px solid rgba(90, 93, 70, 0.28);
  border-radius: 5px;
  z-index: 2;
  background: var(--piece-color, #d9d7bd);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.packed img {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  pointer-events: none;
}
.packed span {
  position: absolute;
  left: 4px;
  top: 2px;
  background: rgba(255, 252, 245, 0.85);
  font-size: 9px;
  padding: 0 4px;
  border-radius: 3px;
}
.solution-piece {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  border: 2px dashed #657950;
  border-radius: 4px;
  background: #71865118;
  font-size: 11px;
  color: #546445;
  display: grid;
  place-items: center;
}
.bag-case.closed .bag-board:after {
  content: "짐싸기 완료";
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  background: #d0d7c5eb;
  font-weight: 750;
  letter-spacing: 2px;
  animation: zip-close 0.45s ease-out;
}
.bag-case.closed:after {
  content: "";
  position: absolute;
  top: 50%;
  left: 4px;
  right: 4px;
  border-top: 4px dotted #9e8b62;
  z-index: 5;
  animation: zip-close 0.45s ease-out;
}
.tray-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--quiet);
}
.item-tray {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}
.pack-item {
  padding: 8px 4px;
  min-height: 96px;
  position: relative;
  touch-action: none;
  font-size: 11px;
  line-height: 1.3;
}
.pack-item img {
  height: 48px;
  width: 66px;
  display: block;
  margin: 0 auto 5px;
  pointer-events: none;
}
.pack-item small {
  display: block;
  font-size: 10px;
  color: var(--quiet);
  margin-top: 3px;
}
.pack-item.selected {
  background: var(--leaf-light);
  border: 2px solid var(--leaf);
  padding: 7px 3px;
}
.pack-item.placed {
  opacity: 0.35;
}
.bag-controls {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.bag-controls button {
  padding: 7px 10px;
  font-size: 11px;
}
.bag-status {
  font-size: 12px;
  color: var(--leaf);
  min-height: 40px;
  padding: 10px 0;
}
.bag-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.bag-workspace, .bag-inventory {
  min-width: 0;
}
.bag-tools .bag-status {
  min-width: 0;
  line-height: 1.4;
  padding: 0;
}
.bag-tools button {
  padding: 8px 10px;
  font-size: 12px;
}
.bag-board {
  touch-action: none;
}
.bag-board, .item-tray, .bag-tools,
.bag-board *, .item-tray *, .bag-tools * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.bag-board img, .item-tray img {
  -webkit-user-drag: none;
}
.bag-preview {
  position: absolute;
  display: grid;
  place-items: center;
  z-index: 3;
  pointer-events: none;
  border: 2px solid var(--leaf);
  background: #46645330;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}
.bag-preview.invalid {
  border-color: var(--alert);
  background: #b34c3730;
}
.tray-pager {
  display: none;
}
.bag-secondary .snack-instruction {
  margin: 10px 0;
  text-align: left;
}
.bag-more {
  font-size: 12px;
  color: var(--quiet);
}
.bag-more summary {
  cursor: pointer;
  padding: 10px 0;
  min-height: 44px;
}
.packing-clock {
  font-variant-numeric: tabular-nums;
}
.office-stage {
  height: 355px;
  position: relative;
  overflow: hidden;
  background: #e9e6d9;
  margin: 0 24px;
  border-radius: 14px;
  border: 1px solid var(--line);
}
.office-window {
  position: absolute;
  right: 9%;
  top: 25px;
  width: 100px;
  height: 100px;
  background: #d0ded9;
  border: 8px solid #c6b897;
  border-radius: 3px;
}
.office-window:before {
  content: "";
  position: absolute;
  left: 50%;
  height: 100%;
  border-left: 4px solid #c6b897;
}
.office-clock {
  position: absolute;
  left: 30px;
  top: 24px;
  font-size: 12px;
  color: #706a5c;
  border-bottom: 1px solid #c5bcaa;
  padding: 4px 0;
}
.office-partition {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 111px;
  height: 35px;
  background: #bfc7b0;
  border-top: 5px solid #a8b49a;
}
.boss {
  position: absolute;
  right: 11%;
  top: 44px;
  width: 150px;
  height: 190px;
  object-fit: contain;
  transition: transform 0.12s;
}
.boss.warn {
  transform: rotate(-7deg);
}
.worker {
  position: absolute;
  left: 11%;
  bottom: 35px;
  width: 210px;
  height: 235px;
  object-fit: contain;
  z-index: 3;
  transform-origin: center bottom;
}
.office-stage.eating .worker {
  animation: munch 0.23s infinite alternate ease-in-out;
}
.office-desk {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 76px;
  background: #bb9167;
  border-top: 12px solid #ceaa7d;
  z-index: 4;
}
.office-monitor {
  position: absolute;
  left: 6%;
  bottom: 52px;
  width: 80px;
  height: 65px;
  background: #63736a;
  border: 7px solid #c3c7b7;
  border-bottom-width: 12px;
  border-radius: 5px;
  z-index: 5;
}
.cookie-pile {
  position: absolute;
  left: 58%;
  bottom: 24px;
  width: 95px;
  height: 95px;
  z-index: 5;
}
.boss-signal {
  position: absolute;
  right: 16px;
  top: 15px;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12px;
  z-index: 6;
}
.boss-signal.warn {
  background: #fff0d2;
  color: #875c12;
  border-color: #dcc595;
}
.boss-signal.look {
  background: #fae5da;
  color: var(--alert);
  border-color: #debaaa;
}
.crumbs {
  position: absolute;
  left: 34%;
  bottom: 94px;
  font-size: 18px;
  color: #b88345;
  opacity: 0;
  z-index: 5;
  pointer-events: none;
}
.eating .crumbs {
  opacity: 1;
  animation: crumb 0.55s infinite;
}
.snack-hud {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px 10px;
}
.snack-progress {
  flex: 1;
}
.snack-progress label {
  font-size: 12px;
  color: var(--quiet);
}
progress {
  height: 10px;
  width: 100%;
  accent-color: var(--leaf);
  display: block;
}
.snack-time {
  font-variant-numeric: tabular-nums;
  font-size: 22px;
  min-width: 70px;
  text-align: right;
}
.hold-area {
  padding: 12px 24px 24px;
  display: flex;
  gap: 8px;
}
body[data-game="snack"] :is(.hold-area, .office-stage),
body[data-game="snack"] :is(.hold-area, .office-stage) * {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
body[data-game="snack"] .office-stage img {
  -webkit-user-drag: none;
  pointer-events: none;
}
.eat-button {
  flex: 1;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  min-height: 60px;
  font-size: 17px;
  background: var(--leaf);
  color: var(--sheet);
  border-color: var(--leaf);
}
.eat-button.holding {
  background: #314d3c;
  transform: translateY(2px);
}
.hold-area .pause {
  font-size: 12px;
  padding: 8px 12px;
}
.snack-instruction {
  text-align: center;
  font-size: 12px;
  color: var(--quiet);
  margin: 8px 20px 0;
}
.pause-layer {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: #fffaf0f5;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 20px;
}
.pause-layer h2 {
  font-size: 23px;
}
.pause-layer p {
  color: var(--quiet);
  max-width: 340px;
}
.result {
  padding: 30px;
}
.result-main {
  display: grid;
  grid-template-columns: 1fr 180px;
  align-items: center;
  gap: 20px;
}
.result-main h2 {
  font-size: 27px;
  margin: 6px 0;
}
.result-main p {
  color: var(--quiet);
  font-size: 13px;
  margin: 5px 0;
}
.result-art {
  width: 180px;
  height: 180px;
}
.result-score {
  font-size: 58px;
  font-weight: 760;
  line-height: 1.15;
  letter-spacing: -2px;
  font-variant-numeric: tabular-nums;
}
.result-score small {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--quiet);
}
.result-rows {
  list-style: none;
  margin: 22px 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.result-rows li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.result-rows small {
  color: var(--quiet);
  display: block;
  font-size: 11px;
}
.snack-outcome {
  margin: 0 0 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  color: var(--alert);
  font-size: 13px;
  font-weight: 700;
}
.snack-result[data-outcome="won"] .snack-outcome {
  color: var(--leaf);
}
.snack-result .result-main h2 {
  margin: 4px 0 8px;
  font-size: clamp(28px, 5vw, 38px);
}
.snack-result .result-summary {
  margin: 0 0 12px;
  color: var(--ink);
}
.snack-retry {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.snack-retry .primary {
  flex: 1;
  min-height: 48px;
}
.share-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.share-actions button {
  font-size: 13px;
}
.share-message {
  font-size: 12px;
  color: var(--leaf);
  min-height: 28px;
  margin: 8px 0;
}
.copy-fallback {
  width: 100%;
  font-size: 12px;
  padding: 8px;
}
.retry-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 8px;
}
.retry-actions button {
  font-size: 12px;
  background: transparent;
}
.how-to {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 30px;
}
.how-to h2,
.more-games h2 {
  font-size: 17px;
  margin: 0 0 12px;
}
.how-to ol {
  font-size: 13px;
  color: var(--quiet);
  padding-left: 21px;
}
.how-to li {
  margin-bottom: 7px;
}
.how-to details {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  font-size: 13px;
}
.how-to p.note {
  font-size: 12px;
  color: var(--quiet);
}
.ad-zone {
  margin: 32px auto;
  text-align: center;
  padding: 12px 0;
  min-height: 115px;
  max-width: 900px;
  border-block: 1px solid var(--line);
}
.ad-zone small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 8px;
}
.ad-zone ins {
  min-height: 90px;
  max-height: 280px;
}
.more-games {
  margin-top: 32px;
}
.more-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.more-links a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
}
.more-links img {
  width: 62px;
  height: 62px;
}
.more-links span {
  font-size: 14px;
  font-weight: 650;
}
.more-links small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--quiet);
  margin-top: 4px;
}
footer {
  max-width: 980px;
  margin: 36px auto 0;
  padding: 20px 24px 36px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--quiet);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
footer span {
  margin-left: auto;
}
.error {
  padding: 40px;
  text-align: center;
}
.flash {
  animation: flash 0.3s;
}
.noscript {
  padding: 40px;
}
.page-copy:empty {
  display: none;
}
@keyframes munch {
  to {
    transform: translateY(3px) rotate(1.5deg) scale(1.02, 0.99);
  }
}
@keyframes crumb {
  to {
    transform: translate(12px, 14px);
    opacity: 0;
  }
}
@keyframes zip-close {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0);
  }
}
@keyframes flash {
  50% {
    background: #f3ddca;
  }
}
@media (max-width: 680px) {
  main {
    padding: 18px 14px;
  }
  .site-header {
    padding: 12px 16px;
  }
  .game-nav {
    gap: 2px;
    margin-bottom: 16px;
  }
  .game-nav a {
    font-size: 11px;
    padding: 5px 9px;
  }
  .page-title {
    font-size: 25px;
  }
  .page-copy {
    font-size: 13px;
    margin-bottom: 18px;
  }
  .panel-top {
    padding: 10px 14px;
    font-size: 10px;
  }
  .panel-tools {
    gap: 8px;
  }
  #best-record {
    max-width: 110px;
    text-align: right;
  }
  .intro {
    padding: 26px 20px;
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .intro h2 {
    font-size: 23px;
  }
  .intro p {
    font-size: 13px;
    margin-bottom: 18px;
  }
  .intro img {
    grid-row: 1;
    width: 155px;
    height: 155px;
    justify-self: center;
  }
  .intro-actions button {
    font-size: 13px;
    padding: 10px 13px;
  }
  .intro small {
    font-size: 11px;
  }
  .round-head {
    padding: 17px 16px 14px;
    gap: 10px;
  }
  .round-head h2 {
    font-size: 18px;
  }
  .round-head p {
    font-size: 11px;
  }
  .round-counter {
    font-size: 11px;
  }
  .cut-wrap {
    padding: 0 12px;
  }
  .cut-help {
    font-size: 10px;
    gap: 8px;
  }
  .key-controls {
    margin: 0 14px 14px;
  }
  .key-inputs {
    gap: 8px;
  }
  .key-inputs input {
    width: 78px;
  }
  .key-inputs button {
    font-size: 12px;
  }
  .review {
    padding: 16px;
  }
  .review h3 {
    font-size: 18px;
  }
  .review strong {
    font-size: 27px;
  }
  .review-actions {
    padding: 12px 16px 18px;
  }
  .half-values {
    gap: 32px;
    padding: 4px 0 12px;
  }
  .half-values b {
    font-size: 21px;
  }
  .bag-layout {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 0 14px 16px;
  }
  body[data-game="bag"][data-phase="playing"] .round-head,
  body[data-game="bag"][data-phase="paused"] .round-head {
    padding: 12px 14px 8px;
  }
  body[data-game="bag"][data-phase="playing"] .panel-top,
  body[data-game="bag"][data-phase="paused"] .panel-top {
    padding: 6px 12px;
  }
  .bag-handle {
    height: 10px;
  }
  .bag-case {
    padding: 10px;
    max-width: min(100%, calc(35svh * var(--ratio) + 20px));
    margin: auto;
    width: 100%;
    border-radius: 17px;
  }
  .bag-status {
    min-height: 32px;
    padding: 6px 0;
    font-size: 11px;
  }
  .tray-title {
    font-size: 11px;
  }
  .item-tray {
    display: flex;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    scrollbar-width: thin;
    scrollbar-color: var(--muted) transparent;
    gap: 6px;
    padding: 2px 2px 8px;
  }
  .pack-item {
    flex: 0 0 76px;
    min-height: 76px;
    padding: 6px 4px;
    font-size: 11px;
    touch-action: pan-x;
  }
  .pack-item img {
    height: 32px;
    width: 48px;
    margin-bottom: 3px;
  }
  .pack-item.selected {
    padding: 5px 3px;
  }
  .pack-item small {
    font-size: 10px;
  }
  .pack-item .footprint {
    display: none;
  }
  .bag-tools .bag-status {
    font-size: 11px;
    min-height: 0;
  }
  .bag-tools button {
    min-height: 44px;
    padding: 8px;
    font-size: 11px;
  }
  .tray-pager {
    display: flex;
    gap: 4px;
  }
  .tray-pager button {
    min-width: 44px;
    min-height: 44px;
    padding: 4px;
    font-size: 16px;
  }
  .tray-title {
    margin-bottom: 4px;
  }
  .bag-secondary {
    display: flex;
    align-items: start;
    gap: 8px;
    justify-content: space-between;
  }
  .bag-secondary .snack-instruction {
    flex: 1;
    max-width: 190px;
    font-size: 10px;
  }
  .bag-more {
    flex: 0 0 106px;
    font-size: 11px;
  }
  .bag-controls {
    margin-top: 8px;
  }
  .bag-controls button {
    font-size: 10px;
    padding: 6px 8px;
  }
  .office-stage {
    height: 300px;
    margin: 0 12px;
  }
  .worker {
    width: 155px;
    height: 188px;
    left: 6%;
    bottom: 35px;
  }
  .boss {
    width: 116px;
    height: 160px;
    right: 10%;
    top: 40px;
  }
  .office-window {
    width: 80px;
    height: 80px;
    right: 8%;
  }
  .office-monitor {
    left: 3%;
    width: 60px;
    height: 55px;
  }
  .cookie-pile {
    width: 73px;
    height: 73px;
    left: 57%;
    bottom: 25px;
  }
  .boss-signal {
    right: 9px;
    top: 10px;
    font-size: 11px;
  }
  .office-clock {
    font-size: 10px;
    left: 16px;
  }
  .snack-hud {
    padding: 12px 16px 8px;
    gap: 14px;
  }
  .hold-area {
    padding: 12px 14px 18px;
  }
  .eat-button {
    font-size: 15px;
    min-height: 56px;
  }
  .snack-instruction {
    font-size: 11px;
  }
  .snack-time {
    font-size: 20px;
  }
  .result {
    padding: 24px 18px;
  }
  .result-main {
    grid-template-columns: 1fr 95px;
    gap: 6px;
  }
  .result-art {
    width: 95px;
    height: 120px;
  }
  .result-main h2 {
    font-size: 22px;
  }
  .result-main p {
    font-size: 11px;
  }
  .result-score {
    font-size: 46px;
  }
  .result-score small {
    font-size: 12px;
  }
  .snack-result .result-main {
    grid-template-columns: minmax(0, 1fr) 76px;
    gap: 8px;
  }
  .snack-result .result-art {
    width: 76px;
    height: 100px;
  }
  .snack-result .result-score small {
    display: block;
    margin-top: 4px;
  }
  .snack-retry button {
    font-size: 13px;
    padding: 10px 12px;
  }
  .result-rows li {
    font-size: 12px;
  }
  .share-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .share-actions .primary {
    grid-column: 1/-1;
  }
  .share-actions button {
    font-size: 12px;
    padding: 10px 8px;
  }
  .how-to {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 24px;
  }
  .how-to h2 {
    font-size: 16px;
  }
  .more-links {
    grid-template-columns: 1fr;
  }
  .ad-zone {
    margin: 24px auto;
  }
  footer {
    padding: 18px 16px 28px;
    gap: 12px;
  }
  footer span {
    margin-left: 0;
    width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.play-canvas {
  max-width: 640px;
  margin-inline: auto;
}

.footprint {
  display: grid;
  grid-template-columns: repeat(var(--pack-w), 4px);
  gap: 1px;
  width: max-content;
  margin: 5px auto 0;
}
.footprint i {
  width: 4px;
  height: 4px;
  background: #9ba98d;
}
