/* ===== <style id="resource-style">  (orig line 144) ===== */
.resource-area{margin-top:10px}
.resource-btn{background:#fff !important;color:#111 !important;border:1px solid #145A32 !important}
.resource-btn.active{background:#145A32 !important;color:#fff !important;border-color:#145A32 !important}

/* ===== <style id="resource-catalog-style">  (orig line 150) ===== */
.resource-page{background:#fff;border-radius:18px;padding:26px;box-shadow:0 5px 20px #0000000d}
.resource-header{text-align:center;margin-bottom:22px}
.resource-header h2{margin:0;color:#145A32;font-size:30px}
.resource-header p{margin:8px 0 0;color:#111;line-height:1.5}
.product-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.product-card{border:1px solid #dfe7e2;border-radius:15px;padding:20px;background:#fff;position:relative}
.product-name{font-size:17px;font-weight:700;color:#111;line-height:1.45}
.product-desc{font-size:14px;color:#111;margin-top:7px;line-height:1.4}
.product-desc p{margin:0 0 8px}
.product-desc ul{margin:0 0 8px;padding-left:20px}
.product-desc li{margin-bottom:3px}
.product-desc strong{font-weight:700}
.product-desc > :last-child{margin-bottom:0}
.product-card{display:flex;flex-direction:column}
.product-card .product-btn{margin-top:auto}
.price{font-size:21px;font-weight:800;color:#145A32;margin:12px 0}
.product-btn{width:100%;background:#145A32;color:#fff;border:1px solid #145A32;border-radius:9px;padding:10px 12px;font-weight:700;cursor:pointer}
@media(max-width:700px){.product-list{grid-template-columns:1fr}}

/* ===== <style id="cart-payment-style">  (orig line 197) ===== */
.cart-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid #dfe7e2;border-radius:12px;padding:12px 14px;margin-bottom:15px;color:#111}
.cart-bar .product-btn{width:auto;margin:0;padding:9px 18px}
.product-btn:disabled{opacity:.45;cursor:not-allowed}
.order-list{border:1px solid #dfe7e2;border-radius:14px;overflow:hidden}
.order-row{display:flex;justify-content:space-between;gap:15px;padding:14px;border-bottom:1px solid #e8ece9;color:#111}
.order-row:last-child{border-bottom:0}
.order-total{font-size:22px;font-weight:800;color:#145A32;text-align:right;margin:18px 0}

/* ===== <style id="cart-bottom-style">  (orig line 215) ===== */
.cart-bar{justify-content:space-between}
.cart-bottom{margin-top:18px;padding-top:16px;border-top:1px solid #dfe7e2;text-align:center}
.cart-total{font-size:17px;color:#111;margin-bottom:12px}

/* ===== <style id="resource-only-active">  (orig line 222) ===== */
#resourceBtn.active{
  background:#145A32 !important;
  color:#fff !important;
  border-color:#145A32 !important;
}

/* ===== <style id="resource-state-definitive">  (orig line 230) ===== */
#resourceBtn {
    background:#fff !important;
    color:#111 !important;
    border:1px solid #145A32 !important;
  }
  #resourceBtn.active {
    background:#145A32 !important;
    color:#fff !important;
    border-color:#145A32 !important;
  }
  body.resource-open .tabs button,
  body.resource-open .mode-btn,
  body.resource-open .controls select {
    background:#fff !important;
    color:#111 !important;
    border-color:#d0d8d3 !important;
  }
  body.resource-open #resourceBtn.active {
    background:#145A32 !important;
    color:#fff !important;
    border-color:#145A32 !important;
  }

/* ===== <style id="resource-only-study-buttons">  (orig line 254) ===== */
body.resource-open #flashBtn,
body.resource-open #quizBtn,
body.resource-open #flashBtn.active,
body.resource-open #quizBtn.active{
  background:#fff !important;
  color:#111 !important;
  border-color:#d8dee9 !important;
}
body.resource-open #resourceBtn,
body.resource-open #resourceBtn.active{
  background:#145A32 !important;
  color:#fff !important;
  border-color:#145A32 !important;
}

/* ===== <style id="header-layout-v27">  (orig line 271) ===== */
.tabs{margin-bottom:6px !important}
.controls{margin-top:0 !important}
.resource-area{margin-top:8px !important}

/* ===== <style id="hsk-border-match">  (orig line 277) ===== */
.tabs button{
  border:1px solid #145A32 !important;
  border-radius:10px !important;
  background:#fff !important;
  color:#111 !important;
}
.tabs button.active{
  border:1px solid #145A32 !important;
  background:#145A32 !important;
  color:#fff !important;
}

/* ===== <style id="lesson-border-match">  (orig line 291) ===== */
.controls select#lesson{
  border:1px solid #145A32 !important;
  border-radius:10px !important;
  background:#fff !important;
  color:#111 !important;
}

/* ===== <style id="chinese-exam-font">  (orig line 359) ===== */
/* Font tiếng Trung mô phỏng kiểu chữ đề thi HSK: nét chữ serif, cân đối và dễ đọc. */
.word,
.chinese,
.chinese-text{
  
  font-weight:400 !important;
  letter-spacing:0 !important;
}

/* ===== <style id="free-label-v40">  (orig line 378) ===== */
.price{font-weight:800}

/* ===== <style id="css-triangle-dropdown-arrow-v70">  (orig line 631) ===== */
.lesson-select-wrap{
  position:relative;
  width:100%;
  min-width:0;
}
.lesson-select-wrap select#lesson{
  width:100% !important;
  padding-right:40px !important;
  appearance:none !important;
  -webkit-appearance:none !important;
  -moz-appearance:none !important;
  background:#fff !important;
  cursor:pointer;
}

/* ===== <style id="dropdown-arrow-rotate-v71">  (orig line 648) ===== */


/* ===== <style id="dropdown-panel-rounded-v72">  (orig line 651) ===== */
.lesson-select-wrap{
  border-radius:10px !important;
}
.lesson-select-wrap select#lesson{
  border-radius:10px !important;
}
.lesson-select-wrap select#lesson:focus{
  border-radius:10px !important;
  outline:none;
}

/* ===== <style id="custom-lesson-dropdown-v73">  (orig line 664) ===== */
.lesson-select-wrap{
  position:relative;
  width:100%;
  min-width:0;
}
.lesson-select-wrap select#lesson{
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  opacity:0 !important;
  pointer-events:none !important;
}
.lesson-toggle{
  width:100%;
  height:44px !important;
  min-height:44px !important;
  padding:10px 40px 10px 14px !important;
  border:1px solid #145A32 !important;
  border-radius:10px !important;
  background:#fff !important;
  color:#111 !important;
  text-align:left;
  position:relative;
  font:inherit;
}
.lesson-toggle::after{
  content:"";
  position:absolute;
  right:16px;
  top:50%;
  width:0;
  height:0;
  border-left:6px solid transparent;
  border-right:6px solid transparent;
  border-top:7px solid #145A32;
  transform:translateY(-35%) rotate(0deg);
  transition:transform .18s ease;
  pointer-events:none;
}
.lesson-toggle.open::after{
  transform:translateY(-35%) rotate(180deg);
}
.lesson-menu{
  display:none;
  position:absolute;
  left:0;
  right:0;
  top:calc(100% + 6px);
  z-index:50;
  background:#fff;
  border:1px solid #145A32;
  border-radius:10px;
  padding:6px;
  box-shadow:0 8px 22px rgba(0,0,0,.10);
  overflow:hidden;
}
.lesson-menu.open{display:block}
.lesson-option{
  width:100%;
  display:block;
  border:0 !important;
  border-radius:8px !important;
  background:#fff !important;
  color:#111 !important;
  text-align:left;
  padding:10px 12px;
  font:inherit;
  cursor:pointer;
}
.lesson-option:hover,
.lesson-option.selected{
  background:#eef7f0 !important;
  color:#145A32 !important;
}
.lesson-option:focus{
  outline:2px solid #145A32;
  outline-offset:-2px;
}

/* ===== <style id="donate-footer-style">  (orig line 1593) ===== */
.donate-link{color:inherit;text-decoration:none;cursor:pointer}
.donate-modal{display:none;position:fixed;inset:0;z-index:9999;align-items:center;justify-content:center}
.donate-modal.open{display:flex}
.donate-modal-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.45)}
.donate-modal-box{position:relative;z-index:1;width:min(420px,calc(100vw - 32px));max-height:90vh;overflow:auto;background:#fff;border-radius:16px;padding:22px;text-align:center;box-shadow:0 12px 40px rgba(0,0,0,.2)}
.donate-title{color:#145A32;font-size:18px;font-weight:700;margin-bottom:14px}
.donate-qr{display:block;width:100%;max-width:360px;height:auto;margin:0 auto;border:1px solid #e0e5e2;border-radius:10px;background:#fff}
.donate-close{position:absolute;top:7px;right:10px;width:32px;height:32px;padding:0;border:0;background:transparent;font-size:27px;line-height:32px;color:#555}

/* ===== <style id="typing-mode-style">  (orig line 1734) ===== */
.typing-card{min-height:430px}
.typing-word{font-family:'Nunito',Arial,sans-serif !important;font-size:28px;font-weight:700;line-height:1.5;color:#111;margin:25px 0 10px}
.typing-meaning{font-size:17px;line-height:1.6;margin:16px auto 22px;max-width:650px}
.typing-input.typing-input{
  display:block;width:min(560px,100%);margin:0 auto;padding:13px 15px;
  border:1px solid #145A32;border-radius:10px;background:#fff;color:#111;
  font-family:"HuiChineseKaiTi",'SimSun','宋体','NSimSun',serif !important;font-size:24px;line-height:1.4;text-align:center;outline:none;
}
.typing-input.typing-input::placeholder{
  font-family:'Nunito','Roboto','Noto Sans',Arial,sans-serif !important;
  font-size:18px;
  font-weight:600;
  color:#6f7d74;
}
.typing-input:focus{box-shadow:0 0 0 2px #eef7f0}
.typing-input.correct{border:2px solid #145A32}
.typing-input.wrong{border-color:#b94a48}
.typing-feedback{height:38px;min-height:38px;margin-top:14px;font-size:15px;line-height:1.5;display:flex;align-items:center;justify-content:center}
.typing-feedback.correct{color:#145A32;font-weight:700}
.typing-feedback.show-answer{font-family:'Nunito',sans-serif !important;color:#111}
.typing-feedback.show-answer strong{font-family:"HuiChineseKaiTi",'SimSun','宋体','NSimSun',serif !important;font-size:26px;font-weight:400;color:#145A32}
/* Bố cục giống .flash-nav-actions (Flashcard): lưới 2 cột, nút chính
   (Kiểm tra) chiếm trọn hàng trên, 2 nút phụ nằm cạnh nhau hàng dưới —
   thay vì xếp chồng cả 3 nút full-width như trước. */
.typing-actions.typing-actions{
  margin-top:18px;
  display:grid !important;
  grid-template-columns:1fr 1fr !important;
  gap:9px !important;
  max-width:520px !important;
  margin-left:auto !important;
  margin-right:auto !important;
}
.typing-actions.typing-actions button{
  width:100% !important;
  box-sizing:border-box !important;
}
#typingCheckBtn{
  grid-column:1 / -1 !important;
}
#typingNextBtn{
  grid-column:1 / -1 !important;
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
}
#typingBtn{border:1px solid #145A32 !important}

.speaking-card .flash-nav-actions #speakingPinyinBtn,
.speaking-card .flash-nav-actions #speakingHanBtn{
  grid-column:auto !important;
}

.speaking-card .speaking-extra{
  display:block !important;
  height:auto !important;
  min-height:0 !important;
  max-height:none !important;
  margin:10px 0 0 !important;
  overflow:visible !important;
  visibility:visible !important;
  text-align:center !important;
}

.speaking-card .speaking-extra[hidden]{
  display:none !important;
}

.speaking-card .speaking-vi{
  font-size:14px !important;
  line-height:22px !important;
  margin:25px auto 6px !important;
  max-width:680px !important;
  font-family:'Nunito',Arial,sans-serif !important;
  font-weight:400 !important;
}

.speaking-card .speaking-pinyin{
  font-size:14px !important;
  line-height:22px !important;
  margin-top:14px !important;
  font-family:'Nunito',Arial,sans-serif !important;
  font-weight:400 !important;
}

.speaking-card .speaking-han{
  font-size:24px !important;
  line-height:1.4 !important;
  margin-top:16px !important;
  font-weight:400 !important;
}

@media (max-width:600px){
  .speaking-card .speaking-vi{
    font-size:14px !important;
    line-height:22px !important;
  }

  .speaking-card .speaking-pinyin{ font-size:14px !important; line-height:22px !important; }

  .speaking-card .speaking-han{ font-size:24px !important; }
}

/* ===== <style id="huichinese-footer-style">  (orig line 3906) ===== */
.huichinese-footer{
  margin:24px auto 0;
  padding:14px 16px;
  text-align:center;
  color:#111;
  background:transparent;
  border-top:1px solid #dfe7e2;
  font-size:13px;
  line-height:1.6;
}
.huichinese-footer strong{color:#145A32;font-size:14px}
.huichinese-footer sup{font-size:.75em;line-height:0}
.huichinese-footer a{
  color:#145A32;
  font-weight:700;
  text-decoration:underline;
  text-underline-offset:2px;
}
.huichinese-footer a:hover,
.huichinese-footer a:focus-visible{color:#0f3d22}

