:root{--blue:#255dcc;--deep:#18376b;--ink:#21385b;--muted:#71809b;--border:#cddcf1;--paper:#eaf3ff}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;color:var(--ink);background:var(--paper);font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei',sans-serif;font-size:13px;line-height:1.65}button,a,select{outline-offset:3px}button:focus-visible,a:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #6198f4}button{font:inherit;color:inherit;cursor:pointer;border:0;background:none}button:disabled{opacity:.5;cursor:default}a{color:var(--blue);text-decoration:none}header{max-width:1380px;margin:auto;min-height:76px;padding:12px 28px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #cbdaf0;gap:20px}.brand{display:flex;gap:12px;align-items:center;color:var(--deep);font-size:16px;line-height:1.4}.brand b{font-weight:600}.brand small{display:block;font-size:8px;letter-spacing:1.5px;color:#6b83ac;margin-top:3px}.brand-symbol{font-family:Georgia,serif;font-size:28px;letter-spacing:-3px;border:1px solid #aac1e7;padding:0 10px 3px 6px;border-radius:8px;background:#fff;position:relative}.brand-symbol span{color:var(--blue);position:absolute;right:2px;bottom:-3px;font-size:17px}.language-control{display:flex;align-items:center;gap:8px;color:var(--blue);border:1px solid #b9ceee;background:#f6faff;border-radius:8px;padding:5px 10px}.language-control span{font-size:19px;line-height:1}.language-control select{border:0;background:transparent;color:var(--deep);font:inherit;font-size:12px;max-width:145px;padding:4px 2px}main{max-width:1380px;padding:23px 28px 18px;margin:auto}.intro{margin-bottom:19px}h1{margin:0;color:var(--deep);font-size:27px;font-weight:600;line-height:1.3;letter-spacing:-.5px}.lead{font-size:12px;color:#637a9f;margin:7px 0 0}.study-toolbar{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #c7d7ee;padding-bottom:14px;margin-bottom:17px;gap:15px}.tabs{display:flex;gap:5px;background:#dce9fb;padding:4px;border-radius:9px}.tabs button{padding:7px 19px;font-size:12px;border-radius:7px;color:#5c7294;white-space:nowrap}.tabs button[aria-selected=true]{background:var(--blue);color:white}.sequence{font-size:11px;color:var(--blue);padding:8px 12px;background:#f5f9ff;border:1px solid #bdd0ed;border-radius:7px}.sequence.active{background:var(--blue);color:white}.study-layout{display:grid;grid-template-columns:minmax(0,1fr) 275px;gap:20px;align-items:start}.collection-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}.collection-heading h2{font-size:13px;margin:0;font-weight:500}.collection-heading small{font-size:10px;color:var(--muted);text-align:right}.card-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}.letter-card,.sound-card{background:#fff;border:1px solid var(--border);border-radius:9px;overflow:hidden;min-width:0;transition:border-color .15s,background .15s}.letter-card:hover,.sound-card:hover{border-color:#82aae8}.letter-card.selected,.sound-card.selected{border-color:var(--blue);box-shadow:0 0 0 1px var(--blue)}.letter-card.playing,.sound-card.playing{background:#e2edff}.card-main{display:flex;justify-content:center;align-items:center;gap:8px;padding:9px 5px 6px;width:100%;min-height:58px;position:relative}.card-main:hover{background:#edf4ff}.letter-large{font-family:Georgia,'Times New Roman',serif;font-size:29px;color:var(--deep);line-height:1.1;white-space:nowrap}.letter-large small{font-size:19px;color:#92a7c7;margin-left:2px}.letter-ipa{font-family:Arial,sans-serif;font-size:11px;color:#6a82a8;overflow-wrap:anywhere}.play-dot{position:absolute;right:5px;top:3px;font-size:8px;color:#82a4da}.tile-example{border-top:1px solid #e1e9f5;margin:0 8px;padding:6px 0 8px;min-height:78px}.example-play{font-family:Georgia,'Times New Roman',serif;color:var(--blue);font-size:14px;padding:0;width:100%;display:flex;align-items:center;justify-content:space-between;gap:5px;text-align:left;line-height:1.4;overflow-wrap:anywhere}.example-play span:last-child{font-size:9px;flex:none}.example-play:hover{text-decoration:underline}.word-ipa{font-family:Arial,sans-serif;font-size:10px;color:#7b8eac;margin-top:2px}.word-meaning{font-size:10px;line-height:1.4;color:#73809a;margin-top:2px;min-height:14px;overflow-wrap:anywhere}.sounds-grid{grid-template-columns:repeat(7,minmax(0,1fr))}.sound-large{font-family:Arial,sans-serif;font-size:27px;color:var(--deep);line-height:1.2}.sound-spelling{font-size:9px;color:#7f91ae;line-height:1.3}.sound-card .card-main{flex-direction:column;gap:3px;padding:8px 4px 6px;min-height:62px}.group-title{font-size:12px;font-weight:500;display:flex;gap:10px;align-items:center;margin:15px 0 8px}.group-title:first-of-type{margin-top:0}.group-title span{font-size:10px;color:var(--muted)}.detail{position:sticky;top:15px;background:#fafdff;border:1px solid var(--border);border-radius:10px;padding:18px}.detail-label{font-size:10px;color:#7387a7;margin-bottom:12px}.detail-symbol{font-family:Georgia,'Times New Roman',serif;font-size:51px;color:var(--blue);line-height:1.1;display:flex;align-items:baseline;gap:10px}.detail-symbol small{font-size:31px;color:#96b2de}.detail-ipa{font-family:Arial,sans-serif;font-size:17px;color:#7792bc;margin-top:5px}.phonetic-symbol{font-family:Arial,sans-serif;font-size:44px}.listen-row{display:flex;gap:7px;margin:15px 0}.listen-button{background:var(--blue);color:#fff;padding:8px 11px;border-radius:7px;font-size:11px;flex:1}.slow-button{border:1px solid #c2d4ee;color:var(--blue);padding:7px 9px;border-radius:7px;font-size:10px}.detail-block{border-top:1px solid #d6e1f2;padding-top:13px;margin-top:13px}.detail-block h3{font-size:10px;color:#7b8faa;font-weight:500;margin:0 0 7px}.detail-block p{margin:0;font-size:12px;line-height:1.85}.sound-chips{display:flex;flex-wrap:wrap;gap:6px}.sound-chips button{font-family:Arial,sans-serif;background:#e6efff;color:var(--blue);padding:4px 10px;font-size:17px;border-radius:6px}.detail-example{display:flex;align-items:center;justify-content:space-between;gap:8px;font-family:Georgia,serif;font-size:22px;line-height:1.4;color:var(--deep)}.detail-example button{background:#e8f0ff;color:var(--blue);padding:7px 9px;border-radius:6px;font-size:10px;font-family:inherit}.example-meaning{font-size:11px;color:var(--muted);margin-top:5px;line-height:1.8}.demo-note{font-size:9px;color:#8a9bb5;line-height:1.85;margin:12px 0 0}.gentle-note{margin:20px 0 0;border:1px solid #c6d7f0;background:#f3f8ff;border-radius:8px;padding:12px 16px;color:#6f86ab;font-size:11px}.credits{margin-top:14px;font-size:10px;color:#7c90b0}.credits summary{cursor:pointer;padding:5px 0;width:fit-content}.credits p{max-width:900px;font-size:11px}.source-list{padding:0;list-style:none;display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:14px 0}.source-list li{background:#f8fbff;border:1px solid #d2e0f3;border-radius:7px;padding:10px;font-size:10px;overflow-wrap:anywhere}.source-list strong{font-weight:500}.source-list a{text-decoration:underline}footer{max-width:1324px;margin:0 auto 90px;border-top:1px solid #c8d8ef;padding:15px 0;color:#8395b1;font-size:10px}.mini-player{position:fixed;bottom:16px;left:50%;transform:translateX(-50%);background:var(--deep);color:white;box-shadow:0 6px 25px #18376b20;display:flex;align-items:center;gap:12px;padding:9px 14px;border-radius:10px;min-width:350px;max-width:96vw;z-index:10}.mini-player[hidden]{display:none}.player-symbol{font-family:Arial,sans-serif;font-size:20px;min-width:32px;max-width:110px;overflow-wrap:anywhere}.player-label{font-size:10px;color:#b2c7e9;flex:1;max-width:100px}.mini-player button{color:#fff;border:1px solid #5f789e;border-radius:5px;padding:5px 7px;white-space:nowrap;font-size:10px}#message{position:fixed;bottom:83px;left:50%;transform:translateX(-50%);background:#fff;border:1px solid #aec8ee;padding:10px 15px;border-radius:8px;font-size:12px;z-index:11;display:none;max-width:94vw}
@media(max-width:1150px){.card-grid,.sounds-grid{grid-template-columns:repeat(5,minmax(0,1fr))}.study-layout{grid-template-columns:minmax(0,1fr) 255px;gap:16px}header{padding:12px 23px}main{padding:22px 23px}footer{margin-left:23px;margin-right:23px}.card-main{gap:5px}.letter-large{font-size:27px}}
@media(max-width:860px){.card-grid,.sounds-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.study-layout{grid-template-columns:minmax(0,1fr) 235px;gap:13px}.detail{padding:15px}.letter-large small{font-size:16px}.letter-ipa{font-size:10px}.card-main{gap:4px}.word-meaning{font-size:9px}}
@media(max-width:680px){header{min-height:66px;padding:10px 16px;gap:10px}.brand{font-size:12px;gap:8px}.brand-symbol{font-size:24px}.brand small{font-size:6px;letter-spacing:1.1px}.language-control{padding:3px 6px;gap:3px}.language-control select{font-size:11px;max-width:105px}.language-control span{font-size:16px}main{padding:19px 16px}.intro{margin-bottom:15px}h1{font-size:24px}.lead{font-size:11px;line-height:1.7;margin-top:6px}.study-toolbar{gap:8px;flex-wrap:wrap;margin-bottom:15px}.tabs button{padding:7px 12px;font-size:11px}.sequence{padding:7px 8px;font-size:10px}.study-layout{grid-template-columns:1fr;gap:17px}.card-grid,.sounds-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}.card-main{flex-direction:column;gap:3px;min-height:66px;padding:8px 3px 6px}.letter-large{font-size:27px}.letter-large small{font-size:18px}.letter-ipa{font-size:10px}.tile-example{margin:0 6px;min-height:73px;padding:6px 0}.example-play{font-size:12px}.word-meaning{font-size:9px}.word-ipa{font-size:9px}.collection-heading{align-items:flex-start;gap:10px}.collection-heading h2{font-size:11px}.collection-heading small{font-size:9px;max-width:125px}.sound-card .card-main{min-height:65px}.sound-large{font-size:27px}.sound-spelling{font-size:8px}.detail{position:static;padding:15px 17px;display:grid;grid-template-columns:80px 1fr;gap:0 15px}.detail-label{grid-column:1/-1;margin-bottom:10px}.detail-symbol{grid-column:1;grid-row:2;font-size:45px;gap:5px}.detail-symbol small{font-size:27px}.detail-ipa{grid-column:1;grid-row:3;font-size:14px;margin-top:0}.listen-row{grid-column:2;grid-row:2;margin:5px 0 0;align-self:start}.listen-button{padding:7px 9px}.slow-button{padding:7px}.detail-block,.demo-note{grid-column:1/-1}.detail-block{padding-top:11px;margin-top:11px}.detail-block h3{font-size:9px}.detail-block p{font-size:11px}.detail-example{font-size:20px}.demo-note{font-size:9px}.source-list{grid-template-columns:1fr}.gentle-note{padding:11px 13px;font-size:10px}footer{margin:0 16px 90px;font-size:9px}.mini-player{bottom:10px;min-width:0;width:calc(100vw - 24px);gap:7px;padding:8px 10px}.player-symbol{font-size:17px;min-width:25px;max-width:85px}.player-label{font-size:9px}.mini-player button{font-size:9px;padding:5px 6px}}
@media(max-width:360px){.card-grid,.sounds-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.brand small{display:none}.language-control span{display:none}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.letter-card,.sound-card{transition:none}}

/* Detail opens above the collection, on all screen sizes. */
.study-layout{display:block}.detail{position:static;border:0;background:transparent;border-radius:0;padding:8px 26px 26px;display:block}.detail-label,.detail-symbol,.detail-ipa,.listen-row,.detail-block,.demo-note{grid-column:auto;grid-row:auto}.dialog-open{overflow:hidden}#detail-dialog{width:min(540px,calc(100vw - 28px));max-height:calc(100dvh - 40px);padding:0;border:1px solid #aac7ed;border-radius:18px;background:#f5faff;color:var(--ink);box-shadow:0 22px 80px #18376b44;overscroll-behavior:contain}#detail-dialog::backdrop{background:#17356566;backdrop-filter:blur(3px)}.dialog-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 20px 6px;position:sticky;top:0;background:#f5faff;z-index:1}.dialog-toolbar h2{font-size:13px;margin:0;font-weight:500;color:#657fa5}#close-detail{font-size:28px;line-height:1;width:40px;height:40px;border-radius:50%;background:#e4eeff;color:var(--blue)}#close-detail:hover{background:#cddfff}#detail-dialog .detail-symbol{font-size:72px}#detail-dialog .detail-symbol small{font-size:44px}#detail-dialog .detail-block p{font-size:14px}#detail-dialog .detail-block h3{font-size:12px}#detail-dialog .listen-button,#detail-dialog .slow-button{font-size:13px;min-height:42px}#detail-dialog .detail-example{font-size:28px}#detail-dialog .example-meaning{font-size:13px}#detail-dialog .detail-example button{font-size:12px;min-height:40px}#detail-dialog .demo-note{font-size:11px}
@media(max-width:680px){#detail-dialog .detail{padding:8px 20px 22px}.dialog-toolbar{padding:10px 14px 4px}#detail-dialog .detail-symbol{font-size:60px}#detail-dialog .detail-example{flex-wrap:wrap}#detail-dialog .listen-row{margin:15px 0}.card-grid,.sounds-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}

.language-control{position:relative;min-width:110px;min-height:38px;justify-content:center}.language-control .language-entry{font-size:13px;font-weight:600;color:var(--blue);white-space:nowrap}.language-control select{position:absolute;inset:0;width:100%;height:100%;max-width:none;opacity:0;cursor:pointer}.language-control:focus-within{outline:3px solid #6198f4;outline-offset:3px}

/* Expand the selected card directly inside the learning grid. */
.letter-card.expanded,.sound-card.expanded{grid-column:span 3;background:#f4f9ff;scroll-margin-top:18px}.expanded>.card-main{min-height:76px;flex-direction:row;justify-content:flex-start;padding:12px 20px;gap:14px}.expanded .letter-large{font-size:46px}.expanded .letter-large small{font-size:28px}.expanded .sound-large{font-size:40px}.expanded .letter-ipa{font-size:16px}.expanded>.tile-example{display:none}.inline-detail{padding:0 20px 18px!important}.inline-detail .detail-label,.inline-detail .detail-symbol,.inline-detail .detail-ipa{display:none}.inline-detail .listen-row{margin:8px 0 12px}.inline-detail .detail-block p{font-size:13px}.inline-detail .detail-example{flex-wrap:wrap}.inline-detail .listen-button,.inline-detail .slow-button{min-height:40px;font-size:12px}.inline-detail .detail-block h3{font-size:11px}.inline-detail .detail-block:first-of-type{margin-top:8px}.card-grid{align-items:start}.dialog-open{overflow:auto}@media(max-width:680px){.letter-card.expanded,.sound-card.expanded{grid-column:1/-1}.inline-detail{display:block}.expanded>.card-main{min-height:70px}.inline-detail .detail-block p{font-size:13px}}
/* Compact inline details on phones. */
@media(max-width:680px){
.expanded>.card-main{min-height:47px;padding:7px 12px;gap:10px}.expanded .letter-large{font-size:32px}.expanded .letter-large small{font-size:21px}.expanded .sound-large{font-size:30px}.expanded .letter-ipa{font-size:12px}
.inline-detail{padding:0 12px 10px!important}.inline-detail .listen-row{margin:4px 0 7px;gap:6px}.inline-detail .listen-button,.inline-detail .slow-button{min-height:34px;padding:5px 9px;font-size:11px}.inline-detail .listen-button{flex:none}
.inline-detail .detail-block{padding-top:7px;margin-top:7px}.inline-detail .detail-block h3{font-size:10px;margin-bottom:3px}.inline-detail .detail-block p{font-size:12px;line-height:1.55}.inline-detail .sound-chips{gap:5px}.inline-detail .sound-chips button{font-size:15px;padding:2px 9px;min-height:30px}
.inline-detail .detail-example{font-size:20px;line-height:1.3}.inline-detail .detail-example button{padding:5px 9px;min-height:32px;font-size:11px}.inline-detail .example-meaning{font-size:10px;margin-top:3px;line-height:1.5}.inline-detail .detail-block:last-of-type .listen-row{margin:5px 0 0}.inline-detail .demo-note{font-size:9px;line-height:1.5;margin:6px 0 0}
}
/* Compact expanded cards on desktop and tablet too. */
@media(min-width:681px){
.letter-card.expanded,.sound-card.expanded{grid-column:span 2}.expanded>.card-main{min-height:48px;padding:7px 12px;gap:10px}.expanded .letter-large{font-size:32px}.expanded .letter-large small{font-size:21px}.expanded .sound-large{font-size:30px}.expanded .letter-ipa{font-size:12px}.inline-detail{padding:0 12px 10px!important}.inline-detail .listen-row{margin:4px 0 7px;gap:6px}.inline-detail .listen-button,.inline-detail .slow-button{min-height:32px;padding:5px 9px;font-size:11px}.inline-detail .listen-button{flex:none}.inline-detail .detail-block{padding-top:7px;margin-top:7px}.inline-detail .detail-block h3{font-size:10px;margin-bottom:3px}.inline-detail .detail-block p{font-size:12px;line-height:1.55}.inline-detail .sound-chips{gap:5px}.inline-detail .sound-chips button{font-size:15px;padding:2px 9px;min-height:28px}.inline-detail .detail-example{font-size:20px;line-height:1.3}.inline-detail .detail-example button{padding:5px 9px;min-height:30px;font-size:10px}.inline-detail .example-meaning{font-size:10px;margin-top:3px;line-height:1.5}.inline-detail .detail-block:last-of-type .listen-row{margin:5px 0 0}.inline-detail .demo-note{font-size:9px;line-height:1.5;margin:6px 0 0}
}
/* Smaller detail footprint, with reading and examples side by side. */
.inline-detail{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px 10px;padding:0 10px 9px!important}.inline-detail>.listen-row{grid-column:1/-1;margin:2px 0 0!important}.inline-detail>.detail-block{margin:0!important;padding-top:5px!important;min-width:0}.inline-detail>.detail-block:first-of-type{grid-column:1/-1}.inline-detail>.detail-block:last-of-type{grid-column:2;grid-row:3}.inline-detail>.detail-block:nth-of-type(2){grid-column:1;grid-row:3}.inline-detail>.demo-note{grid-column:1/-1;margin:0!important}.expanded>.card-main{min-height:39px!important;padding:5px 10px!important}.expanded .letter-large{font-size:27px!important}.expanded .letter-large small{font-size:17px!important}.expanded .sound-large{font-size:26px!important}.expanded .letter-ipa{font-size:11px!important}.inline-detail .listen-button,.inline-detail .slow-button{min-height:28px!important;padding:3px 7px!important;font-size:10px!important}.inline-detail .detail-block h3{font-size:9px!important;margin-bottom:2px!important}.inline-detail .detail-block p{font-size:11px!important;line-height:1.45!important}.inline-detail .detail-example{font-size:17px!important;gap:4px!important}.inline-detail .detail-example button{min-height:27px!important;padding:3px 6px!important;font-size:9px!important}.inline-detail .example-meaning{font-size:9px!important;line-height:1.4!important;margin-top:2px!important}.inline-detail .sound-chips{gap:4px!important}.inline-detail .sound-chips button{font-size:13px!important;min-height:25px!important;padding:2px 6px!important}.inline-detail .detail-block .listen-row{margin:3px 0 0!important}.inline-detail .demo-note{font-size:8px!important;line-height:1.4!important}
@media(min-width:681px){.letter-card.expanded,.sound-card.expanded{grid-column:span 2;max-width:310px;justify-self:start;width:100%}}
.inline-detail>.detail-block:nth-child(5){grid-column:1/-1;grid-row:2}.inline-detail>.detail-block:nth-child(6){grid-column:1;grid-row:3}.inline-detail>.detail-block:last-of-type{grid-column:2;grid-row:3}
.inline-detail>.detail-block:has(.sound-chips){grid-column:1;grid-row:3}.inline-detail>.detail-block:has(.detail-example){grid-column:2;grid-row:3}.inline-detail>.detail-block:has(>p){grid-column:1/-1;grid-row:2}.inline-detail>.detail-block:has(>p)+.detail-block:has(>p){grid-column:1;grid-row:3}
/* Keep every detail section aligned; remove inherited grid placement. */
.inline-detail{display:block!important;padding:0 10px 9px!important;text-align:left}.inline-detail>*{grid-column:auto!important;grid-row:auto!important}.inline-detail>.detail-block{width:100%;padding-top:5px!important;margin-top:5px!important}.inline-detail>.listen-row{display:flex;margin:2px 0 5px!important}.inline-detail .detail-block h3{margin:0 0 3px!important}.inline-detail .sound-chips{display:flex;justify-content:flex-start}.inline-detail .detail-example{display:flex;align-items:center;justify-content:flex-start;gap:10px!important;flex-wrap:wrap}.inline-detail .example-meaning{margin-top:3px!important}.inline-detail .detail-block .listen-row{display:inline-flex;margin:4px 0 0!important}.inline-detail .demo-note{margin-top:4px!important}
/* Fill the reserved grid columns so no unused strip remains beside details. */
.card-grid,.sounds-grid{gap:5px}.letter-card.expanded,.sound-card.expanded{max-width:none!important;width:100%;justify-self:stretch}
