    :root {
      color-scheme: light;
      --ink: #27352c;
      --muted: #788176;
      --paper: #fbfaf6;
      --green: #315c43;
      --green-light: #e8efe7;
      --orange: #ee9c53;
      --line: #e9e7dd;
      font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    }
    :root[data-theme="dark"] {
      color-scheme: dark;
      --ink: #f0eee6;
      --muted: #bac4b8;
      --paper: #202a25;
      --green: #a4c9a6;
      --green-light: #34483a;
      --line: #3d4a40;
    }
    * { box-sizing: border-box; }
    body {
      margin: 0;
      min-width: 320px;
      min-height: 100vh;
      color: var(--ink);
      background: #f3f1e9;
    }
    button { color: inherit; font: inherit; }
    button:focus-visible, a:focus-visible { outline: 3px solid #d27a2f; outline-offset: 2px; }
    .app { max-width: 1440px; min-height: 100vh; margin: auto; padding: 24px 34px 30px; }
    header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
    .brand { display: flex; align-items: center; gap: 12px; }
    .brand-mark { display: grid; width: 43px; height: 43px; place-items: center; border-radius: 15px; background: #315c43; color: white; font-size: 25px; }
    .brand-name { font-size: 20px; font-weight: 800; letter-spacing: -.7px; }
    .brand-tag { margin-top: 2px; color: var(--muted); font-size: 11px; letter-spacing: 1.1px; text-transform: uppercase; }
    .header-right { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
    .theme-toggle { flex: 0 0 auto; }
    .date-chip { padding: 9px 13px; border: 1px solid var(--line); border-radius: 99px; background: var(--paper); }
    .layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; align-items: start; gap: 22px; }
    .game-card, .side-card { overflow: hidden; border: 1px solid var(--line); border-radius: 19px; background: var(--paper); box-shadow: 0 7px 28px #24351d0a; }
    .scene-top { display: flex; align-items: center; justify-content: space-between; min-height: 63px; padding: 0 19px; }
    .scene-title { font-size: 14px; font-weight: 800; }
    .scene-subtitle { margin-top: 4px; color: var(--muted); font-size: 11px; }
    .stats { display: flex; gap: 8px; }
    .stat { min-width: 76px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 12px; text-align: center; }
    .stat strong { display: block; font-size: 15px; }
    .stat span { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .7px; }
    .scene-frame { position: relative; height: min(60vw, 600px); min-height: 350px; overflow: hidden; background: #cce8e4; cursor: grab; touch-action: none; user-select: none; }
    .scene-frame.dragging { cursor: grabbing; }
    #scene { display: block; width: 100%; height: 100%; }
    #world { transform-box: view-box; transform-origin: 0 0; }
    .scene-frame:focus-visible { outline: 3px solid #315c43; outline-offset: -3px; }
    .keyboard-cursor { position: absolute; z-index: 1; width: 30px; height: 30px; transform: translate(-50%, -50%); border: 2px solid white; border-radius: 50%; box-shadow: 0 0 0 2px #315c43, 0 2px 9px #18231f66; visibility: hidden; pointer-events: none; }
    .scene-frame:focus .keyboard-cursor { visibility: visible; }
    .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
    .scene-controls { position: absolute; right: 13px; bottom: 13px; display: flex; gap: 6px; padding: 5px; border: 1px solid #ffffffbb; border-radius: 12px; background: #fffefaed; box-shadow: 0 3px 12px #27352c18; }
    .icon-button { display: grid; width: 44px; height: 44px; place-items: center; border: 0; border-radius: 8px; background: transparent; color: #3e5143; cursor: pointer; font-size: 19px; }
    .icon-button:hover { background: var(--green-light); }
    .scene-hint { position: absolute; bottom: 18px; left: 17px; padding: 9px 12px; border: 1px solid #ffffff9c; border-radius: 10px; background: #fffefaed; color: #536254; font-size: 11px; pointer-events: none; }
    .mobile-tools { display: none; }
    .list-heading { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px 10px; }
    .list-heading strong { font-size: 13px; }
    .list-heading span { color: var(--muted); font-size: 11px; }
    .items { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; padding: 0 15px 16px; }
    .hint-tools { display: flex; align-items: center; gap: 10px; padding: 0 15px 15px; }
    .hint-tools .action-button { flex: 0 0 auto; padding: 0 14px; }
    .hint-tools .action-button:disabled { cursor: not-allowed; opacity: .55; }
    .round-feedback { display: grid; gap: 4px; }
    #hintStatus, #missStatus { color: var(--muted); font-size: 11px; }
    #hintLayer rect { fill: #f5d66f; fill-opacity: .2; stroke: #f3ce4f; stroke-width: 5; stroke-dasharray: 14 10; }
    #hintLayer circle { fill: #f5d66f; fill-opacity: .1; stroke: #f3ce4f; stroke-width: 8; transform-box: fill-box; transform-origin: center; animation: hint-shrink 6s ease-out forwards; }
    @keyframes hint-shrink { from { transform: scale(2.5); } to { transform: scale(.65); } }
    .art-credits { margin: 0 16px 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); font-size: 11px; }
    .art-credits summary { color: var(--green); cursor: pointer; font-weight: 700; }
    .art-credits ul { display: grid; gap: 6px; margin: 9px 0 0; padding-left: 18px; }
    .art-credits a { color: #315c43; }
    .item {
      display: flex; min-height: 69px; align-items: center; gap: 9px; padding: 8px 10px;
      border: 1px solid var(--line); border-radius: 12px; background: #fffefa; text-align: left; cursor: pointer;
      transition: background .15s, border-color .15s, opacity .15s, transform .15s;
    }
    .item:hover { transform: translateY(-1px); border-color: #a8bda7; }
    .item.active { border-color: #729576; background: var(--green-light); box-shadow: 0 0 0 2px #72957620; }
    .item.found { border-color: #dce6d9; background: #f2f6ef; opacity: .72; cursor: default; }
    .item-emoji { font-size: 24px; line-height: 1; }
    .item-name { font-size: 12px; font-weight: 700; }
    .item.found .item-name { color: #768276; text-decoration: line-through; }
    .side-card { padding: 20px; }
    .daily-label { color: #799078; font-size: 10px; font-weight: 800; letter-spacing: 1.3px; text-transform: uppercase; }
    h1 { margin: 7px 0 6px; font-size: 23px; letter-spacing: -.8px; }
    .intro { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
    .progress-row { display: flex; justify-content: space-between; margin: 20px 0 8px; font-size: 11px; font-weight: 700; }
    .progress-track { height: 7px; overflow: hidden; border-radius: 99px; background: #eeede5; }
    .progress-fill { width: 0; height: 100%; border-radius: inherit; background: #729576; transition: width .3s; }
    .puzzle-unavailable #gameLayout { display: none; }
    .puzzle-status { max-width: 620px; margin: 28px auto; padding: 26px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); text-align: center; }
    .puzzle-status h1 { margin-top: 0; }
    .puzzle-status p { color: var(--muted); line-height: 1.6; }
    .puzzle-status a { display: inline-flex; min-height: 42px; align-items: center; padding: 0 16px; border-radius: 11px; background: var(--green); color: white; font-size: 12px; font-weight: 800; text-decoration: none; }
    .personal-best { display: flex; justify-content: space-between; margin-top: 25px; padding: 14px; border-radius: 12px; background: var(--green-light); font-size: 12px; }
    .personal-best strong { color: var(--green); font-variant-numeric: tabular-nums; }
    .personal-stats { display: grid; gap: 9px; margin-top: 12px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 11px; }
    .personal-stats div { display: flex; justify-content: space-between; gap: 8px; }
    .personal-stats span { color: var(--muted); }
    .personal-stats strong { color: var(--green); font-variant-numeric: tabular-nums; }
    .next-puzzle { margin: 10px 0 0; color: var(--muted); font-size: 11px; text-align: center; font-variant-numeric: tabular-nums; }
    .side-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 17px; }
    .action-button { min-height: 44px; border: 1px solid var(--line); border-radius: 11px; background: #fffefa; font-size: 11px; font-weight: 800; cursor: pointer; }
    .action-button.primary { border-color: var(--green); background: var(--green); color: white; }
    .action-button:hover { filter: brightness(.97); }
    .toast { position: fixed; z-index: 5; bottom: 22px; left: 50%; padding: 12px 17px; transform: translate(-50%, 20px); border-radius: 12px; background: #27352c; color: white; font-size: 13px; opacity: 0; pointer-events: none; transition: .2s; }
    .toast.show { transform: translate(-50%, 0); opacity: 1; }
    .win-overlay { position: absolute; z-index: 2; inset: 0; display: none; align-items: center; justify-content: center; overflow-y: auto; padding: 14px; background: #1f332d99; }
    .win-overlay.visible { display: flex; }
    .win-message { width: min(100%, 360px); max-height: 100%; overflow-y: auto; padding: 20px; border-radius: 17px; background: var(--paper); text-align: center; box-shadow: 0 12px 50px #18231f45; }
    .win-message .emoji { font-size: 38px; }
    .win-message h2 { margin: 8px 0 5px; font-size: 21px; }
    .win-message p { margin: 0 0 15px; color: var(--muted); font-size: 12px; }
    .win-message .win-meta { color: var(--green); font-size: 15px; font-weight: 800; }
    .win-reveal { display: grid; gap: 4px; margin: 0 0 14px; padding-left: 24px; color: var(--muted); font-size: 11px; text-align: left; }
    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
    }
    :root[data-theme="dark"] body { color: var(--ink); background: #131a16; }
    :root[data-theme="dark"] .brand-mark { background: #547e5d; }
    :root[data-theme="dark"] .scene-controls,
    :root[data-theme="dark"] .scene-hint { border-color: #536052; background: #202a25ed; color: #e2e9df; }
    :root[data-theme="dark"] .icon-button { color: #dce8dc; }
    :root[data-theme="dark"] .item,
    :root[data-theme="dark"] .action-button { border-color: var(--line); background: #29352e; color: var(--ink); }
    :root[data-theme="dark"] .item.active { border-color: #91b794; background: #34483a; }
    :root[data-theme="dark"] .item.found { border-color: #405447; background: #25342a; }
    :root[data-theme="dark"] .item.found .item-name { color: #c4d3c5; }
    :root[data-theme="dark"] .action-button.primary { border-color: #547e5d; background: #547e5d; color: #fff; }
    :root[data-theme="dark"] .progress-track { background: #39453c; }
    :root[data-theme="dark"] .puzzle-status a { background: #547e5d; color: #fff; }
    :root[data-theme="dark"] .daily-label,
    :root[data-theme="dark"] .art-credits summary { color: #b4d7b7; }
    :root[data-theme="dark"] .art-credits a { color: #b4d7b7; }
    @media (max-width: 1050px) {
      .app { padding: 20px; }
      .layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 14px; }
      .items { grid-template-columns: repeat(3, minmax(0, 1fr)); }
      .scene-frame { height: 55vw; min-height: 330px; }
    }
    @media (max-width: 760px) {
      body { background: var(--paper); }
      .app { min-height: 100dvh; padding: 0 0 16px; }
      header { height: 60px; margin: 0; padding: 0 16px; }
      .brand-mark { width: 36px; height: 36px; border-radius: 12px; font-size: 21px; }
      .brand-name { font-size: 17px; }
      .brand-tag { font-size: 9px; }
      .header-right { font-size: 11px; }
      .date-chip { padding: 7px 9px; }
      .layout { display: flex; flex-direction: column; gap: 0; }
      .game-card, .side-card { width: 100%; border: 0; border-radius: 0; box-shadow: none; }
      .scene-top { min-height: 55px; padding: 0 15px; }
      .scene-title { font-size: 13px; }
      .scene-subtitle { font-size: 10px; }
      .stat { min-width: 65px; padding: 6px 8px; }
      .stat strong { font-size: 13px; }
      .scene-frame { height: min(64vh, 570px); min-height: 300px; }
      .scene-hint { bottom: 12px; left: 12px; padding: 8px 10px; font-size: 10px; }
      .scene-controls { right: 10px; bottom: 10px; }
      .items { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; padding: 0 12px 12px; }
      .hint-tools { align-items: stretch; flex-direction: column; gap: 7px; padding: 0 12px 13px; }
      .hint-tools .action-button { min-height: 44px; width: 100%; }
      .item { min-height: 59px; gap: 6px; padding: 7px; }
      .item-emoji { font-size: 20px; }
      .item-name { font-size: 11px; }
      .side-card { padding: 17px 16px 20px; border-top: 8px solid #f3f1e9; }
      .intro { max-width: 440px; }
    }
    @media (max-width: 380px) {
      header { padding-right: 10px; padding-left: 10px; }
      .header-right { gap: 6px; }
      .theme-toggle { width: 40px; }
      .date-chip { max-width: 116px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
      .item { flex-direction: column; justify-content: center; gap: 3px; }
    }
