body:has(.lunchbox-game) { margin: 0; background: #fcf8ef; }
.lunchbox-game {
  --ink: #373446;
  --accent: #68517e;
  --muted: #635d6b;
  --paper: #fffaf2;
  max-width: 1080px;
  margin: auto;
  padding: 14px 24px 48px;
  color: var(--ink);
  font-family: var(--ui2-font-family);
}
.lunchbox-game * { box-sizing: border-box; }
.lunchbox-game [hidden] { display: none !important; }
.lb-skip { position: fixed; top: -100px; left: 12px; z-index: 10000; background: white; padding: 12px; }
.lb-skip:focus { top: 12px; }
.lb-back { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-size: 14px; }
.lb-intro {
  display: grid;
  grid-template-columns: 1.14fr 1fr;
  gap: 32px;
  align-items: center;
  background: var(--paper);
  border: 1px solid #e6dac7;
  border-radius: 28px;
  padding: 17px;
}
.lb-intro img, .lb-results img { display: block; width: 100%; height: auto; border-radius: 18px; }
.lb-intro-copy { padding: 12px 12px 12px 0; }
.lb-kicker { color: var(--accent); font-weight: 800; font-size: 12px; letter-spacing: .05em; margin: 0 0 6px; }
.lb-intro h1 { font-size: clamp(29px, 4vw, 47px); line-height: 1.12; letter-spacing: -.045em; margin: 0 0 14px; }
.lb-intro p:not(.lb-kicker) { line-height: 1.55; margin: 0 0 14px; }
.lb-how { border-left: 3px solid #bf9bd6; padding: 5px 0 5px 12px; font-size: 14px; }
.lb-intro .lb-fine { margin: 12px 0 0 !important; font-size: 12px; color: var(--muted); }
.lunchbox-game button {
  min-height: 46px;
  padding: 8px 12px;
  color: var(--ink);
  background: #fffaf7;
  border: 1px solid #cfc0ce;
  border-radius: 13px;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.lunchbox-game button:focus-visible, .lb-back:focus-visible { outline: 3px solid #79568e; outline-offset: 3px; }
.lunchbox-game button:disabled { opacity: .48; cursor: default; }
.lunchbox-game .lb-primary { background: #edcee1; border-color: #a98bac; box-shadow: 0 3px 0 #c6a8ca; }
.lunchbox-game .lb-primary:hover { background: #e8c2da; }
.lb-intro .lb-primary { width: 100%; display: flex; align-items: center; justify-content: space-between; }
.lb-game, .lb-results { scroll-margin-top: 94px; }
.lb-round, .lb-board-head, .lb-name-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.lb-round { margin-bottom: 13px; }
.lb-round h2 { margin: 0; font-size: clamp(22px, 3.5vw, 31px); line-height: 1.15; letter-spacing: -.03em; }
.lb-round ol { display: flex; gap: 4px; list-style: none; padding: 0; margin: 0; }
.lb-round li { display: grid; place-items: center; border-radius: 50%; width: 25px; height: 25px; font-size: 11px; color: var(--accent); background: #f1e6f1; }
.lb-round li[aria-current] { color: white; background: var(--accent); }
.lb-workspace { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.lb-board { background: #edf3de; border: 1px solid #bfcdb2; border-radius: 24px; padding: 17px; box-shadow: 0 4px 0 #dae6cc; }
.lb-board-head { margin-bottom: 11px; }
.lb-board-head span { color: #505e4f; font-size: 12px; }
.lb-boxes { display: grid; grid-template-columns: repeat(var(--columns, 4), minmax(0, 1fr)); gap: 7px; }
.lunchbox-game .lb-box { display: grid; grid-template-rows: auto 1fr auto; justify-items: center; min-width: 0; padding: 3px 2px 5px; background: #ffffff68; border-color: transparent; border-radius: 12px; }
.lunchbox-game .lb-box[aria-pressed="true"] { background: #f7edfa; border: 1px solid #79568e; box-shadow: inset 0 0 0 1px #79568e; }
.lb-position { font-size: 11px; color: var(--muted); line-height: 1.35; }
.lb-bento { width: min(85%, 66px); height: clamp(36px, 7vw, 60px); position: relative; display: grid; place-items: center; margin: 6px 0 7px; }
.lb-bento::before { content: ""; position: absolute; inset: 4px 0 0; border: 1px solid var(--rim); border-radius: 11px; background: var(--base); }
.lb-lid { position: absolute; inset: 0 0 5px; display: grid; place-items: center; background: var(--lid); border: 1px solid var(--rim); box-shadow: inset 0 2px 0 #ffffffa0; color: var(--sticker); border-radius: 11px; font: normal 23px/1 system-ui, sans-serif; transition: transform .28s ease; }
.lb-lid::after { content: ""; position: absolute; bottom: -4px; left: 38%; width: 24%; height: 5px; border-radius: 3px; border: 1px solid var(--rim); background: var(--lid); }
.lb-box.mint { --lid: #c7dfb9; --base: #a8cfa0; --rim: #839e76; --sticker: #4e6b43; }
.lb-box.peach { --lid: #f4c6bc; --base: #e7a798; --rim: #bc8a7d; --sticker: #824558; }
.lb-box.lilac { --lid: #dfc9ed; --base: #cbb0df; --rim: #a28ab5; --sticker: #684380; }
.lb-box.butter { --lid: #f6e2a5; --base: #e6c778; --rim: #ae9656; --sticker: #83631c; }
.lb-box.sky { --lid: #cae0ed; --base: #aed0e4; --rim: #86a9be; --sticker: #456478; }
.lb-rice { position: relative; width: 54%; aspect-ratio: 1.1; background: #fff8e8; border: 1px solid #bea889; border-radius: 58% 58% 43% 43%; z-index: 1; opacity: 0; }
.lb-rice::before { content: "•ᴗ•"; position: absolute; inset: 12% 0 0; text-align: center; font: normal 11px/1.5 system-ui, sans-serif; color: #72594c; }
.is-solved .lb-lid { transform: translateY(-42%) rotate(-9deg); }
.is-solved .lb-rice { opacity: 1; }
.lb-tag { width: 100%; text-align: center; font-size: clamp(10px, 2.9vw, 13px); line-height: 1.25; overflow-wrap: anywhere; }
.lb-name-head { margin: 9px 0 5px; }
.lb-name-head strong { font-size: 14px; }
.lunchbox-game #lb-clear { padding: 6px 8px; background: transparent; border-color: transparent; text-decoration: underline; font-size: 13px; }
.lb-people { display: grid; grid-template-columns: repeat(var(--columns, 4), minmax(0, 1fr)); gap: 6px; }
.lunchbox-game .lb-person { position: relative; padding: 6px 3px; min-width: 44px; font-size: 14px; }
.lb-person[data-labelled="true"]::after { content: "✓"; position: absolute; top: 1px; right: 4px; font-size: 9px; color: #516849; }
.lunchbox-game .lb-person[aria-pressed="true"] { background: #e7d8ef; border-color: #79568e; }
.lb-message { margin: 9px 0 6px; min-height: 2.7em; font-size: 13px; line-height: 1.4; }
.lb-message[data-kind="success"] { color: #365c39; font-weight: 800; }
.lb-message[data-kind="hint"] { color: #79543c; }
.lb-actions { display: flex; gap: 7px; }
.lb-actions .lb-primary { flex: 1; }
.lb-clue-card { background: var(--paper); border: 1px solid #e5d4b9; border-radius: 22px; padding: 17px 19px; }
.lb-clue-card h3 { margin: 0 0 9px; font-size: 18px; }
.lb-clue-card ol { margin: 0; padding-left: 22px; font-size: 15px; line-height: 1.5; }
.lb-clue-card li { padding: 6px 0 6px 2px; }
.lb-clue-card li + li { border-top: 1px dashed #e8dcc9; }
.lb-clue-card li::marker { color: var(--accent); font-weight: 800; }
.lb-results { width: min(100%, 540px); background: var(--paper); margin: 0 auto; padding: 16px; border: 1px solid #e6dac7; border-radius: 25px; }
.lb-results h2 { margin: 16px 0; }
@media (max-width: 680px) {
  .lunchbox-game { padding: 9px 12px 34px; }
  .lb-intro { grid-template-columns: 1fr; gap: 13px; padding: 12px; }
  .lb-intro-copy { padding: 3px; }
  .lb-intro p { font-size: 14px; }
  .lb-intro .lb-kicker { font-size: 11px; }
  .lb-game, .lb-results { scroll-margin-top: 73px; }
  .lb-workspace { grid-template-columns: 1fr; gap: 14px; }
  .lb-board { padding: 10px; }
  .lb-boxes { gap: 4px; }
  .lb-clue-card { padding: 11px 13px; }
  .lb-clue-card ol { font-size: 14px; }
}
@media (max-width: 360px) {
  .lb-round li { width: 19px; height: 19px; }
  .lb-lid { font-size: 19px; }
  .lunchbox-game .lb-person { font-size: 12px; padding-inline: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .lb-lid { transition: none; }
}
