.dict-dialog{--dict-line:var(--surface-line,#dfd1bd);--dict-ink:var(--text,#4c392b);--dict-muted:var(--text-muted,#766959);--dict-bg:var(--bg,#fff6e7);--dict-surface:var(--surface,#fffcf5);--dict-accent:#78512e;color:var(--dict-ink);background:var(--dict-bg);font:inherit;box-sizing:border-box;width:min(1140px,calc(100% - 48px));height:calc(100svh - 48px);max-height:100svh;max-width:none;margin:auto;padding:0;border:1px solid var(--dict-line);border-radius:24px;box-shadow:0 28px 100px #0005;overflow:hidden}
html[data-theme="dark"] .dict-dialog{--dict-accent:#e6b879;--dict-bg:var(--bg,#242933);--dict-surface:var(--surface,#30353e);--dict-ink:var(--text,#eee5d8);--dict-muted:var(--text-muted,#c7bcab)}
.dict-dialog::backdrop{background:#131b24b5;backdrop-filter:blur(5px)}body.dictionary-open{overflow:hidden}.dict-dialog *{box-sizing:border-box}.dict-shell{height:100%;display:flex;flex-direction:column}.dict-topbar{display:flex;align-items:center;justify-content:space-between;padding:14px 28px;border-bottom:1px solid var(--dict-line);gap:15px;background:var(--dict-surface)}.dict-topbar .brand{font-size:19px}.dict-scroll{overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;flex:1;min-height:0;padding:0 38px;scroll-behavior:auto}.dict-hero{max-width:820px;margin:38px auto 22px;text-align:center}.dict-eyebrow{display:block;font-size:13px;color:var(--dict-accent);font-weight:700;letter-spacing:.02em}.dict-hero h1{font-size:clamp(26px,4vw,42px);line-height:1.35;margin:10px 0}.dict-muted{color:var(--dict-muted);font-size:14px;line-height:1.7}.dict-search-form{display:flex;gap:10px;margin:24px auto 0;padding:7px;background:var(--dict-surface);border:1px solid var(--dict-line);border-radius:17px;box-shadow:0 8px 26px #00000008}.dict-search-form input{min-width:0;flex:1;width:100%;font:inherit;font-size:17px;border:0;background:transparent;color:inherit;padding:10px 12px;outline:none}.dict-search-form:focus-within{outline:2px solid var(--dict-accent);outline-offset:3px}.dict-dialog button,.dict-dialog select,.dict-dialog a{font:inherit}.dict-dialog button{cursor:pointer}.dict-dialog a{color:var(--dict-accent)}.dict-primary{border:0;border-radius:12px;padding:11px 22px;min-height:44px;background:var(--dict-accent);color:var(--dict-surface);font-weight:700!important}.dict-button,.dict-chip,.dict-back{display:inline-flex;justify-content:center;align-items:center;gap:6px;background:var(--dict-surface);border:1px solid var(--dict-line);border-radius:11px;padding:9px 14px;min-height:44px;color:var(--dict-ink);text-decoration:none;font-weight:500}.dict-dialog :is(button,select,a):focus-visible{outline:3px solid var(--dict-accent);outline-offset:3px}.dict-dialog :is(.dict-button,.dict-chip,.dict-result):hover{border-color:var(--dict-accent)}.dict-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap;max-width:960px;margin:0 auto 20px}.dict-tools label{font-size:14px;font-weight:700}.dict-tools select{border:1px solid var(--dict-line);border-radius:9px;background:var(--dict-surface);color:inherit;padding:8px;min-height:42px}.dict-tools #dictStatus{margin-inline-start:auto}#dictContent{max-width:960px;margin:auto;min-height:220px}.dict-welcome,.dict-empty{text-align:center;padding:40px 10px}.dict-welcome h2,.dict-empty h2{font-size:24px;margin:8px 0}.dict-examples{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin:22px 0}.dict-chip{font-size:14px!important;margin:4px}.dict-empty .dict-primary{display:block;margin:20px auto 0}.dict-results{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:1fr 1fr;gap:14px}.dict-result{display:flex;flex-direction:column;gap:12px;text-align:start;width:100%;height:100%;padding:20px;background:var(--dict-surface);border:1px solid var(--dict-line);border-radius:17px;color:inherit}.dict-result-top{display:flex;align-items:baseline;justify-content:space-between;gap:10px;width:100%}.dict-topic{font-size:12px;color:var(--dict-accent);font-weight:700}.dict-match{font-size:11px;color:var(--dict-muted)}.dict-pair{display:flex;flex-direction:column;gap:5px;min-width:0;max-width:100%}.dict-en{font-size:20px;font-weight:700;overflow-wrap:anywhere;line-height:1.35;text-align:start}.dict-he{font-size:16px;line-height:1.5;font-weight:500}.dict-preview{font-size:14px;line-height:1.8;color:var(--dict-muted);display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.dict-suggestions{padding:16px;border:1px solid var(--dict-line);border-radius:16px;margin-bottom:20px;background:var(--dict-surface)}.dict-suggestions h2{font-size:16px;margin:0 0 8px}.dict-more{display:flex;margin:22px auto}.dict-detail{max-width:800px;margin:0 auto;padding:22px 26px;border:1px solid var(--dict-line);border-radius:18px;background:var(--dict-surface)}.dict-back{display:flex;width:fit-content;margin-bottom:24px}.dict-detail-title{outline:none;margin:14px 0 28px}.dict-detail-title .dict-en{font-size:30px}.dict-detail-title .dict-he{font-size:22px}.dict-definition{font-size:19px;line-height:1.95;margin:10px 0 26px;unicode-bidi:plaintext}.dict-detail h3{font-size:16px;margin:25px 0 10px}.dict-aliases{font-size:14px;line-height:1.8}.dict-source{border-top:1px solid var(--dict-line);margin-top:26px;padding-top:18px;font-size:14px;line-height:1.9}.dict-source summary{cursor:pointer;min-height:44px;font-weight:700}.dict-source bdi{unicode-bidi:plaintext}.dict-footer{max-width:960px;margin:36px auto 0;padding:20px 0 28px;border-top:1px solid var(--dict-line);display:flex;justify-content:space-between;gap:15px;font-size:12px;color:var(--dict-muted)}.dict-loading{text-align:center;padding:50px}.dict-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:760px){.dict-dialog{width:100%;height:100svh;max-height:100svh;border:0;border-radius:0}.dict-topbar{padding:12px 16px}.dict-scroll{padding:0 16px}.dict-hero{margin:26px auto 18px}.dict-search-form{gap:4px}.dict-primary{padding:10px 15px}.dict-search-form input{font-size:16px;padding:8px 6px}.dict-results{grid-template-columns:1fr;gap:12px}.dict-result{padding:17px}.dict-tools{gap:8px}.dict-tools #dictStatus{font-size:12px}.dict-detail{padding:18px}.dict-detail-title .dict-en{font-size:25px}.dict-definition{font-size:17px}.dict-footer{flex-direction:column;gap:8px}.dict-empty{padding:24px 8px}.dict-welcome{padding:30px 0}.dict-match{white-space:nowrap}}

/* Empty Hebrew prompt has a fixed RTL base; entered searches keep dir=auto. */
.dict-search-form #dictSearch:placeholder-shown{direction:rtl;text-align:right}
