.rami-speaking{max-width:1120px;margin:auto;color:#354d5e}.sp-heading{display:flex;align-items:center;justify-content:space-between}.sp-heading h1{font-size:26px;margin:8px 0}.sp-heading small{letter-spacing:3px;font-size:10px}.sp-heading p{margin:0}.sp-tag{font-size:11px;background:#e6edf2;padding:8px 12px;border-radius:20px}.sp-note{font-size:12px;color:#627785;background:#e9eef2;padding:12px 16px;border-radius:10px;line-height:1.7}.sp-select{text-align:center;background:#fffdf8;border:1px solid #d6dfe5;border-radius:24px;padding:30px}.sp-select h2{font-size:23px}.sp-select p{font-size:13px}.sp-friends{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin:26px auto;max-width:800px}.sp-friends button{border:2px solid transparent;border-radius:20px;background:var(--friend);padding:18px 12px;display:flex;align-items:center;flex-direction:column;gap:12px}.sp-friends button[aria-pressed=true]{border-color:#526b81;box-shadow:0 0 0 4px #526b8115}.sp-character{width:125px;height:155px;object-fit:contain;image-rendering:pixelated}.sp-friends strong{font-size:17px}.sp-friends span,.sp-caption{font-size:11px;color:#627785}.sp-room{display:grid;grid-template-columns:300px 1fr;gap:20px}.sp-partner{border:1px solid #d7e1e6;background:var(--friend);border-radius:22px;align-items:center;padding:28px 18px;text-align:center;gap:10px}.sp-partner .large{width:200px;height:240px;animation:spFloat 4s ease-in-out infinite}.sp-partner h2{margin:0}.sp-partner small{font-size:11px;line-height:1.7}.sp-partner p{font-size:13px}.sp-conversation{background:#fffefa;border:1px solid #d7e1e6;border-radius:22px;overflow:hidden}.sp-chat-head{padding:18px;border-bottom:1px solid #e6ebee;display:flex;justify-content:space-between;font-size:13px}#spMessages{height:280px;overflow:auto;padding:18px;display:flex;flex-direction:column;gap:14px}.sp-message{align-self:flex-start;max-width:85%;background:#eaf0f4;padding:12px 16px;border-radius:16px}.sp-message.student{align-self:flex-end;background:#e8efdc}.sp-message small{font-size:10px;color:#647984}.sp-message p{margin:5px 0;font-size:16px}.sp-tools{padding:16px;border-top:1px solid #e6ebee}.sp-tools button{font-size:12px;padding:11px 14px}.sp-tools p{font-size:11px;color:#627785}.sp-tools form{display:flex;gap:8px;margin:12px 0}.sp-tools input{min-width:0;flex:1;padding:11px;border:1px solid #cbd5dc;border-radius:9px;font-size:12px}.sp-tools audio{width:100%;height:38px}@keyframes spFloat{50%{transform:translateY(-8px)}}@media(prefers-reduced-motion:reduce){.sp-partner .large{animation:none}}@media(max-width:800px){.sp-room{grid-template-columns:1fr}.sp-partner{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center;padding:12px}.sp-partner .large{width:80px;height:90px}.sp-partner .sp-tag,.sp-partner small{display:none}.sp-friends{gap:8px}.sp-character{width:85px;height:110px}.sp-select{padding:20px 12px}.sp-friends span{font-size:10px}.sp-friends strong{font-size:14px}}
.rami-speaking .sp-partner{position:static;width:auto;height:auto;display:flex;flex-direction:column;border-right:1px solid #d7e1e6;min-width:0}.sp-room>*{min-width:0}.sp-friends{grid-template-columns:repeat(4,minmax(0,1fr));max-width:960px}.sp-character{width:130px;height:198px;max-width:100%;border-radius:12px;image-rendering:auto}.sp-partner .large{width:195px;height:300px}.sp-conversation{min-width:0}.sp-heading p{overflow-wrap:anywhere}@media(max-width:800px){.sp-friends{grid-template-columns:repeat(2,minmax(0,1fr))}.rami-speaking .sp-partner{flex-direction:row}.sp-partner .large{width:70px;height:106px}.sp-character{height:150px;width:100px}.sp-heading h1{font-size:21px}.sp-tools form{flex-wrap:wrap}}
/* Two reserved higher-level companions, unavailable at the first level. */
.sp-friends{grid-template-columns:repeat(3,minmax(0,1fr))}.sp-friends .sp-locked{background:#e9edf0;border:2px dashed #c5ced6;color:#6c7b88;opacity:1;cursor:not-allowed}.sp-mystery{position:relative;width:130px;height:198px;max-width:100%;display:grid;place-items:center}.sp-mystery svg{width:120px;height:180px;max-width:100%;fill:#687887;opacity:.55}.sp-mystery b{position:absolute;top:52px;left:0;right:0;font-size:58px;line-height:1;color:#fff;font-family:Arial,sans-serif;text-shadow:0 2px 6px #354d5e30}.sp-locked small{font-size:10px;color:#788793}.sp-friends span{line-height:1.6}@media(max-width:800px){.sp-friends{grid-template-columns:repeat(2,minmax(0,1fr))}.sp-mystery{height:150px;width:100px}.sp-mystery svg{height:140px;width:100px}.sp-mystery b{top:38px;font-size:47px}}

.sp-structure{font-size:12px;line-height:1.7;padding:10px 18px;margin:0;background:#eff2e9;color:#52665b}.sp-chat-head strong{max-width:70%}

.expression-options{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin:32px auto}.expression-options>button{padding:38px 24px;border:1px solid #cbd8e0;border-radius:24px;background:#f5f9fb;text-align:left;color:#354d5e;min-height:270px}.expression-options>button:last-child{background:#f7f2e9;border-color:#ddd1bd}.expression-options small{display:block;font-size:10px;letter-spacing:2px}.expression-options h2{font-size:25px}.expression-options p{font-size:13px;line-height:1.8}.expression-options strong{font-size:13px}.expression-symbol{display:block;font-size:44px;margin-bottom:20px}.sp-source-links{display:flex;justify-content:center;gap:10px;margin:12px}.sp-source-links button{font-size:12px}@media(max-width:620px){.expression-options{grid-template-columns:1fr;gap:14px}.expression-options>button{padding:24px;min-height:210px}}
@media(min-width:1051px){body .game-home .portal-grid{grid-template-columns:repeat(6,minmax(0,1fr));width:min(1320px,calc(100% - 48px));gap:clamp(10px,1.3vw,20px)}}

/* Transparent upper-body speaking portraits. */
.sp-character{object-fit:contain;border-radius:0;width:180px;height:198px;filter:drop-shadow(0 6px 5px #344c5b12)}.sp-partner .large{width:100%;height:300px;animation:none;transform-origin:50% 100%}.sp-partner.is-speaking .large{animation:spTalk .38s ease-in-out infinite alternate}.sp-partner.is-speaking{box-shadow:0 0 0 3px #86ab9440}.sp-partner.is-speaking h2:after{content:" · Speaking…";font-size:12px;color:#52816c}@keyframes spTalk{from{transform:translateY(0) rotate(-.6deg)}to{transform:translateY(-4px) rotate(.6deg)}}@media(max-width:800px){.sp-character{height:150px;width:140px}.sp-partner .large{width:110px;height:130px}}@media(prefers-reduced-motion:reduce){.sp-partner.is-speaking .large{animation:none}}
/* Compact speaking header: reserve the screen for the character and conversation. */
.rami-speaking>.back{display:inline-flex;margin:0 0 6px;padding:4px 0;font-size:11px;line-height:1.4;min-height:24px}
.rami-speaking>.sp-heading{margin:0;gap:12px;align-items:center}
.rami-speaking>.sp-heading>div{min-width:0}
.rami-speaking>.sp-heading small{font-size:9px;line-height:1.2;letter-spacing:2px}
.rami-speaking>.sp-heading h1{font-size:20px;line-height:1.35;margin:3px 0 2px}
.rami-speaking>.sp-heading p{font-size:12px;line-height:1.4;margin:0}
.rami-speaking>.sp-heading .sp-tag{font-size:10px;line-height:1.3;padding:5px 9px;white-space:nowrap}
.rami-speaking>.sp-note{margin:8px 0 12px;padding:7px 10px;font-size:10px;line-height:1.5;border-radius:7px}
@media(max-width:620px){.rami-speaking>.sp-heading h1{font-size:18px}.rami-speaking>.sp-heading p{font-size:11px}.rami-speaking>.sp-note{font-size:10px;margin:7px 0 10px;padding:6px 8px}}

/* Conversation partner sits at the lower right, outside the input controls. */
.rami-speaking .sp-room{grid-template-columns:minmax(0,1fr) 220px;gap:16px;align-items:end}.rami-speaking .sp-conversation{grid-column:1;grid-row:1}.rami-speaking .sp-partner{grid-column:2;grid-row:1;align-self:end;display:flex;flex-direction:column;gap:8px;padding:10px 4px;border:0;background:transparent;box-shadow:none;text-align:center}.sp-partner>.sp-tag,.sp-partner>small{display:none}.sp-partner h2{font-size:17px}.sp-partner p{font-size:12px;line-height:1.6;margin:4px 0}.sp-partner #spChange{font-size:11px;padding:7px 9px}.sp-partner .large{height:245px;width:100%}.sp-rina-frames{position:relative;width:100%;height:245px}.sp-rina-frames .sp-character{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;animation:none!important}.sp-rina-open{opacity:0}.sp-partner.is-speaking .sp-rina-open{animation:spMouth .32s steps(1,end) infinite!important}.sp-partner.is-speaking .sp-rina-closed{animation:spClosed .32s steps(1,end) infinite!important}@keyframes spMouth{0%,100%{opacity:0}45%{opacity:1}}@keyframes spClosed{0%,100%{opacity:1}45%{opacity:0}}@media(max-width:800px){.rami-speaking .sp-room{grid-template-columns:minmax(0,1fr) 126px;gap:9px}.sp-partner .large,.sp-rina-frames{height:165px;width:100%}.sp-partner p{font-size:10px}.sp-partner h2{font-size:14px}.sp-partner #spChange{font-size:10px;padding:7px 5px}.sp-chat-head{padding:12px;font-size:11px}.sp-tools{padding:10px}.sp-tools button{padding:9px;font-size:11px}.sp-tools input{width:100%;flex-basis:100%}.sp-message{max-width:95%;padding:10px}.sp-message p{font-size:14px}}@media(max-width:450px){.rami-speaking .sp-room{grid-template-columns:minmax(0,1fr) 90px;gap:6px}.sp-partner .large,.sp-rina-frames{height:125px}.sp-partner p{font-size:9px}}@media(prefers-reduced-motion:reduce){.sp-partner.is-speaking .sp-rina-open,.sp-partner.is-speaking .sp-rina-closed{animation:none!important}}

/* Registered 3-frame mouth/hand gestures; rest frame outside speech. */
.sp-motion{position:relative;width:100%;height:245px}.sp-motion-window{position:absolute;left:50%;bottom:0;transform:translateX(-50%);height:100%;aspect-ratio:var(--motion-ratio);max-width:100%;overflow:hidden}.sp-motion-sheet{display:block;width:300%;max-width:none!important;height:100%;object-fit:fill;transform:translateX(0);animation:none;filter:drop-shadow(0 4px 3px #354d5e10)}.sp-partner.is-speaking .sp-motion-sheet,.sp-partner.is-previewing .sp-motion-sheet{animation:spGesture 1.4s steps(1,end) infinite}.sp-partner.is-speaking .sp-motion,.sp-partner.is-previewing .sp-motion{animation:spGentleBreath 2.8s ease-in-out infinite}.sp-partner #spMotionPreview{font-size:10px;padding:6px 8px;background:#ffffff80;border:1px solid #cad6dc;border-radius:8px}@keyframes spGesture{0%,100%{transform:translateX(0)}18%,76%{transform:translateX(-33.333333%)}40%,58%{transform:translateX(-66.666667%)}}@keyframes spGentleBreath{50%{transform:translateY(-2px)}}@media(max-width:800px){.sp-motion{height:165px}}@media(max-width:450px){.sp-motion{height:125px}}@media(prefers-reduced-motion:reduce){.sp-partner.is-speaking .sp-motion-sheet,.sp-partner.is-previewing .sp-motion-sheet,.sp-partner.is-speaking .sp-motion,.sp-partner.is-previewing .sp-motion{animation:none}}

/* Partner belongs inside the white chat panel; Donik sits on its left. */
.rami-speaking .sp-room{display:block}.sp-dialogue-stage{display:grid;grid-template-columns:minmax(0,1fr) 205px;align-items:end;height:340px;overflow:hidden;padding-right:10px}.sp-dialogue-stage #spMessages{grid-column:1;grid-row:1;height:340px;min-width:0;align-self:stretch;overscroll-behavior:contain}.sp-dialogue-stage .sp-partner{grid-column:2;grid-row:1;align-self:end;width:100%;padding:10px 0 8px;gap:5px;min-width:0;max-height:340px;overflow:hidden}.sp-dialogue-stage .sp-partner .sp-motion{height:205px}.sp-dialogue-stage .sp-partner p{font-size:10px;line-height:1.4;margin:0;padding:0 8px}.sp-dialogue-stage .sp-partner h2{font-size:15px}.sp-dialogue-stage .sp-partner #spChange,.sp-dialogue-stage .sp-partner #spMotionPreview{padding:5px 7px;font-size:10px}.sp-dialogue-stage.is-left{grid-template-columns:205px minmax(0,1fr);padding-right:0;padding-left:10px}.sp-dialogue-stage.is-left .sp-partner{grid-column:1}.sp-dialogue-stage.is-left #spMessages{grid-column:2}.sp-motion-card{height:198px;max-width:100%;width:180px}.sp-motion-card .sp-motion-sheet{animation:none!important}.sp-partner.is-speaking .sp-motion,.sp-partner.is-previewing .sp-motion{animation:none}.sp-partner.is-speaking .sp-motion-sheet,.sp-partner.is-previewing .sp-motion-sheet{animation-duration:1.65s}@keyframes spGesture{0%,12%,90%,100%{transform:translateX(0)}28%,72%{transform:translateX(-33.333333%)}46%,58%{transform:translateX(-66.666667%)}}@media(max-width:800px){.sp-dialogue-stage{grid-template-columns:minmax(0,1fr) 130px;padding-right:5px}.sp-dialogue-stage.is-left{grid-template-columns:130px minmax(0,1fr);padding-left:5px}.sp-dialogue-stage .sp-partner .sp-motion{height:145px}.sp-dialogue-stage .sp-partner p{font-size:9px}.sp-dialogue-stage .sp-partner h2{font-size:13px}.sp-dialogue-stage .sp-partner #spChange,.sp-dialogue-stage .sp-partner #spMotionPreview{font-size:9px;padding:5px}.sp-motion-card{height:150px;width:140px}.sp-dialogue-stage #spMessages{padding:12px}}@media(max-width:450px){.sp-dialogue-stage{grid-template-columns:minmax(0,1fr) 95px}.sp-dialogue-stage.is-left{grid-template-columns:95px minmax(0,1fr)}.sp-dialogue-stage .sp-partner .sp-motion{height:112px}.sp-dialogue-stage .sp-partner p{display:none}}

/* Three direct speaking actions, with optional keyboard input. */
.sp-tools .sp-tools-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;align-items:stretch}.sp-tools .sp-tools-row button{margin:0;width:100%;padding:11px 6px;min-height:42px;white-space:nowrap;font-size:12px;border-radius:8px}.sp-tools #spForm[hidden]{display:none!important}.sp-tools #spForm{display:flex;flex-wrap:nowrap;gap:8px}.sp-tools #spForm input{width:auto;flex:1 1 auto;min-width:0}.sp-tools .sp-answer-hint{display:flex;gap:10px;flex-wrap:wrap;margin:9px 0 7px;color:#687985;font-size:12px;line-height:1.6}.sp-answer-hint span{font-size:10px;color:#6c7982}.sp-answer-hint em{font-style:normal;color:#687985}.rami-nav-outline{display:block;flex-shrink:0}#nav button>span:has(.rami-nav-outline){display:inline-flex;align-items:center;justify-content:center;min-width:22px}@media(max-width:620px){.sp-tools .sp-tools-row{gap:5px}.sp-tools .sp-tools-row button{font-size:10px;padding:10px 3px}.sp-tools #spForm{flex-wrap:wrap}.sp-tools #spForm input{flex-basis:100%}.sp-tools .sp-answer-hint{font-size:11px;gap:6px}}

#nav .rami-nav-world{display:block;image-rendering:pixelated;filter:drop-shadow(0 1px 0 #ffffff65)}#nav button>span:has(.rami-nav-world){display:inline-flex;align-items:center;justify-content:center;min-width:24px}

/* Compact voice-first controls: replay in chat; mic + Write + inline input. */
.sp-dialogue-stage{grid-template-rows:minmax(0,1fr) 30px;height:350px}.sp-dialogue-stage #spMessages{height:100%;min-height:0}.sp-dialogue-stage .sp-partner{max-height:310px}.sp-dialogue-stage .sp-replay-bar{grid-row:2;grid-column:1/-1;display:flex;align-items:center;padding:0 12px 6px}.sp-replay-bar #spListen{display:inline-flex;gap:5px;align-items:center;background:transparent;color:#647785;font-size:10px;padding:3px 4px;min-height:24px;border:0;border-radius:5px}.sp-replay-bar svg{width:15px;height:15px}.sp-action-rail{display:flex;align-items:center;gap:10px;min-width:0}.sp-tools .sp-action-rail #spMic{display:inline-flex;align-items:center;justify-content:center;flex:0 0 52px;width:52px;height:52px;min-height:52px;border-radius:50%;background:#cf4d58;color:#fff;padding:0;border:1px solid #bc4550;box-shadow:0 3px 8px #a53b4026}.sp-action-rail #spMic svg{width:24px;height:24px}.sp-action-rail #spMic.is-recording{background:#e3424e;animation:spRecordGlow 1.3s ease-in-out infinite}.sp-action-rail #spMic:disabled{opacity:.55}.sp-tools .sp-action-rail #spTypeToggle{display:inline-flex;align-items:center;gap:5px;flex:0 0 auto;min-height:34px;padding:7px 10px;font-size:11px;border-radius:8px}.sp-action-rail #spTypeToggle svg{width:15px;height:15px}.sp-tools .sp-action-rail #spForm{display:flex;flex:1 1 180px;min-width:0;gap:5px;margin:0;flex-wrap:nowrap}.sp-tools .sp-action-rail #spForm[hidden]{display:none!important}.sp-tools .sp-action-rail #spForm input{flex:1 1 70px;width:70px;min-width:0;font-size:12px;padding:9px}.sp-tools .sp-action-rail #spForm button{padding:8px;font-size:11px;flex:0 0 auto}.sp-tools .sp-action-rail #spNext{margin-left:auto;font-size:11px;padding:8px 12px;min-height:34px}.sp-tools .sp-answer-hint{margin:8px 0 0;gap:8px;font-size:11px}.sp-tools #spStatus{font-size:10px;margin:5px 0 0;color:#71828c}.sp-tools #spAudio:empty{display:none}.sp-tools #spAudio{margin-top:8px}@keyframes spRecordGlow{0%,100%{box-shadow:0 0 0 3px #e3424e20,0 0 12px #e3424e35}50%{box-shadow:0 0 0 8px #e3424e12,0 0 22px #e3424e70}}@media(max-width:450px){.sp-action-rail{gap:7px;flex-wrap:wrap}.sp-tools .sp-action-rail #spMic{width:48px;height:48px;min-height:48px;flex-basis:48px}.sp-tools .sp-action-rail #spForm{order:4;flex-basis:100%}.sp-tools .sp-action-rail #spForm input{flex-basis:70px}}@media(prefers-reduced-motion:reduce){.sp-action-rail #spMic.is-recording{animation:none;box-shadow:0 0 0 4px #e3424e35}}

/* Quiet icons and a centered primary recording control. */
#nav .rami-nav-world{width:24px!important;height:24px!important;margin:0!important}.expression-symbol .rami-nav-world{width:58px;height:58px;margin:0}.expression-options .expression-symbol{height:64px;display:flex;align-items:center}.rami-world-combined{display:block}.sp-tools .sp-action-rail{display:grid;grid-template-columns:minmax(0,1fr) 52px minmax(0,1fr);gap:10px;align-items:center}.sp-tools .sp-action-rail #spMic{grid-column:2;justify-self:center}.sp-write-group{grid-column:3;display:flex;align-items:center;gap:7px;min-width:0}.sp-tools .sp-write-group #spTypeToggle{flex-shrink:0}.sp-tools .sp-write-group #spForm{flex:1 1 auto;min-width:0}.sp-tools .sp-write-group #spForm input{width:100%;min-width:0}.sp-lower-line{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:30px;margin-top:8px}.sp-tools .sp-lower-line .sp-answer-hint{margin:0;min-width:0}.sp-tools .sp-lower-line #spNext{padding:7px 12px;font-size:11px;flex-shrink:0;border-radius:7px}body #academyWeather{font-weight:700;letter-spacing:.4px;text-shadow:0 0 3px #ffffff,0 0 8px #ffffffed,0 1px 2px #ffffff}.weather-symbol svg{filter:drop-shadow(0 0 3px #ffffffbb)}@media(max-width:620px){.sp-tools .sp-action-rail{grid-template-columns:minmax(0,1fr) 48px minmax(0,1fr);gap:8px}.sp-tools .sp-action-rail #spMic{width:48px;height:48px;min-height:48px}.sp-tools .sp-write-group{flex-wrap:wrap;gap:5px}.sp-tools .sp-write-group #spForm{flex-basis:100%;flex-wrap:wrap}.sp-tools .sp-write-group #spForm input{flex-basis:100%}.sp-tools .sp-write-group #spTypeToggle{padding:7px 8px;font-size:10px}}
/* Home destinations: four on the first row, two centered on the second. */
@media(min-width:621px){
 body .game-home .portal-grid{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));width:min(1000px,calc(100% - 32px));gap:14px;margin:22px auto 0;position:relative;top:auto;left:auto;transform:none}
 body .game-home .portal-grid>.portal{grid-column:span 2;min-height:155px;padding:18px 10px 14px}
 body .game-home .portal-grid>.portal:nth-child(5){grid-column:3 / span 2}
 body .game-home .portal-grid>.portal:nth-child(6){grid-column:5 / span 2}
 body .game-home .portal-grid>.portal .pixel-icon{width:54px;height:54px;margin-bottom:10px}
 body .game-home .portal-grid>.portal h2{font-size:15px}
 body .game-home .portal-grid>.portal .desc{font-size:11px;line-height:1.5}
}
@media(min-width:621px) and (max-width:850px){
 body .game-home .portal-grid{width:calc(100% - 20px);gap:9px}
 body .game-home .portal-grid>.portal{min-height:138px;padding:16px 6px 12px}
 body .game-home .portal-grid>.portal h2{font-size:12px}
 body .game-home .portal-grid>.portal .desc{font-size:10px}
 body .game-home .portal-grid>.portal .pixel-icon{width:42px;height:42px}
}

/* Small square destinations: six in one row, leaving the landscape visible. */
@media(min-width:621px){body .game-home .portal-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));width:min(900px,calc(100% - 32px));gap:12px;margin:24px auto 0;top:auto;left:auto;transform:none}body .game-home .portal-grid>.portal,body .game-home .portal-grid>.portal:nth-child(5),body .game-home .portal-grid>.portal:nth-child(6){grid-column:auto;aspect-ratio:1;min-height:0;height:auto;padding:13px 7px 9px;justify-content:center;gap:0}body .game-home .portal-grid>.portal .pixel-icon{width:38px;height:38px;margin:0 auto 8px;filter:drop-shadow(0 2px 0 #52617025)}body .game-home .portal-grid>.portal h2{font-size:12px;line-height:1.35;margin:0}body .game-home .portal-grid>.portal .desc{font-size:9px;line-height:1.4;margin:6px 0 0}body .game-home .portal-grid>.portal .num{font-size:8px;top:8px;left:9px}}body .game-home .portal-grid>.portal .tiny-arrow{display:none}@media(min-width:621px) and (max-width:850px){body .game-home .portal-grid{gap:8px;width:calc(100% - 24px)}body .game-home .portal-grid>.portal{padding:11px 4px 7px}body .game-home .portal-grid>.portal h2{font-size:10px}body .game-home .portal-grid>.portal .pixel-icon{width:30px;height:30px;margin-bottom:6px}body .game-home .portal-grid>.portal .desc{display:none}}@media(max-width:620px){body .game-home .portal-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;width:calc(100% - 24px)}body .game-home .portal-grid>.portal{aspect-ratio:1;min-height:0;padding:16px 7px 10px}body .game-home .portal-grid>.portal .pixel-icon{width:36px;height:36px;margin:0 auto 8px}body .game-home .portal-grid>.portal h2{font-size:11px}body .game-home .portal-grid>.portal .desc{display:none}}
/* Restore visible, centered square destinations. */
body .game-home,body .game-home:has(.home-learning){justify-content:center;padding:54px 24px 140px;min-height:calc(100svh - 44px);height:auto}
body .game-home .game-heading{margin:0 auto;text-align:center}
body .game-home .portal-grid{display:grid;position:relative;top:auto;left:auto;transform:none;grid-template-columns:repeat(6,minmax(0,1fr));width:min(1180px,calc(100% - 24px));gap:18px;margin:30px auto 0;align-items:stretch;justify-content:center}
body .game-home .portal-grid>.portal,body .game-home .portal-grid>.portal:nth-child(5),body .game-home .portal-grid>.portal:nth-child(6){display:flex;flex-direction:column;align-items:center;justify-content:center;grid-column:auto;aspect-ratio:1;min-height:0;height:auto;padding:22px 10px 16px;gap:0;border:2px solid #ffffffb8;box-shadow:0 5px 0 #425b8030,0 10px 24px #29446630,inset 0 0 0 1px #ffffff40}
body .game-home .portal-grid>.portal .pixel-icon{display:block;flex:0 0 auto;width:58px;height:58px;margin:0 auto 13px;filter:drop-shadow(0 3px 0 #354d5e22)}
body .game-home .portal-grid>.portal h2{display:block;width:100%;font-size:15px;line-height:1.4;margin:0;text-align:center;white-space:nowrap;word-break:keep-all}
body .game-home .portal-grid>.portal .desc{display:block;font-size:10px;line-height:1.5;margin:7px 0 0;text-align:center}
body .game-home .portal-grid>.portal .num{font-size:9px;top:11px;left:12px}
@media(min-width:781px) and (max-width:1050px){body .game-home .portal-grid{grid-template-columns:repeat(3,minmax(0,1fr));width:min(620px,calc(100% - 20px));gap:17px}body .game-home .portal-grid>.portal .pixel-icon{width:55px;height:55px}}
@media(max-width:780px){body .game-home,body .game-home:has(.home-learning){padding:30px 14px 120px;justify-content:center}body .game-home .portal-grid{grid-template-columns:repeat(2,minmax(0,1fr));width:min(410px,calc(100% - 16px));gap:14px;margin:24px auto 0}body .game-home .portal-grid>.portal{padding:20px 9px 14px}body .game-home .portal-grid>.portal .pixel-icon{width:52px;height:52px;margin-bottom:11px}body .game-home .portal-grid>.portal h2{font-size:14px}body .game-home .portal-grid>.portal .desc{font-size:10px}}
@media(max-width:360px){body .game-home .portal-grid{gap:10px;width:100%}body .game-home .portal-grid>.portal .pixel-icon{width:44px;height:44px;margin-bottom:8px}body .game-home .portal-grid>.portal h2{font-size:12px}body .game-home .portal-grid>.portal .desc{display:none}}

/* Clickable replay, quiet hint capsule, and an explicit typing alternative. */
.sp-dialogue-stage .sp-replay-bar{padding-bottom:6px}.sp-replay-bar #spListen{background:#edf1f6;border:1px solid #d0dae4;border-radius:9px;padding:5px 10px;min-height:28px;color:#4e6376;font-size:10px;box-shadow:0 2px 4px #344e6610;transition:background .15s,box-shadow .15s}.sp-replay-bar #spListen:hover,.sp-replay-bar #spListen:focus-visible{background:#e1e9f4;box-shadow:0 0 9px #91a9cf66}.sp-replay-bar #spListen:active{transform:translateY(1px)}.sp-tools .sp-action-rail{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:8px}.sp-tools .sp-write-group{display:flex;justify-content:center;align-items:center;max-width:100%;width:auto;gap:7px;flex-wrap:nowrap}.sp-tools .sp-write-group #spTypeToggle{min-height:26px;padding:3px 6px;background:transparent;border:0;box-shadow:none;color:#6c7e8c;font-size:10px}.sp-tools .sp-write-group #spTypeToggle:hover{background:#edf1f6}.sp-tools .sp-write-group #spTypeToggle svg{width:13px;height:13px}.sp-tools .sp-write-group #spForm{flex:1 1 220px;min-width:100px;max-width:320px;flex-wrap:nowrap}.sp-tools .sp-write-group #spForm input{flex:1 1 auto;width:100%;min-width:0}.sp-tools .sp-write-group #spForm button{font-size:10px}.sp-tools .sp-lower-line .sp-answer-hint{display:flex;align-items:center;gap:8px;background:#edf0f3;border:1px solid #e1e5e9;border-radius:10px;padding:7px 11px;color:#71808a;font-size:11px;line-height:1.5}.sp-tools .sp-answer-hint span{font-size:10px;font-weight:600;color:#657582}.sp-tools #spStatus{text-align:center;margin-top:6px}.sp-tools .sp-lower-line{align-items:center;margin-top:9px}@media(max-width:450px){.sp-tools .sp-write-group{width:100%}.sp-tools .sp-write-group #spTypeToggle{font-size:9px;flex-shrink:0}.sp-tools .sp-write-group #spForm{order:initial;flex-basis:150px;min-width:60px}.sp-tools .sp-write-group #spForm input{flex-basis:60px}.sp-tools .sp-lower-line .sp-answer-hint{padding:6px 8px;font-size:10px}}

/* Six companions fit together; no repeated demo or source-selection header. */
.sp-compact-header{display:flex;align-items:center;gap:14px;margin:0 0 12px;min-height:34px}.sp-compact-header .back{padding:4px 0;margin:0;font-size:11px;white-space:nowrap}.sp-compact-header h1{font-size:20px;line-height:1.3;margin:0;flex:1}.sp-compact-header>span{font-size:11px;color:#637786;white-space:nowrap}.sp-choice-screen.sp-select{padding:14px 18px 16px}.sp-choice-screen .sp-friends{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0 auto 12px;max-width:790px}.sp-choice-screen .sp-friends>button{min-width:0;gap:4px;padding:9px 8px 10px;border-radius:16px}.sp-choice-screen .sp-motion-card,.sp-choice-screen .sp-mystery{height:clamp(70px,16svh,136px);width:100%;max-width:160px}.sp-choice-screen .sp-motion-card .sp-motion-window{max-width:100%}.sp-choice-screen .sp-friends strong{font-size:14px;line-height:1.3}.sp-choice-screen .sp-locked span{font-size:10px}.sp-choice-screen .sp-locked small{display:none}.sp-choice-screen .sp-mystery svg{height:100%;width:auto;max-width:100%}.sp-choice-screen .sp-mystery b{top:30%;font-size:clamp(28px,5svh,44px)}.sp-choice-screen #spStart{padding:10px 20px;font-size:12px;min-height:38px}.sp-choice-status{font-size:12px;margin:0 0 10px;line-height:1.5}.sp-motion[data-character="9"] .sp-motion-window{height:86%}.sp-motion[data-character="9"]{--donik-scale:.86}.sp-partner .sp-motion[data-character="9"] .sp-motion-window{height:86%}@media(max-height:650px){.sp-choice-screen .sp-motion-card,.sp-choice-screen .sp-mystery{height:clamp(64px,13svh,100px)}.sp-choice-screen .sp-friends{gap:8px;margin-bottom:9px}.sp-choice-screen .sp-friends>button{padding:6px}.sp-choice-screen.sp-select{padding:10px 14px}.sp-compact-header{margin-bottom:8px}}@media(max-width:620px){.sp-choice-screen .sp-friends{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.sp-choice-screen.sp-select{padding:10px}.sp-choice-screen .sp-friends strong{font-size:12px}.sp-choice-screen .sp-locked span{font-size:9px}.sp-compact-header h1{font-size:17px}.sp-compact-header{gap:10px}}

.sp-chapter-label{font-size:11px;color:#637786;margin:0 0 8px}.sp-passage{margin:0 0 8px;font-size:12px;color:#53677a}.sp-passage summary{cursor:pointer;width:fit-content;border-radius:8px;background:#edf1f6;padding:5px 10px}.sp-passage>div{max-height:150px;overflow:auto;padding:6px 12px;background:#f7f8fa;border-radius:8px}.sp-passage p{margin:6px 0;line-height:1.5}.sp-passage small{color:#8797a7;margin-right:6px}.sp-complete strong{display:block;margin:20px;font-size:24px}

/* Shared warm neutral controls with a quiet replay glow. */
.sp-tools .sp-lower-line .sp-answer-hint,.sp-replay-bar #spListen{background:#eee8dd;border:1px solid #ded3c0;color:#74644f}
.sp-replay-bar #spListen{box-shadow:0 0 8px #d9b77555,inset 0 0 5px #fff8e8;animation:sp-repeat-glow 3s ease-in-out infinite}
.sp-replay-bar #spListen:hover,.sp-replay-bar #spListen:focus-visible{background:#e8decd;box-shadow:0 0 12px #d9b77588}
.sp-tools .sp-answer-hint span{color:#77664d}.sp-attempts{font-size:11px;color:#8a7966;text-align:center;margin:7px 0 0}
.sp-tools button:disabled{opacity:.45;cursor:default;animation:none}
@keyframes sp-repeat-glow{50%{box-shadow:0 0 12px #d9b77577,inset 0 0 5px #fff8e8}}
@media(prefers-reduced-motion:reduce){.sp-replay-bar #spListen{animation:none}}

.sp-source-row{display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px;margin-bottom:8px;background:#f3f0e9;padding:8px 12px;border-radius:8px}.sp-source-row .sp-structure{margin:0;padding:0;background:transparent;flex:0 1 auto;min-width:0}.sp-read-toggle{font:inherit;font-size:11px;white-space:nowrap;background:#eee8dd;color:#74644f;border:1px solid #ded3c0;border-radius:7px;padding:5px 9px;cursor:pointer}.sp-source-row>.sp-passage{flex-basis:100%;width:100%;margin:0}.sp-source-row>.sp-passage[hidden]{display:none}

/* Roomier conversation and calm neutral controls. */
.rami-speaking:has(.sp-room){max-width:1240px}
.sp-read-toggle::before{content:'▸';display:inline-block;margin-right:5px}
.sp-read-toggle[aria-expanded="true"]::before{content:'▾'}
.sp-replay-bar #spListen,.sp-replay-bar #spListen:hover,.sp-replay-bar #spListen:focus-visible{animation:none;box-shadow:none;background:#eee8dd;color:#6f7780}
.sp-tools .sp-lower-line .sp-answer-hint,.sp-tools .sp-answer-hint span,.sp-read-toggle{color:#6f7780}
.sp-dialogue-stage{height:380px}
.sp-tools{padding-top:28px}
.sp-message{max-width:94%}
@media(max-width:800px){.sp-dialogue-stage{height:365px}.sp-tools{padding-top:22px}}

.sp-question-repeat{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;margin-left:8px;padding:4px;min-width:26px;min-height:26px;border:0;border-radius:7px;background:#eee8dd;color:#6f7780;cursor:pointer;box-shadow:none}.sp-question-repeat svg{width:15px;height:15px}.sp-question-repeat:hover,.sp-question-repeat:focus-visible{background:#e3dacb}.sp-dialogue-stage{grid-template-rows:minmax(0,1fr)}

.sp-question-repeat,.sp-question-repeat:hover,.sp-question-repeat:focus-visible{background:transparent;border:0;box-shadow:none;color:#6f7780}.sp-question-repeat:focus-visible{outline:2px solid #8b98a5;outline-offset:2px}

/* Fit the conversation and compact controls into the visible tablet height. */
.rami-speaking:has(.sp-room){box-sizing:border-box;max-width:100%;width:1240px}
.sp-dialogue-stage{height:clamp(180px,calc(100svh - 340px),440px)}
.sp-tools{padding:22px 14px 8px}
.sp-tools .sp-action-rail{gap:4px}
.sp-tools .sp-lower-line{margin-top:4px}
.sp-tools .sp-lower-line .sp-answer-hint{margin-top:0;padding:5px 9px}
.sp-tools .sp-attempts{margin:3px 0 0;line-height:1.2}
.sp-tools #spStatus{margin:3px 0 0;line-height:1.25}
.sp-tools .sp-write-group #spTypeToggle{min-height:22px;padding:2px 6px}
.sp-tools #spNext{padding:7px 12px;min-height:30px}
@media(max-width:800px){.sp-dialogue-stage{height:clamp(150px,calc(100svh - 330px),420px)}.sp-tools{padding:20px 10px 7px}.sp-dialogue-stage .sp-partner{max-height:100%}}
@media(max-height:540px){.sp-dialogue-stage{height:clamp(100px,calc(100svh - 290px),250px)}.sp-tools{padding-top:12px}.sp-dialogue-stage .sp-partner .sp-motion{height:110px}.sp-dialogue-stage .sp-partner p{display:none}}

/* Keep the companion caption readable at every width. */
.sp-dialogue-stage .sp-partner{box-sizing:border-box;max-height:100%;overflow:visible;min-height:0}
.sp-dialogue-stage .sp-partner p{display:block;flex:0 0 auto;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;word-break:normal;max-width:100%;box-sizing:border-box;padding:0 6px;line-height:1.45}
.sp-dialogue-stage .sp-partner h2{flex:0 0 auto;white-space:normal;line-height:1.4}
.sp-dialogue-stage .sp-partner .sp-motion{flex:0 1 205px;min-height:40px;max-height:calc(100svh - 430px)}
@media(max-width:800px){.sp-dialogue-stage .sp-partner .sp-motion{max-height:145px;flex-basis:145px}.sp-dialogue-stage .sp-partner p{display:block;font-size:10px}}
@media(max-height:540px){.sp-dialogue-stage{min-height:150px}.sp-dialogue-stage .sp-partner .sp-motion{height:65px;max-height:65px;flex-basis:65px}.sp-dialogue-stage .sp-partner p{display:block;font-size:9px}}

/* Reserve the actual header and controls height, including wrapped captions. */
.sp-dialogue-stage{height:clamp(140px,calc(100svh - 420px),440px)}
@media(max-width:800px){.sp-dialogue-stage{height:clamp(140px,calc(100svh - 420px),420px)}}

/* One clear recording action, with quiet secondary controls. */
.sp-tools{position:relative;padding:18px 16px 12px}
.sp-tools .sp-action-rail{gap:7px}
.sp-mic-cue{display:flex;flex-direction:column;align-items:center;gap:3px}
.sp-tools .sp-mic-cue #spStatus{font-size:11px;color:#78828b;margin:0;line-height:1.4;text-align:center}
.sp-tools .sp-mic-cue .sp-attempts{font-size:9px;color:#a3a8ad;margin:0;line-height:1.3}
.sp-tools .sp-write-group #spTypeToggle{font-size:10px;color:#969fa6;min-height:22px}
.sp-tools .sp-lower-line{margin-top:8px;display:flex;justify-content:space-between;gap:12px;align-items:center}
.sp-tools .sp-lower-line .sp-answer-hint{border:0;background:transparent;padding:0;margin:0;font-size:11px;color:#a2a5a7;gap:7px}
.sp-tools .sp-answer-hint span{font-size:10px;font-weight:500;color:#a2a5a7}
.sp-tools .sp-answer-hint em{font-style:normal}
.sp-tools #spNext{padding:7px 13px;min-height:30px;font-size:11px}
.sp-tools #spAudio:empty{margin:0}
@media(max-width:800px){.sp-tools{padding:14px 12px 10px}}

.sp-mic-cue #spStatus:empty{display:none}

/* Match the shared compact English / Korean / description heading. */
#main .rami-speaking>.sp-heading{margin:0 0 10px!important;padding:0!important;min-height:0;align-items:flex-start;gap:10px}
#main .rami-speaking>.sp-heading small{display:block;font-size:9px!important;line-height:12px!important;letter-spacing:1.5px;font-weight:600;color:#748399;margin:0 0 3px!important}
#main .rami-speaking>.sp-heading h1{font-size:20px!important;line-height:26px!important;margin:0 0 3px!important;letter-spacing:-.4px;font-weight:700;color:#35435e}
#main .rami-speaking>.sp-heading p{font-size:11px!important;line-height:16px!important;margin:0!important;color:#718096;letter-spacing:0}

.sp-feedback{background:#f4f3ed;border-radius:10px;padding:10px 12px;margin-bottom:10px;text-align:left}.sp-feedback p{margin:0 0 5px;color:#65736c;font-size:12px}.sp-feedback .sp-recast{font-size:14px;color:#455965}.sp-feedback button{padding:5px 9px;font-size:11px}.sp-feedback small{color:#92999b}.sp-tools #spAudio label{display:block;font-size:10px;color:#84908f;margin:6px 0}.sp-tools #spAudio audio{display:block;height:32px;width:100%;margin-top:3px}.sp-draft{display:flex;gap:12px;align-items:center;border-top:1px solid #e6e9e7;padding-top:6px}.sp-draft label{flex:1;min-width:0}.sp-draft button{flex-shrink:0}.rami-speaking:has(.sp-feedback) .sp-dialogue-stage,.rami-speaking:has(.sp-draft) .sp-dialogue-stage{height:clamp(140px,calc(100svh - 550px),330px)}.sp-tools #spAudio{max-height:140px;overflow:auto}.sp-dialogue-stage .sp-partner{max-height:100%}.sp-dialogue-stage .sp-partner .sp-motion{max-height:155px}.rami-speaking:has(.sp-feedback) .sp-partner .sp-motion,.rami-speaking:has(.sp-draft) .sp-partner .sp-motion{height:85px;flex-basis:85px}

.sp-tools .sp-submit-recording{display:block;margin:10px auto 0;min-width:100px;padding:8px 20px}.sp-tools .sp-submit-recording:disabled{opacity:.4}.sp-attempts[hidden]{display:none!important}.rami-speaking:has(#spAudio audio) .sp-dialogue-stage{height:clamp(140px,calc(100svh - 510px),340px)}.sp-tools #spAudio{max-height:50px;overflow:visible}.sp-mic-cue:empty{display:none}

.sp-heard-review{padding:10px 12px;background:#f4f3ed;border-radius:10px;margin-bottom:10px}.sp-heard-review label{display:block;color:#647178;font-size:12px;margin-bottom:6px}.sp-heard-review textarea{display:block;box-sizing:border-box;width:100%;resize:vertical;min-height:54px;max-height:110px;padding:8px;border:1px solid #d7dddf;border-radius:8px;font:inherit;font-size:14px;color:#435864;background:#fffefa}.sp-heard-review>div{display:flex;justify-content:flex-end;gap:8px;margin-top:7px}.sp-heard-review button{font-size:11px;padding:7px 11px}.sp-submit-recording[hidden]{display:none!important}.rami-speaking:has(.sp-heard-review) .sp-dialogue-stage{height:clamp(140px,calc(100svh - 620px),300px)}

/* Compact pilot controls; preserve the character stage and recording layout. */
.sp-source-review,.sp-saved{width:min(100%,680px);margin:8px auto;text-align:left;font-size:13px;line-height:1.5;max-height:24vh;overflow:auto;padding:8px 12px;border:1px solid #d8d8ce;border-radius:12px;background:#f7f5ef;box-sizing:border-box}
.sp-source-review summary,.sp-saved summary{cursor:pointer;color:#596477}
.sp-saved audio{display:block;max-width:100%;height:34px}.sp-saved p{overflow-wrap:anywhere}
.sp-feedback>strong{color:#8b713a}.sp-feedback .secondary{padding:5px 12px;font-size:13px}
.sp-complete>button{margin:8px}

.sp-feedback{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:3px 12px;padding:9px 12px}
.sp-feedback>strong{grid-column:1;grid-row:1/3;font-size:15px}.sp-feedback>p{grid-column:2;margin:0;overflow-wrap:anywhere}.sp-feedback>button{grid-column:3;grid-row:1/3;align-self:center}
@media(max-width:480px){.sp-feedback{gap:4px 7px}.sp-feedback>strong{font-size:12px}.sp-feedback>p{font-size:11px}.sp-feedback>button{padding:4px 6px;font-size:11px}}

/* Equal character cards: unlock labels never increase the second row height. */
.sp-choice-screen .sp-friends{grid-auto-rows:1fr}
.sp-choice-screen .sp-friends>button{position:relative;box-sizing:border-box;height:clamp(126px,22svh,170px);justify-content:center;padding:7px 8px 18px;gap:4px}
.sp-choice-screen .sp-motion-card,.sp-choice-screen .sp-mystery{height:clamp(72px,13svh,106px);flex-shrink:0}
.sp-choice-screen .sp-locked .sp-mystery svg{height:74%;align-self:center}
.sp-choice-screen .sp-locked .sp-mystery b{top:34%;font-size:clamp(25px,4svh,34px)}
.sp-choice-screen .sp-locked>span{position:absolute;bottom:4px;left:0;right:0;font-size:9px;line-height:1.2}
@media(max-height:600px){.sp-choice-screen .sp-friends>button{height:clamp(110px,22svh,140px)}.sp-choice-screen .sp-motion-card,.sp-choice-screen .sp-mystery{height:clamp(58px,12svh,82px)}}

/* Size cards around the portrait/name, with only 8px below every name. */
.sp-choice-screen .sp-friends>button{height:auto;min-height:0;justify-content:flex-start;padding:8px;gap:4px}
.sp-choice-screen .sp-friends>button>strong{margin:0;line-height:18px;flex-shrink:0}
.sp-choice-screen .sp-locked>span{top:6px;right:7px;bottom:auto;left:auto;font-size:9px;line-height:12px}
@media(max-height:600px){.sp-choice-screen .sp-friends>button{height:auto}}

.sp-heard-compact{display:flex;align-items:center;gap:8px 14px;flex-wrap:wrap;padding:7px 10px;margin-bottom:7px;background:#f4f3ed}
.sp-heard-compact>p{flex:1 1 220px;margin:0;font-size:12px;line-height:1.5;color:#62717b;overflow-wrap:anywhere}
.sp-heard-compact small{font-size:10px;color:#8b969b;margin-right:5px}.sp-heard-compact>div{margin:0;gap:6px}.sp-heard-compact button{font-size:11px;padding:5px 9px}
.sp-small-correction{display:block;color:#51636c;font-size:12px}
.rami-speaking:has(.sp-heard-compact) .sp-dialogue-stage{height:clamp(140px,calc(100svh - 510px),330px)}
#spTypeToggle[hidden],#spForm[hidden]{display:none!important}

.sp-mode-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;max-width:680px;margin:28px auto}.sp-mode-options button{display:flex;flex-direction:column;gap:12px;align-items:center;padding:30px 18px;min-height:140px}.sp-mode-options strong{font-size:25px;text-transform:capitalize}.sp-mode-options span{font-size:14px;color:#6d7884}.sp-source-row:empty{display:none}

.sp-mode-options:has([data-daily-topic]){grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;max-width:820px;margin:18px auto}.sp-mode-options [data-daily-topic]{min-height:100px;padding:18px 10px;gap:8px}.sp-mode-options [data-daily-topic] strong{font-size:19px}.sp-tools .sp-answer-hint{max-width:min(75%,380px);white-space:normal;line-height:1.45}@media(max-width:600px){.sp-mode-options:has([data-daily-topic]){grid-template-columns:repeat(2,minmax(0,1fr))}.sp-mode-options [data-daily-topic]{min-height:92px}}
