/* ============================================================
   Urdu Handwriting Pad — tool-specific styles
   ============================================================ */

.panel-title { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.09em; color: var(--muted); margin: 0 0 0.7rem; }
.field-label { font-size: 0.8rem; font-weight: 800; color: var(--muted); letter-spacing: 0.02em; }

.hw-layout { display: grid; grid-template-columns: 1fr 300px; gap: 1rem; align-items: start; margin-top: 1rem; }

.hw-prompt-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.6rem; flex-wrap: wrap; }

.hw-canvas-wrap {
  position: relative; width: 100%; border-radius: var(--r-md); overflow: hidden;
  border: 2px solid var(--line); background: #ffffff;
  background-image: repeating-linear-gradient(to bottom, transparent 0 62px, #e8e4d8 62px 64px);
  aspect-ratio: 900 / 420;
}
.hw-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hw-guide { pointer-events: none; }
.hw-draw { touch-action: none; cursor: crosshair; }

.hw-toolbar { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 0.7rem; padding: 0.6rem 0.75rem; border: 1px solid var(--line); border-radius: var(--r-md); background: #fffdf6; }
.hw-tool-group { display: flex; gap: 0.4rem; }
.hw-swatch {
  width: 34px; height: 34px; border-radius: 50%; border: 2px solid #fff; cursor: pointer;
  box-shadow: 0 0 0 1.5px var(--line); transition: transform 0.12s ease;
}
.hw-swatch:hover { transform: scale(1.15); }
.hw-swatch.active { box-shadow: 0 0 0 3px var(--brand); }
.hw-swatch-black { background: #1f2937; }
.hw-swatch-blue { background: #1d4ed8; }
.hw-swatch-red { background: #b91c1c; }
.hw-swatch-green { background: #047857; }

.hw-thickness { display: flex; align-items: center; gap: 0.5rem; }
.hw-thickness input { width: 130px; }
.hw-thickness-value { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 0.82rem; color: var(--muted); min-width: 4ch; }

.hw-actions { display: flex; gap: 0.6rem; margin-top: 0.75rem; flex-wrap: wrap; }
.hw-actions .btn { flex: 1 1 140px; min-width: min(160px, 100%); }

.hw-side { align-self: start; }
.hw-subtitle { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0.7rem 0 0.35rem; }
.hw-prompt-grid { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.hw-prompt-btn {
  font-family: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Noto Naskh Arabic", serif;
  font-size: 1.15rem; cursor: pointer; border: 1.5px solid var(--line); background: #fffdf6;
  border-radius: var(--r-sm); padding: 0.3rem 0.6rem; direction: rtl; transition: all 0.12s ease;
}
.hw-prompt-btn:hover { border-color: var(--brand); background: var(--brand-softer); transform: translateY(-2px); }

.urdu-letter-icon { font-family: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Noto Naskh Arabic", serif; font-size: 1.7rem; }

.hw-print-area { display: none; }

@media print {
  @page { size: landscape; margin: 10mm; }
  body > * { display: none !important; }
  .hw-print-area { display: block !important; text-align: center; }
  .hw-print-area img { max-width: 100%; max-height: 88vh; border: 1px solid #999; }
}

@media (max-width: 980px) { .hw-layout { grid-template-columns: 1fr; } }
