/* بيتي مملكتي — نسخة الويب. موبايل أولاً، عربي RTL، بدون أي إطار عمل. */
* { box-sizing: border-box; }
:root {
  --bg: #faf6f0;
  --card: #ffffff;
  --ink: #2b2118;
  --muted: #7a6a58;
  --accent: #b45309;
  --accent-soft: #fef3c7;
  --line: #e7ddd0;
  --danger: #b91c1c;
}
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
  line-height: 1.7;
}
.phone { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--bg); padding-bottom: 72px; }
.screen { display: none; }
.screen.active { display: block; }
.app-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px; background: var(--card); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5; flex-wrap: wrap;
}
.app-header h1 { font-size: 1.15rem; margin: 0; }
/* الرئيسية: صورة خلفية (كليجة) وراء الكتابة + عنوان ذهبي راقي بإطار أسود */
.app-header-home {
  background-image: linear-gradient(rgba(0,0,0,.2), rgba(0,0,0,.2)), url("https://pub-c5c5a13de5bd45d4bb0e7487699cf86b.r2.dev/originals/kleicha.jpg");
  background-size: cover; background-position: center;
  border-bottom: 2px solid #000;
  min-height: 210px; padding: 28px 16px 24px;
}
.app-header-home .brand {
  color: #d4af37;
  font-family: "Traditional Arabic", "Amiri", Georgia, "Times New Roman", serif;
  font-weight: 700;
  border: 2px solid #000;
  background: rgba(0,0,0,.6);
  border-radius: 10px;
  padding: 2px 14px;
}
.content { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.card h2 { margin: 0 0 8px; font-size: 1.05rem; }
.card h3 { margin: 0 0 6px; font-size: 1.2rem; }
.hero { background: linear-gradient(160deg, #fff7e6, #ffffff); border-color: #f0d9a8; }
.hero img { max-width: 100%; border-radius: 12px; display: block; margin: 8px 0; }
.muted { color: var(--muted); font-size: .9rem; }
.soon {
  display: inline-block; background: var(--accent-soft); color: var(--accent);
  border-radius: 999px; padding: 1px 10px; font-size: .8rem; margin-inline-start: 6px;
}
.btn {
  display: inline-block; border: none; border-radius: 999px; cursor: pointer;
  padding: 12px 22px; font-size: 1rem; font-family: inherit; margin-top: 8px;
}
.btn.primary { background: var(--accent); color: #fff; }
.btn.secondary { background: #fff; color: var(--accent); border: 1px solid var(--accent); }
.btn.danger { background: var(--danger); color: #fff; }
.btn:disabled { opacity: .5; cursor: default; }
.link-btn { background: none; border: none; color: var(--accent); cursor: pointer; font-size: .85rem; font-family: inherit; }
input[type="search"], input[type="text"], textarea, select {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 1rem; font-family: inherit; background: #fff; color: var(--ink);
}
textarea { min-height: 70px; resize: vertical; }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.tabs button {
  flex: 0 0 auto; border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 8px 14px; font-size: .95rem; font-family: inherit; cursor: pointer;
}
.tabs button.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.results { display: flex; flex-direction: column; gap: 10px; }
/* تفاصيل الوصفة: تبقى تحت الشريط العلوي الثابت عند الانتقال إليها */
#recipe-detail { scroll-margin-top: 76px; }
#guide-detail { scroll-margin-top: 76px; }
#salon-detail, #gym-detail, #dream-detail { scroll-margin-top: 76px; }
/* التفاصيل القصيرة آخر الصفحة: بلا حد أدنى للارتفاع لا يستطيع المتصفح إيصال أعلى الصندوق لأعلى الشاشة (ينتهي التمرير عند نهاية الصفحة) فيبقى العنوان نازلاً — هذا سبب بقاء عنوان الكليجة نازلاً مع أن الدولمة (الأطول) كانت صحيحة */
#recipe-detail, #guide-detail, #salon-detail, #gym-detail, #dream-detail { min-height: calc(100vh - 76px); }
.recipe-item, .memory-item {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; cursor: pointer; text-align: start; font-family: inherit; font-size: 1rem;
}
.recipe-item .status { color: var(--muted); font-size: .85rem; display: block; }
.recipe-item { display: flex; align-items: center; gap: 12px; }
.recipe-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; flex: none; }
.recipe-item .recipe-text { min-width: 0; }
.recipe-item .recipe-text strong { display: block; }
.services { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.plans { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.step-box { text-align: center; }
.step-box .step-num { font-size: .9rem; color: var(--muted); }
.step-box .step-text { font-size: 1.25rem; font-weight: 700; margin: 10px 0; }
.step-nav { display: flex; gap: 10px; justify-content: space-between; }
.timer { background: var(--accent-soft); border-radius: 12px; padding: 12px; text-align: center; margin-top: 12px; }
.timer .time { font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.timer .row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row input[type="text"] { flex: 1; min-width: 0; }
/* أقسام جديدة: شات، كروبات، عروض، ديكور */
.bottom-nav { overflow-x: auto; scrollbar-width: none; }
.bottom-nav::-webkit-scrollbar { display: none; }
.bottom-nav button { flex: 0 0 auto; min-width: 72px; }
.qr-wrap { display: flex; justify-content: center; padding: 8px 0; }
.qr-wrap canvas { border: 1px solid var(--line); border-radius: 12px; }
.chat-messages { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; max-height: 320px; overflow-y: auto; }
.chat-msg { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; max-width: 85%; }
.chat-msg.me { background: var(--accent-soft); align-self: flex-end; }
.chat-msg .chat-time { display: block; font-size: .75rem; color: var(--muted); margin-top: 4px; }
.chip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; margin: 2px; cursor: pointer; }
.decor-preview { width: 100%; border-radius: 12px; margin-top: 10px; display: block; }
#screen-groups select, #screen-decor select { margin-bottom: 8px; }
#screen-friends input, #screen-groups input, #screen-offers input { margin-bottom: 8px; }
.scale-row { display: flex; gap: 8px; }
.scale-row button {
  flex: 1; padding: 10px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; font-family: inherit; font-size: 1rem; cursor: pointer;
}
.scale-row button.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.ingredients { margin: 0; padding-inline-start: 18px; }
.ingredients li { margin-bottom: 4px; }
.qa { margin-top: 12px; }
.qa button {
  display: block; width: 100%; text-align: start; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; font-family: inherit; font-size: .95rem; cursor: pointer;
}
.qa .answer { background: var(--accent-soft); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.camera-box { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.camera-box video { width: 100%; border-radius: 12px; background: #000; display: block; margin-top: 10px; }
.camera-note { color: var(--muted); font-size: .85rem; margin-top: 8px; }
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; background: #fff; border-top: 1px solid var(--line);
  display: flex; z-index: 10;
}
.bottom-nav button {
  flex: 1; background: none; border: none; padding: 13px 2px; font-family: inherit;
  font-size: .85rem; cursor: pointer; color: var(--ink);
}
.bottom-nav button.active { color: var(--accent); font-weight: 700; }
/* شاشة اختيار الجنس: عنوان وزرّان فقط، بدون شروحات */
.gender-wrap { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px; padding: 24px; text-align: center; }
.gender-wrap h1 { font-size: 1.8rem; margin: 0; }
.tagline { color: var(--muted); margin: 0 0 16px; }
.gender-buttons { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 280px; }
.gender-btn {
  padding: 16px; font-size: 1.3rem; font-family: inherit; border-radius: 14px;
  border: 2px solid var(--accent); background: #fff; color: var(--accent); cursor: pointer;
}
.gender-btn:active { background: var(--accent); color: #fff; }
@media (min-width: 520px) { body { background: #e9e2d8; } }
/* Skeleton Loading: هيكل رمادي نابض بدل شاشة فارغة أثناء انتظار البيانات.
   نفس ألوان التصميم، بلا مؤثرات ثقيلة، ومع احترام تقليل الحركة. */
.skel {
  border-radius: 12px;
  background: linear-gradient(90deg, #efe7db 25%, #faf6f0 50%, #efe7db 75%);
  background-size: 200% 100%;
  animation: skel-shimmer 1.2s infinite linear;
}
.skel-line { height: 56px; margin-bottom: 10px; }
@keyframes skel-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }
/* زر قائمة الهيدر المنسدلة — نفس ألوان التصميم، بلا تغيير لأي تصميم موجود */
.menu-wrap { position: relative; width: 100%; padding-top: 10px; }
.menu-btn {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 8px 14px; font-family: inherit; font-size: .95rem; cursor: pointer; color: var(--accent);
}
.menu-btn:active { background: var(--accent); color: #fff; }
.menu-dropdown {
  display: none; position: absolute; top: calc(100% + 6px); inset-inline-start: 0;
  min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.15); padding: 6px; z-index: 20;
}
.menu-dropdown.open { display: block; }
.menu-dropdown button {
  display: block; width: 100%; text-align: start; border: 0; background: transparent;
  padding: 10px 12px; font-family: inherit; font-size: .95rem; cursor: pointer; color: var(--accent);
  border-radius: 8px;
}
.menu-dropdown button:active, .menu-dropdown button.active { background: var(--accent-soft); }
.news-list { display: flex; flex-direction: column; gap: 10px; }
.news-item {
  display: block; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; text-decoration: none; color: var(--ink);
}
.news-item img { width: 100%; border-radius: 10px; display: block; margin-bottom: 8px; max-height: 180px; object-fit: cover; }
.news-item h3 { margin: 0 0 4px; font-size: 1rem; }
.news-item p { margin: 0 0 6px; color: var(--muted); font-size: .9rem; }
.news-tag {
  display: inline-block; background: var(--accent-soft); color: var(--accent);
  border-radius: 999px; padding: 1px 10px; font-size: .8rem; margin-bottom: 6px;
}
.news-meta { display: flex; gap: 8px; align-items: center; font-size: .8rem; color: var(--muted); flex-wrap: wrap; }
/* ركن المشتل والحيوانات الأليفة — نفس ألوان التصميم */
#garden-today { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
#garden-today p { margin: 0; color: var(--muted); font-size: .9rem; }
/* دردشة حسناء — نفس ألوان التصميم، بلا تغيير لأي تصميم موجود */
.chat-msg.hasnaa { background: #fff; align-self: flex-start; border-inline-start: 3px solid var(--accent); }
.chat-avatar {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 700;
}
.chat-avatar-img {
  flex: none; width: 52px; height: 52px; border-radius: 50%;
  object-fit: cover; object-position: top; border: 2px solid var(--accent);
}
.chat-settings { gap: 8px; align-items: center; margin: 8px 0; }
.chat-settings input { flex: 1; min-width: 0; }
.wardrobe-row { gap: 8px; align-items: center; flex-wrap: wrap; margin: 4px 0 8px; }
.wardrobe-btn { background: none; border: 2px solid transparent; border-radius: 12px; padding: 2px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.wardrobe-btn img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: top; }
.wardrobe-btn span { font-size: .75rem; color: var(--muted); }
.wardrobe-btn.selected { border-color: var(--accent); }
.chat-sources { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; font-size: .8rem; }
.chat-sources a { color: var(--accent); }
.store-badge { display: inline-block; background: var(--accent-soft); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; font-size: .75rem; margin-inline-start: 6px; }
.chat-note { display: block; font-size: .8rem; margin-top: 6px; }
.store-suggestions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.store-chip { font-size: .85rem; }
.chat-speak { background: none; border: none; cursor: pointer; font-size: 1rem; padding: 2px 4px; margin-inline-start: 6px; }
/* مبادرة حسناء وتذكيراتها — نفس ألوان التصميم، بلا تغيير لأي تصميم موجود */
.nav-badge { display: inline-block; background: var(--danger); color: #fff; border-radius: 999px; min-width: 18px; height: 18px; line-height: 18px; text-align: center; font-size: .75rem; padding: 0 5px; margin-inline-start: 4px; vertical-align: middle; }
.reminder-form { gap: 8px; }
.reminder-form select, .reminder-form input { flex: 1; min-width: 0; }
.reminder-form input[type="date"], .reminder-form input[type="time"] { width: auto; }
.reminder-item { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.reminder-item.done { opacity: .6; }
.reminder-item.done strong { text-decoration: line-through; }
.chat-action { margin-top: 8px; }

/* نص المقال (المحتوى): خط أوضح وأريح للقراءة — العنوان ما انمس */
.article-text { font-size: 1.06rem; line-height: 2; }
