:root{--navy:#153c49;--ink:#173743;--muted:#657680;--yellow:#f8c44b;--line:#dce5e9;--bg:#f2f6f8;--green:#12765b;--red:#bc3543;--shadow:0 8px 25px #153c4909}*{box-sizing:border-box}body{margin:0;color:var(--ink);background:var(--bg);font:16px/1.65 system-ui,-apple-system,'Noto Sans JP',sans-serif}button,input,select{font:inherit}button,a,input,select{touch-action:manipulation}button{cursor:pointer;border:1px solid var(--line);background:#fff;border-radius:10px;padding:11px 18px;color:var(--ink);font-weight:650;min-height:46px}button:hover{border-color:var(--navy);background:#f7fafb}button:disabled{cursor:default;opacity:.5}button:focus-visible,a:focus-visible{outline:3px solid #117ea7;outline-offset:3px}a{color:#166b89}h1,h2,h3,p{margin-top:0}h1{font-size:clamp(26px,3vw,36px);letter-spacing:.015em;line-height:1.4;margin-bottom:6px}h2{font-size:23px;margin-bottom:12px}h3{font-size:19px}small{font-size:14px}.muted{color:var(--muted)}.vi{color:#227b83}.eyebrow{font-size:13px;font-weight:800;letter-spacing:.1em;color:var(--muted)}.primary{background:var(--navy);color:#fff;border-color:var(--navy)}.primary:hover{background:#215769;color:#fff}.yellow{background:var(--yellow);border-color:var(--yellow)}.quiet{background:transparent;border-color:transparent}.badge{display:inline-flex;padding:3px 9px;background:#fff2c6;color:#6c4f00;border-radius:5px;font-size:13px;font-weight:700}.badge.green{background:#e3f4ec;color:var(--green)}header{height:88px;padding:0 40px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;background:white;position:sticky;top:0;z-index:5}.brand{display:flex;gap:12px;align-items:center;font-weight:800;font-size:21px;text-decoration:none;color:var(--ink);line-height:1.3}.brand small{display:block;font-size:12px;font-weight:500;color:var(--muted);margin-top:4px}.brandmark{display:grid;place-items:center;background:var(--navy);color:var(--yellow);width:45px;height:45px;border-radius:9px}.header-right{display:flex;gap:15px;align-items:center}.app{max-width:1520px;margin:auto;display:grid;grid-template-columns:248px 1fr}aside{padding:30px 20px;position:sticky;top:88px;height:calc(100vh - 88px);border-right:1px solid var(--line)}aside button{width:100%;display:flex;gap:12px;align-items:center;text-align:left;margin-bottom:4px;border:none;background:transparent;font-size:15px;padding:13px 12px}aside button.active{background:var(--navy);color:white}.navicon{width:22px;font-size:20px;text-align:center}.navlabel small{font-size:12px;display:block;font-weight:400;opacity:.75}.navheading{font-size:12px;letter-spacing:.13em;color:var(--muted);padding:18px 12px 8px}.navfoot{margin:24px 12px;border-top:1px solid var(--line);padding-top:16px;font-size:13px;color:var(--muted)}main{padding:32px 38px 70px;min-width:0}.pagehead{display:flex;justify-content:space-between;align-items:start;gap:20px;margin-bottom:24px}.pagehead p{margin-bottom:0}.panel{background:white;border:1px solid var(--line);border-radius:15px;padding:25px;box-shadow:var(--shadow);margin-bottom:22px}.welcome{background:var(--navy);color:#fff;position:relative;overflow:hidden;display:grid;grid-template-columns:1.4fr 1fr;gap:30px;padding:29px}.welcome .muted{color:#bfd4dc}.welcome h2{font-size:27px;margin-bottom:6px}.welcome p{margin-bottom:16px}.welcome .yellow{width:100%;max-width:250px}.welcome-stat{border-left:1px solid #ffffff25;padding-left:28px;display:flex;flex-direction:column;justify-content:center}.welcome-stat strong{font-size:40px;line-height:1.3}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:15px;margin-bottom:24px}.stat{background:white;border:1px solid var(--line);border-radius:12px;padding:18px 20px}.stat strong{display:block;font-size:29px;line-height:1.3;margin-top:6px}.stat span{font-size:14px;color:var(--muted)}.sectionrow{display:flex;align-items:center;justify-content:space-between;margin-bottom:15px}.sectionrow h2{margin:0}.learn-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}.learn-tile{display:grid;grid-template-columns:90px 1fr;gap:18px;text-align:left;padding:18px;border-radius:13px;align-items:center;box-shadow:var(--shadow)}.learn-tile .tileimage{height:94px;width:90px;background:#f0f4f6;border-radius:9px;overflow:hidden}.tileimage img{width:100%;height:100%;object-fit:contain}.learn-tile h3{margin:0 0 2px;font-size:20px}.learn-tile p{font-size:14px;margin:0 0 8px;font-weight:400}.learn-tile small{color:var(--muted);font-weight:500}.bar{height:7px;background:#e5edef;border-radius:5px;overflow:hidden;margin:8px 0}.bar div{height:100%;background:#298e85}.bottom-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:22px}.bottom-grid .panel{margin:0}.bottom-grid p{font-size:14px}.filters{display:flex;flex-wrap:wrap;gap:12px;margin-bottom:22px}input,select{padding:11px 13px;border:1px solid #bdcdd5;border-radius:9px;background:white;min-height:46px;color:var(--ink)}input[type=search]{flex:1;min-width:180px}label{font-weight:650;display:block;margin-bottom:7px}.cardgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:17px}.card{text-align:left;border:1px solid var(--line);padding:0;border-radius:13px;overflow:hidden;box-shadow:var(--shadow);position:relative}.card .photo{background:white;height:180px;width:100%;display:flex;align-items:center;justify-content:center;border-bottom:1px solid #eef1f3;overflow:hidden}.photo img{max-height:100%;max-width:100%;object-fit:contain}.photo img.scene{width:100%;height:100%;object-fit:cover}.cardtext{padding:16px}.card h3{font-size:19px;margin:0 0 4px;line-height:1.4}.card p{margin:0;font-size:14px;font-weight:400}.card .badge{position:absolute;top:8px;right:8px}.quote{display:flex;align-items:center;justify-content:center;background:#e5f0f3!important;color:var(--navy);font-size:28px;font-weight:800}.callout{border-left:4px solid var(--yellow);padding:12px 15px;background:#fff9e6;font-size:14px;margin:16px 0}.callout.red{background:#fff2f3;border-color:var(--red)}dialog{border:1px solid var(--line);border-radius:17px;max-width:640px;width:calc(100% - 26px);padding:28px;max-height:90vh;color:var(--ink);box-shadow:0 16px 90px #0003}dialog::backdrop{background:#102e3b99}.dialogtop{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.detailphoto{width:100%;height:250px;object-fit:contain;border-radius:12px;background:#f2f6f8;cursor:zoom-in}.detailphoto.zoom{height:auto;max-height:65vh}.detail h2{font-size:30px;margin-bottom:4px}.detail .reading{font-size:18px;margin:0}.detail .vi{font-size:21px}.detail dl dt{font-size:13px;font-weight:800;color:var(--muted);margin-top:18px}.detail dl dd{margin:5px 0;font-size:17px}.source-mini{border-top:1px solid var(--line);padding-top:14px;font-size:13px;color:var(--muted)}.quizsetup{max-width:760px}.choices{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:16px}.choice{text-align:left;display:flex;gap:13px;align-items:center;min-height:90px;font-size:18px;line-height:1.45;overflow:hidden}.choice .letter{flex:0 0 30px;border:1px solid var(--line);border-radius:7px;display:grid;place-items:center;color:var(--muted)}.choice .optionimage{height:140px;max-width:100%;object-fit:contain}.choice.image{display:block;text-align:center}.choice.image .letter{display:inline-grid;margin-right:10px}.choice.correct{background:#e5f5ec;border:2px solid var(--green);opacity:1}.choice.wrong{background:#fff1f1;border:2px solid var(--red);opacity:1}.quiz{max-width:850px;margin:auto}.quiztop{display:flex;align-items:center;justify-content:space-between}.question-image{display:block;width:100%;height:270px;object-fit:contain;background:white;border-radius:12px}.feedback{margin-top:20px;background:#e8f5ef;border:1px solid #b8dacb;border-radius:12px;padding:20px}.feedback.wrong{background:#fff1f1;border-color:#f1c4c7}.feedback h3{margin-bottom:6px}.feedback p{margin-bottom:12px}.quiz-title{font-size:24px;text-align:center;margin:22px 0}.reportwrap{max-width:600px;margin:auto}.report{border-top:7px solid var(--navy);padding:25px}.report-top{display:flex;justify-content:space-between;align-items:center}.report h2{font-size:23px;margin:0}.reportname{font-size:29px;font-weight:800;overflow-wrap:anywhere;margin:18px 0 3px}.reportdate{font-size:19px;font-weight:650}.score{text-align:center;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:13px;margin:15px 0}.score strong{font-size:58px;line-height:1.2;color:var(--green)}.score span{font-size:24px}.report-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.report-grid div{background:#f2f6f8;padding:9px 13px;border-radius:8px}.report-grid span{display:block;font-size:12px;color:var(--muted)}.report-grid strong{font-size:16px}.record-id{font-size:12px;overflow-wrap:anywhere;color:var(--muted);margin-top:14px}.report-actions{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:20px}.report-instructions{font-size:14px}.capture-mode header,.capture-mode aside,.capture-mode .mobile-nav,.capture-mode .report-instructions,.capture-mode .history-extra{display:none}.capture-mode .app{display:block}.capture-mode main{padding:15px}.capture-mode .report-actions{justify-content:center}.historyrow{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:15px 0;border-bottom:1px solid var(--line)}.historyrow p{margin:0;font-size:14px}.historyrow strong{font-size:18px}.reviewrow{border:1px solid var(--line);padding:15px;border-radius:10px;margin-top:12px;display:flex;justify-content:space-between;gap:10px}.reviewrow p{margin:0;font-size:14px}.empty{text-align:center;padding:35px 20px;background:white;border:1px dashed #c4d3d9;border-radius:12px}.empty h2{font-size:21px}.settings{max-width:800px}.settings p{font-size:15px}.settings form{display:flex;gap:10px}.settings form input{flex:1;min-width:0}.namegate{max-width:590px;margin:25px auto;padding:35px}.namegate h1{margin:15px 0}.namegate input{width:100%;margin-bottom:18px}.namegate .primary{width:100%}.namegate p{font-size:15px}.sourcecard{overflow-wrap:anywhere}.sourcecard small{display:block}.sourcecard h3{margin-bottom:7px}.table-scroll{overflow:auto}table{border-collapse:collapse;width:100%;font-size:14px}th,td{text-align:left;padding:10px;border-bottom:1px solid var(--line);vertical-align:top}th{background:#edf4f6}.mobile-nav{display:none}#toast{position:fixed;bottom:30px;left:50%;transform:translateX(-50%);background:var(--navy);color:white;padding:12px 20px;border-radius:9px;z-index:30;max-width:90vw;display:none}.storagefail{background:#fff2f3;padding:25px;border:2px solid var(--red)}.error-image{font-size:14px;color:var(--red);padding:15px}.filelabel{display:inline-block;cursor:pointer;font-weight:650;padding:11px 18px;background:white;border:1px solid var(--line);border-radius:9px}.resume{border:1px solid #83bbb5;background:#edf9f7;padding:18px;border-radius:12px;margin-bottom:20px}.resume p{margin-bottom:10px}.timebadge{font-size:14px;font-variant-numeric:tabular-nums}.chiprow{display:flex;flex-wrap:wrap;gap:8px}.chip{padding:7px 12px;font-size:14px}.chip.active{color:white;background:var(--navy)}.sourcewarning{font-size:14px;margin:6px 0 20px}.hist-stat{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:22px}.hist-stat .stat{padding:15px}.hist-stat strong{font-size:25px}.status-good{color:var(--green)}.status-bad{color:var(--red)}.detail details{font-size:13px;margin-top:15px}.empty-image-icon{font-size:35px}.spacer{height:15px}
@media(min-width:1350px){.cardgrid{grid-template-columns:repeat(4,1fr)}}@media(max-width:1050px){header{padding:0 24px}.app{grid-template-columns:210px 1fr}aside{padding:20px 10px}main{padding:26px 24px}.cardgrid{grid-template-columns:repeat(2,1fr)}.learn-tile{grid-template-columns:65px 1fr;padding:15px;gap:12px}.learn-tile .tileimage{width:65px;height:85px}.learn-tile h3{font-size:17px}.hist-stat{grid-template-columns:repeat(2,1fr)}}@media(max-width:760px){header{height:70px;padding:0 16px}.brand{font-size:18px}.brandmark{width:37px;height:37px}.header-right{gap:3px}.header-right button{padding:9px}.app{display:block}aside{display:none}main{padding:24px 16px 100px}.pagehead{margin-bottom:19px}.pagehead h1{font-size:27px}.panel{padding:19px;border-radius:12px}.welcome{display:block;padding:23px}.welcome-stat{border-left:none;border-top:1px solid #ffffff25;padding:16px 0 0;margin-top:20px;flex-direction:row;align-items:center;justify-content:space-between}.welcome-stat strong{font-size:32px}.welcome-stat .bar{width:95px}.welcome-stat p{margin:0}.stats{gap:8px}.stat{padding:13px 10px}.stat strong{font-size:24px}.stat span{font-size:12px}.learn-grid{gap:12px;grid-template-columns:1fr}.learn-tile{grid-template-columns:85px 1fr;padding:14px;gap:16px}.learn-tile .tileimage{width:85px;height:86px}.learn-tile h3{font-size:20px}.bottom-grid{grid-template-columns:1fr}.cardgrid{gap:12px}.card .photo{height:150px}.cardtext{padding:13px 12px}.card h3{font-size:17px}.card p{font-size:13px}.mobile-nav{position:fixed;bottom:0;left:0;right:0;background:white;border-top:1px solid var(--line);display:grid;grid-template-columns:repeat(4,1fr);z-index:10;padding:5px 5px max(5px,env(safe-area-inset-bottom))}.mobile-nav button{background:transparent;border:none;border-radius:7px;padding:7px 3px;font-size:12px;line-height:1.25;font-weight:650}.mobile-nav button b{display:block;font-size:20px;font-weight:400;margin-bottom:4px}.mobile-nav button.active{background:#e6eff2;color:#156581}#toast{bottom:90px}.choices{gap:10px}.choice{padding:13px 10px;min-height:90px;font-size:16px;gap:8px}.choice.image .optionimage{height:105px}.choice .letter{flex-basis:23px}.question-image{height:230px}.quiz-title{font-size:21px}.quiz .panel{padding:16px}.report{padding:20px}.report h2{font-size:21px}.reportname{font-size:26px}.reportdate{font-size:17px}.score strong{font-size:52px}.report-grid strong{font-size:15px}.report-grid div{padding:8px 10px}.report-actions button{flex:1;font-size:14px;padding:11px 9px}.historyrow{align-items:flex-start}.historyrow button{font-size:14px;white-space:nowrap;padding:10px}.namegate{padding:23px;margin:8px auto}.settings form{flex-wrap:wrap}.report-top .badge{font-size:12px}.hist-stat .stat span{font-size:14px}.source-mini{overflow-wrap:anywhere}.filters select{flex:1}.card .badge{font-size:12px}.cardgrid.single{grid-template-columns:1fr}.report-instructions p{margin-bottom:10px}}@media(prefers-reduced-motion:no-preference){.card:hover,.learn-tile:hover{transform:translateY(-2px);transition:transform .15s}}@media print{header,aside,.mobile-nav,.report-actions,.report-instructions{display:none}.app{display:block}main{padding:0}.report{box-shadow:none}}

.language-switch{display:inline-flex;align-items:center;gap:3px;padding:3px;border:1px solid var(--line);border-radius:10px;background:#edf4f6;flex-shrink:0}.language-switch button{padding:8px 11px;font-size:14px;min-height:40px;border:0;background:transparent;color:var(--navy);line-height:1.3}.language-switch button.active{background:var(--navy);color:white}.header-right{flex-wrap:wrap}html[lang="vi"] .navlabel{line-height:1.5}html[lang="vi"] .report-top{flex-wrap:wrap;gap:10px}html[lang="vi"] .report-top .badge{white-space:normal}html[lang="vi"] .stat span{font-size:14px}html[lang="vi"] .stat strong small{font-size:14px}html[lang="vi"] .welcome-stat .bar{max-width:100%}.report-grid span{overflow-wrap:anywhere}.settings .language-switch{margin-bottom:10px}
@media(max-width:760px){header{height:auto;min-height:88px;padding:10px 12px;gap:8px;flex-wrap:wrap}.header-right{margin-left:auto}.language-switch button{padding:7px 9px}.brand{font-size:16px}.brandmark{width:32px;height:32px}.brand small{font-size:12px}html[lang="vi"] .stat strong{font-size:22px}html[lang="vi"] .stat strong small{display:block}html[lang="vi"] .report-grid{grid-template-columns:1fr 1fr}.pagehead h1{overflow-wrap:anywhere}}
@media(max-width:380px){.header-right{width:100%;justify-content:space-between}.welcome-stat{flex-wrap:wrap;gap:12px}.report-top{flex-wrap:wrap}.brand{font-size:17px}}
