:root {
  --ink: #321b24;
  --muted: #7d626a;
  --soft-muted: #a88e95;
  --rose: #8f304c;
  --rose-deep: #6f203a;
  --rose-light: #f3dce1;
  --cream: #fffaf6;
  --paper: #fffefc;
  --gold: #c99252;
  --line: rgba(115, 64, 79, 0.14);
  --shadow: 0 22px 60px rgba(74, 30, 46, 0.1);
  --shadow-soft: 0 10px 28px rgba(74, 30, 46, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--cream);
  font-family: "Noto Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
}
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 3px solid rgba(201, 146, 82, 0.48); outline-offset: 3px; }
.shell { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.ambient { position: fixed; z-index: -1; pointer-events: none; border-radius: 50%; filter: blur(2px); opacity: .55; }
.ambient-one { width: 430px; height: 430px; background: #f7d9e0; top: -160px; left: -140px; }
.ambient-two { width: 320px; height: 320px; background: #f5ead2; right: -140px; bottom: 12%; }

.site-header { display: flex; align-items: center; justify-content: space-between; padding: 28px 0 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; color: white; background: var(--rose); border-radius: 14px 14px 14px 4px; transform: rotate(-6deg); box-shadow: 0 8px 20px rgba(143,48,76,.22); }
.brand-mark span { font-size: 21px; transform: rotate(6deg); }
.brand-copy { display: grid; line-height: 1.2; }
.brand-copy strong { font-size: 17px; letter-spacing: -.3px; }
.brand-copy small { color: var(--muted); font-size: 10px; margin-top: 4px; }
.install-button, .secondary-button { border: 1px solid rgba(143,48,76,.22); color: var(--rose); background: rgba(255,255,255,.55); border-radius: 999px; padding: 10px 16px; display: inline-flex; gap: 8px; align-items: center; font-size: 12px; font-weight: 700; transition: .2s ease; }
.install-button:hover, .secondary-button:hover { background: var(--rose); color: white; border-color: var(--rose); transform: translateY(-2px); }
.install-icon { display: inline-grid; place-items: center; width: 17px; height: 17px; border: 1px solid currentColor; border-radius: 50%; font-size: 13px; line-height: 1; }

.hero { min-height: 530px; display: flex; align-items: center; justify-content: space-between; gap: 70px; padding: 64px 6% 78px; position: relative; }
.hero-copy { flex: 1 1 53%; max-width: 570px; }
.eyebrow { color: var(--rose); font-size: 11px; font-weight: 800; letter-spacing: .2px; margin: 0 0 12px; }
.eyebrow-dot { display: inline-block; width: 7px; height: 7px; background: var(--gold); border-radius: 50%; margin-left: 7px; vertical-align: 1px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(42px, 6vw, 76px); line-height: 1.15; letter-spacing: -2.5px; margin-bottom: 22px; font-weight: 800; }
h1 em { color: var(--rose); font-style: normal; position: relative; }
h1 em::after { content: ""; position: absolute; height: 8px; left: 4px; right: 4px; bottom: -1px; background: #eac1cb; z-index: -1; transform: rotate(-2deg); opacity: .65; }
.hero-lede { max-width: 430px; color: var(--muted); font-size: 16px; line-height: 2; margin-bottom: 28px; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.primary-button { border: 0; background: var(--rose); color: white; border-radius: 13px; padding: 14px 20px; font-weight: 800; font-size: 13px; box-shadow: 0 12px 24px rgba(143,48,76,.22); transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.primary-button:hover { background: var(--rose-deep); transform: translateY(-2px); box-shadow: 0 16px 30px rgba(143,48,76,.28); }
.primary-button span { display: inline-block; margin-right: 8px; font-size: 17px; transition: transform .2s ease; }
.primary-button:hover span { transform: translateX(-4px); }
.text-button { border: 0; color: var(--muted); background: transparent; font-size: 12px; text-decoration: underline; text-decoration-color: #d6b9c0; text-underline-offset: 5px; }
.text-button:hover { color: var(--rose); }
.trust-line { color: var(--soft-muted); font-size: 11px; margin-top: 24px; }
.sparkle { color: var(--gold); font-size: 15px; margin-left: 5px; }
.hero-note { flex: 0 1 390px; min-height: 330px; position: relative; padding: 34px 34px 30px; color: #fff8f3; background: linear-gradient(145deg, #a94862, #75253f 76%); border-radius: 44px 12px 44px 12px; box-shadow: 0 28px 60px rgba(112, 36, 60, .25); transform: rotate(2deg); overflow: hidden; }
.hero-note::before { content: ""; position: absolute; width: 210px; height: 210px; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; left: -70px; bottom: -90px; }
.hero-note::after { content: ""; position: absolute; inset: 14px; border: 1px solid rgba(255,255,255,.15); border-radius: 34px 5px 34px 5px; pointer-events: none; }
.note-topline, .note-footer { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: rgba(255,255,255,.72); }
.note-topline { letter-spacing: .5px; }
.note-date { direction: rtl; }
.note-quote { position: relative; z-index: 1; font-size: 24px; line-height: 1.9; font-weight: 600; margin: 48px 0 52px; letter-spacing: -.4px; }
.note-footer { justify-content: flex-start; gap: 8px; }
.note-heart { color: #f4bfca; font-size: 17px; }
.note-stamp { position: absolute; z-index: 1; left: 29px; bottom: 57px; width: 54px; height: 54px; border: 1px solid rgba(255,255,255,.42); border-radius: 50%; display: grid; place-items: center; text-align: center; font-family: Georgia, serif; font-size: 11px; line-height: 1.2; transform: rotate(-13deg); color: #f8d6dc; }

.profile-strip { display: flex; align-items: center; gap: 34px; padding: 27px 6%; margin-bottom: 52px; background: rgba(255,255,255,.58); border: 1px solid var(--line); border-radius: 22px 5px 22px 22px; box-shadow: 0 12px 35px rgba(74,30,46,.045); }
.profile-photo { flex: 0 0 142px; height: 177px; position: relative; margin: 0; overflow: hidden; border-radius: 70px 8px 70px 70px; background: #d9c4ad; box-shadow: 0 12px 24px rgba(74,30,46,.14); transform: rotate(-2deg); }
.profile-photo img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center center; }
.profile-photo figcaption { position: absolute; right: 8px; left: 8px; bottom: 8px; padding: 4px 5px; color: white; background: rgba(50,27,36,.72); border-radius: 999px; text-align: center; font-size: 9px; backdrop-filter: blur(4px); }
.profile-copy { flex: 1; }
.profile-copy h2 { margin: 0 0 8px; color: var(--ink); font-size: 27px; line-height: 1.45; letter-spacing: -.8px; }
.profile-copy h2 em { color: var(--rose); font-style: normal; }
.profile-copy p:last-child { max-width: 600px; margin: 0; color: var(--muted); font-size: 12px; line-height: 2; }
.profile-signature { flex: 0 0 86px; height: 86px; display: grid; place-items: center; align-content: center; gap: 0; color: var(--rose); border: 1px solid rgba(143,48,76,.23); border-radius: 50%; font-family: Georgia, serif; font-size: 28px; transform: rotate(8deg); }
.profile-signature span { display: block; font-family: "Noto Sans Arabic", sans-serif; font-size: 10px; line-height: 1; color: var(--muted); }

.stats-row { display: flex; align-items: stretch; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 90px; padding: 20px 6%; gap: 48px; }
.stat { display: flex; align-items: baseline; gap: 9px; color: var(--muted); font-size: 11px; }
.stat strong { color: var(--rose); font-size: 23px; line-height: 1; }
.stat-note { margin-right: auto; align-items: center; color: var(--soft-muted); }
.status-pulse { width: 8px; height: 8px; background: #7fb58d; border-radius: 50%; box-shadow: 0 0 0 5px rgba(127,181,141,.13); }

.messages-section { padding: 0 6% 75px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 25px; }
.section-heading h2 { font-size: 32px; letter-spacing: -1px; margin-bottom: 0; }
.search-box { width: 250px; height: 45px; display: flex; align-items: center; gap: 8px; padding: 0 14px; background: rgba(255,255,255,.7); border: 1px solid var(--line); border-radius: 12px; transition: border .2s ease, box-shadow .2s ease; }
.search-box:focus-within { border-color: rgba(143,48,76,.4); box-shadow: 0 5px 20px rgba(143,48,76,.07); }
.search-symbol { color: var(--rose); font-size: 25px; transform: rotate(-15deg); line-height: 1; }
.search-box input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.search-box input::placeholder { color: var(--soft-muted); }
.filters { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 26px; }
.filter-chip { border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 999px; padding: 8px 15px; font-size: 11px; transition: .2s ease; }
.filter-chip:hover { border-color: #d6a5b2; color: var(--rose); }
.filter-chip.active { color: white; background: var(--rose); border-color: var(--rose); box-shadow: 0 7px 15px rgba(143,48,76,.15); }
.filter-chip span { opacity: .72; margin-right: 3px; }
.message-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.message-card { min-height: 250px; display: flex; flex-direction: column; padding: 22px 22px 18px; background: rgba(255,255,255,.72); border: 1px solid rgba(115,64,79,.1); border-radius: 17px 17px 17px 4px; box-shadow: 0 7px 20px rgba(74,30,46,.035); transition: transform .25s ease, box-shadow .25s ease, border .25s ease; }
.message-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-soft); border-color: rgba(143,48,76,.22); }
.message-card:nth-child(3n+2) { border-radius: 17px 4px 17px 17px; }
.card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.card-tag { color: var(--rose); background: var(--rose-light); border-radius: 999px; padding: 4px 9px; font-size: 10px; font-weight: 800; }
.favorite-button { width: 30px; height: 30px; display: grid; place-items: center; border: 0; color: #caaeb6; background: transparent; border-radius: 50%; font-size: 21px; transition: .2s ease; }
.favorite-button:hover { color: var(--rose); background: var(--rose-light); }
.favorite-button.is-favorite { color: var(--rose); }
.message-text { flex: 1; color: #4d3039; font-size: 15px; line-height: 2; margin: 0 0 20px; }
.card-actions { display: flex; align-items: center; gap: 7px; border-top: 1px solid var(--line); padding-top: 12px; }
.card-action { display: inline-flex; align-items: center; gap: 4px; border: 0; color: var(--soft-muted); background: transparent; padding: 3px 5px; font-size: 10px; }
.card-action:hover { color: var(--rose); }
.card-action:first-child { margin-right: auto; }
.card-action .action-glyph { font-size: 16px; line-height: 1; }
.empty-state { text-align: center; padding: 60px 10px; color: var(--muted); }
.empty-icon { color: var(--rose); font-size: 42px; }
.empty-state h3 { margin: 10px 0 4px; color: var(--ink); font-size: 20px; }
.empty-state p { font-size: 12px; }

.install-banner { display: flex; align-items: center; gap: 23px; padding: 32px 38px; margin: 15px 6% 80px; background: #f9e9e3; border: 1px solid rgba(201,146,82,.2); border-radius: 20px 20px 20px 4px; }
.banner-icon { flex: 0 0 58px; height: 58px; display: grid; place-items: center; color: var(--gold); border: 1px solid rgba(201,146,82,.48); border-radius: 50%; font-size: 25px; }
.banner-copy { flex: 1; }
.banner-copy .eyebrow { margin-bottom: 2px; }
.banner-copy h2 { font-size: 21px; margin: 0 0 4px; }
.banner-copy p:last-child { color: var(--muted); font-size: 12px; margin: 0; max-width: 620px; }
.site-footer { display: flex; justify-content: center; gap: 15px; align-items: center; padding: 0 0 28px; color: var(--soft-muted); font-size: 10px; }
.footer-heart { color: var(--rose); font-size: 14px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 24px; background: rgba(50,27,36,.44); backdrop-filter: blur(8px); }
.modal-backdrop[hidden] { display: none; }
.install-modal { width: min(100%, 420px); position: relative; background: var(--paper); border-radius: 24px 5px 24px 24px; padding: 34px; box-shadow: 0 30px 70px rgba(45,20,30,.25); text-align: center; }
.modal-close { position: absolute; top: 13px; left: 15px; border: 0; background: transparent; color: var(--soft-muted); font-size: 25px; line-height: 1; }
.modal-mark { width: 46px; height: 46px; display: grid; place-items: center; margin: 0 auto 18px; color: white; background: var(--rose); border-radius: 50% 50% 50% 5px; font-size: 22px; }
.install-modal h2 { font-size: 27px; margin: 0 0 14px; }
.modal-body { color: var(--muted); font-size: 13px; line-height: 2; text-align: right; }
.modal-body ol { margin: 8px 0 14px; padding-right: 20px; }
.modal-body li { padding-right: 4px; margin: 5px 0; }
.modal-action { width: 100%; margin-top: 10px; }
.toast { position: fixed; z-index: 30; right: 50%; bottom: 26px; transform: translate(50%, 20px); opacity: 0; pointer-events: none; color: white; background: #321b24; border-radius: 999px; padding: 10px 17px; font-size: 12px; box-shadow: var(--shadow-soft); transition: .25s ease; }
.toast.show { opacity: 1; transform: translate(50%, 0); }

@media (max-width: 900px) {
  .hero { gap: 34px; padding-inline: 2%; }
  .messages-section { padding-inline: 2%; }
  .message-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .install-banner { margin-inline: 2%; }
  .stats-row { padding-inline: 2%; }
}
@media (max-width: 680px) {
  .shell { width: min(100% - 30px, 520px); }
  .site-header { padding-top: 18px; }
  .brand-mark { width: 37px; height: 37px; border-radius: 12px 12px 12px 3px; }
  .brand-copy strong { font-size: 15px; }
  .install-button { padding: 8px 12px; font-size: 10px; }
  .hero { min-height: 0; display: block; padding: 47px 0 48px; }
  h1 { font-size: clamp(42px, 13vw, 64px); letter-spacing: -2px; }
  .hero-lede { font-size: 14px; line-height: 1.9; }
  .hero-note { max-width: 390px; min-height: 278px; margin: 48px auto 7px; padding: 27px 26px 24px; transform: rotate(1.5deg); }
  .note-quote { font-size: 20px; margin: 35px 0 39px; }
  .note-stamp { bottom: 42px; left: 23px; }
  .profile-strip { display: block; padding: 22px 20px; margin-bottom: 48px; text-align: center; }
  .profile-photo { width: 145px; height: 180px; margin: 0 auto 18px; }
  .profile-copy h2 { font-size: 24px; }
  .profile-copy p:last-child { font-size: 11px; }
  .profile-signature { width: 62px; height: 62px; margin: 18px auto 0; font-size: 21px; }
  .stats-row { margin-bottom: 58px; padding: 16px 0; gap: 14px; flex-wrap: wrap; }
  .stat { gap: 5px; font-size: 10px; }
  .stat strong { font-size: 19px; }
  .stat-note { width: 100%; margin-right: 0; }
  .section-heading { display: block; }
  .section-heading h2 { font-size: 27px; margin-bottom: 17px; }
  .search-box { width: 100%; }
  .filters { gap: 7px; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; margin-inline: -2px; }
  .filter-chip { flex: 0 0 auto; font-size: 10px; padding: 7px 12px; }
  .message-grid { grid-template-columns: 1fr; gap: 12px; }
  .message-card { min-height: 0; padding: 18px 18px 15px; }
  .message-text { font-size: 14px; }
  .install-banner { display: block; padding: 27px 23px; margin: 0 0 55px; text-align: center; }
  .banner-icon { margin: 0 auto 15px; }
  .banner-copy p:last-child { margin-inline: auto; }
  .secondary-button { margin-top: 18px; }
  .site-footer { width: calc(100% - 30px); flex-wrap: wrap; gap: 8px 12px; padding-bottom: 20px; font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }
