:root{--bg:#f4f1ea;--paper:#fffdf8;--ink:#182521;--muted:#72807b;--line:#dddcd4;--teal:#174c45;--teal2:#21665d;--gold:#c6a66a;--soft:#e7eee9;--danger:#9c3e36;--shadow:0 18px 55px rgba(28,48,42,.09)}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:Tajawal,"Noto Sans Arabic","Segoe UI",Arial,sans-serif}.app-shell{min-height:100vh}.sidebar{position:fixed;right:0;top:0;bottom:0;width:272px;background:linear-gradient(180deg,#153e39,#0f312e);color:#fff;padding:28px 18px 18px;display:flex;flex-direction:column;z-index:20;box-shadow:-10px 0 40px rgba(18,46,42,.12)}.brand{display:flex;align-items:center;gap:13px;padding:4px 10px 27px;border-bottom:1px solid rgba(255,255,255,.12)}.brand-mark{width:48px;height:48px;border:1px solid rgba(255,255,255,.45);border-radius:15px;display:grid;place-items:center;font-family:Georgia,serif;font-size:29px;background:rgba(255,255,255,.07)}.brand h1{font-size:25px;margin:0;letter-spacing:.2px}.brand p{font-size:11px;margin:4px 0 0;color:#b9cbc6}.sidebar nav{display:flex;flex-direction:column;gap:7px;margin-top:24px}.nav-item{border:0;color:#cde0da;background:transparent;border-radius:14px;padding:13px 14px;display:flex;gap:13px;align-items:center;text-align:right;font-family:inherit;cursor:pointer;transition:.18s;font-size:14px}.nav-item span{width:28px;height:28px;border-radius:9px;display:grid;place-items:center;background:rgba(255,255,255,.06);font-weight:700}.nav-item:hover{background:rgba(255,255,255,.07);color:#fff}.nav-item.active{background:#f6f2e8;color:#173e39;box-shadow:0 7px 20px rgba(0,0,0,.12)}.nav-item.active span{background:#dce8e2}.nav-sep{height:1px;background:rgba(255,255,255,.12);margin:10px 10px}.sidebar-foot{margin-top:auto;padding:18px 10px 2px;color:#a9c1bb}.edition-pill{display:inline-block;padding:6px 9px;border:1px solid rgba(255,255,255,.24);border-radius:8px;font:700 9px/1 Arial;letter-spacing:1.5px;margin-bottom:7px}.sidebar-foot small{display:block;font-size:10px}.main{margin-right:272px;min-height:100vh;padding:28px 38px 48px}.topbar{height:78px;display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:24px}.eyebrow{font-size:10px;font-weight:800;letter-spacing:.8px;color:var(--teal2);text-transform:uppercase}.topbar h2{font-size:27px;margin:3px 0 0}.top-actions{display:flex;gap:10px}.btn{border:0;border-radius:12px;padding:12px 17px;font-family:inherit;font-weight:700;cursor:pointer;transition:.16s}.btn.primary{background:var(--teal);color:#fff}.btn.primary:hover{background:var(--teal2);transform:translateY(-1px)}.btn.ghost{background:var(--paper);color:var(--teal);border:1px solid var(--line)}.btn.danger{background:#f3dedb;color:var(--danger)}.hidden{display:none!important}.view{display:none}.view.active{display:block}.hero{min-height:380px;background:linear-gradient(135deg,#173f3a 0%,#225b52 65%,#2a675d 100%);border-radius:28px;color:#fff;padding:42px 50px;display:grid;grid-template-columns:1.55fr .8fr;gap:36px;box-shadow:var(--shadow);overflow:hidden;position:relative}.hero:after{content:"";position:absolute;width:430px;height:430px;border:1px solid rgba(255,255,255,.1);border-radius:50%;left:-140px;top:-170px}.hero-kicker{font-family:Georgia,serif;font-size:17px;color:#d8c39b;margin-bottom:16px}.hero h3{font-size:42px;line-height:1.57;margin:0 0 14px;letter-spacing:-.6px}.hero h3 span{color:#dac49d}.hero p{color:#ccdbd6;max-width:650px;line-height:1.9;font-size:14px}.hero-search{margin-top:24px;background:#fff;border-radius:16px;padding:7px 8px 7px 13px;display:flex;align-items:center;max-width:650px;position:relative;z-index:2}.hero-search span{color:#78928b;font-size:22px}.hero-search input{flex:1;border:0;outline:0;padding:12px;background:transparent;font-family:inherit;font-size:14px}.hero-search button{border:0;background:#d3bb8e;color:#2d3a35;font-weight:800;font-family:inherit;border-radius:11px;padding:11px 18px;cursor:pointer}.hero-orbit{position:relative;min-height:290px}.orbit-card{position:absolute;background:rgba(255,255,255,.1);backdrop-filter:blur(8px);border:1px solid rgba(255,255,255,.16);border-radius:22px;padding:22px;display:flex;flex-direction:column}.orbit-card b{font-size:34px}.orbit-card span{color:#c7d9d3;font-size:12px;margin-top:4px}.orbit-card.big{width:250px;left:5px;top:30px}.orbit-card.small{width:165px;padding:17px}.orbit-card.small b{font-size:22px}.orbit-card.one{right:0;top:126px}.orbit-card.two{left:42px;bottom:10px}.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:18px 0}.stat-card{background:var(--paper);border:1px solid var(--line);border-radius:18px;padding:18px;display:flex;align-items:center;gap:15px;box-shadow:0 6px 22px rgba(27,53,45,.04)}.stat-icon{width:42px;height:42px;border-radius:13px;background:var(--soft);display:grid;place-items:center;color:var(--teal);font-weight:900}.stat-card span{display:block;color:var(--muted);font-size:11px}.stat-card b{display:block;font-size:23px;margin-top:2px}.home-grid{display:grid;grid-template-columns:1.5fr .7fr;gap:16px}.panel{background:var(--paper);border:1px solid var(--line);border-radius:20px;padding:20px}.panel-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.panel-head h3{margin:3px 0 0;font-size:18px}.panel-head.compact{margin-bottom:12px}.link-btn,.mini-btn{border:0;background:transparent;color:var(--teal2);font-family:inherit;font-weight:700;cursor:pointer}.alphabet{display:flex;flex-wrap:wrap;gap:8px;direction:ltr}.alphabet button{width:38px;height:38px;border:1px solid var(--line);background:#fff;border-radius:10px;color:var(--teal);font-weight:800;cursor:pointer;transition:.13s}.alphabet button:hover,.alphabet button.active{background:var(--teal);color:#fff;border-color:var(--teal)}.recent-list{display:flex;flex-direction:column;gap:9px}.recent-item{padding:10px 0;border-bottom:1px solid #ece8df}.recent-item b{font-size:12px}.recent-item small{display:block;color:var(--muted);font-size:9px;margin-top:3px}.empty-small{color:var(--muted);font-size:12px;padding:18px 0}.dictionary-tools{display:grid;grid-template-columns:1.5fr .65fr .5fr;gap:10px;margin-bottom:13px}.searchbox{background:var(--paper);border:1px solid var(--line);border-radius:14px;padding:0 13px;display:flex;align-items:center}.searchbox span{font-size:20px;color:#7c8d87}.searchbox input{width:100%;border:0;outline:0;background:transparent;padding:13px;font-family:inherit}.dictionary-tools select{border:1px solid var(--line);background:var(--paper);border-radius:14px;padding:0 12px;font-family:inherit;color:var(--ink)}.panel-alphabet{background:var(--paper);border:1px solid var(--line);border-radius:16px;padding:12px;margin-bottom:13px}.panel-alphabet button{width:34px;height:34px}.results-meta{display:flex;justify-content:space-between;align-items:center;color:var(--muted);font-size:12px;padding:3px 2px 10px}.results-meta b{color:var(--ink);font-size:16px}.dictionary-layout{display:grid;grid-template-columns:minmax(0,1fr) 245px;gap:14px;align-items:start}.entries-panel,.category-panel{background:var(--paper);border:1px solid var(--line);border-radius:18px;overflow:hidden}.category-panel{padding:17px;position:sticky;top:20px;max-height:calc(100vh - 170px)}.category-list{overflow:auto;max-height:calc(100vh - 250px);padding-left:4px}.category-row{display:flex;align-items:center;justify-content:space-between;border:0;background:transparent;width:100%;padding:10px;border-radius:10px;font-family:inherit;cursor:pointer;color:#41514c;text-align:right}.category-row:hover,.category-row.active{background:var(--soft);color:var(--teal)}.category-row span:last-child{font-size:10px;color:#80908b}.entry-row{display:grid;grid-template-columns:170px 180px minmax(260px,1fr) 130px 80px;gap:12px;align-items:center;padding:14px 17px;border-bottom:1px solid #ece9e1;cursor:pointer;transition:.12s}.entry-row:hover{background:#f8f7f2}.entry-row.head{background:#f0eee7;color:#6d7b76;font-size:10px;font-weight:800;cursor:default;padding-top:10px;padding-bottom:10px}.entry-row.head:hover{background:#f0eee7}.turkish{direction:ltr;text-align:left;font-weight:800;color:#163e38}.lafiz{direction:ltr;text-align:left;color:#6c7d77;font-size:12px}.arabic{font-size:13px;line-height:1.8}.category-tag{display:inline-flex;background:#e9efeb;color:#2d665c;border-radius:999px;padding:5px 8px;font-size:10px;width:max-content;max-width:125px}.status-dot{font-size:9px;font-weight:800}.status-approved{color:#438365}.status-review{color:#b27b28}.status-new{color:#8f5aa3}.pagination{padding:13px;display:flex;justify-content:center;gap:8px}.pagination button{border:1px solid var(--line);background:#fff;padding:7px 12px;border-radius:9px;font-family:inherit;cursor:pointer}.pagination button.active{background:var(--teal);color:#fff}.section-toolbar{display:flex;gap:10px;margin-bottom:14px}.section-table{background:var(--paper);border:1px solid var(--line);border-radius:18px;overflow:hidden}.simple-row{display:grid;grid-template-columns:240px 1fr;gap:20px;padding:14px 19px;border-bottom:1px solid #ece9e1}.simple-row.head{background:#f0eee7;color:#6d7b76;font-size:10px;font-weight:800}.simple-row .tr{direction:ltr;text-align:left;font-weight:800;color:var(--teal)}.about-hero{background:#e5ece7;border-radius:26px;padding:38px 44px;display:flex;justify-content:space-between;align-items:center;margin-bottom:16px;min-height:220px}.about-hero h3{font-size:34px;margin:7px 0 10px;line-height:1.55}.about-hero p{color:#61726c;max-width:620px;line-height:1.8}.about-number{display:flex;align-items:center;gap:13px;padding-left:28px}.about-number b{font-family:Georgia,serif;font-size:92px;color:var(--teal)}.about-number span{color:#48615a;font-size:12px;line-height:1.6}.story-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.story-card{background:var(--paper);border:1px solid var(--line);border-radius:18px;padding:25px;min-height:190px}.story-card.wide{grid-column:1/-1;min-height:auto}.story-card h4{font-size:18px;margin:7px 0 10px}.story-card p{color:#65736f;line-height:2;font-size:13px;margin:0}.story-num{font:700 11px Arial;color:var(--gold);letter-spacing:1px}.signature{display:flex;align-items:center;justify-content:space-between;gap:30px}.signature>div:first-child{max-width:65%}.quote{font-family:Georgia,"Times New Roman",serif;color:var(--teal);font-size:20px;line-height:1.8;max-width:300px}.modal-backdrop{position:fixed;inset:0;background:rgba(13,31,28,.5);display:none;place-items:center;z-index:100;padding:20px}.modal-backdrop.open{display:grid}.modal{width:min(760px,95vw);background:#fff;border-radius:22px;box-shadow:0 30px 100px rgba(0,0,0,.2);overflow:hidden}.modal-head{padding:20px 24px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:flex-start}.modal-head h3{margin:3px 0 0}.icon-btn{border:0;background:#f0eee7;width:35px;height:35px;border-radius:10px;font-size:24px;cursor:pointer}.modal form{padding:22px 24px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}.form-grid label{display:flex;flex-direction:column;gap:6px}.form-grid label.full{grid-column:1/-1}.form-grid label span{font-size:11px;font-weight:800;color:#50615b}.form-grid input,.form-grid textarea,.form-grid select{border:1px solid #d7d7d0;border-radius:11px;padding:11px 12px;font-family:inherit;outline:none}.form-grid input:focus,.form-grid textarea:focus,.form-grid select:focus{border-color:#6fa398;box-shadow:0 0 0 3px rgba(77,143,130,.08)}.form-grid textarea{min-height:76px;resize:vertical}.modal-actions{display:flex;gap:9px;margin-top:20px;align-items:center}.spacer{flex:1}.toast{position:fixed;left:28px;bottom:28px;background:#173e39;color:#fff;padding:13px 17px;border-radius:12px;box-shadow:var(--shadow);opacity:0;transform:translateY(15px);pointer-events:none;transition:.2s;z-index:150;font-size:12px}.toast.show{opacity:1;transform:none}@media(max-width:1150px){.sidebar{width:220px}.main{margin-right:220px;padding:24px}.brand p{display:none}.hero{grid-template-columns:1fr}.hero-orbit{display:none}.stats-grid{grid-template-columns:1fr 1fr}.dictionary-layout{grid-template-columns:1fr}.category-panel{display:none}.entry-row{grid-template-columns:140px 150px 1fr 100px}.entry-row>:last-child{display:none}}@media(max-width:760px){.sidebar{width:74px;padding:20px 10px}.brand{padding:0 3px 20px}.brand>div:last-child,.nav-item b,.sidebar-foot{display:none}.brand-mark{width:46px}.nav-item{padding:10px;justify-content:center}.main{margin-right:74px;padding:16px}.topbar{height:auto}.topbar .ghost{display:none}.hero{padding:28px}.hero h3{font-size:29px}.stats-grid,.home-grid,.story-grid,.form-grid{grid-template-columns:1fr}.dictionary-tools{grid-template-columns:1fr}.entry-row{grid-template-columns:1fr 1fr}.entry-row .arabic{grid-column:1/-1}.entry-row .category-tag{display:none}.entry-row.head{display:none}.story-card.wide,.form-grid label.full{grid-column:auto}.signature{display:block}.signature>div:first-child{max-width:none}.about-hero{display:block}.about-number{padding:10px 0}.top-actions .btn{padding:10px}.alphabet button{width:34px;height:34px}}

/* v0.3 — المرجع النهائي للصفحة الرئيسية */
.main.home-mode{padding-top:16px}
.main.home-mode .topbar{display:none}
.main.home-mode #home{padding-top:0}

/* البحث الشامل */
.global-search-wrap{max-width:1180px;margin:0 auto}.global-search-bar{display:flex;gap:10px;margin-bottom:16px}.global-search-bar .searchbox{flex:1}.global-search-summary{background:var(--paper);border:1px solid var(--line);border-radius:14px;padding:14px 17px;margin-bottom:14px;color:var(--muted);font-size:13px}.global-search-summary b,.global-search-summary strong{color:var(--ink)}.global-search-results{display:flex;flex-direction:column;gap:14px}.global-group{background:var(--paper);border:1px solid var(--line);border-radius:18px;overflow:hidden}.global-group-head{display:flex;align-items:center;justify-content:space-between;padding:15px 18px;background:#f0eee7;border-bottom:1px solid var(--line)}.global-group-head>div{display:flex;align-items:center;gap:12px}.global-group-head span{font-weight:800;color:var(--teal)}.global-group-head b{font-size:11px;color:var(--muted)}.global-result-row{display:grid;grid-template-columns:180px 190px minmax(280px,1fr) 140px;gap:14px;align-items:center;padding:13px 18px;border-bottom:1px solid #ece9e1}.global-result-row:last-child{border-bottom:0}.global-result-row.editable-result{cursor:pointer}.global-result-row.editable-result:hover{background:#f8f7f2}.global-tr{direction:ltr;text-align:left;font-weight:800;color:var(--teal)}.global-lafiz{direction:ltr;text-align:left;color:#6c7d77;font-size:12px}.global-ar{font-size:13px;line-height:1.8}.global-ar.wide{grid-column:2/-1}.global-meta{font-size:10px;color:var(--muted)}.global-more{padding:10px 18px;background:#faf9f5;color:var(--muted);font-size:10px}.global-empty{background:var(--paper);border:1px solid var(--line);border-radius:18px;padding:40px;text-align:center;color:var(--muted)}

/* المعجم الرئيسي */
.dictionary-mode-tabs{display:flex;gap:9px;margin-bottom:13px}.mode-tab{border:1px solid var(--line);background:var(--paper);color:var(--teal);font-family:inherit;font-weight:800;padding:11px 20px;border-radius:12px;cursor:pointer;transition:.15s}.mode-tab.active{background:var(--teal);color:#fff;border-color:var(--teal);box-shadow:0 5px 16px rgba(20,71,63,.12)}
.compact-tools{grid-template-columns:minmax(300px,1fr) 190px;margin-bottom:13px}.featured-alphabet{gap:9px;padding:13px 14px;align-items:center;overflow-x:auto;flex-wrap:nowrap;scrollbar-width:thin}.featured-alphabet button{flex:0 0 48px;width:48px;height:44px;border-radius:11px;background:#fff;border:1px solid #d8d8d0;font-size:15px;box-shadow:0 2px 5px rgba(20,55,48,.025)}.featured-alphabet button:hover{transform:translateY(-1px);border-color:#8baaa2}.featured-alphabet button.active{background:var(--teal);color:#fff;border-color:var(--teal);box-shadow:0 5px 14px rgba(20,71,63,.18)}.featured-alphabet .alphabet-all{flex-basis:68px;width:68px;font-size:12px}
.entries-panel.full-width{width:100%;overflow:hidden}.entry-row{grid-template-columns:minmax(170px,.8fr) minmax(190px,.95fr) minmax(380px,2.25fr);gap:22px;padding:15px 22px;align-items:start}.entry-row.head{grid-template-columns:minmax(170px,.8fr) minmax(190px,.95fr) minmax(380px,2.25fr);position:sticky;top:0;z-index:2}.entry-row>div{min-width:0;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}.entry-row .turkish,.entry-row .lafiz{padding-top:2px}.entry-row .arabic{font-size:14px;line-height:1.9}.loading-row{padding:34px;text-align:center;color:var(--muted);font-size:12px}
.category-browser{background:var(--paper);border:1px solid var(--line);border-radius:20px;padding:22px}.category-browser-head{display:flex;justify-content:space-between;gap:24px;align-items:end;margin-bottom:19px}.category-browser-head h3{margin:4px 0 3px;font-size:24px}.category-browser-head p{margin:0;color:var(--muted);font-size:11px}.category-search{width:min(360px,42vw);height:48px}.category-grid{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:11px}.category-card{border:1px solid var(--line);background:#fbfaf6;border-radius:15px;padding:16px;text-align:right;font-family:inherit;cursor:pointer;transition:.14s;min-height:90px}.category-card:hover{border-color:#88aaa1;background:var(--soft);transform:translateY(-1px)}.category-card span{display:block;color:var(--ink);font-weight:800;font-size:14px;margin-bottom:9px}.category-card b{font-size:18px;color:var(--teal);direction:ltr;display:inline-block}.category-card small{font-size:9px;color:var(--muted);margin-right:5px}.category-result-head{display:flex;align-items:center;justify-content:space-between;background:#e7eee9;border:1px solid #d3dfd9;border-radius:14px;padding:11px 15px;margin-bottom:10px}.category-result-head>div span{display:block;font-size:9px;color:var(--muted)}.category-result-head>div b{display:block;font-size:16px;color:var(--teal);margin-top:2px}.back-categories{border:0;background:transparent;color:var(--teal);font-family:inherit;font-weight:800;cursor:pointer}

/* الأقسام الثلاثة: عرض كامل مع الحروف */
.section-toolbar{display:flex;gap:10px;margin-bottom:14px}.section-toolbar .searchbox{width:100%;min-height:48px}.section-letter-label{font-weight:800;color:var(--teal)}.simple-row{grid-template-columns:minmax(220px,.75fr) minmax(420px,2.25fr);align-items:start}.simple-row>div{min-width:0;white-space:normal;overflow-wrap:anywhere;line-height:1.9}.simple-row .ar{font-size:14px}

/* هوية المؤلف */
.author-card{background:linear-gradient(135deg,#173f3a,#245b52);color:#fff;border:0;min-height:auto!important}.author-label{font-size:10px;color:#d9c49b;font-weight:800;letter-spacing:.4px;margin-bottom:16px}.author-names{display:flex;align-items:center;gap:24px}.author-ar,.author-tr{display:flex;flex-direction:column;gap:5px}.author-ar span,.author-tr span{font-size:11px;color:#c7d8d3}.author-ar b,.author-tr b{font-size:20px}.author-divider{width:1px;height:48px;background:rgba(255,255,255,.22)}

@media(max-width:1250px){.category-grid{grid-template-columns:repeat(3,minmax(150px,1fr))}.entry-row,.entry-row.head{grid-template-columns:150px 170px minmax(300px,1fr)}}
@media(max-width:900px){.category-grid{grid-template-columns:repeat(2,minmax(140px,1fr))}.category-browser-head{display:block}.category-search{width:100%;margin-top:13px}.compact-tools{grid-template-columns:1fr}.entry-row,.entry-row.head{grid-template-columns:130px 145px minmax(250px,1fr);gap:12px;padding:13px}.simple-row{grid-template-columns:170px 1fr}.author-names{flex-direction:column;align-items:flex-start}.author-divider{width:100%;height:1px}}
@media(max-width:760px){.main.home-mode{padding-top:10px}.global-search-bar{display:grid;grid-template-columns:1fr}.global-result-row{grid-template-columns:1fr 1fr}.global-result-row .global-ar{grid-column:1/-1}.global-result-row .global-meta{display:none}}
@media(max-width:650px){.category-grid{grid-template-columns:1fr}.featured-alphabet{padding:10px}.featured-alphabet button{flex-basis:44px;width:44px}.entry-row{grid-template-columns:1fr 1fr!important}.entry-row .arabic{grid-column:1/-1}.simple-row{grid-template-columns:1fr}.simple-row .ar{margin-top:-4px}.dictionary-mode-tabs{display:grid;grid-template-columns:1fr 1fr}}

/* =========================================================
   v0.8.0 — عرض معجمي كامل، صفحات، فواصل الحروف وحفظ النص الحرفي
   ========================================================= */
.alphabet-shell{width:100%;background:var(--paper);border:1px solid var(--line);border-radius:20px;padding:14px;margin-bottom:16px;box-shadow:0 5px 18px rgba(24,52,45,.035)}
.featured-alphabet{display:grid!important;grid-template-columns:repeat(10,minmax(0,1fr));gap:10px!important;padding:0!important;overflow:visible!important;direction:rtl;width:100%}
.featured-alphabet button{width:auto!important;height:48px!important;min-width:0!important;flex:none!important;border:1px solid #d7d8d1!important;border-radius:12px!important;background:#fff!important;color:var(--teal)!important;font-size:16px!important;font-weight:900!important;box-shadow:0 2px 7px rgba(20,55,48,.035)!important;cursor:pointer;transition:.16s}
.featured-alphabet button:hover{border-color:#7eaaa0!important;background:#f5f8f5!important;transform:translateY(-1px)}
.featured-alphabet button.active{background:#d7bb83!important;color:#173e39!important;border:2px solid #174c45!important;box-shadow:0 6px 15px rgba(20,71,63,.14)!important;transform:none}
.featured-alphabet .alphabet-all{font-size:13px!important}

.entries-panel{width:100%;overflow-x:auto!important;overflow-y:visible;border-radius:18px}
.dictionary-table{min-width:1120px;background:var(--paper);border:1px solid var(--line);border-radius:18px;overflow:hidden}
.main-table-row{direction:ltr;display:grid;grid-template-columns:72px minmax(220px,1.05fr) minmax(245px,1.15fr) minmax(430px,2.35fr) minmax(155px,.8fr);align-items:stretch;border-bottom:1px solid #ebe9e2;min-height:62px}
.main-table-row>div{min-width:0;padding:15px 16px;display:flex;align-items:center;border-left:1px solid #efede7}
.main-table-row>div:last-child{border-left:0}
.main-table-row.table-head{min-height:52px;background:#eeece5;color:#5e6e68;font-size:11px;font-weight:900;position:sticky;top:0;z-index:3}
.main-table-row.table-head>div{justify-content:center;text-align:center}
.main-table-row.data-row{cursor:pointer;background:#fffdf9;transition:.12s}
.main-table-row.data-row:nth-of-type(even){background:#fdfcf8}
.main-table-row.data-row:hover{background:#f1f6f2}
.seq-cell{justify-content:center!important;color:#7a8984;font-weight:800;font-family:"IBM Plex Sans","Segoe UI",Arial,sans-serif;font-size:12px;direction:ltr}
.main-table-row .turkish,.main-table-row .lafiz{direction:ltr;text-align:left;justify-content:flex-start!important;white-space:pre!important;overflow:visible!important;word-break:normal!important}
.main-table-row .turkish{color:#0e4c44;font-weight:900;font-size:15px}
.main-table-row .lafiz{color:#526963;font-size:13px}
.main-table-row .arabic{direction:rtl;text-align:right;justify-content:flex-start!important;white-space:pre-wrap!important;overflow-wrap:normal;word-break:normal;font-size:14px;line-height:1.9}
.main-table-row .category-cell{direction:rtl;text-align:center;justify-content:center!important;white-space:pre-wrap!important;color:#315e56;font-size:12px;font-weight:800;background:rgba(231,238,233,.45)}
.literal-cell{unicode-bidi:plaintext}
.xlsx-red{color:#e21f26!important;font-weight:800}

.letter-divider{direction:rtl;display:flex;align-items:center;gap:12px;padding:11px 18px;background:linear-gradient(90deg,#edf3ef,#e0ebe5);border-bottom:1px solid #d4e0da;border-top:1px solid #d4e0da;color:#174c45}
.letter-divider span{width:42px;height:36px;border-radius:10px;background:#174c45;color:#fff;display:grid;place-items:center;font-family:"IBM Plex Sans","Segoe UI",Arial,sans-serif;font-size:18px;font-weight:900;box-shadow:0 4px 10px rgba(23,76,69,.14)}
.letter-divider b{font-size:13px}

.simple-table-row{direction:ltr;display:grid;grid-template-columns:72px minmax(330px,1fr) minmax(560px,2fr);align-items:stretch;border-bottom:1px solid #ebe9e2;min-height:61px}
.simple-table-row>div{padding:15px 18px;display:flex;align-items:center;border-left:1px solid #efede7;min-width:0}
.simple-table-row>div:last-child{border-left:0}
.simple-table-row.table-head{background:#eeece5;color:#5e6e68;font-size:11px;font-weight:900;min-height:52px}
.simple-table-row.table-head>div{justify-content:center}
.simple-table-row.simple-data-row{cursor:pointer;background:#fffdf9;transition:.12s}.simple-table-row.simple-data-row:hover{background:#f1f6f2}
.simple-tr{direction:ltr;text-align:left;justify-content:flex-start!important;white-space:pre!important;color:#0e4c44;font-weight:850}
.simple-ar{direction:rtl;text-align:right;justify-content:flex-start!important;white-space:pre-wrap!important;line-height:1.9;font-size:14px}
.verb-suffix{color:#9aa4a1;font-weight:700}

.pagination-wrap{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;margin:17px 0 4px;padding:11px 13px;background:var(--paper);border:1px solid var(--line);border-radius:16px;box-shadow:0 5px 18px rgba(24,52,45,.035)}
.page-btn{border:1px solid #d7d8d1;background:#f8f6ef;color:#174c45;border-radius:11px;padding:11px 16px;font-family:inherit;font-weight:850;cursor:pointer;justify-self:start;min-width:135px}.page-btn.next{justify-self:end}.page-btn:hover:not(:disabled){background:#e8f0eb;border-color:#8faea7}.page-btn:disabled{opacity:.38;cursor:default}
.page-indicator{display:flex;align-items:center;justify-content:center;gap:8px;color:#72807b;font-size:11px}.page-indicator b{font-family:"IBM Plex Sans","Segoe UI",Arial,sans-serif;font-size:15px;color:#173e39}
.empty-small{padding:42px;text-align:center;color:var(--muted)}

/* التصنيفات: شبكة عربية مرتبة ثم قاموس مصغر بنفس نظام المعجم */
.category-grid{grid-template-columns:repeat(4,minmax(150px,1fr))!important}.category-card{min-height:86px!important}.category-result-head{margin-bottom:14px!important}

/* نافذة التحرير */
.form-grid select{width:100%;background:#fff}.form-grid .hidden{display:none!important}

/* About: قصة متسلسلة بلا بطاقات مرقمة */
.about-story{max-width:1060px;margin:0 auto;background:var(--paper);border:1px solid var(--line);border-radius:26px;padding:42px 54px;box-shadow:var(--shadow)}
.about-story-head{text-align:center;max-width:780px;margin:0 auto 34px}.about-story-head h3{font-size:34px;line-height:1.55;margin:8px 0 12px;color:#173e39}.about-story-head p{color:var(--muted);font-size:14px;line-height:1.9;margin:0}
.story-flow{max-width:850px;margin:0 auto}.story-flow p{font-size:15px;line-height:2.25;color:#374843;margin:0;text-align:justify}.story-separator{width:86px;height:2px;background:linear-gradient(90deg,transparent,#c6a66a,transparent);margin:25px auto}
.author-signature-box{margin:38px auto 0;max-width:620px;background:linear-gradient(135deg,#173f3a,#245b52);border-radius:20px;color:#fff;padding:27px;text-align:center}.author-signature-box .author-label{margin-bottom:15px;color:#d9c49b}.author-centered{display:flex;flex-direction:column;align-items:center;gap:5px}.author-centered span{font-size:12px;color:#c7d8d3}.author-centered strong{font-size:21px;line-height:1.5}.author-sep{width:70px;height:1px;background:rgba(255,255,255,.25);margin:10px 0}

@media(max-width:1250px){.featured-alphabet{grid-template-columns:repeat(8,minmax(0,1fr))!important}.main-table-row{grid-template-columns:64px minmax(200px,1fr) minmax(215px,1.05fr) minmax(380px,2fr) 145px}.category-grid{grid-template-columns:repeat(3,minmax(150px,1fr))!important}}
@media(max-width:980px){.featured-alphabet{grid-template-columns:repeat(6,minmax(0,1fr))!important}.category-grid{grid-template-columns:repeat(2,minmax(150px,1fr))!important}.about-story{padding:30px}.simple-table-row{grid-template-columns:62px 300px minmax(440px,1fr)}}
@media(max-width:700px){.featured-alphabet{grid-template-columns:repeat(4,minmax(0,1fr))!important}.category-grid{grid-template-columns:1fr!important}.pagination-wrap{grid-template-columns:1fr 1fr}.page-indicator{grid-column:1/-1;grid-row:1}.page-btn{grid-row:2;min-width:0;width:100%}.about-story{padding:24px 18px}.story-flow p{text-align:right}.about-story-head h3{font-size:27px}}

/* ===== v0.9.0: مراجعة عرض المعجم ===== */
/* شريط الحروف: أصغر، كامل العرض، وتسلسل بصري تركي من اليسار لليمين */
.alphabet-shell{padding:10px 11px;margin-bottom:13px;border-radius:17px}
.featured-alphabet{direction:ltr!important;grid-template-columns:repeat(10,minmax(0,1fr));gap:7px!important}
.featured-alphabet button{height:38px!important;border-radius:9px!important;font-size:14px!important;font-weight:850!important}
.featured-alphabet .alphabet-all{font-size:11px!important}

/* فاصل الحرف داخل النتائج: مجموعة الحرف والعنوان في منتصف الشريط */
.letter-divider{direction:ltr;justify-content:center;gap:9px;padding:8px 14px;min-height:48px}
.letter-divider span{width:38px;height:32px;border-radius:9px;font-size:17px}
.letter-divider b{font-size:12px;direction:rtl;text-align:center}

/* جدول المعجم: الكلمة التركية هي نقطة الجذب الأولى، والتصنيف عنصر ثانوي */
.dictionary-table{min-width:1240px}
.main-table-row{grid-template-columns:64px minmax(245px,1.15fr) minmax(275px,1.5fr) minmax(500px,2.35fr) minmax(105px,.55fr);min-height:60px}
.main-table-row>div{padding:14px 16px;border-left:0;position:relative}
.main-table-row>div+div:before{content:"";position:absolute;left:0;top:12px;bottom:12px;width:1px;background:rgba(98,113,107,.11)}
.main-table-row.table-head>div+div:before{top:9px;bottom:9px;background:rgba(98,113,107,.16)}
.main-table-row .turkish{background:rgba(231,238,233,.62);color:#123f38;font-size:16px;font-weight:950;letter-spacing:.05px}
.main-table-row.data-row:hover .turkish{background:rgba(218,232,224,.86)}
.main-table-row .lafiz{color:#50655f;font-size:13px;font-weight:650}
.main-table-row .arabic{font-size:14px;line-height:1.85}
.main-table-row .category-cell{background:transparent;color:#7a8883;font-size:10.5px;font-weight:600;line-height:1.55;padding-left:10px;padding-right:10px}

/* نافذة إضافة/تعديل المعجم: الحقول الأربعة المعجمية فقط */
.compact-tools{grid-template-columns:minmax(300px,1fr)!important}

@media(max-width:1250px){
  .featured-alphabet{grid-template-columns:repeat(8,minmax(0,1fr))!important}
  .main-table-row{grid-template-columns:58px minmax(220px,1fr) minmax(245px,1.05fr) minmax(430px,2fr) 105px}
}
@media(max-width:980px){.featured-alphabet{grid-template-columns:repeat(6,minmax(0,1fr))!important}}
@media(max-width:700px){.featured-alphabet{grid-template-columns:repeat(4,minmax(0,1fr))!important}}

/* ===== v0.10.0 — polish + settings ===== */
/* تذييل الشريط الجانبي بنفس روح برنامج HR */
.sidebar-foot.hr-style-credit{margin-top:auto;padding:15px 8px 2px;text-align:center;color:#bfd0cb;display:flex;flex-direction:column;align-items:center;gap:4px}
.sidebar-foot.hr-style-credit span{font-size:9px;font-weight:700;letter-spacing:.15px}
.sidebar-foot.hr-style-credit strong{font-family:"IBM Plex Sans","Segoe UI",Arial,sans-serif;font-size:11px;color:#fff;letter-spacing:.45px}
.sidebar-foot.hr-style-credit small{font-size:9px;color:#9fbab3}
.sidebar nav{gap:5px}.nav-item{padding-top:11px;padding-bottom:11px}

/* شريط الحروف: مضغوط، متعدد الأسطر، يسار ← يمين */
.alphabet-shell{width:100%;padding:8px 9px!important;margin-bottom:11px!important;border-radius:15px!important;overflow:visible!important}
.featured-alphabet{direction:ltr!important;display:grid!important;grid-template-columns:repeat(12,minmax(0,1fr))!important;gap:6px!important;width:100%!important}
.featured-alphabet button{height:33px!important;min-height:33px!important;border-radius:8px!important;font-size:13px!important;padding:0 4px!important}
.featured-alphabet .alphabet-all{font-size:10.5px!important}
.featured-alphabet button.active{background:#d7bb83!important;color:#173e39!important;border:2px solid #174c45!important}

/* فاصل الحروف بين مجموعات النتائج */
.letter-divider{direction:ltr!important;justify-content:center!important;gap:8px!important;padding:6px 12px!important;min-height:40px!important;background:linear-gradient(90deg,#edf3ef,#e1ebe6)!important}
.letter-divider span{width:34px!important;height:29px!important;border-radius:8px!important;font-size:16px!important}
.letter-divider b{font-size:11.5px!important;line-height:1!important;display:flex;align-items:center;height:29px}

/* إلغاء أي تمدد أفقي للجدول */
.entries-panel,.section-table,.dictionary-table{width:100%!important;min-width:0!important;max-width:100%!important}
.entries-panel{overflow:hidden!important}
.full-width{width:100%!important}

/* المعجم الرئيسي: # | Türkçe | Lafız ve İstisna | العربية | التصنيف */
.main-table-row{direction:ltr!important;display:grid!important;grid-template-columns:54px 21% 23% minmax(0,1fr) 118px!important;width:100%!important;min-width:0!important;min-height:50px!important;align-items:stretch!important}
.main-table-row>div{min-width:0!important;padding:8px 10px!important;border-left:0!important;position:relative;display:flex;align-items:center}
.main-table-row>div+div:before{content:"";position:absolute;left:0;top:9px;bottom:9px;width:1px;background:rgba(84,104,97,.10)!important}
.main-table-row.table-head{min-height:43px!important;font-size:10.5px!important;background:#efede6!important}
.main-table-row.table-head>div{justify-content:center!important;padding-top:7px!important;padding-bottom:7px!important}
.main-table-row .seq-cell{font-size:10px!important;color:#81908b!important;justify-content:center!important;font-weight:700!important}
.main-table-row .turkish{direction:ltr!important;text-align:left!important;justify-content:flex-start!important;white-space:nowrap!important;color:#0d473f!important;background:rgba(226,237,231,.72)!important;font-size:15px!important;font-weight:950!important;line-height:1.55!important;overflow:visible!important}
.main-table-row.data-row:hover .turkish{background:rgba(211,230,220,.92)!important}
.main-table-row .lafiz{direction:ltr!important;text-align:left!important;justify-content:flex-start!important;white-space:nowrap!important;color:#5e716b!important;font-size:12.5px!important;font-weight:550!important;line-height:1.5!important}
.main-table-row .arabic{direction:rtl!important;text-align:right!important;justify-content:flex-start!important;white-space:pre-wrap!important;overflow-wrap:break-word!important;word-break:normal!important;font-size:13.5px!important;line-height:1.55!important;color:#182521!important}
.main-table-row .category-cell{direction:rtl!important;text-align:center!important;justify-content:center!important;white-space:normal!important;background:transparent!important;color:#82908b!important;font-size:10px!important;font-weight:550!important;line-height:1.55!important;padding-left:7px!important;padding-right:7px!important}

/* القواميس الفرعية: عمودان فقط */
.section-table.dictionary-table{border-radius:16px!important}
.simple-table-row{direction:ltr!important;display:grid!important;grid-template-columns:minmax(250px,35%) minmax(0,65%)!important;width:100%!important;min-width:0!important;min-height:46px!important;border-bottom:1px solid #ebe9e2!important}
.simple-table-row>div{min-width:0!important;padding:8px 13px!important;display:flex!important;align-items:center!important;border-left:0!important;position:relative}
.simple-table-row>div+div:before{content:"";position:absolute;left:0;top:8px;bottom:8px;width:1px;background:rgba(84,104,97,.10)}
.simple-table-row.table-head{min-height:40px!important;font-size:10.5px!important;background:#efede6!important}
.simple-table-row.table-head>div{justify-content:center!important}
.simple-tr{direction:ltr!important;text-align:left!important;justify-content:flex-start!important;white-space:nowrap!important;font-size:14.5px!important;font-weight:900!important;color:#0e4c44!important;background:rgba(231,238,233,.55)!important}
.simple-ar{direction:rtl!important;text-align:right!important;justify-content:flex-start!important;white-space:normal!important;font-size:13.5px!important;line-height:1.5!important;color:#182521!important}
.verb-suffix{color:#a4afab!important;font-weight:650!important;margin-left:1px}

/* صفحة التصنيفات: بطاقات على قدر المحتوى، بلا مربع بحث إضافي */
.category-browser{padding:18px!important}
.category-browser-head{margin-bottom:13px!important}.category-browser-head h3{margin-bottom:2px!important}.category-browser-head p{margin-top:2px!important}
.category-grid{display:flex!important;flex-wrap:wrap!important;gap:8px!important;align-items:center!important;grid-template-columns:none!important}
.category-card{width:auto!important;min-width:0!important;min-height:0!important;height:auto!important;padding:9px 13px!important;border-radius:12px!important;display:inline-flex!important;flex-direction:row!important;align-items:center!important;gap:8px!important;justify-content:center!important}
.category-card span{font-size:13px!important;white-space:nowrap!important;margin:0!important}
.category-card b{display:none!important}.category-card small{font-size:9px!important;margin:0!important;color:#89958f!important;white-space:nowrap!important}
.category-result-head{padding:9px 13px!important;margin-bottom:10px!important;min-height:48px!important}

/* نتائج وصفحات أكثر كثافة */
.results-meta{padding:2px 2px 8px!important}.pagination-wrap{margin-top:12px!important;padding:9px 11px!important}.page-btn{padding:8px 14px!important}
.density-comfortable .main-table-row{min-height:58px!important}.density-comfortable .main-table-row>div{padding-top:12px!important;padding-bottom:12px!important}.density-comfortable .simple-table-row{min-height:54px!important}.density-comfortable .simple-table-row>div{padding-top:11px!important;padding-bottom:11px!important}
.font-small .main-table-row .turkish,.font-small .simple-tr{font-size:13.5px!important}.font-small .main-table-row .arabic,.font-small .simple-ar{font-size:12.5px!important}.font-large .main-table-row .turkish,.font-large .simple-tr{font-size:16px!important}.font-large .main-table-row .arabic,.font-large .simple-ar{font-size:14.5px!important}

/* الإعدادات */
.settings-page{max-width:1180px;margin:0 auto}.settings-intro{margin-bottom:16px}.settings-intro h3{font-size:28px;margin:3px 0 4px}.settings-intro p{margin:0;color:var(--muted);font-size:12px}
.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.settings-card{background:var(--paper);border:1px solid var(--line);border-radius:18px;padding:18px;box-shadow:0 7px 24px rgba(24,52,45,.04)}.settings-card-wide{grid-column:1/-1}.settings-card-head{display:flex;gap:12px;align-items:center;padding-bottom:14px;border-bottom:1px solid #ebe8e0}.settings-icon{width:40px;height:40px;border-radius:12px;background:var(--soft);color:var(--teal);display:grid;place-items:center;font-weight:900}.settings-card h4{margin:0;font-size:16px}.settings-card-head p{margin:3px 0 0;color:var(--muted);font-size:10.5px}
.setting-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:13px 0;border-bottom:1px solid #efede6}.setting-row:last-of-type{border-bottom:0}.setting-row.vertical{align-items:flex-start}.setting-copy b{display:block;font-size:12.5px}.setting-copy span{display:block;color:var(--muted);font-size:10.5px;margin-top:3px;line-height:1.6;word-break:break-all}.setting-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.setting-inline{display:flex;align-items:center;gap:9px}.setting-inline select,.setting-select select{border:1px solid var(--line);background:#fff;border-radius:10px;padding:9px 10px;font-family:inherit;color:var(--ink)}
.switch{position:relative;width:42px;height:24px;display:inline-block}.switch input{opacity:0;width:0;height:0}.switch span{position:absolute;inset:0;background:#cbd2cf;border-radius:999px;transition:.18s}.switch span:after{content:"";position:absolute;width:18px;height:18px;left:3px;top:3px;background:#fff;border-radius:50%;box-shadow:0 1px 4px rgba(0,0,0,.2);transition:.18s}.switch input:checked+span{background:var(--teal)}.switch input:checked+span:after{transform:translateX(18px)}
.password-fields{display:grid;gap:9px;margin:13px 0}.password-fields label,.setting-select{display:flex;flex-direction:column;gap:5px;font-size:10.5px;color:#586963}.password-fields input{border:1px solid var(--line);background:#fff;border-radius:10px;padding:10px;font-family:inherit}.setting-select{margin:13px 0}.full-btn{width:100%}.settings-status{margin-top:10px;padding:9px 11px;border-radius:10px;background:#f0f4f1;color:#51645e;font-size:10.5px;min-height:34px;line-height:1.6;word-break:break-word}
.data-summary{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin:14px 0}.data-summary div{background:#f3f5f1;border-radius:12px;padding:11px;text-align:center}.data-summary b{display:block;color:var(--teal);font-size:18px}.data-summary span{display:block;color:var(--muted);font-size:9px;margin-top:2px}.mobile-status-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin:14px 0}.mobile-status-grid div{background:#f5f5f0;border-radius:12px;padding:12px}.mobile-status-grid span{display:block;color:var(--muted);font-size:9px}.mobile-status-grid b{display:block;font-size:12px;margin-top:3px}.mobile-note{font-size:10.5px;color:#687772;line-height:1.8}.version-card{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.version-card div{min-width:0}.version-card span{display:block;color:var(--muted);font-size:9px}.version-card strong{display:block;font-size:11px;margin-top:3px;direction:ltr;text-align:right;overflow-wrap:anywhere}

/* شاشة القفل */
.lock-screen{position:fixed;inset:0;background:rgba(12,37,33,.82);backdrop-filter:blur(9px);z-index:9999;display:none;place-items:center;padding:20px}.lock-screen.show{display:grid}.lock-card{width:min(390px,94vw);background:#fffdf8;border-radius:22px;padding:28px;text-align:center;box-shadow:0 30px 90px rgba(0,0,0,.28)}.lock-mark{width:64px;height:64px;margin:0 auto 12px;border-radius:18px;background:var(--teal);color:#fff;display:grid;place-items:center;font-size:37px;font-weight:900}.lock-card h3{margin:4px 0;font-size:23px}.lock-card p{margin:4px 0 16px;color:var(--muted);font-size:11px}.lock-card input{width:100%;border:1px solid var(--line);border-radius:12px;padding:12px;font-family:inherit;text-align:center;margin-bottom:9px}.lock-card .btn{width:100%}.lock-error{color:#9c3e36;font-size:10.5px;margin-top:8px;min-height:16px}

@media(max-width:1250px){.featured-alphabet{grid-template-columns:repeat(10,minmax(0,1fr))!important}.main-table-row{grid-template-columns:50px 21% 23% minmax(0,1fr) 105px!important}.settings-grid{grid-template-columns:1fr}.settings-card-wide{grid-column:auto}.data-summary{grid-template-columns:repeat(3,1fr)}}
@media(max-width:980px){.featured-alphabet{grid-template-columns:repeat(8,minmax(0,1fr))!important}.main-table-row{grid-template-columns:46px 23% 24% minmax(0,1fr) 92px!important}.main-table-row .turkish{font-size:13.5px!important}.main-table-row .lafiz{font-size:11.5px!important}.main-table-row .arabic{font-size:12.5px!important}.simple-table-row{grid-template-columns:minmax(210px,38%) minmax(0,62%)!important}.mobile-status-grid,.version-card{grid-template-columns:1fr}}
@media(max-width:700px){.featured-alphabet{grid-template-columns:repeat(6,minmax(0,1fr))!important}.data-summary{grid-template-columns:repeat(2,1fr)}}


/* Qamousi 1.8 final polish */
/* تصنيفات متساوية ومضغوطة */
.category-grid{display:grid!important;grid-template-columns:repeat(auto-fill,150px)!important;grid-auto-rows:54px!important;gap:8px!important;justify-content:start!important;align-items:stretch!important;direction:rtl!important}
.category-card{width:150px!important;height:54px!important;min-width:150px!important;min-height:54px!important;max-width:150px!important;padding:7px 10px!important;border-radius:11px!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:2px!important;text-align:center!important}
.category-card span{font-size:12.5px!important;line-height:1.5!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;max-width:128px!important}
.category-card small{font-size:10px!important;line-height:1!important;color:#7f8c87!important;font-weight:700!important}

/* فاصل الحرف: الشارة وحدها */
.letter-divider{justify-content:center!important;min-height:38px!important;padding:5px 10px!important;gap:0!important}
.letter-divider span{width:36px!important;height:28px!important;font-size:16px!important}
.letter-divider b{display:none!important}

/* جدول المعجم الرئيسي: كل المحتوى ضمن عرض الصفحة */
.entries-panel,.section-table{overflow-x:hidden!important}
.main-table-row{grid-template-columns:48px minmax(150px,19%) minmax(170px,22%) minmax(0,1fr) 92px!important;min-height:46px!important;width:100%!important}
.main-table-row>div{padding:6px 8px!important}
.main-table-row>div+div:before{top:7px!important;bottom:7px!important;background:rgba(84,104,97,.09)!important}
.main-table-row .turkish{font-size:14.5px!important;font-weight:950!important;white-space:nowrap!important}
.main-table-row .lafiz{font-size:11.8px!important;white-space:nowrap!important}
.main-table-row .arabic{font-size:13px!important;line-height:1.55!important;white-space:pre-wrap!important}
.main-table-row .category-cell{font-size:9.5px!important;padding-left:5px!important;padding-right:5px!important}
.main-table-row .seq-cell{font-size:9.5px!important}

/* القواميس الفرعية: عمودان فقط، كثافة عالية */
.simple-table-row{grid-template-columns:minmax(220px,34%) minmax(0,66%)!important;min-height:42px!important;width:100%!important}
.simple-table-row>div{padding:6px 10px!important}
.simple-tr{font-size:14px!important;white-space:nowrap!important}
.simple-ar{font-size:13px!important;line-height:1.5!important}

/* إعدادات العرض: فروقات مرئية فعلًا */
body.font-small .main-table-row .turkish{font-size:12.5px!important}
body.font-small .main-table-row .lafiz{font-size:10.5px!important}
body.font-small .main-table-row .arabic{font-size:11.5px!important}
body.font-small .main-table-row .category-cell{font-size:8.5px!important}
body.font-small .simple-tr{font-size:12.5px!important}
body.font-small .simple-ar{font-size:11.5px!important}
body.font-large .main-table-row .turkish{font-size:17px!important}
body.font-large .main-table-row .lafiz{font-size:14px!important}
body.font-large .main-table-row .arabic{font-size:15px!important}
body.font-large .main-table-row .category-cell{font-size:11px!important}
body.font-large .simple-tr{font-size:16.5px!important}
body.font-large .simple-ar{font-size:15px!important}
body.density-compact .main-table-row{min-height:40px!important}
body.density-compact .main-table-row>div{padding-top:4px!important;padding-bottom:4px!important}
body.density-compact .simple-table-row{min-height:38px!important}
body.density-compact .simple-table-row>div{padding-top:4px!important;padding-bottom:4px!important}
body.density-comfortable .main-table-row{min-height:58px!important}
body.density-comfortable .main-table-row>div{padding-top:11px!important;padding-bottom:11px!important}
body.density-comfortable .simple-table-row{min-height:54px!important}
body.density-comfortable .simple-table-row>div{padding-top:10px!important;padding-bottom:10px!important}

/* لا تمرير أفقي في مساحة الجداول */
.dictionary-table,.entries-panel,.section-view{max-width:100%!important;min-width:0!important}

@media(max-width:1250px){.category-grid{grid-template-columns:repeat(auto-fill,145px)!important}.category-card{width:145px!important;min-width:145px!important;max-width:145px!important}.main-table-row{grid-template-columns:44px minmax(135px,20%) minmax(150px,22%) minmax(0,1fr) 82px!important}}

/* ===== v1.8 clean startup / homepage lock ===== */
/* الصفحة الرئيسية مقفلة بصريًا: البانر الأخضر + البحث + الإحصاءات فقط */
.main.home-mode .topbar{display:none!important}
.main.home-mode{padding-top:28px!important}
.main.home-mode #home{margin-top:0!important}


/* ===== v1.8 startup stability ===== */
.main.home-mode>.topbar{display:none!important}
body.qamousi-ready .main{opacity:1}

/* Qamousi 1.8 - category management */
.add-category-card{border:1px dashed rgba(15,104,86,.38)!important;background:#f6fbf8!important;color:var(--teal)!important;box-shadow:none!important}
.add-category-card:hover{background:#edf7f2!important;border-color:var(--teal)!important;transform:translateY(-1px)}
.add-category-card small{color:#83948e!important;font-weight:600!important}
.category-result-head{display:flex!important;align-items:center!important;gap:12px!important}
.category-result-title{flex:1;text-align:center}.category-result-title span,.category-result-title b{display:block}.category-result-title b{font-size:15px;color:var(--teal);margin-top:2px}
.category-manage-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.category-delete-btn{color:#9d3c34!important;border-color:#e6c8c4!important}.category-delete-btn:disabled{opacity:.42;cursor:not-allowed!important}
.category-modal-card{max-width:520px!important}.category-modal-card input{font-size:14px!important}


/* Qamousi 1.8 dictionary mode isolation */
#categoryResultHead.hidden{display:none!important}
#categoryBrowser.hidden{display:none!important}
#dictionaryResults.hidden{display:none!important}
#categoryResultHead:not(.hidden){display:flex!important}

/* ===== Qamousi 1.8: global search direction + Turkish auto-fit ===== */
/* Global search results always read left-to-right by columns:
   Türkçe -> Lafız ve İstisna -> العربية -> التصنيف. */
.global-result-row{
  direction:ltr!important;
  grid-template-columns:minmax(210px,24%) minmax(150px,19%) minmax(0,1fr) 105px!important;
  column-gap:12px!important;
}
.global-result-row>div{min-width:0!important}
.global-result-row .global-tr{direction:ltr!important;text-align:left!important;justify-self:stretch!important}
.global-result-row .global-lafiz{direction:ltr!important;text-align:left!important}
.global-result-row .global-ar{direction:rtl!important;text-align:right!important;min-width:0!important;overflow-wrap:break-word!important}
.global-result-row .global-meta{direction:rtl!important;text-align:center!important;color:#83908b!important;font-size:10px!important}
.global-result-row.simple-global-result{
  grid-template-columns:minmax(230px,34%) minmax(0,66%)!important;
}
.global-result-row.simple-global-result .global-ar.wide{grid-column:auto!important}

/* Give Türkçe a little more room in the main dictionary; Lafız is sparse by design. */
.main-table-row{grid-template-columns:48px minmax(165px,24%) minmax(145px,18%) minmax(0,1fr) 88px!important}

/* Cell-by-cell Turkish auto-fit. Text itself is never modified. */
.main-table-row .turkish.tr-fit-small,
.simple-tr.tr-fit-small,
.global-tr.tr-fit-small{font-size:13px!important;letter-spacing:-.05px!important}
.main-table-row .turkish.tr-fit-xsmall,
.simple-tr.tr-fit-xsmall,
.global-tr.tr-fit-xsmall{font-size:11.5px!important;letter-spacing:-.1px!important}
.main-table-row .turkish.tr-fit-wrap,
.simple-tr.tr-fit-wrap,
.global-tr.tr-fit-wrap{
  font-size:10.5px!important;
  white-space:normal!important;
  line-height:1.3!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
}

@media(max-width:1250px){
  .main-table-row{grid-template-columns:44px minmax(150px,23%) minmax(135px,18%) minmax(0,1fr) 82px!important}
  .global-result-row{grid-template-columns:minmax(185px,25%) minmax(135px,19%) minmax(0,1fr) 90px!important}
}
@media(max-width:980px){
  .main-table-row{grid-template-columns:42px minmax(140px,24%) minmax(125px,19%) minmax(0,1fr) 78px!important}
}


/* ===== Qamousi 1.8: single-window startup ===== */
.startup-overlay{position:fixed;inset:0;z-index:10000;background:#f4f2ec;display:grid;place-items:center;transition:opacity .16s ease,visibility .16s ease}.startup-overlay.hide{opacity:0;visibility:hidden;pointer-events:none}.startup-overlay-card{width:min(360px,86vw);background:#123f37;color:#fff;border-radius:22px;padding:28px 24px;text-align:center;box-shadow:0 22px 70px rgba(18,63,55,.22)}.startup-overlay-mark{width:58px;height:58px;margin:0 auto 10px;border:1px solid rgba(255,255,255,.35);border-radius:16px;display:grid;place-items:center;font-size:34px;font-weight:900;color:#f4e9c5}.startup-overlay-card strong{display:block;font-size:20px;margin-bottom:5px}.startup-overlay-card span{font-size:11px;color:#d4e2de}.qamousi-ready #startupOverlay{opacity:0;visibility:hidden;pointer-events:none}

/* Qamousi 3.0: dynamic total indicator; original four dictionary cards are unchanged. */
.q3-total-home{background:#e8f0ec;border-radius:14px;padding:14px 19px;color:#175246;font-weight:650;font-size:13px;margin:0 0 16px}
.q3-total-home strong{font-size:20px;margin-inline-start:9px;direction:ltr;display:inline-block}
.q3-total-stat{border:1px solid #c0d5c9;grid-column:span 2}

.cloud-card [hidden]{display:none!important}

#settings [hidden], #cloudActivation [hidden], #settings .settings-status:empty{display:none!important}
.author-options summary{font-weight:800;cursor:pointer}
.author-options[open] summary{margin-bottom:10px}
.author-options .setting-actions{display:flex;gap:8px;flex-wrap:wrap}
.author-options select{max-width:100%}
.cloud-publication{margin-top:10px}
.cloud-publication .publish-action{background:#88450f;border-color:#88450f;color:#fff}
.cloud-publication .publish-action:hover:not(:disabled){background:#703608;border-color:#703608}
.cloud-publication .publish-action:focus-visible{outline:2px solid #88450f;outline-offset:3px}

#settings .font-setting{display:flex;align-items:center;justify-content:space-between;gap:14px}
.font-setting label,.settings-stats summary,.author-options summary{font-weight:800;color:var(--ink)}
.font-setting select{border:1px solid var(--line);border-radius:12px;padding:8px 12px;min-width:96px;background:#fff;color:var(--ink);font:inherit}
.settings-stats summary{cursor:pointer}
.settings-stats summary span:last-child{float:left;color:var(--green);font-weight:600}
.settings-stats[open] summary{margin-bottom:10px}

#about [hidden]{display:none!important}
.about-tabs{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px}
.pronunciation-guide{padding:clamp(16px,4vw,36px);line-height:1.85}
.pronunciation-guide h4{margin:1.5em 0 .4em;color:#134b43}
.pronunciation-guide h5{margin:.8em 0 .1em;font-size:1em}
.pronunciation-guide ul{padding-inline-start:1.5em}
.pronunciation-guide dt{font-weight:800;color:#134b43}
.pronunciation-guide dd{margin:0 0 14px}
.cloud-timeline{display:grid;gap:5px;color:#526963;font-size:.85em;margin-top:12px}
.cloud-timeline bdi{font-variant-numeric:tabular-nums;margin-inline-start:8px}
.seq-cell bdi{direction:ltr;white-space:nowrap;overflow-wrap:normal;font-variant-numeric:tabular-nums}
.main-table-row.table-head>div:nth-child(2),.main-table-row.table-head>div:nth-child(3),.simple-table-row.table-head>div:first-child{justify-content:flex-start!important;text-align:left}
.main-table-row.table-head>div:nth-child(4),.simple-table-row.table-head>div:nth-child(2){justify-content:flex-end!important;text-align:right}
.simple-table-row .simple-tr{flex-direction:column;align-items:flex-start;justify-content:center!important}
.secondary-pronunciation{display:block;color:#526963;font-size:.78em;line-height:1.5;margin-top:3px}
.search-rank{display:grid;gap:8px;margin:20px 0}
.search-rank h3{font-size:1rem;margin:0 0 4px;color:#174c45}
.rank-result{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.4fr);direction:rtl;text-align:start;align-items:start;gap:5px 14px;border:1px solid #dfddd5;background:#fffdf8;border-radius:13px;padding:12px 15px;font:inherit;color:inherit;cursor:pointer;width:100%}
.rank-result:hover{background:#f1f6f2}
.rank-result:focus-visible{outline:2px solid #20665b;outline-offset:2px}
.rank-result.rank-exact{border-color:#689182;background:#fafcf8}
.rank-word{grid-column:2;grid-row:1;justify-self:end;text-align:left;font-size:1.06em;font-weight:800;color:#154f45;overflow-wrap:anywhere}
.rank-meaning{grid-column:1;grid-row:1;overflow-wrap:anywhere}
.rank-pronunciation{grid-column:2;grid-row:2;justify-self:end;color:#526963;font-size:.86em;overflow-wrap:anywhere}
.rank-section{grid-column:1;grid-row:2;color:#526963;font-size:.78em}
.rank-result mark{background:#f2db9c;color:#3d2e12;border-radius:.22em;padding-inline:.12em}
.located-word{outline:2px solid #428174;outline-offset:-2px;background:#ecf4ee!important;scroll-margin-block:85px}
