:root{color-scheme:light;--navy:#07182f;--yellow:#ffc83d;--aqua:#35e0b5;--paper:#f5fbff;--ink:#112d41;--muted:#456276;--green:#50e36d;--danger:#b52643}
.keyboard-cursor{position:absolute;transform:translate(-50%,-50%);display:grid;place-items:center;width:24px;height:24px;border:1px solid white;outline:1px solid #07182f;background:#07182f99;color:#fff36b;font-size:25px;line-height:1;pointer-events:none}
.brand,.progress-count{direction:ltr}
*{box-sizing:border-box}html{background:#e1edf2;scrollbar-color:#7792a4 #e1edf2}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;color:var(--ink)}button,select,textarea{font:inherit}button{cursor:pointer;-webkit-tap-highlight-color:transparent}button:disabled{cursor:default;opacity:.45}button:focus-visible,select:focus-visible,a:focus-visible,.scene:focus-visible,textarea:focus-visible{outline:3px solid #17649a;outline-offset:3px}::selection{background:var(--yellow);color:var(--navy)}[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;clip:rect(0,0,0,0);overflow:hidden;white-space:nowrap}.game{width:100%;max-width:440px;min-height:100svh;margin:auto;background:var(--paper);padding-bottom:max(12px,env(safe-area-inset-bottom))}.topbar{min-height:52px;background:var(--navy);display:flex;align-items:center;justify-content:space-between;padding:8px 15px;color:white}.brand{display:flex;align-items:center;gap:2px;text-decoration:none;font-size:22px;font-weight:850;letter-spacing:-.03em;color:white}.brand span{color:var(--yellow)}.brand svg{width:20px;height:20px;margin-inline-start:4px;stroke:var(--aqua);stroke-width:2.5;fill:none}.top-actions{display:flex;align-items:center;gap:7px}.icon-button{width:36px;height:36px;border:0;background:transparent;color:white}.icon-button svg{width:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linejoin:round;stroke-linecap:round}.language select{min-height:34px;background:#163049;color:#fff;border:1px solid #7d99ae;border-radius:6px;padding:3px 5px;font-size:13px}.mission{padding:13px 15px 8px}.title-row{display:flex;justify-content:space-between;align-items:center;gap:8px}h1{font-size:24px;line-height:1.2;letter-spacing:-.025em;margin:0;font-weight:800}.round-number{font-size:13px;font-weight:750;color:var(--muted);font-variant-numeric:tabular-nums}.mission p{margin:7px 0 10px;color:var(--muted);font-size:14px;line-height:1.45}.status-row{display:flex;align-items:center;justify-content:space-between;gap:8px}.hearts{display:flex;gap:3px;color:#d83c5e;direction:ltr}.hearts svg{width:20px;height:20px;fill:currentColor;stroke:#a92b47;stroke-width:1.5}.hearts svg.empty{fill:#d7e1e7;stroke:#9badb9}.timer{display:flex;align-items:center;gap:5px;color:#213b4d;font-size:17px;font-weight:750;font-variant-numeric:tabular-nums;direction:ltr}.timer svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}.timer.urgent{color:var(--danger)}.progress-count{font-size:16px;font-weight:800;font-variant-numeric:tabular-nums}.find-slots{padding:0;margin:9px 0 0;display:flex;justify-content:center;gap:7px;list-style:none;direction:ltr}.find-slots li{display:flex;align-items:center;justify-content:center;border-radius:50%;width:23px;height:23px;font-size:13px;font-weight:800;color:#43677c;background:#deebf2;border:1px solid #9bb7c8}.find-slots li.found{background:#1b7442;color:white;border-color:#1b7442}.comparison{border-block:3px solid var(--navy);direction:ltr}.scene{position:relative;width:100%;aspect-ratio:588/393;overflow:hidden;touch-action:pan-y;background:#0b2947;user-select:none;-webkit-user-select:none}.scene+.scene{border-top:3px solid #f3fbff}.scene-content{position:absolute;inset:0;transform-origin:center;will-change:transform}.scene-content img{display:block;width:100%;height:100%;pointer-events:none}.marks{position:absolute;inset:0;pointer-events:none}.scene-label{position:absolute;top:7px;left:8px;pointer-events:none;color:white;background:#07182fd9;font-size:11px;font-weight:700;padding:3px 6px;border-radius:4px;line-height:1.2}.mark{position:absolute;border:3px solid var(--green);outline:1px solid #16442d;border-radius:50%;transform:translate(-50%,-50%);animation:found-pop .36s cubic-bezier(.16,1,.3,1);pointer-events:none}.mark.hint{border-color:#ffe247;outline-color:#5e500d;animation:hint-pulse .65s ease-in-out 3}.wrong-mark{position:absolute;transform:translate(-50%,-50%);color:#ffced5;background:#8a1835c9;border:1px solid white;width:28px;height:28px;display:grid;place-items:center;border-radius:50%;font-size:22px;line-height:1}.feedback{min-height:40px;padding:10px 14px 5px;font-size:14px;line-height:1.45;color:var(--muted)}.feedback.good{color:#16613a}.feedback.bad{color:var(--danger)}.actions{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 12px}.tool{display:flex;align-items:center;justify-content:center;gap:5px;min-height:44px;flex:1;background:#ffdf78;border:1px solid #987829;border-radius:10px;color:#49380b;font-size:14px;font-weight:750;padding:5px 7px}.tool svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.tool small{font-size:12px;font-weight:800}.zoom-controls{display:flex;align-items:center;border:1px solid #9ab2c0;border-radius:10px;overflow:hidden;direction:ltr;flex-shrink:0}.zoom-controls button{border:0;background:#e7f0f5;color:#183b51;height:44px;min-width:29px;font-size:18px}.zoom-controls #zoom-reset{font-size:12px;min-width:40px;padding:2px}.game-footer{padding:5px 14px 4px;display:flex;align-items:center;justify-content:space-between;gap:10px;color:var(--muted);font-size:12px;line-height:1.4}.game-footer button{border:0;background:transparent;text-decoration:underline;text-underline-offset:3px;color:#244d68;font-size:12px;padding:6px 0;white-space:nowrap}.assist{margin:6px 12px;padding:9px;background:#fff1bb;color:#514111;font-size:13px;line-height:1.4;border-radius:8px}.assist button{margin-top:6px;min-height:36px;border:1px solid #736229;color:#302b13;background:white;border-radius:6px;padding:5px 10px;display:block}.preview-nav{max-width:440px;margin:16px auto 0;display:flex;align-items:center;gap:8px;justify-content:center;padding:8px 12px;color:#26485d;font-size:13px}.preview-nav button{background:#fff;border:1px solid #8aa6b8;color:#173e57;padding:7px 12px;border-radius:6px;font-size:13px}.preview-nav button[aria-current=true]{background:var(--navy);color:white;border-color:var(--navy)}.primary,.secondary{width:100%;min-height:48px;border-radius:9px;padding:11px 15px;font-size:16px;font-weight:750;line-height:1.35}.primary{background:var(--yellow);color:#2a250d;border:1px solid #9e7a20}.secondary{margin-top:10px;border:1px solid #8ca5b5;background:white;color:#173a50}.continue{width:calc(100% - 28px);margin:10px 14px}dialog{width:calc(100% - 28px);max-width:390px;max-height:calc(100svh - 32px);overflow:auto;border:0;border-radius:16px;background:#f7fbfe;color:var(--ink);padding:30px 22px 22px;box-shadow:0 20px 55px #001a3459}dialog::backdrop{background:#031629b8}.dialog-close{position:absolute;inset:8px 10px auto auto;width:36px;height:36px;border:0;background:transparent;color:#294a60;font-size:26px}dialog h2{margin:10px 0 10px;font-size:25px;line-height:1.2;letter-spacing:-.025em}dialog p{font-size:15px;color:var(--muted);line-height:1.6;margin:10px 0 16px}.result-symbol{width:65px;height:65px;margin:0 auto 16px}.result-symbol svg{width:100%;height:100%;stroke:#24864c;stroke-width:3;fill:none;stroke-linecap:round;stroke-linejoin:round}#result-dialog{text-align:center}#result-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;margin:20px 0}#result-stats dt{font-size:12px;color:var(--muted);margin-top:4px}#result-stats dd{margin:0;font-size:23px;color:#173b50;font-weight:750;font-variant-numeric:tabular-nums}.guide-steps{padding-inline-start:23px;font-size:15px;line-height:1.6}.guide-steps li{padding-inline-start:4px;margin:12px 0}#manual-copy{font-size:14px;line-height:1.5}#manual-copy textarea{width:100%;margin-top:8px;padding:10px;font-size:16px;color:#173a50;background:white;border:1px solid #7796a9;border-radius:6px;direction:ltr}#copy-feedback{margin-bottom:0;color:#1b6840;font-size:14px}html[dir=rtl] h1,html[dir=rtl] h2{letter-spacing:0}html[dir=rtl] .dialog-close{inset:8px auto auto 10px}@keyframes found-pop{from{opacity:.3;transform:translate(-50%,-50%) scale(1.5)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}@keyframes hint-pulse{50%{opacity:.35}}@media(min-width:700px){.game{margin:20px auto 30px;min-height:0;border-radius:12px;overflow:hidden;box-shadow:0 15px 45px #173a5026}.preview-nav+.game{margin-top:5px}}@media(max-width:350px){.mission{padding-top:11px}.mission p{font-size:13px}.tool{font-size:12px;gap:3px;padding:5px}.tool svg{width:19px;height:19px}.actions{gap:5px;padding-inline:9px}.zoom-controls button{min-width:26px}.zoom-controls #zoom-reset{min-width:36px}.game-footer{font-size:11px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

.scene-content img{object-fit:cover;object-position:50% var(--photo-focus,25%)}

/* Keep the existing photo game layout usable with long native language names. */
.language{min-width:0;max-width:114px}
.language select{width:100%;min-width:70px;max-width:114px}
.language select{-webkit-appearance:none;appearance:none;background-color:#163049;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='m1 1 4 4 4-4' fill='none' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 7px center;padding-right:23px;color:#fff}
html[dir=rtl] .language select{background-position:left 7px center;padding-right:5px;padding-left:23px}
.top-actions{min-width:0}
.title-row h1{min-width:0;overflow-wrap:anywhere}
.round-number{direction:ltr;white-space:nowrap;flex-shrink:0}
.tool{min-width:0;flex-wrap:wrap;overflow-wrap:anywhere}
.tool svg,.tool small{flex-shrink:0}
.game-footer button{white-space:normal;max-width:45%;flex-shrink:0}
.preview-nav{flex-wrap:wrap}
dialog h2,dialog p,.guide-steps li,.primary,.secondary,#result-stats dt{overflow-wrap:anywhere}

#result-stats>div{min-width:0}
#result-stats dd{direction:ltr}

/* At normal size, a vertical swipe belongs to the page; enlarged photos can be panned. */
.scene.image-zoomed{touch-action:none}

/* Show only the two photo panels from each existing poster. */
.scene-content{overflow:hidden}
.scene-content,.marks{top:0;right:0;bottom:0;left:0}
.scene-content img{position:absolute;max-width:none;object-fit:fill;object-position:initial}
.scene+.scene{border-top:0;margin-top:3px}
.comparison{background:#f3fbff}
.mark{width:30px;height:30px;border-width:2px;outline:0;animation:none}
.find-slots svg{display:block;width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2.3;stroke-linecap:round;stroke-linejoin:round}
.scene-label{top:2%;left:1%;min-width:20%;min-height:11%;display:grid;place-items:center;background:var(--navy);border-radius:24px;font-size:clamp(10px,3vw,15px)}

/* The game has no countdown now; keep the two controls in the compact status row. */
.status-row{gap:6px}
.status-tools{display:flex;align-items:center;justify-content:flex-end;gap:5px;margin-inline-start:auto}
.status-tools .tool{flex:0 0 auto;min-height:32px;border-radius:8px;padding:3px 7px;font-size:12px;gap:3px}
.status-tools .tool svg{width:17px;height:17px}
.status-tools .zoom-controls button{height:32px;min-width:25px;font-size:16px}
.status-tools .zoom-controls #zoom-reset{min-width:39px;font-size:11px}

/* Keep both panels aligned and hidden until their shared bitmap is ready. */
.comparison[data-image-state]:not([data-image-state=ready]) .scene-content{visibility:hidden}
.comparison[data-image-state=loading] .scene:first-child::after{content:"";position:absolute;top:50%;left:50%;width:26px;height:26px;margin:-13px;border:2px solid #ffffff45;border-top-color:#fff;border-radius:50%;animation:board-loading .75s linear infinite;pointer-events:none}
@keyframes board-loading{to{transform:rotate(360deg)}}
#retry-images{margin:0 auto 4px;min-width:112px}

/* Show both photos within the initial portrait viewport while preserving their aspect ratios. */
.comparison{max-width:var(--board-width,100%);margin-inline:auto}
@media(max-width:430px) and (orientation:portrait){
  .topbar{min-height:40px;padding:4px 10px}
  .brand{font-size:18px}
  .brand svg{width:17px;height:17px}
  .icon-button{width:29px;height:29px}
  .language select{min-height:28px;font-size:12px}
  .mission{padding:5px 10px 3px}
  h1{font-size:19px}
  .round-number{font-size:11px}
  .mission p{margin:2px 0 4px;font-size:11px;line-height:1.25}
  .status-row{gap:4px}
  .hearts svg{width:17px;height:17px}
  .progress-count{font-size:14px}
  .find-slots{margin-block-start:4px;gap:4px}
  .find-slots li{width:19px;height:19px;font-size:11px}
  .status-tools{gap:3px}
  .status-tools .tool{padding-inline:5px;font-size:11px}
  .status-tools .zoom-controls button{min-width:23px}
  .status-tools .zoom-controls #zoom-reset{min-width:35px}
  .feedback{min-height:24px;padding:4px 10px 2px;font-size:11px}
  .game-footer{padding:2px 10px;font-size:10px}
  .game-footer button{padding:2px 0;font-size:10px}
}

/* Fit the entire play screen to the browser's measured visible viewport.
   Pixel photo heights are supplied by fitBoard for older iPhone Safari. */
@media(max-width:600px), (max-width:900px) and (max-height:500px){
 html,body{margin:0;padding:0;-webkit-text-size-adjust:100%;overflow-x:hidden}
 .game{display:flex;flex-direction:column;height:var(--viewport-height,100vh);min-height:0;margin:0 auto;border-radius:0;box-shadow:none;padding:0 0 6px;padding-top:env(safe-area-inset-top,0px);padding-bottom:calc(6px + env(safe-area-inset-bottom,0px));overflow:visible}
 .game>*{flex-shrink:0}
 .topbar{min-height:38px;padding:3px 9px}
 .brand{font-size:18px}
 .brand svg{width:16px;height:16px}
 .icon-button{width:32px;height:32px}
 .top-actions>.language{margin-inline-start:5px}
 .language select{min-height:30px;font-size:12px}
 .mission{padding:4px 9px 3px}
 h1{font-size:18px;line-height:1.2}
 .round-number{font-size:11px}
 .mission p{font-size:11px;line-height:1.25;margin:2px 0 3px}
 .status-row{min-height:36px;gap:4px;flex-wrap:nowrap}
 .hearts svg{width:16px;height:16px}
 .hearts{flex-shrink:0}
 .hearts svg+svg{margin-left:1px}
 .progress-count{font-size:13px;white-space:nowrap;margin-inline:3px}
 .status-tools{min-width:0;gap:3px}
 .status-tools .tool{min-height:36px;font-size:11px;padding:3px 5px;max-width:94px}
 .status-tools .zoom-controls{margin-inline-start:3px}
 .status-tools .zoom-controls button{height:36px;min-width:24px}
 .status-tools .zoom-controls #zoom-reset{min-width:36px;font-size:11px}
 .find-slots{margin:2px 0 0;gap:4px}
 .find-slots li{width:17px;height:17px;font-size:10px}
 .find-slots li+li{margin-left:1px}
 .find-slots svg{width:11px;height:11px}
 .comparison{flex:none;align-self:center;margin:0 auto;border-width:2px}
 .scene{aspect-ratio:auto}
 .scene-label{top:3px;left:3px;min-width:0;min-height:0;padding:2px 6px;font-size:10px;line-height:1.2;border-radius:9px}
 .mark{width:24px;height:24px}
 .feedback{min-height:22px;padding:3px 9px 1px;font-size:11px;line-height:1.3}
 .game-footer{min-height:26px;padding:1px 9px;font-size:10px;line-height:1.2}
 .game-footer button{padding:5px 0;font-size:11px}
 .continue{min-height:36px;width:calc(100% - 18px);margin:3px 9px 0;padding:6px 10px;font-size:14px}
 .assist{margin:2px 9px;padding:4px 7px;font-size:11px;line-height:1.25}
 .assist button{min-height:30px;margin-top:2px;padding:3px 6px;font-size:12px}
 dialog{max-height:calc(var(--viewport-height,100vh) - 24px);padding:25px 16px 14px}
 dialog h2{font-size:21px;margin:8px 0}
 dialog p,.guide-steps{font-size:13px;line-height:1.4}
 .guide-steps li{margin:7px 0}
}
dialog:not([open]){display:none}
.legacy-dialog-open::before{content:"";position:fixed;top:0;right:0;bottom:0;left:0;background:#031629b8;z-index:1000}
.legacy-dialog-open dialog[open]{display:block;position:fixed;top:50%;left:50%;margin:0;transform:translate(-50%,-50%);z-index:1001}

/* First-level pointer: the tip points to the patterned pillow in the upper panel. */
.first-difference-arrow{position:absolute;width:13%;height:24%;z-index:5;pointer-events:none;filter:drop-shadow(0 0 5px #053a13) drop-shadow(0 0 5px #8fff5a);animation:first-arrow-flash .9s ease-in-out infinite}.first-difference-arrow svg{width:100%;height:100%;overflow:visible}.first-difference-arrow path{fill:none;stroke:#3eff15;stroke-width:10;stroke-linecap:round;stroke-linejoin:round}@keyframes first-arrow-flash{0%,100%{opacity:1;transform:translateY(-3px)}50%{opacity:.65;transform:translateY(3px)}}@media(prefers-reduced-motion:reduce){.first-difference-arrow{animation:none;opacity:1}}
