/* Egomini soft style: learning flow (preview, flashcard, scramble, typing, review, success) */
.top-mini-nav { gap: 10px; margin: 2px 0 12px; }
.top-mini-nav .link-btn { display: inline-flex; align-items: center; gap: 4px; padding: 7px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text); font-size: 13px; font-weight: 600; box-shadow: var(--shadow-card); }
.top-mini-nav .progress-chip { padding: 7px 13px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text); font-family: var(--font-ui); font-size: 13px; font-weight: 700; box-shadow: var(--shadow-card); }
.page-heading { font-size: 20px; letter-spacing: -.01em; }
.page-heading svg { color: var(--accent); }
.section-label { margin: 14px 0 8px; font-size: 12.5px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--text-dim); }

.step-label { margin-bottom: 10px; font-size: 13px; font-weight: 700; color: var(--accent); }
.dots { gap: 6px; }
.dot { width: 9px; height: 9px; background: var(--surface-3); }
.dot.filled { background: var(--accent); }

/* main card */
.card {
  position: relative; overflow: hidden; gap: 12px; min-height: 280px; padding: 30px 22px 34px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow-card);
}
.card::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 180px; pointer-events: none;
  background: radial-gradient(90% 100% at 50% 0, color-mix(in srgb, var(--accent) 13%, transparent), transparent 75%);
}
.card > * { position: relative; }
.card-compact { min-height: 240px; }
.vi-text { font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.vi-text-compact { font-size: 20px; }
.word-text { font-size: 34px; font-weight: 800; letter-spacing: -.01em; }
.ipa-text { font-size: 16px; }
.pos-badge { padding: 4px 12px; font-size: 12px; font-weight: 700; color: var(--accent); background: color-mix(in srgb, var(--accent) 13%, var(--surface)); }
.example-text { max-width: 320px; padding: 10px 14px; border-radius: 14px; background: var(--surface-2); font-size: 13.5px; font-style: normal; }
.flip-hint { font-size: 12px; display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; }
.flip-hint .kbd-hint { margin-left: 2px; }
.preview-sub-text { font-size: 17px; font-weight: 600; color: var(--text); }
.audio-btn { width: 54px; height: 54px; background: color-mix(in srgb, var(--accent) 13%, var(--surface)); border: 0; color: var(--accent); box-shadow: var(--shadow-card); }

/* scramble */
.slot { min-width: 42px; height: 46px; border-radius: 14px; border-width: 2px; font-size: 17px; font-weight: 700; background: var(--surface-2); }
.slot.filled { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border-color: var(--accent); color: var(--accent); }
.chip { padding: 11px 15px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-card); font-size: 17px; font-weight: 700; }
.chip:hover { border-color: var(--accent); }
.type-input { border-radius: 18px; border-width: 2px; background: var(--surface); font-size: 19px; font-weight: 700; }
.type-input:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.feedback { font-size: 14px; font-weight: 600; }

/* buttons */
.footer-actions { margin-top: 16px; }
.btn { border-radius: 18px; font-size: 16px; font-weight: 800; }
.btn-primary { box-shadow: 0 10px 22px -12px var(--accent); }
.btn-secondary { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-card); }
.btn-ghost { border-radius: 14px; }
.btn-sm { border-radius: 14px; font-size: 13.5px; font-weight: 700; }
.btn[disabled] { box-shadow: none; }

/* success / congrats */
.success-banner {
  position: relative; overflow: hidden; gap: 10px; padding: 26px 20px 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow-card);
}
.success-banner::before {
  content: ''; width: 120px; height: 150px; margin-bottom: -4px;
  background: url(/img/mascot/idea-tip.webp) center / contain no-repeat;
}
.success-banner .big-emoji { display: none; }
/* learned-word screen: mascot left, word + phonetics + listen buttons right */
.success-banner.sb-done { overflow: visible; }
.success-banner.sb-done::before { display: none; }
.sb-head { display: flex; align-items: center; justify-content: center; gap: 18px; width: 100%; }
.sb-mascot { width: 104px; height: 128px; object-fit: contain; flex-shrink: 0; }
.sb-info { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; text-align: left; }
.sb-info .sb-meta, .sb-info .fc-speak { justify-content: flex-start !important; }
.sb-info .sb-word { line-height: 1.1; overflow-wrap: anywhere; }
@media (max-width: 380px) { .sb-head { gap: 12px; } .sb-mascot { width: 80px; height: 100px; } }
@media (min-width: 1040px) { .sb-mascot { width: 150px; height: 170px; } .sb-head { gap: 28px; } }
.success-banner .btn-row { width: 100%; }
.success-banner .btn-row .btn { flex: 1; }

/* reveal + difficulty choices */
.study-wrap .btn-row[style*="wrap"] { gap: 8px; }
.study-wrap .btn-row .btn-secondary, .success-banner .btn-row .btn-secondary { justify-content: center; }
.link-btn { font-weight: 600; }

/* part segments (header bar while learning) */
.part-bar { gap: 5px; margin-top: 12px; }
.part-seg { border-radius: 10px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-card); font-weight: 700; }
.part-seg.current { border: 2px solid var(--accent); }

@media (min-width: 1040px) {
  .card { min-height: 420px; padding: 56px 48px; border-radius: 32px; }
  .success-banner::before { width: 170px; height: 170px; }
  .word-text { font-size: 50px; }
  .vi-text { font-size: 34px; }
}

.top-mini-nav .progress-chip, .card, .success-banner, .chip { border-color: transparent; }

/* Center the main action button and keep the ↵ hint out of the label's centering */
.btn { position: relative; }
.btn .kbd-hint { position: absolute; right: 16px; top: 50%; margin: 0; transform: translateY(-50%); }
.footer-actions > .btn:only-child { display: flex; width: 100%; }

/* part switcher: ‹ Ngày 2 · Phần 3/10 › */
.part-nav { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-card); font-size: 13px; font-weight: 700; }
.part-nav > span { padding: 0 6px; white-space: nowrap; }
.part-nav button { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--accent) 13%, transparent); color: var(--accent); cursor: pointer; }
.part-nav button:disabled { opacity: .3; cursor: default; }

/* =====================  Immersive study mode (Đợt 1 + 2)  ===================== */
body[data-study="on"] .dock, body[data-study="on"] .sidebar, body[data-study="on"] header.topbar { display: none !important; }
body[data-study="on"] main#screen { padding-bottom: 130px; }
@media (min-width: 1040px) {
  body[data-study="on"] .rail { display: none !important; }
  body[data-study="on"] main#screen { margin-left: 0; padding-top: 24px; }
}

/* slim top bar: ✕  progress  count  ⋯ */
.sbar { display: flex; align-items: center; gap: 10px; max-width: 640px; margin: 4px auto 14px; }
.sbar-btn { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex-shrink: 0; padding: 0; border: 0; border-radius: 50%; background: var(--surface); color: var(--text-dim); box-shadow: var(--shadow-card); cursor: pointer; }
.sbar-prog { flex: 1; height: 12px; overflow: hidden; border-radius: 999px; background: var(--surface-3); }
.sbar-prog i { display: block; height: 100%; min-width: 12px; border-radius: 999px; background: var(--btn-bg, var(--accent)); transition: width .35s ease; }
.sbar-count { min-width: 34px; font-size: 13px; font-weight: 800; color: var(--text-dim); text-align: right; }

/* step tracker */
.step-track { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0 0 4px; }
.step-track i { width: 14px; height: 2px; border-radius: 2px; background: var(--surface-3); }
.step-track .st { display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; border-radius: 999px; background: var(--surface-2); color: var(--text-dim); font-size: 12px; font-weight: 700; }
.step-track .st.on { background: var(--btn-bg, var(--accent)); color: var(--accent-ink); }
.step-track .st.done { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--accent); }
.st-navrow { display: flex; justify-content: space-between; margin: -4px 0 10px; }
.st-navrow .st-nav { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--text); font-family: var(--font-ui); font-size: 12.5px; font-weight: 700; cursor: pointer; }
.st-navrow .st-nav svg { color: var(--accent); }
.st-navrow .st-fwd { margin-left: auto; }
.study-wrap, .success-banner { position: relative; }
.success-banner > .st-navrow { width: 100%; }
.step-side { display: none; }
@media (min-width: 900px) and (hover: hover) {
  .st-navrow { display: none; }
  .step-side { display: flex; align-items: center; justify-content: center; position: absolute; top: 45%; width: 52px; height: 52px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--surface-2); color: var(--text); cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.18); transition: transform .15s, background .15s; }
  .step-side:hover { transform: scale(1.06); background: var(--surface-3); }
  .step-side.left { left: -84px; }
  .step-side.right { right: -84px; }
}
.step-sub { margin-bottom: 12px; text-align: center; font-size: 12px; font-weight: 600; color: var(--text-dim); }
.study-wrap { max-width: 560px; margin-left: auto; margin-right: auto; }

/* bottom action bar (thumb zone) */
.study-actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: flex; gap: 10px; max-width: 560px; margin: 0 auto; padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(180deg, transparent, var(--bg) 32%); }
.study-actions .btn { width: auto; flex: 0 0 auto; padding: 15px 18px; }
.study-actions .btn.grow { flex: 1; }
.study-actions .btn[disabled] { opacity: .4; box-shadow: none; }
.study-actions.inline { position: static; padding: 14px 0 0; background: none; }

/* cards */
.card.fc, .card.sq, .card.tp { min-height: 0; padding: 30px 20px; }
.card.fc { min-height: 300px; cursor: pointer; }
.card.fc .vi-text { font-size: 26px; }
.fc-speak { display: flex; gap: 8px; margin-top: 4px; }
.fc-speak .pill.sm { min-width: 84px; height: 40px; padding: 0 18px; justify-content: center; font-size: 15px; font-weight: 800; }
@media (min-width: 720px) { .fc-speak .pill.sm { min-width: 96px; height: 44px; font-size: 16px; } }
.audio-btn.big { width: 68px; height: 68px; }
.sq-hint { font-size: 13px; color: var(--text-dim); }

/* answer slots + 3D letter tiles */
.answer-row { gap: 8px; min-height: 60px; margin: 8px 0 0; }
.slot { min-width: 48px; height: 58px; padding: 0 10px; border: 2px dashed var(--line); border-radius: 16px; font-size: 22px; font-weight: 800; background: var(--surface-2); }
.slot.filled { border-style: solid; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border-color: var(--accent); color: var(--accent); }
.slot.ok { background: #DDF3E6; border-color: #3BA776; color: #2E8B57; }
.slot.wrong { background: #FDE4E2; border-color: #E5484D; color: #C93A3F; }
.pool-row { gap: 10px; margin: 20px 0 0; }
.chip { min-width: 58px; height: 58px; padding: 0 16px; border: 0; border-radius: 18px; background: var(--surface); color: var(--text); font-family: var(--font-word); font-size: 24px; font-weight: 800; box-shadow: 0 5px 0 var(--surface-3), 0 8px 14px -6px rgba(60, 30, 15, .25); transition: transform .08s, box-shadow .08s; }
.chip:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--surface-3); }
.chip.used { visibility: hidden; }

/* typing */
.type-input { font-size: 22px; text-align: center; letter-spacing: 1px; }
.feedback.hint { font-size: 20px; font-weight: 800; letter-spacing: 4px; color: var(--accent); }
.feedback.ok { color: #2E8B57; font-weight: 800; }

/* mascot coach bubble */
.study-toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); z-index: 60; display: flex; align-items: center; gap: 10px; max-width: 86vw; padding: 8px 18px 8px 10px; border-radius: 999px; background: var(--surface); box-shadow: 0 14px 30px -10px rgba(60, 30, 15, .45); font-size: 14px; font-weight: 800; transform: translateX(-50%); animation: toastIn .28s cubic-bezier(.2, 1.4, .4, 1); }
.study-toast img { width: 40px; height: 40px; object-fit: contain; }
.study-toast.ok { color: #2E8B57; box-shadow: 0 0 0 2px #3BA776, 0 14px 30px -10px rgba(60, 30, 15, .45); }
.study-toast.err { color: #C93A3F; box-shadow: 0 0 0 2px #E5484D, 0 14px 30px -10px rgba(60, 30, 15, .45); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 14px) scale(.9); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }

/* menu sheet: part picker */
.sm-parts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 14px; }
.sm-part { display: flex; align-items: center; justify-content: center; height: 44px; border: 0; border-radius: 14px; background: var(--surface-2); color: var(--text); font-family: var(--font-ui); font-size: 15px; font-weight: 800; cursor: pointer; }
.sm-part.cur { background: var(--btn-bg, var(--accent)); color: var(--accent-ink); }
.sm-part:disabled:not(.cur) { opacity: .45; cursor: default; }
main#screen .slot.ok { border-color: #3BA776; }
main#screen .slot.wrong { border-color: #E5484D; }

/* layout: tiles sit low in the thumb zone; used tiles leave a ghost so the row doesn't shift */
.study-wrap { display: flex; flex-direction: column; min-height: calc(100dvh - 210px); }
#stepBody { display: flex; flex: 1; flex-direction: column; }
.card.fc { flex: 1; }
.pool-row { margin-top: auto; padding: 24px 0 6px; }
.chip.used { visibility: visible; background: var(--surface-2); color: transparent; box-shadow: none; pointer-events: none; }
.chip.used .kbd-hint { visibility: hidden; }
.card.sq, .card.tp { flex: 0 0 auto; }
.study-actions.inline { width: 100%; max-width: none; }
.study-actions.inline .btn.grow { flex: 1; }
.study-toast { width: max-content; max-width: 92vw; }

/* =====================  Mascot guide  ===================== */
.guide-overlay { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(35, 18, 10, .62); animation: guideFade .25s ease; } /* no backdrop-filter: on iOS it can leave a black square behind when the overlay is removed */
.guide-overlay.leaving { animation: guideOut .45s ease .3s forwards; }
@keyframes guideFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes guideOut { to { opacity: 0; } }
.guide-box { display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 380px; }
.guide-bubble { position: relative; width: 100%; padding: 20px 18px 18px; border-radius: 26px; background: var(--surface); box-shadow: 0 24px 50px -16px rgba(0, 0, 0, .5); animation: bubblePop .4s cubic-bezier(.2, 1.5, .4, 1) .15s both; }
.guide-bubble::after { content: ''; position: absolute; left: 50%; bottom: -12px; width: 26px; height: 26px; background: var(--surface); transform: translateX(-50%) rotate(45deg); border-radius: 0 0 6px 0; }
.guide-bubble p { min-height: 66px; margin: 0 0 14px; font-size: 16.5px; font-weight: 700; line-height: 1.5; color: var(--text); }
.guide-bubble .btn { width: 100%; }
.guide-bubble .btn.pop { animation: btnPop .35s cubic-bezier(.2, 1.6, .4, 1); }
.guide-mascot { width: auto; height: min(30vh, 250px); max-width: 70vw; margin-top: 8px; object-fit: contain; filter: drop-shadow(0 14px 16px rgba(0, 0, 0, .35)); animation: mascotIn .55s cubic-bezier(.2, 1.4, .4, 1) both, mascotFloat 3s ease-in-out .6s infinite; }
.guide-overlay.leaving .guide-mascot { animation: mascotJump .5s ease forwards; }
.guide-overlay.leaving .guide-bubble { animation: bubbleOut .3s ease forwards; }
@keyframes bubblePop { from { opacity: 0; transform: translateY(20px) scale(.85); } to { opacity: 1; transform: none; } }
@keyframes btnPop { from { transform: scale(.85); } to { transform: scale(1); } }
@keyframes mascotIn { from { opacity: 0; transform: translateY(80px) scale(.6); } to { opacity: 1; transform: none; } }
@keyframes mascotFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes mascotJump { 0% { transform: translateY(0) scale(1); } 40% { transform: translateY(-40px) scale(1.12) rotate(-6deg); } 100% { transform: translateY(0) scale(1); } }
@keyframes bubbleOut { to { opacity: 0; transform: translateY(-16px) scale(.9); } }
.guide-spark { position: fixed; width: 10px; height: 14px; margin: -7px 0 0 -5px; border-radius: 3px; pointer-events: none; animation: spark .8s cubic-bezier(.15, .8, .3, 1) forwards; }
@keyframes spark { from { opacity: 1; transform: translate(0, 0) rotate(0); } to { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(.6); } }

/* =====================  3D flashcard flip  ===================== */
.flip3d { flex: 1; min-height: 340px; perspective: 1400px; cursor: pointer; }
.flip-inner { position: relative; width: 100%; height: 100%; min-height: 340px; transform-style: preserve-3d; transition: transform .75s cubic-bezier(.34, 1.35, .5, 1); }
.flip3d.flipped .flip-inner { transform: rotateY(180deg); }
.flip-face { position: absolute; inset: 0; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.flip-face.back { transform: rotateY(180deg); }
.flip3d:not(:has(button:active, .ex-block:active, .fc-speak:active)):active .flip-inner { transition-duration: .2s; }
.flip3d:not(.flipped):not(:has(button:active, .ex-block:active, .fc-speak:active)):active .flip-inner { transform: rotateY(-8deg) scale(.985); }
.flip3d.flipped:not(:has(button:active, .ex-block:active, .fc-speak:active)):active .flip-inner { transform: rotateY(188deg) scale(.985); }

/* Prevent 3D tilt when clicking controls, example sentence, or buttons inside card */
.flip3d.no-tilt .flip-inner,
.flip3d:has(button:active, .ex-block:active, .fc-speak:active, .ex-btn:active, .pill:active) .flip-inner {
  transform: none !important;
  transition-duration: 0s !important;
}
.flip3d.flipped.no-tilt .flip-inner,
.flip3d.flipped:has(button:active, .ex-block:active, .fc-speak:active, .ex-btn:active, .pill:active) .flip-inner {
  transform: rotateY(180deg) !important;
  transition-duration: 0s !important;
}
/* no filter:blur / negative z-index here: together with perspective they make iOS paint a black square at the top-left */
.flip3d::after { content: ''; position: absolute; left: 10%; right: 10%; bottom: -16px; height: 22px; border-radius: 50%; background: radial-gradient(ellipse at center, rgba(60, 30, 15, .22), rgba(60, 30, 15, 0) 70%); pointer-events: none; }
.flip3d { position: relative; }
@media (prefers-reduced-motion: reduce) { .flip-inner { transition-duration: .01s; } }
.flip3d { display: flex; }
.flip-inner { flex: 1; height: auto; }

/* Làm quen / Ôn tập từ vựng: cards slide in, children stagger, dots pop, chips fade in */
.pv-body > * { animation: pvRise .38s cubic-bezier(.2, .9, .3, 1) both; }
.pv-body > *:nth-child(2) { animation-delay: .05s; }
.pv-body > *:nth-child(3) { animation-delay: .1s; }
.pv-body > *:nth-child(4) { animation-delay: .15s; }
.pv-body > *:nth-child(5) { animation-delay: .2s; }
.pv-body > *:nth-child(6) { animation-delay: .25s; }
.pv-body.pv-back > * { animation-name: pvRiseBack; }
.pv-card { animation: pvCard .32s ease both; }
.dot.pop { animation: dotPop .45s cubic-bezier(.2, 1.6, .4, 1); }
.pv-chip { animation: pvChip .3s ease both; }
@keyframes pvRise { from { opacity: 0; transform: translateX(22px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes pvRiseBack { from { opacity: 0; transform: translateX(-22px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes pvCard { from { transform: scale(.985); } to { transform: none; } }
@keyframes dotPop { 0% { transform: scale(.4); } 60% { transform: scale(1.5); } 100% { transform: scale(1); } }
@keyframes pvChip { from { opacity: 0; transform: translateY(6px) scale(.9); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .pv-body > *, .pv-card, .dot.pop, .pv-chip { animation: none !important; } }

/* "When to review?" buttons: pinned to the bottom edge, outside the card, in easy thumb reach */
.diff-dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 560px; margin: 0 auto; padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(180deg, transparent, var(--bg) 32%); }
.diff-dock .btn { width: 100%; padding: 17px 10px; font-size: 16px; box-shadow: var(--shadow-card); }

.diff-dock.three { grid-template-columns: 1fr 1fr 1fr; }
.diff-dock:not(.three) { grid-template-columns: repeat(4, 1fr); }
.diff-dock .btn.grade { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 4px; font-size: 15px; }
.diff-dock .btn.grade small { font-size: 11px; font-weight: 500; opacity: .75; }
.rv .rv-answer { margin-top: 14px; }
.rv .feedback.hint { letter-spacing: .12em; font-family: var(--font-word); }
.rv-step { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 13px; font-weight: 700; color: var(--accent); }
.rv-step span { color: var(--text-dim); font-weight: 600; }
/* iOS leaves a stale black square where the header's layer was display:none'd on entering study/review: move it out of view instead of detaching it. */
body[data-study="on"] header.topbar { display: block !important; position: fixed !important; top: -400px !important; left: 0; right: 0; height: 0; overflow: hidden; visibility: hidden; pointer-events: none; }
/* List pages hide the header on phones/tablets only; on desktop it is the sidebar's brand block. */
@media (max-width: 1039px) { body[data-hdr="hidden"] header.topbar { display: block !important; position: fixed !important; top: -400px !important; left: 0; right: 0; height: 0; overflow: hidden; visibility: hidden; pointer-events: none; } }

/* Desktop "learned!" screen: one 640px column (same as .sbar), grade buttons sit right under the question instead of the screen edge */
@media (min-width: 1040px) {
  .success-banner { max-width: 640px; margin: 6vh auto 0; padding: 36px 48px 32px; gap: 12px; }
  .success-banner::before { width: 110px; height: 130px; margin-bottom: 0; }
  .success-banner .sb-word { font-size: 46px !important; line-height: 1.1; }
  .success-banner .sb-vi { font-size: 20px; }
  .success-banner .example-text { font-size: 15px; }
  .success-banner .diff-q { margin-top: 18px !important; }
  .success-banner .diff-dock { position: static; width: 100%; max-width: none; margin: 0; padding: 0; background: none; gap: 12px; }
  .success-banner .diff-dock .btn.grade { padding: 16px 8px; font-size: 16px; box-shadow: none; border: 1.5px solid var(--line); transition: transform .15s, border-color .15s, background .15s; }
  .success-banner .diff-dock .btn.grade:hover { transform: translateY(-2px); }
  .success-banner .grade-hard:hover { border-color: #e8836b; background: color-mix(in srgb, #e8836b 10%, var(--surface)); }
  .success-banner .grade-ok:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
  .success-banner .grade-easy:hover { border-color: var(--mint); background: color-mix(in srgb, var(--mint) 10%, var(--surface)); }
  .success-banner .sb-title { font-size: 32px !important; line-height: 1.2; }
  .success-banner .btn-row { max-width: 360px; margin-top: 18px !important; }
  .success-banner .btn-row .btn { padding: 15px 20px; font-size: 16px; }
  .success-banner .btn.grade .kbd-hint { top: 10px; right: 10px; transform: none; }
}

/* Example sentence: 🔊 / 💡 tools, Vietnamese line, tappable words, word popup and the grammar sheet (no blur: iOS flip3d) */
.ex-block { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.ex-line { display: flex; align-items: flex-start; gap: 8px; }
.ex-sentence { flex: 1; line-height: 1.55; }
.ex-tools { display: flex; gap: 8px; flex-shrink: 0; }
.ex-btn { width: 40px; height: 40px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--accent); font-size: 19px; box-shadow: var(--shadow-card); cursor: pointer; padding: 0; touch-action: manipulation; }
.ex-btn svg { width: 19px; height: 19px; }
@media (max-width: 640px) { .ex-btn { width: 44px; height: 44px; font-size: 21px; } .ex-btn svg { width: 21px; height: 21px; } }
.ex-btn:hover { border-color: var(--accent); }
.ex-btn:active { transform: scale(.92); }
.ex-vi { font-size: .93em; color: var(--text-dim); line-height: 1.5; }
.ex-w { cursor: pointer; border-bottom: 1px dotted color-mix(in srgb, var(--text-dim) 55%, transparent); }
.ex-w.hl { background: color-mix(in srgb, var(--accent) 16%, transparent); border-radius: 4px; padding: 0 2px; border-bottom-color: var(--accent); color: var(--text); font-weight: 600; }
.ex-w.on { background: color-mix(in srgb, var(--accent) 30%, transparent); border-radius: 4px; }

.ex-pop { position: fixed; z-index: 1001; width: min(280px, calc(100vw - 24px)); padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 10px 28px rgba(0,0,0,.18); text-align: left; font-size: 14px; color: var(--text); }
.ep-head { display: flex; align-items: center; gap: 8px; }
.ep-word { font-size: 18px; flex: 1; }
.ep-cefr { padding: 2px 8px; border-radius: 8px; font-size: 12px; font-weight: 700; color: var(--accent); background: color-mix(in srgb, var(--accent) 13%, var(--surface)); }
.ep-meta { margin-top: 2px; color: var(--text-dim); font-family: var(--font-ipa); font-size: 13px; }
.ep-vi { margin-top: 6px; font-weight: 600; }
.ep-form { margin-top: 4px; font-size: 12.5px; color: var(--text-dim); }
.ep-state { margin-top: 8px; font-size: 12px; font-weight: 700; color: var(--text-dim); }
.ep-state.ok { color: var(--mint); }

.ex-sheet-wrap { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.35); display: flex; align-items: flex-end; justify-content: center; }
.ex-sheet { position: relative; width: 100%; max-width: 640px; max-height: 86vh; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 18px calc(18px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; background: var(--surface); color: var(--text); font-size: 14.5px; gap: 10px; animation: exUp .22s ease-out; }
@keyframes exUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.es-head { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 6px 0; background: var(--surface); }
.es-grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto; }
.es-actions { position: absolute; right: 0; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 8px; }
.es-actions .ex-btn, .es-actions .es-x { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--surface-2); color: var(--text-dim); box-shadow: var(--shadow-card); cursor: pointer; transition: transform .1s, background .15s, color .15s, border-color .15s; }
.es-actions .ex-btn { color: var(--accent); }
.ex-sheet .es-actions .ex-btn { flex: none; width: 32px; height: 32px; padding: 0; gap: 0; }
.ex-sheet .es-actions .ex-btn svg { width: 16px; height: 16px; }
.es-actions .ex-btn:hover { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border-color: var(--accent); }
.es-actions .es-x:hover { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent); border-color: var(--accent); }
.es-actions .ex-btn:active, .es-actions .es-x:active { transform: scale(.92); }
.es-top { display: block; margin-top: 6px; }
.es-sentence { font-size: 17px; font-weight: 600; line-height: 1.5; }
.es-hint { font-size: 12px; color: var(--text-dim); }
.es-sec { padding-top: 12px; border-top: 1px solid var(--line); }
.es-h { font-weight: 800; margin-bottom: 8px; }
.es-parts { display: flex; flex-wrap: wrap; gap: 6px; }
.es-part { padding: 6px 10px; border: 1.5px solid transparent; border-radius: 10px; background: var(--surface-2); color: var(--text); font: inherit; text-align: center; cursor: pointer; transition: border-color .15s, background .15s, transform .1s; }
.es-part:hover { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.es-part:active { transform: scale(.96); }
.es-part.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.es-pnote { margin-top: 10px; padding: 10px 12px; border-radius: 12px; font-size: 13px; color: var(--text-dim); background: var(--surface-2); line-height: 1.55; }
.es-pnote.on { font-size: 14.5px; color: var(--text); }
.es-pnote-head { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; cursor: pointer; transition: opacity .15s; }
.es-pnote-head:active { opacity: .7; }
.es-pnote-spk { display: inline-flex; align-items: center; color: var(--accent); }
.es-pnote-spk svg { width: 13px; height: 13px; color: var(--accent); flex-shrink: 0; }
.es-pnote-role { color: var(--accent); font-weight: 700; }
.es-pnote div { margin-top: 2px; }
.es-pt { font-weight: 700; }
.es-role { font-size: 11.5px; color: var(--accent); font-weight: 700; margin-top: 2px; }
.es-notes { margin: 10px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; line-height: 1.5; }
.es-explain { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 7%, var(--surface)); line-height: 1.6; }
.es-pattern { display: inline-block; padding: 6px 12px; border-radius: 10px; font-weight: 800; font-family: var(--font-ipa); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent); }
.es-use { margin-top: 6px; color: var(--text-dim); line-height: 1.5; }
.es-colls { display: flex; flex-wrap: wrap; gap: 8px; }
.es-coll { display: inline-flex; flex-direction: column; align-items: center; text-align: center; padding: 7px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: inherit; cursor: pointer; transition: border-color .15s, background .15s, transform .1s; }
.es-coll-t { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 700; font-size: 13.5px; color: var(--text); }
.es-coll-t svg { width: 13px; height: 13px; color: var(--accent); flex-shrink: 0; }
.es-coll-vi { font-size: 12px; color: var(--text-dim); font-weight: 500; line-height: 1.35; margin-top: 2px; text-align: center; }
.es-coll:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.es-coll:active { transform: scale(.96); }
.es-bottom { display: flex; justify-content: center; margin-top: 14px; padding-top: 4px; }
.es-close { width: auto; min-width: 110px; padding: 8px 22px; border-radius: 999px; font-size: 13.5px; font-weight: 700; margin: 0; }
@media (min-width: 1040px) { .ex-sheet-wrap { align-items: center; } .ex-sheet { border-radius: 22px; } }

/* Settings: US / UK / both accent picker */
.accent-seg { display: inline-flex; flex-shrink: 0; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); }
.accent-seg button { min-width: 44px; height: 34px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: var(--text-dim); font-family: var(--font-ui); font-size: 13px; font-weight: 800; cursor: pointer; }
.accent-seg button.on { background: var(--btn-bg, var(--accent)); color: var(--accent-ink); }

/* End-of-part review: match / quiz / chips */
/* ---------- Part review screens (review-modes.js): Nối từ, Trắc nghiệm, Bảng thẻ từ ---------- */
.rvx { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.rvx-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-card); }
.rvx-ico { width: 44px; height: 44px; flex-shrink: 0; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--accent); }
.rvx-title { flex: 1; min-width: 0; }
.rvx-title h2 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.rvx-title p { margin: 2px 0 0; font-size: 13px; color: var(--text-dim); }
.rvx-chip { flex-shrink: 0; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); font-size: 13px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
@keyframes rvShake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@keyframes rvPop { 0% { transform: scale(.96); } 60% { transform: scale(1.03); } 100% { transform: scale(1); } }

/* Nối từ */
.rvx-match { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rvx-lines { display: none; }
@media (min-width: 1040px) {
  .rvx:has(.rvx-match) { max-width: 980px; }
  .rvx-match { column-gap: 150px; row-gap: 12px; }
  .rvx-lines { display: block; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 2; }
  .rvx-lines path { fill: none; stroke-width: 3; stroke-linecap: round; }
  .rvx-lines path.new { stroke-dasharray: 600; stroke-dashoffset: 600; animation: rvDraw .45s ease-out forwards; }
  .rvx-lines .pick { stroke: var(--accent); stroke-dasharray: 6 7; }
  .rvx-lines circle.pick { fill: var(--accent); stroke: none; }
  .rvx-lines .p0 { stroke: #3E9B6B; fill: #3E9B6B; } .rvx-lines .p1 { stroke: #2F7FC1; fill: #2F7FC1; } .rvx-lines .p2 { stroke: #C0752A; fill: #C0752A; }
  .rvx-lines .p3 { stroke: #8A5CC7; fill: #8A5CC7; } .rvx-lines .p4 { stroke: #C24A6E; fill: #C24A6E; } .rvx-lines .p5 { stroke: #2A9A9A; fill: #2A9A9A; }
  .rvx-lines path[class^="p"] { fill: none; }
  .rvx-tile.en .t-ico { order: -1; }
  .rvx-tile.en { justify-content: flex-start; }
}
@keyframes rvDraw { to { stroke-dashoffset: 0; } }
.rvx-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rvx-colhead { padding: 0 4px 2px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); }
.rvx-tile { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 58px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); font-family: var(--font-ui); text-align: left; cursor: pointer; box-shadow: var(--shadow-card); transition: border-color .15s, background .15s, transform .1s; }
.rvx-tile:active:not(:disabled) { transform: scale(.97); }
.rvx-tile .t-word { font-family: var(--font-word); font-size: 17px; font-weight: 800; overflow-wrap: anywhere; }
.rvx-tile .t-vi { font-size: 14.5px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.rvx-tile .t-ico { flex-shrink: 0; display: flex; color: var(--text-dim); }
.rvx-tile.sel { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); transform: translateY(-2px); box-shadow: 0 10px 22px -12px color-mix(in srgb, var(--accent) 70%, transparent); }
.rvx-tile.sel .t-ico { color: var(--accent); }
.rvx-tile.bad { border-color: #E5484D; background: color-mix(in srgb, #E5484D 12%, var(--surface)); animation: rvShake .3s; }
.rvx-tile.ok { cursor: default; animation: rvPop .3s; border-color: var(--pc); background: color-mix(in srgb, var(--pc) 16%, var(--surface)); box-shadow: none; }
.rvx-tile.ok .t-ico { color: var(--pc); }
.rvx-tile.p0 { --pc: #3E9B6B; } .rvx-tile.p1 { --pc: #2F7FC1; } .rvx-tile.p2 { --pc: #C0752A; }
.rvx-tile.p3 { --pc: #8A5CC7; } .rvx-tile.p4 { --pc: #C24A6E; } .rvx-tile.p5 { --pc: #2A9A9A; }

/* Trắc nghiệm */
.rvx-dots { display: flex; gap: 5px; }
.rvx-dots i { flex: 1; height: 6px; border-radius: 99px; background: var(--surface-2); }
.rvx-dots i.cur { background: color-mix(in srgb, var(--accent) 45%, var(--surface-2)); }
.rvx-dots i.ok { background: #3E9B6B; }
.rvx-dots i.bad { background: #E5484D; }
.rvx-qcard { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 20px 24px; border-radius: 24px; text-align: center;
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 16%, var(--surface)), var(--surface) 70%); border: 1px solid var(--line); box-shadow: var(--shadow-card); }
.q-label { font-size: 12.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
.q-word { font-family: var(--font-word); font-size: 40px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; overflow-wrap: anywhere; }
.q-meta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; }
.q-meta .ipa-text { margin: 0; }
.rvx-speak { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--accent); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-card); }
.rvx-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rvx-opt { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--text); font-family: var(--font-ui); text-align: left; cursor: pointer; box-shadow: var(--shadow-card); transition: border-color .15s, background .15s, opacity .2s, transform .1s; }
.rvx-opt:active:not(:disabled) { transform: scale(.98); }
.o-key { width: 32px; height: 32px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); font-weight: 800; font-size: 14px; color: var(--text-dim); }
.o-text { flex: 1; min-width: 0; font-size: 15.5px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.o-mark { flex-shrink: 0; display: flex; }
.rvx-opt.ok { border-color: #3E9B6B; background: color-mix(in srgb, #3E9B6B 14%, var(--surface)); animation: rvPop .3s; }
.rvx-opt.ok .o-key { background: #3E9B6B; color: #fff; }
.rvx-opt.ok .o-mark { color: #3E9B6B; }
.rvx-opt.bad { border-color: #E5484D; background: color-mix(in srgb, #E5484D 12%, var(--surface)); animation: rvShake .3s; }
.rvx-opt.bad .o-key { background: #E5484D; color: #fff; }
.rvx-opt.bad .o-mark { color: #E5484D; }
.rvx-opt.dim { opacity: .45; }
@media (hover: hover) and (pointer: fine) { .rvx-opt:hover:not(:disabled), .rvx-tile:hover:not(:disabled), .rvx-card:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); } }
.rvx-feedback { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; background: color-mix(in srgb, #E5484D 10%, var(--surface)); border: 1px solid color-mix(in srgb, #E5484D 35%, var(--line)); }
.rvx-feedback > div { flex: 1 1 220px; display: flex; flex-direction: column; gap: 2px; font-size: 14.5px; }
.rvx-feedback > div > b { color: #C93A3F; }
.rvx-feedback .btn { width: auto; }

/* Bảng thẻ từ */
.rvx-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 13px; color: var(--text-dim); }
.rvx-tools .pill { display: inline-flex; align-items: center; gap: 6px; }
.rvx-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.rvx-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px; border: 2px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--text); font-family: var(--font-ui); text-align: left; cursor: pointer; box-shadow: var(--shadow-card); transition: border-color .15s, background .2s, transform .1s; min-width: 0; }
.rvx-card:active { transform: scale(.98); }
.c-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%; }
.c-top b { font-family: var(--font-word); font-size: 18px; font-weight: 800; overflow-wrap: anywhere; }
.c-ico { flex-shrink: 0; display: flex; color: var(--accent); }
.c-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-dim); }
.c-vi { width: 100%; margin-top: 4px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 14.5px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.rvx-card.covered { background: var(--surface-2); }
.rvx-card.covered .c-vi { color: var(--text-dim); font-weight: 500; font-style: italic; }
.rvx-actions { display: flex; }
.rvx-actions .btn { flex: 1; }

/* Done bar (Nối từ) */
.rvx-done { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 20px; background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 18%, var(--surface)), var(--surface)); border: 1px solid var(--line); animation: rvPop .35s; }
.rvx-done img { width: 60px; height: 62px; object-fit: contain; }
.rvx-done > div { flex: 1 1 200px; display: flex; flex-direction: column; gap: 2px; }
.rvx-done span { font-size: 13.5px; color: var(--text-dim); }
.rvx-done .btn { width: auto; }

@media (max-width: 520px) {
  .rvx-match { gap: 8px; }
  .rvx-tile { min-height: 54px; padding: 8px 10px; }
  .rvx-tile .t-word { font-size: 15.5px; }
  .rvx-tile .t-vi { font-size: 13.5px; }
  .rvx-opts { grid-template-columns: 1fr; }
  .q-word { font-size: 32px; }
  .rvx-cards { grid-template-columns: 1fr 1fr; }
  .rvx-head { padding: 12px; }
  .rvx-title p { display: none; }
}

/* Example block (flashcard, learned screen, previews): a clear card — label, big sentence with the studied word
   marked, translation, then two labelled buttons. */
.ex-block.example-text { width: 100%; max-width: 480px; gap: 10px; padding: 14px 16px 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-2); font-style: normal; }
.ex-block .ex-label { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.ex-block .ex-sentence { flex: none; font-size: 19px; font-weight: 600; line-height: 1.5; letter-spacing: -.005em; color: var(--text); }
.ex-block .ex-label { justify-content: center; }
.ex-block .ex-sentence, .ex-block .ex-vi { text-align: center; text-wrap: balance; }
.ex-block .ex-target { background: none; color: var(--accent); font-weight: 800; }
.ex-block .ex-vi { margin-top: -4px; font-size: 16.5px; line-height: 1.5; color: color-mix(in srgb, var(--text) 72%, var(--text-dim)); }
.ex-block .ex-tools { gap: 8px; margin-top: 4px; }
.ex-block .ex-btn { width: auto; height: 44px; flex: 1; gap: 8px; padding: 0 16px; border-radius: 999px; font-family: var(--font-ui); font-size: 14px; font-weight: 800; color: var(--text); background: var(--surface); }
.ex-block .ex-btn svg { width: 18px; height: 18px; color: var(--accent); }
.ex-block .ex-btn b { font-size: 17px; line-height: 1; }
.ex-block .ex-w { border-bottom-width: 1.5px; }
@media (min-width: 720px) { .ex-block .ex-sentence { font-size: 21px; } .ex-block .ex-vi { font-size: 18px; } .ex-block .ex-btn { height: 48px; font-size: 15px; } }
/* The flashcard back has a fixed height and hidden overflow: let it scroll rather than clip the example/buttons, and
   compact the example block on small phones so it normally fits without scrolling. */
.flip-face.back.card { overflow-y: auto; -webkit-overflow-scrolling: touch; justify-content: safe center; }
@media (max-width: 480px) {
  .ex-block.example-text { gap: 8px; padding: 12px 14px 10px; }
  .ex-block .ex-sentence { font-size: 17px; }
  .ex-block .ex-vi { font-size: 15.5px; }
  .ex-block .ex-btn { height: 42px; padding: 0 12px; font-size: 13.5px; }
}
@media (max-height: 700px) { .ex-block .ex-label { display: none; } }

/* same-word merge: several senses on one card */
.sense-list { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.sense-row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; }
.sense-row .sense-vi { font-size: 22px; font-weight: 700; line-height: 1.3; color: var(--text); text-align: center; }
@media (max-width: 380px) { .sense-row .sense-vi { font-size: 18px; } }
.sense-ex { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; max-width: 480px; }
.sense-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-2); }
.sense-tabs button { padding: 6px 14px; border: 0; border-radius: 999px; background: none; color: var(--text-dim); font-family: var(--font-ui); font-size: 13px; font-weight: 800; cursor: pointer; }
.sense-tabs button.on { background: var(--btn-bg, var(--accent)); color: var(--accent-ink); }
.sense-pane { width: 100%; display: flex; justify-content: center; }
.sense-pane[hidden] { display: none; }
.fc .word-text.sm { font-size: 22px; opacity: .8; }
#setMusicSection { scroll-margin-top: 24px; }
/* Stack nút nổi ở góc màn hình: Đĩa nhạc + AI (căn giữa dọc với nhau) */
.fab-stack { position: fixed; right: 16px; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); z-index: 35; display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; }
@media (min-width: 1040px) { .fab-stack { bottom: 28px; right: 28px; gap: 10px; } }
.fab-stack > button { pointer-events: auto; position: static; }

/* Nút nhạc nền nổi (Vinyl Disc Floating Action Button) */
.music-fab { position: fixed; right: 16px; bottom: calc(150px + env(safe-area-inset-bottom, 0px)); z-index: 35; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; transition: transform .15s ease, filter .15s ease; user-select: none; -webkit-user-select: none; display: flex; align-items: center; justify-content: center; }
.fab-stack .music-fab { position: static; }
.music-fab:active { transform: scale(.92); }
@media (hover: hover) { .music-fab:hover { transform: translateY(-2px) scale(1.05); } }
.music-disc-img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 50%; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .3)); pointer-events: none; transform-origin: center center; }
.music-fab.playing .music-disc-img, .mp-badge.playing .music-disc-img { animation: vinylSpin 3.2s linear infinite; filter: drop-shadow(0 4px 12px rgba(124, 58, 237, .45)) drop-shadow(0 0 4px var(--accent)); }
.music-fab:not(.playing) .music-disc-img { opacity: 0.9; }
@keyframes vinylSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Mini Player Popup (Gọn gàng, cuộn ngang tên bài, không tràn thanh âm lượng) */
.music-pop { position: fixed; right: 16px; bottom: calc(204px + env(safe-area-inset-bottom, 0px)); z-index: 100; width: calc(100vw - 32px); max-width: 240px; box-sizing: border-box; display: flex; flex-direction: column; gap: 9px; padding: 11px 13px; background: var(--surface); border: 1px solid var(--soft-line); border-radius: 18px; box-shadow: 0 18px 45px -12px rgba(0, 0, 0, .45); animation: aiPop .18s ease-out; overflow: hidden; user-select: none; -webkit-user-select: none; }
@media (min-width: 768px) { .music-pop { max-width: 280px; padding: 12px 14px; } }
@media (min-width: 1040px) { .music-pop { right: 28px; bottom: 136px; } }
.mp-row-top { display: flex; align-items: center; gap: 9px; }
.mp-badge { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mp-meta { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; mask-image: linear-gradient(90deg, transparent 0, #000 6px, #000 calc(100% - 6px), transparent 100%); -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6px, #000 calc(100% - 6px), transparent 100%); }
.mp-marquee { display: inline-flex; white-space: nowrap; animation: mpMarquee 12s linear infinite; will-change: transform; }
.mp-marquee:hover { animation-play-state: paused; }
.mp-marquee-text { font-size: 13.5px; font-weight: 700; color: var(--text); padding-right: 14px; }
@keyframes mpMarquee { 0% { transform: translateX(0%); } 100% { transform: translateX(-50%); } }
.mp-top-actions { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.mp-icon-btn { width: 24px; height: 24px; border: 0; border-radius: 50%; background: transparent; color: var(--text-dim); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; transition: background .12s, color .12s; }
.mp-icon-btn:hover { background: var(--surface-2); color: var(--text); }
.mp-row-bottom { display: flex; align-items: center; justify-content: center; gap: 12px; padding-top: 5px; border-top: 1px solid var(--soft-line); }
@media (min-width: 768px) { .mp-row-bottom { justify-content: space-between; gap: 8px; } }
.mp-ctrls { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.mp-btn { width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--text); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; transition: transform .1s, background .15s, color .15s; }
.mp-btn:active { transform: scale(.9); }
.mp-btn:hover { color: var(--accent); }
.mp-btn.play { width: 32px; height: 32px; background: var(--accent); color: #fff; box-shadow: 0 2px 8px -2px var(--accent); }
.mp-btn.play:hover { filter: brightness(1.1); color: #fff; }
.mp-vol-wrap { display: none; align-items: center; gap: 6px; width: 86px; max-width: 86px; min-width: 0; box-sizing: border-box; flex-shrink: 0; color: var(--text-dim); }
@media (min-width: 768px) { .mp-vol-wrap { display: flex; } }
.mp-vol-wrap svg { flex-shrink: 0; }
.mp-vol-wrap input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; min-width: 0; height: 4px; border-radius: 99px; background: var(--surface-2, rgba(120, 120, 140, .25)); outline: none; margin: 0; padding: 0; cursor: pointer; box-sizing: border-box; }
.mp-vol-wrap input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); cursor: pointer; border: 2px solid var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,0.25); }
.mp-vol-wrap input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); cursor: pointer; border: 2px solid var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,0.25); }

/* Nút AI nổi (AI Floating Action Button) */
.ai-fab { position: fixed; right: 16px; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); z-index: 35; display: flex; align-items: center; justify-content: center; gap: 6px; height: 44px; padding: 0 14px 0 10px; border: 1px solid var(--soft-line); border-radius: 99px; background: var(--surface); color: var(--accent); font: 800 13.5px var(--font-ui); box-shadow: var(--shadow-card, 0 8px 24px -10px rgba(0, 0, 0, .3)); cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; user-select: none; -webkit-user-select: none; }
.fab-stack .ai-fab { position: static; }
.ai-fab:active { transform: scale(.95); }
@media (hover: hover) { .ai-fab:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -8px rgba(0, 0, 0, .35); } }
@media (min-width: 1040px) { .ai-fab { bottom: 28px; right: 28px; } }
.ai-fab-img { width: 26px; height: 26px; object-fit: contain; display: block; border-radius: 50%; pointer-events: none; flex-shrink: 0; }
.ai-overlay { position: fixed; inset: 0; z-index: 220; display: flex; align-items: flex-end; justify-content: center; background: rgba(20, 15, 10, 0.45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: aiFadeIn .2s ease-out; }
@keyframes aiFadeIn { from { opacity: 0; } to { opacity: 1; } }
.ai-sheet { position: relative; display: flex; flex-direction: column; width: 100%; max-width: 580px; height: min(84vh, 660px); padding: 8px 16px calc(14px + env(safe-area-inset-bottom, 0px)); box-sizing: border-box; background: var(--surface); border: 1px solid var(--soft-line); border-bottom: none; border-radius: 28px 28px 0 0; box-shadow: 0 -16px 48px -12px rgba(40, 25, 15, 0.35); animation: aiSlideUp .22s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes aiSlideUp { from { transform: translateY(24px); opacity: 0.9; } to { transform: translateY(0); opacity: 1; } }
.ai-sheet-handle { width: 36px; height: 4px; border-radius: 99px; background: color-mix(in srgb, var(--text) 18%, transparent); margin: 4px auto 8px; flex-shrink: 0; }
.ai-shead { display: flex; align-items: center; justify-content: space-between; padding: 4px 0 12px; border-bottom: 1px solid var(--soft-line); margin-bottom: 4px; }
.ai-shead-left { display: flex; align-items: center; gap: 11px; min-width: 0; }
.ai-shead-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.ai-avatar-wrap { width: 38px; height: 38px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border: 1.5px solid color-mix(in srgb, var(--accent) 25%, transparent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; box-shadow: 0 2px 6px -2px rgba(0,0,0,0.1); }
.ai-avatar-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ai-shead-info { display: flex; flex-direction: column; min-width: 0; }
.ai-shead-info b { font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.ai-shead-info small { font-size: 12px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.ai-head-btn, .ai-close-btn { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--soft-line); background: color-mix(in srgb, var(--text) 4%, var(--surface)); color: var(--text-dim); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all .15s ease; flex-shrink: 0; padding: 0; }
.ai-head-btn:hover, .ai-close-btn:hover { background: color-mix(in srgb, var(--text) 10%, var(--surface)); color: var(--text); transform: scale(1.05); }
.ai-head-btn.active { background: color-mix(in srgb, var(--accent) 15%, var(--surface)); color: var(--accent); border-color: var(--accent); }
.ai-chat-body { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.ai-hist-body { display: flex; flex-direction: column; flex: 1; min-height: 0; padding: 6px 0; }
.ai-history-note { display: flex; align-items: flex-start; gap: 9px; padding: 11px 13px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 8%, var(--surface-2)); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); margin-bottom: 12px; }
.ai-hn-icon { color: var(--accent); flex-shrink: 0; margin-top: 1px; }
.ai-hn-text { font-size: 12.5px; line-height: 1.48; color: var(--text); font-family: var(--font-ui); }
.ai-hist-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px 8px; border-bottom: 1px solid var(--soft-line); font-size: 12.5px; font-weight: 700; color: var(--text-dim); }
.ai-hist-clear { background: none; border: none; color: var(--text-dim); font-size: 12px; cursor: pointer; padding: 2px 6px; border-radius: 6px; transition: color .15s; font-family: var(--font-ui); }
.ai-hist-clear:hover { color: #dc2626; }
.ai-hist-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 10px 2px; }
.ai-hist-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--soft-line); background: var(--surface-2); cursor: pointer; transition: all .15s ease; gap: 8px; }
.ai-hist-item:hover { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); border-color: var(--accent); transform: translateX(2px); }
.ai-hist-item.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.ai-hi-content { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ai-hi-title { font-size: 13.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-hi-meta { font-size: 11.5px; color: var(--text-dim); margin-top: 2px; display: flex; gap: 8px; }
.ai-hi-del { width: 28px; height: 28px; border-radius: 50%; border: none; background: transparent; color: var(--text-dim); display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0.6; transition: all .15s ease; flex-shrink: 0; }
.ai-hi-del:hover { opacity: 1; color: #dc2626; background: rgba(220, 38, 38, 0.1); }
.ai-hist-empty { text-align: center; padding: 36px 16px; color: var(--text-dim); font-size: 13.5px; }
.ai-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 10px 2px 14px; scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--text) 15%, transparent) transparent; }
.ai-welcome { margin: auto; text-align: center; max-width: 320px; padding: 20px 10px; display: flex; flex-direction: column; align-items: center; }
.ai-welcome-ico { width: 56px; height: 56px; border-radius: 20px; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); border: 2px solid var(--surface); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--accent) 40%, transparent); }
.ai-welcome-ico img { width: 42px; height: 42px; border-radius: 14px; object-fit: cover; }
.ai-empty-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--soft-line); font-size: 13px; color: var(--text); margin-bottom: 8px; }
.ai-empty-badge b { font-weight: 700; color: var(--accent); }
.ai-empty-badge span { font-size: 12px; color: var(--text-dim); }
.ai-welcome h3 { margin: 4px 0 6px; font-size: 17px; font-weight: 800; color: var(--text); letter-spacing: -0.01em; }
.ai-welcome p { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--text-dim); }
.ai-msg { max-width: 86%; padding: 11px 15px; border-radius: 18px; font-size: 14px; line-height: 1.9; overflow-wrap: anywhere; box-sizing: border-box; }
.ai-msg.user { align-self: flex-end; background: var(--btn-bg, var(--accent)); color: var(--accent-ink, #ffffff); border-bottom-right-radius: 4px; box-shadow: 0 2px 8px -2px rgba(0,0,0,0.12); font-weight: 500; }
.ai-msg.assistant { align-self: flex-start; background: var(--surface-2); color: var(--text); border: 1px solid var(--soft-line); border-bottom-left-radius: 4px; box-shadow: 0 2px 8px -4px rgba(40, 20, 10, 0.05); }
.ai-msg.err { background: #FDF2F2; color: #9B1C1C; border: 1px solid #F8B4B4; }
.ai-cursor { display: inline-block; width: 6px; height: 14px; margin-left: 3px; vertical-align: -2px; background: var(--accent); border-radius: 2px; animation: aiBlink .75s infinite; }
@keyframes aiBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.ai-msg.assistant b { font-weight: 700; color: var(--text); }
.ai-en { display: inline-flex; align-items: center; vertical-align: middle; margin: 3px 2px; color: var(--text); font-weight: 600; cursor: pointer; padding: 2px 7px; border-radius: 8px; background: color-mix(in srgb, var(--accent) 11%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); border-bottom: 2px solid var(--accent); transition: all .15s ease; user-select: none; line-height: 1.35; }
.ai-en:hover, .ai-en:active { background: color-mix(in srgb, var(--accent) 20%, var(--surface)); border-color: var(--accent); transform: translateY(-1px); }
.ai-en.speaking { background: color-mix(in srgb, var(--accent) 26%, var(--surface)) !important; border-color: var(--accent) !important; box-shadow: 0 0 0 2.5px color-mix(in srgb, var(--accent) 28%, transparent); }
.ai-en-ico { display: inline-flex; align-items: center; margin-left: 4px; color: var(--accent); opacity: 0.85; }
.ai-en:hover .ai-en-ico { opacity: 1; }
.ai-msg-actions { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding-top: 6px; border-top: 1px solid color-mix(in srgb, var(--text) 8%, transparent); }
.ai-spk-btn { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--text-dim); background: var(--surface); border: 1px solid var(--soft-line); border-radius: 99px; padding: 3px 10px; cursor: pointer; transition: all .15s ease; font-family: var(--font-ui); }
.ai-spk-btn:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.ai-spk-btn.playing { color: var(--accent) !important; border-color: var(--accent) !important; background: color-mix(in srgb, var(--accent) 12%, var(--surface)) !important; animation: aiPulse 1.4s infinite ease-in-out; }
@keyframes aiPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.88; transform: scale(0.98); } }
.ai-bottom-bar { position: relative; display: flex; flex-direction: column; }
.ai-prompt-menu { position: absolute; bottom: calc(100% + 8px); left: 0; right: 0; max-width: 360px; background: var(--surface); border: 1px solid var(--soft-line); border-radius: 18px; box-shadow: 0 16px 36px -10px rgba(30, 20, 10, 0.25), 0 0 0 1px var(--soft-line); padding: 8px; z-index: 30; display: flex; flex-direction: column; gap: 4px; transform-origin: bottom left; animation: aiMenuPop .16s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes aiMenuPop { from { opacity: 0; transform: translateY(8px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
.ai-pm-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 6px; border-bottom: 1px solid var(--soft-line); font-size: 11.5px; font-weight: 700; color: var(--text-dim); }
.ai-pm-close { background: none; border: none; color: var(--text-dim); font-size: 16px; cursor: pointer; padding: 0 4px; line-height: 1; }
.ai-pm-close:hover { color: var(--text); }
.ai-pm-list { display: flex; flex-direction: column; gap: 2px; max-height: 280px; overflow-y: auto; padding: 4px 2px; }
.ai-pm-item { display: flex; flex-direction: column; text-align: left; padding: 8px 12px; border-radius: 12px; border: none; background: transparent; color: var(--text); font-family: var(--font-ui); cursor: pointer; transition: all .12s ease; width: 100%; box-sizing: border-box; }
.ai-pm-item:hover, .ai-pm-item:active { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); color: var(--accent); padding-left: 15px; }
.ai-pm-title { font-size: 13px; font-weight: 600; color: inherit; line-height: 1.4; }
.ai-pm-desc { font-size: 11.5px; color: var(--text-dim); line-height: 1.35; margin-top: 2px; }
.ai-pm-item:hover .ai-pm-desc { color: color-mix(in srgb, var(--accent) 80%, var(--text)); }
.ai-prompt-btn { display: inline-flex; align-items: center; gap: 4px; background: color-mix(in srgb, var(--text) 5%, var(--surface)); border: 1px solid var(--soft-line); border-radius: 14px; padding: 5px 9px; color: var(--text-dim); font: 600 12px var(--font-ui); cursor: pointer; transition: all .15s ease; flex-shrink: 0; }
.ai-prompt-btn:hover, .ai-prompt-btn.active { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border-color: var(--accent); color: var(--accent); }
.ai-prompt-btn svg { color: inherit; }
.ai-welcome-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 14px; }
.ai-welcome-chips button { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--soft-line); background: var(--surface-2); color: var(--text); font: 600 12px var(--font-ui); cursor: pointer; transition: all .15s ease; }
.ai-welcome-chips button:hover { background: var(--surface); border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.ai-input { display: flex; align-items: center; gap: 6px; background: var(--surface-2); border: 1.5px solid var(--soft-line); border-radius: 20px; padding: 4px 4px 4px 14px; transition: all .2s ease; }
.ai-input:focus-within { background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
.ai-input input { flex: 1; min-width: 0; border: none; background: transparent; color: var(--text); font: 500 14.5px var(--font-ui); outline: none; padding: 6px 0; }
.ai-input input::placeholder { color: var(--text-dim); opacity: 0.75; }
.ai-send-btn { width: 36px; height: 36px; border-radius: 50%; border: none; background: var(--btn-bg, var(--accent)); color: var(--accent-ink, #ffffff); display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: all .15s ease; }
.ai-send-btn:hover { transform: scale(1.06); filter: brightness(1.08); }
.ai-send-btn:active { transform: scale(0.96); }
.ai-setup { text-align: center; padding: 14px 10px; background: var(--surface-2); border-radius: 18px; border: 1px solid var(--soft-line); }
.ai-setup p { color: var(--text-dim); font-size: 13.5px; margin: 0 0 10px; }
@media (min-width: 720px) {
  .ai-overlay { align-items: flex-end; justify-content: flex-end; padding: 0 28px 96px; background: transparent; pointer-events: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .ai-sheet { pointer-events: auto; width: 420px; max-width: calc(100vw - 56px); height: min(620px, calc(100vh - 130px)); border-radius: 24px; border: 1px solid var(--soft-line); box-shadow: 0 24px 60px -18px rgba(30, 20, 10, 0.4), 0 0 0 1px var(--soft-line); animation: aiPop .2s cubic-bezier(0.16, 1, 0.3, 1); transform-origin: bottom right; padding: 14px 16px 14px; }
  .ai-sheet-handle { display: none; }
}
@keyframes aiPop { from { opacity: 0; transform: translateY(12px) scale(0.96); } to { opacity: 1; transform: none; } }
/* Example explanation sheet: 30% wider than before (640 -> 832 px) */
.ex-sheet { max-width: 832px; }
