@font-face {
  font-family: "Amiri";
  src: url("/fonts/Amiri-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Amiri";
  src: url("/fonts/Amiri-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #fff6e7;
  --muted: #ead8bd;
  --gold: #e8c58d;
  --navy: #071b2c;
  --glass: rgba(7, 22, 37, .78);
  --line: rgba(242, 213, 168, .46);
  font-family: "Amiri", "Noto Naskh Arabic", Georgia, serif;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--navy); }

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  color: var(--ink);
  background: var(--navy);
  font-family: inherit;
  -webkit-font-smoothing: antialiased;
}

.backdrop,
.backdrop::after {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.backdrop {
  z-index: 0;
  background-image: url("/manus-storage/cad4e15d-7557-48f8-bb21-f71f49444bd9-1_all_72_692e7325.jpg");
  background-size: cover;
  background-position: 57% 35%;
  transform: scale(1.015);
}

.backdrop::after {
  content: "";
  background:
    radial-gradient(ellipse at 50% 35%, rgba(12, 30, 48, .12) 0%, rgba(5, 19, 33, .55) 50%, rgba(4, 17, 30, .91) 100%),
    linear-gradient(180deg, rgba(5, 19, 33, .64) 0%, rgba(5, 19, 33, .30) 32%, rgba(5, 19, 33, .84) 68%, rgba(5, 19, 33, .98) 100%);
}

.page-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(100%, 720px);
  min-height: 100vh;
  min-height: 100svh;
  margin-inline: auto;
  padding: max(20px, env(safe-area-inset-top)) clamp(18px, 5vw, 42px) max(18px, env(safe-area-inset-bottom));
  isolation: isolate;
}

.topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  color: var(--muted);
  font-size: 15px;
}

.book-mark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: inherit;
  text-decoration: none;
}

.sun-mark {
  position: relative;
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
}

.sun-mark::before,
.sun-mark::after,
.sun-mark i {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  border: 1px solid var(--gold);
  border-radius: 50%;
}

.sun-mark::before { position: absolute; top: -4px; }
.sun-mark::after { position: absolute; bottom: -4px; }

.top-note {
  padding: 4px 11px 5px;
  border: 1px solid rgba(232, 197, 141, .36);
  border-radius: 999px;
  font-size: 13px;
}

.content {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  gap: clamp(26px, 5vh, 42px);
  padding-block: clamp(32px, 7vh, 68px);
}

.letter { text-align: center; }

.eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 13px;
  color: var(--gold);
  font-size: clamp(17px, 4.2vw, 20px);
  letter-spacing: .02em;
}

.eyebrow-line {
  width: 25px;
  height: 1px;
  background: var(--gold);
  opacity: .85;
}

h1 {
  margin: 0 0 25px;
  color: #fff7e9;
  font-size: clamp(38px, 10vw, 61px);
  font-weight: 700;
  line-height: 1.04;
  text-shadow: 0 3px 22px rgba(0, 0, 0, .3);
}

h1 span { color: var(--gold); }

.message-card {
  position: relative;
  width: min(100%, 560px);
  margin-inline: auto;
  padding: clamp(20px, 5vw, 29px) clamp(20px, 6vw, 40px) 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--glass);
  box-shadow: 0 22px 65px rgba(0, 0, 0, .26), inset 0 1px rgba(255, 255, 255, .06);
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
  transition: opacity .22s ease, transform .22s ease;
}

.message-card.is-changing { opacity: .36; transform: translateY(5px); }

.message-label {
  color: var(--gold);
  font-size: 15px;
}

.sparkle { padding-inline-end: 5px; font-size: 13px; }

.message-text {
  min-height: 3.1em;
  margin: 9px 0 13px;
  color: var(--ink);
  font-size: clamp(24px, 6vw, 32px);
  line-height: 1.55;
  text-wrap: pretty;
}

.message-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 5px 0 6px;
}

.message-rule::before,
.message-rule::after {
  width: 38px;
  height: 1px;
  background: var(--line);
  content: "";
}

.message-rule span {
  width: 5px;
  height: 5px;
  margin-inline: 8px;
  border-radius: 50%;
  background: var(--gold);
}

.message-signature {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.new-message {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  margin: 16px auto 0;
  padding: 5px 15px;
  border: 1px solid rgba(232, 197, 141, .45);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(7, 22, 37, .43);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.new-message:hover { border-color: var(--gold); background: rgba(232, 197, 141, .12); }
.new-message:active { transform: scale(.98); }
.new-message:focus-visible,
.social-card:focus-visible { outline: 3px solid #fff2d3; outline-offset: 4px; }
.refresh-icon { color: var(--gold); font-family: sans-serif; font-size: 20px; line-height: 1; }

.social-area { text-align: center; }
.social-heading {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 17px;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.social-card {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  gap: 10px;
  max-width: 270px;
  min-height: 70px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 246, 231, .24);
  border-radius: 16px;
  color: var(--ink);
  background: rgba(7, 22, 37, .74);
  text-align: right;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .15);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.social-card:hover { transform: translateY(-2px); border-color: var(--gold); background: rgba(7, 22, 37, .88); }
.social-icon { display: block; flex: 0 0 39px; width: 39px; height: 39px; color: #2d9fe6; }
.social-icon svg { display: block; width: 100%; height: 100%; }
.facebook .social-icon { color: #1877f2; }
.social-copy { display: flex; min-width: 0; flex-direction: column; line-height: 1.28; }
.social-copy strong { font-size: 16px; font-weight: 700; }
.social-copy span { overflow: hidden; color: var(--muted); font-family: system-ui, sans-serif; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.arrow { margin-inline-start: auto; color: var(--gold); font-family: sans-serif; font-size: 18px; }
.social-footnote { margin: 10px 0 0; color: rgba(255, 246, 231, .78); font-size: 14px; }

.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(255, 246, 231, .82);
  font-size: 14px;
  text-align: center;
}

.footer p { margin: 0; }
.footer-line { width: min(8vw, 35px); height: 1px; background: rgba(232, 197, 141, .58); }

@media (min-width: 740px) {
  .page-shell { min-height: 850px; }
  .content { gap: 44px; }
  .social-card { min-height: 78px; padding-inline: 16px; }
}

@media (max-width: 380px) {
  .page-shell { padding-inline: 15px; }
  .social-links { gap: 8px; }
  .social-card { gap: 7px; padding-inline: 8px; }
  .social-icon { flex-basis: 34px; width: 34px; height: 34px; }
  .social-copy strong { font-size: 15px; }
  .social-copy span { font-size: 10px; }
  .arrow { display: none; }
}

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


/* Prominent language switch and a gentle bilingual reader hint */
.language-switch {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 128px;
  min-height: 52px;
  padding: 8px 15px;
  border: 1px solid rgba(255, 246, 231, .88);
  border-radius: 999px;
  color: #071b2c;
  background: #e8c58d;
  box-shadow: 0 5px 18px rgba(0, 0, 0, .28), inset 0 1px rgba(255, 255, 255, .5);
  font-family: system-ui, "Noto Sans Arabic", sans-serif;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.language-switch svg {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}
.language-switch:hover { transform: translateY(-2px); background: #f3d9ad; box-shadow: 0 8px 22px rgba(0, 0, 0, .34); }
.language-switch:focus-visible { outline: 3px solid #b9f3c2; outline-offset: 4px; }
.language-cue { font-family: sans-serif; font-size: 18px; line-height: 1; }
.language-hint {
  max-width: 560px;
  margin: 13px auto 0;
  color: #b9f3c2;
  font-size: clamp(14px, 3.8vw, 17px);
  line-height: 1.5;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .92);
}
.language-hint strong { display: block; font-weight: 700; }
.language-hint span { display: block; color: #d5f6d8; font-size: .94em; }
.english-page .language-switch { font-family: "Amiri", Georgia, serif; }
.english-page .language-hint { font-family: Georgia, "Times New Roman", serif; }
@media (max-width: 380px) {
  .language-switch { gap: 6px; min-width: 112px; min-height: 48px; padding-inline: 10px; font-size: 15px; }
  .language-switch svg { width: 19px; height: 19px; flex-basis: 19px; }
}

/* English author-note page */
body.english-page {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: .005em;
}
.english-page .topline,
.english-page .footer { font-family: Georgia, "Times New Roman", serif; }
.english-page .content { gap: clamp(24px, 5vh, 40px); }
.english-page .eyebrow { letter-spacing: .015em; }
.english-page h1 { line-height: 1.08; }
.english-page .message-text { line-height: 1.48; }
.english-page .message-signature,
.english-page .message-label,
.english-page .new-message,
.english-page .social-heading,
.english-page .social-footnote { font-family: Georgia, "Times New Roman", serif; }
.english-page .social-card { text-align: left; }
.english-page .social-copy span { font-family: Georgia, "Times New Roman", serif; font-size: 12px; }
.english-page .arrow { margin-inline-start: auto; }
.english-page .footer { text-align: center; }
@media (max-width: 430px) {
  .english-page .topline { font-size: 13px; }
  .english-page .top-note { font-size: 11px; }
  .english-page .social-links { flex-direction: column; align-items: stretch; }
  .english-page .social-card { max-width: none; }
  .english-page .content { gap: 27px; }
}
