/* myJawi — sistem reka bentuk.
   Gaya "buku latihan": kertas krim, dakwat hijau tua, bayang pepejal seperti pelekat.
   Saiz sentuhan besar (min 52px) untuk kanak-kanak Darjah 1. */
@import url("https://fonts.googleapis.com/css2?family=Andika:ital,wght@0,400;0,700;1,400&family=Noto+Naskh+Arabic:wght@500;600;700&family=Aref+Ruqaa:wght@400;700&display=swap");

:root {
  --paper: #fbf6ec;
  --paper-2: #f4ecdc;
  --card: #fffdf8;
  --ink: #17332f;
  --ink-2: #4b615c;
  --ink-3: #8a9a95;
  --line: #e6dccb;
  --teal: #0e6b5c;
  --teal-2: #0a5549;
  --teal-soft: #d8eee8;
  --sun: #f4b63f;
  --sun-soft: #fdf0cf;
  --coral: #e3664a;
  --coral-soft: #fbe1d9;
  --sky: #3f8fb5;
  --sky-soft: #dceef6;
  --plum: #8a5a9e;
  --plum-soft: #efe2f4;
  --leaf: #5a9a3c;
  --leaf-soft: #e3f1d8;
  --r: 18px;
  --r-lg: 26px;
  --shadow: 0 4px 0 rgba(23, 51, 47, 0.12);
  --shadow-press: 0 1px 0 rgba(23, 51, 47, 0.12);
  --font: "Andika", ui-rounded, system-ui, sans-serif;
  --jawi: "Noto Naskh Arabic", "Amiri", serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--teal); }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 0.4em; font-weight: 800; letter-spacing: -0.01em; }
h1 { font-size: clamp(30px, 5vw, 46px); }
h2 { font-size: clamp(24px, 3.6vw, 32px); }
h3 { font-size: 21px; }
p { margin: 0 0 0.8em; }
.muted { color: var(--ink-2); }
.small { font-size: 15px; }
.tiny { font-size: 13px; color: var(--ink-3); }

.jawi { font-family: var(--jawi); direction: rtl; unicode-bidi: isolate; font-weight: 600; line-height: 1.9; }
.jawi-xl { font-size: clamp(64px, 14vw, 120px); line-height: 1.5; }
.jawi-lg { font-size: clamp(40px, 8vw, 62px); line-height: 1.6; }
.jawi-md { font-size: 32px; }

/* ---------- butang */
.btn {
  --bg: var(--teal);
  --fg: #fff;
  --edge: var(--teal-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 10px 22px;
  border: 0; border-radius: 16px;
  background: var(--bg); color: var(--fg);
  font-weight: 700; font-size: 18px; text-decoration: none;
  box-shadow: 0 4px 0 var(--edge);
  cursor: pointer; user-select: none;
  transition: transform 0.08s, box-shadow 0.08s, filter 0.15s;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--edge); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.sun { --bg: var(--sun); --fg: var(--ink); --edge: #c98f22; }
.btn.coral { --bg: var(--coral); --edge: #b54a32; }
.btn.ghost { --bg: var(--card); --fg: var(--ink); --edge: var(--line); border: 2px solid var(--line); }
.btn.sm { min-height: 40px; padding: 6px 14px; font-size: 16px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn svg { width: 22px; height: 22px; }

/* ---------- kad */
.card {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 20px;
}
.card.flat { box-shadow: none; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 12px; border-radius: 999px; font-size: 14px; font-weight: 700; background: var(--paper-2); color: var(--ink-2); }
.pill.teal { background: var(--teal-soft); color: var(--teal-2); }
.pill.sun { background: var(--sun-soft); color: #8a5c00; }
.pill.coral { background: var(--coral-soft); color: #9c3a24; }

/* ---------- borang */
label.field { display: block; margin-bottom: 14px; font-weight: 700; font-size: 16px; }
label.field span { display: block; margin-bottom: 6px; }
input, select, textarea {
  width: 100%; min-height: 52px; padding: 10px 14px;
  border: 2px solid var(--line); border-radius: 14px;
  background: #fff; font: inherit; font-size: 18px; color: var(--ink);
}
input:focus, select:focus, textarea:focus, .btn:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.err { color: #b3361c; font-weight: 600; font-size: 15px; min-height: 1.2em; }

/* ---------- utiliti susun atur */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.stack > * + * { margin-top: 14px; }
.center { text-align: center; }
.hide { display: none !important; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.ruqaa .jawi, .ruqaa .wc-j { font-family: "Aref Ruqaa", var(--jawi); }
