.kd-workspace-tabs{display:flex;gap:6px;border-bottom:1px solid var(--line);padding:22px 0 0}.kd-workspace-tabs a{display:flex;align-items:center;gap:8px;padding:12px 18px;color:var(--muted);text-decoration:none;font-size:13px;border-bottom:2px solid transparent}.kd-workspace-tabs a[aria-current]{color:var(--text);border-bottom-color:var(--accent);font-weight:650}.kd-workspace-tabs [data-list-count],.kd-detail-actions [data-list-count]{font-size:10px;background:var(--bg);border:1px solid var(--line);padding:2px 6px;border-radius:12px}
.kd-preferences{display:flex;align-items:end;gap:10px;flex-wrap:wrap}.kd-preferences label,.kd-voice-controls label{display:flex;flex-direction:column;gap:7px;font-size:11px;color:var(--muted)}.kd-preferences select,.kd-voice-controls select{max-width:210px;font:inherit;font-size:12px;color:var(--text);background:var(--surface);border:1px solid var(--line);padding:10px 25px 10px 9px;border-radius:7px;min-height:40px}.kd-save-note,.kd-workspace-status{font-size:11px;color:var(--muted);line-height:1.6}.kd-workspace-status:empty{display:none}.kd-workspace-status{color:var(--accent);min-height:18px}.kd-target-hint{margin-top:8px}
.kd-word-actions{display:flex;gap:7px;flex-wrap:wrap;margin:0 0 16px}.kd-word-actions button,.kd-detail-actions>a{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);border-radius:6px;background:var(--surface);color:var(--muted);font:inherit;font-size:10px;padding:7px 9px;cursor:pointer;text-decoration:none}.kd-word-actions button[aria-pressed=true]{color:var(--accent);border-color:var(--accent);background:var(--bg)}.kd-detail-actions{display:flex;align-items:center;gap:12px;margin-bottom:22px}.kd-detail-actions .kd-word-actions{margin:0}.kd-catalog-card h2{display:flex;align-items:center;gap:8px;margin-bottom:15px}.kd-catalog-card h2>a{min-width:0}.kd-word-table .kd-word-actions{margin:10px 0 0}.kd-word-table .kd-word-actions button{font-size:10px;font-weight:400}
.kd-pronounce{border:0;background:transparent;color:var(--muted);font:inherit;font-size:11px;line-height:1;min-width:26px;min-height:26px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;vertical-align:middle;flex:none;border-radius:5px}.kd-pronounce:hover{background:var(--bg);color:var(--accent)}.kd-spoken-word{display:inline;overflow-wrap:anywhere}.kd-spoken-word .kd-pronounce{font-size:9px;min-width:21px;min-height:24px}.kd-catalog-card h2>.kd-pronounce{font-size:15px;min-width:30px;min-height:30px}
.dictionary-world[data-card-columns="1"] .kd-catalog-cards{grid-template-columns:repeat(1,minmax(0,1fr))}.dictionary-world[data-card-columns="2"] .kd-catalog-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.dictionary-world[data-card-columns="3"] .kd-catalog-cards{grid-template-columns:repeat(3,minmax(0,1fr))}.dictionary-world[data-card-columns="4"] .kd-catalog-cards{grid-template-columns:repeat(4,minmax(0,1fr))}.dictionary-world[data-card-columns="5"] .kd-catalog-cards{grid-template-columns:repeat(5,minmax(0,1fr))}.dictionary-world[data-card-columns="6"] .kd-catalog-cards{grid-template-columns:repeat(6,minmax(0,1fr))}
.dictionary-world:is([data-card-columns="4"],[data-card-columns="5"],[data-card-columns="6"]) .kd-catalog-card{padding:16px}.dictionary-world:is([data-card-columns="4"],[data-card-columns="5"],[data-card-columns="6"]) .kd-catalog-card dl>div{grid-template-columns:1fr;gap:4px}.dictionary-world:is([data-card-columns="4"],[data-card-columns="5"],[data-card-columns="6"]) .kd-catalog-card h2{font-size:23px}.dictionary-world [data-card-columns] .kd-catalog-cards{min-width:0}
#kd-word-results{scroll-margin-top:145px}#kd-pages{flex-wrap:wrap}#kd-pages a[aria-current]{background:var(--text);color:var(--surface)}#kd-infinite-loader{text-align:center;padding:28px 0}#kd-infinite-loader button,.kd-compare-search button,.kd-listen-actions button{font:inherit;font-size:12px;border:1px solid var(--line);border-radius:7px;padding:11px 18px;background:var(--text);color:var(--surface);cursor:pointer}#kd-infinite-loader p{font-size:12px;color:var(--muted)}#kd-scroll-sentinel{height:1px}.dictionary-world [aria-busy=true]{opacity:.65}.dictionary-world button:disabled{opacity:.45;cursor:not-allowed}
.kd-compare-workspace>h2{font-size:18px;margin:25px 0 18px}.kd-compare-workspace>h2 span{font-size:12px;color:var(--muted)}.kd-comparison-table thead th{white-space:normal;min-width:230px}.kd-comparison-table thead th:first-child{min-width:160px;position:sticky;inset-inline-start:0;z-index:2}.kd-compare-heading{font-size:24px;font-weight:650;display:flex;gap:8px;align-items:center;margin-top:14px;line-height:1.4}.kd-comparison-table td{font-size:13px}.kd-compare-search{margin:30px 0 22px;border-top:1px solid var(--line);padding-top:25px;max-width:620px}.kd-compare-search>label{display:block;font-size:14px;font-weight:600;margin-bottom:12px}.kd-compare-search>div{display:flex;gap:9px}.kd-compare-search input{min-width:0;flex:1;font:inherit;font-size:13px;padding:12px;border:1px solid var(--line);border-radius:7px;background:var(--surface);color:var(--text)}.kd-compare-search p{font-size:12px;color:var(--muted);line-height:1.7}
#kd-pronunciation-dialog{background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:15px;width:530px;max-width:calc(100vw - 32px);max-height:85dvh;padding:24px;box-sizing:border-box;overflow:auto}#kd-pronunciation-dialog::backdrop{background:#0008;backdrop-filter:blur(3px)}.kd-dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:20px}.kd-dialog-heading h2{font-size:16px;margin:0}.kd-dialog-heading>button{border:0;background:transparent;color:var(--muted);font-size:26px;cursor:pointer;min-width:36px;min-height:36px}#kd-pronunciation-word{display:flex;align-items:baseline;gap:12px;margin:20px 0;overflow-wrap:anywhere}#kd-pronunciation-word>bdi{font-size:34px;min-width:0}#kd-pronunciation-word small{color:var(--muted);font-size:12px}#kd-pronunciation-dialog h3{font-size:12px;color:var(--muted);margin:0 0 10px}#kd-ipa-output{font-size:12px;line-height:1.7;padding:12px 0;border-bottom:1px solid var(--line)}.kd-ipa-row{margin-bottom:13px}.kd-ipa-row>bdi{display:block;font-size:21px;line-height:1.6}.kd-ipa-row small,.kd-ipa-row a{display:block;font-size:10px;color:var(--muted);overflow-wrap:anywhere}.kd-voice-controls{display:flex;gap:12px;margin:20px 0;align-items:end}.kd-voice-controls label:first-child{flex:1;min-width:0}.kd-voice-controls select{max-width:100%;width:100%}.kd-listen-actions{display:flex;gap:9px}.kd-listen-actions #kd-stop{background:var(--surface);color:var(--text)}.kd-pronunciation-note,#kd-voice-status{font-size:11px;color:var(--muted);line-height:1.8}.kd-pronunciation-note{margin-top:20px}
@media(max-width:1100px){.dictionary-world:is([data-card-columns="4"],[data-card-columns="5"],[data-card-columns="6"]) .kd-catalog-cards{grid-template-columns:repeat(3,minmax(0,1fr))}.kd-preferences{order:3;width:100%}.kd-toolbar .kd-view-toggle{margin-inline-start:auto}}
@media(max-width:700px){.kd-workspace-tabs a{padding:11px 12px;font-size:12px}.kd-preferences{gap:9px}.kd-preferences label{flex:1;min-width:80px}.kd-preferences select{width:100%;max-width:100%;font-size:11px;padding-inline-end:15px}.dictionary-world[data-card-columns] .kd-catalog-cards{grid-template-columns:1fr}.dictionary-world[data-card-columns="2"] .kd-catalog-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.dictionary-world[data-card-columns="2"] .kd-catalog-card{padding:12px}.dictionary-world[data-card-columns="2"] .kd-catalog-card dl>div{grid-template-columns:1fr;gap:4px}.dictionary-world[data-card-columns="2"] .kd-catalog-card h2{font-size:21px}.kd-comparison-table thead th{min-width:190px}.kd-comparison-table thead th:first-child,.kd-comparison-table tbody th{min-width:100px}.kd-voice-controls{flex-wrap:wrap}.kd-voice-controls label:first-child{flex-basis:100%}#kd-pronunciation-dialog{padding:18px}.kd-detail-actions{flex-wrap:wrap}}

/* Explicit column choices retain their count; narrow screens can scroll the cards. */
.dictionary-world[data-card-columns="1"]{--kd-card-columns:1}
.dictionary-world[data-card-columns="2"]{--kd-card-columns:2}
.dictionary-world[data-card-columns="3"]{--kd-card-columns:3}
.dictionary-world[data-card-columns="4"]{--kd-card-columns:4}
.dictionary-world[data-card-columns="5"]{--kd-card-columns:5}
.dictionary-world[data-card-columns="6"]{--kd-card-columns:6}
#kd-word-results,#kd-compare-results{overflow-x:auto}
.dictionary-world[data-card-columns]:not([data-card-columns="0"]) .kd-catalog-cards{grid-template-columns:repeat(var(--kd-card-columns),minmax(170px,1fr))}
#kd-ipa-output{max-height:min(30dvh,300px);overflow-y:auto;overscroll-behavior:contain;box-sizing:border-box}

/* Keep page numbers together and the direct page jump within the same compact row. */
#kd-pages{gap:8px 12px;margin:18px 0;min-width:0}
#kd-pages .kd-page-links{display:flex;align-items:center;gap:4px;max-width:100%;min-width:0;padding:3px}
#kd-pages .kd-page-numbers{display:flex;align-items:center;gap:4px;min-width:0;overflow-x:auto;padding:3px 0;scrollbar-width:thin}
#kd-pages .kd-page-link{display:inline-flex;align-items:center;justify-content:center;flex:none;min-width:30px;min-height:32px;padding:4px 7px;border:1px solid var(--line);border-radius:5px;background:var(--surface);color:var(--text);font-size:12px;line-height:1.4;white-space:nowrap;font-variant-numeric:tabular-nums}
#kd-pages .kd-page-link[aria-current]{background:var(--text);color:var(--surface);font-weight:650}
#kd-pages .kd-page-link[aria-disabled]{opacity:.4}
#kd-pages .kd-page-jump{display:flex;align-items:center;justify-content:center;gap:5px;margin:0;font-size:12px;flex-wrap:wrap}
#kd-pages .kd-page-jump label{color:var(--muted);white-space:nowrap}
#kd-pages .kd-page-jump input{width:84px;min-width:0;height:32px;padding:4px 6px;border:1px solid var(--line);border-radius:5px;background:var(--surface);color:var(--text);font:inherit;font-variant-numeric:tabular-nums}
#kd-pages .kd-page-jump button{height:32px;padding:4px 10px;border:1px solid var(--line);border-radius:5px;background:var(--text);color:var(--surface);font:inherit;cursor:pointer}
#kd-pages .kd-page-jump span{white-space:nowrap}
@media(max-width:700px){#kd-pages{gap:6px}#kd-pages .kd-page-links{gap:3px}#kd-pages .kd-page-numbers{gap:3px}#kd-pages .kd-page-link{min-width:28px;padding-inline:6px}#kd-pages .kd-page-jump{flex-basis:100%}}
