.letter-main { width: 100%; min-height: 55vh; margin: 0; padding: 0 0 36px; }
.letter-hero { width: 100%; position: relative; overflow: hidden; min-height: 400px; border-bottom: 1px solid #d7e8f8; background: linear-gradient(108deg, #e8f4ff 0%, #f1f8ff 55%, #dcedff 100%); }
.letter-hero__shell { position: relative; display: grid; grid-template-columns: minmax(0, 38fr) minmax(0, 62fr); align-items: stretch; gap: 30px; width: min(1500px, calc(100% - 48px)); min-height: 400px; margin: 0 auto; padding-inline: 0; box-sizing: border-box; }
.letter-breadcrumb { position: absolute; top: 20px; left: 0; z-index: 2; display: flex; align-items: center; gap: 10px; color: #6380a1; font-size: .8rem; }
.letter-breadcrumb a { color: #315b87; text-decoration: none; }
.letter-breadcrumb a:hover { color: #075fc8; text-decoration: underline; }
.letter-breadcrumb [aria-current="page"] { color: #607795; }
.letter-hero__content { position: relative; z-index: 1; width: 100%; max-width: 620px; min-width: 0; align-self: center; padding: 70px 0 30px; }
.letter-hero-badge { display: inline-flex; min-height: 27px; align-items: center; padding: 3px 12px; border-radius: 9px; background: #d7eaff; color: #1766bd; font-size: .72rem; font-weight: 800; letter-spacing: .065em; text-transform: uppercase; }
.letter-hero h1 { margin: 10px 0 6px; color: #102858; font: 700 clamp(2.35rem, 5.1vw, 3.55rem)/1.06 "Segoe UI", Arial, sans-serif; letter-spacing: -.045em; }
.letter-hero__content > p { max-width: 590px; margin: 0; color: #4f6e92; font-size: .97rem; line-height: 1.5; }
.letter-hero__media { width: 100%; min-width: 0; min-height: 400px; height: 100%; overflow: hidden; border: 1px solid rgba(255,255,255,.75); border-radius: 24px; background: #dceafa; box-shadow: 0 14px 35px rgba(24,61,106,.13); }
.letter-hero__image { display: block; width: 100%; height: 100%; min-height: 400px; object-fit: cover; object-position: center right; }
.letter-content { width: min(1120px, calc(100% - 40px)); margin: 21px auto 0; }
.letter-search-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(250px, 1.12fr); gap: 16px; margin-bottom: 20px; }
.letter-search, .letter-result-count { display: flex; min-width: 0; min-height: 66px; align-items: center; gap: 13px; padding: 8px 11px; border: 1px solid #dce9f7; border-radius: 12px; background: #fff; box-shadow: 0 5px 17px rgba(35,77,125,.045); }
.letter-search:focus-within { outline: 3px solid #bfdbff; outline-offset: 2px; }
.letter-search > span { padding-left: 3px; color: #1769d2; font-size: 1.8rem; line-height: 1; }
.letter-search input { width: 100%; min-width: 0; height: 46px; border: 0; outline: 0; color: #17365f; font: inherit; font-size: .91rem; }
.letter-search input::placeholder { color: #7b8fa9; opacity: 1; }
.letter-search button { flex: 0 0 auto; min-height: 46px; padding: 0 22px; border: 0; border-radius: 9px; background: #1264d8; color: #fff; font-size: .86rem; font-weight: 700; }
.letter-search button:hover { background: #0b55bb; }
.letter-result-count { padding-inline: 17px; }
.letter-result-count > span { display: grid; width: 43px; height: 43px; flex: 0 0 auto; place-items: center; border-radius: 12px; background: #e8f2ff; color: #1769d2; font-size: 1.3rem; }
.letter-result-count div { display: grid; gap: 3px; }
.letter-result-count strong { color: #172e53; font-size: 1rem; }
.letter-result-count small { color: #7188a4; font-size: .8rem; }
.letter-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 18px; }
.letter-category-filters { display: flex; min-width: 0; align-items: center; gap: 8px; overflow-x: auto; padding: 3px 1px 7px; scrollbar-width: thin; }
.letter-filter-chip { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 4px; min-height: 37px; padding: 0 15px; border: 1px solid #dce8f5; border-radius: 99px; background: #f1f7fd; color: #3f5f82; font-size: .79rem; text-decoration: none; transition: background .16s ease, border-color .16s ease, color .16s ease; }
.letter-filter-chip span { color: inherit; opacity: .7; }
.letter-filter-chip:hover { border-color: #9fc5f3; color: #075fc8; }
.letter-filter-chip.is-selected { border-color: #1264d8; background: #1264d8; color: #fff; }
.letter-sort { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; color: #7187a1; font-size: .8rem; }
.letter-sort strong { display: inline-flex; min-height: 40px; align-items: center; gap: 9px; padding: 0 12px; border: 1px solid #dce8f5; border-radius: 9px; background: #fff; color: #27466e; font-size: .78rem; font-weight: 550; }
.letter-sort strong span { color: #286dbd; font-size: 1rem; }
.letter-word-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.letter-word-card { display: flex; min-width: 0; min-height: 214px; flex-direction: column; padding: 19px 20px 16px; border: 1px solid #dce8f5; border-radius: 12px; background: #fff; box-shadow: 0 5px 16px rgba(29,70,117,.045); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.letter-word-card:hover, .letter-word-card:focus-within { transform: translateY(-3px); border-color: #a9cdf6; box-shadow: 0 12px 24px rgba(29,83,145,.11); }
.letter-word-category { align-self: flex-start; max-width: 100%; overflow: hidden; padding: 4px 11px; border-radius: 9px; background: #e4f0ff; color: #145eaf; font-size: .72rem; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.letter-word-card h2 { margin: 12px 0 5px; color: #172e53; font: 700 1.4rem/1.18 "Segoe UI", Arial, sans-serif; letter-spacing: -.025em; }
.letter-word-card h2 a { color: inherit; text-decoration: none; }
.letter-word-card h2 a:hover { color: #075fc8; }
.letter-word-card p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; margin: 0 0 14px; color: #657e9b; font-size: .88rem; line-height: 1.48; }
.letter-word-link { display: inline-flex; align-items: center; gap: 8px; width: fit-content; margin-top: auto; color: #075fc8; font-size: .87rem; font-weight: 700; text-decoration: none; }
.letter-word-link:hover { gap: 12px; text-decoration: underline; }
.letter-word-link span { font-size: 1.15rem; line-height: 1; transition: transform .16s ease; }
.letter-pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 26px; padding: 16px 0 2px; border-top: 1px solid #dce8f5; }
.letter-page-control, .letter-page-number { display: inline-flex; min-width: 39px; min-height: 40px; align-items: center; justify-content: center; gap: 8px; padding: 0 12px; border: 1px solid #dce8f5; border-radius: 8px; background: #fff; color: #42668e; font-size: .8rem; text-decoration: none; }
.letter-page-control:hover, .letter-page-number:hover { border-color: #a7caf3; background: #f1f7ff; color: #075fc8; }
.letter-page-control.is-disabled { background: #f5f9fd; color: #a6b8cc; }
.letter-page-numbers { display: flex; align-items: center; gap: 7px; }
.letter-page-number.is-current { border-color: #1264d8; background: #1264d8; color: #fff; }
.letter-page-ellipsis { color: #7187a1; }
.letter-empty-state { display: grid; justify-items: center; padding: 45px 20px; border: 1px dashed #c8dced; border-radius: 14px; background: #f8fbff; text-align: center; }
.letter-empty-state > span { display: grid; width: 53px; height: 53px; place-items: center; border-radius: 15px; background: #e8f2ff; color: #1769d2; font-size: 2rem; }
.letter-empty-state h2 { margin: 15px 0 5px; color: #17365f; font: 700 1.15rem/1.35 "Segoe UI", Arial, sans-serif; }
.letter-empty-state p { margin: 0 0 11px; color: #7086a0; font-size: .86rem; }
.letter-empty-state a { color: #075fc8; font-size: .85rem; font-weight: 700; text-decoration: none; }
.letter-empty-state a:hover { text-decoration: underline; }

@media (max-width: 1050px) {
  .letter-hero__shell, .letter-content { width: min(100% - 36px, 1200px); }
  .letter-hero__shell { gap: 20px; }
  .letter-search-row { grid-template-columns: minmax(0, 1.7fr) minmax(220px, 1fr); }
  .letter-toolbar { align-items: flex-start; flex-direction: column; gap: 8px; }
  .letter-sort { align-self: flex-end; }
}
@media (max-width: 767.98px) {
  .letter-hero { min-height: 0; }
  .letter-hero__shell { width: min(100% - 28px, 620px); min-height: 0; grid-template-columns: minmax(0, 1fr); gap: 16px; padding-inline: 14px; padding-block: 0 20px; }
  .letter-hero__content { width: 100%; padding: 69px 0 0; }
  .letter-hero h1 { max-width: 520px; font-size: clamp(2.3rem, 8vw, 3.25rem); }
  .letter-hero__content > p { max-width: 430px; font-size: .9rem; }
  .letter-hero__media { width: 100%; min-height: 220px; height: 220px; border-radius: 14px; }
  .letter-hero__image { min-height: 0; height: 100%; object-fit: cover; }
  .letter-content { width: min(100% - 28px, 620px); margin-top: 15px; }
  .letter-search-row { grid-template-columns: 1fr; gap: 9px; }
  .letter-result-count { min-height: 58px; }
  .letter-toolbar { margin-bottom: 11px; }
  .letter-category-filters { width: 100%; }
  .letter-sort { align-self: flex-start; }
  .letter-word-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .letter-word-card { min-height: 198px; padding: 15px; }
  .letter-word-card h2 { font-size: 1.18rem; }
  .letter-word-card p { font-size: .81rem; }
}
@media (max-width: 479.98px) {
  .letter-hero__shell { gap: 13px; }
  .letter-hero__shell, .letter-content { width: calc(100% - 24px); }
  .letter-hero__shell { padding-inline: 12px; }
  .letter-breadcrumb { top: 14px; gap: 7px; font-size: .73rem; }
  .letter-hero__content { padding-top: 61px; }
  .letter-hero h1 { font-size: clamp(2.05rem, 9.4vw, 2.8rem); }
  .letter-hero__content > p { max-width: 96%; font-size: .84rem; }
  .letter-search { gap: 7px; padding: 7px; }
  .letter-search > span { font-size: 1.5rem; }
  .letter-search input { font-size: .77rem; }
  .letter-search button { min-height: 42px; padding-inline: 10px; font-size: .74rem; }
  .letter-result-count { padding-inline: 12px; }
  .letter-category-filters { gap: 6px; }
  .letter-filter-chip { min-height: 34px; padding-inline: 12px; font-size: .74rem; }
  .letter-sort { flex-wrap: wrap; gap: 6px; font-size: .74rem; }
  .letter-sort strong { min-height: 35px; font-size: .73rem; }
  .letter-word-grid { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .letter-word-card { min-height: 175px; padding: 16px; }
  .letter-word-card h2 { font-size: 1.22rem; }
  .letter-pagination { gap: 7px; margin-top: 18px; }
  .letter-page-control { gap: 5px; padding-inline: 8px; font-size: .72rem; }
  .letter-page-number { min-width: 34px; min-height: 36px; padding-inline: 8px; }
  .letter-page-numbers { gap: 4px; }
}



