/* Theme colours come from the website, including every picker control. */
.vocabulary-setup { color:var(--ink); background:var(--bg-elevated); border:1px solid var(--line); border-radius:var(--radius-lg); padding:clamp(16px,3vw,28px); }
.vocabulary-setup, .vocabulary-setup * { box-sizing:border-box; }
.vocabulary-setup [hidden], [data-vocabulary-player][hidden] { display:none!important; }
.vocabulary-setup button { font:600 14px/1.4 var(--font-body,system-ui); min-height:44px; cursor:pointer; border:1px solid var(--line-strong); border-radius:10px; padding:9px 14px; background:var(--bg-elevated); color:var(--ink); }
.vocabulary-setup button:hover { background:var(--primary-soft); }
.vocabulary-setup button:disabled { cursor:default; }
.vocabulary-setup :is(button,input,a,select):focus-visible { outline:3px solid var(--focus-ring); outline-offset:3px; }
.vocabulary-guide { display:flex; align-items:center; gap:16px; margin-bottom:20px; }
.vocabulary-guide-portrait { width:85px; height:108px; flex:none; }
.vocabulary-guide-portrait img { width:100%; height:100%; object-fit:contain; }
.vocabulary-guide p { max-width:44ch; border-radius:18px 18px 18px 3px; background:var(--primary-soft); color:var(--ink); padding:14px 20px; margin:0; font:400 clamp(18px,2vw,23px)/1.4 var(--font-hand); }
.vocabulary-selection-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:24px 0 12px; }
.vocabulary-setup h2 { margin:0; font-size:19px; line-height:1.4; }
#vocabularyCount { display:inline-block; margin-left:8px; color:var(--ink-soft); font:500 12px/1.5 var(--font-body,system-ui); }
.vocabulary-setup #vocabularyClear { display:inline-flex; align-items:center; justify-content:center; flex:none; min-width:100px; min-height:44px; padding:9px 14px; border:2px solid var(--accent-pink); border-radius:10px; background:color-mix(in srgb,var(--accent-pink) 12%,var(--bg-elevated)); color:var(--ink); font-size:14px; font-weight:750; white-space:nowrap; }
.vocabulary-setup #vocabularyClear:hover:not(:disabled) { background:color-mix(in srgb,var(--accent-pink) 22%,var(--bg-elevated)); }
#vocabularyClear:disabled { opacity:.45; cursor:default; }
.vocabulary-cards { display:grid; grid-template-columns:repeat(auto-fill,minmax(175px,1fr)); gap:14px; }
.vocabulary-card { position:relative; min-width:0; background:var(--bg); padding:8px; border:1px solid var(--line); border-radius:14px; }
.vocabulary-card>img { width:100%; height:150px; display:block; object-fit:contain; border-radius:8px; background:var(--bg-sunken); margin-bottom:8px; }
.vocabulary-card label { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.vocabulary-card input { width:100%; min-width:0; border:1px solid var(--line-strong); border-radius:8px; padding:9px 10px; color:var(--ink); background:var(--bg-elevated); font:600 16px/1.4 var(--font-body,system-ui); }
.vocabulary-card-actions { display:flex; justify-content:center; margin-top:3px; }
.vocabulary-card-actions button { border:0; background:transparent; font-size:11px; padding:4px 6px; min-height:36px; color:var(--ink-soft); }
.vocabulary-card-actions .vocabulary-remove { position:absolute; top:4px; right:4px; width:32px; min-height:32px; padding:0; border-radius:50%; background:var(--bg-elevated); color:var(--ink); box-shadow:var(--shadow-xs); font:400 22px/1 system-ui; }
.vocabulary-card-actions .vocabulary-remove:hover { color:var(--accent-pink); }
.vocabulary-empty { margin:0; padding:18px; text-align:center; background:var(--bg); border:1px dashed var(--line-strong); border-radius:12px; color:var(--ink-faint); font-size:13px; }
.vocabulary-status { font-size:13px; color:var(--ink-soft); margin:10px 0; }
.vocabulary-status[data-error='true'] { color:var(--accent-pink); }
#vocabularyStatus:not([data-error='true']), .vocabulary-setup .vip-status:not([data-error='true']) { position:absolute; width:1px; height:1px; margin:0; overflow:hidden; clip-path:inset(50%); }
#vocabularyStatus[data-show='true']:not([data-error='true']) { position:static; width:auto; height:auto; margin:10px 0; overflow:visible; clip-path:none; }
.vocabulary-setup .vip-panel:has(.vip-input-wrap input:not(:placeholder-shown)) .vip-status:not([data-error='true']),
.vocabulary-setup .vip-panel.vip-category-mode .vip-status:not([data-error='true']),
.vocabulary-setup .vip-panel .vip-status[data-show='true']:not([data-error='true']) { position:static; width:auto; height:auto; margin:8px 0 0; overflow:visible; clip-path:none; }
[data-vocabulary-error]:empty { display:none; }
.vocabulary-primary-play { display:flex; gap:16px; justify-content:flex-end; align-items:center; margin:16px 0 24px; }
.vocabulary-primary-play>span { font-size:12px; color:var(--ink-faint); }
.vocabulary-setup .vocabulary-primary-play button { background:var(--primary); color:var(--primary-button-ink); border-color:var(--primary); font-size:15px; padding:11px 20px; }
.vocabulary-primary-play button:disabled { opacity:.55; }
.vocabulary-setup .vocabulary-games-heading { margin-bottom:12px; padding-top:20px; border-top:1px solid var(--line); }
.vocabulary-games { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.vocabulary-game { min-width:0; display:flex; flex-direction:column; }
.vocabulary-setup .vocabulary-game button { display:block; flex:1; padding:7px; text-align:left; width:100%; overflow:hidden; border:1px solid var(--line); border-radius:14px; background:var(--bg); color:var(--ink); transition:transform .2s ease,border-color .2s ease; }
.vocabulary-game button img { display:block; width:100%; aspect-ratio:16/10; height:auto; object-fit:cover; object-position:center top; border-radius:8px; background:var(--bg-sunken); }
.vocabulary-game button>span { display:block; padding:11px 5px 7px; font-size:15px; font-weight:650; }
.vocabulary-setup .vocabulary-game button:hover:not(:disabled) { transform:translateY(-3px); border-color:var(--primary); }
.vocabulary-game.is-selected button { border-color:var(--primary); }
.vocabulary-game button:disabled { opacity:.7; }
.vocabulary-game-hint { margin:6px 4px 0; color:var(--ink-soft); font-size:11px; }
.vocabulary-privacy { margin:20px 0 0; color:var(--ink-faint); text-align:center; font-size:11px; }
/* Keep these overrides scoped: other game editors retain their existing UI. */
.vocabulary-setup .vip-panel { padding:0; border:0; box-shadow:none; background:transparent; color:var(--ink); font-family:var(--font-body,system-ui); }
.vocabulary-setup .vip-panel :is(button,input,select) { border-color:var(--line-strong); background:var(--bg); color:var(--ink); }
.vocabulary-setup .vip-search-label { font-size:15px; }
.vocabulary-setup .vip-label-row select { background:var(--bg-elevated); color:var(--ink-soft); }
.vocabulary-setup .vip-input-wrap input { height:54px; border-color:var(--primary); background:var(--bg); color:var(--ink); font-size:18px; }
.vocabulary-setup .vip-search-icon { color:var(--primary); }
.vocabulary-setup .vip-input-help { display:none; }
.vocabulary-setup .vip-footer { margin-top:10px; border:0; padding:0; }
.vocabulary-setup .vip-footer>button { background:var(--bg-elevated); font-size:12px; }
.vocabulary-setup .vip-footer>a, .vocabulary-setup .vip-source, .vocabulary-setup .vip-more { color:var(--primary-strong); }
.vocabulary-setup .vip-gallery { min-height:0; margin-top:16px; padding:0; border:0; border-radius:0; background:transparent; }
.vocabulary-setup .vip-gallery:has(.vip-empty:not([hidden])) { display:none; }
.vocabulary-setup .vip-grid { grid-template-columns:repeat(auto-fill,minmax(140px,1fr)); }
.vocabulary-setup .vip-panel .vip-tile { height:150px; background:var(--bg); border-color:var(--line-strong); border-radius:12px; }
.vocabulary-setup .vip-panel .vip-tile:hover, .vocabulary-setup .vip-panel .vip-selected { border-color:var(--primary); box-shadow:0 0 0 1px var(--primary); }
.vocabulary-setup .vip-section h3, .vocabulary-setup .vip-panel .vip-heading h2 { color:var(--ink); }
.vocabulary-setup .vip-panel .vip-suggestion { background:var(--primary-soft); color:var(--primary-strong); border-color:var(--line-strong); }
.vocabulary-setup .vip-status { color:var(--ink-soft); }
.vocabulary-setup .vip-status[data-error='true'] { color:var(--accent-pink); }
.vocabulary-setup .vip-unavailable { color:var(--ink-soft); }
.vocabulary-setup .vip-categories { background:var(--bg-elevated); border-color:var(--line); }
.vocabulary-setup .vip-categories summary, .vocabulary-setup .vip-picture-word { color:var(--ink); }
.vocabulary-setup .vip-category-help { color:var(--ink-soft); }
.vocabulary-setup .vip-panel .vip-category[aria-pressed='true'] { background:var(--primary); color:var(--primary-button-ink); border-color:var(--primary); }
.vocabulary-setup .vip-category-tools { background:var(--bg); border-color:var(--line); }
.vocabulary-setup .vip-category-action { border-color:var(--line); }
.vocabulary-setup .vip-panel .vip-play-category { background:var(--primary); border-color:var(--primary); color:var(--primary-button-ink); }
.vocabulary-setup .vip-panel .vip-play-category:disabled { background:var(--bg-elevated); color:var(--ink-soft); border-color:var(--line); }
.vocabulary-setup .vip-panel .vip-category-plan { color:var(--ink); }
.vocabulary-setup .vip-panel .vip-category-play-help { color:var(--ink-soft); }
.vocabulary-setup .vip-panel .vip-tile.vip-added { border-color:var(--primary); }
.vocabulary-setup .vip-add-hint { background:var(--bg-elevated); color:var(--ink); }
.vocabulary-setup .vip-added .vip-add-hint { background:var(--primary); color:var(--primary-button-ink); }
.vocabulary-setup .vocabulary-primary-play button { min-height:52px; font-size:16px; padding:12px 24px; }
.vocabulary-setup .vip-levels-label, .vocabulary-setup .vip-selection-count { color:var(--ink-soft); }
.vocabulary-setup .vip-panel .vip-level[aria-pressed='true'],
.vocabulary-setup .vip-panel .vip-selection .vip-play-selected { background:var(--primary); border-color:var(--primary); color:var(--primary-button-ink); }
.vocabulary-setup .vip-panel .vip-selection .vip-play-selected:disabled { background:var(--bg-elevated); border-color:var(--line); color:var(--ink-soft); opacity:.7; }
.vocabulary-setup .vip-selection { border-color:var(--line); }
.vocabulary-setup .vip-panel .vip-tile.vip-picked { border-color:var(--primary); box-shadow:0 0 0 2px var(--primary); background:var(--primary-soft); }
.vocabulary-setup .vip-panel .vip-tile.vip-selectable::after { background:var(--primary); color:var(--primary-button-ink); }
.vocabulary-setup .vip-level-badge { background:var(--ink); color:var(--bg-elevated); }
.vocabulary-undo { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin:12px 0 4px; padding:10px 14px; border:1px solid var(--primary); border-radius:12px; background:var(--primary-soft); }
.vocabulary-undo span { color:var(--ink); font-size:13px; font-weight:600; }
.vocabulary-setup .vocabulary-undo button { min-height:38px; padding:6px 16px; border-color:var(--primary); background:var(--primary); color:var(--primary-button-ink); font-size:12px; font-weight:700; }
.vocabulary-batch-bar { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin:16px 0 4px; padding:12px 14px; border:1px solid var(--line-strong); border-radius:14px; background:var(--primary-soft); }
.vocabulary-batch-bar p { margin:0; color:var(--ink); font-size:13px; line-height:1.45; }
.vocabulary-batch-bar strong { color:var(--ink); }
.vocabulary-batch-actions { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.vocabulary-setup .vocabulary-batch-actions button { min-height:40px; padding:7px 11px; font-size:12px; background:var(--bg-elevated); }
.vocabulary-setup .vocabulary-batch-actions .vocabulary-batch-next { background:var(--primary); color:var(--primary-button-ink); border-color:var(--primary); font-weight:700; }
.vocabulary-setup .vocabulary-batch-actions .vocabulary-batch-next:disabled { background:var(--bg-elevated); color:var(--ink-soft); border-color:var(--line); opacity:.65; }
.vocabulary-setup .vocabulary-batch-actions button:disabled { opacity:.55; }
@media(max-width:600px) {
  .vocabulary-guide { gap:10px; }
  .vocabulary-guide-portrait { width:64px; height:90px; }
  .vocabulary-guide p { font-size:18px; padding:10px 12px; }
  .vocabulary-cards { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .vocabulary-card>img { height:125px; }
  .vocabulary-games { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .vocabulary-game button>span { font-size:13px; padding:10px 2px 5px; }
  .vocabulary-primary-play { justify-content:space-between; gap:10px; }
  .vocabulary-primary-play>span { max-width:8ch; }
  .vocabulary-setup .vocabulary-primary-play button { font-size:13px; padding:10px 14px; }
  .vocabulary-setup .vip-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .vocabulary-setup .vip-panel .vip-tile { height:125px; }
}
@media(prefers-reduced-motion:reduce) { .vocabulary-game button { transition:none!important; transform:none!important; } }

/* Compact setup controls; game artwork inside the players is unchanged. */
.vocabulary-guide { gap:10px; margin-bottom:12px; }
.vocabulary-guide-portrait { width:44px; height:56px; }
.vocabulary-guide p { padding:8px 12px; font-size:18px; }
.vocabulary-cards { grid-template-columns:repeat(auto-fill,minmax(105px,1fr)); gap:10px; }
.vocabulary-card { padding:6px; border-radius:10px; }
.vocabulary-setup .vocabulary-change { display:block; width:100%; height:84px; padding:0; border:0; border-radius:7px; background:var(--bg-sunken); margin-bottom:6px; }
.vocabulary-change img { display:block; width:100%; height:100%; object-fit:contain; border-radius:7px; }
.vocabulary-card input { padding:6px; min-height:34px; font-size:14px; border-radius:6px; }
.vocabulary-card-actions { margin:0; }
.vocabulary-setup .vocabulary-game button { display:flex; align-items:center; gap:10px; padding:8px; min-height:88px; }
.vocabulary-game button img { width:85px; height:64px; flex:none; aspect-ratio:auto; }
.vocabulary-game button>span { padding:0; font-size:14px; }
.vocabulary-games { gap:10px; }
.vocabulary-primary-play { margin:12px 0; }
.vocabulary-setup .vocabulary-games-heading { padding-top:12px; margin-bottom:10px; }
.vocabulary-setup .vip-category-action { display:block; margin-top:10px; padding-top:10px; }
.vocabulary-setup .vip-category-action button { width:100%; }
.vocabulary-setup #sharedVocabularySearch .vip-panel .vip-status:not([data-error='true']):not([data-empty='true']) { position:absolute; width:1px; height:1px; margin:0; overflow:hidden; clip-path:inset(50%); }
@media(max-width:600px) {
  .vocabulary-cards { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
  .vocabulary-setup .vocabulary-change { height:72px; }
  .vocabulary-card input { font-size:16px; padding:5px 3px; }
  .vocabulary-setup .vocabulary-game button { flex-direction:column; gap:6px; min-height:112px; justify-content:center; text-align:center; }
  .vocabulary-game button img { width:85px; height:60px; }
  .vocabulary-game button>span { padding:0; font-size:13px; }
}
