:root{
  /* ألوان أساسية */
  --bg:#f7f3eb;
  --fg:#2a2a2a;
  --muted:#6b6b6b;
  --card:#ffffff;
  --border:#e7e0d4;
  --accent:#3e3833;
  --accent-2:#3e3833;
  --gold:#c59d3a;
  --pill-bg:#f3eee4;
  --shadow:0 8px 24px rgba(0,0,0,.08);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:"Amiri", serif;
  color:var(--fg);
  background:
    radial-gradient(1000px 600px at 80% -20%, rgba(140,29,24,.08) 0%, transparent 60%),
    linear-gradient(180deg, #f9f6ef 0%, var(--bg) 60%);
}

a{color:var(--accent-2); text-decoration:none}
a:hover{color:#a0221b}

.lx-container{max-width:1180px; margin:0 auto; padding:20px}

.lx-hero{
  margin-top:18px;
  padding:26px 24px 22px;
  border:1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255,255,255,.7), rgba(255,255,255,.9)),
    url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 10 10' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23e9e2d6' fill-opacity='0.6'%3E%3Cpath d='M0 0h10v10H0z'/%3E%3C/g%3E%3C/svg%3E") repeat;
  border-radius:18px;
  box-shadow:var(--shadow), inset 0 1px 0 rgba(255,255,255,.65);
  position:relative;
  overflow:hidden;
}
.lx-hero h1{
  margin:0 0 4px;
  font-weight:700;
  font-size:28px;
  letter-spacing:.3px;
  color:#1e1e1e;
}
.lx-count{color:var(--accent); font-weight:700}
.lx-tagline{color:#5d574f; margin-top:4px}

.lx-hero::after{
  content:"";
  display:block;
  height:6px;
  width:140px;
  margin:10px 0 0;
  background:linear-gradient(90deg, var(--gold), rgba(197,157,58,0.1));
  border-radius:4px;
}

.lx-search{margin-top:16px; display:flex; gap:10px}
.lx-search input{
  flex:1; padding:14px 16px; border-radius:12px;
  border:1px solid var(--border); background:#fff; color:#161616; font-size:18px; outline:none;
  box-shadow:inset 0 1px 0 rgba(0,0,0,.02)
}
.lx-search input::placeholder{color:#9f978b}
.lx-search button{
  padding:12px 16px; border-radius:12px; border:0; cursor:pointer;
  font-size:16px; font-weight:700; color:#fff;
  background:linear-gradient(135deg, var(--accent) 0%, #a22821 100%);
  box-shadow:0 6px 16px rgba(140,29,24,.25);
  transition:transform .15s ease, filter .2s ease;
}
.lx-search button:hover{ transform:translateY(-1px); filter:brightness(1.05) }

.lx-letters{display:flex; flex-wrap:wrap; gap:8px; margin:16px 0 4px}
.lx-letters a{
  display:inline-block; padding:7px 10px; border-radius:999px; background:var(--pill-bg);
  border:1px solid var(--border); color:#403a33; font-weight:700; font-size:15px
}
.lx-letters a.active{
  background:linear-gradient(180deg, #fff, #fbfaf7);
  border-color:#d7cbb7; color:var(--accent)
}

.lx-grid{display:grid; grid-template-columns: 1.6fr .9fr; gap:18px; margin-top:14px}
@media (max-width:980px){ .lx-grid{grid-template-columns:1fr} }

.lx-card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:14px;
  padding:14px;
  box-shadow:var(--shadow);
}

.lx-list-row{
  display:flex; justify-content:space-between; gap:8px; padding:10px 0;
  border-bottom:1px dashed #e2d8c8;
}
.lx-list-row:last-child{border-bottom:0}
.lx-term{font-weight:700; color:#1f1f1f; font-size:19px}
.lx-term:hover{color:var(--accent)}
.lx-muted{color:var(--muted); font-size:13px}

.lx-side{position:relative}
@media (min-width:981px){ .lx-side{position:sticky; top:16px} }
.lx-side h3{
  margin:0 0 10px; font-size:16px; color:#3c3c3c; font-weight:700; border-right:4px solid var(--gold); padding-right:8px
}
.lx-side ul{list-style:none; margin:0; padding:0}
.lx-side li{
  display:flex; justify-content:space-between; gap:8px; padding:7px 0; border-bottom:1px dashed #e2d8c8
}
.lx-side li:last-child{border-bottom:0}
.lx-badge{
  background:#faf6ee; border:1px solid #eadfcf; color:#6a5e43; font-size:11px; padding:2px 8px; border-radius:999px
}

.lx-example{
  border:1px solid #eadfcf; border-radius:12px; padding:10px; background:#fffdf9; margin-bottom:10px
}
.lx-example .head{display:flex; align-items:center; gap:8px; margin-bottom:6px}
.lx-example .head .lx-term{color:var(--accent)}
.lx-verse{
  background:#fff; border:1px solid #eadfcf; border-radius:10px; padding:10px; margin-top:8px; line-height:2.1;
  box-shadow: inset 0 1px 0 rgba(0,0,0,.02);
}
.lx-verse mark{
  background:#fff1b1; color:#553f12; padding:0 .2em; border-radius:.2em
}

.lx-entry{
  border:1px solid #eadfcf; border-radius:12px; padding:12px; margin-bottom:12px; background:#fff
}
.lx-entry .head{display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin-bottom:6px; color:#6a6358}
.lx-entry .word{font-weight:700; color:#1f1f1f}
.lx-entry .meaning{white-space:pre-wrap; margin-top:6px; color:#2d2d2d}
.lx-entry .lx-verse{border-style:solid}

.lx-filters{display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:10px; margin:10px 0}
.lx-filters input, .lx-filters button{
  padding:10px 12px; border-radius:10px; border:1px solid var(--border); background:#fff; color:#222
}
.lx-filters button{
  border:0; font-weight:700; background:linear-gradient(135deg, var(--gold), #e7c46a); color:#4b3b15; cursor:pointer
}

/* Pager */
.lx-pager{margin-top:12px}
.lx-pager .pagination{display:flex; gap:6px; flex-wrap:wrap}
.lx-pager .pagination > *{
  background:#fff; border:1px solid var(--border); color:#333; padding:6px 10px; border-radius:10px
}

::selection{ background:#ffe39a; color:#3a2c0e }
.lx-card h3 + .lx-muted{margin-top:-6px}


.lx-entry .lx-quote-label{
  margin-top:6px; font-weight:700; color:#8c1d18; font-size:16px;
  position:relative; padding-inline-start:28px; line-height:1.8;
}
.lx-entry .lx-quote-label::before{
  content:""; position:absolute; inset-inline-start:0; top:2px;
  width:18px; height:18px;
  background:url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 24 24' fill='%238c1d18' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M21 3c-5 1-9.5 5.5-10.8 9.4l-.6 1.9 1.9-.6C15.4 12.5 20 8 21 3zM4 20l5-1-4-4-1 5z'/%3E%3C/svg%3E") no-repeat center/contain;
  opacity:.9;
}
.lx-entry .lx-quote-label::after{
  content:""; display:block; height:2px; margin-top:6px; width:160px;
  background:linear-gradient(90deg, rgba(197,157,58,0), rgba(197,157,58,.95), rgba(197,157,58,0));
  border-radius:2px;
}

.lx-entry .lx-quote{
  border:1px solid #eadfcf; background:#fff; border-radius:10px;
  padding:12px 14px; margin-top:8px; margin-bottom:16px;
  box-shadow: inset 0 1px 0 rgba(0,0,0,.02);
}
.lx-entry .lx-hemistich{
  display:block; line-height:2.1; font-size:19px; color:#1f1f1f;
}
.lx-entry .lx-hemistich + .lx-hemistich{
  border-top:1px dashed #eadfcf; margin-top:8px; padding-top:8px;
}
.lx-entry .lx-quote mark{
  background:#fff1b1; color:#553f12; padding:0 .2em; border-radius:.2em;
}

.lx-entry .lx-sep{
  margin:14px 0; height:1px;
  background:linear-gradient(90deg, rgba(197,157,58,0), rgba(197,157,58,.9), rgba(197,157,58,0));
  border-radius:1px;
}

.lx-entry .lx-word-tag{
  display:inline-block; margin:12px 0 10px;
  background:#fffdf7; border:1px solid #eadfcf; border-radius:999px;
  padding:8px 14px; font-weight:700; color:#5a0f0b; font-size:20px;
  box-shadow:0 1px 0 rgba(0,0,0,.02);
}

.lx-entry .lx-definition{
  margin-top:8px; margin-bottom:18px;
  color:#2d2d2d; white-space:pre-wrap; font-size:19px; line-height:2;
}

.lx-entry .lx-meta{
  margin-top:16px; padding-top:12px; color:#6a6358; font-size:13px;
  border-top:1px dashed #eadfcf;
}
.lx-entry .lx-meta a{ color:#8c1d18; }

.lx-topbar{
  width:100%;
  background:#fff;
  border-bottom:1px solid #e7e0d4;
  box-shadow:0 6px 16px rgba(0,0,0,.05);
}
.lx-bar-in{
  max-width:1180px;
  margin:0 auto;
  padding:10px 20px;
  display:flex;
  align-items:center;
  gap:20px;
}
.lx-logo{
  display:flex; align-items:center; gap:10px;
  color:#8c1d18; font-weight:700; font-size:18px; text-decoration:none;
}
.lx-logo img{ width:34px; height:34px; object-fit:contain }
.lx-logo span{ color:#8c1d18 }

.lx-nav{
  display:flex; flex-wrap:wrap; gap:8px;
  margin-inline-start:auto;
}
.lx-nav a{
  display:inline-block;
  padding:8px 12px;
  border:1px solid #eadfcf;
  background:#fff;
  color:#4b3b15;
  border-radius:999px;
  font-weight:700;
  font-size:14px;
  text-decoration:none;
}
.lx-nav a:hover{
  background:#fffdf7;
  color:#8c1d18;
}
.lx-nav a.active{
  background:#fff8e6; border-color:#e8d6b7; color:#8c1d18;
}

.lx-topbar.sticky{ position:sticky; top:0; z-index:1000 }
body.has-sticky .lx-container{ padding-top:8px }

.lx-footer{
  width:100%;
  background:#fff;
  border-top:1px solid #e7e0d4;
  margin-top:22px;
}
.lx-footer-in{
  max-width:1180px;
  margin:0 auto;
  padding:14px 20px;
  display:flex; align-items:center; gap:12px;
}
.lx-copy{ color:#6a6358; font-size:14px }
.lx-footnav{
  display:flex; flex-wrap:wrap; gap:10px;
  margin-inline-start:auto;
}
.lx-footnav a{
  color:#6a6358; font-size:14px; border-bottom:1px dashed transparent; padding-bottom:2px; text-decoration:none;
}
.lx-footnav a:hover{
  color:#8c1d18; border-bottom-color:#e3d6c2;
}

@media (max-width: 640px){
  .lx-bar-in, .lx-footer-in{ padding:10px 12px }
  .lx-nav{ gap:6px }
  .lx-nav a{ font-size:13px; padding:7px 10px }
  .lx-copy, .lx-footnav a{ font-size:13px }
}

.lx-logo img{
  width:100px; 
  height:56px; 
  display:block; 
}

.lx-bar-in{ padding:12px 20px; }

@media (max-width:640px){
  .lx-logo img{ width:36px; height:36px; }
  
}

.lx-logo img{
  width:var(--logo-size, 100px);
  height:var(--logo-size, 40px);
  display:block;
}
.lx-brand-text{
  font-weight:700; color:#8c1d18; font-size:20px;
}

.lx-burger{
  display:none;
  border:1px solid #eadfcf; background:#fff; border-radius:10px;
  padding:6px; margin-inline-start:auto; cursor:pointer;
}
.lx-burger:hover{ background:#fffdf7 }
@media (max-width: 980px){
  .lx-nav{ display:none } 
  .lx-burger{ display:inline-flex; align-items:center; justify-content:center }
}

.lx-backdrop{
  position:fixed; inset:0; background:rgba(0,0,0,.35);
  opacity:0; pointer-events:none; transition:opacity .2s ease; z-index:1000;
}
.lx-backdrop.show{ opacity:1; pointer-events:auto }

.lx-drawer{
  position:fixed; top:0; bottom:0; inset-inline-start:auto; inset-inline-end:0;
  width:280px; max-width:85vw; background:#fff;
  border-left:1px solid #e7e0d4; box-shadow: -8px 0 18px rgba(0,0,0,.06);
  transform:translateX(100%); transition:transform .25s ease; z-index:1001;
  padding:14px;
}
.lx-drawer.open{ transform:translateX(0) }
.lx-drawer-header{
  display:flex; align-items:center; justify-content:space-between;
  padding:6px 2px 10px; border-bottom:1px dashed #eadfcf; margin-bottom:8px; color:#4b3b15; font-weight:700
}
.lx-drawer a{
  display:block; padding:10px 8px; color:#4b3b15; border-bottom:1px dashed #eadfcf; text-decoration:none;
}
.lx-drawer a:hover{ background:#fffdf7; color:#8c1d18 }
.lx-drawer-close{
  border:1px solid #eadfcf; background:#fff; border-radius:8px; padding:4px 8px; cursor:pointer
}

.lx-search{
  display:grid; grid-template-columns: 1fr 120px; gap:10px; align-items:center; margin-top:16px;
}
.lx-search input{ width:100% }
.lx-search button{ width:100% }
@media (max-width: 640px){
  .lx-search{ grid-template-columns: 1fr; }
  .lx-search button{ width:100% }
}

body .lx-topbar .lx-burger.only-mobile{ display:none !important; }
body .lx-topbar .lx-nav{ display:flex !important; } 

@media (max-width:980px){
  body .lx-topbar .lx-burger.only-mobile{ display:inline-flex !important; }
  body .lx-topbar .lx-nav{ display:none !important; }
}

@media (min-width:981px){
  body .lx-topbar .lx-burger.only-mobile{ display:none !important; }
  body .lx-topbar .lx-nav{ display:flex !important; }
}

.lx-quote.poem-stacked .lx-hemistich:first-child{
  text-align: right !important;
  margin-inline: 0 !important;
}

.lx-quote.poem-stacked .lx-hemistich:last-child{
  text-align: center !important;
  margin-inline: auto !important;
  max-width: 95%;
}

.lx-topbar.sticky{ position: fixed; top: 0; left: 0; right: 0; z-index: 1002; }

body.has-sticky .lx-container{ padding-top: 110px; }

.lx-topbar{ z-index: 20000 !important; }
.lx-backdrop{ z-index: 30000 !important; }
.lx-drawer{
  z-index: 31000 !important;
  position: fixed;
  top: 0; bottom: 0; inset-inline-end: 0;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
}

