/* AL-HARAMEEN — hrm-device.css: the live device (hrm-device.js). Real product photo + live screen + real keys. */
.hd { position: relative; display: grid; gap: 10px; justify-items: center; }
.hd-stage { position: relative; width: 100%; max-width: var(--hd-max, 520px); user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.hd-img { display: block; width: 100%; height: auto; pointer-events: none; }
.hd-scr { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; direction: ltr; unicode-bidi: isolate; }
.hd-on, .hd-txt, .hd-pix, .hd-label, .hd-lead1 { transition: opacity .12s; }
.hd-dim .hd-ink { opacity: .35; }
.hd-blink { animation: hd-blink 1s steps(1, end) infinite; }
@keyframes hd-blink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }

/* side keys of a watch: transparent targets over the photo's own buttons, a tag outside the case */
.hd-key { -webkit-tap-highlight-color: transparent; cursor: pointer; font: inherit; }
.hd-key-side { position: absolute; border: 0; background: transparent; border-radius: 10px; padding: 0; outline-offset: 2px; }
.hd-key-side .hd-tag { position: absolute; inset-inline-start: calc(100% + 8px); top: 50%; transform: translateY(-50%);
  font: 800 13px/1 var(--font-head, sans-serif); color: var(--green-900, #0b3d27); background: #fff; border: 1.5px solid var(--green-700, #0e5b38);
  border-radius: 999px; padding: 5px 9px; white-space: nowrap; direction: ltr; box-shadow: 0 2px 6px rgba(0,0,0,.12); }
[dir="rtl"] .hd-key-side .hd-tag { inset-inline-start: auto; left: calc(100% + 8px); }
.hd-key-side.is-down, .hd-key-side.is-hit { background: rgba(255,255,255,.28); }
.hd-key-side.is-next { box-shadow: 0 0 0 3px #f5b400, 0 0 0 8px rgba(245,180,0,.28); animation: hd-ring 1.3s ease-in-out infinite; }
.hd-key-side.is-next .hd-tag { background: #f5b400; border-color: #c48a00; color: #1a1300; }
@keyframes hd-ring { 50% { box-shadow: 0 0 0 3px #f5b400, 0 0 0 14px rgba(245,180,0,0); } }

/* the hold ring: fills while a key is held, as long as the manual's "2 seconds" */
.hd-hold { position: absolute; inset: -5px; border-radius: inherit; pointer-events: none;
  background: conic-gradient(#f5b400 calc(var(--p, 0) * 360deg), transparent 0); opacity: calc(var(--p, 0) * 1.4);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); }

/* the 14-key panel behind the PUSH door (2026 edition), drawn like the manual's key page */
.hd-door { position: absolute; display: grid; place-items: start center; padding-top: 2%; font: 700 10px var(--font-head, sans-serif); color: rgba(0,0,0,.35); pointer-events: none; }
.hd-panel { width: 100%; max-width: var(--hd-max, 520px); background: linear-gradient(#3a3f41, #24282a); border-radius: 14px; padding: 10px 10px 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 6px 16px rgba(0,0,0,.18); }
.hd-panel-cap { margin: 0 4px 8px; font: 700 12px var(--font-head, sans-serif); color: #cfd6d3; }
.hd-row { display: grid; gap: 6px; grid-template-columns: repeat(8, minmax(0, 1fr)); direction: ltr; }
.hd-row-1 { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-top: 8px; padding: 0 6%; }
.hd-key-pad { position: relative; display: grid; justify-items: center; gap: 3px; border: 0; background: none; padding: 2px 0; color: #e9eeec; border-radius: 10px; }
.hd-k-en { font: 700 9.5px/1.1 Rubik, sans-serif; letter-spacing: .02em; white-space: nowrap; overflow: hidden; max-width: 100%; text-overflow: ellipsis; }
.hd-k-ar { font: 700 10px/1.1 Tajawal, sans-serif; color: #b9c4c0; white-space: nowrap; }
.hd-k-cap { width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #6c7376, #2a2f31 70%); box-shadow: 0 2px 0 #121516, inset 0 1px 1px rgba(255,255,255,.25); transition: transform .06s, box-shadow .06s; }
.hd-key-pad.is-down .hd-k-cap, .hd-key-pad.is-hit .hd-k-cap { transform: translateY(2px); box-shadow: 0 0 0 #121516, inset 0 2px 3px rgba(0,0,0,.5); }
.hd-key-pad.is-next .hd-k-cap { background: radial-gradient(circle at 35% 30%, #ffd75e, #c48a00 75%); box-shadow: 0 0 0 4px rgba(245,180,0,.35), 0 2px 0 #7a5600; animation: hd-pad 1.3s ease-in-out infinite; }
.hd-key-pad.is-next .hd-k-en, .hd-key-pad.is-next .hd-k-ar { color: #ffd75e; }
@keyframes hd-pad { 50% { box-shadow: 0 0 0 9px rgba(245,180,0,0), 0 2px 0 #7a5600; } }
.hd-key-pad .hd-hold { inset: auto; top: -2px; width: 38px; height: 38px; left: 50%; margin-left: -19px; border-radius: 50%; }
.hd-key:focus-visible { outline: 3px solid #f5b400; }
@media (max-width: 420px) { .hd-k-cap { width: 24px; height: 24px; } .hd-k-en { font-size: 8px; } .hd-k-ar { font-size: 8.5px; } .hd-row { gap: 3px; } }
@media (prefers-reduced-motion: reduce) { .hd-key-side.is-next, .hd-key-pad.is-next .hd-k-cap { animation: none; } }

/* ---------- the setup simulator (hrm-sim.js): device + guide ---------- */
.sim { border: 1px solid var(--line, #e3ddd0); border-radius: 18px; background: linear-gradient(180deg, #fff, #faf7f0); padding: 18px; box-shadow: 0 10px 30px rgba(14,91,56,.06); }
.sim-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.sim-dev { --hd-max: 470px; }
.sim-side { display: grid; gap: 12px; align-content: start; }
.sim-tasks { display: flex; flex-wrap: wrap; gap: 8px; }
.sim-task { border: 1.5px solid var(--line, #e3ddd0); background: #fff; color: var(--green-900, #0b3d27); border-radius: 999px; padding: 7px 13px; font: 700 13.5px var(--font-head, sans-serif); cursor: pointer; }
.sim-task[aria-selected="true"] { background: var(--green-700, #0e5b38); border-color: var(--green-700, #0e5b38); color: #fff; }
.sim-say { margin: 0; font: 700 17px/1.65 var(--font-head, sans-serif); color: var(--ink, #17211b); min-height: 3.3em; }
.sim-key { margin: 0; display: inline-flex; align-items: center; gap: 8px; font: 800 14px var(--font-head, sans-serif); color: #7a5600; background: #fff6d9; border: 1px solid #f3d27a; border-radius: 12px; padding: 8px 12px; width: fit-content; }
.sim-key:empty { display: none; }
.sim-meta { margin: 0; font-size: 13px; color: var(--ink-soft, #5b665f); }
.sim-ctl { display: flex; flex-wrap: wrap; gap: 8px; }
.sim-free[aria-pressed="true"] { background: var(--green-50, #e8f3ec); border-color: var(--green-700, #0e5b38); }
.sim-ok .sim-say { color: var(--green-700, #0e5b38); }
.sim-ok .sim-say::before { content: "✓ "; }
@media (max-width: 860px) { .sim-grid { grid-template-columns: 1fr; } .sim { padding: 12px; } .sim-say { font-size: 16px; min-height: 0; } }

/* ---------- round 4: the slide switch of the G1-G2 clocks (one key per position) ---------- */
.hd-switch { display: grid; gap: 6px; margin-top: 10px; padding: 0 4px; }
.hd-switch-cap { font: 700 11.5px var(--font-head, sans-serif); color: #cfd6d3; }
.hd-switch-track { display: flex; gap: 4px; background: #1b1f21; border-radius: 12px; padding: 4px; box-shadow: inset 0 2px 4px rgba(0,0,0,.6); direction: ltr; }
.hd-key-sw { flex: 1; display: grid; justify-items: center; gap: 4px; border: 0; background: none; padding: 4px 2px; border-radius: 9px; color: #b9c4c0; font: 700 10px var(--font-head, sans-serif); cursor: pointer; }
.hd-key-sw .hd-sw-knob { width: 22px; height: 12px; border-radius: 4px; background: #2f3537; box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
.hd-key-sw[aria-pressed="true"] .hd-sw-knob { background: linear-gradient(#e9eeec, #a9b3af); box-shadow: 0 2px 4px rgba(0,0,0,.5); }
.hd-key-sw[aria-pressed="true"] { color: #fff; }
.hd-key-sw.is-next .hd-sw-knob { background: linear-gradient(#ffd75e, #c48a00); box-shadow: 0 0 0 3px rgba(245,180,0,.35); animation: hd-pad 1.3s ease-in-out infinite; }
.hd-key-sw.is-next { color: #ffd75e; }
.hd-key-sw .hd-sw-t { white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

/* round 4: a side key whose tag sits under the key (keys in a row, e.g. SET ▼ ▲ of the desk clocks) */
.hd-key-side.hd-tag-below .hd-tag, [dir="rtl"] .hd-key-side.hd-tag-below .hd-tag { inset-inline-start: auto; left: 50%; top: calc(100% + 4px); transform: translateX(-50%); font-size: 11.5px; padding: 3px 7px; }
.hd-key-side.is-next .hd-tag { background: #f5b400; border-color: #c48a00; color: #1a1300; }
/* round 4 (15 Oct 2026): the panel key's twin on the photo lights with it; key names may wrap instead of "LANGUA…" */
.hd-k-en { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; line-height: 1.05; }
.hd-spot { fill: rgba(245, 180, 0, .18); stroke: #f5b400; stroke-width: 5; opacity: 0; pointer-events: none; transition: opacity .25s; }
.hd-spot.is-next { opacity: 1; animation: hd-spot 1.1s ease-in-out infinite; }
.hd-spot.is-hit { opacity: 1; fill: rgba(245, 180, 0, .55); }
@keyframes hd-spot { 50% { stroke-opacity: .3; } }
.sim-guide { display: grid; gap: 8px; }
@media (max-width: 860px) {
  .sim-guide { position: sticky; bottom: 10px; z-index: 5; background: rgba(255, 255, 255, .97); border-radius: 14px; padding: 10px 12px; box-shadow: 0 2px 16px rgba(0, 0, 0, .14); }
}
.hd-k-long { font-size: 7.6px; letter-spacing: 0; overflow-wrap: normal; }
@media (max-width: 420px) { .hd-k-long { font-size: 6.6px; } }
/* round 5: the time's colon beats once a second, as on the real clocks and watches */
.hd-colon { animation: hd-colon 1s steps(1, end) infinite; }
@keyframes hd-colon { 0%, 49% { opacity: 1; } 50%, 100% { opacity: .08; } }
@media (prefers-reduced-motion: reduce) { .hd-colon { animation: none; } }
