/* Stardew Valley Quiz Room - Pelican Town pixel farm theme */

/* 1. Room variables */
:root,
body[data-room="stardew-valley"],
.qr-room-stardew-valley {
  --qr-bg: #0d160d;
  --qr-bg-elev: #172617;
  --qr-fg: #fff2d7;
  --qr-fg-dim: #cbbf9d;
  --qr-accent: #79b653;
  --qr-accent-dim: #3f7a34;
  --qr-warn: #f2c45d;
  --qr-danger: #d08339;
  --qr-radius: 6px;
  --qr-stardew-soil: #70462f;
  --qr-stardew-soil-dark: #30221d;
  --qr-stardew-pine: #1f3b24;
  --qr-stardew-grass: #79b653;
  --qr-stardew-crop: #3f7a34;
  --qr-stardew-gold: #f2c45d;
  --qr-stardew-cream: #fff2d7;
  --qr-stardew-sky: #8bc6d9;
  --qr-stardew-purple: #7a4a9b;
  --qr-stardew-stone: #93a08d;
  --qr-stardew-mine: #4d5a6b;
  --qr-stardew-line: rgba(255, 242, 215, 0.18);
  --qr-stardew-shadow: rgba(13, 22, 13, 0.72);
  --qr-scene-spring: url("objects/scene_spring.png");
  --qr-scene-mine: url("objects/scene_mine.png");
  --qr-scene-seasons: url("objects/scene_seasons.png");
  --qr-scene-festival: url("objects/scene_festival.png");
  --qr-scene-meaning: url("objects/scene_meaning.png");
  --qr-stardew-choice-icon: url("objects/seed_packet.png");
}

/* 2. Base typography and room frame */
* { box-sizing: border-box; }
body[data-room="stardew-valley"] {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  color: var(--qr-fg);
  background: linear-gradient(180deg, rgba(139, 198, 217, 0.14) 0%, rgba(31, 59, 36, 0.28) 34%, transparent 64%), linear-gradient(180deg, #152717 0%, var(--qr-bg) 58%, #090d08 100%);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
}
body[data-room="stardew-valley"] #qr-root { width: 100%; max-width: 500px; padding: 24px 16px; }
body[data-room="stardew-valley"] .qr-stage { display: flex; flex-direction: column; gap: 16px; }
body[data-room="stardew-valley"] .qr-progress {
  color: var(--qr-stardew-gold);
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
  letter-spacing: 0;
  text-align: right;
  text-shadow: 0 2px 0 var(--qr-stardew-soil-dark);
}
body[data-room="stardew-valley"] .qr-board {
  position: relative;
  min-height: 340px;
  padding: 18px 16px 20px;
  overflow: hidden;
  color: var(--qr-fg);
  background: linear-gradient(180deg, rgba(255, 242, 215, 0.05), rgba(13, 22, 13, 0.12)), var(--qr-bg-elev);
  border: 2px solid var(--qr-accent-dim);
  border-radius: var(--qr-radius);
  box-shadow: 0 10px 0 rgba(0, 0, 0, 0.22), inset 0 0 0 1px rgba(255, 242, 215, 0.06);
}
body[data-room="stardew-valley"] .qr-board::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 8px;
  background: repeating-linear-gradient(90deg, var(--qr-stardew-gold) 0 10px, var(--qr-stardew-crop) 10px 20px, var(--qr-stardew-purple) 20px 30px);
  opacity: 0.62;
  pointer-events: none;
}
body[data-room="stardew-valley"] .qr-board h1,
body[data-room="stardew-valley"] .qr-board h2,
body[data-room="stardew-valley"] .qr-board h3,
body[data-room="stardew-valley"] .qr-choice-prompt h1,
body[data-room="stardew-valley"] .qr-choice-prompt h2,
body[data-room="stardew-valley"] .qr-choice-prompt h3 {
  color: var(--qr-stardew-gold);
  font-family: "Press Start 2P", monospace;
  letter-spacing: 0;
  line-height: 1.45;
  text-shadow: 0 2px 0 var(--qr-stardew-soil-dark);
}
body[data-room="stardew-valley"] .qr-choice-prompt { margin: 0 0 14px; }
body[data-room="stardew-valley"] .qr-choice-prompt h2,
body[data-room="stardew-valley"] .qr-board h2 { margin: 0 0 8px; font-size: 14px; text-transform: uppercase; }
body[data-room="stardew-valley"] .qr-choice-prompt p { margin: 0; color: var(--qr-fg-dim); font-size: 14px; line-height: 1.55; }
body[data-room="stardew-valley"] .qr-scene {
  display: block;
  width: 100%;
  height: auto;
  max-height: 172px;
  object-fit: cover;
  margin: 0 0 16px;
  border: 2px solid var(--qr-stardew-line);
  border-radius: var(--qr-radius);
  background: var(--qr-bg);
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.24);
  animation: qr-stardew-scene-in 360ms ease-out both;
}

/* 3. Shared choice, counter, status, and result styling */
body[data-room="stardew-valley"] .qr-choice-list { display: grid; grid-template-columns: 1fr; gap: 9px; margin: 0 0 12px; }
body[data-room="stardew-valley"] .qr-choice {
  position: relative;
  appearance: none;
  min-height: 62px;
  padding: 12px 12px 12px 58px;
  overflow: hidden;
  color: var(--qr-fg);
  background: linear-gradient(180deg, rgba(255, 242, 215, 0.05), rgba(0, 0, 0, 0.08)), var(--qr-bg);
  border: 2px solid rgba(121, 182, 83, 0.44);
  border-radius: var(--qr-radius);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.22);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
  touch-action: manipulation;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
  overflow-wrap: anywhere;
}
body[data-room="stardew-valley"] .qr-choice::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 34px;
  height: 34px;
  transform: translateY(-50%);
  background: var(--qr-stardew-choice-icon) center / contain no-repeat;
  image-rendering: pixelated;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.34));
  animation: qr-stardew-prop-bob 3.4s ease-in-out infinite;
}
body[data-room="stardew-valley"] .qr-choice::after { content: ""; position: absolute; left: 49px; top: 10px; bottom: 10px; width: 1px; background: linear-gradient(180deg, transparent, var(--qr-stardew-line), transparent); }
body[data-room="stardew-valley"] .qr-choice:hover:not(:disabled),
body[data-room="stardew-valley"] .qr-choice:focus-visible { border-color: var(--qr-stardew-gold); outline: none; animation: qr-stardew-choice-lift 180ms ease-out both; }
body[data-room="stardew-valley"] .qr-choice.picked { color: var(--qr-stardew-soil-dark); background: linear-gradient(180deg, rgba(255, 242, 215, 0.96), rgba(242, 196, 93, 0.82)); border-color: var(--qr-stardew-gold); box-shadow: 0 5px 0 rgba(112, 70, 47, 0.84); }
body[data-room="stardew-valley"] .qr-choice:disabled:not(.picked) { opacity: 0.55; cursor: not-allowed; filter: grayscale(0.35); }
body[data-room="stardew-valley"] .qr-choice-name { display: block; margin-bottom: 5px; color: var(--qr-stardew-gold); font-family: "Press Start 2P", monospace; font-size: 10px; letter-spacing: 0; line-height: 1.45; text-transform: uppercase; }
body[data-room="stardew-valley"] .qr-choice.picked .qr-choice-name { color: var(--qr-stardew-soil-dark); }
body[data-room="stardew-valley"] .qr-btn {
  appearance: none;
  width: 100%;
  min-height: 44px;
  margin-top: 16px;
  padding: 12px 18px;
  color: var(--qr-stardew-soil-dark);
  background: linear-gradient(180deg, var(--qr-stardew-gold), #d9a879);
  border: 2px solid var(--qr-stardew-soil);
  border-radius: var(--qr-radius);
  box-shadow: 0 4px 0 var(--qr-stardew-soil);
  font-family: "Press Start 2P", monospace;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 100ms ease, filter 100ms ease, box-shadow 100ms ease;
}
body[data-room="stardew-valley"] .qr-btn:hover:not(:disabled),
body[data-room="stardew-valley"] .qr-btn:focus-visible { transform: translateY(-1px); filter: brightness(1.06); outline: none; }
body[data-room="stardew-valley"] .qr-btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 2px 0 var(--qr-stardew-soil); }
body[data-room="stardew-valley"] .qr-btn:disabled { opacity: 0.52; cursor: not-allowed; filter: grayscale(0.42); }
body[data-room="stardew-valley"] .qr-btn-sm { min-height: 44px; width: auto; margin-top: 0; padding: 8px 12px; font-size: 10px; }
body[data-room="stardew-valley"] .qr-counter,
body[data-room="stardew-valley"] .qr-status { min-height: 36px; margin: 0 0 12px; padding: 9px 10px; color: var(--qr-fg-dim); background: rgba(13, 22, 13, 0.76); border: 1px solid var(--qr-stardew-line); border-radius: var(--qr-radius); font-family: "Press Start 2P", monospace; font-size: 10px; letter-spacing: 0; line-height: 1.45; text-align: center; }
body[data-room="stardew-valley"] .qr-counter span,
body[data-room="stardew-valley"] .qr-status span { color: var(--qr-stardew-gold); }
body[data-room="stardew-valley"] .qr-counter.complete,
body[data-room="stardew-valley"] .qr-status.win { color: var(--qr-stardew-grass); border-color: var(--qr-stardew-grass); }
body[data-room="stardew-valley"] .qr-status.warn { color: var(--qr-stardew-gold); }
body[data-room="stardew-valley"] .qr-status.bad { color: var(--qr-danger); animation: qr-stardew-status-shake 260ms ease-out; }
body[data-room="stardew-valley"] .qr-result { color: var(--qr-fg); text-align: center; padding: 24px 0; }
body[data-room="stardew-valley"] .qr-result-sprite { width: 224px; height: 224px; object-fit: contain; image-rendering: pixelated; border: 4px solid var(--qr-stardew-gold); border-radius: var(--qr-radius); background: linear-gradient(180deg, rgba(139, 198, 217, 0.12), rgba(63, 122, 52, 0.10)), var(--qr-bg); box-shadow: 0 8px 0 rgba(0, 0, 0, 0.22); animation: qr-stardew-sprite-enter 520ms ease-out both; }
body[data-room="stardew-valley"] .qr-result-eyebrow,
body[data-room="stardew-valley"] .qr-result-dossier-eyebrow { color: var(--qr-stardew-gold); }
body[data-room="stardew-valley"] .qr-result-name { color: var(--qr-fg) !important; font-family: "Press Start 2P", monospace; font-size: 19px; letter-spacing: 0; line-height: 1.35; text-shadow: 0 2px 0 var(--qr-stardew-soil-dark); }
body[data-room="stardew-valley"] .qr-result-tagline { color: var(--qr-fg-dim); }
body[data-room="stardew-valley"] .qr-result-receipts.qr-result-dossier,
body[data-room="stardew-valley"] .qr-result-receipts { color: var(--qr-fg-dim); background: linear-gradient(180deg, rgba(255, 242, 215, 0.07), rgba(13, 22, 13, 0.28)), var(--qr-bg-elev); border: 1px solid var(--qr-stardew-line); border-radius: var(--qr-radius); }

/* 4. Puzzle 1: stardew-spring, spring planting */
body[data-room="stardew-valley"] .qr-stardew-spring,
body[data-room="stardew-valley"] .qr-board:has(img.qr-scene[src$="scene_spring.png"]) { --qr-stardew-choice-icon: url("objects/parsnip.png"); border-color: rgba(121, 182, 83, 0.72); }
body[data-room="stardew-valley"] .qr-stardew-spring .qr-scene,
body[data-room="stardew-valley"] .qr-board:has(img.qr-scene[src$="scene_spring.png"]) .qr-scene { border-color: rgba(121, 182, 83, 0.72); background: var(--qr-stardew-sky); }
body[data-room="stardew-valley"] .qr-stardew-spring .qr-choice-prompt,
body[data-room="stardew-valley"] .qr-board:has(img.qr-scene[src$="scene_spring.png"]) .qr-choice-prompt { padding-left: 11px; border-left: 3px solid var(--qr-stardew-grass); }
body[data-room="stardew-valley"] .qr-stardew-spring .qr-choice:nth-child(1),
body[data-room="stardew-valley"] .qr-board:has(img.qr-scene[src$="scene_spring.png"]) .qr-choice:nth-child(1) { --qr-stardew-choice-icon: url("objects/seed_packet.png"); }
body[data-room="stardew-valley"] .qr-stardew-spring .qr-choice:nth-child(2),
body[data-room="stardew-valley"] .qr-board:has(img.qr-scene[src$="scene_spring.png"]) .qr-choice:nth-child(2) { --qr-stardew-choice-icon: url("objects/watering_can.png"); }
body[data-room="stardew-valley"] .qr-stardew-spring .qr-choice:nth-child(3),
body[data-room="stardew-valley"] .qr-board:has(img.qr-scene[src$="scene_spring.png"]) .qr-choice:nth-child(3) { --qr-stardew-choice-icon: url("objects/parsnip.png"); }
body[data-room="stardew-valley"] .qr-stardew-spring .qr-choice.picked,
body[data-room="stardew-valley"] .qr-board:has(img.qr-scene[src$="scene_spring.png"]) .qr-choice.picked { box-shadow: 0 5px 0 #3f7a34; }

/* 5. Puzzle 2: stardew-mine, mine descent */
body[data-room="stardew-valley"] .qr-stardew-mine,
body[data-room="stardew-valley"] .qr-board:has(img.qr-scene[src$="scene_mine.png"]) { --qr-stardew-choice-icon: url("objects/pickaxe.png"); border-color: rgba(147, 160, 141, 0.58); background: linear-gradient(180deg, rgba(77, 90, 107, 0.34), rgba(13, 22, 13, 0.18)), var(--qr-bg-elev); }
body[data-room="stardew-valley"] .qr-stardew-mine .qr-scene,
body[data-room="stardew-valley"] .qr-board:has(img.qr-scene[src$="scene_mine.png"]) .qr-scene { border-color: rgba(147, 160, 141, 0.72); box-shadow: 0 5px 0 rgba(48, 34, 29, 0.72), 0 0 18px rgba(122, 74, 155, 0.16); }
body[data-room="stardew-valley"] .qr-stardew-mine .qr-choice-prompt,
body[data-room="stardew-valley"] .qr-board:has(img.qr-scene[src$="scene_mine.png"]) .qr-choice-prompt { padding: 12px; background: rgba(13, 22, 13, 0.52); border: 1px solid rgba(147, 160, 141, 0.34); border-radius: var(--qr-radius); }
body[data-room="stardew-valley"] .qr-stardew-mine .qr-choice:nth-child(1),
body[data-room="stardew-valley"] .qr-board:has(img.qr-scene[src$="scene_mine.png"]) .qr-choice:nth-child(1) { --qr-stardew-choice-icon: url("objects/pickaxe.png"); }
body[data-room="stardew-valley"] .qr-stardew-mine .qr-choice:nth-child(2),
body[data-room="stardew-valley"] .qr-board:has(img.qr-scene[src$="scene_mine.png"]) .qr-choice:nth-child(2) { --qr-stardew-choice-icon: url("objects/sword.png"); }
body[data-room="stardew-valley"] .qr-stardew-mine .qr-choice:nth-child(3),
body[data-room="stardew-valley"] .qr-board:has(img.qr-scene[src$="scene_mine.png"]) .qr-choice:nth-child(3) { --qr-stardew-choice-icon: url("objects/amethyst.png"); }
body[data-room="stardew-valley"] .qr-stardew-mine .qr-choice.picked,
body[data-room="stardew-valley"] .qr-board:has(img.qr-scene[src$="scene_mine.png"]) .qr-choice.picked { color: var(--qr-fg); background: linear-gradient(180deg, rgba(122, 74, 155, 0.88), rgba(77, 90, 107, 0.88)); }

/* 6. Puzzle 3: stardew-seasons, Four-Season Plan */
body[data-room="stardew-valley"] .qr-stardew-seasons { display: flex; flex-direction: column; gap: 14px; position: relative; }
body[data-room="stardew-valley"] .qr-stardew-seasons .qr-scene { border-color: rgba(242, 196, 93, 0.72); box-shadow: 0 5px 0 rgba(112, 70, 47, 0.38); }
body[data-room="stardew-valley"] .qr-stardew-seasons-prompt { padding-left: 11px; border-left: 3px solid var(--qr-stardew-gold); }
body[data-room="stardew-valley"] .qr-stardew-seasons-prompt h2 { margin: 0 0 6px; font-size: 14px; }
body[data-room="stardew-valley"] .qr-stardew-seasons-prompt p { margin: 0; color: var(--qr-fg-dim); font-size: 14px; line-height: 1.55; }
body[data-room="stardew-valley"] .qr-stardew-seasons-status { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; color: var(--qr-fg-dim); font-family: "Press Start 2P", monospace; font-size: 9px; letter-spacing: 0; text-align: center; }
body[data-room="stardew-valley"] .qr-stardew-seasons-status span { padding: 9px 6px; background: rgba(13, 22, 13, 0.72); border: 1px solid var(--qr-stardew-line); border-radius: var(--qr-radius); }
body[data-room="stardew-valley"] .qr-stardew-seasons-status strong { display: block; margin-top: 4px; color: var(--qr-stardew-gold); font-size: 12px; }
body[data-room="stardew-valley"] .qr-stardew-seasons-grid { display: flex; flex-direction: column; gap: 6px; }
body[data-room="stardew-valley"] .qr-stardew-seasons-row { display: grid; grid-template-columns: 70px repeat(6, minmax(44px, 1fr)); gap: 4px; align-items: stretch; padding: 6px; border: 2px solid var(--qr-accent-dim); border-radius: var(--qr-radius); }
body[data-room="stardew-valley"] .qr-stardew-seasons-row[data-season="spring"] { background: rgba(121, 182, 83, 0.20); }
body[data-room="stardew-valley"] .qr-stardew-seasons-row[data-season="summer"] { background: rgba(242, 196, 93, 0.18); }
body[data-room="stardew-valley"] .qr-stardew-seasons-row[data-season="fall"] { background: rgba(208, 131, 57, 0.20); }
body[data-room="stardew-valley"] .qr-stardew-seasons-row[data-season="winter"] { background: rgba(139, 198, 217, 0.18); }
body[data-room="stardew-valley"] .qr-stardew-seasons-rowlabel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4px; color: var(--qr-fg); font-family: "Press Start 2P", monospace; font-size: 10px; letter-spacing: 0; text-align: center; }
body[data-room="stardew-valley"] .qr-stardew-seasons-rowlabel .season-icon { margin-bottom: 4px; font-size: 16px; }
body[data-room="stardew-valley"] .qr-stardew-seasons-slot { appearance: none; min-width: 44px; min-height: 56px; padding: 4px; color: var(--qr-fg); background: rgba(13, 22, 13, 0.58); border: 2px dashed rgba(255, 242, 215, 0.28); border-radius: var(--qr-radius); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; position: relative; text-align: center; line-height: 1.2; transition: transform 90ms ease, border-color 120ms ease, background 120ms ease; }
body[data-room="stardew-valley"] .qr-stardew-seasons-slot:hover,
body[data-room="stardew-valley"] .qr-stardew-seasons-slot:focus-visible { border-color: var(--qr-stardew-gold); outline: none; }
body[data-room="stardew-valley"] .qr-stardew-seasons-slot[aria-pressed="true"] { border-style: solid; border-color: var(--qr-stardew-gold); background: rgba(112, 70, 47, 0.54); }
body[data-room="stardew-valley"] .qr-stardew-seasons-slot.is-festival::before { content: "*"; position: absolute; top: 3px; right: 5px; color: var(--qr-stardew-gold); font-size: 12px; }
body[data-room="stardew-valley"] .qr-stardew-seasons-slot.withered { filter: grayscale(0.86) brightness(0.74); border-color: rgba(208, 131, 57, 0.72); animation: qr-stardew-wither 360ms ease-out; }
body[data-room="stardew-valley"] .qr-stardew-seasons-slot.bonus { border-color: var(--qr-stardew-gold); box-shadow: 0 0 0 1px rgba(242, 196, 93, 0.42); }
body[data-room="stardew-valley"] .qr-stardew-seasons-slot.growing { animation: qr-stardew-grow 600ms ease-out; }
body[data-room="stardew-valley"] .qr-stardew-seasons-slot .crop-name { font-family: "Press Start 2P", monospace; font-size: 8px; letter-spacing: 0; overflow-wrap: anywhere; }
body[data-room="stardew-valley"] .qr-stardew-seasons-slot .crop-icon { font-size: 14px; }
body[data-room="stardew-valley"] .qr-stardew-seasons-palette-label { margin-bottom: 6px; color: var(--qr-fg-dim); font-family: "Press Start 2P", monospace; font-size: 10px; letter-spacing: 0; }
body[data-room="stardew-valley"] .qr-stardew-seasons-palette { display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; padding: 6px 4px 12px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
body[data-room="stardew-valley"] .qr-stardew-seasons-palette::-webkit-scrollbar { height: 6px; }
body[data-room="stardew-valley"] .qr-stardew-seasons-palette::-webkit-scrollbar-thumb { background: rgba(242, 196, 93, 0.44); border-radius: 3px; }
body[data-room="stardew-valley"] .qr-stardew-crop { appearance: none; flex: 0 0 112px; min-height: 90px; padding: 8px 6px; color: var(--qr-fg); background: rgba(13, 22, 13, 0.72); border: 2px solid var(--qr-accent-dim); border-radius: var(--qr-radius); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 4px; scroll-snap-align: start; transition: transform 100ms ease, border-color 120ms ease, opacity 160ms ease; }
body[data-room="stardew-valley"] .qr-stardew-crop:hover,
body[data-room="stardew-valley"] .qr-stardew-crop:focus-visible { transform: translateY(-2px); border-color: var(--qr-stardew-gold); outline: none; }
body[data-room="stardew-valley"] .qr-stardew-crop[aria-pressed="true"] { border-color: var(--qr-stardew-gold); box-shadow: 0 0 0 2px rgba(242, 196, 93, 0.28); }
body[data-room="stardew-valley"] .qr-stardew-crop.is-planted { opacity: 0.35; pointer-events: none; }
body[data-room="stardew-valley"] .qr-stardew-crop .crop-title { font-family: "Press Start 2P", monospace; font-size: 9px; letter-spacing: 0; line-height: 1.25; text-align: center; }
body[data-room="stardew-valley"] .qr-stardew-crop .crop-meta { display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 9px; opacity: 0.86; }
body[data-room="stardew-valley"] .qr-stardew-crop .crop-festival { padding: 2px 4px; color: var(--qr-stardew-gold); background: rgba(242, 196, 93, 0.16); border-radius: 3px; font-size: 8px; }
body[data-room="stardew-valley"] .qr-stardew-crop[data-season="spring"] { border-top: 4px solid var(--qr-stardew-grass); }
body[data-room="stardew-valley"] .qr-stardew-crop[data-season="summer"] { border-top: 4px solid var(--qr-stardew-gold); }
body[data-room="stardew-valley"] .qr-stardew-crop[data-season="fall"] { border-top: 4px solid var(--qr-danger); }
body[data-room="stardew-valley"] .qr-stardew-crop[data-season="winter"] { border-top: 4px solid var(--qr-stardew-sky); }
body[data-room="stardew-valley"] .qr-stardew-crop[data-season="any"] { border-top: 4px solid var(--qr-stardew-purple); }
body[data-room="stardew-valley"] .qr-stardew-seasons-actions { display: flex; gap: 8px; }
body[data-room="stardew-valley"] .qr-stardew-seasons-actions .qr-btn { flex: 1; width: auto; margin-top: 0; }
body[data-room="stardew-valley"] .qr-stardew-seasons-result { margin-top: 8px; padding: 12px; color: var(--qr-stardew-gold); background: rgba(13, 22, 13, 0.76); border: 1px solid var(--qr-stardew-line); border-radius: var(--qr-radius); font-family: "Press Start 2P", monospace; font-size: 11px; letter-spacing: 0; line-height: 1.6; text-align: center; animation: qr-stardew-pop 280ms ease-out; }
body[data-room="stardew-valley"] .qr-stardew-seasons[hidden],
body[data-room="stardew-valley"] .qr-stardew-seasons-actions[hidden],
body[data-room="stardew-valley"] .qr-stardew-seasons-result[hidden],
body[data-room="stardew-valley"] .qr-stardew-seasons-palette[hidden],
body[data-room="stardew-valley"] .qr-stardew-seasons-grid[hidden] { display: none !important; }

/* 7. Puzzle 4: stardew-festival, festival choice */
body[data-room="stardew-valley"] .qr-stardew-festival,
body[data-room="stardew-valley"] .qr-board:has(img.qr-scene[src$="scene_festival.png"]) { --qr-stardew-choice-icon: url("objects/star_token.png"); border-color: rgba(242, 196, 93, 0.72); }
body[data-room="stardew-valley"] .qr-stardew-festival .qr-scene,
body[data-room="stardew-valley"] .qr-board:has(img.qr-scene[src$="scene_festival.png"]) .qr-scene { border-color: rgba(242, 196, 93, 0.78); box-shadow: 0 5px 0 rgba(208, 131, 57, 0.34); }
body[data-room="stardew-valley"] .qr-stardew-festival .qr-choice-prompt,
body[data-room="stardew-valley"] .qr-board:has(img.qr-scene[src$="scene_festival.png"]) .qr-choice-prompt { padding: 12px; background: linear-gradient(90deg, rgba(242, 196, 93, 0.14), rgba(122, 74, 155, 0.12)); border: 1px solid rgba(242, 196, 93, 0.42); border-radius: var(--qr-radius); }
body[data-room="stardew-valley"] .qr-stardew-festival .qr-choice:nth-child(1),
body[data-room="stardew-valley"] .qr-board:has(img.qr-scene[src$="scene_festival.png"]) .qr-choice:nth-child(1) { --qr-stardew-choice-icon: url("objects/storybook.png"); }
body[data-room="stardew-valley"] .qr-stardew-festival .qr-choice:nth-child(2),
body[data-room="stardew-valley"] .qr-board:has(img.qr-scene[src$="scene_festival.png"]) .qr-choice:nth-child(2) { --qr-stardew-choice-icon: url("objects/chicken.png"); }
body[data-room="stardew-valley"] .qr-stardew-festival .qr-choice:nth-child(3),
body[data-room="stardew-valley"] .qr-board:has(img.qr-scene[src$="scene_festival.png"]) .qr-choice:nth-child(3) { --qr-stardew-choice-icon: url("objects/star_token.png"); }
body[data-room="stardew-valley"] .qr-stardew-festival .qr-choice.picked,
body[data-room="stardew-valley"] .qr-board:has(img.qr-scene[src$="scene_festival.png"]) .qr-choice.picked { box-shadow: 0 5px 0 #7a4a9b; }

/* 8. Puzzle 5: stardew-meaning, late-game meaning */
body[data-room="stardew-valley"] .qr-stardew-meaning,
body[data-room="stardew-valley"] .qr-board:has(img.qr-scene[src$="scene_meaning.png"]) { --qr-stardew-choice-icon: url("objects/ancient_fruit.png"); border-color: rgba(139, 198, 217, 0.66); background: linear-gradient(180deg, rgba(139, 198, 217, 0.12), rgba(122, 74, 155, 0.12)), var(--qr-bg-elev); }
body[data-room="stardew-valley"] .qr-stardew-meaning .qr-scene,
body[data-room="stardew-valley"] .qr-board:has(img.qr-scene[src$="scene_meaning.png"]) .qr-scene { border-color: rgba(139, 198, 217, 0.76); box-shadow: 0 5px 0 rgba(48, 34, 29, 0.54), 0 0 18px rgba(139, 198, 217, 0.14); }
body[data-room="stardew-valley"] .qr-stardew-meaning .qr-choice-prompt,
body[data-room="stardew-valley"] .qr-board:has(img.qr-scene[src$="scene_meaning.png"]) .qr-choice-prompt { padding-left: 11px; border-left: 3px solid var(--qr-stardew-sky); }
body[data-room="stardew-valley"] .qr-stardew-meaning .qr-choice:nth-child(1),
body[data-room="stardew-valley"] .qr-board:has(img.qr-scene[src$="scene_meaning.png"]) .qr-choice:nth-child(1) { --qr-stardew-choice-icon: url("objects/ancient_fruit.png"); }
body[data-room="stardew-valley"] .qr-stardew-meaning .qr-choice:nth-child(2),
body[data-room="stardew-valley"] .qr-board:has(img.qr-scene[src$="scene_meaning.png"]) .qr-choice:nth-child(2) { --qr-stardew-choice-icon: url("objects/storybook.png"); }
body[data-room="stardew-valley"] .qr-stardew-meaning .qr-choice:nth-child(3),
body[data-room="stardew-valley"] .qr-board:has(img.qr-scene[src$="scene_meaning.png"]) .qr-choice:nth-child(3) { --qr-stardew-choice-icon: url("objects/chicken.png"); }
body[data-room="stardew-valley"] .qr-stardew-meaning .qr-choice.picked,
body[data-room="stardew-valley"] .qr-board:has(img.qr-scene[src$="scene_meaning.png"]) .qr-choice.picked { color: var(--qr-stardew-soil-dark); background: linear-gradient(180deg, rgba(139, 198, 217, 0.92), rgba(255, 242, 215, 0.82)); }

/* 9. Animations */
@keyframes qr-stardew-scene-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes qr-stardew-prop-bob { 0%, 100% { transform: translateY(-50%); } 50% { transform: translateY(calc(-50% - 3px)); } }
@keyframes qr-stardew-choice-lift { from { transform: translateY(0); } to { transform: translateY(-2px); } }
@keyframes qr-stardew-sprite-enter { from { opacity: 0; transform: translateY(10px) scale(0.92); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes qr-stardew-status-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@keyframes qr-stardew-grow { 0% { opacity: 0; transform: scale(0.42); } 60% { opacity: 1; transform: scale(1.1); } 100% { opacity: 1; transform: scale(1); } }
@keyframes qr-stardew-wither { 0% { background: rgba(208, 131, 57, 0.55); } 100% { background: rgba(13, 22, 13, 0.58); } }
@keyframes qr-stardew-pop { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

/* 10. Mobile and reduced motion */
@media (max-width: 520px) {
  body[data-room="stardew-valley"] #qr-root { padding: 18px 12px; }
  body[data-room="stardew-valley"] .qr-board { min-height: 320px; padding: 16px 12px 18px; }
  body[data-room="stardew-valley"] .qr-scene { max-height: 150px; margin-bottom: 14px; }
  body[data-room="stardew-valley"] .qr-choice-prompt h2,
  body[data-room="stardew-valley"] .qr-board h2,
  body[data-room="stardew-valley"] .qr-stardew-seasons-prompt h2 { font-size: 12px; line-height: 1.5; }
  body[data-room="stardew-valley"] .qr-choice-prompt p,
  body[data-room="stardew-valley"] .qr-stardew-seasons-prompt p { font-size: 13px; }
  body[data-room="stardew-valley"] .qr-choice,
  body[data-room="stardew-valley"] .qr-btn,
  body[data-room="stardew-valley"] .qr-btn-sm,
  body[data-room="stardew-valley"] .qr-stardew-crop,
  body[data-room="stardew-valley"] .qr-stardew-seasons-slot { min-height: 44px; }
  body[data-room="stardew-valley"] .qr-choice { padding: 11px 10px 11px 50px; font-size: 12px; }
  body[data-room="stardew-valley"] .qr-choice::before { left: 10px; width: 30px; height: 30px; }
  body[data-room="stardew-valley"] .qr-choice::after { left: 44px; }
  body[data-room="stardew-valley"] .qr-stardew-seasons-status { grid-template-columns: 1fr 1fr 1fr; gap: 6px; font-size: 8px; }
  body[data-room="stardew-valley"] .qr-stardew-seasons-row { grid-template-columns: 54px repeat(6, minmax(44px, 1fr)); gap: 3px; padding: 4px; overflow-x: auto; }
  body[data-room="stardew-valley"] .qr-stardew-seasons-rowlabel { font-size: 8px; }
  body[data-room="stardew-valley"] .qr-stardew-seasons-slot { padding: 2px; }
  body[data-room="stardew-valley"] .qr-stardew-crop { flex-basis: 98px; min-height: 86px; }
  body[data-room="stardew-valley"] .qr-stardew-seasons-actions { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-room="stardew-valley"] *,
  body[data-room="stardew-valley"] *::before,
  body[data-room="stardew-valley"] *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
