/* Divan Jan — Premium Theme: Nastaliq + Vazirmatn */
@font-face{font-family:'DimaShekasteh';src:url('fonts/nastaliq.ttf') format('truetype');font-weight:400 700;font-display:swap}
@font-face{font-family:'Dima Shekasteh';src:url('fonts/nastaliq.ttf') format('truetype');font-weight:400 700;font-display:swap}
@font-face{font-family:'VazirDivan';src:url('fonts/vazir.ttf') format('truetype');font-weight:100 900;font-display:swap}
:root{--ui:'VazirDivan',Vazirmatn,Tahoma,sans-serif;--poetry:'DimaShekasteh','Noto Nastaliq Urdu',serif;
--emerald:#0f3d33;--emerald2:#176654;--gold-grad:linear-gradient(135deg,#8a6420,#e6c677 45%,#a77d32 70%,#f0d995);--lapis:#1d3a6b}
body{font-family:var(--ui)!important;background:
radial-gradient(1200px 600px at 85% -10%,rgba(217,193,138,.28),transparent 60%),
radial-gradient(900px 500px at 0% 20%,rgba(23,102,84,.10),transparent 60%),
url('paper-texture.svg'),var(--bg)!important;background-attachment:fixed}
html[data-theme=night] body{background:radial-gradient(1000px 600px at 80% -10%,rgba(207,174,117,.14),transparent 60%),radial-gradient(800px 500px at 0% 30%,rgba(23,102,84,.25),transparent 60%),var(--bg)!important}
.btn,.header-fal,.feature-action,button,input,.arch-top,.arch-name,.feature-kicker,p,li,label{font-family:var(--ui)!important}
.hero h1,.page-intro h1,.section-heading h2,.daily-heading h2,.poet-profile h1,.single-poem-title,.modal-top h2,.feature-card h2,.poet-card h3,.poem-card-title,.brand-word strong{font-family:var(--poetry)!important;font-weight:400!important;line-height:2.1!important}
.hero h1{background:linear-gradient(180deg,var(--emerald),#1f7a63);-webkit-background-clip:text;background-clip:text;color:transparent!important;text-shadow:none;filter:drop-shadow(0 6px 14px rgba(15,61,51,.15))}
html[data-theme=night] .hero h1{background:var(--gold-grad);-webkit-background-clip:text;background-clip:text}
.poetry-lines,.arch-poetry,.verse-line{font-family:var(--poetry)!important;line-height:2.9!important;word-spacing:2px}
.poetry-lines .verse-line{line-height:2.9!important}
/* gilded cards */
.feature-card,.poet-card,.poem-card,.fortune-story,.fortune-result,.archive-shell{position:relative;background:linear-gradient(150deg,rgba(255,252,245,.96),rgba(246,236,212,.92))!important;border:1px solid transparent!important;
background-clip:padding-box;box-shadow:0 1px 0 rgba(255,255,255,.8) inset,0 18px 50px rgba(60,45,15,.12)!important;border-radius:22px!important;backdrop-filter:blur(6px)}
.feature-card:before,.poet-card:after,.poem-card:before,.fortune-story:before,.archive-shell:before{content:"";position:absolute;inset:0;border-radius:inherit;padding:1.5px;background:var(--gold-grad);
-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;pointer-events:none;opacity:.85}
.feature-card,.poet-card,.poem-card{transition:transform .35s cubic-bezier(.2,.8,.2,1),box-shadow .35s}
.feature-card:hover,.poet-card:hover,.poem-card:hover{transform:translateY(-8px) scale(1.01)!important;box-shadow:0 30px 70px rgba(60,45,15,.22)!important}
html[data-theme=night] .feature-card,html[data-theme=night] .poet-card,html[data-theme=night] .poem-card,html[data-theme=night] .fortune-story,html[data-theme=night] .fortune-result,html[data-theme=night] .archive-shell{background:linear-gradient(150deg,rgba(26,48,48,.95),rgba(16,32,33,.95))!important;box-shadow:0 18px 50px rgba(0,0,0,.45)!important}
/* hero arch = tazhib frame */
.hero-arch{background:radial-gradient(circle at 50% 0,rgba(240,217,149,.5),transparent 45%),linear-gradient(180deg,#fffdf7,#f3e8cc)!important;border:3px solid transparent!important;
background-clip:padding-box;outline:2px solid #b18a4c;outline-offset:-10px;box-shadow:0 0 0 6px rgba(177,138,76,.18),0 40px 80px rgba(61,58,37,.22)!important;animation:float 7s ease-in-out infinite}
.arch-poetry{font-size:1.5rem!important;color:var(--emerald)!important}
@keyframes float{50%{transform:translateY(-10px)}}
/* buttons */
.btn-primary{background:linear-gradient(135deg,#0f3d33,#1d7a64)!important;border:0!important;color:#fff4d6!important;border-radius:14px!important;box-shadow:0 10px 24px rgba(15,61,51,.35),inset 0 1px 0 rgba(255,255,255,.25)!important;transition:.25s}
.btn-primary:hover{filter:brightness(1.12);transform:translateY(-2px)!important}
.btn-outline{background:rgba(255,248,231,.8)!important;border:1.5px solid #b18a4c!important;border-radius:14px!important;color:var(--emerald)!important}
/* header */
header,.site-header{background:rgba(255,252,245,.78)!important;backdrop-filter:blur(14px) saturate(1.4);border-bottom:1px solid rgba(177,138,76,.4)!important;position:sticky;top:0;z-index:50}
html[data-theme=night] header,html[data-theme=night] .site-header{background:rgba(13,25,26,.8)!important}
/* ornament dividers */
.section-ornament span{height:2px!important;background:linear-gradient(90deg,transparent,#b18a4c,transparent)!important}
input,.search-field{border-radius:14px!important;border:1.5px solid rgba(177,138,76,.55)!important;background:rgba(255,252,245,.9)!important}
input:focus{box-shadow:0 0 0 4px rgba(177,138,76,.25)}
::selection{background:#d9c18a;color:#0f3d33}
::-webkit-scrollbar{width:10px}::-webkit-scrollbar-thumb{background:linear-gradient(#b18a4c,#0f3d33);border-radius:10px}
.fortune-medallion{animation:spin 40s linear infinite;box-shadow:inset 0 0 0 8px var(--paper),inset 0 0 0 10px #b18a4c,0 0 40px rgba(217,193,138,.5)}
.fortune-medallion span{animation:spin 40s linear infinite reverse;display:block}
@keyframes spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){*{animation:none!important}}
html[data-readable="1"] .poetry-lines{font-family:var(--ui)!important}


/* Divan Jan V9: fully visible, responsive local collection tiles; no dropdowns or external assets. */
.poet-collections{margin:0 0 28px;padding:clamp(18px,3vw,30px);border:1px solid var(--line);border-radius:22px;background:var(--paper);box-shadow:var(--shadow)}
.poet-collections-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;margin-bottom:17px}
.poet-collections-heading h2{font-family:var(--ui)!important;font-weight:850!important;line-height:1.6!important;font-size:clamp(1.2rem,2.4vw,1.65rem);margin:4px 0;color:var(--ink)}
.poet-collections-heading p{font-size:.88rem;color:var(--muted);line-height:1.9;margin:4px 0 0}
.collection-tally{display:inline-flex;padding:6px 15px;border:1px solid var(--line);border-radius:999px;font-size:.81rem;color:var(--gold);white-space:nowrap}
.category-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,195px),1fr));gap:12px}
.category-tile{position:relative;display:flex;align-items:flex-start;flex-direction:column;gap:9px;min-width:0;min-height:148px;padding:17px 17px 13px;text-align:right;border:1px solid var(--line);border-radius:17px;background:var(--paper2);color:var(--ink);font-family:var(--ui)!important;transition:background-color .2s,border-color .2s,box-shadow .2s,transform .2s;overflow-wrap:anywhere}
.category-tile:hover{transform:translateY(-2px);border-color:var(--gold);box-shadow:0 7px 21px rgba(89,65,19,.13)}
.category-tile:focus-visible{outline:3px solid var(--gold)!important;outline-offset:3px}
.category-tile-mark{display:grid;place-items:center;width:32px;height:32px;flex:none;border-radius:10px;background:rgba(177,138,76,.14);color:var(--gold);font-size:19px}
.category-tile-name{display:block;font-size:.99rem;font-weight:800;line-height:1.65;flex:1;max-width:100%}
.category-tile-count{align-self:flex-start;font-size:.76rem;color:var(--muted);line-height:1.5}
.category-tile.active{background:linear-gradient(135deg,var(--deep),#176654);color:#fff8df;border-color:var(--gold);box-shadow:0 10px 22px rgba(13,60,49,.16)}
.category-tile.active .category-tile-count{color:#e9d9b0}.category-tile.active .category-tile-mark{background:rgba(255,245,211,.16);color:#efca76}
.category-tile-all{border-style:solid;border-color:var(--gold)}
.selected-collection{color:var(--body);font-size:.86rem;margin:16px 3px 0;padding:8px 12px;border-right:3px solid var(--gold);background:rgba(177,138,76,.09);border-radius:6px}
.poem-source-note{display:inline-flex;align-items:center;color:var(--muted);font-size:.78rem;line-height:1.8}
#poetPoems{scroll-margin-top:100px}
html[data-theme=night] .poet-collections{background:#20241e;border-color:rgba(221,190,125,.24)}
html[data-theme=night] .category-tile{background:#27332e;color:#efead8;border-color:rgba(221,190,125,.25)}
html[data-theme=night] .category-tile.active{background:linear-gradient(130deg,#105140,#176654);border-color:#dbb56d;color:#fff8df}
html[data-theme=night] .category-tile.active .category-tile-count{color:#f0dfbc}
@media(max-width:680px){.poet-collections{padding:15px;margin-bottom:18px}.category-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.category-tile{min-height:129px;padding:12px;gap:7px;border-radius:13px}.category-tile-name{font-size:.87rem}.category-tile-count{font-size:.72rem}.category-tile-mark{height:28px;width:28px}.poet-collections-heading h2{font-size:1.18rem}#poetPoems{scroll-margin-top:80px}}
@media(max-width:360px){.category-grid{grid-template-columns:1fr}.category-tile{min-height:0}}
@media(prefers-reduced-motion:reduce){.category-tile{transition:none}}
