@font-face { font-family: 'HSK Sans'; font-style: normal; font-weight: 400 800; font-display: swap; src: url('./vendor/fonts/inter-latin.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'HSK Sans'; font-style: normal; font-weight: 400 800; font-display: swap; src: url('./vendor/fonts/inter-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'HSK Sans'; font-style: normal; font-weight: 400 800; font-display: swap; src: url('./vendor/fonts/inter-vietnamese.woff2') format('woff2'); unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
/* ============================================================================
   HSK Flashcards — Lớp thiết kế mới (visual layer only)
   Không đổi nội dung / cấu trúc / logic. Chỉ thay lớp trình bày.
   Load sau toàn bộ CSS cũ nên các rule dưới đây được ưu tiên.
   ========================================================================= */

/* ---------------------------------------------------------------- 1. TOKENS */

/* ------------------------------------------------------------------ 2. BASE */
html{ -webkit-text-size-adjust:100%; }

body.studio-enabled{
  background:
    radial-gradient(1200px 620px at 8% -8%, var(--rd-static-color-001) 0%, var(--rd-static-color-002) 62%),
    radial-gradient(900px 520px at 100% 0%, var(--rd-static-color-003) 0%, var(--rd-static-color-004) 55%),
    var(--rd-canvas);
  background-attachment:fixed;
  color:var(--rd-ink-2);
  font-family:"HSK Sans","SF Pro Text",-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;
  font-size:14.5px;
  line-height:1.62;
  letter-spacing:-.006em;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
html[data-theme="dark"] body.studio-enabled{
  background:
    radial-gradient(1100px 600px at 6% -10%, var(--rd-static-color-005) 0%, var(--rd-static-color-006) 60%),
    radial-gradient(900px 520px at 100% 0%, var(--rd-static-color-007) 0%, var(--rd-static-color-008) 55%),
    var(--rd-canvas);
}

body.studio-enabled ::selection{ background:var(--rd-static-color-009); }

body.studio-enabled :is(h1,h2,h3,h4){
  color:var(--rd-ink);
  letter-spacing:-.028em;
  font-weight:700;
  line-height:1.28;
}
body.studio-enabled h2{ font-size:23px; letter-spacing:-.035em; font-weight:750; }
body.studio-enabled h3{ font-size:15.5px; }
body.studio-enabled p{ line-height:1.62; }

body.studio-enabled .hint{
  color:var(--rd-muted);
  font-size:12.5px;
  line-height:1.6;
}

body.studio-enabled :is(a){ color:var(--rd-brand); text-underline-offset:3px; }

/* Focus: một kiểu duy nhất, dễ thấy, không nhảy layout */
body.studio-enabled :is(button,a,input,select,textarea,summary,[tabindex]):focus-visible{
  outline:2px solid var(--rd-brand) !important;
  outline-offset:2px !important;
  border-radius:var(--rd-r-sm);
}

/* ------------------------------------------------------------- 3. APP SHELL */
body.studio-enabled .app-shell{
  background:var(--rd-static-color-010);
  min-height:100vh;
}

/* Sidebar */
body.studio-enabled .sidebar{
  width:264px;
  padding:22px 14px 18px;
  background:var(--rd-static-color-011);
  backdrop-filter:saturate(160%) blur(18px);
  -webkit-backdrop-filter:saturate(160%) blur(18px);
  border-right:1px solid var(--rd-static-color-012);
  box-shadow:var(--shadow-rd-001);
}
html[data-theme="dark"] body.studio-enabled .sidebar{
  background:var(--rd-static-color-014);
  border-right-color:var(--rd-static-color-015);
}

body.studio-enabled .brand-side{
  padding:4px 10px 26px;
  gap:11px;
}
body.studio-enabled .brand-mark{
  width:42px;height:42px;
  border-radius:var(--radius-rd-001);
  background:linear-gradient(150deg,var(--rd-static-color-016) 0%,var(--rd-static-color-017) 55%,var(--rd-static-color-018) 100%);
  box-shadow:var(--shadow-rd-002);
  font-size:21px;
  font-weight:600;
  color:var(--rd-static-color-021);
  letter-spacing:0;
}
body.studio-enabled .brand-text strong{
  font-size:15px;
  font-weight:700;
  letter-spacing:-.03em;
  color:var(--rd-ink);
}

body.studio-enabled .sidebar-label{
  padding:0 14px;
  margin:0 0 8px;
  font-size:11px;
  font-weight:750;
  letter-spacing:.13em;
  color:var(--rd-faint);
  text-transform:uppercase;
}

body.studio-enabled .side-nav{ gap:3px; }
body.studio-enabled .side-nav button{
  min-height:42px;
  padding:0 12px;
  border-radius:var(--radius-rd-002);
  gap:11px;
  font-size:13.5px;
  font-weight:550;
  letter-spacing:-.01em;
  color:var(--rd-muted);
  transition:background .16s ease, color .16s ease, transform .16s ease;
}
body.studio-enabled .side-nav button svg{ width:18px;height:18px;stroke-width:1.7; }
body.studio-enabled .side-nav button:hover{
  background:var(--rd-static-color-022);
  color:var(--rd-brand);
  transform:none;
}
body.studio-enabled .side-nav button.active{
  background:linear-gradient(180deg,var(--rd-static-color-023),var(--rd-static-color-024));
  color:var(--rd-static-color-021);
  font-weight:650;
  box-shadow:var(--shadow-rd-003);
}
body.studio-enabled .side-nav button.active svg{ color:var(--rd-static-color-021); }
body.studio-enabled .side-nav button.active span{ color:var(--rd-static-color-021); }

body.studio-enabled .side-divider{
  height:1px;
  background:var(--rd-line);
  margin:16px 12px;
}
body.studio-enabled .side-quick{ gap:1px; display:flex; flex-direction:column; }
body.studio-enabled .side-quick button{
  min-height:40px;
  padding:0 12px;
  border-radius:var(--radius-rd-003);
  gap:12px;
  font-size:13.5px;
  font-weight:550;
  color:var(--rd-muted);
}
body.studio-enabled .side-quick button svg{ width:18px;height:18px;color:var(--rd-faint); }
body.studio-enabled .side-quick button:hover{ background:var(--rd-static-color-027); color:var(--rd-ink); }
html[data-theme="dark"] body.studio-enabled .side-quick button:hover{ background:var(--rd-static-color-015); }

/* Topbar */
body.studio-enabled .topbar{
  height:72px;
  background:var(--rd-static-color-028);
  backdrop-filter:saturate(180%) blur(20px);
  -webkit-backdrop-filter:saturate(180%) blur(20px);
  border-bottom:1px solid var(--rd-static-color-029);
}
html[data-theme="dark"] body.studio-enabled .topbar{
  background:var(--rd-static-color-030);
  border-bottom-color:var(--rd-static-color-015);
}
body.studio-enabled .topbar-inner{
  width:min(100% - 56px,1300px);
  gap:16px;
}
body.studio-enabled .topbar-title small{
  font-size:9.5px;
  font-weight:700;
  letter-spacing:.11em;
  color:var(--rd-faint);
  text-transform:uppercase;
}
body.studio-enabled .topbar-title strong{
  font-size:16.5px;
  font-weight:700;
  letter-spacing:-.03em;
  color:var(--rd-ink);
}

body.studio-enabled .topbar-actions{ gap:8px; }

/* Nút tròn trên topbar */
body.studio-enabled .topbar-actions > button{
  width:38px;height:38px;min-height:38px;
  border-radius:var(--radius-rd-004) !important;
  border:1px solid var(--rd-line) !important;
  background:var(--rd-static-color-031) !important;
  color:var(--rd-ink-2) !important;
  box-shadow:var(--rd-shadow-xs) !important;
  display:inline-grid;place-items:center;
}
body.studio-enabled .topbar-actions > button:hover{
  background:var(--rd-static-color-021) !important;
  color:var(--rd-brand) !important;
  border-color:var(--rd-static-color-032) !important;
}
body.studio-enabled .topbar-actions > button svg{ width:18px;height:18px; }

body.studio-enabled .topbar-actions .level-pill{
  width:auto;height:38px;min-height:38px;
  padding:0 13px;
  border-radius:var(--radius-rd-004) !important;
  font-size:12.5px;font-weight:650;
  color:var(--rd-brand) !important;
  background:var(--rd-brand-soft) !important;
  border:1px solid var(--rd-static-color-033) !important;
}
body.studio-enabled .topbar-actions .avatar-button{
  width:38px;height:38px;
  border-radius:var(--radius-rd-005) !important;
  background:linear-gradient(150deg,var(--rd-static-color-034),var(--rd-static-color-035)) !important;
  color:var(--rd-static-color-021) !important;
  border:0 !important;
  box-shadow:var(--shadow-rd-004) !important;
}
body.studio-enabled #homeStreak{
  width:auto;height:38px;min-height:38px;
  padding:0 11px;gap:5px;
  border-radius:var(--radius-rd-004) !important;
  background:var(--rd-amber-soft) !important;
  border:1px solid var(--rd-static-color-037) !important;
  color:var(--rd-static-color-038) !important;
  font-size:12.5px;font-weight:700;
}

/* Workspace */
body.studio-enabled main.workspace{
  width:min(100% - 56px,1300px);
  padding:28px 0 96px;
}

/* --------------------------------------------------- 4. SURFACES & HEADINGS */
body.studio-enabled :is(.panel-box,.activity-panel,.hub-panel){
  background:var(--rd-surface);
  border:1px solid var(--rd-line);
  border-radius:var(--rd-r-xl);
  box-shadow:var(--rd-shadow-sm);
  padding:30px 32px;
  max-width:1120px;
}
body.studio-enabled .activity-panel > h2,
body.studio-enabled .activity-intro h2{
  font-size:24px;
  font-weight:750;
  letter-spacing:-.04em;
  color:var(--rd-ink);
  margin:0 0 6px;
}
body.studio-enabled .activity-panel > h2 + .hint{ margin-bottom:20px; }

body.studio-enabled .section-row{ margin-bottom:14px; }
body.studio-enabled .section-row h3{
  font-size:15px;
  font-weight:700;
  letter-spacing:-.025em;
  color:var(--rd-ink);
}
body.studio-enabled .section-row > button{
  font-size:12.5px !important;
  font-weight:600 !important;
  color:var(--rd-brand) !important;
  background:var(--rd-static-color-010) !important;
  border:0 !important;
  padding:4px 2px !important;
  min-height:0 !important;
  box-shadow:none !important;
}
body.studio-enabled .section-row > button:hover{ text-decoration:underline; }

/* Thanh tiến trình */
body.studio-enabled progress{
  appearance:none;-webkit-appearance:none;
  width:100%;height:8px;
  border:0;border-radius:var(--radius-rd-006);
  background:var(--rd-line-soft);
  overflow:hidden;
  color:var(--rd-brand);
}
body.studio-enabled progress::-webkit-progress-bar{
  background:var(--rd-line-soft);border-radius:var(--radius-rd-006);
}
body.studio-enabled progress::-webkit-progress-value{
  background:linear-gradient(90deg,var(--rd-static-color-039),var(--rd-static-color-035));
  border-radius:var(--radius-rd-006);
  transition:width .4s ease;
}
body.studio-enabled progress::-moz-progress-bar{
  background:linear-gradient(90deg,var(--rd-static-color-039),var(--rd-static-color-035));
  border-radius:var(--radius-rd-006);
}

/* -------------------------------------------------------------- 5. BUTTONS */
/* Hệ thống nút: primary (tím đặc) / secondary (trắng viền) / ghost */
html body.studio-enabled :is(
  .hero-button,
  .mobile-hero-cta,
  #next,
  #passivePlay,
  #srsStart,
  #srsReveal,
  #compareStart,
  #mistakeStart,
  #memoryLearnCurrent,
  #translationSubmit,
  #accountSubmit,
  #lessonChatSend,
  #planGoSetup,
  #quizForm button[type=submit],
  #searchForm button[type=submit],
  #planForm button[type=submit],
  #translationAskSubmit,
  #lessonSelectionForm button[type=submit]
):not(.correct):not(.wrong){
  background:linear-gradient(180deg,var(--rd-static-color-040) 0%,var(--rd-static-color-041) 100%) !important;
  color:var(--rd-static-color-021) !important;
  border:1px solid var(--rd-static-color-042) !important;
  border-radius:var(--radius-rd-002) !important;
  min-height:42px;
  padding:0 18px !important;
  font-size:13.5px !important;
  font-weight:650 !important;
  letter-spacing:-.01em;
  box-shadow:var(--shadow-rd-003) !important;
  transition:transform .14s ease, box-shadow .18s ease, filter .18s ease;
}
html body.studio-enabled :is(
  .hero-button,.mobile-hero-cta,#next,#passivePlay,#srsStart,#srsReveal,#compareStart,
  #mistakeStart,#memoryLearnCurrent,#translationSubmit,#accountSubmit,#lessonChatSend,#planGoSetup,
  #quizForm button[type=submit],#searchForm button[type=submit],#planForm button[type=submit],
  #translationAskSubmit,#lessonSelectionForm button[type=submit]
):not(.correct):not(.wrong):is(:hover,:focus-visible){
  background:linear-gradient(180deg,var(--rd-static-color-043) 0%,var(--rd-static-color-044) 100%) !important;
  color:var(--rd-static-color-021) !important;
  filter:none;
  transform:translateY(-1px);
  box-shadow:var(--shadow-rd-005) !important;
}
html body.studio-enabled :is(
  .hero-button,#next,#passivePlay,#srsStart,#srsReveal,#compareStart,#mistakeStart,
  #memoryLearnCurrent,#translationSubmit,#accountSubmit,#lessonChatSend,#planGoSetup,
  #quizForm button[type=submit],#searchForm button[type=submit],#planForm button[type=submit]
):not(.correct):not(.wrong):active{ transform:translateY(0) scale(.99); }
html body.studio-enabled :is(
  .hero-button,#next,#passivePlay,#srsStart,#srsReveal,#compareStart,#mistakeStart,
  #memoryLearnCurrent,#translationSubmit,#accountSubmit,#lessonChatSend,#planGoSetup,
  #quizForm button[type=submit],#searchForm button[type=submit],#planForm button[type=submit]
):disabled{
  background:var(--rd-static-color-047) !important;
  color:var(--rd-static-color-048) !important;
  border-color:var(--rd-static-color-049) !important;
  box-shadow:none !important;
  transform:none;
}
html[data-theme="dark"] body.studio-enabled :is(#translationSubmit,#accountSubmit,#quizForm button[type=submit],#searchForm button[type=submit]):disabled{
  background:var(--rd-static-color-050) !important;color:var(--rd-static-color-051) !important;border-color:var(--rd-static-color-052) !important;
}

/* Nút phụ: trắng, viền mảnh, chữ đậm vừa */
html body.studio-enabled :is(button:where(:not([data-ui-owned]):not(.ui-btn)),summary):not(.correct):not(.wrong){
  border-radius:var(--radius-rd-002);
}
html body.studio-enabled :is(
  #prev,#exampleBtn,#shuffle,#reset,#passivePause,#passiveStop,
  #wordConfusionOpen,#planReview,#planEdit,#planUndo,#planExtend,#planCatchup,
  #accountBackup,#accountRestore,#accountSync,#accountReset,#accountVerify,#accountLogout,
  #quizNext,#searchMore,#mistakeMore,#compareStart ~ button,#handwritingOpen,
  #ocrChoose,#ocrCamera,#ocrRead,#ocrFast,#updatePushEnable,#updatePushDisable,
  #pushEnable,#pushDisable,#adminRefresh,#offlineCheck
):not(.correct):not(.wrong){
  min-height:40px;
  padding:0 15px !important;
  font-size:13px !important;
  font-weight:600 !important;
  border-radius:var(--radius-rd-004) !important;
  border:1px solid var(--rd-line) !important;
  background:var(--rd-surface) !important;
  color:var(--rd-ink-2) !important;
  box-shadow:var(--rd-shadow-xs) !important;
}
html body.studio-enabled :is(#prev,#exampleBtn,#shuffle,#reset,#passivePause,#passiveStop,#wordConfusionOpen,#planReview,#planEdit,#accountBackup,#accountRestore,#accountSync,#accountReset,#accountVerify,#accountLogout,#quizNext,#searchMore,#mistakeMore,#handwritingOpen,#ocrChoose,#ocrCamera,#ocrRead,#ocrFast,#pushEnable,#pushDisable,#adminRefresh,#offlineCheck):not(.correct):not(.wrong):hover{
  border-color:var(--rd-static-color-053) !important;
  color:var(--rd-brand) !important;
  background:var(--rd-brand-tint) !important;
}

/* --------------------------------------------------------- 6. FORM CONTROLS */
html body.studio-enabled :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea){
  background:var(--rd-surface);
  border:1px solid var(--rd-line);
  border-radius:var(--radius-rd-004);
  min-height:42px;
  padding:9px 12px;
  font-size:14px;
  font-weight:500;
  color:var(--rd-ink);
  box-shadow:var(--rd-shadow-xs);
  transition:border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
html body.studio-enabled textarea{ line-height:1.6; padding:11px 13px; }
html body.studio-enabled select{
  padding-right:34px;
  background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236B6B88' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 12px center;
  appearance:none;-webkit-appearance:none;
}
html body.studio-enabled :is(input,select,textarea):hover{ border-color:var(--palette-line-strong); }
html body.studio-enabled :is(input,select,textarea):focus{
  outline:none !important;
  border-color:var(--rd-static-color-054);
  box-shadow:var(--rd-ring);
  background:var(--rd-surface);
}
html body.studio-enabled :is(input,textarea)::placeholder{ color:var(--rd-faint); font-weight:400; }

html body.studio-enabled :is(input[type=checkbox],input[type=radio]){
  width:18px;height:18px;
  border-radius:var(--radius-rd-007);
  accent-color:var(--rd-brand);
  cursor:pointer;
}

/* Nhãn + hàng field */
body.studio-enabled .field-row{
  gap:12px;
  margin:14px 0;
  align-items:flex-end;
}
body.studio-enabled .field-row > label,
body.studio-enabled .control-label{
  font-size:12px;
  font-weight:650;
  letter-spacing:.01em;
  color:var(--rd-muted);
  gap:6px;
}
body.studio-enabled .field-row > label > :is(input,select){ margin-top:0; }

/* ------------------------------------------------------- 7. DETAILS/SUMMARY */
body.studio-enabled summary{
  font-weight:600;
  color:var(--rd-ink);
  font-size:13.5px;
}
body.studio-enabled details:not([open]) > summary{ border-radius:var(--radius-rd-002); }
body.studio-enabled details > summary:hover{ background:var(--rd-static-color-055); }
html[data-theme="dark"] body.studio-enabled details > summary:hover{ background:var(--rd-static-color-056); }

/* ---------------------------------------------------------------- 8. HOME */
/* Khối "thiết lập" (đánh giá, mục tiêu) — nhẹ hơn card nội dung */
body.studio-enabled :is(#placementEntry,.plan-panel,#homePlanSettings){
  background:linear-gradient(180deg,var(--rd-static-color-057),var(--rd-static-color-058));
  border:1px solid var(--rd-static-color-059);
  border-radius:var(--rd-r-lg);
  box-shadow:none;
  padding:18px 20px;
  margin:0 0 14px;
}
html[data-theme="dark"] body.studio-enabled :is(#placementEntry,.plan-panel,#homePlanSettings){
  background:linear-gradient(180deg,var(--rd-static-color-060),var(--rd-static-color-061));
  border-color:var(--rd-static-color-062);
}
body.studio-enabled #placementEntry h3{
  font-size:14.5px;
  margin:0 0 3px;
  color:var(--rd-ink);
}
body.studio-enabled #placementEntry p{
  margin:0 0 12px;
  font-size:12.5px;
  color:var(--rd-muted);
  max-width:70ch;
}
body.studio-enabled #placementEntry > button{
  min-height:38px !important;
  padding:0 15px !important;
  font-size:12.5px !important;
  font-weight:650 !important;
  border-radius:var(--radius-rd-003) !important;
  border:1px solid var(--rd-static-color-063) !important;
  background:var(--rd-static-color-021) !important;
  color:var(--rd-brand) !important;
  box-shadow:var(--rd-shadow-xs) !important;
}
body.studio-enabled #placementEntry > button:hover{
  background:var(--rd-brand) !important;
  color:var(--rd-static-color-021) !important;
  border-color:var(--rd-brand) !important;
}

body.studio-enabled #homePlanSettings > summary,
body.studio-enabled #planToday > .section-row h3{
  font-size:14px;
  font-weight:700;
  letter-spacing:-.02em;
}
body.studio-enabled #homePlanSettings > summary{
  margin:-18px -20px !important;
  padding:18px 20px !important;
  border-radius:var(--rd-r-lg) !important;
}
body.studio-enabled #homePlanSettings[open] > summary{
  margin-bottom:10px !important;
  border-radius:var(--rd-r-lg) var(--rd-r-lg) 0 0 !important;
}
body.studio-enabled #planEmpty p{ font-size:12.5px; margin-bottom:10px; }
body.studio-enabled #planGoSetup{
  min-height:38px !important;
  padding:0 15px !important;
  font-size:12.5px !important;
  border-radius:var(--radius-rd-003) !important;
  background:linear-gradient(180deg,var(--rd-static-color-040),var(--rd-static-color-041)) !important;
  color:var(--rd-static-color-021) !important;
  box-shadow:var(--shadow-rd-006) !important;
}

/* --- Hero --- */
body.studio-enabled .feature-hero{
  min-height:0;
  padding:32px 34px;
  border-radius:var(--rd-r-xl);
  background:
    radial-gradient(120% 140% at 88% -10%, var(--rd-static-color-026) 0%, var(--rd-static-color-064) 55%),
    linear-gradient(135deg,var(--rd-static-color-065) 0%,var(--rd-static-color-066) 48%,var(--rd-static-color-067) 100%);
  box-shadow:var(--shadow-rd-007);
  margin-bottom:28px;
  overflow:hidden;
}
body.studio-enabled .feature-hero:before,
body.studio-enabled .feature-hero:after{
  border-color:var(--rd-static-color-070);
}
body.studio-enabled .feature-hero:before{ width:420px;height:420px;right:-150px;top:-160px; }
body.studio-enabled .feature-hero:after{ width:560px;height:560px;right:-210px;top:-240px; border-color:var(--rd-static-color-071); }

body.studio-enabled .feature-hero .feature-copy{
  position:relative;z-index:2;
  max-width:min(62%,520px);
}
body.studio-enabled .feature-hero h3{
  font-size:clamp(22px,2.1vw,29px);
  font-weight:750;
  letter-spacing:-.045em;
  line-height:1.22;
  margin:0 0 10px;
  color:var(--rd-static-color-021);
  text-shadow:0 1px 0 var(--rd-static-color-072);
}
body.studio-enabled .feature-hero p{
  color:var(--rd-static-color-073);
  font-size:13px;
  line-height:1.6;
  max-width:34ch;
  margin:0 0 20px;
}
body.studio-enabled .hero-button{
  background:var(--rd-static-color-021) !important;
  color:var(--rd-static-color-074) !important;
  border:0 !important;
  border-radius:var(--radius-rd-004) !important;
  min-height:42px !important;
  padding:0 18px !important;
  font-size:13px !important;
  font-weight:700 !important;
  box-shadow:var(--shadow-rd-008) !important;
}
body.studio-enabled .hero-button:hover{
  background:var(--rd-static-color-021) !important;
  color:var(--rd-static-color-067) !important;
  transform:translateY(-1px);
  box-shadow:var(--shadow-rd-009) !important;
}
body.studio-enabled .hero-character{
  position:absolute;
  right:34px;top:50%;
  transform:translateY(-50%);
  z-index:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  width:132px;height:132px;
  border-radius:var(--radius-rd-008);
  background:linear-gradient(160deg,var(--rd-static-color-077),var(--rd-static-color-015));
  border:1px solid var(--rd-static-color-026);
  box-shadow:var(--shadow-rd-010);
  font-size:52px;
  font-weight:600;
  line-height:1.02;
  color:var(--rd-static-color-021);
  letter-spacing:.02em;
  text-shadow:0 2px 14px var(--rd-static-color-079);
  backdrop-filter:blur(4px);
}
body.studio-enabled .hero-character span{
  display:block;
  font-size:52px;
  opacity:.92;
}
html[data-theme="dark"] body.studio-enabled .feature-hero{
  box-shadow:var(--shadow-rd-011);
}

/* --- Shortcut --- */
body.studio-enabled .shortcut-grid{
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}
html body.studio-enabled #studioHome.overview-v216 .shortcut[data-studio-go]{
  display:flex !important;
  flex-direction:column;
  align-items:flex-start;
  gap:10px !important;
  min-height:128px !important;
  padding:16px !important;
  border-radius:var(--rd-r-md) !important;
  border:1px solid var(--rd-line) !important;
  background:var(--rd-surface) !important;
  box-shadow:var(--rd-shadow-xs) !important;
  text-align:left;
  transition:transform .18s ease, box-shadow .2s ease, border-color .2s ease;
}
html body.studio-enabled #studioHome.overview-v216 .shortcut[data-studio-go]:hover{
  transform:translateY(-2px);
  border-color:var(--rd-static-color-082) !important;
  box-shadow:var(--rd-shadow-md) !important;
}
html body.studio-enabled #studioHome.overview-v216 .shortcut .shortcut-icon{
  width:38px !important;
  height:38px !important;
  border-radius:var(--radius-rd-004);
  margin:0 !important;
  display:grid;place-items:center;
}
html body.studio-enabled #studioHome.overview-v216 .shortcut .shortcut-icon svg{ width:19px;height:19px; }
body.studio-enabled .shortcut .shortcut-icon.indigo{ background:var(--rd-static-color-083); color:var(--rd-static-color-035); }
body.studio-enabled .shortcut .shortcut-icon.peach{ background:var(--rd-static-color-084); color:var(--rd-static-color-085); }
body.studio-enabled .shortcut .shortcut-icon.mint{ background:var(--rd-static-color-086); color:var(--rd-static-color-087); }
body.studio-enabled .shortcut .shortcut-icon.sky{ background:var(--rd-static-color-088); color:var(--rd-static-color-089); }
html[data-theme="dark"] body.studio-enabled .shortcut .shortcut-icon.indigo{ background:var(--rd-static-color-090); color:var(--rd-static-color-091); }
html[data-theme="dark"] body.studio-enabled .shortcut .shortcut-icon.peach{ background:var(--rd-static-color-092); color:var(--rd-static-color-093); }
html[data-theme="dark"] body.studio-enabled .shortcut .shortcut-icon.mint{ background:var(--rd-static-color-094); color:var(--rd-static-color-095); }
html[data-theme="dark"] body.studio-enabled .shortcut .shortcut-icon.sky{ background:var(--rd-static-color-096); color:var(--rd-static-color-097); }

html body.studio-enabled #studioHome.overview-v216 .shortcut :is(strong){
  grid-column:auto !important;
  font-size:13.5px !important;
  font-weight:700 !important;
  letter-spacing:-.02em;
  color:var(--rd-ink) !important;
  margin-top:auto !important;
  line-height:1.3 !important;
}
html body.studio-enabled #studioHome.overview-v216 .shortcut small{
  grid-column:auto !important;
  font-size:12px !important;
  font-weight:450 !important;
  color:var(--rd-muted) !important;
  line-height:1.45 !important;
  margin:0 !important;
}
body.studio-enabled .overview-due{
  top:12px !important;right:12px !important;
  min-width:20px;
  padding:2px 6px !important;
  border-radius:var(--radius-rd-009) !important;
  background:var(--rd-brand-soft) !important;
  color:var(--rd-brand) !important;
  font-size:10.5px !important;
  font-weight:750 !important;
}

/* --- Music rows --- */
body.studio-enabled .home-music-grid{ gap:12px; margin-top:14px; }
body.studio-enabled :is(.home-music-chill,.home-music-entry){
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px 16px !important;
  min-height:68px;
  border-radius:var(--rd-r-md) !important;
  border:1px solid var(--rd-line) !important;
  background:var(--rd-surface) !important;
  box-shadow:var(--rd-shadow-xs) !important;
  text-align:left;
  transition:transform .18s ease, box-shadow .2s ease, border-color .2s ease;
}
body.studio-enabled :is(.home-music-chill,.home-music-entry):hover{
  transform:translateY(-2px);
  border-color:var(--rd-static-color-098) !important;
  box-shadow:var(--rd-shadow-md) !important;
}
body.studio-enabled :is(.home-music-chill,.home-music-entry) > span:first-child{
  width:38px;height:38px;flex:none;
  border-radius:var(--radius-rd-004);
  display:grid;place-items:center;
  background:var(--rd-brand-soft);
  color:var(--rd-brand);
}
body.studio-enabled .home-music-entry > span:first-child{
  background:var(--rd-sky-soft);color:var(--rd-sky);
}
body.studio-enabled :is(.home-music-chill,.home-music-entry) > span:nth-child(2){
  flex:1;min-width:0;display:flex;flex-direction:column;gap:1px;
}
body.studio-enabled :is(.home-music-chill,.home-music-entry) strong{
  font-size:13px;font-weight:650;color:var(--rd-ink);letter-spacing:-.015em;
}
body.studio-enabled :is(.home-music-chill,.home-music-entry) small{
  font-size:12px;color:var(--rd-muted);
}
body.studio-enabled :is(.home-music-chill,.home-music-entry) > i{ color:var(--rd-faint);display:grid;place-items:center; }
body.studio-enabled :is(.home-music-chill,.home-music-entry) > i svg{ width:16px;height:16px; }

/* --- Pathway --- */
body.studio-enabled .pathway-head{ margin-top:28px; }
body.studio-enabled .pathway{
  border:1px solid var(--rd-line);
  background:var(--rd-surface);
  border-radius:var(--rd-r-lg);
  padding:8px;
  gap:4px;
  box-shadow:var(--rd-shadow-xs);
}
body.studio-enabled .path-step{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 14px;
  border-radius:var(--rd-r-sm);
  transition:background .18s ease;
}
body.studio-enabled .path-step:hover{ background:var(--rd-brand-tint); }
body.studio-enabled .path-step > span:first-child{
  width:30px;height:30px;flex:none;
  border-radius:var(--radius-rd-010);
  display:grid;place-items:center;
  background:var(--rd-brand-soft);
  color:var(--rd-brand);
  font-size:12px;
  font-weight:750;
  letter-spacing:0;
}
body.studio-enabled .path-step > div{ flex:1;min-width:0; }
body.studio-enabled .path-step strong{ display:block;font-size:13px;font-weight:650;color:var(--rd-ink); }
body.studio-enabled .path-step small{ display:block;font-size:12px;color:var(--rd-muted); }
body.studio-enabled .path-step > i{ color:var(--rd-faint); }
body.studio-enabled .path-step > i svg{ width:15px;height:15px; }

/* --- Side column --- */
body.studio-enabled .side-card{
  background:var(--rd-surface);
  border:1px solid var(--rd-line);
  border-radius:var(--rd-r-lg);
  padding:20px;
  margin-bottom:14px;
  box-shadow:var(--rd-shadow-xs);
}
body.studio-enabled .today-card{
  text-align:left;
  background:
    radial-gradient(120% 100% at 100% 0%, var(--rd-static-color-099), var(--rd-static-color-100) 60%),
    var(--rd-surface);
}
body.studio-enabled .today-title{
  font-size:12px;
  font-weight:700;
  letter-spacing:.02em;
  color:var(--rd-muted);
}
body.studio-enabled .featured-han{
  display:flex !important;
  align-items:baseline;
  gap:10px;
  font-size:40px !important;
  font-weight:600;
  color:var(--rd-ink) !important;
  letter-spacing:.01em;
  margin:10px 0 8px !important;
  line-height:1.1;
}
body.studio-enabled .featured-han span{
  font-size:13px !important;
  font-weight:500;
  color:var(--rd-muted) !important;
  letter-spacing:0;
}
body.studio-enabled .today-copy{
  font-size:12.5px;
  color:var(--rd-muted);
  line-height:1.55;
  display:block;
}
body.studio-enabled .subtle-link{
  display:inline-flex;align-items:center;gap:6px;
  margin-top:14px;
  font-size:12.5px;
  font-weight:650;
  color:var(--rd-brand);
}
body.studio-enabled .subtle-link svg{ width:14px;height:14px; }

body.studio-enabled .stats-stack{ gap:10px; }
body.studio-enabled .stats-stack > div{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:var(--rd-r-sm);
  background:var(--rd-surface-soft);
  border:1px solid var(--rd-line-soft);
}
body.studio-enabled .stats-stack .stat-icon{
  width:30px;height:30px;flex:none;
  border-radius:var(--radius-rd-010);
  display:grid;place-items:center;
  background:var(--rd-static-color-021);
  border:1px solid var(--rd-line);
  color:var(--rd-brand);
}
body.studio-enabled .stats-stack .stat-icon svg{ width:16px;height:16px; }
body.studio-enabled .stats-stack strong{
  font-size:15px !important;
  font-weight:750 !important;
  color:var(--rd-ink) !important;
  letter-spacing:-.02em;
  min-width:26px;
}
body.studio-enabled .stats-stack small{
  font-size:12px !important;
  color:var(--rd-muted) !important;
  margin-left:auto;
}

body.studio-enabled .review-reminder{
  border:1px solid var(--rd-static-color-033) !important;
  background:linear-gradient(180deg,var(--rd-static-color-101),var(--rd-static-color-102)) !important;
  border-radius:var(--rd-r-md) !important;
  padding:15px 16px !important;
  color:var(--rd-static-color-018) !important;
  box-shadow:none !important;
  transition:transform .18s ease, box-shadow .2s ease;
}
body.studio-enabled .review-reminder:hover{
  transform:translateY(-1px);
  box-shadow:var(--shadow-rd-012) !important;
}
body.studio-enabled .review-reminder strong{ font-size:13px !important; color:var(--rd-static-color-104) !important; font-weight:700; }
body.studio-enabled .review-reminder small{ font-size:12px !important; color:var(--rd-static-color-105) !important; }
body.studio-enabled .review-reminder > span:first-child{
  width:36px;height:36px;flex:none;border-radius:var(--radius-rd-003);
  display:grid;place-items:center;
  background:var(--rd-static-color-106);
  color:var(--rd-static-color-024);
}
html[data-theme="dark"] body.studio-enabled .review-reminder{
  background:linear-gradient(180deg,var(--rd-static-color-107),var(--rd-static-color-108)) !important;
  border-color:var(--rd-static-color-109) !important;
  color:var(--rd-static-color-110) !important;
}
html[data-theme="dark"] body.studio-enabled .review-reminder strong{ color:var(--rd-static-color-111) !important; }
html[data-theme="dark"] body.studio-enabled .review-reminder small{ color:var(--rd-static-color-112) !important; }

/* --- Từ vựng hôm nay --- */
body.studio-enabled .overview-word{
  border:1px solid var(--rd-line) !important;
  border-radius:var(--rd-r-lg) !important;
  background:var(--rd-surface) !important;
  padding:18px 20px !important;
  margin-top:20px !important;
  box-shadow:var(--rd-shadow-xs);
}
body.studio-enabled .overview-word-head h3{
  font-size:13px !important;
  font-weight:700;
  letter-spacing:-.01em;
  color:var(--rd-muted) !important;
  text-transform:none;
}
body.studio-enabled .overview-word-head button{
  font-size:12px !important;
  font-weight:600 !important;
  color:var(--rd-brand) !important;
  background:var(--rd-brand-soft) !important;
  border:0 !important;
  border-radius:var(--radius-rd-011) !important;
  min-height:30px !important;
  padding:0 10px !important;
  box-shadow:none !important;
}
body.studio-enabled .overview-word-row summary strong{
  font-size:28px !important;
  font-weight:600 !important;
  color:var(--rd-ink) !important;
}
body.studio-enabled .overview-word-row summary span:last-child{
  color:var(--rd-ink) !important;
  font-size:13.5px !important;
  font-weight:500;
}
body.studio-enabled .overview-word-body{
  border-top:1px solid var(--rd-line) !important;
  font-size:13.5px;
  color:var(--rd-ink-2);
}

/* --- Sửa chi tiết hero: giữ 2 chữ Hán trong khối kính, không tràn ra ngoài --- */
body.studio-enabled .feature-hero{ position:relative; }
body.studio-enabled .hero-character{
  opacity:1 !important;
  z-index:1 !important;
  right:38px !important;
  bottom:auto !important;
  top:50% !important;
  transform:translateY(-50%) rotate(0deg) !important;
  font-family:"Noto Sans CJK SC","Microsoft YaHei","PingFang SC",sans-serif !important;
  letter-spacing:0 !important;
  pointer-events:none;
}
body.studio-enabled .hero-character span{
  position:static !important;
  font-size:52px !important;
  line-height:1.02;
  color:var(--rd-static-color-021) !important;
  top:auto !important;
  right:auto !important;
  opacity:.9;
}

/* --- Khôi phục bố cục desktop đầy đủ (cột phụ + pathway đang bị ẩn) --- */
@media (min-width:981px){
  body.studio-enabled #studioHome .dashboard-grid{
    grid-template-columns:minmax(0,1.75fr) minmax(290px,.85fr);
    gap:22px;
    align-items:start;
  }
  body.studio-enabled #studioHome .dashboard-side{
    display:flex !important;
    flex-direction:column;
    gap:14px;
  }
  body.studio-enabled #studioHome :is(.pathway,.pathway-head){ display:grid !important; }
  body.studio-enabled #studioHome .pathway-head{ display:flex !important; }
  body.studio-enabled #studioHome .shortcut-grid{
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:12px;
  }
  body.studio-enabled #studioHome .shortcut-grid .shortcut{ min-height:132px !important; }
}

/* --- Summary có chevron thay cho marker mặc định --- */
body.studio-enabled :is(#homePlanSettings,.plan-panel,.clean-disclosure,.memory-schedule,.ocr-panel,.push-settings,.update-push-settings) > summary{
  list-style:none;
  display:flex;
  align-items:center;
  gap:8px;
}
body.studio-enabled :is(#homePlanSettings,.plan-panel,.clean-disclosure,.memory-schedule,.ocr-panel,.push-settings,.update-push-settings) > summary::-webkit-details-marker{ display:none; }
body.studio-enabled :is(#homePlanSettings,.plan-panel,.clean-disclosure,.memory-schedule,.ocr-panel,.push-settings,.update-push-settings) > summary::after{
  content:"";
  width:14px;height:14px;
  margin-left:auto;
  flex:none;
  background:currentColor;
  opacity:.45;
  -webkit-mask:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center/contain no-repeat;
  transition:transform .2s ease;
}
body.studio-enabled :is(#homePlanSettings,.plan-panel,.clean-disclosure,.memory-schedule,.ocr-panel,.push-settings,.update-push-settings)[open] > summary::after{
  transform:rotate(180deg);
}

@media (min-width:981px){
  body.studio-enabled #studioHome :is(.today-card,.stats-card){
    display:block !important;
    width:auto !important;
    height:auto !important;
  }
  body.studio-enabled #studioHome .stats-card{ padding:20px !important; }
  body.studio-enabled #studioHome .feature-hero{ min-height:196px; }
  body.studio-enabled #studioHome .shortcut-grid .shortcut{ min-height:122px !important; }
}

/* --- Sửa flex khiến card thống kê bị 0px --- */
@media (min-width:981px){
  body.studio-enabled #studioHome .stats-card{
    flex:0 0 auto !important;
    align-self:stretch !important;
    width:100% !important;
    height:auto !important;
  }
  body.studio-enabled #studioHome #planEmpty:not([hidden]){
    display:flex;
    align-items:center;
    gap:18px;
  }
  body.studio-enabled #studioHome #planEmpty p{ flex:1; margin:0; }
}

/* --- Tra cứu nhanh (khối search thu gọn ở trang chủ) --- */
body.studio-enabled .overview-search{
  border:1px solid var(--rd-line) !important;
  border-radius:var(--rd-r-lg) !important;
  background:var(--rd-surface) !important;
  margin-top:18px !important;
  overflow:hidden;
  box-shadow:var(--rd-shadow-xs);
}
body.studio-enabled .overview-search > summary{
  font-size:13.5px !important;
  font-weight:700 !important;
  color:var(--rd-ink) !important;
  padding:14px 18px !important;
}
body.studio-enabled .clean-home-search{
  padding:0 18px 16px !important;
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
}
body.studio-enabled .clean-home-search > :is(input,button){ min-height:40px !important; }
body.studio-enabled .clean-home-search > :is(.studio-search-tabs, .home-search-actions, div){ grid-column:1/-1; }

/* ============================================================== 9. LESSONS */
body.studio-enabled .lesson-level-picker{
  width:100%;
  display:flex !important;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:44px !important;
  margin:6px 0 22px !important;
  border-radius:var(--radius-rd-002) !important;
  border:1px dashed var(--rd-static-color-082) !important;
  background:var(--rd-brand-tint) !important;
  color:var(--rd-brand) !important;
  font-size:13px !important;
  font-weight:650 !important;
  box-shadow:none !important;
}
body.studio-enabled .lesson-level-picker:hover{
  background:var(--rd-brand-soft) !important;
  border-style:solid !important;
}
body.studio-enabled #lessonsContent > h3{
  font-size:19px;
  font-weight:750;
  letter-spacing:-.035em;
  margin:0 0 14px;
  color:var(--rd-ink);
}
body.studio-enabled .lesson-course-progress{
  background:linear-gradient(135deg,var(--rd-static-color-113),var(--rd-static-color-114)) !important;
  border:1px solid var(--rd-static-color-115) !important;
  border-radius:var(--rd-r-md) !important;
  padding:16px 18px !important;
  margin-bottom:12px;
}
body.studio-enabled .lesson-course-progress strong{
  font-size:13.5px;
  font-weight:700;
  color:var(--rd-static-color-067);
  display:block;
  margin-bottom:2px;
}
body.studio-enabled .lesson-course-progress .hint{ font-size:12px; color:var(--rd-static-color-105); }
body.studio-enabled .lesson-course-progress progress{ margin-top:10px; height:7px; background:var(--rd-static-color-115); }
body.studio-enabled .lesson-course-progress progress::-webkit-progress-bar{ background:var(--rd-static-color-115); }

body.studio-enabled .lesson-resume{
  width:100%;
  min-height:46px !important;
  margin-bottom:20px !important;
  border-radius:var(--radius-rd-002) !important;
  border:1px solid var(--rd-static-color-116) !important;
  background:var(--rd-surface) !important;
  color:var(--rd-brand) !important;
  font-size:13.5px !important;
  font-weight:650 !important;
  box-shadow:var(--rd-shadow-xs) !important;
}
body.studio-enabled .lesson-resume:hover{ background:var(--rd-brand-soft) !important; }

body.studio-enabled .lesson-list{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:10px !important;
}
body.studio-enabled .lesson-row{
  display:grid !important;
  grid-template-columns:auto minmax(0,1fr) !important;
  align-items:center;
  gap:12px !important;
  padding:14px 16px !important;
  border-radius:var(--rd-r-md) !important;
  border:1px solid var(--rd-line) !important;
  background:var(--rd-surface) !important;
  box-shadow:var(--rd-shadow-xs) !important;
  text-align:left;
  transition:transform .16s ease, box-shadow .2s ease, border-color .2s ease;
}
body.studio-enabled .lesson-row:hover{
  transform:translateY(-2px);
  border-color:var(--rd-static-color-082) !important;
  box-shadow:var(--rd-shadow-md) !important;
}
body.studio-enabled .lesson-number{
  width:38px;height:38px;
  flex:none;
  display:grid;place-items:center;
  border-radius:var(--radius-rd-004);
  background:var(--rd-brand-soft);
  color:var(--rd-brand) !important;
  font-size:12.5px !important;
  font-weight:750 !important;
  letter-spacing:0 !important;
}
body.studio-enabled .lesson-row-text{ display:flex;flex-direction:column;gap:1px;min-width:0; }
body.studio-enabled .lesson-row-text strong{
  font-size:13.5px !important;
  font-weight:650 !important;
  color:var(--rd-ink) !important;
  letter-spacing:-.015em;
  white-space:normal;overflow-wrap:anywhere;
}
body.studio-enabled .lesson-row-text > span{
  font-size:13px !important;
  color:var(--rd-muted) !important;
  font-weight:500;
}
body.studio-enabled .lesson-row-text small{
  font-size:12px !important;
  color:var(--rd-faint) !important;
  margin-top:3px;
}
body.studio-enabled .lesson-row-text progress{ margin-top:6px; height:4px; }

/* ========================================================== 10. FLASHCARDS */
body.studio-enabled .flash-layout{
  display:grid;
  grid-template-columns:minmax(0,1.35fr) minmax(280px,.75fr);
  gap:20px;
  align-items:start;
  margin-top:18px;
}
body.studio-enabled .flash-focus{ min-width:0; }
body.studio-enabled .flash-tools{ display:flex;flex-direction:column;gap:14px; }

body.studio-enabled #flashcard{
  border:1px solid var(--rd-line) !important;
  border-radius:var(--rd-r-xl) !important;
  background:var(--rd-surface) !important;
  box-shadow:var(--rd-shadow-md) !important;
  min-height:340px;
  overflow:hidden;
}
body.studio-enabled #flashcard .face{
  background:
    radial-gradient(120% 100% at 50% 0%, var(--rd-static-color-057) 0%, var(--rd-static-color-117) 55%),
    var(--rd-surface) !important;
}
html[data-theme="dark"] body.studio-enabled #flashcard .face{
  background:radial-gradient(120% 100% at 50% 0%, var(--rd-static-color-118) 0%, var(--rd-static-color-119) 60%) !important;
}
body.studio-enabled #flashcard .han{
  font-size:clamp(72px,8vw,104px) !important;
  font-weight:500 !important;
  color:var(--rd-ink) !important;
  letter-spacing:.02em !important;
  line-height:1.1 !important;
  text-shadow:0 2px 0 var(--rd-static-color-013);
}
body.studio-enabled .hsk-tag{
  border-radius:var(--radius-rd-011) !important;
  padding:4px 9px !important;
  font-size:10.5px !important;
  font-weight:750 !important;
  letter-spacing:.04em;
  background:var(--rd-brand-soft) !important;
  color:var(--rd-brand) !important;
  border:1px solid var(--rd-static-color-033) !important;
}
body.studio-enabled #flashcard .status-label{
  font-size:11px !important;
  color:var(--rd-faint) !important;
  font-weight:600;
}
body.studio-enabled #flashcard .pin{
  font-size:15px !important;
  font-weight:600 !important;
  color:var(--rd-brand) !important;
  letter-spacing:.02em;
}
body.studio-enabled #flashcard .mean{
  font-size:17px !important;
  font-weight:650 !important;
  color:var(--rd-ink) !important;
  line-height:1.45 !important;
  letter-spacing:-.02em;
}
body.studio-enabled #flashcard .hv{
  font-size:12.5px !important;
  color:var(--rd-muted) !important;
}

body.studio-enabled .mastery-tools{ gap:10px !important; padding:0 0 16px !important; }
body.studio-enabled .mastery-btn{
  min-height:44px !important;
  border-radius:var(--radius-rd-002) !important;
  font-size:13px !important;
  font-weight:650 !important;
  border:1px solid var(--rd-static-color-010) !important;
}
html body.studio-enabled .mastery-btn.known{
  background:var(--rd-static-color-120) !important;
  color:var(--rd-static-color-121) !important;
  border-color:var(--rd-static-color-122) !important;
}
html body.studio-enabled .mastery-btn.unknown{
  background:var(--rd-static-color-123) !important;
  color:var(--rd-static-color-124) !important;
  border-color:var(--rd-static-color-125) !important;
}
html body.studio-enabled .mastery-btn.known:hover{ background:var(--rd-static-color-126) !important; color:var(--rd-static-color-121) !important; }
html body.studio-enabled .mastery-btn.unknown:hover{ background:var(--rd-static-color-127) !important; color:var(--rd-static-color-124) !important; }
html[data-theme="dark"] body.studio-enabled .mastery-btn.known{ background:var(--rd-static-color-128) !important;color:var(--rd-static-color-095) !important;border-color:var(--rd-static-color-129) !important; }
html[data-theme="dark"] body.studio-enabled .mastery-btn.unknown{ background:var(--rd-static-color-130) !important;color:var(--rd-static-color-131) !important;border-color:var(--rd-static-color-132) !important; }

body.studio-enabled #progress{
  font-size:12px !important;
  color:var(--rd-muted) !important;
  font-weight:600;
  margin:14px 0 10px !important;
  text-align:center;
}
body.studio-enabled .flash-focus .buttons{
  display:grid !important;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
body.studio-enabled .flash-focus .buttons > button{
  min-height:46px !important;
  border-radius:var(--radius-rd-002) !important;
  border:1px solid var(--rd-line) !important;
  background:var(--rd-surface) !important;
  color:var(--rd-ink) !important;
  font-size:13.5px !important;
  font-weight:650 !important;
  box-shadow:var(--rd-shadow-xs) !important;
}
body.studio-enabled .flash-focus .buttons > #next{
  background:linear-gradient(180deg,var(--rd-static-color-040),var(--rd-static-color-041)) !important;
  color:var(--rd-static-color-021) !important;
  border-color:var(--rd-static-color-010) !important;
  box-shadow:var(--shadow-rd-006) !important;
}
body.studio-enabled .mobile-swipe-hint{ font-size:11px !important; color:var(--rd-faint) !important; text-align:center; }

body.studio-enabled .tool-card{
  background:var(--rd-surface);
  border:1px solid var(--rd-line);
  border-radius:var(--rd-r-md);
  padding:16px 18px;
  box-shadow:var(--rd-shadow-xs);
}
body.studio-enabled .tool-card h3{
  font-size:12px;
  font-weight:750;
  letter-spacing:.05em;
  text-transform:uppercase;
  color:var(--rd-faint);
  margin:0 0 10px;
}
body.studio-enabled .tool-card .field-row{ margin:0; }
body.studio-enabled .tool-card .field-row label{ width:100%; }
body.studio-enabled .tool-card .field-row select{ width:100%; }
body.studio-enabled .tool-card > button{ width:100%;margin-top:8px;min-height:40px !important;font-size:12.5px !important; }
body.studio-enabled .example{
  background:var(--rd-surface-soft) !important;
  border:1px solid var(--rd-line-soft) !important;
  border-radius:var(--radius-rd-002) !important;
  padding:12px 14px !important;
  font-size:13px !important;
}
body.studio-enabled .example .cn{
  font-size:16px !important;
  font-weight:600 !important;
  color:var(--rd-ink) !important;
  line-height:1.5;
}
body.studio-enabled .example .vi{ font-size:12.5px !important; color:var(--rd-muted) !important; }
body.studio-enabled .example-pinyin{ font-size:12.5px !important; color:var(--rd-brand) !important; }

/* =============================================================== 11. QUIZ */
body.studio-enabled .quiz-level-picker{
  background:var(--rd-surface-soft) !important;
  border:1px solid var(--rd-line-soft) !important;
  border-radius:var(--rd-r-md) !important;
  padding:14px 16px !important;
  margin-bottom:14px;
}
body.studio-enabled .quiz-level-picker .field-row{ margin:0 0 8px; }
body.studio-enabled #quizPoolPreview{ margin:0 !important; font-size:12px !important; }

body.studio-enabled fieldset{
  border:1px solid var(--rd-line) !important;
  border-radius:var(--rd-r-md) !important;
  padding:14px 16px 6px !important;
  margin:14px 0 !important;
  background:var(--rd-surface-soft);
}
body.studio-enabled legend{
  font-size:12px !important;
  font-weight:700 !important;
  color:var(--rd-muted) !important;
  padding:0 8px !important;
  letter-spacing:.01em;
}
body.studio-enabled .quiz-type-grid{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:8px !important;
}
body.studio-enabled .quiz-type-grid label{
  display:flex !important;
  align-items:center;
  gap:9px;
  padding:10px 12px !important;
  border-radius:var(--radius-rd-003) !important;
  border:1px solid var(--rd-line) !important;
  background:var(--rd-surface) !important;
  font-size:12.5px !important;
  font-weight:550 !important;
  color:var(--rd-ink-2) !important;
  cursor:pointer;
  transition:border-color .16s ease, background .16s ease;
}
body.studio-enabled .quiz-type-grid label:has(input:checked){
  border-color:var(--rd-static-color-053) !important;
  background:var(--rd-brand-tint) !important;
  color:var(--rd-brand) !important;
}
body.studio-enabled .adaptive-option{
  display:flex !important;
  align-items:center;
  gap:9px;
  font-size:12.5px !important;
  font-weight:600;
  color:var(--rd-ink-2) !important;
  padding:10px 12px !important;
  border-radius:var(--radius-rd-003);
  background:var(--rd-surface-soft);
  border:1px solid var(--rd-line-soft);
  margin-top:6px;
}

body.studio-enabled .quiz-prompt{
  font-size:22px !important;
  font-weight:750 !important;
  letter-spacing:-.03em;
  color:var(--rd-ink) !important;
  line-height:1.4 !important;
  margin:18px 0 14px !important;
}
body.studio-enabled .answers{
  display:grid !important;
  gap:10px !important;
}
html body.studio-enabled .answers button:not(.correct):not(.wrong){
  min-height:52px !important;
  padding:14px 16px !important;
  border-radius:var(--radius-rd-002) !important;
  border:1px solid var(--rd-line) !important;
  background:var(--rd-surface) !important;
  color:var(--rd-ink) !important;
  font-size:14px !important;
  font-weight:550 !important;
  text-align:left;
  box-shadow:var(--rd-shadow-xs) !important;
}
html body.studio-enabled .answers button:not(.correct):not(.wrong):hover{
  border-color:var(--rd-static-color-133) !important;
  background:var(--rd-brand-tint) !important;
  color:var(--rd-ink) !important;
}
body.studio-enabled #quizFeedback{
  font-size:13px;
  font-weight:600;
  margin-top:12px;
  min-height:20px;
}
body.studio-enabled #quizNext{ margin-top:14px; min-height:44px !important; }

/* --- Tinh chỉnh khối tra cứu nhanh --- */
body.studio-enabled .overview-search > summary{
  display:flex;align-items:center;
  list-style:none;
}
body.studio-enabled .overview-search > summary::-webkit-details-marker{ display:none; }
body.studio-enabled .overview-search > summary::after{
  content:"";width:14px;height:14px;margin-left:auto;flex:none;
  background:currentColor;opacity:.45;
  -webkit-mask:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center/contain no-repeat;
  transition:transform .2s ease;
}
body.studio-enabled .overview-search[open] > summary::after{ transform:rotate(180deg); }

body.studio-enabled .clean-home-search{
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:10px !important;
  padding:2px 18px 18px !important;
  margin:0 !important;
  border:0 !important;
}
body.studio-enabled .clean-home-search > label{
  position:absolute !important;
  width:1px;height:1px;overflow:hidden;
  clip-path:inset(50%);white-space:nowrap;
}
body.studio-enabled .clean-home-search form{
  display:flex;
  gap:8px;
  margin:0 !important;
}
body.studio-enabled .clean-home-search form input{ flex:1; min-width:0; }
body.studio-enabled .clean-home-search form button{
  min-width:104px;
  min-height:42px !important;
  border-radius:var(--radius-rd-004) !important;
  background:linear-gradient(180deg,var(--rd-static-color-040),var(--rd-static-color-041)) !important;
  color:var(--rd-static-color-021) !important;
  border:1px solid var(--rd-static-color-010) !important;
  font-size:13px !important;font-weight:650 !important;
  box-shadow:var(--shadow-rd-006) !important;
}
body.studio-enabled .clean-home-inputs{
  display:flex !important;
  gap:8px !important;
  grid-column:auto !important;
}
body.studio-enabled .clean-home-inputs button{
  flex:1;
  min-height:40px !important;
  border-radius:var(--radius-rd-004) !important;
  border:1px solid var(--rd-line) !important;
  background:var(--rd-surface) !important;
  color:var(--rd-ink-2) !important;
  font-size:12.5px !important;
  font-weight:600 !important;
  box-shadow:none !important;
}
body.studio-enabled .clean-home-inputs button:hover{
  border-color:var(--rd-static-color-053) !important;
  color:var(--rd-brand) !important;
  background:var(--rd-brand-tint) !important;
}

/* --- Cân lại khối mục tiêu + cột phụ --- */
body.studio-enabled #studioHome #planEmpty:not([hidden]){
  display:flex !important;
  align-items:center;
  flex-wrap:wrap;
  gap:14px;
}
body.studio-enabled #studioHome #planEmpty p{ flex:0 1 auto; margin:0; }
@media (min-width:981px){
  body.studio-enabled #studioHome .dashboard-side{
    position:sticky;
    top:88px;
  }
}

/* ============================================================= 12. SEARCH */
body.studio-enabled .studio-search-tabs{
  display:inline-flex !important;
  gap:3px !important;
  padding:3px !important;
  border-radius:var(--radius-rd-004) !important;
  background:var(--rd-surface-soft) !important;
  border:1px solid var(--rd-line-soft) !important;
  margin-bottom:18px !important;
}
body.studio-enabled .studio-search-tabs button{
  min-height:34px !important;
  padding:0 14px !important;
  border-radius:var(--radius-rd-011) !important;
  border:0 !important;
  background:var(--rd-static-color-010) !important;
  color:var(--rd-muted) !important;
  font-size:12.5px !important;
  font-weight:600 !important;
  box-shadow:none !important;
}
body.studio-enabled .studio-search-tabs button:hover{
  background:var(--rd-static-color-134) !important;
  color:var(--rd-ink) !important;
}
html body.studio-enabled .studio-search-tabs button:is(.active,[aria-pressed=true],[aria-current=page]){
  background:var(--rd-surface) !important;
  color:var(--rd-ink) !important;
  box-shadow:var(--rd-shadow-xs) !important;
}

body.studio-enabled .dictionary-modes{
  display:inline-flex !important;
  gap:4px !important;
  padding:4px !important;
  border-radius:var(--radius-rd-002) !important;
  background:var(--rd-surface-soft) !important;
  border:1px solid var(--rd-line-soft) !important;
  margin:4px 0 6px !important;
  width:auto !important;
}
body.studio-enabled .dictionary-modes button{
  width:auto !important;
  flex:0 0 auto !important;
  min-height:36px !important;
  padding:0 16px !important;
  border-radius:var(--radius-rd-010) !important;
  border:0 !important;
  background:var(--rd-static-color-010) !important;
  color:var(--rd-muted) !important;
  font-size:12.5px !important;
  font-weight:650 !important;
  box-shadow:none !important;
}
html body.studio-enabled .dictionary-modes button[aria-pressed=true]{
  background:var(--rd-brand) !important;
  color:var(--rd-static-color-021) !important;
  box-shadow:var(--shadow-rd-013) !important;
}

body.studio-enabled #searchForm{
  display:flex !important;
  gap:8px !important;
  align-items:center !important;
  margin:12px 0 6px !important;
}
body.studio-enabled #searchForm input{ flex:1; min-width:0; min-height:46px !important; }
body.studio-enabled #searchForm button{ min-height:46px !important; padding:0 18px !important; }
body.studio-enabled #handwritingOpen{
  background:var(--rd-surface) !important;
  color:var(--rd-ink-2) !important;
  border:1px solid var(--rd-line) !important;
}
body.studio-enabled .result-grid{
  display:grid !important;
  grid-template-columns:repeat(auto-fill,minmax(280px,1fr)) !important;
  gap:10px !important;
  margin-top:14px !important;
}
body.studio-enabled .dictionary-row,
body.studio-enabled .result-card{
  background:var(--rd-surface) !important;
  border:1px solid var(--rd-line) !important;
  border-radius:var(--rd-r-md) !important;
  box-shadow:var(--rd-shadow-xs) !important;
}

/* ============================================================ 13. ACCOUNT */
body.studio-enabled .studio-account-overview{ margin-top:16px; }
body.studio-enabled .account-metrics{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:12px !important;
  margin-bottom:12px;
}
body.studio-enabled .account-metric{
  background:var(--rd-surface) !important;
  border:1px solid var(--rd-line) !important;
  border-radius:var(--rd-r-md) !important;
  padding:16px 18px !important;
  box-shadow:var(--rd-shadow-xs) !important;
  display:flex;flex-direction:column;gap:2px;
  min-height:112px;
}
body.studio-enabled .metric-caption{
  font-size:11px !important;
  font-weight:700 !important;
  letter-spacing:.05em;
  text-transform:uppercase;
  color:var(--rd-faint) !important;
}
body.studio-enabled .account-metric strong{
  font-size:24px !important;
  font-weight:750 !important;
  letter-spacing:-.035em;
  color:var(--rd-ink) !important;
  line-height:1.25;
}
body.studio-enabled .account-metric small{
  font-size:12px !important;
  color:var(--rd-muted) !important;
  line-height:1.45;
  margin-top:auto;
}
body.studio-enabled .account-details{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:12px !important;
}
body.studio-enabled .account-detail{
  background:var(--rd-surface) !important;
  border:1px solid var(--rd-line) !important;
  border-radius:var(--rd-r-md) !important;
  padding:18px !important;
  box-shadow:var(--rd-shadow-xs) !important;
}
body.studio-enabled .account-detail h3{
  font-size:13px !important;
  font-weight:700 !important;
  letter-spacing:-.01em;
  margin:0 0 10px !important;
  color:var(--rd-ink) !important;
}
body.studio-enabled .account-detail > label{
  font-size:11px !important;
  font-weight:650;
  color:var(--rd-muted);
  display:block;
  margin-bottom:5px;
}
body.studio-enabled .account-progress-heading{
  display:flex;justify-content:space-between;align-items:baseline;
  margin:14px 0 6px;
  font-size:12px;
  color:var(--rd-muted);
}
body.studio-enabled .account-progress-heading strong{
  font-size:13px;font-weight:750;color:var(--rd-brand);
}
body.studio-enabled .account-progress-track{
  height:9px !important;
  border-radius:var(--radius-rd-006) !important;
  background:var(--rd-line-soft) !important;
  overflow:hidden;
}
body.studio-enabled #studioProgressFill{
  background:linear-gradient(90deg,var(--rd-static-color-039),var(--rd-static-color-035)) !important;
  border-radius:var(--radius-rd-006) !important;
}
body.studio-enabled .account-week{
  display:grid !important;
  grid-template-columns:repeat(7,1fr) !important;
  gap:6px !important;
  margin-top:6px;
}
body.studio-enabled .account-day{
  display:flex;flex-direction:column;align-items:center;gap:4px;
  padding:8px 0;
  border-radius:var(--radius-rd-003);
  background:var(--rd-surface-soft);
  border:1px solid var(--rd-line-soft);
  font-size:10.5px;
  color:var(--rd-muted);
}
body.studio-enabled .account-day b{
  width:22px;height:22px;
  display:grid;place-items:center;
  border-radius:var(--radius-rd-009);
  background:var(--rd-brand-soft);
  color:var(--rd-brand);
  font-size:12px;
}
body.studio-enabled .account-badge{
  display:inline-flex !important;
  align-items:center;gap:6px;
  padding:6px 12px !important;
  border-radius:var(--radius-rd-006) !important;
  background:var(--rd-jade-soft) !important;
  color:var(--rd-static-color-121) !important;
  font-size:12px !important;
  font-weight:650 !important;
  border:1px solid var(--rd-static-color-135);
  margin-top:10px !important;
}
body.studio-enabled #accountPanel > .hint{
  background:var(--rd-surface-soft);
  border:1px solid var(--rd-line-soft);
  border-radius:var(--radius-rd-002);
  padding:12px 14px;
  margin:12px 0 !important;
}

/* ================================================================ 14. SRS */
body.studio-enabled .memory-options{
  display:grid !important;
  gap:8px !important;
  margin:14px 0 !important;
}
body.studio-enabled .memory-options label{
  display:flex !important;
  align-items:center;
  gap:10px;
  padding:12px 14px !important;
  border-radius:var(--radius-rd-002) !important;
  border:1px solid var(--rd-line) !important;
  background:var(--rd-surface) !important;
  font-size:12.5px !important;
  font-weight:550 !important;
  color:var(--rd-ink-2) !important;
  box-shadow:var(--rd-shadow-xs);
}
body.studio-enabled .memory-options label:has(input:checked){
  border-color:var(--rd-static-color-053) !important;
  background:var(--rd-brand-tint) !important;
}
body.studio-enabled .review-card{
  background:var(--rd-surface) !important;
  border:1px solid var(--rd-line) !important;
  border-radius:var(--rd-r-lg) !important;
  padding:26px !important;
  box-shadow:var(--rd-shadow-md) !important;
  text-align:center;
  margin-top:14px;
}
body.studio-enabled .review-card .han{
  font-size:clamp(64px,7vw,88px) !important;
  font-weight:500 !important;
  color:var(--rd-ink) !important;
  line-height:1.15;
  margin:10px 0 !important;
}
body.studio-enabled .ratings{
  display:grid !important;
  grid-template-columns:repeat(4,1fr) !important;
  gap:8px !important;
  margin-top:14px;
}
body.studio-enabled .ratings button{
  min-height:56px !important;
  border-radius:var(--radius-rd-002) !important;
  font-size:13px !important;
  font-weight:700 !important;
  border:1px solid var(--rd-line) !important;
  background:var(--rd-surface) !important;
  color:var(--rd-ink) !important;
  box-shadow:var(--rd-shadow-xs) !important;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;
}
html body.studio-enabled .ratings button[data-rating=again]{ color:var(--rd-static-color-124) !important; border-color:var(--rd-static-color-125) !important; background:var(--rd-static-color-123) !important; }
html body.studio-enabled .ratings button[data-rating=hard]{ color:var(--rd-static-color-136) !important; border-color:var(--rd-static-color-137) !important; background:var(--rd-static-color-138) !important; }
html body.studio-enabled .ratings button[data-rating=good]{ color:var(--rd-static-color-121) !important; border-color:var(--rd-static-color-122) !important; background:var(--rd-static-color-120) !important; }
html body.studio-enabled .ratings button[data-rating=easy]{ color:var(--rd-static-color-139) !important; border-color:var(--rd-static-color-140) !important; background:var(--rd-static-color-141) !important; }
body.studio-enabled .ratings small{ font-size:10.5px;font-weight:600;opacity:.75; }
body.studio-enabled .memory-calendar{
  display:grid !important;
  grid-template-columns:repeat(7,1fr) !important;
  gap:6px !important;
  margin-top:10px;
}

/* --- Sửa specificity cho nút mastery --- */
html body.studio-enabled button.mastery-btn.known{
  background:var(--rd-static-color-120) !important;color:var(--rd-static-color-121) !important;border-color:var(--rd-static-color-122) !important;
}
html body.studio-enabled button.mastery-btn.unknown{
  background:var(--rd-static-color-123) !important;color:var(--rd-static-color-124) !important;border-color:var(--rd-static-color-125) !important;
}
html body.studio-enabled button.mastery-btn.known[aria-pressed=true]{ background:var(--rd-static-color-087) !important;color:var(--rd-static-color-021) !important;border-color:var(--rd-static-color-087) !important; }
html body.studio-enabled button.mastery-btn.unknown[aria-pressed=true]{ background:var(--rd-static-color-142) !important;color:var(--rd-static-color-021) !important;border-color:var(--rd-static-color-142) !important; }

/* --- Hàng nút thẻ từ: 2 cột gọn, không phụ thuộc rule cũ --- */
html body.studio-enabled #learnPanel .flash-focus .buttons{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:10px !important;
  justify-content:stretch !important;
  width:100% !important;
  margin-top:4px;
}
html body.studio-enabled #learnPanel .flash-focus .buttons > button{
  grid-column:auto !important;
  width:100% !important;
  min-height:46px !important;
  font-size:13.5px !important;
}
html body.studio-enabled #learnPanel .flash-focus .buttons > #exampleBtn{ grid-column:1/-1 !important; }

/* --- Dọn khối rỗng --- */
body.studio-enabled :is(#quizProgress,#srsProgress,#quizFeedback,#srsMessage):empty{
  display:none !important;
}
body.studio-enabled #quizOptions:empty,
body.studio-enabled #quizPrompt:empty{ display:none !important; }

/* =============================================================== 15. MOBILE */
@media (max-width:980px){
  /* Khung trang: bỏ lệch ngang, padding đều 2 bên */
  body.studio-enabled main.workspace{
    width:100% !important;
    max-width:100% !important;
    margin:0 !important;
    padding:14px 16px calc(112px + env(safe-area-inset-bottom)) !important;
  }
  body.studio-enabled .topbar-inner{
    width:100% !important;
    padding:0 14px;
    gap:8px;
  }
  body.studio-enabled .topbar{ height:64px; }
  body.studio-enabled .topbar-title strong{ font-size:16px; }
  body.studio-enabled .topbar-title small{ display:none; }
  body.studio-enabled .topbar-actions > button{ width:38px;height:38px;min-height:38px; }
  body.studio-enabled .topbar-actions .level-pill{ font-size:12px;padding:0 11px; }

  /* Panel trên mobile: tận dụng gutter 16px của workspace, tránh inset lặp gây hẹp nội dung. */
  body.studio-enabled :is(.panel-box,.activity-panel,.hub-panel){
    padding:16px 0 !important;
    border:0 !important;
    background:var(--rd-static-color-010) !important;
    box-shadow:none !important;
    border-radius:var(--radius-rd-012) !important;
    max-width:100% !important;
  }
  body.studio-enabled .activity-panel > h2,
  body.studio-enabled .activity-intro h2{
    font-size:22px;
    margin-bottom:4px;
  }

  /* Hero mobile */
  body.studio-enabled .mobile-today-hero{
    border-radius:var(--rd-r-xl) !important;
    padding:20px 18px !important;
    background:
      radial-gradient(120% 140% at 92% -20%, var(--rd-static-color-026), var(--rd-static-color-064) 55%),
      linear-gradient(135deg,var(--rd-static-color-065) 0%,var(--rd-static-color-066) 55%,var(--rd-static-color-067) 100%) !important;
    box-shadow:var(--shadow-rd-014) !important;
    margin-bottom:16px !important;
    overflow:hidden;
    position:relative;
  }
  body.studio-enabled .mobile-today-hero .mobile-hero-top{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:10px;
  }
  body.studio-enabled .mobile-today-hero .mobile-hero-top h2{
    font-size:21px !important;
    font-weight:750 !important;
    letter-spacing:-.04em;
    color:var(--rd-static-color-021) !important;
    line-height:1.25 !important;
    margin:0 !important;
  }
  body.studio-enabled .mobile-today-hero .mobile-hero-top > button{
    flex:none;
    min-height:34px !important;
    padding:0 12px !important;
    border-radius:var(--radius-rd-003) !important;
    background:var(--rd-static-color-069) !important;
    border:1px solid var(--rd-static-color-144) !important;
    color:var(--rd-static-color-021) !important;
    font-size:12px !important;
    font-weight:650 !important;
    box-shadow:none !important;
    white-space:nowrap;
  }
  body.studio-enabled .mobile-today-hero > p{
    color:var(--rd-static-color-145) !important;
    font-size:12.5px !important;
    line-height:1.55 !important;
    margin:8px 0 0 !important;
    max-width:34ch;
  }
  body.studio-enabled .mobile-today-hero .overview-time{
    margin:12px 0 0 !important;
    font-size:12px !important;
    color:var(--rd-static-color-146) !important;
    gap:6px !important;
  }
  body.studio-enabled .mobile-today-hero .overview-time progress{
    background:var(--rd-static-color-147) !important;
    height:6px !important;
  }
  body.studio-enabled .mobile-today-hero .overview-time progress::-webkit-progress-bar{ background:var(--rd-static-color-147) !important; }
  body.studio-enabled .mobile-today-hero .overview-time progress::-webkit-progress-value{ background:var(--rd-static-color-021) !important; }
  body.studio-enabled .mobile-today-hero .overview-lesson{
    color:var(--rd-static-color-106) !important;
    font-size:12px !important;
    margin:10px 0 14px !important;
  }
  body.studio-enabled .mobile-today-hero .mobile-hero-cta{
    width:100% !important;
    min-height:48px !important;
    margin-top:4px;
    background:var(--rd-static-color-021) !important;
    color:var(--rd-static-color-018) !important;
    border:0 !important;
    border-radius:var(--radius-rd-001) !important;
    font-size:14px !important;
    font-weight:700 !important;
    box-shadow:var(--shadow-rd-015) !important;
  }
  body.studio-enabled .mobile-today-hero .mobile-hero-cta:hover{
    background:var(--rd-static-color-021) !important;color:var(--rd-static-color-104) !important;
  }
  body.studio-enabled .mobile-today-hero .mobile-hero-result{
    width:100% !important;
    min-height:40px !important;
    margin-top:8px;
    background:var(--rd-static-color-070) !important;
    border:1px solid var(--rd-static-color-147) !important;
    color:var(--rd-static-color-021) !important;
    border-radius:var(--radius-rd-004) !important;
    font-size:12.5px !important;
    font-weight:600 !important;
    box-shadow:none !important;
  }
  body.studio-enabled .mobile-today-hero .overview-tasks,
  body.studio-enabled .mobile-today-hero .overview-extras{
    margin-top:6px !important;
    color:var(--rd-static-color-021) !important;
  }
  body.studio-enabled .mobile-today-hero :is(.overview-tasks,.overview-extras) > summary{
    color:var(--rd-static-color-031) !important;
    font-size:12.5px !important;
    font-weight:600 !important;
    min-height:40px !important;
    padding:8px 0 !important;
    background:var(--rd-static-color-010) !important;
    border-top:1px solid var(--rd-static-color-149);
    margin-top:6px;
  }
  body.studio-enabled .mobile-today-hero :is(.overview-tasks,.overview-extras) > summary::after{
    color:var(--rd-static-color-021) !important;
  }

  /* Card shortcut mobile gọn hơn */
  html body.studio-enabled #studioHome.overview-v216 .shortcut[data-studio-go]{
    min-height:118px !important;
    padding:14px !important;
    gap:8px !important;
  }
  html body.studio-enabled #studioHome.overview-v216 .shortcut :is(strong){
    margin-top:auto !important;
    font-size:13px !important;
  }
  html body.studio-enabled #studioHome.overview-v216 .shortcut small{ font-size:12px !important; }

  /* Khối thiết lập mobile */
  body.studio-enabled :is(#placementEntry,.plan-panel,#homePlanSettings){
    padding:14px 16px;
    margin-bottom:12px;
  }
  body.studio-enabled #homePlanSettings > summary{
    margin:-14px -16px !important;
    padding:14px 16px !important;
  }

  /* Bài học mobile: 1 cột */
  body.studio-enabled .lesson-list{
    grid-template-columns:1fr !important;
  }
  body.studio-enabled .lesson-row{ padding:13px 14px !important; }

  /* Thẻ từ mobile: 1 cột */
  body.studio-enabled .flash-layout{
    grid-template-columns:1fr !important;
    gap:14px;
  }
  body.studio-enabled #flashcard{ min-height:320px; }
  body.studio-enabled #flashcard .han{ font-size:84px !important; }

  /* Trắc nghiệm / tài khoản mobile */
  body.studio-enabled .account-metrics{ grid-template-columns:1fr 1fr !important; }
  body.studio-enabled .account-metric{ min-height:96px; }
  body.studio-enabled .account-details{ grid-template-columns:1fr !important; }
  body.studio-enabled .quiz-type-grid{ grid-template-columns:1fr !important; }
  body.studio-enabled .answers button{ min-height:50px !important; }
  body.studio-enabled .quiz-prompt{ font-size:19px !important; }
  body.studio-enabled .result-grid{ grid-template-columns:1fr !important; }

  /* Bottom nav */
  body.studio-enabled .mobile-dock{
    background:var(--rd-static-color-150) !important;
    backdrop-filter:saturate(180%) blur(20px);
    -webkit-backdrop-filter:saturate(180%) blur(20px);
    border-top:1px solid var(--rd-static-color-151) !important;
    box-shadow:var(--shadow-rd-016) !important;
    padding-bottom:env(safe-area-inset-bottom);
  }
  html[data-theme="dark"] body.studio-enabled .mobile-dock{
    background:var(--rd-static-color-153) !important;
    border-top-color:var(--rd-static-color-154) !important;
  }
  body.studio-enabled .bottom-nav{
    display:grid !important;
    grid-template-columns:repeat(5,1fr);
    gap:2px;
    padding:6px 6px 8px !important;
  }
  body.studio-enabled .bottom-nav button{
    display:flex !important;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:3px;
    min-height:50px !important;
    padding:5px 6px !important;
    border:0 !important;
    border-radius:var(--radius-rd-002) !important;
    background:var(--rd-static-color-010) !important;
    color:var(--rd-muted) !important;
    font-size:11px !important;
    font-weight:600 !important;
    letter-spacing:-.01em;
    line-height:1.15;
    box-shadow:none !important;
    text-align:center;
  }
  body.studio-enabled .bottom-nav button svg{ width:21px;height:21px;stroke-width:1.8; }
  body.studio-enabled .bottom-nav button.active{
    background:var(--rd-brand-soft) !important;
    color:var(--rd-brand) !important;
    box-shadow:none !important;
  }
  body.studio-enabled .bottom-nav button.active svg{ stroke-width:2.1; }
}

/* --- Mobile: ưu tiên đúng cho CTA hero (legacy dùng ID nên cần selector mạnh hơn) --- */
@media (max-width:980px){
  html body.studio-enabled #studioHome.overview-v216 .mobile-today-hero .mobile-hero-cta:not(:disabled){
    background:var(--rd-static-color-021) !important;
    color:var(--rd-static-color-018) !important;
    border:0 !important;
    box-shadow:var(--shadow-rd-015) !important;
  }
  html body.studio-enabled #studioHome.overview-v216 .mobile-today-hero .mobile-hero-cta:not(:disabled):is(:hover,:focus-visible){
    background:var(--rd-static-color-021) !important;
    color:var(--rd-static-color-104) !important;
  }
  html body.studio-enabled #studioHome.overview-v216 .mobile-today-hero .mobile-hero-result:not(:disabled){
    background:var(--rd-static-color-070) !important;
    border:1px solid var(--rd-static-color-144) !important;
    color:var(--rd-static-color-021) !important;
    box-shadow:none !important;
  }
  /* Hàng nghe nhạc: 1 cột để chữ không bị ép */
  body.studio-enabled .home-music-grid{ grid-template-columns:minmax(0,1fr) !important; }
  body.studio-enabled :is(.home-music-chill,.home-music-entry){
    min-height:62px;
    padding:12px 14px !important;
  }
  body.studio-enabled :is(.home-music-chill,.home-music-entry) { min-width:0; }
  body.studio-enabled :is(.home-music-chill,.home-music-entry) :is(strong,small){ white-space:normal; overflow-wrap:anywhere; }
  body.studio-enabled :is(.home-music-chill,.home-music-entry) strong{ font-size:13px; }
  body.studio-enabled :is(.home-music-chill,.home-music-entry) small{ font-size:12px; }
}

/* --- Thanh hành động nổi trên mobile (chế độ tập trung) --- */
body.studio-enabled .mobile-card-actions{
  background:var(--rd-static-color-155) !important;
  backdrop-filter:saturate(180%) blur(20px);
  -webkit-backdrop-filter:saturate(180%) blur(20px);
  border-top:1px solid var(--rd-static-color-151) !important;
  box-shadow:var(--shadow-rd-017) !important;
  padding:10px 14px calc(10px + env(safe-area-inset-bottom)) !important;
  display:grid !important;
  grid-template-columns:1fr 1fr auto !important;
  gap:8px !important;
}
html[data-theme="dark"] body.studio-enabled .mobile-card-actions{
  background:var(--rd-static-color-157) !important;
  border-top-color:var(--rd-static-color-154) !important;
}
body.studio-enabled .mobile-card-actions button{
  min-height:48px !important;
  border-radius:var(--radius-rd-002) !important;
  font-size:13px !important;
  font-weight:650 !important;
  border:1px solid var(--rd-line) !important;
  background:var(--rd-surface) !important;
  color:var(--rd-ink) !important;
  box-shadow:none !important;
}
html body.studio-enabled .mobile-card-actions button:nth-child(1){
  background:var(--rd-static-color-123) !important;color:var(--rd-static-color-124) !important;border-color:var(--rd-static-color-125) !important;
}
html body.studio-enabled .mobile-card-actions button:nth-child(2){
  background:var(--rd-static-color-120) !important;color:var(--rd-static-color-121) !important;border-color:var(--rd-static-color-122) !important;
}
html body.studio-enabled .mobile-card-actions button:nth-child(3){
  background:linear-gradient(180deg,var(--rd-static-color-040),var(--rd-static-color-041)) !important;
  color:var(--rd-static-color-021) !important;border-color:var(--rd-static-color-010) !important;
  box-shadow:var(--shadow-rd-006) !important;
}

/* Thanh tiến độ ở chế độ tập trung */
body.studio-enabled .mobile-focus-bar{
  background:var(--rd-static-color-158) !important;
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
  border-bottom:1px solid var(--rd-static-color-012) !important;
  padding:8px 14px !important;
  gap:10px !important;
  display:flex;align-items:center;
}
html[data-theme="dark"] body.studio-enabled .mobile-focus-bar{
  background:var(--rd-static-color-159) !important;
  border-bottom-color:var(--rd-static-color-154) !important;
}
body.studio-enabled .mobile-focus-bar strong{
  font-size:13px !important;
  font-weight:700 !important;
  color:var(--rd-ink) !important;
  letter-spacing:-.01em;
}
body.studio-enabled .mobile-focus-bar progress{
  height:6px !important;
  background:var(--rd-line-soft) !important;
  border-radius:var(--radius-rd-006);
}
body.studio-enabled .mobile-focus-bar progress::-webkit-progress-bar{ background:var(--rd-line-soft) !important; }
body.studio-enabled .mobile-focus-bar progress::-webkit-progress-value{ background:var(--rd-brand) !important; }
body.studio-enabled .mobile-focus-bar > button{
  width:44px;height:44px;min-height:44px;min-width:44px;
  font-size:20px;line-height:1;
  border-radius:var(--radius-rd-003) !important;
  border:1px solid var(--rd-line) !important;
  background:var(--rd-surface) !important;
  color:var(--rd-ink) !important;
  display:grid;place-items:center;
  box-shadow:none !important;
}

/* --- Bài học mobile gọn hơn --- */
@media (max-width:980px){
  body.studio-enabled .lesson-row{ min-height:0 !important; }
  body.studio-enabled .lesson-row-text progress{ margin-bottom:0 !important; }
  body.studio-enabled .lesson-resume{
    background:linear-gradient(180deg,var(--rd-static-color-113),var(--rd-static-color-160)) !important;
    border-color:var(--rd-static-color-161) !important;
    color:var(--rd-static-color-018) !important;
    font-weight:700 !important;
  }
  body.studio-enabled .lesson-level-picker{
    justify-content:flex-start;
    padding:0 14px !important;
    font-size:12.5px !important;
  }
}

/* --- Chỉ hiện thanh hành động khi ở chế độ tập trung --- */
body.studio-enabled:not(.mobile-focus) .mobile-card-actions{
  display:none !important;
}
body.studio-enabled.mobile-focus .mobile-card-actions{
  display:grid !important;
}
@media (max-width:980px){
  body.studio-enabled .quiz-type-grid label{
    min-height:48px !important;
    height:auto !important;
    padding:12px 14px !important;
    align-items:center;
  }
  body.studio-enabled .quiz-type-grid{ grid-auto-rows:auto !important; }
}

/* --- Checkbox/radio: không bị kéo cao bởi touch-target legacy --- */
html body.studio-enabled :is(input[type=checkbox],input[type=radio]){
  width:18px !important;
  height:18px !important;
  min-height:0 !important;
  max-height:18px !important;
  margin:0 !important;
  padding:0 !important;
  flex:0 0 auto;
  border-radius:var(--radius-rd-007);
  accent-color:var(--rd-brand);
}

/* --- Hệ thống disclosure: bỏ marker mặc định, dùng chevron thống nhất --- */
body.studio-enabled summary{
  list-style:none;
  display:flex;
  align-items:center;
  gap:8px;
}
body.studio-enabled summary::-webkit-details-marker,
body.studio-enabled summary::marker{ display:none; content:""; }
body.studio-enabled summary::after{
  content:"";
  width:13px;height:13px;
  margin-left:auto;
  flex:none;
  background:currentColor;
  opacity:.38;
  -webkit-mask:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center/contain no-repeat;
  transition:transform .22s ease;
}
body.studio-enabled details[open] > summary::after{ transform:rotate(180deg); }
body.studio-enabled .overview-search[open] > summary::after{ transform:rotate(180deg); }

/* Ngoại lệ: summary dạng lưới của "Từ vựng hôm nay" */
body.studio-enabled .overview-word-row summary{
  display:grid !important;
  grid-template-columns:auto minmax(0,1fr) !important;
  gap:2px 10px !important;
  align-items:center;
}
body.studio-enabled .overview-word-row summary::after{ display:none !important; }

/* Nhóm cài đặt trên mobile */
body.studio-enabled .mobile-account-group,
body.studio-enabled .mobile-home-stats,
body.studio-enabled .hub-group{
  background:var(--rd-surface) !important;
  border:1px solid var(--rd-line) !important;
  border-radius:var(--rd-r-md) !important;
  box-shadow:var(--rd-shadow-xs) !important;
}
body.studio-enabled .mobile-account-group > summary,
body.studio-enabled .hub-group > summary{
  font-size:13.5px !important;
  font-weight:650 !important;
  color:var(--rd-ink) !important;
  padding:15px 16px !important;
  border-radius:var(--rd-r-md) !important;
}

/* --- Banner gọn cho khối đánh giá trình độ --- */
@media (min-width:981px){
  body.studio-enabled #placementEntry{
    display:flex;
    align-items:center;
    gap:22px;
    padding:16px 20px;
  }
  body.studio-enabled #placementEntry h3{
    margin:0;
    flex:none;
    white-space:nowrap;
  }
  body.studio-enabled #placementEntry p{
    margin:0;
    flex:1;
    min-width:0;
  }
  body.studio-enabled #placementEntry > button{
    flex:none;
    margin:0 !important;
  }
}

/* Tránh nhân đôi chevron ở các summary đã có icon mũi tên riêng */
body.studio-enabled summary:has(.di-chev)::after,
body.studio-enabled summary:has([data-icon])::after{ display:none !important; }
body.studio-enabled .drawer-group-heading{
  border-radius:var(--radius-rd-002) !important;
  font-size:13.5px !important;
  font-weight:650 !important;
  color:var(--rd-brand) !important;
}
body.studio-enabled .drawer-item{
  border-radius:var(--radius-rd-003) !important;
  min-height:46px !important;
  font-size:13.5px !important;
  color:var(--rd-ink-2) !important;
}
body.studio-enabled .drawer-item:hover{ background:var(--rd-brand-tint) !important; color:var(--rd-brand) !important; }
body.studio-enabled .drawer-head strong{ font-size:15.5px;font-weight:750;letter-spacing:-.03em; }
body.studio-enabled .drawer-head span{ font-size:12px;color:var(--rd-muted); }
body.studio-enabled .drawer{ background:var(--rd-surface) !important; }

/* Logo 汉 trong drawer/about dùng cùng ngôn ngữ với brand mark */
body.studio-enabled .about-logo{
  background:linear-gradient(150deg,var(--rd-static-color-016) 0%,var(--rd-static-color-017) 60%,var(--rd-static-color-018) 100%) !important;
  color:var(--rd-static-color-021) !important;
  border-radius:var(--radius-rd-001) !important;
  box-shadow:var(--shadow-rd-002);
}

/* ============================================================ ROUND 2 FIX */

/* ---- G. Nhịp animation thống nhất (mượt hơn, không giật) ---- */
body.studio-enabled :is(button,summary,a){
  transition:
    background-color .18s var(--rd-ease),
    border-color .18s var(--rd-ease),
    color .16s var(--rd-ease),
    box-shadow .24s var(--rd-ease),
    transform .18s var(--rd-ease),
    opacity .18s var(--rd-ease) !important;
  will-change:auto;
}
body.studio-enabled :is(.shortcut,.lesson-row,.home-music-chill,.home-music-entry,.hero-button,.review-reminder,.side-card){
  transition:
    background-color .18s var(--rd-ease),
    border-color .18s var(--rd-ease),
    box-shadow .26s var(--rd-ease),
    transform .22s var(--rd-ease) !important;
}
/* Chuyển theme mượt, không chớp */
body.studio-enabled,
body.studio-enabled .app-shell,
body.studio-enabled .sidebar,
body.studio-enabled .topbar,
body.studio-enabled .tabbar{
  transition:background-color .3s var(--rd-ease), color .3s var(--rd-ease), border-color .3s var(--rd-ease);
}
@media (prefers-reduced-motion:reduce){
  body.studio-enabled :is(button,summary,a){ transition:none !important; }
}

/* ---- A. Căn giữa icon trong nút tròn ---- */
html body.studio-enabled :is(.icon-button,.theme-button,.menu-button,#headerSearch,#themeToggle,#headerInfo,.avatar-button,.drawer-close){
  padding:0 !important;
  place-items:center !important;
  place-content:center !important;
  line-height:0 !important;
}
html body.studio-enabled :is(.icon-button,.theme-button,.menu-button,#headerSearch,#themeToggle,#headerInfo,.avatar-button,.drawer-close) > i,
html body.studio-enabled :is(.icon-button,.theme-button,.menu-button,#headerSearch,#themeToggle,#headerInfo,.avatar-button) > i > svg{
  display:grid !important;
  place-items:center !important;
  line-height:0 !important;
  font-size:0 !important;
  width:auto !important;
  height:auto !important;
}
html body.studio-enabled :is(.icon-button,.theme-button,.menu-button,#headerSearch,#themeToggle,#headerInfo,.avatar-button) svg{
  display:block !important;
  width:18px !important;
  height:18px !important;
}
html body.studio-enabled .topbar-actions{ align-items:center !important; }
html body.studio-enabled .topbar-actions > button{ vertical-align:middle; }

/* ---- B. Hover: bỏ nền tím đặc, dùng tint nhẹ + giữ màu chữ ---- */
@media (hover:hover){
  html body.studio-enabled :is(button:where(:not([data-ui-owned]):not(.ui-btn)),summary):hover:not(:disabled){
    background-color:var(--rd-static-color-162) !important;
    border-color:var(--rd-static-color-163) !important;
    color:var(--rd-ink) !important;
    transform:none !important;
    filter:none !important;
  }
  /* Chữ con giữ đúng sắc độ thay vì bị ép trắng */
  html body.studio-enabled :is(button:where(:not([data-ui-owned]):not(.ui-btn)),summary):hover:not(:disabled) *{
    color:inherit !important;
  }
  /* Các thành phần có nền màu riêng vẫn giữ màu chữ tương phản */
  html body.studio-enabled :is(button,summary):hover:not(:disabled) :is(.badge-done,.mastery-btn.known,.mastery-btn.unknown,.lesson-number,.hsk-tag,.overview-due,.tag,.ic-tile,.shortcut-icon,.avatar-btn,.avatar-button){
    color:revert !important;
  }
  html body.studio-enabled :is(button,summary):hover:not(:disabled) .badge-done .ic{ color:var(--rd-static-color-021) !important; }

  /* Nút chính giữ nguyên gradient + chữ trắng khi hover */
  html body.studio-enabled :is(
    .hero-button,.mobile-hero-cta,#next,#passivePlay,#srsStart,#srsReveal,#compareStart,
    #mistakeStart,#memoryLearnCurrent,#translationSubmit,#accountSubmit,#lessonChatSend,#planGoSetup,
    #quizForm button[type=submit],#searchForm button[type=submit],#planForm button[type=submit],
    #translationAskSubmit,#lessonSelectionForm button[type=submit],.clean-home-search form button
  ):hover:not(:disabled){
    background:linear-gradient(180deg,var(--rd-static-color-043) 0%,var(--rd-static-color-044) 100%) !important;
    color:var(--rd-static-color-021) !important;
    border-color:var(--rd-static-color-010) !important;
  }
  html body.studio-enabled :is(
    .hero-button,#next,#passivePlay,#srsStart,#srsReveal,#compareStart,#mistakeStart,
    #memoryLearnCurrent,#translationSubmit,#accountSubmit,#lessonChatSend,#planGoSetup,
    #quizForm button[type=submit],#searchForm button[type=submit],#planForm button[type=submit]
  ):hover:not(:disabled) *{ color:var(--rd-static-color-021) !important; }
  html body.studio-enabled .hero-button:hover{
    background:var(--rd-static-color-021) !important;
    color:var(--rd-static-color-074) !important;
    transform:translateY(-1px) !important;
  }
  html body.studio-enabled .hero-button:hover *{ color:var(--rd-static-color-074) !important; }

  /* Nút đáp án giữ trạng thái đúng/sai */
  html body.studio-enabled .answers button.correct:disabled{ background:var(--legacy-hex-e8f6ef) !important; }
  html body.studio-enabled .answers button.wrong:disabled{ background:var(--legacy-hex-fff0f0) !important; }
  html body.studio-enabled .mastery-btn.known:hover{ background:var(--rd-static-color-126) !important; color:var(--rd-static-color-121) !important; }
  html body.studio-enabled .mastery-btn.unknown:hover{ background:var(--rd-static-color-127) !important; color:var(--rd-static-color-124) !important; }
  html body.studio-enabled .mobile-card-actions button:nth-child(1):hover{ background:var(--rd-static-color-127) !important; color:var(--rd-static-color-124) !important; }
  html body.studio-enabled .mobile-card-actions button:nth-child(2):hover{ background:var(--rd-static-color-126) !important; color:var(--rd-static-color-121) !important; }
  html body.studio-enabled .mobile-card-actions button:nth-child(3):hover{
    background:linear-gradient(180deg,var(--rd-static-color-043),var(--rd-static-color-044)) !important; color:var(--rd-static-color-021) !important;
  }
  html body.studio-enabled .ratings button:hover{ filter:brightness(.97); }

  /* Card/nút dạng khối: nhấc nhẹ, viền brand */
  html body.studio-enabled :is(.shortcut[data-studio-go],.lesson-row,.home-music-chill,.home-music-entry):hover{
    background-color:var(--rd-surface) !important;
    border-color:var(--rd-static-color-082) !important;
    transform:translateY(-2px) !important;
    box-shadow:var(--rd-shadow-md) !important;
  }
  html body.studio-enabled :is(.shortcut[data-studio-go],.lesson-row,.home-music-chill,.home-music-entry):hover *{
    color:inherit !important;
  }
  html body.studio-enabled .review-reminder:hover{
    background:linear-gradient(180deg,var(--rd-static-color-101),var(--rd-static-color-102)) !important;
    transform:translateY(-1px) !important;
  }
}

/* ---- E. Không để summary tràn khỏi card (chữ sát viền + đè nút khác) ---- */
body.studio-enabled #homePlanSettings{
  overflow:hidden;
}
body.studio-enabled #homePlanSettings > summary{
  margin:0 !important;
  padding:16px 0 12px !important;
  border-radius:var(--radius-rd-012) !important;
  background:var(--rd-static-color-010) !important;
}
body.studio-enabled #homePlanSettings > summary:hover{
  background:var(--rd-static-color-010) !important;
}
body.studio-enabled #homePlanSettings[open] > summary{
  margin-bottom:0 !important;
  border-radius:var(--radius-rd-012) !important;
}
body.studio-enabled :is(.plan-panel,.clean-disclosure,.overview-search,.memory-schedule,.ocr-panel) > summary{
  margin:0 !important;
}
body.studio-enabled .plan-panel,
body.studio-enabled .clean-disclosure,
body.studio-enabled .overview-search{
  overflow:hidden;
}
body.studio-enabled #planEmpty{
  padding:2px 0 4px;
}
body.studio-enabled #planEmpty p{
  color:var(--rd-muted) !important;
  font-size:12.5px;
}

/* ---- C. Sidebar cố định, cuộn độc lập với nội dung ---- */
@media (min-width:981px){
  body.studio-enabled{
    height:100vh;
    overflow:hidden;
  }
  body.studio-enabled .app-shell{
    height:100vh;
    min-height:0;
    overflow:hidden;
  }
  body.studio-enabled .sidebar{
    position:relative;
    top:auto;
    height:100vh;
    overflow-y:auto;
    overflow-x:hidden;
    overscroll-behavior:contain;
    scrollbar-width:thin;
    scrollbar-color:var(--rd-static-color-164) var(--rd-static-color-010);
  }
  body.studio-enabled .sidebar::-webkit-scrollbar{ width:6px; }
  body.studio-enabled .sidebar::-webkit-scrollbar-thumb{
    background:var(--rd-static-color-165);border-radius:var(--radius-rd-006);
  }
  body.studio-enabled .sidebar::-webkit-scrollbar-track{ background:var(--rd-static-color-010); }
  body.studio-enabled .app-area{
    height:100vh;
    min-width:0;
    overflow-y:auto;
    overflow-x:hidden;
    overscroll-behavior:contain;
    scrollbar-width:thin;
    scrollbar-color:var(--rd-static-color-164) var(--rd-static-color-010);
  }
  body.studio-enabled .app-area::-webkit-scrollbar{ width:10px; }
  body.studio-enabled .app-area::-webkit-scrollbar-thumb{
    background:var(--rd-static-color-166);border-radius:var(--radius-rd-006);border:3px solid var(--rd-static-color-010);background-clip:content-box;
  }
  body.studio-enabled .app-area::-webkit-scrollbar-track{ background:var(--rd-static-color-010); }
  body.studio-enabled main.workspace{ padding-bottom:60px; }
}

/* Rail icon gọn cho 981–1190px */
@media (min-width:721px) and (max-width:980px){
  body.studio-enabled .sidebar{
    width:78px;
    padding:18px 10px;
    align-items:center;
  }
  body.studio-enabled .brand-side{
    padding:2px 0 18px;
    justify-content:center;
    width:100%;
  }
  body.studio-enabled .side-nav{ width:100%; align-items:center; }
  body.studio-enabled .side-nav button{
    width:46px;height:46px;min-height:46px;
    padding:0;
    justify-content:center;
    margin:0 auto;
  }
  body.studio-enabled .side-nav button.active{ border-radius:var(--radius-rd-013); }
  body.studio-enabled .side-quick{ width:100%; align-items:center; }
  body.studio-enabled .side-quick button{
    width:46px;height:42px;min-height:42px;
    padding:0;justify-content:center;margin:0 auto;
  }
  body.studio-enabled .side-divider{ margin:12px 6px; }
}

/* ---- D. Nền không còn vệt lệch khi cửa sổ nhỏ ---- */
html{ background:var(--rd-canvas) !important; }
body.studio-enabled{
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
}

/* A2. Sửa lại: icon phải có kích thước cố định, không để auto gây co về 0 */
html body.studio-enabled :is(.icon-button,.theme-button,.menu-button,#headerSearch,#themeToggle,#headerInfo,.avatar-button,.drawer-close){
  padding:0 !important;
  place-items:center !important;
  place-content:center !important;
  line-height:0 !important;
}
html body.studio-enabled :is(.icon-button,.theme-button,.menu-button,#headerSearch,#themeToggle,#headerInfo,.avatar-button,.drawer-close) > i{
  display:grid !important;
  place-items:center !important;
  place-content:center !important;
  line-height:0 !important;
  font-size:0 !important;
  width:18px !important;
  height:18px !important;
  flex:0 0 auto !important;
}
html body.studio-enabled :is(.icon-button,.theme-button,.menu-button,#headerSearch,#themeToggle,#headerInfo,.avatar-button,.drawer-close) > i > svg,
html body.studio-enabled :is(.icon-button,.theme-button,.menu-button,#headerSearch,#themeToggle,#headerInfo,.avatar-button,.drawer-close) > svg{
  display:block !important;
  width:18px !important;
  height:18px !important;
  max-width:none !important;
  max-height:none !important;
  margin:0 !important;
}

/* ====================================================== ROUND 2B — HOVER V2
   ui-buttons.css ép mọi button/summary khi hover thành nền tím + chữ trắng
   với specificity (0,4,3). Dùng thêm :not(#_rd) để nâng specificity lên mức ID
   và thay bằng hover tint nhẹ, giữ đúng màu chữ.                              */
@media (hover:hover){

  /* 1. Nền hover chung: tint rất nhẹ */
  html body:not(#_rd).studio-enabled :is(button:where(:not([data-ui-owned]):not(.ui-btn)),summary):hover:not(:disabled){
    background-color:var(--rd-static-color-055) !important;
    border-color:var(--rd-static-color-009) !important;
    color:var(--rd-ink) !important;
    transform:none !important;
    filter:none !important;
  }
  /* 2. Chữ bên trong: không bị ép trắng */
  html body:not(#_rd).studio-enabled :is(button:where(:not([data-ui-owned]):not(.ui-btn)),summary):hover:not(:disabled) *{
    color:inherit !important;
  }

  /* 3. Trả lại màu cho các ô/biểu tượng có nền riêng */
  html body:not(#_rd).studio-enabled .shortcut:hover .shortcut-icon.indigo{ background:var(--rd-static-color-083) !important; color:var(--rd-static-color-035) !important; }
  html body:not(#_rd).studio-enabled .shortcut:hover .shortcut-icon.peach{ background:var(--rd-static-color-084) !important; color:var(--rd-static-color-085) !important; }
  html body:not(#_rd).studio-enabled .shortcut:hover .shortcut-icon.mint{ background:var(--rd-static-color-086) !important; color:var(--rd-static-color-087) !important; }
  html body:not(#_rd).studio-enabled .shortcut:hover .shortcut-icon.sky{ background:var(--rd-static-color-088) !important; color:var(--rd-static-color-089) !important; }
  html body:not(#_rd).studio-enabled .lesson-row:hover .lesson-number{ background:var(--rd-brand-soft) !important; color:var(--rd-brand) !important; }
  html body:not(#_rd).studio-enabled :is(.row,.lesson-row,.shortcut):hover :is(.ic-tile,.shortcut-icon) svg{ color:inherit !important; }
  html body:not(#_rd).studio-enabled .shortcut:hover .overview-due{ background:var(--rd-brand-soft) !important; color:var(--rd-brand) !important; }
  html body:not(#_rd).studio-enabled :is(.row,.lesson-row):hover .badge-done{ background:var(--green) !important; color:var(--rd-static-color-021) !important; }
  html body:not(#_rd).studio-enabled :is(.row,.lesson-row):hover .badge-done svg{ color:var(--rd-static-color-021) !important; }
  html body:not(#_rd).studio-enabled .home-music-chill:hover > span:first-child{ background:var(--rd-brand-soft) !important; color:var(--rd-brand) !important; }
  html body:not(#_rd).studio-enabled .home-music-entry:hover > span:first-child{ background:var(--rd-sky-soft) !important; color:var(--rd-sky) !important; }
  html body:not(#_rd).studio-enabled .overview-word-row summary:hover span:first-of-type{ color:var(--rd-brand) !important; }
  html body:not(#_rd).studio-enabled .review-reminder:hover strong{ color:var(--rd-static-color-104) !important; }
  html body:not(#_rd).studio-enabled .review-reminder:hover small{ color:var(--rd-static-color-105) !important; }
  html body:not(#_rd).studio-enabled .review-reminder:hover > span:first-child{ color:var(--rd-static-color-024) !important; }
  html body:not(#_rd).studio-enabled .today-card:hover .today-title{ color:var(--rd-muted) !important; }

  /* 4. Nút chính: giữ gradient + chữ trắng */
  html body:not(#_rd).studio-enabled :is(
    .mobile-hero-cta,#next,#passivePlay,#srsStart,#srsReveal,#compareStart,#mistakeStart,
    #memoryLearnCurrent,#translationSubmit,#accountSubmit,#lessonChatSend,#planGoSetup,
    #quizForm button[type=submit],#searchForm button[type=submit],#planForm button[type=submit],
    #translationAskSubmit,#lessonSelectionForm button[type=submit],.clean-home-search form button,
    .mobile-card-actions button:nth-child(3)
  ):hover:not(:disabled){
    background:linear-gradient(180deg,var(--rd-static-color-043) 0%,var(--rd-static-color-044) 100%) !important;
    color:var(--rd-static-color-021) !important;
    border-color:var(--rd-static-color-010) !important;
    box-shadow:var(--shadow-rd-018) !important;
    transform:translateY(-1px) !important;
  }
  html body:not(#_rd).studio-enabled :is(
    .mobile-hero-cta,#next,#passivePlay,#srsStart,#srsReveal,#compareStart,#mistakeStart,
    #memoryLearnCurrent,#translationSubmit,#accountSubmit,#lessonChatSend,#planGoSetup,
    #quizForm button[type=submit],#searchForm button[type=submit],#planForm button[type=submit],
    .clean-home-search form button,.mobile-card-actions button:nth-child(3)
  ):hover:not(:disabled) *{ color:var(--rd-static-color-021) !important; }

  html body:not(#_rd).studio-enabled .hero-button:hover{
    background:var(--rd-static-color-021) !important;
    color:var(--rd-static-color-074) !important;
    transform:translateY(-1px) !important;
    box-shadow:var(--shadow-rd-009) !important;
  }
  html body:not(#_rd).studio-enabled .hero-button:hover *{ color:var(--rd-static-color-074) !important; }

  /* 5. Nút ngữ nghĩa giữ đúng màu */
  html body:not(#_rd).studio-enabled .mastery-btn.known:hover{ background:var(--rd-static-color-126) !important; color:var(--rd-static-color-121) !important; }
  html body:not(#_rd).studio-enabled .mastery-btn.unknown:hover{ background:var(--rd-static-color-127) !important; color:var(--rd-static-color-124) !important; }
  html body:not(#_rd).studio-enabled .mobile-card-actions button:nth-child(1):hover{ background:var(--rd-static-color-127) !important; color:var(--rd-static-color-124) !important; }
  html body:not(#_rd).studio-enabled .mobile-card-actions button:nth-child(2):hover{ background:var(--rd-static-color-126) !important; color:var(--rd-static-color-121) !important; }
  html body:not(#_rd).studio-enabled .ratings button:hover{ filter:brightness(.97); }
  html body:not(#_rd).studio-enabled .answers button:not(.correct):not(.wrong):hover{
    background:var(--rd-brand-tint) !important;
    color:var(--rd-ink) !important;
    border-color:var(--rd-static-color-133) !important;
  }
  html body:not(#_rd).studio-enabled .answers button.correct:disabled{ background:var(--legacy-hex-e8f6ef) !important; color:var(--legacy-hex-145b37) !important; }
  html body:not(#_rd).studio-enabled .answers button.wrong:disabled{ background:var(--legacy-hex-fff0f0) !important; color:var(--legacy-hex-9a3038) !important; }

  /* 6. Card dạng khối: nền trắng, viền brand, nhấc nhẹ */
  html body:not(#_rd).studio-enabled :is(.shortcut[data-studio-go],.lesson-row,.home-music-chill,.home-music-entry):hover{
    background-color:var(--rd-surface) !important;
    border-color:var(--rd-static-color-082) !important;
    transform:translateY(-2px) !important;
    box-shadow:var(--rd-shadow-md) !important;
  }
  html body:not(#_rd).studio-enabled :is(.shortcut[data-studio-go],.lesson-row,.home-music-chill,.home-music-entry):hover :is(strong,small,span){ color:inherit !important; }
  html body:not(#_rd).studio-enabled .shortcut[data-studio-go]:hover strong{ color:var(--rd-ink) !important; }
  html body:not(#_rd).studio-enabled .shortcut[data-studio-go]:hover small{ color:var(--rd-muted) !important; }
  html body:not(#_rd).studio-enabled .lesson-row:hover :is(.row-title,strong){ color:var(--rd-ink) !important; }
  html body:not(#_rd).studio-enabled .lesson-row:hover :is(.row-meta,small,span){ color:var(--rd-muted) !important; }

  /* 7. Không tô nền cho header của card thiết lập */
  html body:not(#_rd).studio-enabled #homePlanSettings > summary:hover{
    background:var(--rd-static-color-010) !important;
    color:var(--rd-ink) !important;
  }
  html body:not(#_rd).studio-enabled #homePlanSettings > summary:hover *{ color:inherit !important; }
}

/* Rail: canh giữa icon tuyệt đối + không kéo dãn nút */
@media (min-width:721px) and (max-width:980px){
  body.studio-enabled .side-nav{ align-items:center !important; }
  body.studio-enabled .side-nav button{
    width:46px !important;
    min-width:46px !important;
    max-width:46px !important;
    flex:0 0 auto !important;
    align-self:center !important;
  }
  body.studio-enabled .side-quick button{
    width:46px !important;
    min-width:46px !important;
    max-width:46px !important;
    flex:0 0 auto !important;
    align-self:center !important;
  }
  body.studio-enabled .brand-side{ justify-content:center !important; }
}

/* Hàng "Chọn HSK..." + nút: đẩy nút về cuối hàng cho cân */
@media (min-width:981px){
  body.studio-enabled #studioHome #planEmpty{
    justify-content:space-between;
    gap:24px;
  }
  body.studio-enabled #studioHome #planEmpty p{ max-width:64ch; }
  body.studio-enabled #studioHome #planEmpty > button{ margin-left:auto !important; }
}

/* Lưới shortcut tự co giãn theo bề rộng cột nội dung */
@media (min-width:981px){
  body.studio-enabled #studioHome .shortcut-grid{
    grid-template-columns:repeat(auto-fit,minmax(156px,1fr)) !important;
  }
  body.studio-enabled #studioHome .shortcut-grid .shortcut{ min-height:126px !important; }
}

/* 981–1190: hero gọn lại để không bị chật */
@media (min-width:981px) and (max-width:1190px){
  body.studio-enabled #studioHome .feature-hero{ padding:26px 24px !important; }
  body.studio-enabled #studioHome .feature-hero .feature-copy{ max-width:calc(100% - 128px) !important; }
  body.studio-enabled #studioHome .hero-character{
    width:100px !important; height:100px !important;
    right:20px !important;
    font-size:38px !important;
    border-radius:var(--radius-rd-014) !important;
  }
  body.studio-enabled #studioHome .hero-character span{ font-size:38px !important; }
  body.studio-enabled #studioHome .feature-hero h3{ font-size:21px !important; }
  body.studio-enabled #studioHome .feature-hero p{ font-size:12.5px !important; }
  body.studio-enabled #studioHome .dashboard-grid{
    grid-template-columns:minmax(0,1.6fr) minmax(240px,.85fr) !important;
  }
}

/* Lưới shortcut: 4 cột khi cột nội dung đủ rộng, 2×2 khi hẹp (container query) */
@media (min-width:981px){
  body.studio-enabled #studioHome .dashboard-primary{
    container-type:inline-size;
    container-name:rdprimary;
  }
  body.studio-enabled #studioHome .shortcut-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:12px !important;
  }
}
@container rdprimary (min-width:636px){
  body.studio-enabled #studioHome .shortcut-grid{
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  }
}

/* Khi chỉ đủ 2 cột: card shortcut chuyển sang dạng hàng ngang gọn */
@container rdprimary (max-width:635px){
  html body:not(#_rd).studio-enabled #studioHome.overview-v216 .shortcut[data-studio-go]{
    display:grid !important;
    grid-template-columns:40px minmax(0,1fr) !important;
    grid-template-rows:auto auto !important;
    align-content:center !important;
    align-items:center !important;
    column-gap:12px !important;
    row-gap:2px !important;
    min-height:82px !important;
    padding:14px 16px !important;
  }
  html body:not(#_rd).studio-enabled #studioHome.overview-v216 .shortcut[data-studio-go] .shortcut-icon{
    grid-row:1 / 3 !important;
    grid-column:1 !important;
    width:40px !important;
    height:40px !important;
    align-self:center !important;
  }
  html body:not(#_rd).studio-enabled #studioHome.overview-v216 .shortcut[data-studio-go] strong{
    grid-column:2 !important;
    grid-row:1 !important;
    margin-top:0 !important;
    align-self:end !important;
    font-size:13.5px !important;
  }
  html body:not(#_rd).studio-enabled #studioHome.overview-v216 .shortcut[data-studio-go] small{
    grid-column:2 !important;
    grid-row:2 !important;
    align-self:start !important;
    font-size:12px !important;
    line-height:1.4 !important;
  }
  html body:not(#_rd).studio-enabled #studioHome.overview-v216 .shortcut[data-studio-go] .shortcut-arrow{
    display:none !important;
  }
  html body:not(#_rd).studio-enabled #studioHome.overview-v216 .shortcut[data-studio-go] .overview-due{
    position:static !important;
    grid-column:2 !important;
    grid-row:1 !important;
    justify-self:end !important;
    align-self:center !important;
  }
}

/* ---- Tinh chỉnh cuối ---- */
body.studio-enabled .lesson-row-text progress{
  margin:6px 0 0 !important;
}
body.studio-enabled .account-week{
  align-content:start !important;
}
body.studio-enabled .account-day{
  justify-content:center !important;
  min-height:56px !important;
}

/* Chuyển theme mượt cho các bề mặt lớn */
body.studio-enabled :is(.panel-box,.activity-panel,.hub-panel,.side-card,.tool-card,.overview-word,.plan-panel,.mobile-dock,.drawer){
  transition:background-color .28s var(--rd-ease), border-color .28s var(--rd-ease), color .28s var(--rd-ease), box-shadow .28s var(--rd-ease);
}
body.studio-enabled .feature-hero{
  transition:box-shadow .3s var(--rd-ease), transform .3s var(--rd-ease);
}

/* Nút trong suốt: hover không đổi màu nền */
body.studio-enabled .section-row > button:hover{
  background:var(--rd-static-color-010) !important;
  text-decoration:underline;
  text-underline-offset:3px;
}

@supports (height:100dvh){
  @media (min-width:981px){
    body.studio-enabled,
    body.studio-enabled .app-shell,
    body.studio-enabled .sidebar,
    body.studio-enabled .app-area{ height:100dvh; }
  }
}

/* Topbar đủ đục để chữ không bị "bóng ma" khi nội dung cuộn bên dưới */
body.studio-enabled .topbar{
  background:var(--rd-static-color-158) !important;
  border-bottom:1px solid var(--rd-static-color-151) !important;
  box-shadow:var(--shadow-rd-019);
}
html[data-theme="dark"] body.studio-enabled .topbar{
  background:var(--rd-static-color-167) !important;
  border-bottom-color:var(--rd-static-color-154) !important;
  box-shadow:none;
}

/* ui-buttons.css đặt margin:-12px cho summary của các khối details
   (selector có nhiều element hơn) → cần đè bằng specificity mức ID
   để bề mặt hover không tràn ra ngoài card. */
html body:not(#_rd).studio-enabled :is(.plan-panel,.clean-disclosure,.overview-search,.memory-schedule,.ocr-panel,.push-settings,.update-push-settings) > summary{
  margin:0 !important;
  border-radius:var(--rd-r-md) !important;
}
html body:not(#_rd).studio-enabled :is(.plan-panel,.clean-disclosure,.overview-search,.memory-schedule,.ocr-panel,.push-settings,.update-push-settings)[open] > summary{
  margin-bottom:0 !important;
  border-bottom-left-radius:0 !important;
  border-bottom-right-radius:0 !important;
}
html body:not(#_rd).studio-enabled .overview-search > summary{
  padding:14px 18px !important;
  border-radius:var(--rd-r-lg) var(--rd-r-lg) 0 0 !important;
}
html body:not(#_rd).studio-enabled .clean-disclosure > summary{
  padding:13px 16px !important;
  border-radius:var(--rd-r-md) !important;
}
html body:not(#_rd).studio-enabled .clean-disclosure[open] > summary{
  border-radius:var(--rd-r-md) var(--rd-r-md) 0 0 !important;
}
html body:not(#_rd).studio-enabled .clean-disclosure{
  background:var(--rd-surface) !important;
  border:1px solid var(--rd-line) !important;
  border-radius:var(--rd-r-md) !important;
  overflow:hidden;
  box-shadow:var(--rd-shadow-xs);
  margin-bottom:14px;
}

/* ------------------------------------------------------------------
   SỬA LỖI CHỨC NĂNG: ứng dụng reset vị trí cuộn bằng
   `document.querySelector('.workspace').scrollTop = 0` (studio.js,
   lessons.js, mobile-layout.js...). Vì vậy chính .workspace phải là
   vùng cuộn, không phải .app-area — nếu không, chuyển trang sẽ giữ
   nguyên vị trí cuộn cũ.
   ------------------------------------------------------------------ */
@media (min-width:981px){
  body.studio-enabled .app-area{
    display:flex;
    flex-direction:column;
    height:100dvh;
    overflow:hidden;
    min-width:0;
  }
  body.studio-enabled main.workspace{
    flex:1 1 auto;
    min-height:0;
    overflow-y:auto;
    overflow-x:hidden;
    overscroll-behavior:contain;
    width:min(100% - 56px,1300px);
    margin:0 auto;
    padding:28px 0 72px;
    scrollbar-width:thin;
    scrollbar-color:var(--rd-static-color-164) var(--rd-static-color-010);
  }
  body.studio-enabled main.workspace::-webkit-scrollbar{ width:10px; }
  body.studio-enabled main.workspace::-webkit-scrollbar-thumb{
    background:var(--rd-static-color-166);border-radius:var(--radius-rd-006);
    border:3px solid var(--rd-static-color-010);background-clip:content-box;
  }
  body.studio-enabled main.workspace::-webkit-scrollbar-track{ background:var(--rd-static-color-010); }
  body.studio-enabled .topbar{
    flex:0 0 auto;
    position:relative;
    top:auto;
  }
}
@supports not (height:100dvh){
  @media (min-width:981px){
    body.studio-enabled .app-area{ height:100vh; }
  }
}

/* ==================================================================
   ROUND 4 — 8 điểm chỉnh theo phản hồi
   ================================================================== */

/* --- 1. Chữ sát rìa: tăng padding trong card "Mục tiêu & lịch học" --- */
html body:not(#_rd).studio-enabled #homePlanSettings{
  padding:20px 22px !important;
}
html body:not(#_rd).studio-enabled #homePlanSettings > summary{
  padding:0 0 14px !important;
  margin:0 !important;
}
html body:not(#_rd).studio-enabled #homePlanSettings > summary:hover{
  background:var(--rd-static-color-010) !important;
}
html body:not(#_rd).studio-enabled #homePlanSettings #planEmpty:not([hidden]){
  display:flex !important;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding:2px 0 6px !important;
}
html body:not(#_rd).studio-enabled #homePlanSettings #planEmpty p{
  margin:0 !important;
  max-width:62ch;
  line-height:1.6;
}
html body:not(#_rd).studio-enabled #planSetup > summary{
  padding:12px 0 8px !important;
  margin:0 !important;
  border-radius:var(--radius-rd-011) !important;
}
html body:not(#_rd).studio-enabled #planSetup > summary:hover{
  background:var(--rd-static-color-010) !important;
  color:var(--rd-brand) !important;
}
html body:not(#_rd).studio-enabled #planSetup > summary:hover *{ color:inherit !important; }

/* --- 2. Cột phụ bám sát trần khi cuộn (sticky đúng offset) --- */
@media (min-width:981px){
  html body:not(#_rd).studio-enabled #studioHome .dashboard-side{
    position:sticky;
    top:0;
    align-self:start;
    margin-top:0;
    padding-top:0;
  }
  html body:not(#_rd).studio-enabled #studioHome .dashboard-grid{
    align-items:start;
  }
}

/* --- 3. Lộ trình: tách thành 3 nút riêng, nổi khi hover --- */
html body:not(#_rd).studio-enabled .pathway{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:12px !important;
  background:var(--rd-static-color-010) !important;
  border:0 !important;
  padding:0 !important;
  box-shadow:none !important;
}
html body:not(#_rd).studio-enabled .path-step{
  position:relative;
  display:flex !important;
  align-items:center;
  gap:12px;
  padding:16px 16px !important;
  background:var(--rd-surface) !important;
  border:1px solid var(--rd-line) !important;
  border-radius:var(--radius-rd-015) !important;
  box-shadow:var(--rd-shadow-xs) !important;
  cursor:pointer;
  text-align:left;
  transition:
    transform .22s var(--rd-ease),
    box-shadow .26s var(--rd-ease),
    border-color .2s var(--rd-ease),
    background-color .2s var(--rd-ease) !important;
}
html body:not(#_rd).studio-enabled .path-step:hover{
  transform:translateY(-3px) !important;
  border-color:var(--rd-static-color-168) !important;
  box-shadow:var(--shadow-rd-020) !important;
  background:var(--rd-surface) !important;
}
html body:not(#_rd).studio-enabled .path-step:active{
  transform:translateY(-1px) scale(.985) !important;
}
html body:not(#_rd).studio-enabled .path-step:focus-visible{
  outline:2px solid var(--rd-brand) !important;
  outline-offset:2px !important;
}
html body:not(#_rd).studio-enabled .path-step > span:first-child{
  transition:background-color .2s var(--rd-ease), color .2s var(--rd-ease), transform .22s var(--rd-ease);
}
html body:not(#_rd).studio-enabled .path-step:hover > span:first-child{
  background:var(--rd-brand) !important;
  color:var(--rd-static-color-021) !important;
  transform:scale(1.06);
}
html body:not(#_rd).studio-enabled .path-step > i{
  margin-left:auto !important;
  color:var(--rd-faint) !important;
  transition:color .2s var(--rd-ease), transform .22s var(--rd-ease) !important;
}
html body:not(#_rd).studio-enabled .path-step:hover > i{
  color:var(--rd-brand) !important;
  transform:translateX(3px) !important;
}
html body:not(#_rd).studio-enabled .path-step:hover :is(strong,small){ color:inherit !important; }
html body:not(#_rd).studio-enabled .path-step:hover strong{ color:var(--rd-ink) !important; }
html body:not(#_rd).studio-enabled .path-step:hover small{ color:var(--rd-muted) !important; }

/* --- 4. Focus ring không chạm/đè phần tử khác --- */
html body:not(#_rd).studio-enabled :is(input,select,textarea):focus-visible{
  outline:2px solid var(--rd-brand) !important;
  outline-offset:-2px !important;
  border-radius:var(--radius-rd-004) !important;
}
html body:not(#_rd).studio-enabled :is(.overview-search,.clean-disclosure,#homePlanSettings,.overview-word) > summary:focus-visible{
  outline:2px solid var(--rd-brand) !important;
  outline-offset:-2px !important;
  border-radius:var(--radius-rd-003) !important;
}

/* --- 5. "Từ vựng hôm nay": cả hàng là một bề mặt, không tách rời --- */
html body:not(#_rd).studio-enabled #homeDailyWord .overview-word-row{
  display:flex !important;
  align-items:stretch;
  gap:0 !important;
  border:0;
  border-top:1px solid var(--rd-line-soft);
  border-radius:var(--radius-none);
  overflow:hidden;
  background:var(--palette-clear);
  transition:background-color .2s var(--rd-ease);
}
html body:not(#_rd).studio-enabled #homeDailyWord .overview-word-row:hover{
  background:var(--rd-brand-tint);
}
html body:not(#_rd).studio-enabled #homeDailyWord .overview-word-row details{
  flex:1;
  min-width:0;
}
html body:not(#_rd).studio-enabled #homeDailyWord .overview-word-row summary{
  padding:12px 14px !important;
  border-radius:var(--radius-rd-012) !important;
  background:var(--rd-static-color-010) !important;
}
html body:not(#_rd).studio-enabled #homeDailyWord .overview-word-row summary:hover{
  background:var(--rd-static-color-010) !important;
}
html body:not(#_rd).studio-enabled #homeDailyWord .overview-word-row summary:hover *{
  color:inherit !important;
}
html body:not(#_rd).studio-enabled #homeDailyWord .overview-word-row summary:hover span:first-of-type{
  color:var(--rd-brand) !important;
}
html body:not(#_rd).studio-enabled #homeDailyWord .overview-word-sound{
  display:flex;
  align-items:center;
  border-left:1px solid var(--rd-line-soft);
  transition:background-color .18s var(--rd-ease);
}
html body:not(#_rd).studio-enabled #homeDailyWord .overview-word-sound:hover{
  background:var(--rd-brand-soft);
}
html body:not(#_rd).studio-enabled #homeDailyWord .overview-word-sound button{
  width:56px !important;
  height:100% !important;
  min-height:56px !important;
  border-radius:var(--radius-rd-012) !important;
  background:var(--rd-static-color-010) !important;
  color:var(--rd-brand) !important;
  display:grid;place-items:center;
}
html body:not(#_rd).studio-enabled #homeDailyWord .overview-word-sound button:hover{
  background:var(--rd-static-color-010) !important;
  color:var(--rd-brand) !important;
}
html body:not(#_rd).studio-enabled #homeDailyWord .overview-word-body{
  margin:0 !important;
  padding:12px 14px 14px !important;
  border-top:1px solid var(--rd-line-soft) !important;
  border-radius:var(--radius-rd-016);
  background:var(--rd-surface);
}

/* --- 6. Animation cho khung hero --- */
@keyframes rd-float{
  0%,100%{ transform:translateY(-50%) translateY(-4px) rotate(0deg); }
  50%    { transform:translateY(-50%) translateY(4px) rotate(-1.2deg); }
}
@keyframes rd-ring-pulse{
  0%,100%{ opacity:.55; transform:scale(1); }
  50%    { opacity:1;   transform:scale(1.045); }
}
@keyframes rd-sheen{
  0%   { background-position:0% 50%, 0 0; }
  50%  { background-position:100% 50%, 0 0; }
  100% { background-position:0% 50%, 0 0; }
}
@keyframes rd-glow{
  0%,100%{ box-shadow:var(--shadow-rd-007); }
  50%    { box-shadow:var(--shadow-rd-021); }
}

body.studio-enabled .feature-hero{
  background-size:180% 180%, 100% 100% !important;
  animation:rd-sheen 16s ease-in-out infinite, rd-glow 7s ease-in-out infinite;
}
body.studio-enabled .feature-hero::before{
  animation:rd-ring-pulse 7s ease-in-out infinite;
  transform-origin:center;
}
body.studio-enabled .feature-hero::after{
  animation:rd-ring-pulse 9s ease-in-out infinite reverse;
  transform-origin:center;
}
body.studio-enabled .feature-hero .hero-character{
  animation:rd-float 5.5s ease-in-out infinite;
  will-change:transform;
}
body.studio-enabled .feature-hero:hover .hero-character{
  animation-play-state:paused;
}

/* Current app compatibility: touch inputs must not trigger Safari focus zoom. */
@media (max-width:980px) {
  html body.studio-enabled :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea) { font-size:16px!important; }
}
html body.studio-enabled .mobile-card-actions[hidden],
html body.studio-enabled .mobile-focus-bar[hidden] { display:none!important; }
html[data-theme="dark"] #studioPractice .ps-level,
html[data-theme="dark"] .rr-badge { color:var(--accent-ink); }
html[data-theme="dark"] body.studio-enabled .study4-exam-panel .s4-visit { background:var(--palette-violet-deep); }

@media (prefers-reduced-motion:reduce){
  body.studio-enabled .feature-hero,
  body.studio-enabled .feature-hero::before,
  body.studio-enabled .feature-hero::after,
  body.studio-enabled .feature-hero .hero-character{
    animation:none !important;
  }
}

/* Desktop sidebar: center icon glyphs on the text line, not the inline SVG baseline. */
@media (min-width:981px){
  body.studio-enabled .sidebar :is(.side-nav,.side-quick) > button{
    display:flex;
    align-items:center;
  }
  body.studio-enabled .sidebar :is(.side-nav,.side-quick) > button > i[data-icon]{
    display:inline-flex;
    flex:0 0 18px;
    width:18px;
    height:18px;
    align-items:center;
    justify-content:center;
    margin:0;
    line-height:0;
    font-style:normal;
  }
  body.studio-enabled .sidebar .side-quick > button > i[data-icon]{
    flex-basis:16px;
    width:16px;
    height:16px;
  }
  body.studio-enabled .sidebar :is(.side-nav,.side-quick) > button > i[data-icon] > svg{
    display:block;
    width:100%;
    height:100%;
    margin:0;
  }
  body.studio-enabled .sidebar :is(.side-nav,.side-quick) > button > span{
    display:flex;
    align-items:center;
    min-width:0;
    line-height:1.25;
  }
}

/* --- 7. Sidebar cố định: không cuộn theo con lăn --- */
@media (min-width:981px){
  html body:not(#_rd).studio-enabled .sidebar{
    overflow:hidden !important;
    overscroll-behavior:contain;
  }
  /* thu gọn để vừa màn hình, không phát sinh thanh cuộn nội bộ */
  html body:not(#_rd).studio-enabled .sidebar .side-nav button{ min-height:42px; }
  html body:not(#_rd).studio-enabled .sidebar .side-quick button{ min-height:36px; }
}
/* Rail dọc: gọn hơn nữa để luôn vừa */
@media (min-width:721px) and (max-width:980px){
  html body:not(#_rd).studio-enabled .sidebar{ overflow:hidden !important; }
  html body:not(#_rd).studio-enabled .sidebar .brand-side{ padding-bottom:12px !important; }
  html body:not(#_rd).studio-enabled .sidebar .side-nav button{ min-height:40px !important; height:40px !important; }
  html body:not(#_rd).studio-enabled .sidebar .side-quick button{ min-height:36px !important; height:36px !important; }
  html body:not(#_rd).studio-enabled .sidebar .side-divider{ margin:8px 6px !important; }
}
/* Màn hình rất thấp: cho phép cuộn để không mất mục menu */
@media (min-width:981px) and (max-height:680px){
  html body:not(#_rd).studio-enabled .sidebar{ overflow-y:auto !important; }
}

/* --- 8. Căn lại nhịp dọc của banner đánh giá --- */
@media (min-width:981px){
  html body:not(#_rd).studio-enabled #placementEntry{
    display:flex;
    align-items:center;
    gap:18px;
    padding:16px 22px !important;
  }
  html body:not(#_rd).studio-enabled #placementEntry h3{
    margin:0 !important;
    line-height:1.35;
    flex:none;
    white-space:nowrap;
  }
  html body:not(#_rd).studio-enabled #placementEntry p{
    margin:0 !important;
    flex:1;
    min-width:0;
    line-height:1.55;
    color:var(--rd-muted);
  }
  html body:not(#_rd).studio-enabled #placementEntry > button{
    flex:none;
    margin:0 !important;
  }
}
@media (max-width:980px){
  html body:not(#_rd).studio-enabled #placementEntry{
    padding:16px 18px !important;
  }
  html body:not(#_rd).studio-enabled #placementEntry h3{
    margin:0 0 6px !important;
    line-height:1.4;
  }
  html body:not(#_rd).studio-enabled #placementEntry p{
    margin:0 0 14px !important;
    line-height:1.6;
  }
  html body:not(#_rd).studio-enabled #placementEntry > button{
    margin:0 !important;
    width:100%;
    justify-content:center;
  }
}

/* 8b. Nhịp dọc cho banner đánh giá ở màn hình hẹp */
@media (max-width:980px){
  html body:not(#_rd).studio-enabled #placementEntry{
    padding:18px 20px !important;
  }
  html body:not(#_rd).studio-enabled #placementEntry h3{
    margin:0 0 8px !important;
    line-height:1.45;
    font-size:15px;
  }
  html body:not(#_rd).studio-enabled #placementEntry p{
    margin:0 0 16px !important;
    line-height:1.65;
    font-size:13px;
  }
}

/* --- 6b. Sửa animation: transform đang bị !important khoá,
       nên dùng thuộc tính translate/rotate độc lập (không xung đột) --- */
@keyframes rd-float{
  0%,100%{ translate:0 -4px; rotate:0deg; }
  50%    { translate:0 5px;  rotate:-1.4deg; }
}
@keyframes rd-sheen{
  0%   { background-position:0% 50%, 0 0; }
  50%  { background-position:100% 50%, 0 0; }
  100% { background-position:0% 50%, 0 0; }
}

body.studio-enabled .feature-hero{
  background-color:var(--rd-static-color-066) !important;
  background-image:
    radial-gradient(120% 140% at 88% -10%, var(--rd-static-color-026) 0%, var(--rd-static-color-064) 55%),
    linear-gradient(135deg,var(--rd-static-color-065) 0%,var(--rd-static-color-066) 48%,var(--rd-static-color-067) 100%) !important;
  background-size:180% 180%, 100% 100% !important;
  background-repeat:no-repeat !important;
  background-position:0% 50%, 0 0;
  animation:rd-sheen 18s ease-in-out infinite, rd-glow 7s ease-in-out infinite;
}
html[data-theme="dark"] body.studio-enabled .feature-hero{
  background-color:var(--rd-static-color-018) !important;
  background-image:
    radial-gradient(120% 140% at 88% -10%, var(--rd-static-color-149) 0%, var(--rd-static-color-064) 55%),
    linear-gradient(135deg,var(--rd-static-color-041) 0%,var(--rd-static-color-018) 55%,var(--rd-static-color-171) 100%) !important;
}
body.studio-enabled .feature-hero .hero-character{
  animation:rd-float 5.5s ease-in-out infinite;
  will-change:translate, rotate;
}
body.studio-enabled .feature-hero:hover .hero-character{
  animation-play-state:paused;
}
@media (prefers-reduced-motion:reduce){
  body.studio-enabled .feature-hero,
  body.studio-enabled .feature-hero .hero-character{ animation:none !important; }
}


/* ==================================================================
   ROUND 5 — TRÌNH NHẠC (giữ tinh thần Spotify, đồng bộ hệ thống app)
   ================================================================== */

/* ---------- Khung trang ---------- */
html body[data-studio-hub="music"] .music-panel{
  background:
    radial-gradient(120% 60% at 50% -10%, var(--rd-music-color-001) 0%, var(--rd-music-color-002) 60%),
    linear-gradient(180deg,var(--rd-music-color-003) 0%, var(--rd-music-color-004) 60%, var(--rd-music-color-005) 100%) !important;
  color:var(--mu-text) !important;
}
html body[data-studio-hub="music"] .music-stage{
  display:flex !important;
  flex-direction:column;
  height:100%;
  min-height:0;
  padding:0 !important;
}
html body[data-studio-hub="music"] .music-np-bg{
  opacity:.28 !important;
  filter:blur(64px) saturate(1.2);
}

/* ---------- Top bar ---------- */
html body[data-studio-hub="music"] .music-top-bar{
  position:relative !important;
  top:auto !important;
  left:auto !important;
  right:auto !important;
  flex:0 0 auto;
  display:grid !important;
  grid-template-columns:44px minmax(0,1fr) 44px;
  align-items:center;
  gap:10px;
  height:64px;
  padding:0 16px !important;
  background:linear-gradient(180deg, var(--rd-music-color-006), var(--rd-music-color-007)) !important;
  border:0 !important;
  backdrop-filter:none !important;
}
html body[data-studio-hub="music"] .music-top-btn{
  width:40px !important;
  height:40px !important;
  min-height:40px !important;
  border-radius:var(--radius-rd-music-001) !important;
  background:var(--rd-music-color-008) !important;
  border:0 !important;
  color:var(--rd-music-color-009) !important;
  display:grid !important;
  place-items:center;
  padding:0 !important;
  box-shadow:none !important;
}
html body[data-studio-hub="music"] .music-top-btn:hover{
  background:var(--rd-music-color-010) !important;
  color:var(--rd-music-color-009) !important;
}
html body[data-studio-hub="music"] .music-top-btn svg{ width:19px;height:19px; }
html body[data-studio-hub="music"] .music-top-heading{
  text-align:center;
  min-width:0;
}
html body[data-studio-hub="music"] .music-top-eyebrow{
  display:block;
  font-size:9.5px !important;
  font-weight:700 !important;
  letter-spacing:.16em !important;
  text-transform:uppercase;
  color:var(--mu-text-3) !important;
  margin-bottom:2px;
}
html body[data-studio-hub="music"] .music-top-title{
  font-size:15px !important;
  font-weight:700 !important;
  letter-spacing:-.02em;
  color:var(--rd-music-color-009) !important;
  margin:0 !important;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* ---------- Nội dung cuộn ---------- */
html body[data-studio-hub="music"] .music-np-body,
html body[data-studio-hub="music"] .music-browse-view{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overscroll-behavior:contain;
  padding:8px 20px 120px !important;
  scrollbar-width:thin;
  scrollbar-color:var(--rd-music-color-010) var(--rd-music-color-011);
}
html body[data-studio-hub="music"] .music-browse-view{
  width:min(100%,760px) !important;
  margin:0 auto !important;
}
html body[data-studio-hub="music"] .music-np-body{
  width:min(100%,760px);
  margin:0 auto;
}
html body[data-studio-hub="music"] .music-np-body::-webkit-scrollbar,
html body[data-studio-hub="music"] .music-browse-view::-webkit-scrollbar{ width:8px; }
html body[data-studio-hub="music"] .music-np-body::-webkit-scrollbar-thumb,
html body[data-studio-hub="music"] .music-browse-view::-webkit-scrollbar-thumb{
  background:var(--rd-music-color-010);border-radius:var(--radius-rd-music-002);
}

/* ---------- Now playing (trạng thái trống) ---------- */
html body[data-studio-hub="music"] .music-np-empty{
  display:flex !important;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  text-align:center;
  padding-top:36px !important;
  gap:0;
}
html body[data-studio-hub="music"] .music-cover{
  width:132px !important;
  height:132px !important;
  border-radius:var(--radius-rd-music-003) !important;
  overflow:hidden;
  box-shadow:var(--shadow-rd-music-001);
  background:linear-gradient(150deg,var(--rd-music-color-014),var(--rd-music-color-015));
  margin-bottom:20px;
}
html body[data-studio-hub="music"] .music-cover .music-thumb{
  width:100% !important;height:100% !important;object-fit:cover;display:block;
}
html body[data-studio-hub="music"] .music-np-meta{ max-width:100%; }
html body[data-studio-hub="music"] .music-np-meta h3{
  font-size:21px !important;
  font-weight:750 !important;
  letter-spacing:-.03em;
  color:var(--rd-music-color-009) !important;
  margin:0 0 6px !important;
  padding:0 4px;
  line-height:1.3;
}
html body[data-studio-hub="music"] .music-np-sub{
  font-size:13px !important;
  color:var(--mu-text-2) !important;
  margin:0 0 20px !important;
  padding:0 8px;
  line-height:1.55;
}
html body[data-studio-hub="music"] .music-primary{
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  gap:9px;
  min-height:46px !important;
  padding:0 22px !important;
  border-radius:var(--radius-rd-music-004) !important;
  background:linear-gradient(180deg,var(--mu-accent-2),var(--mu-accent)) !important;
  border:0 !important;
  color:var(--rd-music-color-009) !important;
  font-size:14px !important;
  font-weight:650 !important;
  letter-spacing:-.01em;
  box-shadow:var(--shadow-rd-music-002) !important;
  transition:transform .18s var(--rd-ease), box-shadow .24s var(--rd-ease), filter .18s var(--rd-ease) !important;
}
html body[data-studio-hub="music"] .music-primary:hover{
  filter:brightness(1.07);
  transform:translateY(-1px);
  box-shadow:var(--shadow-rd-music-003) !important;
}
html body[data-studio-hub="music"] .music-primary:active{ transform:translateY(0) scale(.985); }
html body[data-studio-hub="music"] .music-primary svg{ width:17px;height:17px; }

/* ---------- Pill lọc ---------- */
html body[data-studio-hub="music"] .music-browse-pills{
  display:flex !important;
  flex-wrap:wrap;
  gap:8px !important;
  margin:6px 0 26px !important;
  padding:0 !important;
}
html body[data-studio-hub="music"] .music-pill{
  min-height:34px !important;
  padding:0 15px !important;
  border-radius:var(--radius-rd-music-004) !important;
  border:1px solid var(--mu-line) !important;
  background:var(--rd-music-color-013) !important;
  color:var(--rd-music-color-018) !important;
  font-size:13px !important;
  font-weight:600 !important;
  letter-spacing:-.01em;
  box-shadow:none !important;
  transition:background-color .18s var(--rd-ease), color .18s var(--rd-ease), border-color .18s var(--rd-ease) !important;
}
html body[data-studio-hub="music"] .music-pill:hover{
  background:var(--rd-music-color-019) !important;
  color:var(--rd-music-color-009) !important;
  border-color:var(--rd-music-color-011) !important;
}
html body[data-studio-hub="music"] .music-pill.active{
  background:var(--rd-music-color-009) !important;
  color:var(--rd-music-color-020) !important;
  border-color:var(--rd-music-color-009) !important;
  font-weight:700 !important;
}

/* ---------- Tiêu đề mục ---------- */
html body[data-studio-hub="music"] .music-browse-section-title{
  font-size:11px !important;
  font-weight:750 !important;
  letter-spacing:.14em !important;
  text-transform:uppercase;
  color:var(--mu-text-3) !important;
  margin:0 0 10px !important;
  padding:0 2px;
}
html body[data-studio-hub="music"] .music-browse-view > div + div{
  margin-top:26px;
}

/* ---------- Danh sách bài gần đây ---------- */
html body[data-studio-hub="music"] .music-recent-list{
  display:flex !important;
  flex-direction:column;
  gap:2px !important;
}
html body[data-studio-hub="music"] .music-recent-row{
  display:grid !important;
  grid-template-columns:48px minmax(0,1fr) 36px;
  align-items:center;
  gap:14px !important;
  padding:8px 10px !important;
  border-radius:var(--radius-rd-music-005) !important;
  background:var(--rd-music-color-011) !important;
  border:0 !important;
  cursor:pointer;
  transition:background-color .16s var(--rd-ease) !important;
}
html body[data-studio-hub="music"] .music-recent-row:hover{
  background:var(--rd-music-color-021) !important;
}
html body[data-studio-hub="music"] .music-recent-thumb{
  width:48px !important;
  height:48px !important;
  border-radius:var(--radius-rd-music-006) !important;
  object-fit:cover;
  background:var(--rd-music-color-022);
  box-shadow:var(--shadow-rd-music-004);
}
html body[data-studio-hub="music"] .music-recent-meta{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}
html body[data-studio-hub="music"] .music-recent-title{
  font-size:14.5px !important;
  font-weight:600 !important;
  letter-spacing:-.015em;
  color:var(--rd-music-color-009) !important;
  line-height:1.35;
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
html body[data-studio-hub="music"] .music-recent-sub{
  font-size:12px !important;
  color:var(--mu-text-3) !important;
  line-height:1.4;
}
html body[data-studio-hub="music"] .music-recent-more{
  width:34px !important;
  height:34px !important;
  min-height:34px !important;
  border-radius:var(--radius-rd-music-001) !important;
  border:0 !important;
  background:var(--rd-music-color-011) !important;
  color:var(--mu-text-2) !important;
  display:grid;place-items:center;
  opacity:0;
  transition:opacity .16s var(--rd-ease), background-color .16s var(--rd-ease), color .16s var(--rd-ease) !important;
  box-shadow:none !important;
}
html body[data-studio-hub="music"] .music-recent-row:hover .music-recent-more{
  opacity:1;
}
html body[data-studio-hub="music"] .music-recent-more:hover{
  background:var(--rd-music-color-023) !important;
  color:var(--rd-music-color-009) !important;
}
html body[data-studio-hub="music"] .music-recent-more svg{ width:17px;height:17px; }

/* ---------- Danh sách phát trống ---------- */
html body[data-studio-hub="music"] .music-browse-playlist-list,
html body[data-studio-hub="music"] .music-playlist-list{
  display:flex !important;
  flex-direction:column;
  gap:8px;
}
html body[data-studio-hub="music"] .music-empty-note,
html body[data-studio-hub="music"] .music-browse-playlist-list p{
  font-size:12.5px !important;
  color:var(--mu-text-3) !important;
  line-height:1.6;
  padding:18px 16px !important;
  border:1px dashed var(--rd-music-color-024);
  border-radius:var(--radius-rd-music-007);
  text-align:center;
  background:var(--rd-music-color-025);
}

/* ================= SHEET (danh sách & tùy chọn) ================= */
html body[data-studio-hub="music"] .music-menu-sheet{
  position:fixed !important;
  bottom:0 !important;
  width:min(100%,520px) !important;
  max-height:82dvh;
  overflow-y:auto;
  padding:8px 20px calc(26px + env(safe-area-inset-bottom)) !important;
  background:linear-gradient(180deg,var(--rd-music-color-026) 0%, var(--rd-music-color-027) 100%) !important;
  border:1px solid var(--rd-music-color-028) !important;
  border-bottom:0 !important;
  border-radius:var(--radius-rd-music-008) !important;
  box-shadow:var(--shadow-rd-music-005) !important;
  color:var(--mu-text) !important;
  scrollbar-width:thin;
  scrollbar-color:var(--rd-music-color-010) var(--rd-music-color-011);
}
html body[data-studio-hub="music"] .music-sheet-drag-area{
  position:sticky;
  top:-8px;
  z-index:2;
  display:flex;
  align-items:center;
  justify-content:center;
  height:26px;
  background:linear-gradient(180deg,var(--rd-music-color-026) 60%, var(--rd-music-color-030));
}
html body[data-studio-hub="music"] .music-menu-close{
  width:100% !important;
  height:26px !important;
  min-height:26px !important;
  background:var(--rd-music-color-011) !important;
  border:0 !important;
  padding:0 !important;
  display:grid;place-items:center;
  box-shadow:none !important;
}
html body[data-studio-hub="music"] .music-drag-bar{
  width:38px !important;
  height:4px !important;
  border-radius:var(--radius-rd-music-002) !important;
  background:var(--rd-music-color-031) !important;
  display:block;
}
html body[data-studio-hub="music"] .music-menu-close:hover .music-drag-bar{
  background:var(--rd-music-color-032) !important;
}

/* Đầu sheet: bài đang chọn */
html body[data-studio-hub="music"] .music-menu-track-head{
  display:flex !important;
  align-items:center;
  gap:13px;
  padding:10px 2px 16px !important;
  margin:0 !important;
  background:var(--rd-music-color-011) !important;
  border:0 !important;
}
html body[data-studio-hub="music"] .music-menu-track-thumb{
  width:52px !important;
  height:52px !important;
  border-radius:var(--radius-rd-music-009) !important;
  object-fit:cover;
  flex:0 0 auto;
  box-shadow:var(--shadow-rd-music-006);
  background:var(--rd-music-color-022);
}
html body[data-studio-hub="music"] .music-menu-track-copy{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}
html body[data-studio-hub="music"] .music-menu-track-copy strong{
  font-size:14.5px !important;
  font-weight:650 !important;
  color:var(--rd-music-color-009) !important;
  letter-spacing:-.015em;
  line-height:1.35;
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
html body[data-studio-hub="music"] .music-menu-track-copy small{
  font-size:12px !important;
  color:var(--mu-text-3) !important;
  line-height:1.4;
}
html body[data-studio-hub="music"] .music-sheet-divider{
  height:1px !important;
  border:0 !important;
  background:var(--mu-line) !important;
  margin:0 0 6px !important;
}

/* Sub header (Quay lại / tiêu đề / Xong) */
html body[data-studio-hub="music"] .music-sub-head{
  display:grid !important;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  padding:6px 0 14px !important;
  margin:0 !important;
  border-bottom:1px solid var(--mu-line);
}
html body[data-studio-hub="music"] .music-sub-title{
  text-align:center;
  font-size:14px !important;
  font-weight:700 !important;
  color:var(--rd-music-color-009) !important;
  letter-spacing:-.01em;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
html body[data-studio-hub="music"] .music-sub-link{
  min-height:32px !important;
  padding:0 8px !important;
  border-radius:var(--radius-rd-music-010) !important;
  border:0 !important;
  background:var(--rd-music-color-011) !important;
  color:var(--mu-text-2) !important;
  font-size:13px !important;
  font-weight:600 !important;
  box-shadow:none !important;
  white-space:nowrap;
}
html body[data-studio-hub="music"] .music-sub-link:hover{
  background:var(--rd-music-color-008) !important;
  color:var(--rd-music-color-009) !important;
}
html body[data-studio-hub="music"] .music-sub-done{ color:var(--mu-accent-2) !important; }

/* ---------- Hàng phẳng trong sheet (Chia sẻ, Thêm vào..., Thư viện...) ---------- */
html body[data-studio-hub="music"] .music-flat-row{
  display:flex !important;
  align-items:center;
  gap:14px !important;
  width:100%;
  min-height:50px !important;
  padding:0 8px !important;
  border-radius:var(--radius-rd-music-005) !important;
  border:0 !important;
  background:var(--rd-music-color-011) !important;
  color:var(--rd-music-color-033) !important;
  font-size:14px !important;
  font-weight:550 !important;
  letter-spacing:-.01em;
  text-align:left;
  box-shadow:none !important;
  transition:background-color .16s var(--rd-ease), color .16s var(--rd-ease) !important;
}
html body[data-studio-hub="music"] .music-flat-row:hover{
  background:var(--rd-music-color-021) !important;
  color:var(--rd-music-color-009) !important;
}
html body[data-studio-hub="music"] .music-flat-row:hover *{ color:var(--rd-music-color-009) !important; }
html body[data-studio-hub="music"] .music-flat-ico{
  width:20px;height:20px;flex:0 0 auto;
  display:grid;place-items:center;
  color:var(--mu-text-2);
}
html body[data-studio-hub="music"] .music-flat-ico svg{ width:19px;height:19px; }
html body[data-studio-hub="music"] .music-flat-row > svg,
html body[data-studio-hub="music"] .music-flat-row .music-chev{
  margin-left:auto;
  width:16px;height:16px;
  color:var(--mu-text-3);
  flex:0 0 auto;
}
html body[data-studio-hub="music"] .music-flat-row > span:not(.music-flat-ico){
  flex:1;
  min-width:0;
}
html body[data-studio-hub="music"] details.music-flat-details{
  border:0 !important;
  background:var(--rd-music-color-011) !important;
  padding:0 !important;
  margin:0 !important;
  border-radius:var(--radius-rd-music-005);
}
html body[data-studio-hub="music"] details.music-flat-details > summary{
  list-style:none;
  cursor:pointer;
}
html body[data-studio-hub="music"] details.music-flat-details > summary::-webkit-details-marker{ display:none; }
html body[data-studio-hub="music"] details.music-flat-details > summary::after{
  content:"";
  width:15px;height:15px;flex:none;
  margin-left:auto;
  background:currentColor;
  opacity:.5;
  -webkit-mask:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center/contain no-repeat;
  transition:transform .2s var(--rd-ease);
}
html body[data-studio-hub="music"] details.music-flat-details[open] > summary::after{
  transform:rotate(180deg);
}
html body[data-studio-hub="music"] details.music-flat-details[open] > summary{
  background:var(--rd-music-color-034) !important;
}

/* ---------- Form dán link / tạo playlist ---------- */
html body[data-studio-hub="music"] .music-flat-expand-body,
html body[data-studio-hub="music"] #musicLinkForm{
  display:flex !important;
  flex-direction:column;
  gap:14px !important;
  padding:14px 8px 6px !important;
  margin:0 !important;
  border:0 !important;
  background:var(--rd-music-color-011) !important;
}
html body[data-studio-hub="music"] .music-link-main-row{
  display:flex !important;
  align-items:center;
  gap:8px !important;
}
html body[data-studio-hub="music"] .music-link-main-row input{ flex:1; min-width:0; }
html body[data-studio-hub="music"] .music-link-main-row .music-primary{
  flex:0 0 auto;
  min-height:46px !important;
  padding:0 20px !important;
  border-radius:var(--radius-rd-music-011) !important;
  font-size:13.5px !important;
}
html body[data-studio-hub="music"] .music-link-sub-row{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:12px !important;
}
html body[data-studio-hub="music"] .music-link-sub-row > label,
html body[data-studio-hub="music"] #musicLinkForm > label{
  display:flex !important;
  flex-direction:column;
  gap:7px !important;
  font-size:12px !important;
  font-weight:650 !important;
  letter-spacing:.01em;
  color:var(--mu-text-3) !important;
  min-width:0;
}
html body[data-studio-hub="music"] .music-link-sub-row > label > :is(input,select),
html body[data-studio-hub="music"] #musicLinkForm > label > input{
  width:100%;
}

/* Ô nhập trong khung tối */
html body[data-studio-hub="music"] :is(
  #musicMenuSheet input:not([type=file]):not([type=range]):not([type=checkbox]),
  #musicMenuSheet select,
  #musicMenuSheet textarea
){
  background:var(--rd-music-color-021) !important;
  border:1px solid var(--rd-music-color-024) !important;
  border-radius:var(--radius-rd-music-005) !important;
  min-height:46px !important;
  padding:0 13px !important;
  color:var(--rd-music-color-009) !important;
  font-size:13.5px !important;
  font-weight:500 !important;
  box-shadow:none !important;
}
html body[data-studio-hub="music"] :is(#musicMenuSheet input,#musicMenuSheet select):hover{
  border-color:var(--rd-music-color-035) !important;
}
html body[data-studio-hub="music"] :is(#musicMenuSheet input,#musicMenuSheet select):focus{
  outline:none !important;
  border-color:var(--mu-accent-2) !important;
  background:var(--rd-music-color-036) !important;
  box-shadow:var(--shadow-rd-music-007) !important;
}
html body[data-studio-hub="music"] #musicMenuSheet input::placeholder{
  color:var(--rd-music-color-038) !important;
}
html body[data-studio-hub="music"] #musicMenuSheet select{
  appearance:none;
  background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23b6b0c6' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat:no-repeat !important;
  background-position:right 12px center !important;
  padding-right:34px !important;
  text-overflow:ellipsis;
}
html body[data-studio-hub="music"] #musicMenuSheet option{
  background:var(--rd-music-color-026);color:var(--rd-music-color-009);
}
html body[data-studio-hub="music"] #musicMenuSheet input[type=file]{
  min-height:auto !important;
  padding:10px !important;
  font-size:12px !important;
  color:var(--mu-text-2) !important;
}

/* ---------- Trạng thái / ghi chú ---------- */
html body[data-studio-hub="music"] .music-status{
  font-size:12px !important;
  line-height:1.6;
  color:var(--mu-text-3) !important;
  background:var(--rd-music-color-039);
  border:1px solid var(--mu-line-2);
  border-radius:var(--radius-rd-music-005);
  padding:10px 12px !important;
  margin:8px 0 6px !important;
}
html body[data-studio-hub="music"] .music-intro{
  font-size:12.5px !important;
  color:var(--mu-text-2) !important;
  line-height:1.6;
}

/* ---------- Hàng tạo playlist / lưu ---------- */
html body[data-studio-hub="music"] .music-playlist-create-row,
html body[data-studio-hub="music"] .music-save-picker,
html body[data-studio-hub="music"] .music-new{
  display:flex !important;
  align-items:center;
  gap:10px !important;
  padding:4px 8px 8px !important;
}
html body[data-studio-hub="music"] .music-playlist-create-row input,
html body[data-studio-hub="music"] .music-new input{ flex:1;min-width:0; }
html body[data-studio-hub="music"] .music-save-new-link,
html body[data-studio-hub="music"] .music-save-new-row,
html body[data-studio-hub="music"] .music-aux-btn,
html body[data-studio-hub="music"] .music-quick-save-btn{
  min-height:40px !important;
  padding:0 14px !important;
  border-radius:var(--radius-rd-music-005) !important;
  border:1px solid var(--mu-line) !important;
  background:var(--rd-music-color-013) !important;
  color:var(--rd-music-color-040) !important;
  font-size:12.5px !important;
  font-weight:600 !important;
  box-shadow:none !important;
}
html body[data-studio-hub="music"] .music-save-new-link:hover,
html body[data-studio-hub="music"] .music-aux-btn:hover,
html body[data-studio-hub="music"] .music-quick-save-btn:hover{
  background:var(--rd-music-color-019) !important;
  color:var(--rd-music-color-009) !important;
}

/* ---------- 5b. Sửa bố cục: một vùng cuộn duy nhất, top bar sticky ---------- */
html body[data-studio-hub="music"] .music-stage{
  display:flex !important;
  flex-direction:column !important;
  align-items:stretch !important;
  height:100% !important;
  min-height:0 !important;
  padding:0 !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  scrollbar-color:var(--rd-music-color-010) var(--rd-music-color-011);
}
html body[data-studio-hub="music"] .music-stage::-webkit-scrollbar{ width:9px; }
html body[data-studio-hub="music"] .music-stage::-webkit-scrollbar-thumb{
  background:var(--rd-music-color-010);border-radius:var(--radius-rd-music-002);
}

html body[data-studio-hub="music"] .music-top-bar{
  position:sticky !important;
  top:0 !important;
  z-index:6;
  width:100% !important;
  max-width:none !important;
  margin:0 !important;
  padding:0 max(16px, calc((100% - 760px) / 2)) !important;
  background:var(--rd-music-color-041) !important;
  backdrop-filter:blur(18px) saturate(150%) !important;
  -webkit-backdrop-filter:blur(18px) saturate(150%) !important;
  border-bottom:1px solid var(--rd-music-color-013) !important;
}

html body[data-studio-hub="music"] .music-np-body,
html body[data-studio-hub="music"] .music-browse-view{
  flex:0 0 auto !important;
  width:100% !important;
  max-width:760px !important;
  margin:0 auto !important;
  overflow:visible !important;
  padding:10px 20px 24px !important;
}
html body[data-studio-hub="music"] .music-browse-view{
  padding-bottom:120px !important;
}

/* Nút chính của trình nhạc: đè rule button toàn cục */
html body:not(#_rd)[data-studio-hub="music"] .music-primary{
  background:linear-gradient(180deg,var(--mu-accent-2),var(--mu-accent)) !important;
  color:var(--rd-music-color-009) !important;
  border:1px solid var(--rd-music-color-023) !important;
  box-shadow:var(--shadow-rd-music-008) !important;
}
html body:not(#_rd)[data-studio-hub="music"] .music-primary:hover{
  background:linear-gradient(180deg,var(--rd-music-color-043),var(--rd-music-color-044)) !important;
  color:var(--rd-music-color-009) !important;
  border-color:var(--rd-music-color-045) !important;
}
html body:not(#_rd)[data-studio-hub="music"] .music-primary *{ color:var(--rd-music-color-009) !important; }

/* ---------- Danh sách bài học trong kho nhạc ---------- */
html body[data-studio-hub="music"] .music-study-quick-list{
  width:100% !important;
  max-width:none !important;
  margin:18px 0 0 !important;
  gap:4px !important;
  max-height:none !important;
  overflow:visible !important;
  display:flex !important;
  flex-direction:column;
}
html body[data-studio-hub="music"] .music-card.music-study-card{
  display:flex !important;
  align-items:center;
  gap:13px !important;
  width:100%;
  padding:8px 10px !important;
  border-radius:var(--radius-rd-music-005) !important;
  border:0 !important;
  background:var(--rd-music-color-011) !important;
  text-align:left;
  box-shadow:none !important;
  transition:background-color .16s var(--rd-ease) !important;
}
html body[data-studio-hub="music"] .music-card.music-study-card:hover{
  background:var(--rd-music-color-021) !important;
}
html body[data-studio-hub="music"] .music-card.music-study-card:hover *{ color:inherit !important; }
html body[data-studio-hub="music"] .music-row-thumb{
  width:44px !important;
  height:44px !important;
  border-radius:var(--radius-rd-music-006) !important;
  object-fit:cover;
  flex:0 0 auto;
  background:var(--rd-music-color-022);
  box-shadow:var(--shadow-rd-music-004);
}
html body[data-studio-hub="music"] .music-row-copy{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
  flex:1;
}
html body[data-studio-hub="music"] .music-row-copy strong{
  font-size:13.5px !important;
  font-weight:600 !important;
  color:var(--rd-music-color-009) !important;
  letter-spacing:-.01em;
  line-height:1.35;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
html body[data-studio-hub="music"] .music-row-copy small{
  font-size:12px !important;
  color:var(--mu-text-3) !important;
  line-height:1.4;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

/* ---------- Nút "..." phải luôn thấy trên thiết bị cảm ứng ---------- */
@media (hover:none){
  html body[data-studio-hub="music"] .music-recent-more{ opacity:.85 !important; }
}

/* ---------- Ô chọn file ---------- */
html body[data-studio-hub="music"] #musicMenuSheet input[type=file]::file-selector-button{
  margin-right:10px;
  min-height:32px;
  padding:0 12px;
  border-radius:var(--radius-rd-music-010);
  border:1px solid var(--rd-music-color-010);
  background:var(--rd-music-color-036);
  color:var(--rd-music-color-009);
  font-size:12px;
  font-weight:600;
  cursor:pointer;
}
html body[data-studio-hub="music"] #musicMenuSheet input[type=file]::file-selector-button:hover{
  background:var(--rd-music-color-046);
}

/* ---------- Nút Phát trong form gọn lại ---------- */
html body:not(#_rd)[data-studio-hub="music"] .music-link-main-row .music-primary{
  border-radius:var(--radius-rd-music-011) !important;
  min-width:76px;
  padding:0 18px !important;
}

/* Danh sách bài học: hàng phẳng, không tô nền */
html body:not(#_rd)[data-studio-hub="music"] .music-study-quick-list .music-card.music-study-card{
  background:var(--rd-music-color-011) !important;
  border:0 !important;
  box-shadow:none !important;
}
html body:not(#_rd)[data-studio-hub="music"] .music-study-quick-list .music-card.music-study-card:hover{
  background:var(--rd-music-color-021) !important;
}

/* 5c: đã bỏ — không can thiệp transform của sheet (app tự canh giữa + animate) */



/* Preserve the app's safe-area-aware landscape navigation rail. */
/* Retain full-frame disclosure hit areas and readable keyboard feedback. */
/* Lesson height follows its content; the workspace owns scrolling in this mode.
   Bound the SoundCloud iframe instead of inheriting YouTube's 16:9 / 100% height. */
html body[data-studio-hub="music"] #musicPanel.music-lesson-mode .music-stage {
  height:auto !important;
  min-height:100dvh;
  overflow:visible !important;
  overflow-anchor:none;
}
html body[data-studio-hub="music"] #musicYoutube.music-soundcloud {
  aspect-ratio:auto;
  height:166px;
  min-height:166px;
  overflow:hidden;
  flex:none;
}
html body[data-studio-hub="music"] #musicYoutube.music-soundcloud iframe {
  position:static;
  display:block;
  height:166px;
  max-height:166px;
}
html body:not(#_rd)[data-studio-hub="music"] #musicPanel [hidden] { display:none !important; }
@media (max-width:980px) {
  html body:not(#_rd)[data-studio-hub="music"] #musicPanel :is(input:not([type=range]):not([type=checkbox]):not([type=radio]),select,textarea) { font-size:16px !important; }
}
html body:not(#_rd).studio-enabled .shortcut[data-studio-go]:is(:focus-visible,:active) {
  background:var(--press-active-bg) !important;
  color:var(--palette-white) !important;
}
html body:not(#_rd).studio-enabled .shortcut[data-studio-go]:is(:focus-visible,:active) :is(strong,small,span) { color:var(--palette-white) !important; }
@media (max-width:720px) {
  html body:not(#_rd).studio-enabled #studioHome .dashboard-primary {
    display:flex;
    flex-direction:column;
    gap:12px;
  }
  html body:not(#_rd).studio-enabled #studioHome .dashboard-primary > * { margin:0 !important; }
  html body:not(#_rd).studio-enabled #studioHome :is(.shortcut-grid,.home-music-grid,.pathway) { gap:12px !important; }
  html body:not(#_rd).studio-enabled #studioHome #homeDailyWord { margin:12px 0 0 !important; }
  html body:not(#_rd).studio-enabled .pathway {
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:12px !important;
  }
  html body:not(#_rd).studio-enabled .path-step {
    min-width:0;
    flex-direction:column;
    text-align:center;
    gap:8px;
    padding:12px 6px !important;
  }
  html body:not(#_rd).studio-enabled .path-step > div { flex:initial; width:100%; }
  html body:not(#_rd).studio-enabled .path-step > i { display:none; }
  html body.studio-enabled .path-step :is(strong,small) { overflow-wrap:anywhere; }
}
html body.studio-enabled .about-logo { background-color:var(--press-active-bg) !important; color:var(--palette-white); }
html body:not(#_rd).studio-enabled :is(#planGoSetup,#planForm button[type=submit]) { background-color:var(--rd-static-color-041) !important; }
html body:not(#_rd).studio-enabled summary { padding:12px 14px !important; }
html body:not(#_rd).studio-enabled details:is(#homePlanSettings,#planSetup,.ps-disclosure,.hub-group,.dictionary-row,.lesson-sources,.mobile-account-group,.memory-schedule,.ocr-panel,.dictionary-summary,.mobile-home-stats,.word-relations,.confusion-candidate,.confusion-char-section,.details,.compare-lesson,.exam-sources,.rr-sources,.exam-feedback details,.plan-panel,.update-push-settings,.push-settings,.lesson-vocab,.clean-disclosure,.overview-search) {
  padding:12px !important;
  border-radius:var(--rd-r-lg) !important;
}
html body:not(#_rd).studio-enabled details:is(#homePlanSettings,#planSetup,.ps-disclosure,.hub-group,.dictionary-row,.lesson-sources,.mobile-account-group,.memory-schedule,.ocr-panel,.dictionary-summary,.mobile-home-stats,.word-relations,.confusion-candidate,.confusion-char-section,.details,.compare-lesson,.exam-sources,.rr-sources,.exam-feedback details,.plan-panel,.update-push-settings,.push-settings,.lesson-vocab,.clean-disclosure,.overview-search)>summary {
  margin:-12px !important;
  padding:14px !important;
  border-radius:var(--rd-r-lg) !important;
}
html body:not(#_rd).studio-enabled details:is(#homePlanSettings,#planSetup,.ps-disclosure,.hub-group,.dictionary-row,.lesson-sources,.mobile-account-group,.memory-schedule,.ocr-panel,.dictionary-summary,.mobile-home-stats,.word-relations,.confusion-candidate,.confusion-char-section,.details,.compare-lesson,.exam-sources,.rr-sources,.exam-feedback details,.plan-panel,.update-push-settings,.push-settings,.lesson-vocab,.clean-disclosure,.overview-search)[open]>summary {
  margin-bottom:12px !important;
  border-bottom-left-radius:0 !important;
  border-bottom-right-radius:0 !important;
}
html body:not(#_rd).studio-enabled #homeDailyWord .overview-word-row summary { padding:8px 12px !important; }
html body:not(#_rd).studio-enabled summary:is(:active,:focus-visible),
html body:not(#_rd).studio-enabled #studioHome summary:is(:active,:focus-visible),
html body:not(#_rd).studio-enabled #homeDailyWord .overview-word-row summary:is(:active,:focus-visible) {
  background:var(--press-active-bg) !important;
  color:var(--palette-white) !important;
}
html body:not(#_rd).studio-enabled #homeDailyWord .overview-word-row summary { border-radius:var(--radius-btn) !important; }
html body:not(#_rd).studio-enabled #homePlanSettings>summary:focus-visible { border-radius:var(--rd-r-lg) !important; }
html body:not(#_rd).studio-enabled #homePlanSettings[open]>summary:focus-visible { border-bottom-left-radius:0 !important; border-bottom-right-radius:0 !important; }
html body:not(#_rd).studio-enabled :is(#homePlanSettings,#planSetup,.overview-search,.clean-disclosure)>summary:focus-visible { border-radius:var(--rd-r-lg) !important; }
html body:not(#_rd).studio-enabled :is(#homePlanSettings,#planSetup,.overview-search,.clean-disclosure)[open]>summary:focus-visible { border-bottom-left-radius:0 !important; border-bottom-right-radius:0 !important; }
html body:not(#_rd).studio-enabled summary:focus-visible { transition:none !important; }
html body:not(#_rd).studio-enabled #accountRestoreDialog .backup-dialog-actions button:not(:disabled) {
  background:var(--surface) !important;
  color:var(--ink) !important;
  opacity:1;
  transition:none !important;
}
html body:not(#_rd).studio-enabled .studio-search-tabs button:is(.active,[aria-pressed=true],[aria-current=page]) {
  background:var(--press-active-bg) !important;
  color:var(--palette-white) !important;
}
html body:not(#_rd).studio-enabled summary:is(:active,:focus-visible) * { color:var(--palette-white) !important; }
@media (orientation: landscape) and (max-height: 500px) and (pointer: coarse) {
  html body.studio-enabled.mobile-mini-rail #mobileDock .bottom-nav {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(5, minmax(44px, 1fr));
    height: 100%;
    padding: 0 !important;
  }
  html body.studio-enabled.mobile-mini-rail #mobileDock .bottom-nav button {
    min-height: 44px !important;
    min-width: 0;
    width: 100%;
    padding: 8px !important;
  }
}
/* Four direct lookup tools, with one compact row on phones. */
html body:not(#_rd).studio-enabled .studio-search-tabs {
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  width:100% !important;
  gap:6px !important;
  padding:0 !important;
  border:0 !important;
  background:var(--palette-clear) !important;
  margin:0 0 16px !important;
}
html body:not(#_rd).studio-enabled .studio-search-tabs button {
  min-width:0 !important;
  min-height:44px !important;
  padding:8px 4px !important;
  font-size:13px !important;
  line-height:1.3 !important;
  white-space:nowrap !important;
  border:1px solid var(--line) !important;
  border-radius:var(--radius-btn) !important;
  background:var(--surface) !important;
  color:var(--ink) !important;
}
body.studio-enabled #searchForm .mobile-search-image,
body.studio-enabled[data-search-tool="handwriting"] #searchPanel > :is(h2,.dictionary-modes,#dictionaryModeHint,#searchForm),
body.studio-enabled[data-search-tool="translate"] #translatorPanel > .ocr-panel,
body.studio-enabled[data-search-tool="image"] #translatorPanel > :is(h2,p,#translationForm,#translationStatus),
body.studio-enabled[data-search-tool="image"] .ocr-panel > summary {display:none !important;}

html body:not(#_rd).studio-enabled .studio-search-tabs #handwritingOpen:is(.active,[aria-pressed="true"]) {
  background:var(--press-active-bg) !important;
  color:var(--palette-white) !important;
  border-color:var(--press-active-bg) !important;
}

/* Compact drawing workflow; secondary settings remain available in one disclosure. */
html body:not(#_rd).studio-enabled #handwritingPanel{margin:8px 0;padding:12px;background:var(--surface);border-color:var(--line);color:var(--ink)}
html body:not(#_rd).studio-enabled #handwritingPanel .handwriting-board{width:min(100%,300px,38dvh);margin:8px auto}
html body:not(#_rd).studio-enabled #handwritingCandidates:empty{display:none!important}
html body:not(#_rd).studio-enabled #handwritingPanel :is(.handwriting-head strong,p.hint){font-size:13px;line-height:1.5}
html body:not(#_rd).studio-enabled #handwritingPanel > p.hint{margin:6px 0}
html body:not(#_rd).studio-enabled #handwritingPanel > .handwriting-edit-actions{margin:8px 0 4px}
html body:not(#_rd).studio-enabled #handwritingPanel .handwriting-actions{margin:8px 0;gap:8px}
html body:not(#_rd).studio-enabled #handwritingPanel button{min-height:44px;padding:8px;font-size:13px}
html body:not(#_rd).studio-enabled #handwritingOptions{margin-top:10px;border-top:1px solid var(--line);font-size:13px}
html body:not(#_rd).studio-enabled #handwritingOptions > summary{min-height:44px;padding:10px 0;cursor:pointer;font-weight:600}
html body:not(#_rd).studio-enabled #handwritingOptions .handwriting-advanced-settings{margin-top:0;border-top:0;padding-top:0}
html body:not(#_rd).studio-enabled[data-mobile-focus-kind=handwriting] .mobile-focus-bar progress{display:none!important}
html body:not(#_rd).studio-enabled[data-mobile-focus-kind=handwriting] .mobile-focus-bar{display:none!important}
html body:not(#_rd).studio-enabled[data-mobile-focus-kind=handwriting] .mobile-focus-bar > button{width:44px!important;height:44px!important;min-height:44px!important;max-width:44px;padding:0!important;flex:none}
html body:not(#_rd).studio-enabled[data-mobile-focus-kind=handwriting] main.workspace{padding-top:8px!important}
/* Range controls are real timelines, not text-field boxes. */
html body:not(#_rd).studio-enabled #musicPanel input.music-scrub[type=range]{appearance:none!important;-webkit-appearance:none!important;height:32px!important;min-height:32px!important;max-height:32px!important;width:100%;padding:0!important;margin:0!important;border:0!important;box-shadow:none!important;border-radius:var(--radius-pill)!important;background:linear-gradient(to right,var(--palette-white) 0 var(--pct,0%),var(--legacy-hex-ffffff38) var(--pct,0%) 100%) center/100% 4px no-repeat!important;touch-action:pan-y}
html body:not(#_rd).studio-enabled #musicPanel input.music-scrub::-webkit-slider-thumb{width:12px;height:12px;margin-top:3px;background:var(--palette-white);box-shadow:none}

html body:not(#_rd).studio-enabled #handwritingOptions .handwriting-advanced-settings > summary:not(:active):not(:focus-visible){color:var(--ink)!important}

/* Match the home card's base specificity so its white surface cannot override
   active/keyboard feedback. Child icons share the same purple surface. */
html body:not(#_rd).studio-enabled #studioHome.overview-v216 :is(.shortcut[data-studio-go],.home-music-chill,.home-music-entry):is(:active,:focus-visible){background:var(--press-active-bg)!important;color:var(--palette-white)!important}
html body:not(#_rd).studio-enabled #studioHome.overview-v216 :is(.shortcut[data-studio-go],.home-music-chill,.home-music-entry):is(:active,:focus-visible) :is(strong,small,span,svg){color:var(--palette-white)!important;background-color:var(--palette-clear)!important;background-image:none!important}

/* Expanded entertainment player is one fixed viewport; only queue/menu sheets scroll. */
html:has(#musicPanel.music-player-expanded[data-music-mode="chill"]:not([hidden])),body:has(#musicPanel.music-player-expanded[data-music-mode="chill"]:not([hidden])){overflow:hidden!important;overflow:clip!important;overscroll-behavior:none}
html body:not(#_rd)[data-studio-hub="music"] #musicPanel.music-player-expanded[data-music-mode="chill"] .music-stage{position:fixed!important;inset:0!important;height:100dvh!important;max-height:100dvh!important;min-height:0!important;overflow:hidden!important;overflow:clip!important;overscroll-behavior:none;touch-action:none;}
html body:not(#_rd)[data-studio-hub="music"] #musicPanel.music-player-expanded[data-music-mode="chill"] .music-np{display:grid!important;box-sizing:border-box!important;height:100%!important;max-height:100%!important;min-height:0!important;grid-template-rows:44px minmax(0,1fr) 112px!important;gap:8px!important;padding:max(8px,env(safe-area-inset-top)) clamp(12px,4vw,24px) max(8px,env(safe-area-inset-bottom))!important;overflow:hidden!important;overflow:clip!important;}
html body:not(#_rd)[data-studio-hub="music"] #musicPanel.music-player-expanded[data-music-mode="chill"] .music-top-bar{position:static!important;min-height:0!important;height:44px!important;padding:0!important;}
html body:not(#_rd)[data-studio-hub="music"] #musicPanel.music-player-expanded[data-music-mode="chill"] #musicLinkPreview:not([hidden]){display:grid!important;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto auto auto auto;grid-row:2!important;align-self:stretch!important;align-content:stretch!important;justify-items:center;gap:clamp(4px,1.5dvh,12px)!important;box-sizing:border-box!important;width:min(100%,440px)!important;height:100%!important;max-height:100%!important;min-height:0!important;padding:0!important;overflow:hidden!important;overflow:clip!important;}
html body:not(#_rd)[data-studio-hub="music"] #musicPanel.music-player-expanded[data-music-mode="chill"] .music-cover{grid-row:1;align-self:center;height:100%!important;width:auto!important;max-height:min(36dvh,310px)!important;max-width:100%!important;min-height:0!important;aspect-ratio:1;flex:none;}
html body:not(#_rd)[data-studio-hub="music"] #musicPanel.music-player-expanded[data-music-mode="chill"] .music-np-meta{grid-row:2;width:100%;margin:0!important;min-height:0;}
html body:not(#_rd)[data-studio-hub="music"] #musicPanel.music-player-expanded[data-music-mode="chill"] #musicLinkTitle{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font-size:clamp(18px,4.9vw,25px)!important;line-height:1.25!important;}
html body:not(#_rd)[data-studio-hub="music"] #musicPanel.music-player-expanded[data-music-mode="chill"] #musicLinkScrubRow{grid-row:3;margin:0!important;}
html body:not(#_rd)[data-studio-hub="music"] #musicPanel.music-player-expanded[data-music-mode="chill"] #musicLinkControls{grid-row:4;min-height:64px!important;margin:0!important;}
html body:not(#_rd)[data-studio-hub="music"] #musicPanel.music-player-expanded[data-music-mode="chill"] #musicLinkPlayer{grid-row:1;max-height:100%;min-height:0!important;align-self:center;}
html body:not(#_rd)[data-studio-hub="music"] #musicPanel.music-player-expanded[data-music-mode="chill"] #musicBottomDock{position:static!important;grid-row:3;inset:auto!important;width:min(100%,440px)!important;height:112px!important;min-height:112px!important;max-height:112px!important;margin:0 auto!important;padding:0!important;overflow:hidden!important;overflow:clip!important;}
@media(max-height:500px) and (orientation:landscape){
html body:not(#_rd)[data-studio-hub="music"] #musicPanel.music-player-expanded[data-music-mode="chill"] .music-np{grid-template-rows:44px minmax(0,1fr) 52px!important;gap:4px!important;}
html body:not(#_rd)[data-studio-hub="music"] #musicPanel.music-player-expanded[data-music-mode="chill"] #musicLinkPreview:not([hidden]){grid-template-columns:minmax(0,1fr) minmax(0,2fr);grid-template-rows:auto minmax(0,1fr) 64px;gap:4px 16px!important;}
html body:not(#_rd)[data-studio-hub="music"] #musicPanel.music-player-expanded[data-music-mode="chill"] .music-cover,html body:not(#_rd)[data-studio-hub="music"] #musicPanel.music-player-expanded[data-music-mode="chill"] #musicLinkPlayer{grid-column:1;grid-row:1/-1;max-height:100%!important;}
html body:not(#_rd)[data-studio-hub="music"] #musicPanel.music-player-expanded[data-music-mode="chill"] .music-cover{width:100%!important;height:auto!important;aspect-ratio:1;}
html body:not(#_rd)[data-studio-hub="music"] #musicPanel.music-player-expanded[data-music-mode="chill"] .music-np-meta{grid-column:2;grid-row:1;}
html body:not(#_rd)[data-studio-hub="music"] #musicPanel.music-player-expanded[data-music-mode="chill"] #musicLinkTitle{-webkit-line-clamp:1;font-size:18px!important;}
html body:not(#_rd)[data-studio-hub="music"] #musicPanel.music-player-expanded[data-music-mode="chill"] #musicLinkScrubRow{grid-column:2;grid-row:2;align-self:end;}
html body:not(#_rd)[data-studio-hub="music"] #musicPanel.music-player-expanded[data-music-mode="chill"] #musicLinkControls{grid-column:2;grid-row:3;height:64px!important;}
html body:not(#_rd)[data-studio-hub="music"] #musicPanel.music-player-expanded[data-music-mode="chill"] #musicLinkControls button.music-transport-play{width:56px!important;height:56px!important;min-width:56px!important;min-height:56px!important;max-height:56px!important;}
html body:not(#_rd)[data-studio-hub="music"] #musicPanel.music-player-expanded[data-music-mode="chill"] #musicBottomDock{grid-template-columns:1fr 1fr!important;grid-template-rows:44px!important;height:52px!important;min-height:52px!important;max-height:52px!important;}
html body:not(#_rd)[data-studio-hub="music"] #musicPanel.music-player-expanded[data-music-mode="chill"] #musicChillPeekCard{height:44px!important;min-height:44px!important;max-height:44px!important;padding:0!important;}
}

/* Two independent mobile home cards: vocabulary first, study plan second. */
@media(max-width:720px), (orientation:landscape) and (max-height:500px) and (pointer:coarse){
 html body:not(#_rd).studio-enabled #studioHome #homeDailyWord{margin:0 0 12px!important;padding:18px!important;background:var(--rd-surface)!important;border:1px solid var(--rd-line)!important;border-radius:var(--rd-r-lg)!important;box-shadow:var(--rd-shadow-xs)!important;}
 html body:not(#_rd).studio-enabled #studioHome #homeDailyWord .overview-word-head h3{font-size:16px!important;color:var(--rd-brand)!important;}
 html body:not(#_rd).studio-enabled #studioHome #homeDailyWord .overview-word-row summary strong{font-size:40px!important;line-height:1.2;}
 html body:not(#_rd).studio-enabled #studioHome #homeDailyWord .overview-word-row summary span{font-size:16px!important;}
 html body:not(#_rd).studio-enabled #studioHome #homeDailyWord .overview-word-head button{min-height:44px!important;}
 html body:not(#_rd).studio-enabled #studioHome #homeDailyWord .overview-word-row summary{grid-template-columns:1fr!important;gap:2px 0!important;}
 html body:not(#_rd).studio-enabled #studioHome #homeDailyWord .overview-word-row summary strong{grid-row:auto!important;}
 html body:not(#_rd).studio-enabled #studioHome #mobileTodayHero{padding:18px!important;border-radius:var(--rd-r-lg)!important;box-shadow:var(--rd-shadow-xs)!important;}
 html body:not(#_rd).studio-enabled #studioHome #mobileTodayHero .mobile-hero-top h2{font-size:20px!important;}
}

/* Keep lesson chat clear of navigation and fit the live keyboard viewport. */
@media(max-width:700px), (pointer:coarse){
 html body.studio-enabled #lessonChatButton{bottom:calc(var(--mobile-dock-height,72px) + env(safe-area-inset-bottom,0px) + 16px)!important;}
 html body.studio-enabled #lessonChatPanel{position:fixed!important;top:calc(var(--chat-view-top,0px) + env(safe-area-inset-top,0px) + 8px)!important;bottom:auto!important;left:0!important;right:0!important;width:100%!important;height:calc(var(--chat-view-height,100dvh) - env(safe-area-inset-top,0px) - 16px)!important;max-height:none!important;z-index:100!important;}
 html body.studio-enabled .mobile-dock{box-shadow:none!important;}
}

/* Preserve readable daily vocabulary headings in the dark mobile home. */
@media(max-width:720px), (orientation:landscape) and (max-height:500px) and (pointer:coarse){html[data-theme=dark] body:not(#_rd).studio-enabled #studioHome #homeDailyWord .overview-word-head h3{color:var(--palette-dark-ink)!important;}}

/* Shared phone header contract: every route, child page and nested lesson
   uses the SAME physical left inset. Previous home/practice/notebook/search
   overrides disagreed about the container width and outer padding. */
@media (max-width:720px), (orientation:landscape) and (max-height:500px) and (pointer:coarse){
  html body.studio-enabled.mobile-ux #studioHeader{
    padding:0!important;
    margin:0!important;
    width:100%!important;
    min-width:0;
    height:auto!important;
    flex:0 0 auto!important;
  }
  html body.studio-enabled.mobile-ux #studioHeader .topbar-inner{
    box-sizing:border-box!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    min-height:64px!important;
    height:auto!important;
    margin:0!important;
    padding:8px max(16px,env(safe-area-inset-right,0px)) 8px max(16px,env(safe-area-inset-left,0px))!important;
    display:flex!important;
    align-items:center!important;
    flex-wrap:nowrap!important;
    gap:8px!important;
  }
  html body.studio-enabled.mobile-ux #studioHeader #menuBtn{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    box-sizing:border-box!important;
    flex:0 0 44px!important;
    width:44px!important;
    min-width:44px!important;
    height:44px!important;
    min-height:44px!important;
    margin:0!important;
    padding:10px!important;
    position:static!important;
    inset:auto!important;
    transform:none!important;
  }
  html body.studio-enabled.mobile-ux #studioHeader .topbar-title{
    display:flex!important;
    flex:1 1 0!important;
    min-width:0!important;
    align-self:center!important;
    justify-content:center!important;
    position:static!important;
    width:auto!important;
    height:auto!important;
    clip-path:none!important;
    overflow:visible!important;
  }
  html body.studio-enabled.mobile-ux #studioHeader #activeTitle{
    font-size:17px!important;
    line-height:1.3!important;
    white-space:normal!important;
    overflow-wrap:anywhere;
  }
  html body.studio-enabled.mobile-ux #studioHeader .topbar-actions{
    display:flex!important;
    align-items:center!important;
    flex:0 0 auto!important;
    min-width:0!important;
    margin:0 0 0 auto!important;
    gap:6px!important;
  }
}

#personalAiForm:not([hidden]){display:grid;gap:8px;margin-top:12px;}
#personalAiForm[hidden]{display:none!important;}
#personalAiForm input:not([type=checkbox]),#personalAiForm select{box-sizing:border-box;width:100%;font-size:16px;}
#personalAiForm input[type=checkbox]{width:auto;min-height:auto;}
#personalAiForm .hint,#personalAiStatus{margin:4px 0;}

/* Navigation hover glide + active solid purple consistency over Round 2B hover override. */
@media(min-width:1080px){
  html body:not(#_rd).studio-enabled #studioHeader .topbar-nav-pill{
    background:var(--palette-clear)!important;
    border-color:var(--palette-clear)!important;
    color:var(--legacy-hex-565a70)!important;
    transition:color .16s cubic-bezier(.22,1,.36,1),background-color .16s cubic-bezier(.22,1,.36,1),transform .12s cubic-bezier(.22,1,.36,1)!important;
  }
  html body:not(#_rd).studio-enabled #studioHeader .topbar-nav-pill:not(.active):is(:hover,:focus-visible,[aria-expanded="true"]){
    background:var(--palette-clear)!important;
    border-color:var(--palette-clear)!important;
    color:var(--accent-dark)!important;
  }
  html body:not(#_rd).studio-enabled #studioHeader .topbar-nav-pill:not(.active):is(:hover,:focus-visible,[aria-expanded="true"]) :is(i,svg,span){
    color:var(--accent-dark)!important;
  }
  html body:not(#_rd).studio-enabled #studioHeader .topbar-nav-pill.active,
  html body:not(#_rd).studio-enabled #studioHeader .topbar-nav-pill.active:is(:hover,:focus-visible,:active,[aria-expanded="true"]){
    background:var(--press-active-bg)!important;
    border-color:var(--press-active-bg)!important;
    color:var(--palette-white)!important;
    font-weight:700!important;
  }
  html body:not(#_rd).studio-enabled #studioHeader .topbar-nav-pill.active :is(i,svg,span),
  html body:not(#_rd).studio-enabled #studioHeader .topbar-nav-pill.active:is(:hover,:focus-visible,:active,[aria-expanded="true"]) :is(i,svg,span){
    color:var(--palette-white)!important;
  }
  html[data-theme="dark"] body:not(#_rd).studio-enabled #studioHeader .topbar-nav-pill{
    color:var(--palette-dark-muted)!important;
  }
  html[data-theme="dark"] body:not(#_rd).studio-enabled #studioHeader .topbar-nav-pill:not(.active):is(:hover,:focus-visible,[aria-expanded="true"]){
    color:var(--accent-dark)!important;
  }
  html[data-theme="dark"] body:not(#_rd).studio-enabled #studioHeader .topbar-nav-pill:not(.active):is(:hover,:focus-visible,[aria-expanded="true"]) :is(i,svg,span){
    color:var(--accent-dark)!important;
  }
  html[data-theme="dark"] body:not(#_rd).studio-enabled #studioHeader .topbar-nav-pill.active,
  html[data-theme="dark"] body:not(#_rd).studio-enabled #studioHeader .topbar-nav-pill.active:is(:hover,:focus-visible,:active,[aria-expanded="true"]){
    background:var(--press-active-bg)!important;
    border-color:var(--press-active-bg)!important;
    color:var(--palette-white)!important;
  }
}
html body:not(#_rd).studio-enabled .nav-flyout .nav-flyout-items button{
  background:var(--palette-clear)!important;
  border-color:var(--palette-clear)!important;
  color:var(--ink)!important;
  transition:background-color .16s cubic-bezier(.22,1,.36,1),color .16s cubic-bezier(.22,1,.36,1),transform .14s cubic-bezier(.22,1,.36,1)!important;
}
html body:not(#_rd).studio-enabled .nav-flyout .nav-flyout-items button:not(.active):is(:hover,:focus-visible){
  background:var(--accent-light)!important;
  color:var(--accent-dark)!important;
  transform:translateX(2px)!important;
}
html body:not(#_rd).studio-enabled .nav-flyout .nav-flyout-items button:not(.active):is(:hover,:focus-visible) :is(i,svg,span){
  color:var(--accent-dark)!important;
}
html body:not(#_rd).studio-enabled .nav-flyout .nav-flyout-items button.active,
html body:not(#_rd).studio-enabled .nav-flyout .nav-flyout-items button.active:is(:hover,:focus-visible,:active){
  background:var(--button-active-bg)!important;
  color:var(--palette-white)!important;
  font-weight:700!important;
}
html body:not(#_rd).studio-enabled .nav-flyout .nav-flyout-items button.active :is(i,svg,span),
html body:not(#_rd).studio-enabled .nav-flyout .nav-flyout-items button.active:is(:hover,:focus-visible,:active) :is(i,svg,span){
  color:var(--palette-white)!important;
}
html body:not(#_rd).studio-enabled .app-shell .side-nav button,
html body:not(#_rd).studio-enabled .app-shell .side-nav .nav-group>summary{
  transition:background-color .2s cubic-bezier(.22,1,.36,1),color .18s cubic-bezier(.22,1,.36,1),transform .12s cubic-bezier(.22,1,.36,1),padding .26s cubic-bezier(.22,1,.36,1),gap .26s cubic-bezier(.22,1,.36,1),width .26s cubic-bezier(.22,1,.36,1)!important;
}
html body:not(#_rd).studio-enabled .app-shell .side-nav button:not(.active):is(:hover,:focus-visible),
html body:not(#_rd).studio-enabled .app-shell .side-nav .nav-group>summary:hover{
  background:var(--accent-light)!important;
  border-color:var(--palette-clear)!important;
  color:var(--accent-dark)!important;
}
html body:not(#_rd).studio-enabled .app-shell .side-nav .nav-group>summary:focus-visible{
  background:var(--press-active-bg)!important;
  border-color:var(--press-active-bg)!important;
  color:var(--palette-white)!important;
}
html body:not(#_rd).studio-enabled .app-shell .side-nav button:not(.active):is(:hover,:focus-visible) :is(i,svg,span),
html body:not(#_rd).studio-enabled .app-shell .side-nav .nav-group>summary:hover :is(i,svg,span){
  color:var(--accent-dark)!important;
}
html body:not(#_rd).studio-enabled .app-shell .side-nav .nav-group>summary:focus-visible :is(i,svg,span){
  color:var(--palette-white)!important;
}
html body:not(#_rd).studio-enabled .app-shell .side-nav button.active,
html body:not(#_rd).studio-enabled .app-shell .side-nav button.active:is(:hover,:focus-visible,:active){
  background:var(--button-active-bg)!important;
  border-color:var(--button-active-bg)!important;
  color:var(--palette-white)!important;
  font-weight:700!important;
}
html body:not(#_rd).studio-enabled .app-shell .side-nav button.active :is(i,svg,span),
html body:not(#_rd).studio-enabled .app-shell .side-nav button.active:is(:hover,:focus-visible,:active) :is(i,svg,span){
  color:var(--palette-white)!important;
}
html[data-theme="dark"] body:not(#_rd).studio-enabled .nav-flyout .nav-flyout-items button.active,
html[data-theme="dark"] body:not(#_rd).studio-enabled .nav-flyout .nav-flyout-items button.active:is(:hover,:focus-visible,:active){
  background:var(--button-active-bg)!important;
  color:var(--palette-white)!important;
}
html[data-theme="dark"] body:not(#_rd).studio-enabled .app-shell .side-nav button:not(.active):is(:hover,:focus-visible),
html[data-theme="dark"] body:not(#_rd).studio-enabled .app-shell .side-nav .nav-group>summary:hover{
  background:var(--accent-light)!important;
  color:var(--accent-dark)!important;
}
html[data-theme="dark"] body:not(#_rd).studio-enabled .app-shell .side-nav .nav-group>summary:focus-visible{
  background:var(--press-active-bg)!important;
  border-color:var(--press-active-bg)!important;
  color:var(--palette-white)!important;
}
html[data-theme="dark"] body:not(#_rd).studio-enabled .app-shell .side-nav .nav-group>summary:focus-visible :is(i,svg,span){
  color:var(--palette-white)!important;
}
html[data-theme="dark"] body:not(#_rd).studio-enabled .app-shell .side-nav button.active,
html[data-theme="dark"] body:not(#_rd).studio-enabled .app-shell .side-nav button.active:is(:hover,:focus-visible,:active){
  background:var(--button-active-bg)!important;
  border-color:var(--button-active-bg)!important;
  color:var(--palette-white)!important;
}

/* Keep selected desktop sidebar groups high-contrast in both themes. */
html body:not(#_rd).studio-enabled .app-shell .side-nav .nav-group>summary.active,
html body:not(#_rd).studio-enabled .app-shell .side-nav .nav-group>summary.active:is(:hover,:focus-visible,[aria-expanded="true"]){
  background:var(--press-active-bg)!important;
  border-color:var(--press-active-bg)!important;
  color:var(--palette-white)!important;
}
html body:not(#_rd).studio-enabled .app-shell .side-nav .nav-group>summary.active :is(i,svg,span),
html body:not(#_rd).studio-enabled .app-shell .side-nav .nav-group>summary.active:is(:hover,:focus-visible,[aria-expanded="true"]) :is(i,svg,span){color:var(--palette-white)!important;}

/* Comparison cards use a dark surface in dark mode, preserving readable examples. */
html[data-theme="dark"] body.studio-enabled .compare-member,
html[data-theme="dark"] body.studio-enabled .compare-example{
  background:var(--surface)!important;
  border-color:var(--line)!important;
  color:var(--ink)!important;
}

/* Dark-mode grammar warning notes use a dark surface to keep muted text readable. */
html[data-theme="dark"] .lesson-grammar-point .lesson-error-note{background:var(--surface)!important;border-color:var(--line)!important}

/* Dark mode: dịu mắt cho các ô/nút nền trắng chữ tím khi bật chế độ tối */
html[data-theme="dark"] body:not(#_rd).studio-enabled #placementEntry > button:not(:disabled){
  background:var(--palette-dark-violet-soft) !important;
  color:var(--legacy-hex-c9c0ff) !important;
  border:1px solid var(--legacy-hex-44405c) !important;
  box-shadow:none !important;
}
html[data-theme="dark"] body:not(#_rd).studio-enabled #placementEntry > button:is(:hover,:focus-visible):not(:disabled){
  background:var(--legacy-hex-363050) !important;
  color:var(--rd-static-color-111) !important;
  border-color:var(--rd-brand) !important;
}
html[data-theme="dark"] body:not(#_rd).studio-enabled :is(.hero-button,.feature-hero .hero-button):not(:disabled){
  background:var(--palette-dark-violet-soft) !important;
  color:var(--legacy-hex-c9c0ff) !important;
  border:1px solid var(--legacy-hex-44405c) !important;
  box-shadow:none !important;
}
html[data-theme="dark"] body:not(#_rd).studio-enabled :is(.hero-button,.feature-hero .hero-button):is(:hover,:focus-visible):not(:disabled){
  background:var(--legacy-hex-363050) !important;
  color:var(--rd-static-color-111) !important;
  border-color:var(--rd-brand) !important;
}
html[data-theme="dark"] body:not(#_rd).studio-enabled :is(.hero-button,.feature-hero .hero-button):is(:hover,:focus-visible):not(:disabled) *{
  color:var(--rd-static-color-111) !important;
}
html[data-theme="dark"] body:not(#_rd).studio-enabled #studioHome.overview-v216 .mobile-today-hero .mobile-hero-cta:not(:disabled),
html[data-theme="dark"] body:not(#_rd).studio-enabled .mobile-hero-cta:not(:disabled){
  background:var(--palette-dark-violet-soft) !important;
  color:var(--legacy-hex-c9c0ff) !important;
  border:1px solid var(--legacy-hex-44405c) !important;
  box-shadow:none !important;
}
html[data-theme="dark"] body:not(#_rd).studio-enabled #studioHome.overview-v216 .mobile-today-hero .mobile-hero-cta:is(:hover,:focus-visible):not(:disabled),
html[data-theme="dark"] body:not(#_rd).studio-enabled .mobile-hero-cta:is(:hover,:focus-visible):not(:disabled){
  background:var(--legacy-hex-363050) !important;
  color:var(--rd-static-color-111) !important;
  border-color:var(--rd-brand) !important;
}
html[data-theme="dark"] body:not(#_rd).studio-enabled[data-studio-hub="home"] .stats-stack .stat-icon{
  background:var(--palette-dark-violet-soft) !important;
  border-color:var(--legacy-hex-44405c) !important;
  color:var(--legacy-hex-c9c0ff) !important;
}
html[data-theme="dark"] body:not(#_rd).studio-enabled .review-reminder > span:first-child{
  background:var(--palette-dark-violet-soft) !important;
  color:var(--legacy-hex-c9c0ff) !important;
  border:1px solid var(--legacy-hex-44405c) !important;
}
html[data-theme="dark"] body:not(#_rd).studio-enabled .review-reminder:hover{
  background:linear-gradient(135deg,var(--rd-static-color-107),var(--rd-static-color-108)) !important;
  border-color:var(--rd-brand) !important;
  color:var(--rd-static-color-111) !important;
}
html[data-theme="dark"] body:not(#_rd).studio-enabled .review-reminder:hover strong{
  color:var(--rd-static-color-111) !important;
}
html[data-theme="dark"] body:not(#_rd).studio-enabled .review-reminder:hover small{
  color:var(--rd-static-color-110) !important;
}
html[data-theme="dark"] body:not(#_rd).studio-enabled .review-reminder:hover > span:first-child{
  color:var(--rd-static-color-111) !important;
}
html[data-theme="dark"] body:not(#_rd).studio-enabled .lesson-course-progress{
  background:linear-gradient(135deg,var(--rd-static-color-107),var(--rd-static-color-108)) !important;
  border-color:var(--rd-static-color-109) !important;
}
html[data-theme="dark"] body:not(#_rd).studio-enabled .lesson-course-progress strong{
  color:var(--rd-static-color-111) !important;
}
html[data-theme="dark"] body:not(#_rd).studio-enabled .lesson-course-progress .hint{
  color:var(--rd-static-color-110) !important;
}
html[data-theme="dark"] body:not(#_rd).studio-enabled .lesson-resume{
  background:linear-gradient(180deg,var(--rd-static-color-107),var(--rd-static-color-108)) !important;
  border-color:var(--rd-static-color-109) !important;
  color:var(--rd-static-color-111) !important;
}
html[data-theme="dark"] body:not(#_rd).studio-enabled .lesson-resume strong{
  color:var(--rd-static-color-111) !important;
}
html[data-theme="dark"] body:not(#_rd).studio-enabled .ratings button[data-rating="easy"]{
  background:var(--palette-dark-violet-soft) !important;
  color:var(--legacy-hex-c9c0ff) !important;
  border-color:var(--legacy-hex-44405c) !important;
}
html[data-theme="dark"] body:not(#_rd).studio-enabled .shortcut:hover .shortcut-icon.indigo{
  background:var(--legacy-hex-363050) !important;
  color:var(--rd-static-color-111) !important;
}

/* ==========================================================================
   MOBILE DESIGN SYSTEM POLISH (strictly <=720px / mobile-ux; PC 1440px untouched)
   ========================================================================== */
@media (max-width:720px), (orientation:landscape) and (max-height:500px) and (pointer:coarse){
  /* 1. Shared Mobile Header: unify control heights, radii, and dark-mode streak token */
  html body:not(#_rd).studio-enabled.mobile-ux #studioHeader .topbar-actions .level-pill{
    height:40px !important;
    min-height:40px !important;
    padding:0 12px !important;
    border-radius:var(--radius-btn) !important;
    white-space:nowrap !important;
    box-shadow:none !important;
  }
  html body:not(#_rd).studio-enabled.mobile-ux #studioHeader #homeStreak{
    height:40px !important;
    min-height:40px !important;
    min-width:44px !important;
    padding:0 10px !important;
    border-radius:var(--radius-btn) !important;
    white-space:nowrap !important;
    box-shadow:none !important;
  }
  html[data-theme="dark"] body:not(#_rd).studio-enabled.mobile-ux #studioHeader #homeStreak{
    background:var(--palette-mobile-streak-soft) !important;
    border:1px solid var(--palette-mobile-streak-border) !important;
    color:var(--palette-mobile-streak-text) !important;
  }
  html body:not(#_rd).studio-enabled.mobile-ux #studioHeader #headerInfo{
    box-shadow:none !important;
    border:1px solid var(--rd-line) !important;
  }

  /* 2. Native <select> affordance: crisp chevron + ellipsis on all mobile screens */
  html body:not(#_rd).studio-enabled.mobile-ux select:not(.qa-thinking){
    appearance:none;
    -webkit-appearance:none;
    padding-right:36px !important;
    text-overflow:ellipsis;
    white-space:nowrap;
    overflow:hidden;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat:no-repeat !important;
    background-position:right 12px center !important;
    background-size:16px 16px !important;
  }
  html[data-theme="dark"] body:not(#_rd).studio-enabled.mobile-ux select:not(.qa-thinking){
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23cbd5e1' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
  }

  /* 3. Mobile Home: Compact Quick Search bar & Daily Word horizontal layout */
  html body:not(#_rd).studio-enabled.mobile-ux #studioHome.overview-v216 .overview-search{
    margin:0 0 12px !important;
  }
  html body:not(#_rd).studio-enabled.mobile-ux #studioHome .overview-search > summary{
    min-height:44px !important;
    padding:10px 14px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    line-height:1.25 !important;
  }
  html body:not(#_rd).studio-enabled.mobile-ux #studioHome #homeDailyWord{
    margin:0 0 10px !important;
    padding:10px 14px 8px !important;
  }
  html body:not(#_rd).studio-enabled.mobile-ux #studioHome #homeDailyWord .overview-word-head{
    align-items:center !important;
    gap:8px !important;
    padding:0 0 8px !important;
    margin:0 !important;
  }
  html body:not(#_rd).studio-enabled.mobile-ux #studioHome #homeDailyWord .overview-word-head h3{
    font-size:14.5px !important;
    line-height:1.25 !important;
    margin:0 !important;
  }
  html[data-theme="dark"] body:not(#_rd).studio-enabled.mobile-ux #studioHome #homeDailyWord .overview-word-head h3{
    color:var(--palette-mobile-vocab-heading) !important;
  }
  html body:not(#_rd).studio-enabled.mobile-ux #studioHome #homeDailyWord .overview-word-head button:not(:active):not(:focus-visible){
    white-space:nowrap !important;
    flex:0 0 auto !important;
    min-height:36px !important;
    height:36px !important;
    padding:0 10px !important;
    border-radius:var(--radius-btn) !important;
    font-size:12.5px !important;
    line-height:1 !important;
    background:var(--palette-clear) !important;
    border-color:var(--palette-clear) !important;
    color:var(--rd-ink) !important;
  }
  html[data-theme="dark"] body:not(#_rd).studio-enabled.mobile-ux #studioHome #homeDailyWord .overview-word-head button:not(:active):not(:focus-visible){
    color:var(--palette-dark-ink) !important;
  }
  html body:not(#_rd).studio-enabled.mobile-ux #studioHome #homeDailyWord .overview-word-row{
    display:flex !important;
    align-items:center !important;
    gap:8px !important;
    margin:0 !important;
    padding:8px 0 0 !important;
  }
  html body:not(#_rd).studio-enabled.mobile-ux #studioHome #homeDailyWord .overview-word-row summary{
    display:grid !important;
    grid-template-columns:auto minmax(0,1fr) !important;
    grid-template-rows:auto auto !important;
    column-gap:12px !important;
    row-gap:2px !important;
    align-items:stretch !important;
    padding:8px 12px !important;
  }
  html body:not(#_rd).studio-enabled.mobile-ux #studioHome #homeDailyWord .overview-word-row summary strong{
    grid-column:1 !important;
    grid-row:1 / 3 !important;
    align-self:center !important;
    font-size:clamp(32px, 9.5vw, 40px) !important;
    line-height:1.05 !important;
    margin:0 !important;
  }
  html body:not(#_rd).studio-enabled.mobile-ux #studioHome #homeDailyWord .overview-word-row summary span:first-of-type{
    grid-column:2 !important;
    grid-row:1 !important;
    align-self:start !important;
    font-size:13.5px !important;
    line-height:1.2 !important;
    margin:0 !important;
    padding-top:1px !important;
  }
  html body:not(#_rd).studio-enabled.mobile-ux #studioHome #homeDailyWord .overview-word-row summary span:last-of-type{
    grid-column:2 !important;
    grid-row:2 !important;
    align-self:end !important;
    font-size:14.5px !important;
    line-height:1.25 !important;
    margin:0 !important;
    padding-bottom:1px !important;
    overflow-wrap:anywhere;
  }
  html body:not(#_rd).studio-enabled.mobile-ux #studioHome #homeDailyWord .overview-word-sound{
    border-left:0 !important;
    flex:0 0 auto !important;
    padding-right:0 !important;
  }
  html body:not(#_rd).studio-enabled.mobile-ux #studioHome #homeDailyWord .overview-word-sound button{
    width:44px !important;
    height:44px !important;
    min-width:44px !important;
    min-height:44px !important;
    border-radius:var(--radius-btn) !important;
    background:var(--rd-brand-soft) !important;
    border:1px solid var(--rd-line) !important;
    color:var(--rd-brand) !important;
  }
  html[data-theme="dark"] body:not(#_rd).studio-enabled.mobile-ux #studioHome #homeDailyWord .overview-word-sound button{
    background:var(--palette-dark-violet-soft) !important;
    border-color:var(--legacy-hex-44405c) !important;
    color:var(--legacy-hex-c9c0ff) !important;
  }

  /* 4. Mobile Home: Hero card single-line goal action & Light/Dark parity */
  html body:not(#_rd).studio-enabled.mobile-ux #studioHome.overview-v216 #mobileTodayHero{
    background-color:var(--palette-mobile-hero-surface) !important;
  }
  html body:not(#_rd).studio-enabled.mobile-ux #studioHome #mobileTodayHero .mobile-hero-top{
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    flex-wrap:nowrap !important;
    gap:10px !important;
  }
  html body:not(#_rd).studio-enabled.mobile-ux #studioHome #mobileTodayHero .mobile-hero-top h2{
    flex:1 1 auto !important;
    min-width:0 !important;
    font-size:19px !important;
    line-height:1.25 !important;
  }
  html body:not(#_rd).studio-enabled.mobile-ux #studioHome.overview-v216 #mobileTodayHero .mobile-hero-top > button:not(:disabled){
    flex:0 0 auto !important;
    max-width:none !important;
    min-height:40px !important;
    padding:0 12px !important;
    border-radius:var(--radius-btn) !important;
    font-size:12.5px !important;
    font-weight:650 !important;
    white-space:nowrap !important;
    line-height:1.2 !important;
    background:var(--palette-mobile-hero-button-soft) !important;
    border:1px solid var(--palette-mobile-hero-button-border) !important;
    color:var(--palette-white) !important;
    box-shadow:none !important;
  }
  html[data-theme="dark"] body:not(#_rd).studio-enabled.mobile-ux #studioHome.overview-v216 #mobileTodayHero .mobile-hero-cta:not(:disabled){
    background:var(--palette-white) !important;
    color:var(--palette-mobile-hero-button-ink) !important;
    border:0 !important;
    box-shadow:none !important;
  }

  /* 4b. Mobile Home: tighten Custom Lesson card text-to-button spacing (identical in light & dark) */
  html body:not(#_rd).studio-enabled.mobile-ux #studioHome .overview-custom-lesson{
    padding:14px !important;
    gap:8px !important;
    border-radius:var(--radius-16px) !important;
  }
  html body:not(#_rd).studio-enabled.mobile-ux #studioHome .overview-custom-lesson .lesson-custom-head{
    gap:4px !important;
  }
  html body:not(#_rd).studio-enabled.mobile-ux #studioHome .overview-custom-lesson .lesson-custom-head h3{
    margin:0 0 4px !important;
  }
  html body:not(#_rd).studio-enabled.mobile-ux #studioHome .overview-custom-lesson .lesson-custom-head p{
    margin:0 !important;
    line-height:1.45 !important;
  }

  /* 5. Mobile Learn (Flashcards): fix focus-bar close collision, top dead space, double card border & competing Next CTA */
  html body:not(#_rd).studio-enabled.mobile-ux.mobile-card-mode main.workspace{
    padding-top:10px !important;
  }
  html body:not(#_rd).studio-enabled.mobile-ux.mobile-card-mode .flash-screen,
  html body:not(#_rd).studio-enabled.mobile-ux.mobile-card-mode #learnPanel,
  html body:not(#_rd).studio-enabled.mobile-ux.mobile-card-mode .flash-layout{
    padding-top:0 !important;
    margin-top:0 !important;
  }
  html body:not(#_rd).studio-enabled.mobile-ux.mobile-card-mode #learnPanel > .activity-intro{
    display:none !important;
  }
  html body:not(#_rd).studio-enabled.mobile-ux.mobile-card-mode #passiveDisclosure{
    margin:0 0 10px !important;
  }
  html[data-theme="dark"] body:not(#_rd).studio-enabled.mobile-ux .mobile-card-actions button:nth-child(1):not(:active):not(:focus-visible){
    background:var(--palette-mobile-wrong-soft) !important;
    border-color:var(--palette-mobile-wrong-border) !important;
    color:var(--palette-mobile-wrong-ink) !important;
  }
  html[data-theme="dark"] body:not(#_rd).studio-enabled.mobile-ux .mobile-card-actions button:nth-child(2):not(:active):not(:focus-visible){
    background:var(--palette-mobile-correct-soft) !important;
    border-color:var(--palette-mobile-correct-border) !important;
    color:var(--palette-mobile-correct-ink) !important;
  }
  html body:not(#_rd).studio-enabled.mobile-ux #flashcard{
    border:1px solid var(--rd-line) !important;
    border-radius:var(--radius-16px) !important;
    overflow:hidden !important;
  }
  html body:not(#_rd).studio-enabled.mobile-ux #flashcard .inner,
  html body:not(#_rd).studio-enabled.mobile-ux #flashcard .face{
    border:0 !important;
    border-radius:var(--radius-15px) !important;
    box-shadow:none !important;
  }
  html body:not(#_rd).studio-enabled.mobile-ux .mobile-focus-bar:not([hidden]){
    display:grid !important;
    grid-template-columns:44px minmax(0,1fr) !important;
    align-items:center !important;
    gap:6px 12px !important;
    padding:8px 16px !important;
  }
  html body:not(#_rd).studio-enabled.mobile-ux .mobile-focus-bar > button{
    width:44px !important;
    height:44px !important;
    min-width:44px !important;
    min-height:44px !important;
    font-size:20px !important;
    padding:0 !important;
  }
  html body:not(#_rd).studio-enabled.mobile-ux.mobile-card-mode #progress{
    display:none !important;
  }
  html body:not(#_rd).studio-enabled.mobile-ux.mobile-card-mode .flash-focus > .buttons #next:not(:active):not(:focus-visible){
    background:var(--button-bg) !important;
    color:var(--button-text) !important;
    border-color:var(--button-border) !important;
    box-shadow:none !important;
  }

  /* 6. Mobile Search: demote secondary scope toggle so it doesn't compete with top tabs & Search CTA */
  html body:not(#_rd).studio-enabled.mobile-ux:not([data-search-tool="handwriting"]) #searchPanel .dictionary-modes:not([hidden]){
    gap:4px !important;
    padding:3px !important;
    border-radius:var(--radius-btn) !important;
    background:var(--rd-surface) !important;
    border:1px solid var(--rd-line) !important;
    margin-bottom:8px !important;
  }
  html body:not(#_rd).studio-enabled.mobile-ux #searchPanel .dictionary-modes button{
    min-height:36px !important;
    padding:6px 12px !important;
    border-radius:var(--radius-9px) !important;
    border-color:var(--palette-clear) !important;
    font-size:13px !important;
    font-weight:600 !important;
    white-space:nowrap !important;
  }
  html body:not(#_rd).studio-enabled.mobile-ux #searchPanel .dictionary-modes button[aria-pressed="true"]:not(:active):not(:focus-visible){
    background:var(--rd-brand-soft) !important;
    color:var(--rd-brand) !important;
    border-color:var(--palette-clear) !important;
  }
  html[data-theme="dark"] body:not(#_rd).studio-enabled.mobile-ux #searchPanel .dictionary-modes button[aria-pressed="true"]:not(:active):not(:focus-visible){
    background:var(--palette-dark-violet-soft) !important;
    color:var(--legacy-hex-c9c0ff) !important;
  }

  /* 7. Mobile Translator: give #translationStatus clean breathing room below primary button */
  html body:not(#_rd).studio-enabled.mobile-ux #translatorPanel #translationStatus{
    margin:12px 0 6px !important;
    line-height:1.5;
  }

  /* 8. Mobile Notebook: make "+ Thêm từ" full-width primary action instead of isolated right-floating chip */
  html body:not(#_rd).studio-enabled.mobile-ux #notebookPanel > .mobile-add-word{
    align-self:stretch !important;
    width:100% !important;
    min-height:46px !important;
    font-weight:700 !important;
    background:var(--button-active-bg) !important;
    color:var(--button-active-text) !important;
    border-color:var(--button-active-bg) !important;
  }

  /* 9. Mobile Lessons: highlight primary resume CTA cleanly */
  html body:not(#_rd).studio-enabled.mobile-ux #lessonsPanel .lesson-course-progress .lesson-resume:not(:disabled){
    background:var(--button-active-bg) !important;
    color:var(--button-active-text) !important;
    border-color:var(--button-active-bg) !important;
    font-weight:700 !important;
    box-shadow:none !important;
  }
  html body:not(#_rd).studio-enabled.mobile-ux #lessonsPanel .lesson-course-progress .lesson-resume:not(:disabled) strong{
    color:var(--button-active-text) !important;
  }

  /* 10. Mobile Declutter: hide verbose filler explanatory paragraphs across mobile screens
     (DOM & desktop remain 100% preserved; real status/stats elements remain visible). */
  html body:not(#_rd).studio-enabled.mobile-ux #realReadingPanel .rr-subtitle,
  html body:not(#_rd).studio-enabled.mobile-ux #lessonsPanel > p.hint,
  html body:not(#_rd).studio-enabled.mobile-ux #quizPanel > p.hint,
  html body:not(#_rd).studio-enabled.mobile-ux #quizCombinedTypes > p.hint,
  html body:not(#_rd).studio-enabled.mobile-ux #quizForm .adaptive-option + p.hint,
  html body:not(#_rd).studio-enabled.mobile-ux #srsPanel > p.hint,
  html body:not(#_rd).studio-enabled.mobile-ux #mistakesPanel > p.hint:not(#mistakeSummary),
  html body:not(#_rd).studio-enabled.mobile-ux #comparePanel #compareIntro,
  html body:not(#_rd).studio-enabled.mobile-ux #searchPanel #dictionaryModeHint,
  html body:not(#_rd).studio-enabled.mobile-ux #translatorPanel > p.hint,
  html body:not(#_rd).studio-enabled.mobile-ux #matchGamePanel .pg-subtitle,
  html body:not(#_rd).studio-enabled.mobile-ux #sentenceGamePanel .pg-subtitle,
  html body:not(#_rd).studio-enabled.mobile-ux .s4-head > p,
  html body:not(#_rd).studio-enabled.mobile-ux #podcastPanel .podcast-subtitle,
  html body:not(#_rd).studio-enabled.mobile-ux #accountSettingsView > p.hint,
  html body:not(#_rd).studio-enabled.mobile-ux #studioHome #mobileTodayHero > p:not(.overview-lesson){
    display:none !important;
  }

  /* 11. Unified Mobile Corner-Radius System (12px interactive controls & disclosures; 16px cards) */
  html body:not(#_rd).studio-enabled.mobile-ux button:not(#headerInfo):not(#musicQueueLibrary):not(#aiQaSend):not(.qa-chat-attach):not(.mobile-passive-toggle):not(.music-transport-play):not(.music-pill):not(.podcast-speed-btn):not(.podcast-shelf-nav):not([data-search-scope]):where(:not([data-ui-owned]):not(.ui-btn)),
  html body:not(#_rd).studio-enabled.mobile-ux :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select:not(.qa-thinking),textarea){
    border-radius:var(--radius-btn) !important;
  }
  html body:not(#_rd).studio-enabled.mobile-ux details:is(#homePlanSettings,#planSetup,.ps-disclosure,.hub-group,.dictionary-row,.lesson-sources,.mobile-account-group,.memory-schedule,.ocr-panel,.dictionary-summary,.mobile-home-stats,.word-relations,.confusion-candidate,.confusion-char-section,.details,.compare-lesson,.exam-sources,.rr-sources,.exam-feedback details,.plan-panel,.update-push-settings,.push-settings,.lesson-vocab,.clean-disclosure,.overview-search){
    border-radius:var(--radius-btn) !important;
  }
  html body:not(#_rd).studio-enabled.mobile-ux details:is(#homePlanSettings,#planSetup,.ps-disclosure,.hub-group,.dictionary-row,.lesson-sources,.mobile-account-group,.memory-schedule,.ocr-panel,.dictionary-summary,.mobile-home-stats,.word-relations,.confusion-candidate,.confusion-char-section,.details,.compare-lesson,.exam-sources,.rr-sources,.exam-feedback details,.plan-panel,.update-push-settings,.push-settings,.lesson-vocab,.clean-disclosure,.overview-search) > summary,
  html body:not(#_rd).studio-enabled.mobile-ux :is(#homePlanSettings,#planSetup,.overview-search,.clean-disclosure) > summary:focus-visible{
    border-radius:var(--radius-btn) !important;
  }
  html body:not(#_rd).studio-enabled.mobile-ux details:is(#homePlanSettings,#planSetup,.ps-disclosure,.hub-group,.dictionary-row,.lesson-sources,.mobile-account-group,.memory-schedule,.ocr-panel,.dictionary-summary,.mobile-home-stats,.word-relations,.confusion-candidate,.confusion-char-section,.details,.compare-lesson,.exam-sources,.rr-sources,.exam-feedback details,.plan-panel,.update-push-settings,.push-settings,.lesson-vocab,.clean-disclosure,.overview-search)[open] > summary,
  html body:not(#_rd).studio-enabled.mobile-ux :is(#homePlanSettings,#planSetup,.overview-search,.clean-disclosure)[open] > summary:focus-visible{
    border-bottom-left-radius:0 !important;
    border-bottom-right-radius:0 !important;
  }
  html body:not(#_rd).studio-enabled.mobile-ux :is(#homeDailyWord,#mobileTodayHero,.lesson-course-progress,.podcast-player-col,#flashcard,.account-version,.account-detail,.account-metric,.about-card,.hub-card){
    border-radius:var(--radius-16px) !important;
  }

  /* 12. Dark Mode Parity with Light Mode (remove dark-only extra panel boxes, sync accents & badges) */
  html[data-theme="dark"] body:not(#_rd).studio-enabled.mobile-ux :is(.panel-box,.activity-panel,.hub-panel):not(#aiQaPanel){
    background:var(--palette-clear) !important;
    border:0 !important;
    box-shadow:none !important;
  }
  html[data-theme="dark"] body:not(#_rd).studio-enabled.mobile-ux .account-version .offline-bar{
    background:var(--palette-clear) !important;
    border:0 !important;
    box-shadow:none !important;
  }
  html[data-theme="dark"] body:not(#_rd).studio-enabled.mobile-ux .account-badge{
    background:var(--palette-mobile-status-soft) !important;
    border:1px solid var(--palette-mobile-status-border) !important;
    color:var(--palette-mobile-status-ink) !important;
  }
  html[data-theme="dark"] body:not(#_rd).studio-enabled.mobile-ux #searchForm button[type="submit"],
  html[data-theme="dark"] body:not(#_rd).studio-enabled.mobile-ux .studio-search-tabs button.active{
    box-shadow:none !important;
  }
}
