:root {
  --ink: #2c2330;
  --muted: #736b75;
  --plum: #4f2e57;
  --plum-dark: #352039;
  --mint: #cfe3d8;
  --mint-deep: #8eb7a3;
  --cream: #fbf7f0;
  --paper: #fffdf9;
  --coral: #d9826f;
  --gold: #d7ad62;
  --line: #e9e0d7;
  --shadow: 0 20px 60px rgba(61, 42, 62, .11);
  --radius: 28px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--cream); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
body.is-locked { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid rgba(217, 130, 111, .38); outline-offset: 3px; }
[hidden] { display: none !important; }

.skip-link { position: fixed; top: 10px; left: 10px; z-index: 200; padding: 10px 16px; background: var(--plum); color: white; transform: translateY(-150%); border-radius: 10px; }
.skip-link:focus { transform: none; }

.site-header { position: sticky; top: 0; z-index: 50; height: 78px; padding: 0 clamp(22px, 4vw, 68px); display: flex; align-items: center; gap: 28px; background: rgba(251, 247, 240, .9); border-bottom: 1px solid rgba(79, 46, 87, .08); backdrop-filter: blur(18px); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50% 50% 50% 14px; color: white; background: var(--plum); font-family: var(--serif); font-size: 25px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.brand strong, .brand small { display: block; line-height: 1.1; }
.brand strong { font-family: var(--serif); font-size: 20px; }
.brand small { margin-top: 4px; color: var(--muted); font-size: 10px; letter-spacing: .09em; text-transform: uppercase; }
.desktop-nav { display: flex; align-items: stretch; gap: 8px; height: 100%; margin: 0 auto; }
.nav-link { position: relative; padding: 0 15px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; font-weight: 650; }
.nav-link::after { content: ""; position: absolute; right: 15px; bottom: 0; left: 15px; height: 3px; background: var(--coral); border-radius: 4px 4px 0 0; transform: scaleX(0); transition: transform .2s ease; }
.nav-link:hover, .nav-link.is-active { color: var(--plum); }
.nav-link.is-active::after { transform: scaleX(1); }
.nav-count { display: inline-grid; min-width: 20px; height: 20px; place-items: center; padding: 0 5px; margin-left: 4px; border-radius: 20px; background: var(--mint); color: var(--plum); font-size: 11px; }
.preview-badge { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border: 1px solid #dfd4e0; border-radius: 999px; background: #fffafd; color: var(--plum); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.preview-badge span { width: 7px; height: 7px; border-radius: 50%; background: #68a27e; box-shadow: 0 0 0 4px rgba(104, 162, 126, .13); }

.view { display: none; animation: enter .3s ease both; }
.view.is-active { display: block; }
@keyframes enter { from { opacity: 0; transform: translateY(5px); } }
.eyebrow { display: inline-block; color: var(--coral); font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }

.hero-shell { min-height: 530px; padding: 78px clamp(24px, 7vw, 110px) 65px; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(340px, .92fr); align-items: center; gap: clamp(40px, 8vw, 120px); overflow: hidden; background: linear-gradient(135deg, #f9f0e7 0%, #f8f4ed 54%, #eef5ef 100%); border-bottom: 1px solid var(--line); }
.hero-copy { position: relative; z-index: 2; max-width: 700px; }
.hero-copy h1, .page-hero h1, .contribution-intro h1 { max-width: 660px; margin: 15px 0 18px; font: 500 clamp(43px, 6vw, 78px)/.98 var(--serif); letter-spacing: -.04em; }
.hero-copy h1 em { color: var(--plum); font-style: italic; font-weight: 500; }
.hero-copy > p { max-width: 620px; margin: 0; color: var(--muted); font-size: clamp(17px, 2vw, 20px); line-height: 1.65; }
.hero-search { display: flex; align-items: stretch; gap: 12px; max-width: 760px; margin-top: 30px; }
.search-box { flex: 1; min-width: 0; display: flex; align-items: center; gap: 11px; padding: 0 17px; border: 1px solid #ded4cb; border-radius: 16px; background: white; box-shadow: 0 10px 35px rgba(61, 42, 62, .08); }
.search-box > span { color: var(--plum); font-size: 26px; transform: rotate(-12deg); }
.search-box input { width: 100%; height: 58px; border: 0; outline: none; color: var(--ink); background: transparent; }
.search-box input::placeholder { color: #999198; }
kbd { padding: 4px 7px; border: 1px solid #ddd4cc; border-radius: 6px; background: #f7f3ef; color: #827a82; font: 11px var(--sans); white-space: nowrap; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 20px; border: 1px solid transparent; border-radius: 14px; cursor: pointer; font-weight: 750; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: white; background: var(--plum); box-shadow: 0 10px 24px rgba(79, 46, 87, .21); }
.button-primary:hover { background: var(--plum-dark); }
.button-secondary { border-color: #dcd0d9; color: var(--plum); background: white; }
.button-light { color: var(--plum); background: #fffaf5; }
.button-full { width: 100%; margin-top: 4px; }
.quick-themes { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 18px; color: var(--muted); font-size: 12px; }
.quick-themes button, .story-filters button, .active-filters button { padding: 7px 11px; border: 1px solid #dfd4ca; border-radius: 999px; background: rgba(255,255,255,.62); cursor: pointer; color: var(--plum); font-size: 12px; }
.quick-themes button:hover { background: white; }

.hero-art { position: relative; height: 360px; }
.orbit { position: absolute; border: 1px solid rgba(79,46,87,.15); border-radius: 50%; }
.orbit::before, .orbit::after { content: ""; position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--coral); }
.orbit-one { width: 330px; height: 330px; top: 10px; left: 50%; transform: translateX(-50%); }
.orbit-one::before { top: 35px; left: 42px; }
.orbit-one::after { right: 17px; bottom: 89px; background: var(--mint-deep); }
.orbit-two { width: 245px; height: 245px; top: 52px; left: 50%; transform: translateX(-50%); border-style: dashed; }
.script { position: absolute; z-index: 1; color: rgba(79,46,87,.82); font-family: var(--serif); }
.script-arabic { top: 11px; right: 9%; font-size: 48px; transform: rotate(5deg); }
.script-urdu { right: 2%; bottom: 42px; color: #5f8a75; font-size: 38px; transform: rotate(-5deg); }
.script-latin { bottom: 4px; left: 10%; color: var(--coral); font-size: 35px; font-style: italic; }
.script-hebrew { top: 72px; left: 1%; color: var(--gold); font-size: 33px; }
.hero-card { position: absolute; z-index: 2; top: 75px; left: 50%; width: 245px; min-height: 210px; padding: 30px; display: flex; flex-direction: column; align-items: center; justify-content: center; transform: translateX(-50%) rotate(-2deg); background: var(--paper); border: 1px solid rgba(79,46,87,.1); border-radius: 34px 34px 34px 10px; box-shadow: var(--shadow); text-align: center; }
.hero-card::before { content: "✦"; margin-bottom: 15px; color: var(--gold); font-size: 22px; }
.hero-card small { color: var(--muted); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.hero-card strong { margin: 9px 0 7px; color: var(--plum); font: 500 39px var(--serif); }
.hero-card span { color: var(--muted); font-size: 13px; }

.catalogue-shell { max-width: 1500px; margin: 0 auto; padding: 64px clamp(22px, 4vw, 70px) 90px; display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: clamp(35px, 5vw, 75px); }
.filter-panel { align-self: start; position: sticky; top: 102px; padding: 26px; border: 1px solid var(--line); border-radius: 24px; background: rgba(255,253,249,.78); }
.filter-heading, .results-heading, .section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.filter-heading h2, .results-heading h2, .section-heading h2 { margin: 5px 0 0; font: 500 28px/1.1 var(--serif); }
.text-button { border: 0; border-bottom: 1px solid currentColor; background: transparent; color: var(--coral); cursor: pointer; font-size: 12px; }
fieldset { padding: 24px 0; margin: 22px 0 0; border: 0; border-top: 1px solid var(--line); }
legend, .select-label { color: var(--ink); font-size: 12px; font-weight: 750; }
.segmented { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; margin-top: 12px; }
.segmented button { height: 36px; border: 1px solid #e2d9d0; border-radius: 10px; background: white; color: var(--muted); cursor: pointer; font-size: 12px; }
.segmented button.is-active { border-color: var(--plum); color: white; background: var(--plum); }
.select-label { display: block; padding: 18px 0; border-top: 1px solid var(--line); }
select { width: 100%; height: 42px; padding: 0 36px 0 12px; margin-top: 9px; border: 1px solid #ded4ca; border-radius: 10px; color: var(--ink); background: white; }
.toggle-row { padding: 20px 0; display: flex; justify-content: space-between; gap: 15px; align-items: center; border-top: 1px solid var(--line); cursor: pointer; }
.toggle-row strong, .toggle-row small { display: block; }
.toggle-row strong { font-size: 12px; }
.toggle-row small { max-width: 180px; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.toggle-row input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-row i { position: relative; flex: 0 0 42px; height: 24px; border-radius: 20px; background: #ded8d4; transition: .2s; }
.toggle-row i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: white; box-shadow: 0 2px 5px rgba(0,0,0,.15); transition: .2s; }
.toggle-row input:checked + i { background: var(--plum); }
.toggle-row input:checked + i::after { transform: translateX(18px); }
.collection-note { padding: 17px; display: flex; gap: 11px; border-radius: 15px; background: #f3eee8; color: var(--muted); }
.collection-note > span { color: var(--gold); }
.collection-note p { margin: 0; font-size: 10px; line-height: 1.55; }
.collection-note strong { display: block; color: var(--ink); font-size: 11px; }
.sort-label { min-width: 120px; color: var(--muted); font-size: 11px; }
.sort-label select { height: 38px; margin-top: 4px; }
.active-filters { min-height: 30px; display: flex; flex-wrap: wrap; gap: 7px; margin: 18px 0 8px; }
.active-filters button { display: inline-flex; gap: 6px; border-color: #e4d2cd; color: var(--ink); background: #fff5f1; }
.name-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.name-card { position: relative; min-height: 245px; padding: 23px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 22px 22px 22px 8px; background: var(--paper); box-shadow: 0 9px 25px rgba(61,42,62,.045); cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; overflow: hidden; }
.name-card::after { content: ""; position: absolute; right: -35px; bottom: -45px; width: 110px; height: 110px; border-radius: 50%; background: var(--card-tint, #eef5ef); opacity: .7; }
.name-card:hover { transform: translateY(-4px); border-color: #d7c6d7; box-shadow: 0 15px 35px rgba(61,42,62,.1); }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.gender-pill, .status-pill { display: inline-flex; padding: 6px 9px; border-radius: 999px; background: #edf4ef; color: #4b725e; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.gender-pill.girl { color: #985d70; background: #f8ebef; }
.gender-pill.unisex { color: #735a2a; background: #f7f0df; }
.save-button, .sound-button, .compare-add { position: relative; z-index: 2; border: 0; background: transparent; cursor: pointer; }
.save-button { width: 34px; height: 34px; border: 1px solid #e6ddd5; border-radius: 50%; color: var(--plum); font-size: 21px; line-height: 1; }
.save-button.is-saved { color: white; background: var(--coral); border-color: var(--coral); }
.name-card h3 { margin: 17px 0 2px; color: var(--plum); font: 500 31px var(--serif); letter-spacing: -.02em; }
.native-name { min-height: 28px; color: #6b5e69; font: 20px/1.3 var(--serif); direction: auto; }
.meaning-line { margin: 13px 0 auto; color: var(--muted); font: italic 14px/1.45 var(--serif); }
.card-meta { position: relative; z-index: 2; padding-top: 17px; margin-top: 17px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid #eee7e0; color: var(--muted); font-size: 10px; }
.card-meta span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.confidence { display: inline-flex; align-items: center; gap: 4px; color: #5f806c; white-space: nowrap; }
.confidence::before { content: "✓"; width: 15px; height: 15px; display: grid; place-items: center; border-radius: 50%; background: #dcebe2; font-size: 9px; }
.empty-state, .saved-empty { padding: 70px 20px; text-align: center; border: 1px dashed #d9cec5; border-radius: 22px; background: rgba(255,255,255,.45); }
.empty-state span, .saved-empty > span { color: var(--coral); font-size: 45px; }
.empty-state h3, .saved-empty h2 { margin: 12px 0 5px; font: 500 28px var(--serif); }
.empty-state p, .saved-empty p { margin: 0 0 20px; color: var(--muted); }
.load-more { width: 100%; margin-top: 22px; }

.page-hero { padding: 95px 24px 80px; text-align: center; }
.page-hero h1 { margin-right: auto; margin-left: auto; }
.page-hero p { max-width: 690px; margin: 0 auto 27px; color: var(--muted); font-size: 18px; line-height: 1.65; }
.community-hero { color: white; background: radial-gradient(circle at 8% 20%, rgba(207,227,216,.17), transparent 27%), radial-gradient(circle at 92% 80%, rgba(217,130,111,.19), transparent 25%), var(--plum); }
.community-hero .eyebrow { color: #e9b3a5; }
.community-hero p { color: rgba(255,255,255,.72); }
.community-hero .button { background: #fff9f2; color: var(--plum); box-shadow: none; }
.community-stats { max-width: 1060px; margin: -32px auto 0; padding: 24px; position: relative; z-index: 2; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: var(--shadow); }
.community-stats div { text-align: center; border-right: 1px solid var(--line); }
.community-stats div:last-child { border: 0; }
.community-stats strong, .community-stats span { display: block; }
.community-stats strong { color: var(--plum); font: 500 28px var(--serif); }
.community-stats span { margin-top: 5px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.stories-shell { max-width: 1240px; margin: 0 auto; padding: 90px 28px 100px; }
.story-filters { display: flex; flex-wrap: wrap; gap: 7px; }
.story-filters button.is-active { color: white; background: var(--plum); border-color: var(--plum); }
.story-grid { margin-top: 32px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.story-card { min-height: 310px; padding: 28px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 26px 26px 26px 8px; background: var(--paper); }
.story-card:nth-child(3n+2) { background: #f1f6f2; }
.story-card:nth-child(3n+3) { background: #fbefea; }
.story-quote { margin: 22px 0 auto; font: 500 22px/1.35 var(--serif); }
.story-name { color: var(--plum); font: italic 18px var(--serif); }
.story-footer { padding-top: 22px; margin-top: 25px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid rgba(79,46,87,.1); color: var(--muted); font-size: 11px; }
.story-like { border: 0; background: transparent; cursor: pointer; color: var(--muted); }
.story-like.is-liked { color: var(--coral); }
.community-invite { margin-top: 60px; padding: 45px clamp(28px, 5vw, 60px); display: flex; align-items: center; justify-content: space-between; gap: 30px; border-radius: 30px 30px 30px 10px; color: white; background: var(--plum); }
.community-invite h2 { margin: 8px 0; font: 500 34px var(--serif); }
.community-invite p { max-width: 670px; margin: 0; color: rgba(255,255,255,.7); line-height: 1.55; }

.contribution-shell { max-width: 1200px; margin: 0 auto; padding: 85px 28px; display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(45px, 8vw, 100px); align-items: start; }
.contribution-intro { position: sticky; top: 120px; }
.contribution-intro h1 { font-size: clamp(43px, 5vw, 65px); }
.contribution-intro > p { color: var(--muted); font-size: 17px; line-height: 1.7; }
.principle-list { margin-top: 38px; }
.principle-list > div { padding: 18px 0; display: flex; gap: 16px; border-top: 1px solid var(--line); }
.principle-list > div > span { flex: 0 0 35px; color: var(--coral); font: 16px var(--serif); }
.principle-list p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.principle-list strong { display: block; margin-bottom: 3px; color: var(--ink); font-size: 14px; }
.form-card { padding: 34px; border: 1px solid var(--line); border-radius: 28px 28px 28px 10px; background: white; box-shadow: var(--shadow); }
.form-tabs { padding: 5px; display: grid; grid-template-columns: 1fr 1fr; gap: 5px; border-radius: 13px; background: #f3eee9; }
.form-tabs button { height: 42px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; font-weight: 700; }
.form-tabs button.is-active { background: white; color: var(--plum); box-shadow: 0 4px 14px rgba(61,42,62,.08); }
.form-section { padding-top: 26px; }
.form-section label { display: block; margin-bottom: 19px; color: var(--ink); font-size: 12px; font-weight: 750; }
.form-section label > span { color: var(--coral); }
.form-section input, .form-section textarea, .form-section select { width: 100%; margin-top: 8px; border: 1px solid #ded4cb; border-radius: 11px; color: var(--ink); background: #fffcf8; outline: none; font-weight: 400; }
.form-section input { height: 47px; padding: 0 13px; }
.form-section textarea { padding: 13px; resize: vertical; line-height: 1.5; }
.form-section input:focus, .form-section textarea:focus, .form-section select:focus { border-color: var(--plum); box-shadow: 0 0 0 3px rgba(79,46,87,.08); }
.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.consent-row { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 20px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.consent-row input { margin-top: 2px; accent-color: var(--plum); }
.form-footnote { margin: 13px 0 0; color: var(--muted); text-align: center; font-size: 10px; }
.pending-shell { max-width: 1200px; padding: 0 28px 100px; margin: 0 auto; }
.pending-list { margin-top: 22px; display: grid; gap: 10px; }
.pending-item { padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.pending-item strong, .pending-item small { display: block; }
.pending-item small { margin-top: 4px; color: var(--muted); }
.pending-item button { border: 0; background: transparent; color: var(--coral); cursor: pointer; }

.saved-shell { max-width: 1240px; min-height: 680px; margin: 0 auto; padding: 0 28px 100px; }
.saved-hero { padding-bottom: 55px; }
.saved-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.saved-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }

.dua-hero { padding: 76px clamp(24px, 7vw, 110px); display: flex; align-items: flex-end; justify-content: space-between; gap: 45px; color: white; background: radial-gradient(circle at 10% 15%, rgba(215,173,98,.2), transparent 28%), radial-gradient(circle at 90% 80%, rgba(207,227,216,.16), transparent 27%), var(--plum); }
.dua-hero > div:first-child { max-width: 830px; }
.dua-hero .eyebrow { color: #efc99d; }
.dua-hero h1 { margin: 14px 0 15px; font: 500 clamp(42px, 6vw, 72px)/1 var(--serif); letter-spacing: -.035em; }
.dua-hero h1 em { display: block; margin-top: 10px; color: var(--mint); font-size: .55em; font-weight: 400; }
.dua-hero p { max-width: 790px; margin: 0; color: rgba(255,255,255,.75); font-size: 16px; line-height: 1.7; }
.dua-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; flex: 0 0 auto; }
.dua-hero .button-secondary { border-color: rgba(255,255,255,.3); color: white; background: transparent; }
.dua-shell { max-width: 1320px; margin: 0 auto; padding: 52px 28px 100px; }
.dua-controls { margin-bottom: 30px; display: flex; align-items: flex-end; justify-content: space-between; gap: 25px; }
.dua-search { min-width: min(380px, 100%); color: var(--ink); font-size: 12px; font-weight: 750; }
.dua-search input { width: 100%; height: 48px; padding: 0 14px; margin-top: 8px; border: 1px solid #ded4cb; border-radius: 12px; background: white; }
.dua-filters { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.dua-filters button { padding: 9px 13px; border: 1px solid #dfd4ca; border-radius: 999px; background: white; color: var(--plum); cursor: pointer; font-size: 12px; }
.dua-filters button.is-active { border-color: var(--plum); color: white; background: var(--plum); }
.dua-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.dua-card { min-height: 430px; padding: 26px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 25px 25px 25px 8px; background: var(--paper); box-shadow: 0 9px 28px rgba(61,42,62,.05); }
.dua-card:nth-child(3n+2) { background: #f2f7f3; }
.dua-card:nth-child(3n+3) { background: #fff5ef; }
.dua-card-top { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.dua-card-top > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--coral); font: 13px var(--serif); }
.dua-card-top small { color: #5f806c; font-weight: 800; }
.dua-card h2 { min-height: 52px; margin: 18px 0 10px; color: var(--plum); font: 500 21px/1.25 var(--serif); }
.dua-arabic { min-height: 95px; padding: 19px; margin: 0 0 17px; display: flex; align-items: center; justify-content: center; border-right: 3px solid var(--gold); border-radius: 12px 0 0 12px; background: rgba(255,255,255,.7); color: var(--ink); text-align: center; font: 24px/1.9 "Noto Naskh Arabic", "Geeza Pro", serif; }
.dua-translation { margin-bottom: 13px; }
.dua-translation strong { color: var(--coral); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.dua-translation p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.dua-translation.urdu { text-align: right; }
.dua-translation.urdu strong { font-size: 13px; letter-spacing: 0; }
.dua-translation.urdu p { color: var(--ink); font: 16px/1.8 "Noto Nastaliq Urdu", "Noto Naskh Arabic", serif; }
.dua-copy { width: 100%; margin-top: auto; }
.dua-empty { padding: 55px 20px; border: 1px dashed var(--line); border-radius: 20px; text-align: center; }
.dua-review { margin-top: 60px; padding: 42px; display: grid; grid-template-columns: 1fr 1fr; gap: 55px; align-items: start; border-radius: 30px 30px 30px 10px; background: #efe7df; }
.dua-review h2 { margin: 8px 0; font: 500 34px var(--serif); }
.dua-review p { color: var(--muted); line-height: 1.6; }
.star-rating { padding: 0; margin: 0 0 17px; border: 0; display: flex; gap: 7px; }
.star-rating legend { margin-bottom: 9px; }
.star-rating label { position: relative; cursor: pointer; }
.star-rating input { position: absolute; opacity: 0; }
.star-rating label > span { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid #d8cbbf; border-radius: 10px; color: #b49d80; background: white; font-size: 23px; }
.star-rating input:checked + span { border-color: var(--gold); color: white; background: var(--gold); }
.star-rating small { display: block; margin-top: 3px; color: var(--muted); text-align: center; }
.review-label { display: block; color: var(--ink); font-size: 12px; font-weight: 750; }
.review-label textarea { width: 100%; padding: 12px; margin: 8px 0 12px; border: 1px solid #d8cbbf; border-radius: 11px; resize: vertical; background: white; }

.overlay { position: fixed; inset: 0; z-index: 100; display: flex; justify-content: flex-end; background: rgba(36,25,38,.56); backdrop-filter: blur(6px); }
.detail-drawer { width: min(560px, 100%); height: 100%; padding: 35px clamp(24px, 5vw, 48px); position: relative; overflow-y: auto; background: var(--paper); box-shadow: -25px 0 70px rgba(0,0,0,.18); animation: drawer .28s ease both; }
@keyframes drawer { from { transform: translateX(100%); } }
.icon-button { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: white; cursor: pointer; font-size: 24px; }
.close-button { position: absolute; top: 24px; right: 24px; }
.detail-ornament { width: 74px; height: 74px; margin-top: 42px; display: grid; place-items: center; border-radius: 50% 50% 50% 16px; background: #edf4ef; color: var(--plum); font: 31px var(--serif); }
.detail-drawer h2 { margin: 22px 0 3px; color: var(--plum); font: 500 54px/.98 var(--serif); }
.detail-native { min-height: 34px; color: var(--muted); font: 25px var(--serif); direction: auto; }
.detail-meaning { margin: 27px 0; padding: 23px; border-left: 3px solid var(--coral); background: #faf0eb; color: var(--ink); font: italic 21px/1.45 var(--serif); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.detail-field { padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.detail-field small, .detail-field strong { display: block; }
.detail-field small { margin-bottom: 5px; color: var(--muted); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.detail-field strong { font-size: 13px; line-height: 1.45; }
.detail-note { padding: 21px 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.source-note { padding: 14px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; line-height: 1.45; }
.detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.sound-button { padding: 8px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--plum); background: white; font-size: 11px; }

.compare-tray { position: fixed; z-index: 80; right: 24px; bottom: 24px; left: 24px; max-width: 830px; min-height: 76px; padding: 13px 15px 13px 21px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid rgba(255,255,255,.17); border-radius: 20px; color: white; background: rgba(53,32,57,.96); box-shadow: 0 20px 55px rgba(39,26,42,.3); backdrop-filter: blur(14px); }
.compare-tray .eyebrow { color: #ddb3a9; }
.compare-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.compare-chip { padding: 5px 9px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; color: white; background: transparent; cursor: pointer; font-size: 11px; }
.compare-overlay { align-items: center; justify-content: center; padding: 25px; }
.compare-dialog { position: relative; width: min(980px, 100%); max-height: 90vh; padding: 42px; overflow: auto; border-radius: 28px; background: var(--paper); box-shadow: var(--shadow); }
.compare-dialog h2 { margin: 8px 0 25px; font: 500 38px var(--serif); }
.compare-table { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.compare-column { min-width: 0; border-right: 1px solid var(--line); }
.compare-column:last-child { border: 0; }
.compare-column > div { min-height: 72px; padding: 14px 17px; border-bottom: 1px solid var(--line); }
.compare-column > div:last-child { border: 0; }
.compare-column small, .compare-column strong { display: block; }
.compare-column small { margin-bottom: 5px; color: var(--muted); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.compare-column .compare-name { min-height: 100px; display: flex; flex-direction: column; justify-content: center; background: #f5eee8; }
.compare-column .compare-name strong { color: var(--plum); font: 500 30px var(--serif); }
.toast { position: fixed; z-index: 160; left: 50%; bottom: 30px; max-width: calc(100% - 40px); padding: 13px 18px; border-radius: 12px; color: white; background: var(--ink); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translate(-50%, 20px); transition: .24s; font-size: 13px; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.mobile-nav { display: none; }
footer { padding: 40px clamp(24px, 5vw, 70px); display: flex; align-items: center; gap: 30px; border-top: 1px solid var(--line); background: #f3eee7; color: var(--muted); font-size: 11px; }
footer p { margin: 0 auto; }
footer > span { text-align: right; }
.footer-brand .brand-mark { width: 36px; height: 36px; font-size: 21px; }
.footer-brand strong { font-size: 17px; }

@media (max-width: 1120px) {
  .name-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .saved-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .hero-shell { gap: 35px; padding-right: 55px; padding-left: 55px; }
  .dua-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .dua-hero { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 880px) {
  body { padding-bottom: 68px; }
  .site-header { height: 68px; padding: 0 20px; }
  .site-header .brand small, .desktop-nav { display: none; }
  .site-header .preview-badge { margin-left: auto; }
  .hero-shell { min-height: auto; padding: 60px 25px 48px; display: block; }
  .hero-art { height: 285px; max-width: 460px; margin: 45px auto 0; }
  .orbit-one { width: 275px; height: 275px; }
  .orbit-two { width: 195px; height: 195px; top: 43px; }
  .hero-card { top: 45px; width: 210px; min-height: 190px; }
  .catalogue-shell { grid-template-columns: 1fr; padding-top: 34px; }
  .filter-panel, .contribution-intro { position: static; }
  .filter-panel { padding: 20px; }
  .filter-panel fieldset, .filter-panel .select-label, .filter-panel .toggle-row { padding-top: 14px; padding-bottom: 14px; }
  .filter-panel .collection-note { display: none; }
  .community-stats { width: calc(100% - 34px); grid-template-columns: repeat(2, 1fr); }
  .community-stats div { padding: 12px; }
  .community-stats div:nth-child(2) { border-right: 0; }
  .community-stats div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .story-grid { grid-template-columns: repeat(2, 1fr); }
  .contribution-shell { grid-template-columns: 1fr; padding-top: 60px; }
  .contribution-intro { max-width: 680px; }
  .saved-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .mobile-nav { position: fixed; z-index: 90; right: 0; bottom: 0; left: 0; height: 68px; padding: 6px 5px calc(6px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); background: rgba(255,253,249,.96); backdrop-filter: blur(18px); }
  .mobile-nav button { border: 0; background: transparent; color: var(--muted); font-size: 9px; font-weight: 700; }
  .mobile-nav button span { display: block; margin-bottom: 3px; font-size: 21px; line-height: 1; }
  .mobile-nav button.is-active { color: var(--plum); }
  footer { display: block; text-align: center; }
  footer .brand { justify-content: center; }
  footer p { margin: 16px 0; }
  footer > span { display: block; text-align: center; }
  .dua-controls { align-items: stretch; flex-direction: column; }
  .dua-filters { justify-content: flex-start; }
  .dua-review { grid-template-columns: 1fr; gap: 20px; padding: 30px; }
}

@media (max-width: 620px) {
  .site-header .preview-badge { padding: 7px 9px; font-size: 9px; }
  .brand strong { font-size: 18px; }
  .brand-mark { width: 37px; height: 37px; }
  .hero-copy h1, .page-hero h1, .contribution-intro h1 { font-size: 43px; }
  .hero-copy > p, .page-hero p { font-size: 15px; }
  .hero-search { display: block; }
  .dua-grid { grid-template-columns: 1fr; }
  .dua-hero { padding: 55px 23px; }
  .dua-hero-actions { width: 100%; }
  .dua-hero-actions .button { flex: 1; }
  .dua-shell { padding-right: 18px; padding-left: 18px; }
  .dua-card { min-height: 0; }
  .star-rating { gap: 4px; }
  .star-rating label > span { width: 39px; height: 39px; }
  .search-box { margin-bottom: 10px; }
  .hero-search .button { width: 100%; }
  .hero-art { height: 255px; }
  .script-latin { left: 0; }
  .script-hebrew { left: -10px; }
  .catalogue-shell { padding-right: 16px; padding-left: 16px; }
  .filter-heading h2, .results-heading h2, .section-heading h2 { font-size: 25px; }
  .results-heading { align-items: flex-start; }
  .sort-label { min-width: 92px; }
  .name-grid, .saved-grid, .story-grid { grid-template-columns: 1fr; }
  .name-card { min-height: 220px; }
  .page-hero { padding: 70px 21px 68px; }
  .community-stats { margin-top: -25px; padding: 10px; }
  .community-stats strong { font-size: 24px; }
  .stories-shell { padding: 65px 17px 75px; }
  .section-heading { display: block; }
  .story-filters { margin-top: 18px; }
  .community-invite { display: block; padding: 30px 24px; }
  .community-invite .button { width: 100%; margin-top: 22px; }
  .contribution-shell { padding: 55px 17px; }
  .form-card { padding: 20px; border-radius: 22px 22px 22px 8px; }
  .two-column, .detail-grid, .detail-actions { grid-template-columns: 1fr; }
  .pending-shell { padding-right: 17px; padding-left: 17px; }
  .saved-shell { padding-right: 17px; padding-left: 17px; }
  .saved-actions .button { width: 100%; }
  .detail-drawer { padding: 28px 20px; }
  .detail-drawer h2 { font-size: 45px; }
  .compare-tray { right: 10px; bottom: 80px; left: 10px; }
  .compare-tray > div { min-width: 0; }
  .compare-chips { flex-wrap: nowrap; overflow: hidden; }
  .compare-chip { white-space: nowrap; }
  .compare-dialog { padding: 30px 15px 20px; }
  .compare-dialog h2 { font-size: 30px; padding-right: 40px; }
  .compare-table { grid-template-columns: none; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; }
  .compare-column { flex: 0 0 82%; border-right: 1px solid var(--line); scroll-snap-align: start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
