/* Campaign refinement of the existing Rural Trap game. */
@font-face{font-family:StoryDisplay;src:url('assets/story-display-regular-v5.ttf') format('truetype');font-style:normal;font-weight:400;font-display:swap}
@font-face{font-family:StoryDisplay;src:url('assets/story-display-bold-v5.ttf') format('truetype');font-style:normal;font-weight:700;font-display:swap}
@font-face{font-family:StorySans;src:url('assets/story-sans.woff') format('woff');font-style:normal;font-weight:400;font-display:swap}
.portrait-overlay{position:fixed;inset:0;z-index:200;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:20px max(24px,env(safe-area-inset-left));background:radial-gradient(ellipse at center,#46231b,#21120e);text-align:center;touch-action:none;color:var(--gold);gap:12px}
.portrait-overlay[hidden],.portrait-overlay [hidden]{display:none!important}.portrait-overlay h2{font:500 clamp(23px,5vw,34px)/1.1 var(--serif);margin:0;max-width:360px}.portrait-overlay p{font-size:13px;color:var(--muted);margin:0;max-width:330px}.portrait-overlay .primary{width:min(100%,320px);margin-top:6px;min-height:48px}.portrait-phone{height:70px;width:45px;fill:none;stroke:var(--gold);stroke-width:3;flex-shrink:0}
.app{padding-top:max(14px,env(safe-area-inset-top));padding-bottom:calc(18px + env(safe-area-inset-bottom))}
.topbar{margin-bottom:12px;min-height:34px}.brand{font-size:17px}.language-button{min-height:40px}
.home{text-align:center}.home-art{width:clamp(215px,36svh,320px);max-width:94%;height:auto;aspect-ratio:1;margin:4px auto 6px;transform:none;border:0;background:none}
.home-art:before{content:'';position:absolute;inset:-7px -20px;background:url('assets/folk-ornament.svg') center/100% 100% no-repeat;pointer-events:none;opacity:.9}
.home-art img{position:relative;width:88%;height:auto;aspect-ratio:1;object-fit:contain;display:block;margin:0 auto;border:1px solid #e6b76980;border-radius:4px;box-shadow:0 10px 28px #0007}
.home-title{font:500 clamp(34px,9.5vw,43px)/.99 var(--serif);letter-spacing:-.8px;margin:0 auto 9px;max-width:100%;color:var(--gold);text-wrap:balance;text-transform:uppercase}
.home-title span{display:block}.home-title span:last-child{font-size:.73em;margin-top:4px;letter-spacing:.7px}
.round-badge{display:inline-flex;align-items:center;justify-content:center;gap:7px;border:1px solid #d19c5255;border-radius:20px;margin-top:9px;padding:4px 12px;color:var(--gold);font-size:10px;line-height:1.3;background:#f4ce8706}.round-badge svg{width:13px;height:13px}
.game-tagline{font-size:12px;line-height:1.4}.challenge{margin:10px 0 12px}.challenge>p{margin:0;color:var(--gold);font:italic 19px/1.25 var(--serif)}
#artistRecords{font:600 11px/1.45 system-ui;margin-top:6px;color:var(--muted);text-wrap:balance}
.home .primary{position:relative;min-height:55px;font:700 clamp(16px,4.7vw,20px)/1.2 var(--serif);gap:12px;padding:13px 25px;border:1px solid #ffe5ad;border-radius:9px;background:linear-gradient(110deg,#efbd68,#ffe4a6 48%,#edb75e);box-shadow:0 3px 0 #8c532d,0 0 22px #eebd6220}
.home .primary:before,.home .primary:after{content:'';position:absolute;top:8px;bottom:8px;width:18px;background:url('assets/folk-ornament.svg') left top/135px 125px;opacity:.23;pointer-events:none}.home .primary:before{left:4px}.home .primary:after{right:4px;transform:scaleX(-1)}
.home .primary .start-play{font-size:19px;flex-shrink:0}.home .primary .start-copy{font:inherit;min-width:0}.home .primary .start-arrow{font:400 28px/1 var(--serif);position:absolute;right:13px}
.hard-start{margin-top:12px;min-height:44px;width:100%;border:1px solid #d3a66680;border-radius:8px;color:var(--gold);background:#160a0640;font:600 16px/1.2 var(--serif)}
.hard-caption{font-size:11px;line-height:1.4;color:var(--muted);margin:5px 0 12px}.beat-label{margin:8px 0;font-size:11px}
.music-card{gap:12px;min-height:74px;padding:9px 12px;margin:10px 0;text-align:left;border-radius:9px;box-shadow:0 3px 0 #4b120c}
.music-cover{width:52px;height:52px;flex:0 0 52px;object-fit:contain;border:1px solid var(--gold);border-radius:3px}
.music-card .listen-copy{gap:3px}.music-card .listen-copy strong{font-size:15px;line-height:1.25;overflow-wrap:normal}.music-card .listen-copy small{font-size:10px;line-height:1.3}.music-card .listen-arrow{font-size:23px;flex:0 0 18px}
.music-card[aria-disabled=true]{cursor:default}.music-card[aria-disabled=true] .listen-arrow{visibility:hidden}
.music-card[aria-disabled=true]:hover{filter:none}.home-bottom{margin:12px 0 2px;justify-content:center;font-size:10px;line-height:1.7}.personal-bests b{margin:0 5px;color:var(--gold)}
.home-links{display:flex;justify-content:center;gap:18px}.home-links .text-button{min-height:42px;margin:0;padding:10px 0;font-size:11px}.home~footer{margin-top:10px}

/* Enlarge by 14%; the 75% target is shared with field-layout.mjs. */
.game .lanes{--field-base:110px;--field-growth:1.14;height:calc(var(--field-base)*var(--field-growth));flex:none}
.hit-line{top:var(--hit-y,75%);bottom:auto;transform:translateY(-1px)}.hit-line span{font-size:7px;letter-spacing:1.1px;top:6px;right:8px}
.game .pads{margin-top:14px;margin-bottom:9px;gap:12px}.game .pad{min-height:70px}.game .clap-button{min-height:40px;font-size:12px;letter-spacing:.3px}
.game .game-hint{margin:7px 0 0;font-size:10px;line-height:1.35}.game .game-hint span{display:block}.game .game-hint br{display:none}
body[data-screen=game]{overflow:hidden;overscroll-behavior:none}body[data-screen=game] .app{padding-bottom:calc(16px + env(safe-area-inset-bottom));padding-top:10px}
body[data-screen=game] footer{display:none}body[data-screen=game] main{touch-action:none;overscroll-behavior:none}

/* Compact vertical result hierarchy. */
.result-heading{display:grid;grid-template-columns:108px minmax(0,1fr);gap:14px;align-items:center;text-align:left}
.result .grandma-player{width:108px;height:120px;margin:0}.result .eyebrow{font-size:8px;letter-spacing:1.7px;line-height:1.4}
.result h2{font-size:clamp(23px,6.8vw,29px);line-height:1.08;margin:7px 0 5px;letter-spacing:-.5px;text-wrap:balance}
.result-sub{font-size:11px;line-height:1.4;margin:0}.verdict-reply{display:flex;align-items:center;gap:8px;margin:8px 0}
.result .grandma-reply{font-size:14px;line-height:1.35;min-height:0;margin:0;flex:1;text-align:left}.result .reward-button{font-size:10px;line-height:1.25;min-height:36px;max-width:98px;flex:0 0 88px;padding:7px 9px}
.mode-result-label{margin:9px 0 0;font-size:10px;letter-spacing:.7px}.result-score{margin:6px 0 12px}.result-score strong{font-size:clamp(60px,17vw,78px);line-height:1.05;font-variant-numeric:tabular-nums}.result-score span{margin-top:2px;font-size:9px;letter-spacing:2px}
.result-stats{border:0;padding:0;margin:0 0 12px;gap:8px}.result-stats div{border:0;gap:2px}.result-stats b{font-size:25px;line-height:1.1}.result-stats span{font-size:11px}
.result-badges{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;font-size:11px;color:var(--gold);line-height:1.4}.result-badges .new-best{margin:0 0 10px}.result-badges #artistAchievement:not([hidden]){margin-bottom:10px}
.compact-primary{min-height:50px;padding:12px 16px;font-size:15px}.compact-share{min-height:44px;margin-top:9px!important;font-size:14px!important;display:flex;justify-content:center;align-items:center;gap:9px}
.share-tools{display:flex;justify-content:center;gap:20px}.share-tools .text-button{font-size:10px;min-height:36px;padding:6px 2px}.result .music-card{margin-top:3px;margin-bottom:5px}
.switch-mode,.back-home{display:block;margin:0 auto;min-height:38px;max-width:100%;line-height:1.3}.switch-mode{font-size:12px;color:var(--gold);padding:8px 12px}.back-home{font-size:11px;padding:7px 12px;color:var(--muted)}
@media(max-height:740px){.game .lanes{--field-base:90px}.game .game-hint{font-size:9px}.home-art{margin-bottom:9px}.challenge{margin:8px 0 10px}}
@media(max-height:620px){.game .lanes{--field-growth:1.10}.game .scene{height:clamp(130px,31svh,185px)}.game .combo-row{min-height:37px;padding:5px 0}.game .progress{margin:8px 0}.game .pads{margin-top:10px}.game .pad{height:64px;min-height:64px}.game .clap-button{min-height:38px}.game .game-hint{font-size:8px}.game .game-top .score strong{font-size:27px}}
@media(max-width:360px){.app{padding-left:18px;padding-right:18px}.result-heading{grid-template-columns:90px minmax(0,1fr);gap:10px}.result .grandma-player{width:90px;height:106px}.music-card .listen-copy strong{font-size:14px}.music-cover{width:46px;height:46px;flex-basis:46px}.result .grandma-reply{font-size:13px}.result .combo-row #judge{font-size:12px}.home-title{font-size:35px}}
@media(max-height:480px) and (orientation:landscape){body[data-screen=game] .app{max-width:760px}.game .scene{height:108px}.game .lanes{--field-base:80px;--field-growth:1.10}.game .combo-row{min-height:30px}.game .pads .pad{height:55px;min-height:55px}.game .pad svg{height:32px}.game .game-hint{display:none}.game .clap-button{min-height:32px}}
/* The scene absorbs changes in browser chrome; pads keep their touch size. */
body[data-screen=game] .app{height:100vh;height:100dvh;display:flex;flex-direction:column;margin-top:0}
body[data-screen=game] main{flex:1;min-height:0}.game{height:100%;display:flex;flex-direction:column}
.game .scene{flex:1 1 auto;height:auto;min-height:100px;max-height:280px}.game .game-top,.game .combo-row,.game .pads,.game .clap-button,.game .game-hint{flex-shrink:0}
@media(max-height:480px){body[data-screen=game] .app{padding-top:7px;padding-bottom:calc(12px + env(safe-area-inset-bottom))}.game .scene{min-height:96px}.game .scene .adelina{height:calc(100% - 37px);bottom:4px}.game .combo-row{min-height:28px;padding:3px 0}.game .progress{margin:3px 0}.game .lanes{--field-growth:1.08}.game .pads{margin:6px 0}.game .pads .pad{height:56px;min-height:56px}.game .pad svg{height:32px}.game .clap-button{min-height:40px}.game .game-hint{display:none}.game .score strong{font-size:24px!important}.game .game-top .icon-button,.game-language{min-height:36px;height:36px}.game .combo-row #judge{font-size:11px}.combo-row .grandma-message{font-size:12px}}

/* A quiet author credit below the home controls, in the normal page flow. */
.game-credit{margin:4px 0 0;color:#9f8a76;font:400 10px/1.5 system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;letter-spacing:.1px;text-align:center}

.game-credit a{color:inherit;text-decoration:none;font-weight:400}.game-credit a:hover{text-decoration:underline}
