/* مساعد البيت الذكي — نسخة الويب. موبايل أولاً، عربي 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;
}
.app-header h1 { font-size: 1.15rem; margin: 0; }
.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; }
.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-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; }
.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; }
.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; } }
