/* TaalFlash — словарь 2.0 (TAAL_DICT_2.0 §3, §7.1). Классы с префиксом dict-; подключается на dict2*.html после main.css. */
/* F8-06: Literata (нидерландские слова) - локальные woff2 из static/fonts, без Google Fonts */
@font-face { font-family: 'Literata'; font-style: normal; font-weight: 400; font-display: swap; src: url(/taal/static/fonts/literata-400.woff2) format('woff2'); }
@font-face { font-family: 'Literata'; font-style: normal; font-weight: 600; font-display: swap; src: url(/taal/static/fonts/literata-600.woff2) format('woff2'); }
@font-face { font-family: 'Literata'; font-style: normal; font-weight: 700; font-display: swap; src: url(/taal/static/fonts/literata-700.woff2) format('woff2'); }
@font-face { font-family: 'Literata'; font-style: italic; font-weight: 400; font-display: swap; src: url(/taal/static/fonts/literata-400i.woff2) format('woff2'); }
:root {
  --dict-tr: #283593; --dict-surface-2: #F1F1F8; --dict-mark-bg: #FFE3D3;
  --dict-de-ink: #1A237E; --dict-de-bg: #E8EAF6; --dict-de-fill: #1A237E;
  --dict-het-ink: #A63A0B; --dict-het-bg: #FFF3EE; --dict-het-fill: #E55A1F;
  --dict-warn-ink: #8A5300; --dict-warn-bg: #FFF4D6;
  --dict-nav-h: 60px;
  --font-ui: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-nl: 'Literata', Georgia, 'Times New Roman', serif;
  --font-ipa: 'Noto Sans', 'Segoe UI', 'DejaVu Sans', 'Lucida Grande', sans-serif;
}
[data-theme="dark"] {
  --dict-tr: #B4BEFF; --dict-surface-2: #1E1E3A; --dict-mark-bg: #4A2A1A;
  --dict-de-ink: #C5CBFF; --dict-de-bg: #1C2150; --dict-de-fill: #7986CB;
  --dict-het-ink: #FFB38A; --dict-het-bg: #3A1E10; --dict-het-fill: #FF6B2B;
  --dict-warn-ink: #FFD166; --dict-warn-bg: #2A2310;
}
@media (max-width: 768px) { :root { --dict-nav-h: 52px; } }

/* ============ база ============ */
.dict-app { font: 400 16px/1.55 var(--font-ui); color: var(--text); padding-bottom: 8px; }
.dict-app button, .dict-app input, .dict-app textarea { font: inherit; color: inherit; }
.dict-app button { cursor: pointer; border: 0; background: none; }
.dict-app a { color: var(--blue-ink); text-decoration: underline; }
.dict-app p, .dict-app ul, .dict-app ol { margin: 0; padding: 0; }
.dict-app :is(h1, h2, h3) { margin: 0; }
.dict-notice-wrap { min-height: 0; }

/* глобальное правило старых dict.html/dict-uk.html */
mark { color: var(--text); }


.dict-app :focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.dict-app [lang="nl"] { font-family: var(--font-nl); }
.dict-ipa { font-family: var(--font-ipa); }
.dict-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dict-skip { position: absolute; left: 12px; top: -48px; background: var(--white); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.dict-skip:focus { top: 8px; }
.dict-app mark { background: var(--dict-mark-bg); color: var(--text); border-radius: 3px; padding: 0 1px; }
svg.dict-i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ============ 3. Шапка и строка поиска ============ */
.dict-top { display: flex; align-items: center; gap: 12px; max-width: 1120px; margin: 0 auto; padding: 10px 16px; }
.dict-brand { font-weight: 800; font-size: 18px; color: var(--text); text-decoration: none; }
.dict-brand b { color: var(--orange-ink); }
.dict-top h1 { margin: 0; font: 600 17px/1.2 var(--font-nl); color: var(--text-s); }
.dict-top .dict-spacer { flex: 1; }
.dict-seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 999px; overflow: hidden; }
.dict-seg button { border: 0; background: none; padding: 5px 11px; font-size: 13px; font-weight: 700; color: var(--text-s); min-height: 32px; }
.dict-seg button[aria-pressed="true"] { background: var(--text); color: var(--white); }
.dict-icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--white); color: var(--text); }
.dict-icon-btn:hover { border-color: var(--border-strong); }
.dict-searchwrap { position: sticky; top: var(--dict-nav-h); z-index: 20; background: var(--bg); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.dict-searchrow { max-width: 1120px; margin: 0 auto; padding: 10px 16px 12px; }
.dict-field { display: flex; align-items: center; gap: 6px; background: var(--white); border: 1.5px solid var(--border-strong); border-radius: 999px; padding: 4px 6px 4px 16px; min-height: 54px; box-shadow: var(--shadow); }
.dict-field:focus-within { border-color: var(--focus); }
.dict-field input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 19px; padding: 8px 0; }
.dict-field input::placeholder { color: var(--text-s); }
.dict-field input::-webkit-search-cancel-button { display: none; }
.dict-field .dict-icon-btn { width: 42px; height: 42px; border: 0; background: none; }
.dict-field .dict-icon-btn:hover { background: var(--dict-surface-2); }
.dict-dir { display: flex; align-items: center; gap: 8px; margin: 8px 4px 0; font-size: 13px; color: var(--text-s); min-height: 20px; }
.dict-dir strong { color: var(--text); font-weight: 700; }
.dict-listening .dict-mic { color: var(--red-ink); }
.dict-asr-seg { flex: none; display: inline-flex; border: 1.5px solid var(--border-strong); border-radius: 999px; overflow: hidden; }
.dict-asr-seg[hidden] { display: none; }
.dict-asr-seg button { min-width: 34px; height: 32px; padding: 0 8px; font: 700 12.5px/1 var(--font-ui); letter-spacing: .03em; color: var(--text-s); }
.dict-asr-seg button:hover { background: var(--dict-surface-2); }
.dict-asr-seg button[aria-pressed="true"] { background: var(--text); color: var(--white); }
.dict-listening .dict-asr-seg { border-color: var(--red-ink); }
/* ============ 4. Раскладка: мобильный — одна колонка, ≥960px — список слева, карточка справа ============ */
.dict-main { max-width: 1120px; margin: 0 auto; padding: 12px 16px 96px; }
.dict-notice { display: none; align-items: flex-start; gap: 10px; margin: 4px 0 14px; padding: 10px 14px; border-radius: 12px; background: var(--dict-surface-2); font-size: 15px; }
.dict-notice.dict-on { display: flex; }
.dict-notice .dict-i { margin-top: 2px; color: var(--orange-ink); }
.dict-notice button.dict-link { border: 0; background: none; padding: 0; color: var(--blue-ink); text-decoration: underline; font-weight: 600; }
.dict-layout { display: grid; gap: 18px; }
.dict-layout[hidden], .dict-idle[hidden], .dict-sentence[hidden] { display: none; }
#entry { order: 1; } #side { order: 2; }
@media (min-width: 960px) {
  .dict-layout { grid-template-columns: 340px minmax(0, 1fr); align-items: start; gap: 28px; }
  #side { order: 1; position: sticky; top: calc(var(--dict-nav-h) + 112px); max-height: calc(100vh - var(--dict-nav-h) - 128px); overflow: auto; padding-right: 4px; }
  #entry { order: 2; }
}

/* ============ 5. Список результатов (компактные строки, не карточки) ============ */
.dict-side-h { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 6px; font-size: 14px; font-weight: 700; color: var(--text-s); }
.dict-rows { list-style: none; margin: 0 0 18px; padding: 0; }
.dict-row { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 2px 10px; align-items: baseline; width: 100%; text-align: left; border: 0; border-radius: 10px; background: none; padding: 9px 10px; cursor: pointer; }
.dict-row:hover, .dict-row[aria-selected="true"] { background: var(--white); box-shadow: inset 0 0 0 1px var(--border); }
.dict-row[aria-selected="true"] { box-shadow: inset 3px 0 0 var(--orange), inset 0 0 0 1px var(--border); }
.dict-row .dict-hw-s { font: 600 17px/1.3 var(--font-nl); overflow-wrap: anywhere; }
.dict-row .dict-tr-s { grid-column: 2; color: var(--dict-tr); font-size: 14.5px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dict-row .dict-why { grid-column: 2; font-size: 12.5px; color: var(--text-s); }
.dict-chip { display: inline-flex; justify-content: center; align-items: center; min-width: 38px; padding: 1px 7px; border-radius: 6px; font: 700 13px/1.6 var(--font-nl); background: var(--dict-surface-2); color: var(--text-s); }
.dict-chip.dict-de { background: var(--dict-de-bg); color: var(--dict-de-ink); }
.dict-chip.dict-het { background: var(--dict-het-bg); color: var(--dict-het-ink); }
.dict-chip.dict-pos { font: italic 600 12.5px/1.75 var(--font-ui); }
.dict-ctx { list-style: none; margin: 0; padding: 0; }
.dict-ctx li { padding: 9px 2px; border-top: 1px solid var(--border); font-size: 15px; }
.dict-ctx .dict-nl { display: block; font-family: var(--font-nl); }
.dict-ctx .dict-ru { display: block; color: var(--text-s); font-size: 14px; }

/* ============ 6. Карточка слова — главный элемент ============ */
.dict-entry { position: relative; background: var(--white); border: 1px solid var(--border); border-left: 6px solid var(--art-fill, var(--border-strong)); border-radius: var(--radius); padding: 20px 22px 18px; box-shadow: var(--shadow); }
.dict-entry.dict-de { --art-fill: var(--dict-de-fill); }
.dict-entry.dict-het { --art-fill: var(--dict-het-fill); }
.dict-formof { margin: -4px 0 12px; font-size: 14.5px; color: var(--text-s); }
.dict-formof b { color: var(--text); font-family: var(--font-nl); }
.dict-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: start; }
.dict-hw { margin: 0; font: 700 36px/1.1 var(--font-nl); letter-spacing: -.01em; overflow-wrap: anywhere; }
.dict-hw .dict-art { font-weight: 400; }
.dict-hw .dict-art.dict-de { color: var(--dict-de-ink); }
.dict-hw .dict-art.dict-het { color: var(--dict-het-ink); }
.dict-say { display: flex; gap: 6px; }
.dict-say .dict-icon-btn { width: 44px; height: 44px; }
.dict-say .dict-slow { width: auto; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.dict-pron { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; font-size: 16px; }
.dict-pron .dict-cyr { font-weight: 700; }
.dict-pron .dict-ipa { color: var(--text-s); font-size: 15px; }
.dict-pron .dict-syl { font-family: var(--font-nl); color: var(--text-s); }
.dict-pron .dict-syl u { text-decoration-thickness: 2px; text-underline-offset: 3px; color: var(--text); }
.dict-facts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 6px; font-size: 13.5px; color: var(--text-s); }
.dict-facts abbr { text-decoration: none; font-style: italic; }
.dict-badge { border: 1px solid var(--border-strong); border-radius: 6px; padding: 0 6px; font-weight: 800; font-size: 12.5px; color: var(--text); }
.dict-meter { display: inline-flex; gap: 2px; align-items: flex-end; height: 14px; }
.dict-meter i { width: 4px; border-radius: 1px; background: var(--border); }
.dict-meter i.dict-on { background: var(--text-s); }
.dict-meter i:nth-child(1) { height: 6px; } .dict-meter i:nth-child(2) { height: 8px; } .dict-meter i:nth-child(3) { height: 10px; } .dict-meter i:nth-child(4) { height: 12px; } .dict-meter i:nth-child(5) { height: 14px; }
.dict-reg { font-style: italic; }
.dict-senses { margin: 16px 0 0; padding: 0; list-style: none; counter-reset: s; }
.dict-senses li { counter-increment: s; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; padding: 3px 0; }
.dict-senses li::before { content: counter(s); font-weight: 800; color: var(--text-s); font-size: 14px; line-height: 1.9; }
.dict-senses li.dict-one { grid-template-columns: minmax(0, 1fr); }
.dict-senses li.dict-one::before { display: none; }
.dict-senses .dict-tr { color: var(--dict-tr); font-weight: 700; font-size: 18px; }
.dict-senses li:first-child .dict-tr { font-size: 21px; }
.dict-senses .dict-note { color: var(--text-s); font-size: 14px; font-style: italic; }
.dict-senses li.dict-say1 { grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; }
.dict-senses li.dict-say1.dict-one { grid-template-columns: minmax(0, 1fr) auto; }
.dict-trsay { display: inline-flex; align-items: center; width: auto; height: 36px; gap: 6px; padding: 0 12px 0 10px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.dict-trsay .dict-i { width: 16px; height: 16px; }
.dict-warn { display: flex; gap: 10px; margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--dict-warn-bg); font-size: 15px; }
.dict-warn .dict-i { color: var(--dict-warn-ink); margin-top: 2px; }
.dict-warn b { color: var(--dict-warn-ink); }
.dict-sec { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.dict-sec h3 { margin: 0 0 8px; font-size: 14px; font-weight: 700; color: var(--text-s); }
.dict-kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; margin: 0; font-size: 15.5px; }
.dict-kv dt { color: var(--text-s); }
.dict-kv dd { margin: 0; font-family: var(--font-nl); }
.dict-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dict-three div { background: var(--dict-surface-2); border-radius: 10px; padding: 8px 10px; }
.dict-three span { display: block; font-size: 12.5px; color: var(--text-s); }
.dict-three b { font: 700 17px/1.3 var(--font-nl); overflow-wrap: anywhere; }
details.dict-conj { margin-top: 10px; }
details.dict-conj summary { cursor: pointer; font-weight: 700; color: var(--blue-ink); padding: 4px 0; }
.dict-conj table { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 15px; }
.dict-conj th { text-align: left; font-weight: 600; color: var(--text-s); padding: 5px 8px 5px 0; white-space: nowrap; font-size: 13.5px; }
.dict-conj td { padding: 5px 0; border-top: 1px solid var(--border); font-family: var(--font-nl); }
.dict-sepnote { margin: 8px 0 0; font-size: 14.5px; color: var(--text-s); }
.dict-sepnote b { color: var(--dict-het-ink); font-family: var(--font-nl); }
.dict-ex { list-style: none; margin: 0; padding: 0; }
.dict-ex li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; padding: 8px 0; }
.dict-ex li + li { border-top: 1px dashed var(--border); }
.dict-ex .dict-nl { font-size: 17px; line-height: 1.45; }
.dict-ex .dict-ru { grid-column: 1; color: var(--text-s); font-size: 15px; }
.dict-ex .dict-icon-btn { width: 36px; height: 36px; grid-row: 1 / span 2; grid-column: 2; }
a.dict-w { color: inherit; text-decoration: none; border-bottom: 1px dotted transparent; }
a.dict-w:hover, a.dict-w:focus-visible { border-bottom-color: var(--text-s); }
.dict-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.dict-tag { display: inline-flex; gap: 6px; align-items: baseline; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--white); text-decoration: none; color: var(--text); font-size: 14.5px; }
.dict-tag [lang="nl"] { font-weight: 600; }
.dict-tag .dict-t { color: var(--text-s); font-size: 13.5px; }
.dict-tag:hover { border-color: var(--border-strong); }
.dict-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.dict-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1.5px solid var(--border-strong); background: var(--white); font-weight: 700; font-size: 15px; }
.dict-btn:hover { background: var(--dict-surface-2); }
.dict-btn.dict-primary { background: var(--orange); border-color: var(--orange); color: var(--on-orange); }
.dict-btn.dict-primary:hover { background: var(--orange-d); border-color: var(--orange-d); }
.dict-btn[aria-pressed="true"] .dict-i { fill: var(--orange); stroke: var(--orange-ink); }
.dict-empty { padding: 24px 4px; color: var(--text-s); }
.dict-empty h2 { margin: 0 0 6px; font-size: 20px; color: var(--text); }
@media (prefers-reduced-motion: no-preference) {
  .dict-entry.dict-enter { animation: enter .16s ease-out; }
  @keyframes enter { from { opacity: 0; } to { opacity: 1; } }  /* без transform: иначе fixed-панель действий на время анимации привязана к карточке */
}
@media (max-width: 480px) {
  .dict-hw { font-size: 31px; }
  .dict-entry { padding: 16px 16px 14px; border-left-width: 5px; }
  .dict-three { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 6px; }
  .dict-btn { min-height: 40px; padding: 0 12px; font-size: 14px; }
  .dict-top h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

/* ============ 7. Фраза: подстрочный разбор ============ */
.dict-sentence .dict-orig { font: 600 22px/1.4 var(--font-nl); margin: 0 0 4px; }
.dict-sentence .dict-trline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 14px; }
.dict-sentence .dict-full { color: var(--dict-tr); font-size: 19px; font-weight: 700; margin: 0; }
.dict-sentence .dict-full.dict-pending { color: var(--text-s); font-weight: 400; font-size: 15px; }
.dict-gloss { display: flex; flex-wrap: wrap; gap: 10px 8px; padding: 0; margin: 0; list-style: none; }
.dict-gloss li { display: flex; flex-direction: column; min-width: 54px; padding: 8px 10px; border-radius: 10px; background: var(--white); border: 1px solid var(--border); }
.dict-gloss li.dict-sep { border-color: var(--dict-het-fill); border-style: dashed; }
.dict-gloss a.dict-w { font: 700 18px/1.3 var(--font-nl); }
.dict-gloss .dict-g { color: var(--dict-tr); font-size: 14.5px; font-weight: 700; }
.dict-gloss .dict-l { color: var(--text-s); font-size: 12.5px; }

/* ============ 8. Пустое состояние, тост, диалог ============ */
.dict-idle { display: grid; gap: 22px; }
@media (min-width: 960px) { .dict-idle { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.dict-idle h2 { margin: 0 0 10px; font-size: 15px; color: var(--text-s); font-weight: 700; }
.dict-try { display: flex; flex-wrap: wrap; gap: 8px; }
.dict-try button { border: 1px solid var(--border); background: var(--white); border-radius: 999px; padding: 6px 12px; font-size: 14.5px; text-align: left; }
.dict-try button:hover { border-color: var(--border-strong); }
.dict-try button small { display: block; color: var(--text-s); font-size: 12px; }
.dict-wotd { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.dict-wotd .dict-hw { font-size: 30px; }
.dict-toast { visibility: hidden; position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); background: var(--text); color: var(--white); padding: 12px 18px; border-radius: 12px; font-weight: 600; max-width: calc(100vw - 32px); transition: transform .2s; z-index: 60; }
.dict-toast.dict-on { visibility: visible; transform: translate(-50%, 0); }
.dict-dlg { position: fixed; inset: 0; margin: auto; height: fit-content; max-height: calc(100dvh - 32px); overflow: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); color: var(--text); padding: 20px; width: min(420px, calc(100vw - 32px)); box-sizing: border-box; }
.dict-dlg::backdrop { background: rgba(13, 13, 26, .55); }
.dict-dlg h2 { margin: 0 0 12px; font-size: 19px; }
.dict-dlg label { display: flex; gap: 10px; align-items: center; padding: 10px 4px; border-top: 1px solid var(--border); }
.dict-dlg .dict-row-end { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

/* ============ дополнения: ссылки-слова, ошибки, загрузка, диалоги, объяснение ============ */
.dict-app a.dict-w, .dict-app .dict-tag, .dict-app .dict-brand { text-decoration: none; }
.dict-app .dict-tag { color: var(--text); }
.dict-app a.dict-w { color: inherit; }
.dict-app .dict-notice a, .dict-app .dict-empty a { color: var(--blue-ink); }
.dict-notice.dict-err .dict-i { color: var(--red-ink); }
.dict-btn.dict-sm { min-height: 36px; padding: 0 12px; font-size: 14px; }
.dict-skel { height: 16px; border-radius: 6px; background: var(--dict-surface-2); margin: 10px 0; }
.dict-pending-note { color: var(--text-s); font-size: 15px; }
.dict-hint-line { margin: 8px 0 0; color: var(--text-s); font-size: 14.5px; }
.dict-explain { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: var(--dict-surface-2); font-size: 15.5px; }
.dict-explain h3 { margin: 0 0 6px; font-size: 14px; color: var(--text-s); }
.dict-explain p + p { margin-top: 8px; }
.dict-dlg textarea, .dict-dlg input[type="text"] { width: 100%; padding: 9px 11px; border: 1.5px solid var(--border-strong); border-radius: var(--radius-s); background: var(--bg); color: var(--text); }
.dict-dlg .dict-lbl { display: block; margin: 10px 0 4px; font-size: 14px; color: var(--text-s); }
.dict-dlg input[type="radio"] { width: 20px; height: 20px; accent-color: var(--orange); }
.dict-dlg .dict-msg { margin-top: 8px; font-size: 14.5px; color: var(--text-s); }
.dict-wotd-btn { margin-top: 4px; }
.dict-small { color: var(--text-s); font-size: 14.5px; }
.dict-sec-link { margin-top: 12px; }
@media (prefers-reduced-motion: reduce) {
  .dict-toast { transition: none; }
  .dict-app * { scroll-behavior: auto !important; }
}

.dict-app .dict-field input:focus-visible { outline: none; }
.dict-field:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }

@media (max-width: 640px), (pointer: coarse) {
  .dict-seg button { min-height: 44px; min-width: 44px; }
  .dict-field .dict-icon-btn, .dict-ex .dict-icon-btn { width: 44px; height: 44px; }
  .dict-asr-seg button { min-width: 44px; height: 44px; }
  .dict-btn.dict-exmore { min-height: 44px; }
  .dict-app .dict-tag { min-height: 44px; align-items: center; }
  .dict-pact .dict-btn, .dict-pact .dict-icon-btn { min-height: 44px; }
  .dict-facet > summary { min-height: 44px; }
  .dict-actions .dict-btn { min-height: 44px; }
  .dict-trsay { height: 44px; }
  .dict-skip { min-height: 44px; }
}

/* ============ просмотр темы: заголовок, фильтры, подгрузка ============ */
.dict-tchip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 2px 8px 2px 12px; border: 1px solid var(--dict-de-fill); border-radius: 999px; background: var(--dict-de-bg); color: var(--dict-de-ink); font-weight: 700; font-size: 14px; }
.dict-tchip .dict-i { width: 16px; height: 16px; }
.dict-browse { display: grid; gap: 8px; margin: 0 0 12px; }
.dict-bhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.dict-btitle { font: 800 20px/1.25 var(--font-ui); overflow-wrap: anywhere; }
.dict-btitle small { display: block; margin-top: 2px; font: 600 13px/1.3 var(--font-ui); color: var(--text-s); }
.dict-frow { display: grid; gap: 4px; }
.dict-flab { font-size: 12px; font-weight: 700; color: var(--text-s); }
.dict-fchips { display: flex; flex-wrap: wrap; gap: 6px; }
.dict-fchip { display: inline-flex; align-items: baseline; gap: 5px; min-height: 32px; padding: 4px 11px; border: 1px solid var(--border); border-radius: 999px; background: var(--white); font-size: 14px; }
.dict-fchip:hover { border-color: var(--border-strong); }
.dict-fchip small { font-size: 12px; color: var(--text-s); }
.dict-fchip[aria-pressed="true"] { background: var(--dict-de-bg); color: var(--dict-de-ink); border-color: var(--dict-de-fill); font-weight: 700; }
.dict-fchip[aria-pressed="true"] small { color: inherit; }
.dict-more { text-align: center; padding: 2px 0 18px; }
.dict-more .dict-merr { color: var(--red-ink); font-size: 14px; }
.dict-more .dict-btn[disabled] { opacity: .7; cursor: progress; }
.dict-layout.dict-browsing #side { order: 1; }
.dict-layout.dict-browsing #entry { order: 2; }
.dict-browse[hidden] { display: none; }

/* ============ фаза 6: фасеты-аккордеон, состав слова, частотность, колоды, объяснение, AI-карточка, фраза ============ */
.dict-facet { border-top: 1px solid var(--border); }
.dict-facet > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 2px; }
.dict-facet > summary::-webkit-details-marker { display: none; }
.dict-facet > summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--text-s); border-bottom: 2px solid var(--text-s); transform: rotate(45deg) translateY(-2px); transition: transform .15s; }
.dict-facet[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.dict-facet .dict-fchips { padding: 2px 0 10px; }
.dict-fcur { font-size: 12.5px; font-weight: 700; color: var(--dict-de-ink); background: var(--dict-de-bg); border-radius: 999px; padding: 0 9px; line-height: 1.7; }
.dict-fchip.dict-suball { font-weight: 700; color: var(--blue-ink); }
.dict-cblock { margin: 12px 0; padding: 12px 14px; border-radius: 12px; background: var(--dict-surface-2); text-align: left; }
.dict-chead { margin: 0 0 4px; font-size: 13px; font-weight: 700; color: var(--text-s); }
.dict-cdisp { margin: 0; font: 700 28px/1.25 var(--font-nl); overflow-wrap: anywhere; }
.dict-cdisp .dict-dot { color: var(--orange-ink); margin: 0 3px; }
.dict-app a.dict-cpart { color: var(--dict-de-ink); text-decoration: none; border-bottom: 2px solid var(--dict-de-fill); }
.dict-app a.dict-cpart:hover { background: var(--dict-de-bg); }
.dict-cpart.dict-off { color: var(--text-s); }
.dict-cgloss { list-style: none; margin: 8px 0 0; padding: 0; font-size: 15px; color: var(--text-s); }
.dict-cgloss b { color: var(--text); font-family: var(--font-nl); }
.dict-compound { margin: 10px 0 0; font-size: 15px; color: var(--text-s); }
.dict-compound .dict-cpart { font-family: var(--font-nl); font-weight: 600; }
.dict-freqtop { border: 1px solid var(--border-strong); border-radius: 6px; padding: 0 6px; font-weight: 700; font-size: 12.5px; color: var(--text); }
.dict-exmore { margin-top: 8px; }
.dict-exmore[aria-busy="true"] { cursor: progress; }
.dict-busy .dict-i { opacity: .45; animation: dictpulse 1s ease-in-out infinite; }
@keyframes dictpulse { 50% { opacity: 1; } }
.dict-spin { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; border: 2px solid var(--border-strong); border-top-color: var(--orange); border-radius: 50%; animation: dictspin .8s linear infinite; }
@keyframes dictspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .dict-spin, .dict-busy .dict-i { animation: none; } .dict-facet > summary::after { transition: none; } }
.dict-xbody p + p { margin-top: 6px; }
.dict-xh { margin-top: 10px; font-weight: 800; font-size: 14px; color: var(--text-s); }
.dict-xbody > .dict-xh:first-child { margin-top: 0; }
.dict-explain > summary { cursor: pointer; font-weight: 700; color: var(--blue-ink); }
.dict-dfilter { width: 100%; margin: 4px 0 8px; }
.dict-drec { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 8px; }
.dict-drec[hidden], .dict-dnew[hidden] { display: none; }
.dict-dlist { max-height: min(40dvh, 280px); overflow: auto; }
.dict-dlg .dict-dlist label.dict-has { opacity: .6; }
.dict-dhas { margin-left: auto; font-size: 13px; color: var(--text-s); white-space: nowrap; }
.dict-dnew { margin: 6px 0 0; }
.dict-lprev { margin: 8px 0 0; font-weight: 700; }
.dict-lfilter { margin: 0; color: var(--text-s); font-size: 14.5px; }
.dict-origrow { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; }
.dict-origrow .dict-orig { margin: 0; }
.dict-srcbadge { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 800; }
.dict-srcbadge[hidden] { display: none; }
.dict-src-dict { background: var(--dict-de-bg); color: var(--dict-de-ink); }
.dict-src-ai { background: var(--dict-warn-bg); color: var(--dict-warn-ink); }
.dict-pact { margin: 0 0 16px; align-items: center; }
.dict-thumbs { display: inline-flex; gap: 4px; margin-left: 4px; }
.dict-thumbs .dict-icon-btn { width: 40px; height: 40px; font-size: 18px; }
.dict-thumbs [aria-pressed="true"] { background: var(--dict-de-bg); border-color: var(--dict-de-fill); }
.dict-btn[disabled], .dict-icon-btn[disabled] { opacity: .55; cursor: not-allowed; }
.dict-empty-p[hidden] { display: none; }
.dict-aicard { margin: 18px 0 6px; padding: 14px 16px; border: 1px dashed var(--dict-tr); border-radius: 12px; background: var(--dict-surface-2); text-align: left; color: var(--text); }
.dict-aicard.dict-ai-wait { opacity: .75; }
.dict-aicard.dict-ai-two { display: grid; gap: 14px 24px; }
@media (min-width: 640px) { .dict-aicard.dict-ai-two { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.dict-ai-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--dict-warn-bg); color: var(--dict-warn-ink); font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.dict-ai-w { margin: 8px 0 2px; font: 700 22px var(--font-nl); display: flex; align-items: center; gap: 8px; }
.dict-ai-cyr { margin: 0 0 6px; color: var(--dict-tr); font-weight: 700; }
.dict-ai-cyr .dict-ipa { color: var(--text-s); font-weight: 400; }
.dict-ai-tr { margin: 0 0 8px; font-size: 18px; font-weight: 700; color: var(--dict-tr); }
.dict-ai-ex { margin: 0 0 4px; font-family: var(--font-nl); display: flex; align-items: center; gap: 8px; }
.dict-ai-ex2 { margin: 0 0 10px; color: var(--text-s); }
.dict-ai-msg { margin: 8px 0 0; font-size: 14px; }
.dict-ai-sim { margin: 0; padding: 0; border: 0; }
.dict-aicard .dict-icon-btn { width: 36px; height: 36px; flex: none; }
.dict-ai-sim h3 { margin: 0 0 8px; font-size: 14px; font-weight: 700; color: var(--text-s); }

/* ============ F6-10: подписи пар языков, переключатель микрофона под полем, телефон ============ */
.dict-lblgrp { display: inline-flex; align-items: center; gap: 8px; }
.dict-lbl { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--text-s); white-space: nowrap; }
.dict-lbl .dict-i { width: 16px; height: 16px; }
.dict-subrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-top: 8px; }
.dict-subrow .dict-dir { margin: 0 4px; flex: 1 1 150px; min-width: 0; }
.dict-asr { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.dict-asr[hidden] { display: none; }
.dict-asr-seg { border-color: var(--dict-de-fill); }
.dict-asr-seg button[aria-pressed="true"] { background: var(--dict-de-bg); color: var(--dict-de-ink); box-shadow: inset 0 0 0 2px var(--dict-de-fill); }
.dict-listening .dict-asr-seg { border-color: var(--red-ink); }
.dict-facts .dict-kind { font-style: italic; }
@media (max-width: 480px) {
  .dict-searchrow { padding: 8px 10px 10px; }
  .dict-field { padding-left: 12px; gap: 2px; }
  .dict-lbl { font-size: 12px; }
}
@media (max-width: 640px), (pointer: coarse) {
  .dict-try button { min-height: 44px; }
  .dict-subrow .dict-dir { flex-basis: 100%; }
  .dict-asr { flex: 1 1 auto; justify-content: space-between; }
}
@media (max-width: 768px) {
  .dict-toast { bottom: calc(144px + env(safe-area-inset-bottom, 0px)); }
}

.dict-lvl { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin: 0 0 10px; }
.dict-lvl[hidden] { display: none; }

.dict-toast { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; width: max-content; }
.dict-toast .dict-tbtn { min-height: 32px; padding: 0 4px; border: 0; background: none; color: inherit; font: inherit; font-weight: 800; text-decoration: underline; cursor: pointer; }
