/* Original-inspired palette: ultramarine blue, yellow lettering and silver-blue glass. */
.game-screen {
    padding-top:14px;gap:14px;color:#e0eaf7;
    background:radial-gradient(ellipse at 0 85%,#00004bc7,transparent 18%),
      radial-gradient(ellipse at 100% 92%,#00004bc7,transparent 18%),
      linear-gradient(#00004b55,#00004b55),
      linear-gradient(#090bb0,#090bb0),
      url('assets/beach-silhouette-v2.png') center center / cover no-repeat,
      linear-gradient(#00005d,#071b9e);
    background-blend-mode:normal,normal,normal,color,normal,normal;
}
.game-heading{min-height:64px;max-width:1500px;width:100%;margin:0 auto}
.game-brand{position:relative;min-width:150px;filter:drop-shadow(0 3px 3px #0005)}
.game-brand img{display:block;width:clamp(145px,16vw,210px);height:auto}
.game-brand span{font-size:12px;font-weight:850;color:#f3e95c;letter-spacing:3px;margin-top:-12px}
.game-screen .quiet-button{color:#f5e967;background:linear-gradient(#1026a9ee,#05096fee);border:1px solid #8ba2e566;box-shadow:0 3px 10px #0002,inset 0 1px #ffffff08;font-weight:600}
.game-screen .quiet-button:hover{background:#173bc3;border-color:#b4c9e277;transform:translateY(-1px)}
.game-screen button:focus-visible{outline:3px solid #fff689;outline-offset:4px}
.game-stats{padding:12px 22px;border:1px solid #7d9bc13b;border-radius:20px;background:linear-gradient(120deg,#0b192be8,#091525e8);box-shadow:0 5px 18px #0002,inset 0 1px #ffffff08}
.game-kicker{font-size:9px;font-weight:750;letter-spacing:1.8px;color:#d9d775}
.game-stats h1{font-size:20px;font-weight:750;color:#fff35c;margin-top:4px}
.found-count{color:#e9df76;font-weight:600;padding-right:24px;border-right:1px solid #91afcf26}
.found-count strong{color:#fff35c;font-weight:800}
.game-clock{color:#e9df76;font-weight:600}
.game-clock strong{color:#fff35c;font-weight:750}
.picture-pair{gap:22px;width:min(100%,calc((100svh - 290px)*1464/1290*2 + 62px))}
.picture-card{padding:9px;border:1px solid #b2c8dd88;border-radius:16px;background:linear-gradient(145deg,#6f8b9f,#344f77 47%,#6b83a1);box-shadow:0 4px 0 #000044,0 12px 25px #0004,inset 0 1px #b4c4d233}
.picture-card figcaption{width:max-content;margin:-22px auto 8px;padding:6px 22px;position:relative;z-index:1;border:1px solid #8ba9db77;border-radius:18px;background:linear-gradient(#1536ba,#060c7b);box-shadow:0 2px 7px #0003,inset 0 1px #ffffff12;color:#f0e25e;font-size:9px;letter-spacing:2px;font-weight:750}
.picture-board{border-radius:9px;outline:1px solid #000043cc;box-shadow:0 2px 5px #0003;max-height:calc(100svh - 290px);max-width:calc((100svh - 290px)*1464/1290)}
.picture-board img{border-radius:9px}
.picture-board.miss{outline:2px solid #9bb2ca}
.game-actions{width:min(100%,900px);margin:0 auto;padding:10px 16px;border:1px solid #6586d95c;border-radius:24px;background:linear-gradient(#061b8ce8,#030960e8);box-shadow:0 4px 18px #0002,inset 0 1px #ffffff06}
.game-actions p{color:#dddca1;font-weight:500}
.game-veil{background:#030c1bbd;backdrop-filter:blur(18px);overflow:auto}
.game-dialog{border:1px solid #7a9edb88;border-radius:25px;background:linear-gradient(145deg,#1233b2,#04096d);box-shadow:0 7px 0 #06152b55,0 24px 75px #0005;color:#f7e970;max-height:calc(100svh - 40px);overflow:auto}
.game-dialog h2{font-weight:750;font-size:25px}
.game-dialog p{color:#e3dea3}
.game-screen .primary-button{border:1px solid #9fb5eb88;border-radius:12px;background:linear-gradient(#274bd0,#0b1d99);box-shadow:0 3px 0 #061222,inset 0 1px #ffffff18;color:#fff177}
.game-screen .primary-button:hover{box-shadow:0 4px 0 #061222,0 8px 20px #0003}
@media(min-width:601px) and (min-height:820px){.picture-pair{padding-top:12px}}
@media(max-width:600px){
    .game-screen{padding:10px 10px 14px;gap:16px;background-position:50% center}
    .game-heading{min-height:53px;gap:8px}.game-heading .quiet-button{padding:9px 10px;font-size:10px}
    .game-brand{min-width:130px}.game-brand img{width:145px}.game-brand span{font-size:10px;letter-spacing:2px;margin-top:-9px}
    .game-stats{padding:12px;gap:12px;border-radius:17px}.game-kicker{font-size:7px;letter-spacing:.6px}
    .game-stats h1{font-size:16px}.found-count{font-size:9px;padding-right:10px}
    .found-count strong,.game-clock strong{font-size:20px}.game-clock{min-width:58px;font-size:10px}
    .picture-pair{gap:10px;width:100%}.picture-card{padding:5px;border-radius:10px}
    .picture-card figcaption{font-size:7px;letter-spacing:1px;padding:5px 13px;margin-top:-18px;margin-bottom:6px}
    .picture-board{max-height:none;max-width:none;border-radius:5px}.picture-board img{border-radius:5px}
    .game-actions{border-radius:19px;gap:10px;padding:10px}.game-dialog{padding:24px 20px}
}
@media(max-height:550px) and (min-width:601px){
    .game-screen{padding:7px 18px;gap:8px}.game-heading{min-height:36px;height:36px}
    .game-brand img{width:125px;margin:0 auto}.game-brand span{font-size:9px;letter-spacing:2px;margin-top:-9px}
    .game-stats{padding:6px 16px;border-radius:13px}.game-stats h1{font-size:14px}.game-kicker{font-size:7px}
    .found-count strong,.game-clock strong{font-size:16px}
    .picture-pair{width:min(100%,calc((100svh - 205px)*1464/1290*2 + 46px))}
    .picture-card{padding:5px;border-radius:9px}.picture-card figcaption{font-size:7px;padding:3px 14px;margin-top:-14px;margin-bottom:4px}
    .picture-board{max-height:calc(100svh - 205px);max-width:calc((100svh - 205px)*1464/1290)}
    .game-actions{padding:5px 12px}.game-actions p{font-size:10px}
}

.game-clock:before{display:none}.game-clock{position:relative}
.game-screen .found-ring{border-color:#e4d854;box-shadow:0 0 0 1px #07172dcc}.game-screen .hint-ring{border-color:#eee38a;box-shadow:0 0 8px #6a90b733}
/* A sculpted blue glass instrument panel, below the two pictures. */
.game-stats{
    position:relative;isolation:isolate;overflow:hidden;flex-shrink:0;
    display:grid;grid-template-columns:1fr 1fr 1fr;align-items:center;
    min-height:114px;padding:18px 52px;gap:20px;border-radius:52px / 34px;
    border:1px solid #93b4ed88;
    background:radial-gradient(ellipse at 50% -70%,#cbdcff55,transparent 72%),
      linear-gradient(180deg,#2546d1 0%,#1230bd 20%,#080e86 49%,#02045f 52%,#1235b8 88%,#c6d5f3 100%);
    box-shadow:inset 0 2px 2px #d6e9fc44,inset 0 -3px 7px #b5daf32b,0 8px 22px #0005;
    backdrop-filter:blur(12px);
}
.game-stats:before,.game-stats:after{content:"";position:absolute;z-index:-1;pointer-events:none;border-radius:50%;width:48%;height:150%;border-top:2px solid #d6e4ff99;top:14%;opacity:.5}
.game-stats:before{left:-5%;transform:rotate(18deg)}
.game-stats:after{right:-5%;transform:rotate(-18deg)}
.game-stats>div:first-child{flex:initial}
.game-stats .game-kicker{font-size:8px;letter-spacing:1.5px;color:#c4c67e}
.game-stats h1{font-size:18px;margin:4px 0 5px;color:#f7e75c}
.game-stats .found-count{display:flex;gap:10px;align-items:baseline;padding:0;border:0;font-size:11px;color:#e3db78}
.game-stats .found-count strong{font-size:16px;margin:0;color:#fff268}
.game-stats .game-clock{text-align:center;min-width:0;font-size:11px;letter-spacing:1px;color:#f0e370}
.game-stats .game-clock strong{font-size:32px;margin-top:3px;color:#fff65e;text-shadow:0 2px 3px #0008;letter-spacing:2px}
.run-stats{text-align:right;display:grid;gap:9px;font-size:13px;color:#eddf6c;font-variant-numeric:tabular-nums}
.run-stats strong{display:inline-block;min-width:65px;font-size:21px;font-weight:700;color:#fff65e;margin-left:12px}
.picture-pair{margin:18px auto auto;width:min(100%,calc((100svh - 370px)*1464/1290*2 + 62px))}
.picture-board{max-height:calc(100svh - 370px);max-width:calc((100svh - 370px)*1464/1290)}
@media(max-width:600px){
    .game-stats{min-height:111px;padding:16px 20px;gap:8px;border-radius:28px / 22px;grid-template-columns:1fr .85fr 1fr}
    .game-stats .game-kicker{font-size:6px;letter-spacing:.3px}
    .game-stats h1{font-size:12px}.game-stats .found-count{font-size:8px;gap:4px}
    .game-stats .found-count strong{font-size:12px}
    .game-stats .game-clock{font-size:9px}.game-stats .game-clock strong{font-size:24px;letter-spacing:0}
    .run-stats{font-size:10px;gap:8px}.run-stats strong{font-size:16px;min-width:28px;margin-left:3px}
    .picture-pair{width:100%;margin:auto}.picture-board{max-height:none;max-width:none}
}
@media(max-height:550px) and (min-width:601px){
    .game-stats{min-height:75px;padding:9px 38px;border-radius:38px / 26px;gap:15px}
    .game-stats h1{font-size:13px;margin:2px 0}
    .game-stats .game-kicker{font-size:6px}.game-stats .found-count{font-size:9px}
    .game-stats .found-count strong{font-size:12px}
    .game-stats .game-clock strong{font-size:24px}
    .run-stats{font-size:11px;gap:4px}.run-stats strong{font-size:17px}
    .picture-pair{margin:9px auto auto;width:min(100%,calc((100svh - 218px)*1464/1290*2 + 46px))}
    .picture-board{max-height:calc(100svh - 218px);max-width:calc((100svh - 218px)*1464/1290)}
}
/* Yellow labels and clean numeric readouts echo the original game. */
.game-brand span{color:#f5e469;text-shadow:0 2px 2px #000055}
.game-stats .game-clock span,.run-stats,.game-stats .found-count{font-style:italic;letter-spacing:1px;text-shadow:0 2px 2px #000049}
.game-stats .game-clock strong,.run-stats strong,.game-stats .found-count strong{font-family:Consolas,"Courier New",monospace;font-style:normal;font-weight:500;text-shadow:0 2px 2px #00004a}
.game-stats:before,.game-stats:after{border-top-width:4px;opacity:.65}
.picture-card figcaption{color:#f5e563;text-shadow:0 1px 2px #00004a}
.game-screen .quiet-button,.game-screen .primary-button{color:#f2e669;text-shadow:0 1px 2px #00004a}
@media(max-width:600px){.game-stats .game-clock span,.run-stats,.game-stats .found-count{letter-spacing:0}}
/* Small bursts live above the UI and never intercept a picture click. */
.find-star-layer{position:fixed;inset:0;z-index:60;pointer-events:none;overflow:hidden}
.find-star{position:absolute;display:block;filter:drop-shadow(0 3px 2px #0007);will-change:transform,opacity}.find-star svg{display:block;width:100%;height:100%;overflow:visible}

/* Friendly rounded timer lettering, using locally available playful fonts. */
.game-stats .game-clock strong{
    font-family:"Comic Sans MS","Chalkboard SE","Comic Neue",cursive;
    font-weight:700;
    font-variant-numeric:tabular-nums;
    letter-spacing:1px;
}
/* Picture frames and glass panel share the same outer edges at every viewport. */
.game-screen{--playfield-width:min(100%,calc((100svh - 370px)*1464/1290*2 + 62px))}
.picture-pair,.game-stats{width:var(--playfield-width);max-width:1500px}
@media(max-width:600px){.game-screen{--playfield-width:100%}}
@media(max-height:550px) and (min-width:601px){.game-screen{--playfield-width:min(100%,calc((100svh - 218px)*1464/1290*2 + 46px))}}@media(max-height:550px) and (min-width:601px){
    .game-stats{padding-left:24px;padding-right:24px;gap:8px}
    .run-stats strong{min-width:34px;margin-left:6px}
    .run-stats>div{white-space:nowrap}
}

.round-hearts{display:flex;gap:5px;margin-top:3px;font-family:"Segoe UI Symbol","Arial",sans-serif;font-size:15px;line-height:16px}
.heart-full{color:#f3df59;text-shadow:0 1px 2px #00004a}
.heart-empty{color:#4e62a0;text-shadow:none}
.lost-hearts{font-size:37px;color:#b6c5ee;letter-spacing:5px}
@media(max-width:600px){.round-hearts{font-size:12px;gap:3px;line-height:13px}}
@media(max-height:550px) and (min-width:601px){.round-hearts{font-size:11px;gap:3px;line-height:12px}}
.motif-stats{line-height:1.1}
.game-stats .game-kicker{display:block;line-height:1.2}

/* The left side groups discoveries, larger hearts and their shared hint budget. */
.game-stats{padding-left:32px;padding-right:32px}
.game-stats .found-count{font-size:18px;font-style:normal;letter-spacing:0;gap:8px;flex-wrap:wrap}
.game-stats .found-count strong{font-size:22px;white-space:nowrap}
.heart-actions{display:flex;align-items:center;gap:10px;margin-top:8px;flex-wrap:wrap}
.round-hearts{font-size:30px;line-height:32px;gap:3px;margin:0;flex-shrink:0}
.game-stats #hint{padding:8px 10px;font-size:10px;white-space:nowrap;letter-spacing:0;flex-shrink:0}
.game-stats .game-clock .game-kicker{font-size:9px;letter-spacing:1px;font-style:normal;margin-bottom:6px;color:#e8dc68}
.game-clock .time-label{display:block}
.game-actions p{order:0;flex:1}
@media(max-width:1000px){
    .heart-actions{flex-direction:column;align-items:flex-start;gap:4px;margin-top:5px}
    .game-stats .found-count{font-size:12px;gap:4px}
    .game-stats .found-count strong{font-size:15px}
    .round-hearts{font-size:22px;line-height:24px;gap:2px}
    .game-stats #hint{font-size:9px;padding:5px 7px}
    .game-stats .game-clock .game-kicker{font-size:7px;letter-spacing:.3px}
}
@media(max-width:600px){
    .game-stats{padding-left:18px;padding-right:18px}
    .game-stats .found-count{font-size:11px}.game-stats .found-count strong{font-size:15px}
    .round-hearts{font-size:21px;line-height:23px}
    .game-stats .game-clock .game-kicker{font-size:7px;max-width:110px;margin:0 auto 6px}
    .game-actions{flex-wrap:nowrap}.game-actions p{flex-basis:auto;text-align:left}
}
@media(max-height:550px) and (min-width:601px){
    .game-screen{--playfield-width:min(100%,calc((100svh - 250px)*1464/1290*2 + 46px))}
    .picture-board{max-height:calc(100svh - 250px);max-width:calc((100svh - 250px)*1464/1290)}
    .picture-pair{width:var(--playfield-width)}
    .game-stats{padding:8px 20px;gap:8px}
    .game-stats .found-count{font-size:10px;gap:3px}.game-stats .found-count strong{font-size:13px}
    .round-hearts{font-size:18px;line-height:20px;gap:2px}
    .heart-actions{gap:3px;margin-top:3px}
    .game-stats #hint{font-size:8px;padding:4px 6px}
    .game-stats .game-clock .game-kicker{font-size:6px;margin-bottom:4px}
}

/* Large, readable game lettering. Small screens scroll rather than shrink text. */
.game-heading{min-height:76px;flex-shrink:0}
.game-heading .quiet-button{font-size:16px;padding:12px 20px}
.game-brand img{width:clamp(180px,18vw,240px)}
.game-brand span{font-size:16px}
.picture-pair{flex-shrink:0}
.picture-card figcaption{font-size:14px;padding:8px 24px;margin-top:-27px;margin-bottom:9px;letter-spacing:1.5px}
.game-stats{min-height:158px;padding:20px 24px;grid-template-columns:minmax(0,1fr) 220px minmax(0,1fr);gap:16px}
.game-stats .found-count{font-size:22px;gap:8px;line-height:1.25}
.game-stats .found-count strong{font-size:28px}
.round-hearts{font-size:36px;line-height:40px;gap:4px}
.heart-actions{gap:10px;margin-top:10px}
.game-stats #hint{font-size:16px;padding:10px 13px}
.game-stats .game-clock .game-kicker{font-size:15px;letter-spacing:.6px;line-height:1.4;margin-bottom:8px;max-width:none}
.game-stats .game-clock strong{font-size:48px;line-height:1.2}
.run-stats{font-size:21px;gap:14px}
.run-stats strong{font-size:32px;min-width:65px;margin-left:10px}
.game-actions{flex-shrink:0;padding:12px 18px;min-height:64px}
.game-actions p{font-size:16px;line-height:1.5}
.game-actions .quiet-button{font-size:16px;padding:12px 18px}
.game-dialog h2{font-size:30px}
.game-dialog p{font-size:18px}
.game-dialog .quiet-button,.game-dialog .primary-button{font-size:17px}
@media(max-width:1000px){
    .game-stats{grid-template-columns:minmax(0,1fr) minmax(0,1fr);padding:20px;gap:20px;min-height:0}
    .game-clock{grid-column:1 / -1;grid-row:1}
    .motif-stats{grid-column:1;grid-row:2}
    .run-stats{grid-column:2;grid-row:2}
    .game-stats .game-clock .game-kicker{font-size:15px}
    .game-stats .found-count{font-size:18px}
    .game-stats .found-count strong{font-size:25px}
    .round-hearts{font-size:30px;line-height:34px;gap:3px}
    .heart-actions{align-items:flex-start;gap:8px}
    .game-stats #hint{font-size:14px;padding:9px 10px}
    .run-stats{font-size:18px}.run-stats strong{font-size:28px;min-width:38px}
}
@media(max-width:600px){
    .game-heading{min-height:70px;gap:8px}
    .game-heading .quiet-button{font-size:14px;padding:10px 12px}
    .game-brand{min-width:0}.game-brand img{width:160px}.game-brand span{font-size:12px;letter-spacing:2px}
    .picture-card figcaption{font-size:12px;letter-spacing:.7px;padding:7px 12px;margin-top:-22px}
    .game-stats{padding:18px 16px;gap:16px;border-radius:28px / 22px}
    .game-stats .game-clock .game-kicker{font-size:14px;margin-bottom:6px}
    .game-stats .game-clock strong{font-size:44px}
    .game-stats .found-count{font-size:18px}.game-stats .found-count strong{font-size:24px}
    .round-hearts{font-size:29px;line-height:32px;gap:2px}
    .game-actions{padding:12px;gap:12px}
    .game-actions p{font-size:14px}
    .game-actions .quiet-button{font-size:14px;padding:11px 14px}
}
@media(max-height:550px) and (min-width:601px){
    .game-heading{height:auto;min-height:76px}
    .game-brand img{width:190px}.game-brand span{font-size:14px}
    .game-stats{padding:18px 20px}
    .game-stats .game-clock .game-kicker{font-size:14px}
    .game-stats .found-count{font-size:18px}.game-stats .found-count strong{font-size:24px}
    .round-hearts{font-size:29px;line-height:32px}
    .game-stats #hint{font-size:14px;padding:8px 10px}
    .game-actions p{font-size:15px}
}

/* Lift the controls and tighten the vertical flow without reducing HUD lettering. */
.game-screen{padding-top:8px}
.game-heading{margin-bottom:-8px}
.game-heading .quiet-button{align-self:flex-start;margin-top:2px}
.picture-pair{margin:12px auto}
.picture-card figcaption{font-size:9px;padding:6px 22px;margin-top:-22px;margin-bottom:8px;letter-spacing:2px}
@media(max-width:600px){
    .picture-card figcaption{font-size:7px;letter-spacing:1px;padding:5px 13px;margin-top:-18px;margin-bottom:6px}
}
@media(max-height:550px) and (min-width:601px){
    .picture-card figcaption{font-size:7px;padding:3px 14px;margin-top:-14px;margin-bottom:4px}
}

/* Quiet header controls; the glass HUD shares the timer's playful lettering. */
.game-heading .quiet-button{font-size:11px;padding:10px 17px}
.game-stats,.game-stats .found-count,.game-stats .found-count strong,
.game-stats .game-clock .game-kicker,.game-stats .run-stats,.game-stats .run-stats strong,
.game-actions p,.game-actions .quiet-button{
    font-family:"Comic Sans MS","Chalkboard SE","Comic Neue",cursive;
    font-style:normal;
}
.game-stats #hint{font-family:"Segoe UI",Arial,sans-serif}
@media(max-width:600px){.game-heading .quiet-button{font-size:10px;padding:9px 12px}}

/* Every new picture starts concealed, then opens after Ready / Go. */
.round-concealed .picture-board img{visibility:hidden}
.round-concealed .picture-board{background:linear-gradient(135deg,#071071,#01064b)}
.round-intro{position:fixed;inset:0;z-index:25;display:grid;place-items:center;pointer-events:none;background:radial-gradient(ellipse at center,#173f9e35,transparent 58%)}
.round-intro-word{
    display:block;font-family:"Comic Sans MS","Chalkboard SE","Comic Neue",cursive;
    font-size:clamp(76px,13vw,180px);font-weight:900;line-height:1.2;letter-spacing:-4px;
    color:#ffdf25;-webkit-text-stroke:2px #9a5300;
    text-shadow:0 -2px 0 #fff5b2,0 3px 0 #f6aa08,0 6px 0 #be7400,0 9px 0 #754000,0 13px 3px #000851,0 18px 35px #0008;
    filter:drop-shadow(0 0 20px #ffdd3033);transform-origin:center;
}
@media(max-width:600px){.round-intro-word{letter-spacing:-2px;-webkit-text-stroke:1px #9a5300}}
.round-intro-word{opacity:0}

/* Place the round-start lettering a little above the screen centre. */
.round-intro{padding-bottom:12svh}

.game-stats .game-clock strong.completed-time{font-size:23px;line-height:1.35}
.game-stats .game-clock .completed-time span{display:block;font:inherit;font-size:26px;font-style:normal;letter-spacing:0;color:#fff65e}
.round-complete-actions{gap:12px;flex-wrap:wrap}
.round-complete-actions .primary-button{min-width:0;font-size:16px;padding:12px 20px}
.game-actions #celebration{position:relative;width:72px;height:65px;margin:0;flex-shrink:0}
.game-actions #celebration .frame-monkey{width:72px;height:84px;right:auto;bottom:auto;margin-top:-12px}
@media(max-width:600px){
    .game-stats .game-clock strong.completed-time{font-size:22px}
    .game-stats .game-clock .completed-time span{font-size:26px}
    .round-complete-actions{justify-content:center;flex-wrap:wrap}
    .round-complete-actions .primary-button{flex-basis:100%}
}

/* The score panel stays intact; a separate victory notice rises from below. */
.win-notification{position:fixed;z-index:65;left:50%;bottom:max(22px,env(safe-area-inset-bottom));width:min(580px,calc(100vw - 32px));transform:translateX(-50%);animation:win-notice-rise .65s cubic-bezier(.16,1,.3,1) both}
.win-notice{display:block;width:100%;padding:24px 28px;border:2px solid #b2cbf3;border-radius:28px;background:linear-gradient(165deg,#2444ccf5,#090b74f5 68%,#5278c5f5);box-shadow:inset 0 2px #f2f7ff80,0 12px 45px #0008;backdrop-filter:blur(12px);color:#fff167;font-family:"Comic Sans MS","Chalkboard SE","Comic Neue",cursive;text-align:center}
.win-notice strong{display:block;font-size:30px;line-height:1.3;text-shadow:0 3px 2px #00004b}
.win-notice span{display:block;font-size:18px;margin-top:13px}
.win-notice:hover{border-color:#fff3a3;box-shadow:inset 0 2px #f2f7ff80,0 12px 45px #0008,0 0 24px #e0d85b33}
.win-notice:focus-visible{outline:3px solid #fff383;outline-offset:5px}
.win-notification #celebration{position:absolute;right:8px;top:-65px;margin:0;width:80px;height:80px;pointer-events:none}
.win-notification #celebration .frame-monkey{position:relative;width:80px;height:93px;right:auto;bottom:auto;margin:0}
@keyframes win-notice-rise{from{transform:translate(-50%,calc(100% + 120px));opacity:0}to{transform:translate(-50%,0);opacity:1}}
@media(max-width:600px){.win-notice{padding:22px 16px}.win-notice strong{font-size:25px}.win-notice span{font-size:16px}}
@media(prefers-reduced-motion:reduce){.win-notification{animation:none}}

/* Cover the score panel vertically with a taller, opaque victory card. */
.win-notification{visibility:hidden}
.win-notice{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;background:linear-gradient(165deg,#2444cc,#090b74 68%,#5278c5)}

/* Detached heart stays visible above the HUD and the final-heart loss dialog. */
.lost-heart-effect{position:fixed;z-index:110;pointer-events:none;transform:translate(-50%,-50%);font-family:"Segoe UI Symbol","Segoe UI",sans-serif;line-height:1;text-align:center}
.lost-heart-balloon{display:block;width:100%;height:100%;color:#ff4770;background:linear-gradient(135deg,#ffe0e8 8%,#ff6385 30%,#ed174b 63%,#9d0030);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;filter:drop-shadow(0 2px 1px #650d36) drop-shadow(0 0 9px #ff477078);transform-origin:center}
.lost-heart-fragment{position:absolute;inset:0;font-size:20px;text-shadow:0 1px 2px #720d37;line-height:1}
.lost-heart-ring{position:absolute;left:0;width:100%;height:100%;border:3px solid #ff9db6;border-radius:50%;box-shadow:0 0 12px #ff4770;box-sizing:border-box}

/* Reserve space for the status row as well as the enlarged glass HUD. */
.game-actions{position:sticky;bottom:0;z-index:26}
@media(min-width:1001px){
    .game-screen{--playfield-width:min(100%,calc((100svh - 370px)*1464/1290*2 + 62px))}
    .game-stats{grid-template-columns:minmax(0,1fr) 200px minmax(0,1fr);gap:12px;padding:18px 22px}
    .game-actions{min-height:48px;padding:7px 16px}
    .game-actions .quiet-button{padding:8px 14px}
}

/* Give the photographs the space; keep the logo and vertical gaps compact. */
@media(min-width:1001px){
    .game-screen{gap:10px}
    .game-heading{height:48px;min-height:48px;margin-bottom:0}
    .game-brand img{width:140px}
    .game-brand span{font-size:10px;margin-top:-8px;letter-spacing:2px}
    .picture-pair{margin:8px auto;padding-top:0}
    .picture-pair,.game-stats{max-width:1800px}
}
/* Rounded, slightly uneven pen strokes stay legible on light and dark details. */
.game-screen .found-ring{border:0;border-radius:0;box-shadow:none;background:none;animation:none;z-index:2}
.ring-sketch{display:block;width:100%;height:100%;overflow:visible}
.ring-sketch path{fill:none;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}
.ring-outline{stroke:#132452;stroke-width:8;opacity:.9}
.ring-ink{stroke:#fff141;stroke-width:4.5}
.found-ring.ring-ready:not(.hint-ring):not(.looky-reveal-ring) .ring-sketch path{stroke-dasharray:var(--ring-length);stroke-dashoffset:0;animation:circle-drawn .38s ease-out both}
.found-ring:not(.hint-ring):not(.looky-reveal-ring):not(.ring-ready){visibility:hidden}
.game-screen .hint-ring{animation:hint-pulse .65s ease-in-out infinite alternate}
.hint-ring .ring-ink{stroke:#bceeff;stroke-dasharray:7 5;stroke-width:3.5}
@keyframes circle-drawn{from{stroke-dashoffset:var(--ring-length,0px)}to{stroke-dashoffset:0}}
@media(prefers-reduced-motion:reduce){.game-screen .hint-ring,.found-ring:not(.hint-ring) .ring-sketch path{animation:none}}
/* Wordless comic puff at the actual miss position. */
.miss-puff{position:fixed;width:80px;height:72px;transform:translate(-50%,-50%);pointer-events:none;z-index:109}
.miss-puff-cloud{display:block;width:100%;height:100%;overflow:visible;filter:drop-shadow(0 3px 2px #47203966)}
.miss-puff-spark{position:absolute;left:50%;top:50%;width:23px;height:21px;border-radius:45% 55% 40% 60%;background:radial-gradient(circle at 30% 25%,#ffd3a5,var(--puff-tone) 65%,#ac2940);box-shadow:inset 0 1px 1px #ffe1bb99,0 2px 2px #47203944}
.miss-puff-bolt{position:absolute;width:34px;height:46px;left:calc(50% - 17px);top:50%;overflow:visible;filter:drop-shadow(0 2px 2px #70304466)}

/* Classic mode uses the original countdown instead of the heart budget. */
.classic-penalty{margin:12px 0 0;color:#ffe87a;font-size:17px;line-height:1.5}
.round-timebar{height:9px;border:1px solid #bfd8ff99;border-radius:8px;overflow:hidden;margin:9px auto 0;width:100%;max-width:190px;background:#02064d;box-shadow:inset 0 1px 3px #0008}
.round-timebar>div{height:100%;background:linear-gradient(#fff9b0,#ffe12b 45%,#c69204);border-radius:inherit}
.game-stats .time-critical strong{color:#ff9365;text-shadow:0 2px 3px #0008,0 0 10px #ff572044}
.time-critical .round-timebar>div{background:linear-gradient(#ffc38a,#ff723f 45%,#c22c22)}
.win-time-bonus{display:block;margin-top:7px;color:#fff4aa;font-size:14px;line-height:1.35;text-align:center}

/* Full-width luminous time rail lives between photographs and the glass HUD. */
.timed-game .game-heading{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)}
.game-nav{display:flex;align-items:center;gap:8px}
.timed-game .game-heading>button:last-child{justify-self:end}
.timed-game .picture-pair{margin-bottom:0}
.timed-game .round-timebar{
    position:relative;flex-shrink:0;width:var(--playfield-width);max-width:1800px;height:29px;
    margin:0 auto;padding:3px;border:1px solid #c5dcff;border-radius:16px;
    background:linear-gradient(#e1f1ff,#5e7fb9 18%,#17234b 44%,#030946 55%,#5b7db9 88%,#cce6ff);
    box-shadow:inset 0 1px 2px #fff9,0 3px 0 #010331,0 0 15px #3d8dff40;
    overflow:hidden;isolation:isolate
}
.timed-game .round-timebar>.timebar-fill{
    position:relative;height:100%;border-radius:12px;overflow:hidden;
    background:linear-gradient(#ffffda 0%,#fff26b 17%,#ffc928 47%,#eea60d 53%,#ffe855 85%,#fff9c7);
    box-shadow:inset 0 1px #ffffe7,0 0 13px #ffe434cc;
    transition:width .25s linear;min-width:0
}
.timebar-fill:after{content:"";position:absolute;right:0;top:0;width:8px;height:100%;border-radius:50%;background:#fffbd5;box-shadow:0 0 9px 4px #ffffa1}
.timebar-flow{position:absolute;inset:0;background:repeating-linear-gradient(115deg,#fff9 0 2px,transparent 2px 18px);opacity:.45;animation:time-energy 2.4s linear infinite}
.timed-game .round-timebar>.timebar-glass{position:absolute;inset:3px 5px auto;height:43%;border-radius:12px;background:linear-gradient(#ffffffe0,#ffffff05);pointer-events:none}
.timed-game .round-timebar:after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(110deg,transparent 36%,#ffffff88 49%,transparent 62%);transform:translateX(-110%);animation:time-sheen 4.5s ease-in-out infinite}
.timed-game .round-timebar.time-critical>.timebar-fill{background:linear-gradient(#fff1bc,#ffac3c 40%,#f34f30 60%,#ffc166);box-shadow:0 0 15px #ff743f}
.time-settling .round-timebar>.timebar-fill{transition:none}
.time-settling #game-score{color:#fff8a3;text-shadow:0 0 12px #ffda3888}
#counted-time-bonus{font:600 13px "Comic Sans MS",cursive;color:#fff192}
@keyframes time-energy{to{background-position:80px 0}}
@keyframes time-sheen{0%,35%{transform:translateX(-110%)}80%,100%{transform:translateX(110%)}}
@media(max-width:600px){
    .game-nav{gap:5px}.game-nav .pause-label{display:none}
    .timed-game .game-brand img{width:130px}
    .timed-game .game-heading .quiet-button{padding:8px}
    .timed-game .round-timebar{height:24px}
}
@media(prefers-reduced-motion:reduce){.timebar-flow,.timed-game .round-timebar:after{animation:none}.timed-game .round-timebar>.timebar-fill{transition:none}}

/* Only the instruction blinks; the whole success button stays clickable. */
.win-prompt{opacity:0;min-height:1.35em}

/* Looky stays in the free HUD niches; photos retain their original dimensions. */
.game-looky{position:fixed;inset:0;z-index:85;pointer-events:none;font-family:"Comic Sans MS","Chalkboard SE","Comic Neue","Trebuchet MS",sans-serif}
.game-looky[hidden]{display:none}
.looky-actor{position:absolute;pointer-events:none;will-change:left,top}
.game-looky .frame-monkey{inset:0;width:100%;height:100%;margin:0;pointer-events:none;filter:drop-shadow(0 2px 2px #0006)}
.game-looky .monkey-figure{transform-origin:50% 87%}
.game-looky[data-compact=true][data-status=searching] .looky-actor,
.game-looky[data-compact=true][data-status=intro] .looky-actor,
.game-looky[data-compact=true][data-status=paused] .looky-actor,
.game-looky[data-compact=true][data-status=settling] .looky-actor{clip-path:inset(-10% -40% 40% -40%)}
.game-stats.looky-compact-hud{padding-bottom:70px}
.looky-caption{position:absolute;transform:translateX(-50%);width:max-content;max-width:200px;padding:9px 12px;border:1.5px solid #cfe7ff;border-radius:16px;background:linear-gradient(#2447ca,#09116f);box-shadow:0 3px 12px #0005,inset 0 1px #fff4;color:#fff18a;font-size:15px;line-height:1.3;text-align:center;text-shadow:0 1px #0005}
.looky-caption:after{content:"";position:absolute;bottom:-6px;left:calc(50% - 5px);width:9px;height:9px;transform:rotate(45deg);background:#0b1577;border-right:1.5px solid #cfe7ff;border-bottom:1.5px solid #cfe7ff}
.looky-caption[hidden],.looky-pencil[hidden]{display:none}
.looky-pencil{position:absolute;width:22px;pointer-events:none;transform-origin:50% 100%;filter:drop-shadow(0 2px 2px #0006)}
.looky-pencil svg{width:100%;height:100%;display:block}
.loss-notification{position:fixed;z-index:65;left:50%;width:min(760px,calc(100vw - 32px));transform:translateX(-50%);visibility:hidden;animation:win-notice-rise .65s cubic-bezier(.16,1,.3,1) both}
.loss-dialog{width:100%;height:100%;max-height:none;min-height:170px;margin:0;padding:14px 22px;text-align:center;box-sizing:border-box}
.loss-dialog h2{font:700 26px "Comic Sans MS",cursive;margin:0 0 6px;color:#fff18a}
.loss-dialog p{font-size:15px;line-height:1.35;margin:5px 0}
.loss-dialog .lost-hearts{display:none}
.loss-dialog button{font-size:14px;padding:10px 18px;margin:5px 4px 0}
.game-screen .looky-reveal-ring .ring-sketch path{animation:none;stroke-dasharray:none}
.game-screen .looky-reveal-ring .ring-ink{stroke:#ff9b36;stroke-width:5}
@media(max-width:600px){
 .looky-caption{font-size:13px;max-width:156px;padding:7px 9px}
 .loss-dialog{padding:12px 14px}.loss-dialog h2{font-size:23px}
 .loss-dialog p{font-size:13px}.loss-dialog button{font-size:13px;padding:9px 12px}
}
@media(prefers-reduced-motion:reduce){.loss-notification{animation:none}.looky-actor{will-change:auto}}

.loss-dialog{grid-template-columns:1fr 1fr;gap:4px;align-content:center;overflow:visible}
.loss-dialog h2,.loss-dialog p{grid-column:1/-1}
.loss-dialog button{width:100%;margin:2px 0 0}

.looky-niche{position:absolute;width:68px;height:12px;border:1px solid #c0dfff;border-radius:50%;background:linear-gradient(#97c4ff,#1538a9 55%,#bddaff);box-shadow:0 2px 7px #0005}
.looky-niche[hidden]{display:none}
@media(max-height:550px){
 .loss-dialog{padding:6px 12px;gap:3px;min-height:118px}
 .loss-dialog h2{font-size:20px;margin:0;line-height:1.2}
 .loss-dialog p{font-size:12px;line-height:1.2;margin:0}
 .loss-dialog button{font-size:12px;padding:7px 12px;margin:0}
 .win-notice{padding:10px 16px}.win-notice strong{font-size:22px}
 .win-notice span{font-size:14px;margin-top:6px}.win-time-bonus{font-size:12px;margin-top:4px}
}

.game-looky[data-hint-active=true][data-compact=true] .looky-actor{clip-path:none}

.looky-pencil-grip{position:absolute;left:50%;transform:translate(-50%,-50%);pointer-events:none}
.looky-pencil-grip svg{display:block;width:100%;height:100%}

/* Keep the pencil in front of the whole character, including its nested SVG layers. */
.game-looky .looky-actor{z-index:1}
.game-looky .looky-pencil{z-index:2}
.game-looky .looky-pencil-grip{z-index:1}
.game-looky .looky-caption{z-index:3}

@media(prefers-reduced-motion:reduce){
 .found-ring.ring-ready:not(.hint-ring):not(.looky-reveal-ring) .ring-sketch path{animation:none}
}

/* Looky draws attention to available hints after a prolonged search. */
.game-screen button.looky-hint-pulse:not(:disabled){border-color:#fff4b0;color:#fff8bd;background:linear-gradient(#315ddd,#132477);animation:looky-hint-call 1.2s ease-in-out infinite}
@keyframes looky-hint-call{0%,100%{box-shadow:inset 0 1px #fff7,0 0 0 2px #ffe46a77,0 0 12px #ffcf3877;filter:brightness(1)}50%{box-shadow:inset 0 1px #fffb,0 0 0 5px #ffe67c99,0 0 28px #ffc83bcc;filter:brightness(1.22)}}
@media(prefers-reduced-motion:reduce){.game-screen button.looky-hint-pulse:not(:disabled){animation:none;box-shadow:inset 0 1px #fff8,0 0 0 3px #ffe46aaa,0 0 20px #ffcf38aa}}
/* A quiet search motif sits behind the pictures until their reveal completes. */
.picture-board,.round-concealed .picture-board{
 background-image:url("picture-loading-pattern.svg?v=8"),radial-gradient(ellipse at 45% 35%,#0b145b,#050b43 85%);
 background-size:40px 40px,100% 100%;background-position:center,center;background-repeat:repeat,no-repeat;
}
@media(max-width:600px){.picture-board,.round-concealed .picture-board{background-size:40px 40px,100% 100%}}

.game-brand .solo-debug-label{color:#ffe26c;letter-spacing:.08em;font-weight:900;text-shadow:0 1px 3px #000}

.timed-game .game-stats #hint.classic-run-hint{margin-top:4px;white-space:normal;font-size:12px;line-height:1.3;padding:7px 10px;max-width:100%}.timed-game .game-stats #hint:disabled{cursor:default;opacity:.5}
@media(max-width:600px){.timed-game .game-stats #hint.classic-run-hint{font-size:10px;padding:6px 7px}}

.personal-record{font-weight:900;color:#fff080!important;text-shadow:0 0 14px #ffcb3980;animation:record-glow 1s ease-in-out 3 alternate}@keyframes record-glow{to{text-shadow:0 0 22px #ffe793;transform:scale(1.02)}}@media(prefers-reduced-motion:reduce){.personal-record{animation:none}}

.loss-dialog:has(#record-highscore){grid-template-columns:repeat(3,minmax(0,1fr))}.loss-dialog #record-highscore{white-space:normal}@media(max-width:600px){.loss-dialog:has(#record-highscore) button{padding-inline:6px;font-size:12px}}

.game-screen:not(.timed-game) .game-stats #hint{white-space:normal;line-height:1.3;max-width:100%;font-size:13px;padding:8px 10px}@media(max-width:600px){.game-screen:not(.timed-game) .game-stats #hint{font-size:10px;padding:6px 7px}}

/* Fit the game-over background to all text and actions. */
.loss-dialog{height:auto;max-height:calc(100svh - 32px);overflow-y:auto;overflow-x:hidden}
