html[data-view="words"] body #page-hero.page-hero{
  width:auto;
  max-width:none;
  margin:14px 18px 0;
  border-radius:22px;
}
#word-library{padding:8px 18px 48px}
.word-library-toolbar{
  display:grid;
  gap:14px;
  margin:0 0 20px;
  padding:20px 22px 18px;
  border:1px solid rgba(196,208,230,.9);
  border-radius:24px;
  background:
    radial-gradient(900px 160px at 0% -30%, rgba(255,200,73,.22), transparent 58%),
    radial-gradient(700px 140px at 100% 120%, rgba(18,58,207,.08), transparent 55%),
    linear-gradient(180deg,#ffffff 0%,#f6f8ff 100%);
  box-shadow:0 16px 36px rgba(17,35,73,.08),0 2px 8px rgba(17,35,73,.04);
}
.word-search-kicker{
  font-size:12px;
  font-weight:800;
  letter-spacing:.06em;
  color:var(--blue-deep);
}
.word-search-main{
  display:grid;
  grid-template-columns:minmax(0,1.8fr) minmax(210px,.95fr) auto;
  gap:10px;
  align-items:stretch;
}
.word-search-field{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:54px;
  padding:0 16px;
  border:1px solid #d5def0;
  border-radius:16px;
  background:#fff;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9),0 10px 22px rgba(18,58,207,.07);
}
.word-search-field:focus-within{
  border-color:var(--blue);
  box-shadow:0 0 0 4px rgba(18,58,207,.12);
}
.word-search-icon{
  width:22px;
  height:22px;
  color:var(--blue);
  flex-shrink:0;
}
.word-search-field input{
  width:100%;
  border:0;
  background:transparent;
  padding:14px 0;
  outline:none;
  font-size:16px;
}
.word-library-toolbar select{
  width:100%;
  min-height:54px;
  border:1px solid #d5def0;
  border-radius:16px;
  padding:0 14px;
  background:#fff;
  box-shadow:0 8px 18px rgba(17,35,73,.05);
}
.word-search-extras{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}
.word-search-extras select{
  width:auto;
  min-width:168px;
  min-height:44px;
  border-radius:14px;
}
#word-search-go{
  min-height:54px;
  padding:0 22px;
  border-radius:16px;
  font-weight:800;
  box-shadow:0 12px 24px rgba(18,58,207,.18);
}
.word-library-toolbar .check-label{
  display:inline-flex;
  gap:8px;
  align-items:center;
  justify-content:flex-start;
  min-height:44px;
  padding:0 12px;
  border:1px solid #e1e6f0;
  border-radius:14px;
  background:rgba(255,255,255,.72);
}
.word-library-note{
  margin:0;
  color:var(--muted);
  font-size:13px;
}
.word-library-heading{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:end;
  margin:8px 0 14px;
}
.word-library-heading h2{margin:0}
#word-library-count{margin:0;color:var(--muted)}
#word-alphabet{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin:0 0 16px;
}
#word-library .letter-all,
.word-category-letters .letter-all{
  width:auto;
  min-width:92px;
  padding:0 12px;
  font:700 13px Tahoma,Arial,sans-serif;
  direction:rtl;
}
.word-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(240px,1fr));
  gap:14px;
}
.word-card{
  background:#fff;
  border:1px solid rgba(196,208,230,.85);
  border-radius:18px;
  padding:16px;
  display:grid;
  gap:10px;
  box-shadow:0 12px 28px rgba(17,35,73,.08),0 2px 8px rgba(17,35,73,.04);
}
.word-card-top{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.word-lemma{
  font-family:var(--font-tr),Montserrat,sans-serif;
  font-size:26px;
  color:var(--navy);
}
.word-pos,.word-poly,.word-usage,.word-domain{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:3px 9px;
  background:#eef2ff;
  color:var(--blue-deep);
  font-size:12px;
}
.word-poly{background:#fff4d6;color:#7a4b00}
.word-senses{display:flex;flex-wrap:wrap;gap:6px;margin:0}
.word-sense-chip{background:#f3f6fc;border-radius:10px;padding:4px 8px}
.word-card-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.word-speak{
  width:42px;
  height:42px;
  padding:0;
  border:1px solid #d7e0f4;
  border-radius:50%;
  background:linear-gradient(180deg,#f7f9ff 0%,#eef3ff 100%);
  color:var(--blue);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 6px 14px rgba(18,58,207,.12);
}
.word-speak:hover{
  background:var(--blue);
  color:#fff;
  border-color:var(--blue);
}
.word-speak-icon{width:20px;height:20px;display:block}
.word-star{
  width:42px;
  height:42px;
  color:#c4a035;
  background:#fffaf0;
  border:1px solid #f0e0a8;
  border-radius:50%;
  box-shadow:0 6px 14px rgba(196,160,53,.12);
}
.word-star svg{
  width:20px;
  height:20px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.7;
  stroke-linejoin:round;
}
#word-library .word-star.saved,
#saved-words-panel .word-star.saved{
  color:#b8860b;
  background:#fff3c4;
  border-color:#f0d47a;
}
#word-library .word-star.saved svg,
#saved-words-panel .word-star.saved svg{
  fill:var(--gold);
  stroke:#e0a61a;
}
.saved-words-panel{
  margin:0 0 22px;
  padding:18px 18px 16px;
  background:#fff;
  border:1px solid rgba(196,208,230,.85);
  border-radius:22px;
  box-shadow:0 12px 28px rgba(17,35,73,.08);
}
.saved-words-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:end;
  margin:0 0 14px;
}
.saved-words-head h3{margin:0;font-size:20px}
.saved-words-head p{margin:4px 0 0;color:var(--muted);font-size:13px}
html:not([data-view="saved"]) #saved-words-panel{display:none!important}
.word-back{
  display:inline-flex;
  align-items:center;
  gap:10px;
  width:fit-content;
  min-height:46px;
  margin:0 0 4px;
  padding:10px 18px;
  border:0;
  border-radius:14px;
  background:#13275c;
  color:#fff;
  font-size:15px;
  font-weight:700;
  box-shadow:0 12px 24px rgba(19,39,92,.22);
}
.word-back:hover{background:#1b3a8a}
.word-back span{font-size:18px;line-height:1}
.word-detail{
  background:#fff;
  border:1px solid var(--line);
  border-radius:22px;
  padding:22px;
  display:grid;
  gap:16px;
  box-shadow:0 14px 32px rgba(17,35,73,.08);
}
.word-detail-head h2{
  margin:6px 0 0;
  font-family:var(--font-tr),Montserrat,sans-serif;
  font-size:40px;
  direction:ltr;
}
.word-sense{border-top:1px solid var(--line);padding-top:14px;display:grid;gap:8px;text-align:start}
.word-detail-head{display:grid;gap:8px}
.word-sense header{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.word-ex{margin:0;font-size:18px;font-family:var(--font-tr),Montserrat,sans-serif}
.word-ex-ar,.word-note{margin:0;color:var(--muted)}
.word-rels{display:grid;gap:8px}
.word-rel{
  display:grid;
  gap:2px;
  padding:10px 12px;
  border-radius:12px;
  background:#f7f3ea;
  color:inherit;
}
.word-rel b{font-family:var(--font-tr),Montserrat,sans-serif;font-size:18px}
.word-forms ul{margin:0;padding:0;list-style:none;display:grid;gap:8px}
.word-forms li{display:grid;gap:2px}
html[data-view="words"] #workspace{display:none!important}
html:not([data-view="words"]) #word-library{display:none!important}
.word-category-gallery{margin:0 0 22px}
.word-category-head{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:end;
  margin:4px 0 16px;
}
.word-category-head h3{margin:0 0 4px;font-size:22px}
.word-category-head p{margin:0;color:var(--muted);max-width:640px;font-size:14px}
.word-category-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:16px;
}
.word-category-card{
  display:block;
  padding:0 0 16px;
  overflow:hidden;
  text-align:start;
  background:#fff;
  border:1px solid rgba(196,208,230,.7);
  border-radius:22px;
  box-shadow:0 14px 32px rgba(17,35,73,.10),0 3px 10px rgba(17,35,73,.05);
  cursor:pointer;
  color:inherit;
  font:inherit;
  transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;
}
.word-category-card:hover{
  transform:translateY(-4px);
  border-color:#c5d3ea;
  box-shadow:0 20px 40px rgba(17,35,73,.16),0 6px 14px rgba(17,35,73,.07);
}
.word-category-media{display:block;aspect-ratio:5/4;overflow:hidden;background:#eef1f5}
.word-category-media img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .35s ease}
.word-category-card:hover .word-category-media img{transform:scale(1.035)}
.word-category-copy{display:grid;gap:4px;padding:14px 16px 0}
.word-category-copy b{font-size:16px;color:var(--navy)}
.word-category-copy small{color:var(--muted);font-size:12px;line-height:1.7}
.word-category-copy em{font-style:normal;color:var(--blue-deep);font-size:12px}
.word-category-letters{margin:0 0 16px}
.word-category-banner{
  display:grid;
  gap:12px;
  background:transparent;
  border:0;
  border-radius:0;
  overflow:visible;
  margin:0 0 18px;
  padding:0;
}
.word-category-banner-body{
  display:grid;
  grid-template-columns:220px 1fr;
  gap:18px;
  align-items:center;
  background:#fff;
  border:1px solid rgba(196,208,230,.7);
  border-radius:22px;
  overflow:hidden;
  padding:0 18px 0 0;
  box-shadow:0 14px 32px rgba(17,35,73,.10);
}
.word-category-banner-media{aspect-ratio:5/4;overflow:hidden;background:#eef1f5}
.word-category-banner-media img{display:block;width:100%;height:100%;object-fit:cover}
.word-category-banner-copy{padding:8px 0 16px}
.word-category-kicker{display:block;color:var(--muted);font-size:12px;margin-bottom:4px}
.word-category-banner-copy h3{margin:0 0 6px;font-size:28px}
.word-category-banner-copy p{margin:0 0 8px;color:var(--muted)}
a.word-domain{text-decoration:none}
@media(max-width:1180px){
  .word-category-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(max-width:900px){
  .word-category-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:980px){
  html[data-view="words"] body #page-hero.page-hero{margin-inline:14px}
  #word-library{padding-inline:14px}
}
@media(max-width:760px){
  html[data-view="words"] body #page-hero.page-hero{margin-inline:12px;border-radius:16px}
  #word-library{padding-inline:12px}
  .word-search-main{grid-template-columns:1fr}
  #word-search-go{width:100%}
  .word-search-extras select{width:100%}
  .word-detail-head h2{font-size:32px}
  .word-lemma{font-size:22px}
  .word-category-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .word-category-banner-body{grid-template-columns:1fr;padding:0}
  .word-category-banner-copy{padding:4px 16px 16px}
  html body .header nav{flex-wrap:wrap;justify-content:flex-start;row-gap:4px}
}
@media(prefers-reduced-motion:reduce){
  .word-category-card,.word-category-media img{transition:none}
  .word-category-card:hover{transform:none}
  .word-category-card:hover .word-category-media img{transform:none}
}
.word-sentences{margin-block-start:28px;border-top:1px solid var(--border,#dbe2eb);padding-block-start:20px;min-width:0}
.word-sentence-levels{display:flex;flex-wrap:wrap;gap:8px}
.word-sentence-levels button{display:inline-flex;gap:8px;align-items:center;padding:8px 12px;border:1px solid var(--border,#cbd5e1);border-radius:12px;background:var(--surface,#fff);color:inherit;cursor:pointer}
.word-sentence-levels button[aria-pressed="true"]{background:var(--brand,#174b83);color:#fff}
.word-sentence-levels button span{font-size:12px;opacity:.8}
.word-sentence-count,.word-sentence-empty{color:var(--muted);line-height:1.8}
.word-sentence-list{display:grid;gap:14px}
.word-sentence-card{min-width:0;overflow-wrap:anywhere}
.word-sentence-card .card-meta{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.word-sentence-card .sentence{font-size:20px;line-height:1.8;margin-block:12px}
.word-sentence-card .translation{line-height:1.9}
.word-sentence-pagination{display:flex;flex-wrap:wrap;gap:16px;align-items:center;justify-content:center;margin-block:20px}
.word-sentence-pagination button{min-height:42px;padding-inline:18px}
.word-sentences [aria-busy="true"]{opacity:.7}
.word-speak.is-speaking{background:#185aa6;color:#fff;box-shadow:0 0 0 3px #185aa622}.word-audio-note,#word-audio-status{font-size:.85rem;line-height:1.8;color:#53657d;overflow-wrap:anywhere}#word-audio-status:empty{display:none}
