@font-face{font-family:Jua;src:url('assets/Jua-Regular.ttf') format('truetype');font-style:normal;font-weight:400;font-display:swap}
:root{--bg:#fff5f6;--paper:#fffdfb;--ink:#50323c;--muted:#84616d;--rose:#c83e5c;--rose-dark:#aa2c49;--light:#fbe2e7;--line:#e8bdc8;--radius:24px;font-family:Jua,'Malgun Gothic',sans-serif;color:var(--ink);background:var(--bg);font-synthesis:none}
*{box-sizing:border-box}body{margin:0;font-size:17px;line-height:1.5;word-break:keep-all;overflow-wrap:break-word}button,input,select,textarea{font:inherit;color:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:wait;opacity:.6}button{touch-action:manipulation}a{color:inherit}h1,h2,p{margin:0}h1,h2,strong,b{font-weight:400}h2{font-size:22px;line-height:1.25}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #843650;outline-offset:3px}[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
dialog{color:var(--ink);background:var(--paper);border:1px solid var(--line);border-radius:26px;width:min(440px,calc(100% - 28px));max-height:calc(100dvh - 32px);padding:0;box-shadow:0 18px 70px #5420332b;overscroll-behavior:contain}dialog::backdrop{background:#50303d70;backdrop-filter:blur(4px)}.dialog-content{padding:28px;position:relative}.dialog-close{position:absolute;right:10px;top:10px;min-width:44px;min-height:44px;border:0;border-radius:50%;background:transparent;font-size:29px;line-height:1;color:var(--muted)}.dialog-content>h2{font-size:28px;margin-bottom:8px;padding-right:22px}.dialog-intro{color:var(--muted);font-size:16px;margin-bottom:22px}.welcome-sheep{display:block;margin:0 auto 2px}#profile-dialog h2,#profile-dialog .dialog-intro,#results-dialog h2,#results-dialog .dialog-intro{text-align:center;padding-right:0}fieldset{border:0;padding:0;margin:0}legend,.nickname-label{font-size:17px;margin-bottom:9px}.group-options{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:18px}.group-options label{flex:1 1 28%;position:relative}.group-options input{position:absolute;inset:0;opacity:0;width:100%;height:100%;margin:0;cursor:pointer}.group-options span{display:flex;justify-content:center;align-items:center;min-height:44px;background:#fff7f8;border:1.5px solid #cb96a5;border-radius:12px}.group-options input:checked+span{color:var(--rose-dark);background:var(--light);border:2px solid var(--rose)}.group-options input:focus-visible+span{outline:3px solid #843650;outline-offset:3px}.nickname-label{display:block}.nickname-label input{display:block;margin-top:8px;width:100%;min-height:48px;border:1.5px solid #cb96a5;background:#fff9f9;border-radius:12px;padding:10px 12px;font-size:16px}::placeholder{color:#886b76;opacity:1}.privacy-note{color:var(--muted);font-size:13px;line-height:1.6;margin:12px 0 18px}.ranking-tools{display:flex;justify-content:space-between;gap:8px;margin-bottom:14px}.ranking-tools select{min-height:44px;border:1px solid #c98b9c;border-radius:12px;padding:8px;background:#fff8f8}.ranking-table{border-collapse:collapse;width:100%;font-size:15px}.ranking-table th{font-weight:400;color:var(--muted);font-size:13px;text-align:left;padding:8px 4px;border-bottom:1px solid var(--line)}.ranking-table td{padding:12px 4px;border-bottom:1px solid #f0dde1;overflow-wrap:break-word}.ranking-table td:last-child,.ranking-table th:last-child{text-align:right;color:var(--rose-dark)}.ranking-table-wrap{max-height:45dvh;overflow:auto}.group-summary{display:grid;grid-template-columns:repeat(5,1fr);gap:5px}.group-stat{text-align:center;font-size:13px;background:var(--bg);border-radius:9px;padding:8px 1px}.group-stat>*{display:block}.group-stat small{font-size:11px;color:var(--muted)}.daily-reference{display:flex;align-items:center;justify-content:space-between;margin:18px 0;font-size:19px;color:var(--rose-dark)}.daily-reference span{font-size:13px;color:var(--muted)}textarea{display:block;width:100%;resize:vertical;min-height:140px;padding:12px;background:#fff9f9;border:1.5px solid #c98b9c;border-radius:14px;font-size:18px;line-height:1.6;margin-top:10px}.practice-challenge{display:block;margin:12px auto 0}.memory-score{text-align:center;padding:12px 0}.memory-score strong{font-size:60px;color:var(--rose)}.memory-score>span{font-size:24px;color:var(--rose)}.memory-score p{color:var(--muted)}#memory-feedback{font-size:16px;margin-bottom:15px}details{font-size:15px;margin-top:18px}summary{cursor:pointer;min-height:34px;color:var(--muted)}.source-check p{font-size:19px;line-height:1.8;margin:12px 0;word-break:keep-all;overflow-wrap:break-word}.source-check b{color:var(--rose);margin-right:9px}#delete-record{display:block;margin:12px auto 0;font-size:14px}#delete-feedback{font-size:14px}.dialog-content>.secondary-button{margin-top:14px}.sound-settings{margin:24px 0}.sound-settings label{display:flex;gap:20px;margin:14px 0;align-items:center}.sound-settings input{flex:1;min-width:0;height:44px}.sound-settings input,.latency-label input{accent-color:var(--rose)}#settings-dialog p{margin:14px 0;font-size:16px;line-height:1.7}.latency-label{display:block;margin-top:16px}.latency-label input{width:100%}.results-stats{display:grid;gap:7px}.results-stats b{float:right}

/* Shared menu: one clear play action, three distinct modes, compact daily records. */
body{background:radial-gradient(ellipse at 12% 12%,#ffe6d9 0,transparent 44%),radial-gradient(ellipse at 90% 86%,#f9d5df 0,transparent 50%),var(--bg)}
.app-shell{width:min(980px,100%);min-height:100svh;margin:auto;padding:24px 30px;display:flex;flex-direction:column;justify-content:center}
.masthead{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}
.edition{font-size:14px;color:var(--muted);white-space:nowrap}
.header-actions{display:flex;gap:6px}
.small-button,.text-button{border:0;background:transparent;min-height:44px;padding:8px;color:var(--muted);border-radius:12px}
.small-button{font-size:15px;background:#ffffffa6;border:1px solid #e8bdc86b}
.small-button:hover,.text-button:hover{background:var(--light)}
#profile-button{max-width:144px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.home-intro{position:relative;display:flex;justify-content:space-between;align-items:center;min-height:180px;padding:0 34px 4px;margin-bottom:20px}
.title-kicker{color:var(--rose-dark);font-size:16px}
.home-intro h1{font-size:66px;line-height:1.1;letter-spacing:-2px;margin:6px 0 8px;color:#b63455;text-shadow:0 3px #fffdfb,0 6px #e8b2c1}
.home-intro p{font-size:19px;color:var(--muted)}
.hero-island{position:relative;isolation:isolate;width:190px;height:180px;margin-right:28px;display:grid;place-items:center}
.home-sheep{width:162px;height:162px;object-fit:contain;image-rendering:auto;z-index:1;transform:translateY(-6px)}
.hero-ground{position:absolute;bottom:3px;width:154px;height:35px;background:#db9b91;border-top:9px solid #b6c48b;box-shadow:0 5px 0 #be7c78;border-radius:45% 45% 40% 40%;z-index:0}
.hero-star{position:absolute;font-style:normal;color:#d78468;font-size:28px}.star-one{right:-12px;top:28px}.star-two{left:-12px;top:67px;font-size:23px}
.tier-picker{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:22px}
.tier-picker button{position:relative;display:flex;align-items:center;justify-content:center;gap:16px;min-width:0;min-height:95px;padding:12px 10px;border:2px solid #e9c7cc;border-radius:18px;background:#fffdfb;box-shadow:0 4px #eed0d7;text-align:left}
.tier-picker button[aria-pressed=true]{background:#fbe0e6;border-color:var(--rose);box-shadow:0 4px var(--rose-dark);color:var(--rose-dark)}
.tier-picker button[aria-pressed=true]::after{content:'✓';position:absolute;top:5px;right:9px;font-size:13px}
.tier-picker button>span:last-child{display:grid;gap:2px}.tier-picker small{font-size:13px;color:var(--muted)}.tier-picker b{font-size:21px;white-space:nowrap}
.tier-icon{display:flex;position:relative;flex:none;align-items:flex-end;gap:3px;width:42px;height:36px;color:var(--rose)}
.tier-icon i{display:block;width:12px;height:11px;background:#d3a17d;border-top:4px solid #a5b67e;box-shadow:0 2px #bc806c}
.icon-steps i:nth-child(2){margin-bottom:9px}.icon-steps i:nth-child(3){margin-bottom:18px}
.icon-bridge{align-items:center}.icon-bridge i:nth-child(2){background:transparent;border:2px dashed #c35e76;box-shadow:none;height:16px}
.icon-book{align-items:center;justify-content:center;background:#fff1c7;border:3px solid #d89a76;border-radius:3px;width:34px;height:35px;box-shadow:4px 3px #ecd2a5;font-size:22px}
.home-grid{display:grid;grid-template-columns:1.1fr 1fr;gap:20px}
.card{border:1.5px solid var(--line);border-radius:22px;background:var(--paper);padding:21px 23px;box-shadow:0 5px 0 #f0d7de}
.card-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}.card-heading h2{font-size:22px}.card-heading .text-button{padding:0 4px;font-size:14px}.card-heading h2>span:first-child{color:var(--rose)}
.chapter-picker select{border:1px solid #e4b7c3;background:var(--light);color:var(--rose-dark);min-height:44px;padding:6px 26px 6px 11px;border-radius:12px}
.range-row{display:flex;align-items:center;gap:13px}.range-row label{flex:1}.range-row select{width:100%;min-height:52px;padding:8px 12px;background:#fff8f8;border:1.5px solid #c98b9c;border-radius:12px;font-size:23px}.range-dash{color:var(--muted)}
.track-summary{display:flex;justify-content:space-between;gap:8px;font-size:14px;color:var(--muted);margin:10px 0 16px}
.primary-button,.secondary-button{display:flex;align-items:center;justify-content:center;gap:10px;min-height:52px;border-radius:14px;width:100%;padding:12px 16px;font-size:20px;line-height:1.25}
.primary-button{background:var(--rose);color:white;border:1px solid var(--rose);box-shadow:0 4px 0 #a92d48;transition:transform .12s,background .12s}.primary-button:hover{background:var(--rose-dark)}.primary-button:active{transform:translateY(3px);box-shadow:0 1px 0 #a92d48}.secondary-button{background:var(--light);border:1px solid #d99aad;color:var(--rose-dark)}
.start-button{min-height:56px;font-size:24px}.start-note{font-size:14px;line-height:1.4;color:var(--muted);text-align:center;margin-top:13px}
.ranking-card .card-heading{margin-bottom:1px}.ranking-subline{display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px;font-size:13px;color:var(--muted);margin-bottom:8px}.ranking-basis{color:var(--rose-dark);font-size:12px}
.ranking-preview{padding:0;list-style:none;margin:0;min-height:123px}.ranking-preview li{display:flex;align-items:center;gap:9px;min-height:41px;border-bottom:1px dashed #ecd4da}
.rank-number{color:var(--rose);width:22px;text-align:center;font-size:21px}.rank-person{display:flex;align-items:baseline;gap:7px;flex:1;min-width:0}.rank-person strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rank-person small{color:var(--muted);font-size:12px;white-space:nowrap}.rank-accuracy{color:var(--rose-dark);font-size:19px;font-variant-numeric:tabular-nums}
.ranking-empty{font-size:16px;color:var(--muted);text-align:center;min-height:123px;display:grid;align-content:center;line-height:1.6;padding:10px 0}
.ranking-rule{font-size:12px;line-height:1.4;color:var(--muted);text-align:center;margin-top:12px}.home-footer{display:flex;justify-content:space-between;align-items:center;gap:6px;font-size:13px;color:var(--muted);margin:15px 4px 0}.home-footer .text-button{font-size:14px;white-space:nowrap}
.error-message{font-family:'Malgun Gothic',sans-serif;font-weight:600;font-size:14px;line-height:1.5;color:#a01f3d;padding:7px 0;overflow-wrap:break-word}
.ranking-tier-tabs{display:flex;gap:8px;margin:16px 0}.ranking-tier-tabs button{flex:1;min-height:44px;border:1px solid var(--line);background:var(--bg);border-radius:11px}.ranking-tier-tabs [aria-pressed=true]{background:var(--rose);border-color:var(--rose);color:#fff}
.tier-intro-rule{background:var(--light);padding:16px;border-radius:15px;font-size:17px;line-height:1.7}
#result-count{text-align:center;color:var(--muted);font-size:15px}#result-save-feedback{font-size:14px;color:var(--rose-dark);line-height:1.5;margin:12px 0}#replay-button,#leave-game{display:block;margin:8px auto 0}
#delete-tier-record{display:block;font-size:14px;margin:10px auto}#delete-tier-feedback{font-size:14px;color:var(--rose-dark)}
#results-dialog .memory-score{padding:0}#results-dialog .dialog-intro{margin-bottom:4px}#results-dialog .welcome-sheep{width:62px;height:62px}#results-dialog .privacy-note{margin:9px 0 14px}
#sound-sample{width:100%;height:48px;display:block;margin:16px 0}
.welcome-sheep,.intro-welcome img,.recall-sheep,.relay-cover img{object-fit:contain;image-rendering:auto}
.how-steps{list-style:none;padding:0;margin:20px 0 10px;display:grid;gap:12px}.how-steps li{display:flex;gap:12px;align-items:center;font-size:18px;line-height:1.45}.how-steps li>b{display:grid;place-items:center;width:28px;height:28px;flex:none;border-radius:9px;background:var(--light);color:var(--rose)}.how-steps strong{color:var(--rose-dark)}
.audio-notice{margin:16px 0 0;padding:10px 12px;border:1px solid #e9cf9a;border-radius:12px;background:#fff5dc;color:#755027;font-size:14px;line-height:1.45;word-break:keep-all}.audio-notice strong,.audio-notice span{display:block}.audio-notice span{font-size:12px;margin-top:2px}.audio-notice+.how-steps{margin-top:14px}
.play-extra{margin:4px 0 18px;font-size:14px}.play-extra summary{min-height:44px;padding:8px 0}.play-extra .play-options{margin-top:8px}
#intro-dialog .intro-danger{font-size:14px;color:var(--muted);margin:8px 0 20px}
#intro-dialog .intro-pace{font-size:13px;min-height:20px}
#intro-dialog .play-extra .input-methods{margin-top:20px}
@media(min-width:761px){.ranking-card{display:flex;flex-direction:column}.ranking-empty,.ranking-preview{flex:1}.ranking-preview li{min-height:46px}}
@media(max-width:760px){
 .app-shell{max-width:490px;padding:8px 16px max(8px,env(safe-area-inset-bottom));justify-content:flex-start}.masthead{margin-bottom:4px}.edition{font-size:12px}.header-actions{gap:4px}.small-button{font-size:13px;padding:6px 8px}#profile-button{max-width:106px}
 .home-intro{min-height:134px;padding:0 7px;margin-bottom:12px}.title-kicker{font-size:13px}.home-intro h1{font-size:46px;letter-spacing:-1px;margin:5px 0 7px}.home-intro p{font-size:15px}
 .hero-island{width:125px;height:126px;margin:0 2px 0 4px}.home-sheep{width:114px;height:114px;transform:translateY(-3px)}.hero-ground{width:107px;height:26px;border-top-width:7px;bottom:0}.hero-star{font-size:22px}.star-one{right:-2px;top:15px}.star-two{left:-3px;top:46px;font-size:17px}
 .tier-picker{gap:8px;margin-bottom:16px}.tier-picker button{flex-direction:column;gap:7px;min-height:100px;padding:10px 3px;border-radius:15px;text-align:center}.tier-picker small{font-size:12px}.tier-picker b{font-size:17px}.tier-picker button>span:last-child{gap:0}.tier-icon{scale:.8;height:29px}
 .home-grid{grid-template-columns:1fr;gap:14px}.card{padding:13px 17px;border-radius:18px}.card-heading{margin-bottom:8px}.card-heading h2{font-size:20px}.chapter-picker select{font-size:16px}.range-row select{min-height:46px;font-size:22px}.track-summary{font-size:13px;margin:7px 0 12px}.start-button{min-height:50px;font-size:23px}.start-note{font-size:13px;margin-top:10px}
 .ranking-preview{min-height:84px}.ranking-preview li{min-height:28px;font-size:15px}.rank-accuracy{font-size:17px}.ranking-empty{min-height:60px;padding:7px 0;font-size:15px;line-height:1.5}.ranking-subline{margin-bottom:3px;font-size:12px}.ranking-rule{margin-top:6px;font-size:11px}.card-heading .text-button{font-size:13px}.home-footer{margin:7px 0 0;font-size:11px}.home-footer .text-button{font-size:12px;padding:6px}
 .dialog-content{padding:24px}.dialog-content>h2{font-size:26px}.dialog-intro{margin-bottom:16px}.group-stat{font-size:12px}
}
@media(max-width:760px) and (max-height:740px){
 .home-intro{min-height:80px;margin-bottom:5px}.home-intro h1{font-size:41px;margin:2px 0 5px}.title-kicker{font-size:12px}.home-intro p{display:none}.hero-island{height:80px;width:96px}.home-sheep{width:78px;height:78px}.hero-ground{width:85px;height:22px}.star-one{top:10px}.star-two{top:38px}
 .tier-picker{margin-bottom:10px}.tier-picker button{min-height:60px;flex-direction:row;gap:2px;padding:8px 3px}.tier-icon{display:none}.tier-picker b{font-size:17px}
 .card{padding:8px 15px}.card-heading{margin-bottom:4px}.track-summary{margin:6px 0 6px}.start-button{min-height:48px;padding:8px 12px}.start-note{display:none}.home-grid{gap:10px}.ranking-empty{min-height:45px;padding:2px 0;font-size:14px}.ranking-preview{min-height:54px}.ranking-preview li{min-height:27px}.ranking-preview li:nth-child(n+3){display:none}.ranking-rule{margin-top:4px}.home-footer{margin-top:3px}
 .dialog-content{padding:22px}.welcome-sheep{width:64px;height:64px}.privacy-note{margin:10px 0 14px}.group-options{margin-bottom:13px}
}
@media(max-width:359px){.app-shell{padding-inline:10px}.home-intro h1{font-size:36px}.edition{font-size:11px}.tier-picker b{font-size:16px}.card{padding-inline:12px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

#recall-intro-dialog .welcome-sheep{width:68px;height:68px}#recall-intro-dialog .tier-intro-rule{font-size:16px;line-height:1.55;padding:12px 14px}#recall-intro-dialog .dialog-intro{margin-bottom:12px}.recall-intro-note{margin:4px 0 14px}.recall-difficulty .group-options{margin-bottom:6px}.recall-difficulty legend{margin-bottom:6px}
