:root {
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --ink: #f4efe2;
  --ink-soft: rgba(244, 239, 226, 0.8);
  --ink-faint: rgba(244, 239, 226, 0.55);
  --gold: #e3c27a;
  --gold-bright: #f6dc9c;
  --glass: rgba(14, 28, 22, 0.6);
  --glass-strong: rgba(12, 24, 19, 0.86);
  --line: rgba(227, 194, 122, 0.35);
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --quran: 'Amiri Quran', 'Amiri', serif;
  --ar-title: 'Amiri', serif;
  --ar-ui: 'IBM Plex Sans Arabic', 'Inter', system-ui, sans-serif;
  --ar-read: 'Noto Naskh Arabic', 'Amiri', serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; -webkit-text-size-adjust: 100%; background: #0d1a14; color: var(--ink); font-family: var(--sans); }
html[lang="ar"] body { font-family: var(--ar-ui); }
#app, #app canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#app canvas { cursor: grab; touch-action: none; }
#app canvas:active { cursor: grabbing; }
button { font: inherit; color: inherit; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.hold, .dhikr button { -webkit-touch-callout: none; }

.vignette {
  position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(5, 12, 8, 0.45) 100%);
}

/* ---- loader ---- */
#loader {
  position: fixed; inset: 0; z-index: 30; display: grid; place-content: center; justify-items: center; gap: 18px;
  background: radial-gradient(circle at 50% 40%, #183327, #0b1711 70%);
  transition: opacity 1.2s ease, visibility 1.2s;
}
#loader.done { opacity: 0; visibility: hidden; }
#loader svg { width: 64px; height: 64px; color: var(--gold); }
#loader p { font-family: var(--serif); font-size: 20px; color: var(--ink-soft); font-style: italic; margin: 0; max-width: 80vw; text-align: center; }
html[lang="ar"] #loader p { font-family: var(--ar-title); font-style: normal; font-size: 22px; }
.spin { animation: spin 12s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- intro ---- */
#intro {
  position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(ellipse at center, rgba(8, 18, 13, 0.35), rgba(8, 18, 13, 0.78));
  opacity: 0; visibility: hidden; transition: opacity 1.4s ease, visibility 1.4s;
}
#intro.show { opacity: 1; visibility: visible; }
.intro-card { text-align: center; max-width: 560px; }
.intro-card .star { width: 54px; height: 54px; color: var(--gold); opacity: 0.9; }
.intro-card .ar-title {
  font-family: var(--ar-title); font-size: clamp(56px, 11vw, 92px); font-weight: 400; margin: 6px 0 0; line-height: 1.35;
  background: linear-gradient(180deg, #fff3cf, var(--gold) 55%, #b8913f); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 30px rgba(0, 0, 0, 0.55));
}
.intro-card h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(20px, 3.6vw, 28px); margin: 0 0 18px; letter-spacing: 0.03em; }
html[lang="ar"] .intro-card h2 { font-family: var(--ar-title); letter-spacing: 0; }
.intro-card p { font-family: var(--serif); font-size: 19px; line-height: 1.6; color: var(--ink-soft); margin: 0 0 28px; }
html[lang="ar"] .intro-card p { font-family: var(--ar-read); font-size: 18px; line-height: 2; }
#enter {
  padding: 14px 38px; border-radius: 999px; border: 1px solid var(--gold); cursor: pointer;
  background: linear-gradient(180deg, rgba(227,194,122,0.25), rgba(227,194,122,0.08));
  font-family: var(--serif); font-size: 20px; letter-spacing: 0.05em; color: var(--ink);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
}
html[lang="ar"] #enter { font-family: var(--ar-title); font-size: 22px; letter-spacing: 0; }
#enter:hover { background: rgba(227, 194, 122, 0.32); transform: translateY(-1px); box-shadow: 0 0 30px rgba(227, 194, 122, 0.3); }
.intro-card small { display: block; margin-top: 14px; color: var(--ink-faint); font-size: 12px; letter-spacing: 0.06em; }

/* ---- HUD ---- */
#brand, #actions, #gardens, #hint { opacity: 0; transition: opacity 1.2s ease 1.5s; }
body.entered #brand, body.entered #actions, body.entered #gardens, body.entered #hint { opacity: 1; }
body.reading #gardens, body.reading #hint, body.cinema #actions, body.cinema #brand { opacity: 0 !important; pointer-events: none; transition-delay: 0s; }

#brand {
  position: fixed; top: calc(18px + var(--sat)); inset-inline-start: calc(20px + var(--sar)); z-index: 5; display: flex; align-items: center; gap: 10px;
  font-family: var(--serif); font-size: 20px; letter-spacing: 0.03em; text-shadow: 0 1px 12px rgba(0,0,0,0.6);
}
html[lang="ar"] #brand { font-family: var(--ar-title); font-size: 24px; letter-spacing: 0; }
#brand svg { width: 26px; height: 26px; color: var(--gold); }

#actions { position: fixed; top: calc(14px + var(--sat)); inset-inline-end: calc(16px + var(--sal)); z-index: 5; display: flex; gap: 8px; align-items: center; }
.chip {
  height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: 14px; transition: background 0.2s;
}
.chip:hover { background: rgba(227, 194, 122, 0.18); }
.chip.gold { border-color: var(--gold); }
.chip.round { width: 44px; padding: 0; justify-content: center; }
.chip svg { width: 20px; height: 20px; fill: var(--gold); }
#lang { font-weight: 500; min-width: 44px; justify-content: center; padding: 0 12px; }
html[lang="en"] #lang { font-family: var(--ar-title); font-size: 18px; }
#time .moon, #time[data-time="night"] .sun { display: none; }
#time[data-time="night"] .moon { display: block; }
#time .sun { stroke: var(--gold); }
#sound svg { fill: var(--ink); }
#snow svg { fill: none; color: var(--ink-soft); }
#snow.on { border-color: #cfe3ff; background: rgba(207, 227, 255, 0.18); }
#snow.on svg { color: #eaf3ff; }
#sound .mute, #sound.off .on { display: none; }
#sound.off .mute { display: block; }
body.walking #mode svg { display: none; }

#gardens {
  position: fixed; inset-inline-start: calc(16px + var(--sar)); bottom: calc(16px + var(--sab)); z-index: 5; width: 300px; max-height: min(62vh, 560px);
  display: flex; flex-direction: column; padding: 12px 8px 8px;
  background: var(--glass); border: 1px solid var(--line); border-radius: 18px; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
#gardens h3 { display: flex; align-items: center; gap: 8px; margin: 0 8px 8px; font: 500 12px var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
html[lang="ar"] #gardens h3 { font: 500 14px var(--ar-ui); letter-spacing: 0; }
#gardens h3 svg { width: 16px; height: 16px; color: var(--gold); }
.g-list { overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; padding-inline-end: 2px; }
.garden { border-radius: 12px; transition: background 0.3s; }
.garden.open { background: rgba(227, 194, 122, 0.08); }
.g-head {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 12px;
  background: transparent; cursor: pointer; text-align: start;
}
.g-head:hover { background: rgba(227, 194, 122, 0.1); }
.g-star { width: 9px; height: 9px; transform: rotate(45deg); border: 1.5px solid var(--gold); flex: none; transition: background 0.3s; }
.garden.open .g-star { background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.g-name { flex: 1; font-family: var(--serif); font-size: 18px; }
html[lang="ar"] .g-name { font-family: var(--ar-title); font-size: 20px; }
.g-count { font-size: 11px; color: var(--ink-faint); }
.g-trees { list-style: none; margin: 0; padding: 0 6px 6px; display: none; }
.garden.open .g-trees { display: block; }
.g-trees button {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 0; border-radius: 10px;
  background: transparent; cursor: pointer; text-align: start; transition: background 0.2s;
}
.g-trees button:hover { background: rgba(227, 194, 122, 0.14); }
.g-trees .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px var(--gold); flex: none; }
.g-trees .t { flex: 1; font-family: var(--serif); font-size: 16px; color: var(--ink-soft); }
html[lang="ar"] .g-trees .t { font-family: var(--ar-title); font-size: 17px; }
.g-trees .r { font-size: 11px; color: var(--ink-faint); }
#gardens-btn { display: none; }
.g-close { display: none; margin-inline-start: auto; width: 32px; height: 32px; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--ink-faint); cursor: pointer; font-size: 14px; }
#gardens-btn svg { fill: none; color: var(--gold); }
.chip.heart svg { fill: #e8a3a3; }
.chip.heart { border-color: rgba(232, 163, 163, 0.45); }

#hint { opacity: 0; transition: opacity 1.2s ease 1.5s; }
body.entered #brand, body.entered #actions, body.entered #gardens, body.entered #hint { opacity: 1; }
body.reading #gardens, body.reading #hint, body.cinema #actions, body.cinema #brand { opacity: 0 !important; pointer-events: none; transition-delay: 0s; }

#brand {
  position: fixed; top: 18px; inset-inline-start: 20px; z-index: 5; display: flex; align-items: center; gap: 10px;
  font-family: var(--serif); font-size: 20px; letter-spacing: 0.03em; text-shadow: 0 1px 12px rgba(0,0,0,0.6);
}
html[lang="ar"] #brand { font-family: var(--ar-title); font-size: 24px; letter-spacing: 0; }
#brand svg { width: 26px; height: 26px; color: var(--gold); }

#actions { position: fixed; top: 14px; inset-inline-end: 16px; z-index: 5; display: flex; gap: 8px; align-items: center; }
.chip {
  height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: 14px; transition: background 0.2s;
}
.chip:hover { background: rgba(227, 194, 122, 0.18); }
.chip.gold { border-color: var(--gold); }
.chip.round { width: 44px; padding: 0; justify-content: center; }
.chip svg { width: 20px; height: 20px; fill: var(--gold); }
#lang { font-weight: 500; min-width: 44px; justify-content: center; padding: 0 12px; }
html[lang="en"] #lang { font-family: var(--ar-title); font-size: 18px; }
#time .moon, #time[data-time="night"] .sun { display: none; }
#time[data-time="night"] .moon { display: block; }
#time .sun { stroke: var(--gold); }
#sound svg { fill: var(--ink); }
#snow svg { fill: none; color: var(--ink-soft); }
#snow.on { border-color: #cfe3ff; background: rgba(207, 227, 255, 0.18); }
#snow.on svg { color: #eaf3ff; }
#sound .mute, #sound.off .on { display: none; }
#sound.off .mute { display: block; }
body.walking #mode svg { display: none; }

  position: fixed; inset-inline-start: 16px; bottom: 16px; z-index: 5; width: 280px; padding: 14px 10px 8px;
  background: var(--glass); border: 1px solid var(--line); border-radius: 16px; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px; border: 0; border-radius: 10px;
  background: transparent; cursor: pointer; text-align: start; transition: background 0.2s;
}

#hint {
  position: fixed; bottom: calc(22px + var(--sab)); left: 50%; transform: translateX(-50%); z-index: 4;
  padding: 9px 18px; border-radius: 999px; background: var(--glass); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-size: 13px; color: var(--ink-soft); white-space: nowrap; border: 1px solid rgba(255,255,255,0.08);
}
#hint:empty { display: none; }
#hint.fade { opacity: 0 !important; transition-delay: 0s; }

#tree-label {
  position: fixed; left: 0; top: 0; z-index: 6; pointer-events: none; display: flex; flex-direction: column; align-items: center;
  padding: 8px 16px; border-radius: 12px; background: var(--glass-strong); border: 1px solid var(--line);
  opacity: 0; transition: opacity 0.25s; white-space: nowrap;
}
#tree-label.show { opacity: 1; }
#tree-label .t { font-family: var(--serif); font-size: 19px; }
html[lang="ar"] #tree-label .t { font-family: var(--ar-title); font-size: 21px; }
#tree-label .r { font-size: 11px; color: var(--gold); letter-spacing: 0.04em; }
#tree-label .h { font-size: 11px; color: var(--ink-faint); margin-top: 2px; }
#tree-label .h:empty { display: none; }

#crosshair {
  position: fixed; left: 50%; top: 50%; z-index: 4; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.85); box-shadow: 0 0 6px rgba(0, 0, 0, 0.5); pointer-events: none;
  opacity: 0; transition: opacity 0.3s, width 0.25s, height 0.25s, margin 0.25s, background 0.25s;
}
body.walking.locked #crosshair, body.walking.aiming #crosshair { opacity: 1; }
body.aiming #crosshair { width: 18px; height: 18px; margin: -9px 0 0 -9px; background: transparent; border: 2px solid var(--gold); box-shadow: 0 0 12px var(--gold); }
body.reading #crosshair { opacity: 0 !important; }

#joystick {
  position: fixed; left: 0; top: 0; z-index: 4; width: 110px; height: 110px; margin: -55px 0 0 -55px; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.35); background: rgba(10, 20, 15, 0.25); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  pointer-events: none; opacity: 0; transition: opacity 0.2s;
}
#joystick.active { opacity: 1; }
#joystick .knob {
  position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%;
  background: rgba(244, 239, 226, 0.75); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
body.walking #app canvas { cursor: crosshair; }
body.walking.locked #app canvas { cursor: none; }

/* ---- cinematic layer ---- */
.letterbox {
  position: fixed; left: 0; right: 0; height: 9vh; z-index: 7; background: #040806; pointer-events: none;
  transition: transform 1.4s cubic-bezier(0.6, 0, 0.2, 1);
}
.letterbox.top { top: 0; transform: translateY(-100%); }
.letterbox.bottom { bottom: 0; transform: translateY(100%); }
body.cinema:not(.panel-open) .letterbox { transform: none; }

#captions {
  position: fixed; left: 0; right: 0; bottom: 16vh; z-index: 8; pointer-events: none;
  display: grid; justify-items: center; padding: 0 20px;
}
body.prompting #captions { bottom: calc(9vh + 190px); }
#captions { transition: bottom 0.8s ease; }
#captions .cap {
  grid-area: 1 / 1; text-align: center; max-width: 1000px;
  opacity: 0; filter: blur(14px); transform: translateY(14px) scale(0.98);
  transition: opacity 1.2s ease, filter 1.4s ease, transform 1.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
#captions .cap.in { opacity: 1; filter: blur(0); transform: none; }
#captions .cap.out { opacity: 0; filter: blur(10px); transform: translateY(-10px); transition-duration: 1.2s; }
#captions .ar {
  font-family: var(--quran); font-size: clamp(30px, 4.6vw, 54px); line-height: 1.9; color: #fffaf0;
  text-shadow: 0 0 24px rgba(0, 0, 0, 0.75), 0 2px 6px rgba(0, 0, 0, 0.6);
}
#captions .big .ar { font-size: clamp(38px, 6vw, 72px); }
#captions .huge .ar { font-size: clamp(52px, 9vw, 112px); }
#captions .gold .ar {
  background: linear-gradient(180deg, #fff6d8 10%, var(--gold-bright) 45%, #d9a94e 90%); -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none; filter: drop-shadow(0 0 22px rgba(255, 200, 110, 0.55)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}
#captions .heavy .ar { color: #b9bfc4; text-shadow: 0 0 30px rgba(0, 0, 0, 0.9), 0 2px 6px rgba(0, 0, 0, 0.8); }
#captions .en { font-family: var(--serif); font-style: italic; font-size: clamp(17px, 2vw, 23px); color: var(--ink-soft); margin-top: 2px; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.8); }
#captions .note { font-size: 12px; color: var(--gold); margin-top: 6px; letter-spacing: 0.05em; text-shadow: 0 1px 8px #000; }

#prompt {
  position: fixed; left: 50%; bottom: calc(9vh + 18px); transform: translate(-50%, 20px); z-index: 9; text-align: center;
  opacity: 0; pointer-events: none; transition: opacity 0.8s, transform 0.8s; width: min(720px, calc(100% - 32px));
}
#prompt.show { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.prompt-text { font-family: var(--ar-read); font-size: 18px; line-height: 1.9; color: var(--ink); text-shadow: 0 1px 12px #000; margin: 0 0 14px; }
html[lang="en"] .prompt-text { font-family: var(--serif); font-size: 20px; font-style: italic; }
.dhikr { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.dhikr button {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 20px; border-radius: 16px; cursor: pointer;
  border: 1px solid var(--gold); background: rgba(14, 28, 22, 0.55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: background 0.3s, transform 0.2s, opacity 0.6s, box-shadow 0.3s;
}
.dhikr button:hover:not(:disabled) { background: rgba(227, 194, 122, 0.22); transform: translateY(-2px); box-shadow: 0 0 24px rgba(227, 194, 122, 0.35); }
.dhikr button .ar { font-family: var(--quran); font-size: 24px; line-height: 1.6; color: var(--gold-bright); }
.dhikr button .en { font-size: 11px; color: var(--ink-faint); }
.dhikr button.said { opacity: 0.35; cursor: default; background: rgba(227, 194, 122, 0.25); }

.hold {
  position: relative; display: inline-flex; flex-direction: column; align-items: center; gap: 10px; padding: 0; border: 0; background: none; cursor: pointer;
  user-select: none; -webkit-user-select: none; touch-action: none; --p: 0;
}
.hold svg { width: 110px; height: 110px; transform: rotate(-90deg); filter: drop-shadow(0 0 calc(6px + var(--p) * 24px) rgba(255, 210, 120, 0.7)); }
.hold circle { fill: rgba(14, 28, 22, 0.55); stroke-width: 4; }
.hold .track { stroke: rgba(227, 194, 122, 0.3); }
.hold .fill { fill: none; stroke: var(--gold-bright); stroke-dasharray: 289; stroke-dashoffset: calc(289 * (1 - var(--p))); stroke-linecap: round; }
.hold span { font-size: 16px; color: var(--ink); text-shadow: 0 1px 10px #000; }
.hold::after {
  content: ''; position: absolute; top: 37px; left: 50%; width: 36px; height: 36px; margin-left: -18px; border-radius: 50%;
  background: radial-gradient(circle, #fff6d8, var(--gold) 60%, transparent 70%); opacity: calc(0.5 + var(--p) * 0.5);
  transform: scale(calc(0.8 + var(--p) * 0.5));
}
.hold.holding svg { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: rotate(-90deg) scale(1.05); } }

#cine-ui {
  position: fixed; top: calc(9vh + 14px); inset-inline-end: calc(16px + var(--sal)); z-index: 9; display: flex; gap: 8px;
  opacity: 0; pointer-events: none; transition: opacity 0.8s 0.8s;
}
body.cinema:not(.panel-open) #cine-ui { opacity: 1; pointer-events: auto; }
#cine-ui button {
  padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); cursor: pointer; font-size: 13px; color: var(--ink-soft);
}
#cine-ui button:hover { color: var(--ink); border-color: var(--gold); }

/* ---- reflection panel ---- */
#verse-panel, #grove-panel {
  position: fixed; top: 0; bottom: 0; inset-inline-end: 0; z-index: 10; width: min(470px, 100%);
  background: linear-gradient(180deg, rgba(14, 28, 22, 0.8), rgba(10, 20, 16, 0.92));
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-inline-start: 1px solid var(--line);
  transform: translateX(105%); transition: transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s;
}
html[dir="rtl"] #verse-panel, html[dir="rtl"] #grove-panel { transform: translateX(-105%); }
html #verse-panel.open, html #grove-panel.open { transform: none; }
.panel-inner { height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: calc(26px + var(--sat)) 34px calc(48px + var(--sab)); scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
#panel-close { border: 0; background: none; cursor: pointer; color: var(--ink-faint); font-size: 13px; padding: 6px 0; margin-bottom: 22px; }
html[dir="ltr"] #panel-close .arrow { display: inline-block; transform: scaleX(-1); }
#panel-close:hover { color: var(--gold); }
.surah-ar { font-family: var(--ar-title); font-size: 24px; color: var(--gold); margin: 0; text-align: center; }
.surah { text-align: center; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); margin: 4px 0 6px; }
html[lang="ar"] .surah { letter-spacing: 0; font-size: 14px; }
#p-theme { font-family: var(--serif); font-weight: 500; font-size: 34px; text-align: center; margin: 0; line-height: 1.2; }
html[lang="ar"] #p-theme { font-family: var(--ar-title); font-weight: 700; font-size: 36px; line-height: 1.5; }
.ornament { display: flex; align-items: center; gap: 12px; margin: 20px 0 16px; color: var(--gold); }
.ornament span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line)); }
.ornament span:last-child { background: linear-gradient(270deg, transparent, var(--line)); }
.ornament svg { width: 22px; height: 22px; }
.arabic { font-family: var(--quran); font-size: 32px; line-height: 2.2; text-align: center; margin: 0 0 18px; color: #fbf6ea; }
.translation { font-family: var(--serif); font-size: 21px; line-height: 1.5; text-align: center; font-style: italic; margin: 0 0 6px; color: var(--ink); }
.credit { text-align: center; font-size: 11px; color: var(--ink-faint); margin: 0 0 4px; letter-spacing: 0.03em; min-height: 1px; }
[hidden] { display: none !important; }
.panel-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 18px 0 8px; }
.panel-actions button {
  display: flex; align-items: center; gap: 9px; padding: 10px 18px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--gold); background: rgba(227, 194, 122, 0.1); font-size: 14px; transition: background 0.2s;
}
#p-replay { border-color: var(--line); background: transparent; }
.panel-actions button:hover { background: rgba(227, 194, 122, 0.22); }
.panel-actions svg { width: 16px; height: 16px; fill: var(--gold); }
#p-listen .stop, #p-listen.playing .play { display: none; }
#p-listen.playing .stop { display: block; }
.reflect, .ponder { margin-top: 28px; }
.reflect h3, .ponder h3 { font: 500 11px var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin: 0 0 10px; }
html[lang="ar"] .reflect h3, html[lang="ar"] .ponder h3 { font: 500 15px var(--ar-ui); letter-spacing: 0; }
#p-reflection p { font-size: 15px; line-height: 1.75; color: var(--ink-soft); margin: 0 0 14px; }
html[lang="ar"] #p-reflection p { font-family: var(--ar-read); font-size: 18px; line-height: 2.05; }
#p-reflection em { color: var(--gold-bright); font-style: normal; }
.ponder { padding: 18px 20px; border-radius: 14px; background: rgba(227, 194, 122, 0.08); border: 1px solid var(--line); }
.ponder p { font-family: var(--serif); font-size: 19px; line-height: 1.5; margin: 0; }
html[lang="ar"] .ponder p { font-family: var(--ar-title); font-size: 21px; line-height: 1.9; }

/* ---- support ---- */
#support {
  position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px;
  background: rgba(5, 12, 9, 0.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden; transition: opacity 0.4s, visibility 0.4s;
}
body.support-open #support { opacity: 1; visibility: visible; }
.support-card {
  position: relative; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; text-align: center;
  padding: 30px 30px 24px; border-radius: 24px; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(20, 40, 32, 0.96), rgba(10, 22, 17, 0.97));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); transform: translateY(14px); transition: transform 0.5s;
}
body.support-open .support-card { transform: none; }
#support-close { position: absolute; top: 14px; inset-inline-end: 14px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: transparent; cursor: pointer; color: var(--ink-faint); }
.support-card .star { width: 40px; height: 40px; color: var(--gold); }
.support-card h2 { font-family: var(--serif); font-weight: 500; font-size: 30px; margin: 6px 0 10px; }
html[lang="ar"] .support-card h2 { font-family: var(--ar-title); font-size: 32px; }
.support-card .lead { font-size: 15px; line-height: 1.75; color: var(--ink-soft); margin: 0 0 18px; }
html[lang="ar"] .support-card .lead { font-family: var(--ar-read); font-size: 16px; line-height: 2; }
.tiers { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 18px; }
.tier { grid-column: span 2; }
.tier:nth-last-child(-n+2) { grid-column: span 3; min-height: 50px; }
.tier {
  display: flex; flex-direction: column; gap: 4px; align-items: center; justify-content: center; min-height: 74px; padding: 10px 8px;
  border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); cursor: pointer; transition: all 0.25s;
}
.tier:hover { border-color: var(--gold); }
.tier.on { border-color: var(--gold); background: rgba(227, 194, 122, 0.16); box-shadow: 0 0 22px rgba(227, 194, 122, 0.2); }
.tier .amt { font-size: 15px; font-weight: 500; color: var(--gold-bright); }
.tier .tt { font-size: 11.5px; color: var(--ink-faint); line-height: 1.5; }
.tier .tt:empty { display: none; }
.support-card h4 { margin: 0 0 10px; font-size: 13px; font-weight: 500; color: var(--gold); }
.surahs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 20px; }
.sur { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; cursor: pointer; font-size: 14px; color: var(--ink-soft); }
html[lang="ar"] .sur { font-family: var(--ar-title); font-size: 17px; }
.sur.on { border-color: var(--gold); color: var(--ink); background: rgba(227, 194, 122, 0.16); }
#support-give {
  width: 100%; padding: 14px; border-radius: 999px; border: 1px solid var(--gold); cursor: pointer; font-size: 17px;
  background: linear-gradient(180deg, rgba(227, 194, 122, 0.4), rgba(227, 194, 122, 0.18)); color: var(--ink); transition: box-shadow 0.3s;
}
#support-give:hover:not(:disabled) { box-shadow: 0 0 30px rgba(227, 194, 122, 0.4); }
#support-give:disabled { cursor: default; opacity: 0.6; font-size: 14px; background: transparent; border-style: dashed; }
.support-card .dua { font-family: var(--ar-title); font-size: 17px; color: var(--ink-faint); margin: 12px 0 14px; }
.support-card .other { display: flex; justify-content: center; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-faint); border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 14px; }
#support-share { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; cursor: pointer; font-size: 13px; }
#p-support {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 22px; padding: 12px; border-radius: 14px;
  border: 1px dashed rgba(232, 163, 163, 0.45); background: transparent; cursor: pointer; color: var(--ink-soft); font-size: 14px;
}
#p-support:hover { background: rgba(232, 163, 163, 0.08); color: var(--ink); }
#p-support svg { width: 16px; height: 16px; fill: #e8a3a3; }

/* screenshot mode */
body.shot #hint, body.shot #loader { display: none; }
body.clean #actions, body.clean #brand, body.clean #gardens, body.clean #gardens-btn, body.clean .vignette { display: none !important; }

@media (max-width: 1100px) {
  #support-btn span { display: none; }
  #support-btn { width: 44px; padding: 0; justify-content: center; }
}
@media (max-width: 820px) {
  #gardens { display: none; }
  #gardens-btn { display: flex; width: 40px; padding: 0; justify-content: center; }
  #gardens-btn span { display: none; }
  #support-btn { width: 40px; }
  body.gardens-open #gardens {
    display: flex; right: calc(8px + var(--sar)); left: calc(8px + var(--sal)); width: auto; bottom: calc(8px + var(--sab));
    max-height: 52vh; max-height: 52dvh; opacity: 1 !important; z-index: 12;
  }
  #gardens .g-close { display: grid; }
  .g-head, .g-trees button { min-height: 44px; }
  .tier { padding: 10px 4px; min-height: 70px; }
  .tier .amt { font-size: 13.5px; }
  .tier .tt { font-size: 10.5px; }
  .support-card { padding: calc(26px + var(--sat)) 18px calc(20px + var(--sab)); border-radius: 22px; }
  .support-card h2 { font-size: 26px; }
  #actions { gap: 6px; inset-inline-end: 10px; }
  .chip { height: 40px; padding: 0 12px; }
  .chip.round { width: 40px; }
  #actions { gap: 5px; }
  #mode span, #time span { display: none; }
  #mode, #time { width: 40px; padding: 0; justify-content: center; }
  body.walking #mode span { display: inline; font-size: 12px; }
  body.walking #mode { width: auto; padding: 0 12px; }
  #brand span { display: none; }
  #hint { font-size: 12px; white-space: normal; text-align: center; width: calc(100% - 32px); }
  #verse-panel, html[dir="rtl"] #verse-panel, #grove-panel, html[dir="rtl"] #grove-panel {
    top: auto; width: 100%; height: 66vh; height: 66dvh; border-inline-start: 0; border-top: 1px solid var(--line); border-radius: 22px 22px 0 0;
    transform: translateY(105%);
  }
  html #verse-panel.open, html[dir] #verse-panel.open, html #grove-panel.open, html[dir] #grove-panel.open { transform: none; }
  #verse-panel::before, #grove-panel::before { content: ''; position: absolute; top: 8px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: rgba(255, 255, 255, 0.25); }
  .panel-inner { padding: 22px 20px calc(40px + var(--sab)); }
  #panel-close { font-size: 14px; padding: 8px 0; margin-bottom: 12px; }
  .panel-actions button { padding: 11px 16px; }
  .arabic { font-size: 27px; }
  #p-theme { font-size: 28px; }
  #captions { bottom: 13vh; }
  .letterbox { height: 7vh; }
}

/* ---- phones held sideways (short screens) ---- */
@media (max-height: 500px) and (orientation: landscape) {
  #gardens { display: none; }
  #gardens-btn { display: flex; }
  #gardens-btn span { display: none; }
  #gardens-btn { width: 44px; padding: 0; justify-content: center; }
  body.gardens-open #gardens {
    display: flex; opacity: 1 !important; z-index: 12; top: calc(66px + var(--sat)); bottom: calc(8px + var(--sab));
    inset-inline-start: calc(10px + var(--sar)); width: 320px; max-height: none;
  }
  #gardens .g-close { display: grid; }
  #verse-panel { width: min(430px, 52vw); }
  .panel-inner { padding: calc(14px + var(--sat)) 22px calc(28px + var(--sab)); }
  #captions { bottom: 12vh; }
  #captions .ar { font-size: 26px; line-height: 1.7; }
  #captions .big .ar { font-size: 32px; }
  #captions .huge .ar { font-size: 46px; }
  #captions .en { font-size: 15px; }
  body.prompting #captions { bottom: calc(6vh + 120px); }
  .letterbox { height: 6vh; }
  #cine-ui { top: calc(6vh + 8px); }
  #prompt { bottom: calc(6vh + 8px); }
  .prompt-text { font-size: 15px; margin-bottom: 8px; }
  .dhikr button { padding: 6px 14px; }
  .dhikr button .ar { font-size: 20px; }
  .hold svg { width: 80px; height: 80px; }
  .hold::after { top: 24px; }
  .support-card { padding: 18px 22px; }
  .support-card .star { display: none; }
  .support-card h2 { font-size: 24px; margin-top: 0; }
  .support-card .lead { font-size: 14px; line-height: 1.7; margin-bottom: 12px; }
  .tier { min-height: 56px; padding: 6px; }
  .intro-card .ar-title { font-size: 52px; }
  .intro-card p { margin-bottom: 16px; }
}

/* ---- tablets: keep reading width comfortable ---- */
@media (min-width: 600px) and (max-width: 820px) {
  .panel-inner > * { max-width: 600px; margin-inline: auto !important; }
  #actions .chip span { display: inline; }
  #mode, #time, #gardens-btn, #support-btn { width: auto; padding: 0 14px; }
}

/* ---- very narrow phones ---- */
@media (max-width: 400px) {
  #actions { gap: 4px; inset-inline-end: calc(8px + var(--sal)); }
  .chip, .chip.round, #mode, #time, #gardens-btn, #support-btn, #lang { height: 36px; width: 36px; min-width: 36px; padding: 0; justify-content: center; }
  body.walking #mode { width: auto; padding: 0 10px; }
  .chip svg { width: 18px; height: 18px; }
  #brand { inset-inline-start: calc(12px + var(--sar)); }
}

/* =====================================================================
   Garden of Ongoing Charity: plant button, dedication card, planting flow
   ===================================================================== */
.chip.plant {
  border-color: rgba(190, 225, 150, 0.6);
  background: linear-gradient(180deg, rgba(150, 200, 110, 0.28), rgba(40, 70, 40, 0.55));
  box-shadow: 0 0 18px rgba(170, 220, 130, 0.18);
}
.chip.plant:hover { background: linear-gradient(180deg, rgba(160, 215, 120, 0.4), rgba(40, 70, 40, 0.6)); }
.chip.plant svg { fill: #cfe8a8; color: #cfe8a8; }
#intro-tree { font-family: var(--ar-title) !important; color: var(--gold-bright) !important; font-size: 21px !important; margin: -8px 0 22px !important; }

#p-plant, #support-plant {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin-top: 26px; padding: 14px; border-radius: 14px; cursor: pointer;
  border: 1px solid rgba(190, 225, 150, 0.55); background: linear-gradient(180deg, rgba(150, 200, 110, 0.18), rgba(150, 200, 110, 0.06));
  color: var(--ink); font-size: 15px; transition: background 0.2s, box-shadow 0.2s;
}
#p-plant:hover, #support-plant:hover { background: rgba(150, 200, 110, 0.26); box-shadow: 0 0 24px rgba(170, 220, 130, 0.22); }
#p-plant svg, #support-plant svg { width: 22px; height: 22px; fill: #cfe8a8; color: #cfe8a8; flex: none; }
html[lang="ar"] #p-plant { font-family: var(--ar-title); font-size: 18px; }
#p-plant + #p-support { margin-top: 10px; }
#support-plant { margin: 4px 0 18px; justify-content: flex-start; text-align: start; }
#support-plant .t { display: flex; flex-direction: column; gap: 2px; }
#support-plant b { font-weight: 500; color: var(--gold-bright); }
html[lang="ar"] #support-plant b { font-family: var(--ar-title); font-size: 19px; }
#support-plant small { font-size: 12.5px; color: var(--ink-faint); }

/* nav entry */
.grove-nav { display: flex; align-items: center; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.grove-nav .g-head { flex: 1; }
.grove-nav .g-star.seed { border-color: #cfe8a8; background: #cfe8a8; box-shadow: 0 0 10px rgba(190, 235, 150, 0.7); }
.g-plant {
  flex: none; margin-inline-end: 10px; padding: 5px 12px; border-radius: 999px; cursor: pointer; font-size: 12px; white-space: nowrap;
  border: 1px solid rgba(190, 225, 150, 0.55); background: rgba(150, 200, 110, 0.14); color: var(--ink);
}
.g-plant:hover { background: rgba(150, 200, 110, 0.28); }

/* panel content */
#grove-panel .gp-close { border: 0; background: none; cursor: pointer; color: var(--ink-faint); font-size: 13px; padding: 6px 0; margin-bottom: 18px; }
html[dir="ltr"] #grove-panel .gp-close .arrow { display: inline-block; transform: scaleX(-1); }
#grove-panel .gp-close:hover { color: var(--gold); }
.gp-kicker { text-align: center; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: #cfe8a8; margin: 0 0 14px; }
html[lang="ar"] .gp-kicker { letter-spacing: 0; font-size: 15px; font-family: var(--ar-title); }

.gp-ded {
  position: relative; text-align: center; padding: 22px 18px 18px; margin: 4px 0 6px; border-radius: 18px;
  border: 1px solid var(--line); background: radial-gradient(120% 90% at 50% 0%, rgba(227, 194, 122, 0.14), rgba(227, 194, 122, 0.03) 70%);
}
.gp-ded.big { border: 0; background: none; padding: 0 0 4px; }
.gp-head { margin: 0; font-size: 14px; color: var(--ink-soft); }
html[lang="ar"] .gp-head { font-family: var(--ar-title); font-size: 19px; color: var(--gold); }
.gp-name { margin: 6px 0 2px; font-family: var(--ar-title); font-weight: 700; font-size: 30px; line-height: 1.4; color: #fbf3dc; overflow-wrap: anywhere; text-shadow: 0 0 24px rgba(255, 210, 130, 0.35); }
.gp-ded.big .gp-name { font-size: 38px; }
.gp-name .ph { color: var(--ink-faint); font-weight: 400; }
.gp-after { margin: 0; font-size: 14px; color: var(--ink-faint); font-style: italic; font-family: var(--serif); }
html[lang="ar"] .gp-after { font-family: var(--ar-title); font-style: normal; font-size: 17px; }
.gp-from { margin: 10px 0 0; font-size: 13px; color: var(--ink-soft); }
html[lang="ar"] .gp-from { font-family: var(--ar-read); font-size: 15px; }
.gp-verse-mini { font-family: var(--quran); font-size: 19px; line-height: 2; margin: 14px 0 0; color: #f6efdc; }
.gp-ref { margin: 2px 0 0; font-size: 12px; color: var(--gold); }

.gp-dua { margin-top: 26px; padding: 18px 20px; border-radius: 16px; background: rgba(227, 194, 122, 0.08); border: 1px solid var(--line); text-align: center; }
.gp-dua h3 { font: 500 11px var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin: 0 0 8px; }
html[lang="ar"] .gp-dua h3 { font: 500 15px var(--ar-ui); letter-spacing: 0; }
.gp-dua p { margin: 0 0 14px; font-family: var(--serif); font-size: 18px; line-height: 1.55; }
html[lang="ar"] .gp-dua p { font-family: var(--ar-title); font-size: 21px; line-height: 1.9; }
.gp-ameen {
  padding: 10px 28px; border-radius: 999px; cursor: pointer; font-size: 16px; color: var(--ink);
  border: 1px solid var(--gold); background: linear-gradient(180deg, rgba(227, 194, 122, 0.3), rgba(227, 194, 122, 0.1)); transition: box-shadow 0.3s, background 0.3s;
}
html[lang="ar"] .gp-ameen { font-family: var(--ar-title); font-size: 20px; }
.gp-ameen:hover { box-shadow: 0 0 26px rgba(227, 194, 122, 0.4); }
.gp-ameen.done { border-style: dashed; background: transparent; color: var(--gold-bright); }
#grove-panel .panel-actions .alt { border-color: var(--line); background: transparent; }
.gp-cta {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin-top: 26px; padding: 14px; border-radius: 14px; cursor: pointer;
  border: 1px solid rgba(190, 225, 150, 0.55); background: linear-gradient(180deg, rgba(150, 200, 110, 0.18), rgba(150, 200, 110, 0.06)); color: var(--ink); font-size: 15px;
}
html[lang="ar"] .gp-cta { font-family: var(--ar-title); font-size: 19px; }
.gp-cta:hover { background: rgba(150, 200, 110, 0.26); }
.gp-star { width: 22px; height: 22px; color: var(--gold); flex: none; }

/* planting flow */
.gp-intro { text-align: center; }
.gp-intro .gp-star { width: 40px; height: 40px; }
.gp-title { font-family: var(--serif); font-weight: 500; font-size: 30px; line-height: 1.25; margin: 6px 0 12px; }
html[lang="ar"] .gp-title { font-family: var(--ar-title); font-weight: 700; font-size: 32px; line-height: 1.5; }
.gp-lead { font-size: 15px; line-height: 1.75; color: var(--ink-soft); margin: 0 0 18px; }
html[lang="ar"] .gp-lead { font-family: var(--ar-read); font-size: 17px; line-height: 2; }
.gp-hadith {
  margin: 0 0 8px; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.18);
  font-family: var(--ar-title); font-size: 19px; line-height: 1.9; color: #f6eedb;
}
.gp-hadith cite { display: block; margin-top: 4px; font-style: normal; font-size: 14px; color: var(--gold); }
.gp-hadith-en { font-family: var(--serif); font-style: italic; font-size: 16px; line-height: 1.5; color: var(--ink-soft); margin: 0 0 16px; }
.gp-how { list-style: none; padding: 0; margin: 18px 0 22px; display: grid; gap: 10px; text-align: start; }
.gp-how li { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--ink-soft); }
html[lang="ar"] .gp-how li { font-family: var(--ar-read); font-size: 16px; }
.gp-how b { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold-bright); font-family: var(--ar-title); font-weight: 400; }
.gp-primary {
  display: block; width: 100%; padding: 15px 20px; border-radius: 999px; cursor: pointer; font-size: 17px; color: #1c1a10; font-weight: 600;
  border: 0; background: linear-gradient(180deg, #f6dc9c, #d9b264); box-shadow: 0 6px 24px rgba(227, 194, 122, 0.25); transition: box-shadow 0.25s, transform 0.25s;
}
html[lang="ar"] .gp-primary { font-family: var(--ar-title); font-size: 21px; font-weight: 700; }
.gp-primary:hover:not(:disabled) { box-shadow: 0 8px 34px rgba(227, 194, 122, 0.45); transform: translateY(-1px); }
.gp-primary:disabled { cursor: default; opacity: 0.6; background: transparent; border: 1px dashed var(--line); color: var(--ink-soft); box-shadow: none; font-size: 14px; font-weight: 400; }
.gp-small { font-size: 12.5px; line-height: 1.7; color: var(--ink-faint); text-align: center; margin: 12px 0 0; }
html[lang="ar"] .gp-small { font-size: 13.5px; }
.gp-count { margin: 14px 0 0; text-align: center; color: #cfe8a8; font-size: 13px; }
.gp-steps { display: flex; justify-content: center; gap: 6px; margin: 0 0 14px; }
.gp-steps span { width: 28px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.15); }
.gp-steps span.on { background: var(--gold); }
.gp-step { text-align: center; font-family: var(--serif); font-weight: 500; font-size: 24px; margin: 0 0 16px; }
html[lang="ar"] .gp-step { font-family: var(--ar-title); font-size: 26px; }
.gp-seg { display: flex; gap: 6px; padding: 4px; margin: 0 0 10px; border-radius: 999px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.2); }
.gp-seg button { flex: 1; padding: 9px 8px; border-radius: 999px; border: 0; background: transparent; cursor: pointer; font-size: 14px; color: var(--ink-soft); transition: background 0.2s, color 0.2s; }
html[lang="ar"] .gp-seg button { font-size: 15px; }
.gp-seg button.on { background: rgba(227, 194, 122, 0.22); color: var(--ink); box-shadow: inset 0 0 0 1px var(--gold); }
.gp-field { display: block; margin: 14px 0 0; }
.gp-field span { display: block; font-size: 12.5px; color: var(--gold); margin: 0 0 6px; }
.gp-field input {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.28); color: var(--ink);
  font-size: 17px; font-family: var(--ar-title); outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.gp-field input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(227, 194, 122, 0.15); }
.gp-field input::placeholder { color: rgba(244, 239, 226, 0.35); }
.gp-label { font-size: 12px; color: var(--ink-faint); margin: 18px 0 6px; text-align: center; }
.gp-err { color: #f0b0a0; text-align: center; font-size: 13px; margin: 8px 0 0; }
.gp-nav { display: flex; gap: 10px; margin-top: 20px; align-items: center; }
.gp-nav .gp-primary { flex: 1; }
.gp-prev { padding: 13px 18px; border-radius: 999px; border: 1px solid var(--line); background: transparent; cursor: pointer; color: var(--ink-soft); font-size: 14px; }
.gp-prev:hover { color: var(--ink); border-color: var(--gold); }
.gp-verses { display: grid; gap: 10px; }
.gp-verse {
  display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 14px; cursor: pointer; text-align: center;
  border: 1px solid var(--line); background: rgba(0, 0, 0, 0.18); color: var(--ink); transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.gp-verse:hover { border-color: rgba(227, 194, 122, 0.7); }
.gp-verse.on { border-color: var(--gold); background: rgba(227, 194, 122, 0.14); box-shadow: 0 0 22px rgba(227, 194, 122, 0.18); }
.gp-verse .ar { font-family: var(--quran); font-size: 19px; line-height: 2; }
.gp-verse .th { font-size: 12.5px; color: var(--gold); }
html[lang="ar"] .gp-verse .th { font-size: 14px; font-family: var(--ar-title); }
.gp-tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 16px; }
.gp-tier {
  display: flex; flex-direction: column; gap: 5px; padding: 14px 12px; border-radius: 14px; cursor: pointer; text-align: center;
  border: 1px solid var(--line); background: rgba(0, 0, 0, 0.18); color: var(--ink); transition: border-color 0.2s, background 0.2s;
}
.gp-tier.on { border-color: var(--gold); background: rgba(227, 194, 122, 0.16); box-shadow: 0 0 22px rgba(227, 194, 122, 0.2); }
.gp-tier .amt { font-size: 15px; font-weight: 500; color: var(--gold-bright); }
html[lang="ar"] .gp-tier .amt { font-family: var(--ar-title); font-size: 18px; }
.gp-tier .tt { font-size: 12px; line-height: 1.5; color: var(--ink-faint); }
.gp-dua-line { text-align: center; font-family: var(--ar-title); font-size: 17px; color: var(--ink-faint); margin: 10px 0 0; }
.gp-link { display: flex; gap: 8px; margin: 18px 0 12px; }
.gp-link input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.28); color: var(--ink-soft); font-size: 13px; direction: ltr; }
.gp-link button { padding: 0 16px; border-radius: 10px; border: 1px solid var(--gold); background: rgba(227, 194, 122, 0.12); color: var(--ink); cursor: pointer; }

@media (max-width: 1100px) {
  #plant-btn span { display: none; }
  #plant-btn { width: 44px; padding: 0; justify-content: center; }
}
@media (max-width: 820px) {
  #plant-btn { width: 40px; }
  .gp-ded.big .gp-name { font-size: 32px; }
  .gp-title { font-size: 26px; }
  #grove-panel .gp-close { font-size: 14px; padding: 8px 0; margin-bottom: 10px; }
}

/* legal links */
.legal-link { display: inline-block; margin-top: 18px; font-size: 12px; color: var(--ink-faint); text-decoration: none; border-bottom: 1px dotted rgba(244, 239, 226, 0.35); }
.legal-link:hover { color: var(--gold); }
.legal-link.inline { margin-top: 0; }
.gp-small a { color: var(--gold); }

/* gratitude scene (14:7) */
#prompt .grat-q { margin: 0 0 12px; font-family: var(--ar-title); font-size: 20px; color: var(--ink); text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7); text-align: center; }
html[lang="en"] #prompt .grat-q { font-family: var(--serif); font-size: 21px; font-style: italic; }
#prompt .grat-btn {
  display: block; margin: 0 auto; padding: 14px 40px; border-radius: 999px; cursor: pointer; color: #1c1a10;
  border: 0; background: linear-gradient(180deg, #f6dc9c, #d9b264); font: 700 24px var(--ar-title);
  box-shadow: 0 6px 30px rgba(227, 194, 122, 0.35); transition: transform 0.15s, box-shadow 0.25s;
}
#prompt .grat-btn:hover { box-shadow: 0 8px 40px rgba(227, 194, 122, 0.55); }
#prompt .grat-btn:active { transform: scale(0.96); }
#prompt .grat-n { margin: 10px 0 0; min-height: 1.4em; text-align: center; font-size: 14px; color: var(--gold-bright); text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8); }
