@import url("https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;500;600;700&display=swap");
@font-face { font-family: "Instrument"; src: url("./fonts/instrument-serif.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("./fonts/newsreader.woff2") format("woff2"); font-weight: 400; font-display: swap; }
:root {
  color-scheme: light;
  --paper: #f4f6f5; --panel: #ffffff; --ink: #203146; --muted: #5b6974;
  --teal: #3d706e; --teal-soft: #eaf2ee; --gold: #9a7b42; --line: #d8e1de;
  --prayer-bg: #24384c; --prayer-ink: #fff; --prayer-muted: #c5d4da;
  --serif: "Instrument", Georgia, serif; --ui: "Source Sans 3", sans-serif;
  --radius: 16px;
}
body[data-theme="dark"] {
  color-scheme: dark; --paper: #111e2a; --panel: #1b2c3a; --ink: #f0f4f3; --muted: #b6c8ce;
  --teal: #99ccc1; --teal-soft: #243e43; --gold: #d5b97b; --line: #3b4f5b;
  --prayer-bg: #172736; --prayer-ink: #f0f4f3; --prayer-muted: #c3d1d8;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body { color: var(--ink); background: var(--paper); font: 400 18px/1.35 var(--ui); }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; }
.ambient { position: fixed; inset: 0; pointer-events: none; opacity: .065; background-image: repeating-linear-gradient(45deg, var(--teal) 0 1px, transparent 1px 48px), repeating-linear-gradient(-45deg, var(--teal) 0 1px, transparent 1px 48px); mask-image: linear-gradient(to bottom, transparent, #000); }
.dashboard { position: relative; padding: 20px 28px; display: grid; gap: 16px; min-height: 100vh; align-content: start; }
.masthead { display: flex; justify-content: space-between; align-items: center; gap: 30px; min-height: 135px; }
.brand-wrap { display: flex; gap: 20px; align-items: center; min-width: 0; }
.logo-frame { height: 136px; width: 136px; flex-shrink: 0; overflow: hidden; }
body[data-theme="dark"] .logo-frame { background: #f4f6f5; border-radius: 12px; }
.brand-logo { display: block; width: 280px; height: 280px; max-width: none; margin: -72px; object-fit: contain; }
.eyebrow { font: 700 .8rem/1.4 var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--teal); }
h1 { font-size: clamp(2.1rem, 3.25vw, 4.3rem); line-height: 1.04; margin-top: 6px; }
.location { margin-top: 9px; font-size: 1.05rem; color: var(--muted); }
.clock-wrap { text-align: right; flex-shrink: 0; }
.time { font-size: clamp(2.7rem, 3.9vw, 5.1rem); font-weight: 600; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--teal); }
.date { font-size: 1.2rem; font-weight: 600; margin-top: 9px; }
.date-hijri { font-size: 1.04rem; color: var(--muted); margin-top: 2px; }
.panel { border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
h2 { font-size: clamp(1.7rem, 2vw, 2.5rem); line-height: 1.1; }
.prayers-panel { background: var(--prayer-bg); color: var(--prayer-ink); padding: 18px 26px 10px; border: 0; }
.prayer-heading { display: flex; align-items: baseline; gap: 24px; }
.schedule-note { color: var(--prayer-muted); font-size: 1rem; }
.next-prayer { font-size: 1.05rem; font-weight: 600; color: #e0ca96; text-align: right; }
.prayer-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin-top: 16px; gap: 0; }
.prayer-grid.ramadan { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.prayer-card { position: relative; min-width: 0; padding: 0 22px 8px; border-left: 1px solid #ffffff25; }
.prayer-card:first-child { padding-left: 0; border: 0; }
.prayer-card:last-child { padding-right: 0; }
.prayer-name { font-size: 1.25rem; color: var(--prayer-muted); }
.prayer-time { font-size: clamp(2.2rem, 2.8vw, 3.8rem); line-height: 1.12; font-weight: 600; letter-spacing: -.035em; white-space: nowrap; }
.prayer-time small { font-size: .39em; letter-spacing: .02em; margin-left: 5px; font-weight: 500; color: var(--prayer-muted); }
.prayer-meta { margin-top: 8px; min-height: 27px; font-size: 1rem; color: var(--prayer-muted); }
.prayer-pill { display: inline-block; font-size: .96rem; font-weight: 500; white-space: normal; }
.pill-occurred { color: #b3d4c6; }
.prayer-card.next .prayer-name, .prayer-card.next .prayer-time { color: #efdbac; }
.prayer-card.next::before { content: ""; position: absolute; top: -10px; left: 22px; width: 22px; height: 2px; background: #cfb77e; }
.prayer-card:first-child.next::before { left: 0; }
.prayer-status { color: var(--prayer-muted); font-size: .85rem; padding-top: 4px; min-height: 23px; }
.community-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
.community-column { display: grid; grid-template-rows: minmax(240px, 1fr) auto; gap: 20px; min-width: 0; }
.quran-panel { padding: 23px 28px 20px; display: flex; flex-direction: column; min-width: 0; background: linear-gradient(135deg, var(--teal-soft), var(--panel) 85%); }
.section-mark { color: var(--gold); font-size: 1.55rem; }
.reflection-copy { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 20px 0; gap: 18px; }
.quran-arabic { font-family: "Traditional Arabic", "Geeza Pro", serif; font-size: clamp(1.6rem, 2vw, 2.6rem); line-height: 1.7; color: var(--teal); text-align: center; }
.quran-translation { font: 400 clamp(1.35rem, 1.8vw, 2.1rem)/1.4 "Newsreader", Georgia, serif; text-align: center; text-wrap: pretty; }
.reflection-footer { display: flex; justify-content: space-between; gap: 14px; align-items: baseline; }
.quran-ref { color: var(--teal); font-size: 1rem; font-weight: 600; }
.status { font-size: .85rem; color: var(--muted); }
.member-info-panel { padding: 20px 26px; }
.member-info-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 22px; }
.member-info-row { border-left: 2px solid var(--line); padding-left: 15px; }
.member-info-row:first-child { border-color: var(--teal); }
.member-info-label { font-size: .92rem; color: var(--muted); margin-bottom: 7px; }
.member-info-value { font-size: clamp(1rem, 1.2vw, 1.4rem); font-weight: 600; line-height: 1.4; }
.events-section { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 14px; }
.events-section h3 { font-size: 1.4rem; margin-bottom: 8px; }
.events-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.event-title { font-size: 1rem; font-weight: 600; }
.event-meta { font-size: .86rem; color: var(--muted); }
@media (min-width: 1200px) and (min-height: 900px) {
  .dashboard { min-height: 100vh; grid-template-rows: auto auto 1fr; }
}
@media (min-width: 1200px) and (max-height: 850px) {
  html { font-size: 13px; }
  body { font-size: 15px; }
  .dashboard { padding: 14px 20px; gap: 12px; grid-template-rows: auto auto 1fr; }
  .masthead { min-height: 88px; }
  .logo-frame { width: 88px; height: 88px; }
  .brand-logo { width: 186px; height: 186px; margin: -49px; }
  h2 { font-size: 1.85rem; }
  h1 { font-size: 2.7rem; }
  .time { font-size: 3.4rem; }
  .prayers-panel { padding: 16px 22px 8px; }
  .prayer-grid { margin-top: 14px; }
  .prayer-time { font-size: 2.7rem; }
  .prayer-meta { min-height: 20px; margin-top: 6px; }
  .prayer-status { min-height: 18px; }
  .community-grid, .community-column { gap: 14px; }
  .community-column { grid-template-rows: minmax(200px, 1fr) auto; }
  .quran-panel { padding: 16px 22px; }
  .reflection-copy { gap: 12px; padding: 14px 0; }
  .quran-arabic { font-size: 1.65rem; }
  .quran-translation { font-size: 1.3rem; }
  .member-info-panel { padding: 16px 22px; }
  .member-info-list { margin-top: 14px; }
}
@media (max-width: 1199px) {
  .dashboard { padding: 20px; }
  .prayer-heading { display: block; }
  .schedule-note { display: block; margin-top: 6px; }
  .prayer-grid, .prayer-grid.ramadan { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 0; }
  .prayer-card:nth-child(3n+1) { border-left: 0; padding-left: 0; }
  .community-grid { grid-template-columns: 1fr; }
  .quran-panel { min-height: 280px; }
}
@media (max-width: 700px) {
  .masthead { flex-direction: column; align-items: stretch; gap: 18px; }
  .brand-wrap { gap: 10px; }
  .logo-frame { width: 85px; height: 95px; }
  .brand-logo { width: 180px; height: 180px; margin: -42px -47px; }
  .location { font-size: .85rem; }
  .clock-wrap { text-align: left; padding-left: 4px; }
  .date { font-size: 1.05rem; }
  .section-heading { flex-wrap: wrap; gap: 10px; }
  .prayers-panel { padding: 18px; }
  .next-prayer { text-align: left; }
  .prayer-grid, .prayer-grid.ramadan { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prayer-card { padding: 0 12px 8px; }
  .prayer-card:nth-child(3n+1) { border-left: 1px solid #ffffff25; padding-left: 12px; }
  .prayer-card:nth-child(2n+1) { border-left: 0; padding-left: 0; }
  .prayer-time { font-size: 2.4rem; }
  .quran-panel { padding: 20px; }
  .member-info-list { grid-template-columns: 1fr; gap: 16px; }
  .events-list { grid-template-columns: 1fr; }
  .reflection-footer { flex-wrap: wrap; }
}
