/* Panda AI Tutor V45 — Atelier system extension
   Does not override global product rules; all controls reuse HSK Panda tokens. */
.panda-ai-root{
 --ai-ink:var(--atelier-ink,#1b302b);
 --ai-jade:var(--atelier-jade,#146c58);
 --ai-line:var(--atelier-line,#dce9df);
 --ai-muted:var(--atelier-muted,#526a60);
 color:var(--ai-ink);
 display:flex;flex-direction:column;gap:17px;
}
.panda-ai-root .ai-hero{
 position:relative;display:grid;
 grid-template-columns:minmax(0,1.22fr) minmax(250px,.78fr);
 min-height:276px;overflow:hidden;
 background:linear-gradient(115deg,#fffefa 0%,#fffefa 45%,#eaf5eb 100%);
 border:1px solid #dbe8de;border-radius:22px;
 box-shadow:0 10px 28px rgba(28,70,43,.045);
}
.panda-ai-root .ai-hero-copy{
 min-width:0;padding:34px 38px;display:flex;flex-direction:column;
 justify-content:center;align-items:flex-start;gap:0;
}
.panda-ai-root .ai-eyebrow{
 display:inline-flex;align-items:center;gap:8px;
 color:#2b7759;font-size:10px;letter-spacing:1.1px;
 font-weight:800;line-height:1.5;
}
.panda-ai-root .ai-eyebrow .icon{
 width:16px;height:16px;flex:0 0 16px;
}
.panda-ai-root .ai-hero h1{
 font-size:clamp(29px,3.1vw,42px);
 letter-spacing:-1.3px;line-height:1.25;color:#1b382a;
 font-weight:800;margin:13px 0 12px;
}
.panda-ai-root .ai-hero h1 span{color:#167458}
.panda-ai-root .ai-hero p{
 max-width:630px;color:#526d5b;
 font-size:12.6px;line-height:1.9;margin:0;
}
.panda-ai-root .ai-hero-facts{
 display:flex;align-items:center;flex-wrap:wrap;gap:9px;margin-top:18px;
}
.panda-ai-root .ai-hero-facts span{
 padding:6px 10px;border:1px solid #d6e8da;border-radius:9px;
 background:#f5f9f2;color:#2a654a;
 font-size:10.5px;font-weight:700;
}
.panda-ai-root .ai-hero-mark{
 display:flex;align-items:center;justify-content:center;overflow:hidden;
 background:radial-gradient(ellipse at center,#d8eddc 0%,transparent 66%);
}
.panda-ai-root .ai-hero-mark img{
 width:100%;height:auto;max-height:285px;object-fit:contain;display:block;
}
.panda-ai-root .ai-summary{
 display:grid;grid-template-columns:1fr 1fr 1.55fr;
 gap:12px;margin:0;
}
.panda-ai-root .ai-summary>div{
 display:flex;flex-direction:column;gap:5px;
 padding:16px 19px;background:#fffefa;
 border:1px solid #e0e9df;border-radius:14px;
 box-shadow:0 2px 8px rgba(31,62,40,.025);min-width:0;
}
.panda-ai-root .ai-summary span{
 font-size:9.5px;font-weight:800;letter-spacing:.75px;color:#54705b;
}
.panda-ai-root .ai-summary strong{
 color:#244c35;font-size:15px;font-weight:800;letter-spacing:-.2px;
 overflow-wrap:anywhere;
}
.panda-ai-root .ai-layout{
 display:grid;grid-template-columns:minmax(0,1.52fr) minmax(300px,.84fr);
 gap:16px;align-items:start;
}
.panda-ai-root .ai-workspace{
 min-width:0;min-height:525px;padding:25px 27px 28px;
}
.panda-ai-root .ai-section-head{
 display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;
 margin-bottom:23px;
}
.panda-ai-root .ai-section-head h2{
 font-size:19px;font-weight:800;color:#1f4936;
 letter-spacing:-.5px;margin:5px 0 0;
}
.panda-ai-root .ai-badge{
 border:1px solid #d7e9da;background:#e9f5eb;
 color:#26674d;border-radius:9px;font-size:9px;
 font-weight:800;letter-spacing:.5px;padding:7px 10px;white-space:nowrap;
}
.panda-ai-root .ai-tabs{
 display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
 gap:8px;padding:5px;margin:0 0 21px;
 background:#f0f5ee;border:1px solid #dfeadf;border-radius:12px;
}
.panda-ai-root .ai-tabs button{
 border:1px solid transparent;border-radius:9px;
 min-height:41px;padding:9px 12px;
 text-align:center;font-size:11px;font-weight:800;
 color:#4e7157;background:transparent;
 cursor:pointer;transition:background-color .13s ease,border-color .13s ease;
}
.panda-ai-root .ai-tabs button:hover{background:#e6f0e5}
.panda-ai-root .ai-tabs button.active,
.panda-ai-root .ai-tabs button[aria-selected="true"]{
 background:#fffefa;border-color:#d9e6d9;
 color:#165840;box-shadow:0 2px 4px rgba(23,60,34,.035);
}
.panda-ai-root .ai-pane{display:flex;flex-direction:column;gap:11px}
.panda-ai-root .ai-label{
 color:#294e39;font-size:12px;line-height:1.7;font-weight:750;
}
.panda-ai-root .ai-textarea,.panda-ai-root .ai-input{
 display:block;width:100%;min-width:0;
 border:1px solid #d2e2d5;background:#fff;
 border-radius:12px;padding:14px 16px;outline:0;
 color:#234632;font:600 14px/1.8 "Noto Sans SC","Be Vietnam Pro",sans-serif;
 transition:border-color .13s ease,box-shadow .13s ease;
}
.panda-ai-root .ai-textarea{
 min-height:158px;resize:vertical;max-height:340px;
}
.panda-ai-root .ai-textarea::placeholder,.panda-ai-root .ai-input::placeholder{
 color:#657a69;opacity:1;font-weight:500;
}
.panda-ai-root .ai-textarea:focus,.panda-ai-root .ai-input:focus{
 border-color:#539b78;box-shadow:0 0 0 3px rgba(30,116,71,.12);
}
.panda-ai-root .ai-input-footer{
 display:flex;align-items:center;justify-content:space-between;
 gap:10px;flex-wrap:wrap;
 color:#526b58;font-size:10px;margin-top:-4px;
}
.panda-ai-root .ai-actions,
.panda-ai-root .ai-word-row{
 display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:5px 0 2px;
}
.panda-ai-root .ai-actions .btn{min-height:43px}
.panda-ai-root .ai-word-row .ai-input{flex:1;min-width:210px;min-height:44px}
.panda-ai-root .ai-word-row .btn{min-height:44px}
.panda-ai-root .ai-help{
 color:#526a5a;font-size:11px;line-height:1.8;margin:6px 0 0;
}
.panda-ai-root .ai-output{margin-top:9px}
.panda-ai-root .ai-result{
 padding:21px 22px;background:#f9fcf7;
 border:1px solid #dce8db;border-radius:15px;
 color:#2d4e3b;overflow-wrap:anywhere;
}
.panda-ai-root .ai-result-kicker{
 font-size:9.5px;color:#2c7755;letter-spacing:.8px;
 font-weight:800;line-height:1.5;
}
.panda-ai-root .ai-result h3{
 color:#214b35;font-size:17px;line-height:1.4;margin:8px 0 10px;
}
.panda-ai-root .ai-result p{
 color:#526a59;font-size:11.5px;line-height:1.9;margin:9px 0;
}
.panda-ai-root .ai-dictionary{
 display:flex;flex-direction:column;gap:0;
 margin:12px 0;border:1px solid #e2eae0;border-radius:12px;overflow:hidden;
 background:#fff;
}
.panda-ai-root .ai-dict-row{
 display:grid;grid-template-columns:minmax(66px,.65fr) minmax(85px,.9fr) minmax(100px,1.6fr) minmax(62px,.6fr);
 align-items:center;gap:10px;padding:12px 14px;
 border-bottom:1px solid #e8eee7;line-height:1.55;
}
.panda-ai-root .ai-dict-row:last-child{border-bottom:0}
.panda-ai-root .ai-dict-row strong{font:650 17px/1.4 "Noto Sans SC",sans-serif;color:#184b36}
.panda-ai-root .ai-dict-row span{font-size:11px;color:#3b6048;overflow-wrap:anywhere}
.panda-ai-root .ai-dict-row small{color:#53745c;font-size:9.5px;font-weight:750}
.panda-ai-root .ai-alert{
 padding:12px 15px;margin:0;
 background:#fff8ec;border:1px solid #eadabb;border-radius:11px;
 color:#785128;font-size:11.5px;line-height:1.8;
}
.panda-ai-root .ai-alert.ok{background:#eef8f0;border-color:#cde5d3;color:#1e6643}
.panda-ai-root .ai-model-output{
 white-space:pre-wrap;overflow-wrap:anywhere;
 font:500 12.5px/1.9 "Be Vietnam Pro",sans-serif;
 color:#233e31;padding:7px 0;
}
.panda-ai-root .ai-aside{display:flex;flex-direction:column;gap:15px;min-width:0}
.panda-ai-root .ai-model-card,.panda-ai-root .ai-info-card{padding:24px}
.panda-ai-root .ai-model-symbol{
 width:42px;height:42px;display:grid;place-items:center;
 border:1px solid #d8eadf;border-radius:13px;background:#e7f4e9;
 color:#216748;margin-bottom:17px;
}
.panda-ai-root .ai-model-symbol .icon{width:23px;height:23px}
.panda-ai-root .ai-model-card h2{
 margin:6px 0 11px;color:#1d4433;font-size:18px;
 line-height:1.45;letter-spacing:-.25px;
}
.panda-ai-root .ai-model-card p{
 color:#516a58;font-size:11.5px;line-height:1.85;
}
.panda-ai-root .ai-runtime{
 padding:12px 13px;background:#f2f7f0;border:1px solid #dce9dd;
 border-radius:11px;font-size:11px;line-height:1.75;
 color:#365b46;margin:16px 0 13px;overflow-wrap:anywhere;
}
.panda-ai-root .ai-runtime[data-state="ready"]{
 color:#185b3d;background:#e6f5e9;border-color:#bbe1c8;
}
.panda-ai-root .ai-runtime[data-state="loading"]{
 color:#72592f;background:#faf5e9;border-color:#eadbbf;
}
.panda-ai-root .ai-model-buttons{display:flex;flex-direction:column;gap:9px}
.panda-ai-root .ai-model-buttons .btn{width:100%;min-height:44px;white-space:normal;justify-content:space-between;text-align:left}
.panda-ai-root .ai-model-buttons .btn .icon{flex:0 0 16px}
.panda-ai-root .ai-model-card .ai-smallprint{
 font-size:10px;line-height:1.85;margin:15px 0 0;color:#5f735f;
}
.panda-ai-root .ai-info-card{
 border-color:#e9e3d4;background:#fbf8f1;
}
.panda-ai-root .ai-info-card h3{
 margin:0 0 16px;color:#6a5230;font-size:14px;
}
.panda-ai-root .ai-info-card p{
 margin:0 0 13px;padding:0 0 13px;
 border-bottom:1px solid #eee6d8;font-size:11px;
 line-height:1.85;color:#5e594d;
}
.panda-ai-root .ai-info-card p:last-child{margin:0;padding:0;border:0}
.panda-ai-root .ai-info-card b{color:#725b3d}
.panda-ai-root .ai-quiz-header{
 display:flex;flex-direction:column;gap:7px;margin:4px 0 14px;
}
.panda-ai-root .ai-quiz-header h3{
 font-size:16px;color:#1d4834;margin:0;
}
.panda-ai-root .ai-quiz-header p{
 font-size:11.5px;color:#4e6c56;line-height:1.85;margin:0;
}
.panda-ai-root .ai-question{
 background:#f9fcf7;border:1px solid #e0ebdf;
 padding:22px;border-radius:15px;
}
.panda-ai-root .ai-question h3{
 margin:11px 0 3px;font:650 42px/1.3 "Noto Sans SC",sans-serif;
 color:#1e4e38;
}
.panda-ai-root .ai-question>p{color:#3c7552;font-size:12px;margin:5px 0 20px}
.panda-ai-root .ai-question>strong{
 display:block;color:#294d39;font-size:12px;margin-bottom:12px;
}
.panda-ai-root .ai-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-bottom:15px}
.panda-ai-root .ai-option{
 padding:13px;min-height:53px;text-align:left;
 border:1px solid #dae7d9;background:#fff;
 border-radius:11px;color:#355740;
 font-size:11.5px;font-weight:700;line-height:1.7;cursor:pointer;
}
.panda-ai-root .ai-option:hover:not(:disabled){background:#edf7ef;border-color:#bcdcc5}
.panda-ai-root .ai-option.right{background:#e5f6e9;border-color:#78b791;color:#1f6b45}
.panda-ai-root .ai-option.wrong{background:#fff1ec;border-color:#e0a597;color:#90473c}
.panda-ai-root .ai-option:disabled{cursor:default;opacity:1}
.panda-ai-root .ai-result-inline{
 background:#eff7ef;border-radius:10px;padding:12px;
 color:#275a3e;font-size:11.5px;margin-bottom:13px;
}
.panda-ai-root .ai-question>.btn{margin-top:3px}
.panda-ai-root .ai-model-buttons .btn:disabled,
.panda-ai-root .ai-actions .btn:disabled{opacity:.5;cursor:wait}
@media(max-width:1180px){
 .panda-ai-root .ai-layout{grid-template-columns:1fr}
 .panda-ai-root .ai-aside{display:grid;grid-template-columns:1fr 1fr;align-items:start}
 .panda-ai-root .ai-hero{grid-template-columns:minmax(0,1.15fr) minmax(190px,.85fr)}
 .panda-ai-root .ai-hero-copy{padding:29px}
 .panda-ai-root .ai-hero h1{font-size:32px}
}
@media(max-width:800px){
 .panda-ai-root .ai-aside{grid-template-columns:1fr}
 .panda-ai-root .ai-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
 .panda-ai-root .ai-summary>div:last-child{grid-column:1/-1}
 .panda-ai-root .ai-hero{grid-template-columns:minmax(0,1.25fr) minmax(160px,.7fr)}
 .panda-ai-root .ai-hero-mark img{max-height:230px}
}
@media(max-width:680px){
 .panda-ai-root{gap:13px}
 .panda-ai-root .ai-hero{grid-template-columns:1fr;border-radius:18px}
 .panda-ai-root .ai-hero-copy{padding:23px 20px 5px}
 .panda-ai-root .ai-hero h1{font-size:30px}
 .panda-ai-root .ai-hero p{font-size:12px}
 .panda-ai-root .ai-hero-facts{gap:6px}
 .panda-ai-root .ai-hero-facts span{font-size:9px;padding:5px 7px}
 .panda-ai-root .ai-hero-mark{height:137px;overflow:hidden}
 .panda-ai-root .ai-hero-mark img{height:173px;width:auto;max-width:100%;transform:translateY(8px)}
 .panda-ai-root .ai-summary{gap:9px}
 .panda-ai-root .ai-summary>div{padding:13px 12px}
 .panda-ai-root .ai-summary strong{font-size:13px}
 .panda-ai-root .ai-summary span{font-size:8.5px}
 .panda-ai-root .ai-layout{gap:13px}
 .panda-ai-root .ai-workspace,.panda-ai-root .ai-model-card,.panda-ai-root .ai-info-card{padding:18px}
 .panda-ai-root .ai-section-head{margin-bottom:16px}
 .panda-ai-root .ai-section-head h2{font-size:17px}
 .panda-ai-root .ai-tabs{gap:4px;padding:4px}
 .panda-ai-root .ai-tabs button{padding:7px 4px;min-height:40px;font-size:10px}
 .panda-ai-root .ai-textarea{min-height:130px}
 .panda-ai-root .ai-word-row{flex-direction:column;align-items:stretch}
 .panda-ai-root .ai-word-row .ai-input{min-width:0}
 .panda-ai-root .ai-actions{flex-direction:column;align-items:stretch}
 .panda-ai-root .ai-actions .btn{width:100%}
 .panda-ai-root .ai-dict-row{grid-template-columns:minmax(50px,.7fr) minmax(72px,1fr) minmax(75px,1.5fr);gap:7px;padding:10px}
 .panda-ai-root .ai-dict-row small{grid-column:1/-1}
 .panda-ai-root .ai-options{grid-template-columns:1fr}
 .panda-ai-root .ai-result{padding:17px}
}
@media(max-width:360px){
 .panda-ai-root .ai-hero h1{font-size:27px}
 .panda-ai-root .ai-badge{display:none}
 .panda-ai-root .ai-tabs button{font-size:9.5px}
 .panda-ai-root .ai-input-footer{font-size:9.5px}
}
@media(prefers-reduced-motion:reduce){
 .panda-ai-root :is(button,input,textarea){transition:none!important}
}
