@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=Cormorant+Garamond:ital,wght@0,400;1,400&display=swap');
:root{--paper:#f6f2e9;--ink:#283e34;--peach:#e0b69b}html,body{background:#243a32;font-family:'DM Sans',Arial,sans-serif;color:var(--paper)}body{height:100svh}button{font-family:inherit}button:focus-visible,a:focus-visible{outline:2px solid #e4bd83;outline-offset:5px}button[hidden],[hidden]{display:none!important}.game-header{height:76px;display:flex;justify-content:space-between;align-items:center;padding:0 5%;border-bottom:1px solid #ffffff22;position:relative;z-index:110;background:#243a32}.game-brand{font:38px 'Cormorant Garamond',Georgia,serif;letter-spacing:-3px;text-decoration:none;color:var(--paper)}.game-brand span{font-style:italic;font-size:26px}.game-header>div{display:flex;gap:25px;align-items:center}.game-header a:not(.game-brand),.game-header button{font:11px 'DM Sans',Arial,sans-serif;color:var(--paper);text-decoration:none;background:none;border:0;cursor:pointer}.game-header button{padding:10px}.game-status{font-size:9px;letter-spacing:2px;color:#d1d8c4;text-align:center;margin-bottom:13px}#wrap{height:calc(100svh - 76px);padding:20px 14px 22px;gap:10px}#gameContainer{border:1px solid #c4ccac;box-shadow:0 16px 60px #0c201866;border-radius:0}#stage{gap:15px;max-width:100%}#ui{font-family:'Press Start 2P',monospace;padding:10px}.uib{background:#263b31ed;border:1px solid #d8dfc282;border-radius:2px;font-size:7px}.uib b{color:#e9c59d}#muteBtn{font-size:13px;min-width:36px;min-height:36px}#dlg{font-family:'DM Sans',Arial,sans-serif;background:#f7f2e9;border:1px solid #b0baa0;border-radius:0;color:#2e4034;box-shadow:0 8px 30px #12251b55;text-shadow:none;padding:17px 24px;font-size:16px;line-height:1.5;bottom:18px;max-width:650px}#dlgSpk{color:#8a4d46;text-shadow:none;font-size:10px;letter-spacing:1px}#dlgTxt{text-shadow:none;min-height:25px}#dlgHint{font-size:9px;color:#66725d;animation:none;margin-top:10px}#lvlTitle{font-family:'Press Start 2P',monospace;font-size:16px}.screen{background:linear-gradient(90deg,#243a32ed,#243a32a8),url('island.svg') center 55%/cover;padding:22px}.screen::after{content:'';position:absolute;inset:16px;border:1px solid #ffffff28;pointer-events:none}.heartsRain{opacity:.12}.heartsRain span{filter:grayscale(1)}.game-kicker{font-size:8px;letter-spacing:2.5px;z-index:2;margin:0 0 8px}#titleScreen .couple{font:27px monospace;color:var(--peach);margin:0 0 7px;filter:none;animation:none}#titleScreen h1{font-family:'Cormorant Garamond',Georgia,serif;font-weight:400;line-height:.91;letter-spacing:-2px;font-size:66px;color:var(--paper);text-shadow:none;margin-bottom:15px}#titleScreen h1 em{font-weight:400;color:#edc5a9}#titleScreen h2{font:12px/1.7 'DM Sans',Arial,sans-serif;color:#e2e5d8;text-shadow:none;margin-bottom:16px}.route{display:flex;align-items:center;gap:0;z-index:2;margin-bottom:18px}.route span{width:25px;height:25px;border:1px solid #f6f2e969;border-radius:50%;display:grid;place-items:center;font-size:7px;color:#e7c6a1}.route i{width:30px;border-top:1px dashed #f6f2e94a}.start-button{border:1px solid var(--paper);background:var(--paper);color:var(--ink);padding:14px 24px;font-size:10px;letter-spacing:1px;cursor:pointer;z-index:2}.start-button span{margin-left:30px}.start-button:hover{background:#e7d6bd}.start-hint{font-size:6px;letter-spacing:1px;margin:10px 0 13px;z-index:2;color:#c1ceb5}.skiplink{font-family:'DM Sans',Arial,sans-serif;font-size:10px;color:#dedbc9;background:none;border:0;animation:none;padding:7px;line-height:1.5}.skiplink:hover{color:white}#endScreen{background:linear-gradient(#243a32e8,#243a32c9),url('island.svg') center/cover}#endScreen h1{font:27px/1.1 'Cormorant Garamond',Georgia,serif;color:var(--paper);text-shadow:none;margin-bottom:6px}.edate{font:42px 'Cormorant Garamond',Georgia,serif;letter-spacing:0;color:#edc5a9;text-shadow:none;animation:none;margin:10px 0}.eloc{font:14px/1.5 'DM Sans',Arial,sans-serif;color:var(--paper);text-shadow:none}#countdown{font:10px 'DM Sans',Arial,sans-serif;color:#cad4bd;text-shadow:none;margin-bottom:18px}.ehearts{font-size:21px;margin-bottom:12px;animation:none}#calBtn,#siteBtn{font:10px 'DM Sans',Arial,sans-serif;border:1px solid var(--paper);border-radius:0;padding:12px 20px;box-shadow:none;min-width:240px;text-align:center;margin-bottom:10px}#calBtn{background:var(--paper);color:var(--ink)}#siteBtn{background:transparent;color:var(--paper)}.erestart{font:9px 'DM Sans',Arial,sans-serif;animation:none;border:0;background:none;color:#d9d8c7;padding:10px;cursor:pointer}#deskHint{font:9px 'DM Sans',Arial,sans-serif;letter-spacing:1px;color:#c2cbb7}#deskHint b{color:#e1bea0}#mpad{max-width:650px;touch-action:none}.pbtn{font-family:'DM Sans',Arial,sans-serif;border-radius:6px;border:1px solid #c2ccb280;background:#ffffff10;box-shadow:none;touch-action:none}#jumpBtn{background:#e5c5a3;color:#243a32;border:1px solid #e5c5a3;width:66px;height:66px;touch-action:none}#pauseOverlay{position:fixed;inset:76px 0 0;background:#182e26ed;z-index:105;display:grid;place-items:center;padding:25px;text-align:center}#pauseOverlay>div{display:flex;flex-direction:column;align-items:center;gap:25px}#pauseOverlay p{font-size:9px;letter-spacing:2px}#pauseOverlay h2{font:48px 'Cormorant Garamond',Georgia,serif;font-weight:400}#resumeBtn{font-size:12px;padding:15px 30px;border:1px solid var(--paper);background:var(--paper);color:var(--ink);cursor:pointer}#pauseOverlay a{font-size:11px;color:var(--paper)}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
@media(max-width:700px){.game-header{height:67px;padding:0 5%}.game-header>div{gap:10px}.game-header a:not(.game-brand),.game-header button{font-size:9px}.game-header button{padding:8px 2px}.game-brand{font-size:32px}.game-status{font-size:7px;letter-spacing:1.2px;margin:0 0 7px}#wrap{height:calc(100svh - 67px);padding:14px 10px 20px;justify-content:center}#gameContainer{overflow:visible}#stage{gap:22px}.screen{position:fixed;inset:67px 0 0;z-index:100;padding:30px 20px;overflow:auto;justify-content:center}.screen::after{inset:16px}#titleScreen h1{font-size:clamp(66px,17vw,93px);margin:20px 0 24px}#titleScreen h2{font-size:12px;line-height:1.8;margin-bottom:27px}.game-kicker{font-size:8px;letter-spacing:1.8px}#titleScreen .couple{font-size:34px;margin-top:22px}.route{margin-bottom:30px}.route span{width:30px;height:30px;font-size:8px}.route i{width:33px}.start-button{font-size:10px;padding:18px 25px}.start-hint{font-size:6px;margin:15px 0 20px}.skiplink{font-size:11px;padding:13px}.uib{padding:4px 5px;font-size:5px;line-height:1.9}#ui{padding:6px}.uiGroup{gap:4px}#muteBtn{font-size:11px;min-height:30px;min-width:30px}#dlg{position:absolute;top:100%;bottom:auto;left:0;transform:none;width:100%;max-height:185px;overflow:auto;margin-top:10px;padding:12px 14px;font-size:14px;z-index:25}#dlg.pop{animation:none}#dlgSpk{font-size:9px;margin-bottom:6px}#dlgHint{font-size:8px;margin-top:8px}#mpad{margin-top:190px;position:relative;z-index:30;padding:0 5px}.pbtn{width:58px;height:58px}#jumpBtn{width:64px;height:64px}#lvlTitle{font-size:12px;line-height:1.8}#lvlTitle .sub{font-size:8px}#endScreen h1{font-size:34px;line-height:1.2;margin:20px 0}.edate{font-size:44px;margin:15px 0}.eloc{font-size:17px;line-height:1.6}#countdown{font-size:12px;margin:20px 0 30px}#calBtn,#siteBtn{font-size:11px;padding:17px 20px;min-width:265px;margin-bottom:15px}.erestart{font-size:10px;padding:15px}.ehearts{font-size:25px}#pauseOverlay{inset:67px 0 0}#pauseOverlay h2{font-size:40px}}
@media(max-height:650px) and (max-width:700px){.screen{padding-block:22px}#titleScreen h1{font-size:55px;margin:8px 0 14px}#titleScreen .couple{margin:7px 0;font-size:22px}#titleScreen h2{font-size:10px;margin-bottom:14px}.route{margin-bottom:15px}.start-hint{margin:10px 0}.skiplink{padding:6px}.edate{font-size:34px;margin:8px 0}#endScreen h1{font-size:25px;margin:10px 0}.eloc{font-size:14px}#countdown{margin:12px 0}#calBtn,#siteBtn{padding:12px 20px;margin-bottom:10px}#mpad{margin-top:140px}#dlg{max-height:135px;font-size:12px}}
@media(max-height:500px) and (min-width:701px){.game-header{height:48px}#wrap{height:calc(100svh - 48px);padding:10px}.game-status{display:none}.screen{position:fixed;inset:48px 0 0;padding:15px}.screen h1,#titleScreen h1{font-size:45px;margin:5px 0 10px}#titleScreen .couple,.route,.start-hint{display:none}#titleScreen h2{font-size:10px;margin-bottom:12px}.game-kicker{margin-bottom:10px}#mpad{position:fixed;bottom:15px;left:12px;right:12px;max-width:none;width:auto;pointer-events:none}#mpad button{pointer-events:auto}#dlg{font-size:12px;bottom:5px;padding:8px 12px}#dlgSpk{font-size:8px}#dlgHint{font-size:7px}.edate{font-size:30px}.ehearts{display:none}#countdown{margin-bottom:10px}#endScreen h1{font-size:23px}#pauseOverlay{inset:48px 0 0}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}.heartsRain{display:none}}

/* Illustrated edition: keep the playfield clear and let the artwork breathe. */
canvas{image-rendering:auto}#lvlTitle{font-family:'Cormorant Garamond',Georgia,serif;color:#fcf1d6;text-shadow:0 2px 12px #183c38;font-weight:400;font-size:33px;line-height:1.25;background:#29483bc9;padding:18px 35px;border:1px solid #e3d2ae80;border-radius:2px}#lvlTitle .sub{font:13px 'DM Sans',Arial,sans-serif;letter-spacing:2px;margin-top:6px;text-shadow:none}.uib{font-family:'DM Sans',Arial,sans-serif;font-size:9px;background:#f5edd8ec;color:#35574f;border-color:#a5b39a;padding:6px 9px}.uib b{color:#926746}#uiSub{font-size:8px}#uiLvl{letter-spacing:1px}#gameContainer{border-color:#c7d0b4;box-shadow:0 24px 80px #101e1744}
@media(max-width:700px){.uib{font-size:7px;padding:4px 6px}#uiSub{font-size:6px}#lvlTitle{font-size:22px;padding:12px 22px}#lvlTitle .sub{font-size:9px;letter-spacing:1px}}

/* Keep the river and Vincenzo visible throughout the tower dialogue. */
@media(min-width:701px){#gameContainer[data-scene="2"] #dlg{top:65px;bottom:auto;}}
/* Side controls and dialogue leave the entire scene visible on landscape phones. */
@media(max-height:500px) and (min-width:701px) and (pointer:coarse){
  #gameContainer{overflow:visible}
  #gameContainer #dlg,#gameContainer[data-scene="2"] #dlg{
    position:fixed;top:72px;right:12px;bottom:auto;left:auto;transform:none;
    width:156px;max-height:calc(100svh - 175px);overflow:auto;
    padding:12px 10px;font-size:12px;line-height:1.5;text-align:left;
  }
  #dlg.pop{animation:none}
  #dlgSpk{font-size:9px;letter-spacing:.3px}
  #dlgHint{font-size:7px;line-height:1.6}
}
