.vocabulary-mode { position:relative; isolation:isolate; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); width:280px; max-width:100%; padding:4px; border:1px solid #ded5ff; border-radius:12px; background:#f7f5ff; }
.vocabulary-mode::before { content:""; position:absolute; z-index:-1; top:4px; bottom:4px; left:4px; width:calc(50% - 4px); background:#7047ff; border-radius:8px; transform:translateX(var(--vocabulary-position, 0%)); }
.vocabulary-mode[data-selected="choice"]::before { transform:translateX(var(--vocabulary-position, 100%)); }
.vocabulary-mode button { padding:9px 12px; min-height:44px; border:0; border-radius:8px; color:#59438c; background:transparent; font:inherit; font-weight:650; cursor:pointer; }
.vocabulary-mode button[aria-pressed="true"] { background:transparent; color:white; }
@media(prefers-reduced-motion:reduce) { .vocabulary-mode::before { transition:none; } }
.vocabulary-mode button:focus-visible, .vocabulary-choice-options button:focus-visible { outline:3px solid #7047ff; outline-offset:3px; }
[data-vocabulary-overview-mode] { margin-top:12px; display:flex; justify-content:flex-start; }
.writing-session-active > [data-vocabulary-overview-mode] { display:none; }
[data-vocabulary-complete] { margin:0; color:#155d3d; font-weight:650; }
.writing-hero .vocabulary-resume { display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:6px; align-self:center; text-align:left; max-width:340px; padding:14px 18px; }
.writing-hero .vocabulary-resume[hidden] { display:none; }
.vocabulary-resume small { font-size:12px; font-weight:400; line-height:1.4; }
.vocabulary-hero-actions { display:flex; flex-direction:column; gap:8px; max-width:340px; min-width:0; }
.vocabulary-hero-actions .vocabulary-resume { width:100%; align-self:stretch; }
.vocabulary-mixed { display:flex; flex-direction:column; align-items:flex-start; gap:5px; padding:12px 18px; text-align:left; }
.vocabulary-mixed[hidden] { display:none; }
.vocabulary-mixed small { font-size:12px; font-weight:400; }
@media(min-width:701px) { .writing-page:not(.writing-session-active) .writing-hero { display:flex; align-items:center; justify-content:space-between; } }
@media(max-width:700px) { .writing-hero .vocabulary-resume, .vocabulary-hero-actions { width:100%; max-width:none; } }
.handwriting-header-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:6px; }
.vocabulary-choice-card { min-height:0; overflow:auto; padding:clamp(16px,3vh,32px); border:1px solid #ded5ff; border-radius:20px; background:white; display:flex; flex-direction:column; justify-content:center; gap:16px; }
.vocabulary-choice-card h3 { text-align:center; font-size:clamp(30px,5vw,60px); margin:0; line-height:1.3; }
.vocabulary-choice-hint { text-align:center; color:#6c5c8c; }
.vocabulary-choice-hint summary { cursor:pointer; padding:8px; }
.vocabulary-choice-hint p { margin:4px; }
.vocabulary-choice-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.vocabulary-choice-options button { min-height:76px; padding:16px; border:2px solid #ddd6ee; border-radius:14px; background:#f7f5ff; color:#302638; font:inherit; font-size:clamp(16px,1.6vw,22px); cursor:pointer; overflow-wrap:anywhere; }
.vocabulary-choice-options button:hover:not(:disabled) { border-color:#7047ff; background:#f7f5ff; }
.vocabulary-choice-options button:disabled { opacity:1; cursor:default; }
.vocabulary-choice-options button.is-correct { background:#e7f7ee; border-color:#228858; color:#155d3d; }
.vocabulary-choice-options button.is-wrong { background:#fff0f0; border-color:#cb4545; color:#982b2b; }
@media(max-width:700px) { .vocabulary-choice-options { grid-template-columns:1fr; } .vocabulary-choice-card { overflow:visible; } }
