/* Dictionary and reading lookup share the quiet surfaces used across Etch. */
.dictionary-search { display: flex; gap: 10px; margin: 26px 0 12px; }
.dictionary-search input { flex: 1; min-width: 0; width: 100%; border: 1px solid var(--hairline); border-radius: var(--r-md); padding: 14px 16px; background: var(--surface); color: var(--text); font: inherit; }
.dictionary-search input:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.dictionary-welcome { margin: 60px auto; max-width: 36ch; color: var(--text-dim); text-align: center; line-height: 1.7; }
.dictionary-entry-head { margin: 34px 0 28px; padding-bottom: 27px; border-bottom: 1px solid var(--hairline); }
.dictionary-word-title { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; font-size: clamp(3rem, 9vw, 5rem); line-height: 1.08; letter-spacing: -.025em; margin: 0 0 12px; overflow-wrap: anywhere; }
.dictionary-pronunciation, .dictionary-entry-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.dictionary-pronunciation { color: var(--text-dim); font-size: .92rem; }
.dictionary-lead { margin: 18px 0; font-size: 1rem; line-height: 1.75; }
.dictionary-form-note { color: var(--text-dim); font-size: .78rem; margin: 6px 0 0; }
.dictionary-section { margin: 32px 0; }
.dictionary-section > h2 { font-size: .87rem; font-weight: 600; margin: 0 0 16px; }
.dictionary-page-meanings { font-size: .94rem; line-height: 1.8; }
.dictionary-page-meanings .dictionary-language { margin: 32px 0 20px; font-size: .88rem; }
.dictionary-page-meanings .dictionary-group { margin-bottom: 25px; }
.dictionary-page-meanings .dictionary-group h4 { font-size: .8rem; }
.dictionary-example { margin: 0; border-left: 2px solid var(--hairline); padding-left: 18px; color: var(--text); font-size: 1rem; line-height: 1.85; }
.dictionary-example mark { color: inherit; background: none; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.dictionary-forms { margin: 0; }
.dictionary-forms > div { display: flex; justify-content: space-between; gap: 24px; padding: 11px 0; border-bottom: 1px solid var(--hairline); font-size: .86rem; }
.dictionary-forms dt { color: var(--text-dim); }
.dictionary-forms dd { margin: 0; text-align: right; }
.dictionary-related { display: flex; flex-wrap: wrap; gap: 9px; }
.related-word { font: inherit; font-size: .85rem; color: var(--text); background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--pill); padding: 8px 14px; cursor: pointer; }
.word-open { border: 0; padding: 0; background: none; color: inherit; font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.word-open:hover, .related-word:hover { text-decoration: underline; text-underline-offset: 4px; }
.word-open:focus-visible, .related-word:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 3px; }
.reading-word { appearance: none; display: inline; margin: 0; padding: 0; border: 0; border-radius: 3px; background: none; color: inherit; font: inherit; line-height: inherit; letter-spacing: inherit; cursor: pointer; }
.reading-word.target { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); text-underline-offset: 4px; }
.reading-word:hover { background: color-mix(in srgb, var(--text) 7%, transparent); }
.reading-word:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.reading-tap-note { color: var(--text-dim); font-size: .78rem; margin: -5px 0 30px; }
.word-peek { width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); margin: auto; padding: 28px; color: var(--text); background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-lg); box-shadow: 0 24px 80px rgba(0,0,0,.18); }
.word-peek::backdrop { background: rgba(0,0,0,.3); backdrop-filter: blur(5px); }
.word-peek-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.word-peek-title { margin: 0; font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; font-size: 2.7rem; overflow-wrap: anywhere; }
.word-peek-meaning { font-size: 1rem; line-height: 1.7; margin: 22px 0 10px; }
.word-peek-definition { font-size: .85rem; color: var(--text-dim); line-height: 1.7; }
.word-peek-context { margin: 22px 0; padding: 16px 0; border-block: 1px solid var(--hairline); font-size: .85rem; line-height: 1.8; color: var(--text-dim); }
.word-peek-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
@media (max-width: 560px) {
  .dictionary-search { gap: 8px; }
  .dictionary-search input { padding: 12px; }
  .dictionary-search .btn { padding-inline: 14px; }
  .word-peek { padding: 24px; }
  .word-peek-actions .btn { flex: 1; }
}

.dictionary-search .suggest-wrap { align-self: center; }
.dictionary-search input::placeholder { color: var(--text-faint); }

/* Search belongs to the saved bank; Add word remains its compact companion. */
.bank-toolbar { display: flex; align-items: stretch; gap: 12px; margin-top: 28px; }
.bank-search { display: flex; align-items: center; flex: 1; min-width: 0; gap: 10px; padding: 0 14px; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-md); }
.bank-search:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.bank-search-icon { width: 19px; height: 19px; flex-shrink: 0; color: var(--text-faint); }
.bank-search input { width: 100%; min-width: 0; padding: 13px 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: .9rem; }
.bank-search input::placeholder { color: var(--text-faint); }
.bank-toolbar > .add-btn { white-space: nowrap; }
.bank-list-header { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.bank-list-header .section-title { margin: 0; }
.bank-result-count { margin: 0; color: var(--text-dim); font-size: .78rem; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
  .bank-toolbar { flex-wrap: wrap; }
  .bank-search { flex-basis: 100%; }
  .bank-toolbar > .add-btn { margin-left: auto; }
}
