:root {
  --sand: #f6ead2;
  --sand-dark: #e8d3a8;
  --palm: #3f7d3a;
  --palm-dark: #2d5e29;
  --date: #7a3e1d;
  --ink: #3b2a1a;
  --muted: #8a7458;
  --danger: #b3261e;
  --card: #fffaf0;
  --radius: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "SF Arabic", "Segoe UI", Tahoma, sans-serif;
  background: var(--sand);
  color: var(--ink);
  line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
}

main { max-width: 560px; margin: 0 auto; padding: 20px 16px 48px; }

h1 { font-size: 1.6rem; margin: 8px 0 4px; color: var(--date); }
h2 { font-size: 1.2rem; margin: 0 0 12px; color: var(--palm-dark); }
p.sub { color: var(--muted); margin: 0 0 20px; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 2px 0 var(--sand-dark);
}

label { display: block; font-weight: 600; margin: 10px 0 4px; }

input[type=text], input[type=email], input[type=password] {
  width: 100%;
  font-size: 1rem;
  padding: 12px 14px;
  border: 2px solid var(--sand-dark);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
}
input:focus { outline: none; border-color: var(--palm); }
input.ltr { direction: ltr; text-align: left; }

.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 6px; width: 20px; height: 20px; flex: none; }

button, .btn {
  display: inline-block;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  padding: 12px 18px;
  border: 0;
  border-radius: 12px;
  background: var(--palm);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
button:active, .btn:active { background: var(--palm-dark); }
button:disabled { opacity: .6; }
button.full, .btn.full { width: 100%; margin-top: 14px; }
button.light { background: var(--sand-dark); color: var(--ink); }
button.danger { background: var(--danger); }
button.small { padding: 6px 12px; font-size: .9rem; }
button.link { background: none; color: var(--palm-dark); padding: 6px 0; text-decoration: underline; font-weight: 600; }

.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.msg { padding: 10px 14px; border-radius: 12px; margin: 12px 0 0; }
.msg.ok { background: #e4f2df; color: var(--palm-dark); }
.msg.err { background: #fbe3e0; color: var(--danger); }
.hidden { display: none !important; }

.list-item {
  border: 2px solid var(--sand-dark);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
}
.list-item .title { font-weight: 700; }
.list-item .meta { color: var(--muted); font-size: .9rem; direction: ltr; text-align: right; }

.code {
  direction: ltr;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 1.6rem;
  letter-spacing: 4px;
  background: #fff;
  border: 2px dashed var(--palm);
  border-radius: 12px;
  padding: 8px;
  text-align: center;
  margin: 8px 0;
}

/* خريطة الحي */
.hood-map {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  background: #e9d29f;
  padding: 10px;
  border-radius: var(--radius);
}
.plot {
  aspect-ratio: 1;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  text-align: center;
  padding: 4px;
  overflow: hidden;
}
.plot .icon { font-size: 1.5rem; line-height: 1; }
.plot.empty { background: rgba(255,255,255,.25); color: var(--muted); }
.plot.taken { background: #f3e2bd; border: 3px solid var(--date); }
.plot.me { background: #cfe8c4; border: 3px solid var(--palm); font-weight: 700; }
.plot .name { font-size: .8rem; font-weight: 600; line-height: 1.3; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.big-choice { display: grid; gap: 14px; margin-top: 24px; }
.big-choice .btn { font-size: 1.2rem; padding: 22px; border-radius: 20px; }
.hero { font-size: 4rem; text-align: center; margin-top: 20px; }
.center { text-align: center; }
