/* One visual system in two modes. Loaded after all layout and paper styles. */
html:not(.light-theme){color-scheme:dark;--scene:#101f20;--scene-glow-one:#2c5148;--scene-glow-two:#402c2c;--scene-pattern:#d8b879;--surface:#172d2a;--surface-2:#23413a;--text:#f8f2e8;--muted:#d5ddd4;--line:#d6ad746b;--ink:#382b25;--paper:#fff8e8;--action:#f28c7c;--action-text:#251d1b;--highlight:#9cf0d4}
html.light-theme{color-scheme:light;--scene:#f2e6d4;--scene-glow-one:#dae9dd;--scene-glow-two:#f6d7c5;--scene-pattern:#745b40;--surface:#fff8eb;--surface-2:#e8efe4;--text:#303b36;--muted:#53645d;--line:#a67d5f85;--ink:#382b25;--paper:#fff8e8;--action:#f28c7c;--action-text:#251d1b;--highlight:#185e55}
html:not(.light-theme) body,html.light-theme body{background-color:var(--scene);color:var(--text)}
/* Keep the backdrop behind the poems identical in shape across both themes. */
html:not(.light-theme) body,html.light-theme body{background-image:radial-gradient(circle at 90% 5%,var(--scene-glow-one),transparent 32%),radial-gradient(circle at 5% 40%,var(--scene-glow-two),transparent 36%)}
html:not(.light-theme) body::before,html.light-theme body::before{opacity:.11;background-image:linear-gradient(30deg,transparent 47%,var(--scene-pattern) 49%,transparent 51%),linear-gradient(-30deg,transparent 47%,var(--scene-pattern) 49%,transparent 51%)}
html:not(.light-theme) header,html.light-theme header{background:var(--surface);color:var(--text);border-color:var(--line)}
html:not(.light-theme) header .brand span,html.light-theme header .brand span{color:var(--muted)}
html.light-theme header .brand .name-mark,html.light-theme header .brand .jana-name-font{color:#794832}
html:not(.light-theme) header>.index-toggle,html.light-theme header>.index-toggle,html:not(.light-theme) .home-actions button,html.light-theme .home-actions button,html:not(.light-theme) .home-actions .index-toggle,html.light-theme .home-actions .index-toggle{background:var(--action);color:var(--action-text);border:1px solid #d17061;box-shadow:0 5px 0 #a64e44;font-weight:800}
html:not(.light-theme) header>.index-toggle:hover,html.light-theme header>.index-toggle:hover,html:not(.light-theme) .home-actions button:hover,html.light-theme .home-actions button:hover{background:#ffa494}
html:not(.light-theme) .home-intro,html.light-theme .home-intro{color:var(--text);border-color:var(--line)}
html:not(.light-theme) .home-intro{background:radial-gradient(circle at 10% 25%,#315c56,transparent 30%),linear-gradient(125deg,#203938,#112322 75%);box-shadow:0 22px 60px #0008}
html.light-theme .home-intro{background:radial-gradient(circle at 10% 24%,#d3e8db,transparent 34%),linear-gradient(125deg,#fff8ec,#e6efe5 76%);box-shadow:0 17px 38px #55412b21}
html.light-theme .home-intro::before{color:#cf827738}
html.light-theme .home-intro::after{border-color:#8f796843;box-shadow:0 0 0 34px #bb9b7d12,0 0 0 68px #bb9b7d0b}
html.light-theme .home-intro .home-monogram{background:linear-gradient(145deg,#9e713f,#c26d63)}
html:not(.light-theme) .home-intro h1{color:#fff8ed;text-shadow:5px 7px 0 #8e514a,10px 14px 24px #0007}
html.light-theme .home-intro h1{color:#204840;text-shadow:4px 5px 0 #e8a39b,8px 10px 20px #826d5533}
html:not(.light-theme) .home-intro .author-motto,html:not(.light-theme) .home-intro .home-memory{color:#e6bd78}
html.light-theme .home-intro .author-motto,html.light-theme .home-intro .home-memory{color:#77503e}
html:not(.light-theme) .home-intro .home-lead{color:#e5eee8}
html.light-theme .home-intro .home-lead{color:#405750}
html:not(.light-theme) .home-intro .eyebrow{background:#9cf0d412;border-color:#9cf0d47a;color:#9cf0d4}
html.light-theme .home-intro .eyebrow{background:#dceee4;border-color:#7caea0;color:#245a50}
html:not(.light-theme) .home-intro>.home-memory:first-child,html.light-theme .home-intro>.home-memory:first-child{background:var(--surface);border-color:var(--line);color:var(--text)}
html.light-theme .home-intro>.home-memory:first-child{box-shadow:0 5px 12px #55412b1c}
html:not(.light-theme) .home-about,html.light-theme .home-about{background:#fff8e9;color:var(--ink);border-color:#c6a06a}
html.light-theme .home-about h2,html.light-theme .home-about p{color:#493c31}
html.light-theme .home-about .jana-name-font{color:#915142}
html:not(.light-theme) .home-intro .poetry-themes span{background:#9cf0d414;border-color:#9cf0d46e;color:#9cf0d4}
html:not(.light-theme) .home-intro .poetry-themes span:nth-child(2n){background:#f285771b;border-color:#f2857799;color:#ffc3b1}
html.light-theme .home-intro .poetry-themes span{background:#d8ebe2;border:1px solid #76a99d;color:#24574e}
html.light-theme .home-intro .poetry-themes span:nth-child(2n){background:#f9ded5;border-color:#d89186;color:#813f3b}
html:not(.light-theme) .daily-poem,html:not(.light-theme) .random-quote,html:not(.light-theme) .diwan-stats span,html.light-theme .daily-poem,html.light-theme .random-quote,html.light-theme .diwan-stats span{background:#fff8e9;color:#493c31;border-color:#c6a06a}
html:not(.light-theme) .poet-home-link,html:not(.light-theme) .upcoming-poems{background:var(--surface);color:#e6bd78;border-color:var(--line)}
html.light-theme .poet-home-link,html.light-theme .upcoming-poems{background:var(--surface);color:#27554b;border-color:var(--line)}
html.light-theme .upcoming-poems h2,html.light-theme .upcoming-poems p{color:#405750}
html:not(.light-theme) #poem-drawer,html.light-theme #poem-drawer{background:var(--surface);color:var(--text);border-color:var(--line)}
html:not(.light-theme) .drawer-heading h2,html:not(.light-theme) .poem-index h2{color:#f8f2e8}
html.light-theme .drawer-heading h2,html.light-theme .poem-index h2{color:#315449}
html:not(.light-theme) #poem-drawer .drawer-home,html:not(.light-theme) #poem-drawer .drawer-author-note{background:#244139!important;color:#e6bd78;border-color:var(--line)!important}
html.light-theme #poem-drawer .drawer-home,html.light-theme #poem-drawer .drawer-author-note{background:#f3e8d7!important;color:#315449;border-color:var(--line)!important}
html.light-theme .drawer-author-note h3,html.light-theme .drawer-author-note p,html.light-theme .drawer-author-note a{color:#405750}
html.light-theme #close-index{color:#315449;border-color:#9c8063}
html:not(.light-theme) .poem-index nav a{background:#213632;border-color:var(--line)!important;color:#f8f2e8}
html.light-theme .poem-index nav a{background:#fffaf1;border-color:var(--line)!important;color:#303b36}
html:not(.light-theme) .poem-index nav a:hover,html:not(.light-theme) .poem-index nav a[aria-current=true]{background:#31524a;border-color:#9cf0d4!important}
html.light-theme .poem-index nav a:hover,html.light-theme .poem-index nav a[aria-current=true]{background:#e3f0e7;border-color:#498a79!important}
html:not(.light-theme) .poem-index nav .number,html.light-theme .poem-index nav .number{background:var(--action);color:var(--action-text);border-color:#d17061}
html.light-theme .poem-index nav small{color:#5a655b}
html:not(.light-theme) .search-row input{background:#213732;color:#f8f2e8;border-color:var(--line)}
html.light-theme .search-row input{background:#fffdf6;color:#303b36;border-color:#a88468}
html.light-theme .search-row input::placeholder{color:#68665c}
html:not(.light-theme) .search-row button,html.light-theme .search-row button{background:var(--action);color:var(--action-text);border-color:#d17061}
html.light-theme .diwan-filters select,html.light-theme .diwan-filters button,html.light-theme #reading-toolbar button{background:#fffaf1;color:#315449;border-color:#a88468}
html.light-theme .diwan-filters [aria-pressed=true]{background:#2e6b5f;color:#fff;border-color:#2e6b5f}
html.light-theme .diwan-filters small,html.light-theme #search-status{color:#53645d}
html:not(.light-theme) #reading-toolbar,html.light-theme #reading-toolbar{background:var(--surface);color:var(--text);border-color:var(--line)}
html.light-theme #reading-toolbar>a,html.light-theme #reading-toolbar .font-status{color:#245e53}
html.light-theme .reading-mode #reading-toolbar{background:var(--surface)}
/* Paper and its watermark stay intentionally the same in both modes. */
html:not(.light-theme) article.poem-card,html.light-theme article.poem-card{background:linear-gradient(90deg,transparent calc(100% - 80px),#d9868a3a calc(100% - 79px),#d9868a3a calc(100% - 77px),transparent calc(100% - 76px)),repeating-linear-gradient(to bottom,transparent 0,transparent 41px,#7fa9a524 42px,transparent 43px),var(--paper);color:var(--ink);box-shadow:4px 5px 0 #ead4a8,9px 11px 0 #be8d68,18px 25px 48px #0006}
html:not(.light-theme) .poem-card .verses p,html.light-theme .poem-card .verses p{background:repeating-linear-gradient(to bottom,#fffaf0 0,#fffaf0 38px,#91adad39 39px,#fffaf0 40px);color:#403029}
html:not(.light-theme) .poem-card .verses p:nth-child(even),html.light-theme .poem-card .verses p:nth-child(even){background:repeating-linear-gradient(to bottom,#fbf0e4 0,#fbf0e4 38px,#b7a2a13d 39px,#fbf0e4 40px)}
html.light-theme .poem-card h2{color:#51392c}
html.light-theme .poem-card .paper-top,html.light-theme .poem-card .paper-bottom{color:#795e48}
html.light-theme .poem-card .ornament{color:#ce785e}
html.light-theme .poem-card .author-seal{color:#62441f}
html:not(.light-theme) footer,html.light-theme footer{background:var(--surface);color:var(--muted);border-color:var(--line)}
html.light-theme footer .footer-brand{color:#795039}
html.light-theme footer .footer-description{color:#53645d}
html.light-theme .poet-profile{color:#303b36}
html.light-theme .poet-profile h1{color:#204840;text-shadow:3px 4px 0 #e8a39b}
html.light-theme .poet-profile .eyebrow,html.light-theme .poet-profile .poet-alias,html.light-theme .poet-profile .author-motto,html.light-theme .poet-profile .poet-memory{color:#77503e}
html.light-theme .poet-profile section{background:#fff8e9;color:#493c31;border-color:#c6a06a}
html.light-theme .poet-profile section h2,html.light-theme .poet-profile section p{color:#493c31}
html.light-theme .poet-profile .poetry-themes span{background:#d8ebe2;color:#24574e;border-color:#76a99d}
html.light-theme .poet-profile .poetry-themes span:nth-child(2n){background:#f9ded5;color:#813f3b;border-color:#d89186}
html.light-theme .poet-back{background:var(--action);color:var(--action-text);border-color:#d17061}
html.light-theme .poet-photo-slot{background:#f6ebd9;border-color:#b7834e}
html.light-theme .poet-profile .author-seal{color:#795039}
html.light-theme .poem-timeline summary{color:#27554b}
html.light-theme #home .home-theme-toggle{color:#315449}
html.light-theme #home .home-theme-toggle:hover{color:#a34941}
html.light-theme .site-toast,html.light-theme .dhikr-watermark{background:#fff8e9;color:#493c31;border-color:#c6a06a}
html.light-theme .meaning-dialog{background:#fff8e9;color:#493c31}
@media(max-width:760px){html:not(.light-theme) article.poem-card,html.light-theme article.poem-card{background:repeating-linear-gradient(to bottom,transparent 0,transparent 40px,#7fa9a521 41px,transparent 42px),var(--paper);box-shadow:3px 4px 0 #ead4a8,7px 8px 0 #be8d68,10px 16px 24px #0005}}

/* Poet page: the outer profile must switch surfaces together with its text. */
html.light-theme main.poet-profile{
  background:radial-gradient(circle at 92% 4%,#d9e9df 0,transparent 32%),linear-gradient(145deg,#fff9ee,#f1eadc);
  color:#303b36;
  border:1px solid #c4a488;
  border-radius:30px;
  box-shadow:0 17px 38px #55412b22;
  padding:clamp(22px,4vw,48px);
}
html.light-theme .poet-profile>.eyebrow{background:#dceee4;border:1px solid #7caea0;color:#245a50}
html.light-theme .poet-profile>h1{color:#204840;text-shadow:3px 4px 0 #e8a39b}
html.light-theme .poet-profile .poet-alias,html.light-theme .poet-profile .jana-name-font{color:#805039}
html.light-theme .poet-profile .poet-photo-slot{background:#f8eddc;border-color:#b7834e;box-shadow:8px 8px 0 #d3ad8a}
html.light-theme .poet-profile-grid section{background:#fffaf1;color:#493c31;border-color:#c6a06a;box-shadow:7px 7px 0 #dbc4a4}
html.light-theme .poet-profile-grid section h2{color:#244c43}
html.light-theme .poet-profile-grid section p{color:#493c31}
html.light-theme .poet-profile .poetry-themes span{background:#d8ebe2;color:#24574e;border-color:#76a99d}
html.light-theme .poet-profile .poetry-themes span:nth-child(2n){background:#f9ded5;color:#813f3b;border-color:#d89186}
html.light-theme .poet-profile .poet-back{background:#f28c7c;color:#251d1b;border:1px solid #d17061;box-shadow:0 4px 0 #a64e44}
html.light-theme .poet-profile .poet-motto,html.light-theme .poet-profile .poet-memory{color:#76503c;border-color:#b89877}
html.light-theme header>a:not(.brand){color:#315449}
html.light-theme header>a:not(.brand):hover{color:#a34941}
@media(max-width:760px){html.light-theme main.poet-profile{padding:22px 15px;border-radius:20px}html.light-theme .poet-profile-grid section{box-shadow:4px 4px 0 #dbc4a4}}

/* Dhikr and welcome messages follow the active palette and stay clear of verses. */
html:not(.light-theme){--notice-bg:#203a35;--notice-text:#f9f3e8;--notice-border:#91cbb6;--notice-accent:#e6bd78;--notice-shadow:0 12px 30px #0008}
html.light-theme{--notice-bg:#fff9ed;--notice-text:#29483e;--notice-border:#7eac9b;--notice-accent:#bb694e;--notice-shadow:0 12px 30px #594d3840}
html:not(.light-theme) .dhikr-watermark,html.light-theme .dhikr-watermark{
  inset:auto auto 18px 18px;
  transform:none;
  box-sizing:border-box;
  width:max-content;
  max-width:min(270px,calc(100vw - 36px));
  padding:12px 16px;
  border:1px solid var(--notice-border);
  border-inline-start:4px solid var(--notice-accent);
  border-radius:15px;
  background:var(--notice-bg);
  color:var(--notice-text);
  box-shadow:var(--notice-shadow);
  text-align:center;
  font:700 15px/1.8 Tahoma,Arial,sans-serif;
  letter-spacing:0;
  opacity:0;
  transition:opacity .28s ease,visibility .28s ease;
}
html:not(.light-theme) .dhikr-watermark.visible,html.light-theme .dhikr-watermark.visible{opacity:1;visibility:visible}
html:not(.light-theme) .dhikr-watermark.pulse,html.light-theme .dhikr-watermark.pulse{animation:dhikrCardPulse .65s ease}
@keyframes dhikrCardPulse{50%{transform:scale(1.025)}}
html:not(.light-theme) .site-toast,html.light-theme .site-toast{
  top:84px;
  width:max-content;
  max-width:min(460px,calc(100vw - 32px));
  padding:12px 18px;
  border:1px solid var(--notice-border);
  border-inline-start:4px solid var(--notice-accent);
  border-radius:15px;
  background:var(--notice-bg);
  color:var(--notice-text);
  box-shadow:var(--notice-shadow);
  text-align:center;
  font:700 15px/1.75 Tahoma,Arial,sans-serif;
}
html:not(.light-theme) .site-toast .jana-name-font{color:#e6bd78}
html.light-theme .site-toast .jana-name-font{color:#93523d}
@media(max-width:600px){
  html:not(.light-theme) .dhikr-watermark,html.light-theme .dhikr-watermark{left:12px;bottom:12px;max-width:min(235px,calc(100vw - 24px));font-size:14px;padding:10px 13px}
  html:not(.light-theme) .site-toast,html.light-theme .site-toast{top:72px;width:calc(100% - 30px);font-size:14px}
}
@media(prefers-reduced-motion:reduce){html:not(.light-theme) .dhikr-watermark.pulse,html.light-theme .dhikr-watermark.pulse{animation:none}}

/* Recorded readings appear on the parchment in either theme. */
.poem-card .poem-audio{max-width:650px;margin:10px auto 24px;padding:16px 20px;background:#fffaf1;border:1px solid #c9a56d;border-inline-start:4px solid #b86954;border-radius:12px;box-shadow:3px 4px 0 #e2d1b2;color:#473529;text-align:right}
.poem-card .poem-audio h3{margin:0 0 9px;font:700 17px/1.8 Tahoma,Arial,sans-serif;color:#59402f}
.poem-card .poem-audio audio{display:block;width:100%;min-height:44px;color-scheme:light}
.poem-card .poem-audio p{font:13px/1.7 Tahoma,Arial,sans-serif;margin:10px 0 0;color:#735b48}
@media(max-width:760px){.poem-card .poem-audio{padding:12px;margin:8px 0 20px}}
