/* Tawaf & Sa'i counter */
.tool-sect { padding: 0 0 96px; }
.counter-card { position: relative; max-width: 560px; margin: -46px auto 0; background: var(--paper); border-radius: 34px; padding: 26px 26px 22px; box-shadow: var(--sh-lg); border: 1px solid rgba(231,222,210,.9); text-align: center; z-index: 2; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 6px; border-radius: 18px; background: var(--sand); }
.seg button { height: 48px; border-radius: 14px; font-weight: 700; font-size: 16px; color: var(--mute); display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: background .2s, color .2s, box-shadow .2s; }
.seg button svg { width: 20px; height: 20px; }
.seg button[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 6px 16px -10px rgba(43,35,32,.5); }
.hint { color: var(--mute); font-size: 14.5px; margin: 18px auto 4px; max-width: 30em; min-height: 26px; }

.dial { position: relative; width: min(330px, 82vw); aspect-ratio: 1; margin: 10px auto 6px; border-radius: 50%; display: grid; place-items: center; color: var(--on-dark);
  background: radial-gradient(circle at 50% 30%, #55453E, var(--night) 72%); box-shadow: 0 0 0 1px rgba(201,173,130,.4), 0 34px 60px -30px rgba(31,24,22,.85), inset 0 -20px 50px rgba(0,0,0,.3);
  transition: transform .12s; overflow: hidden; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.dial:active { transform: scale(.985); }
.dial::before { content: ""; position: absolute; inset: 16%; border-radius: 50%; border: 1px solid rgba(201,173,130,.22); }
.dial-ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.dial-ring .s { fill: none; stroke: rgba(201,173,130,.18); stroke-width: 7; stroke-linecap: round; transition: stroke .35s; }
.dial-ring .s.on { stroke: var(--bronze-l); }
.dial-ring .s.now { stroke: rgba(201,173,130,.45); }
.dial-in { position: relative; display: flex; flex-direction: column; align-items: center; }
.dial-in b { font-family: var(--fd); font-weight: 700; font-size: clamp(96px, 26vw, 128px); line-height: 1; color: var(--bronze-xl); transition: transform .25s cubic-bezier(.2,.9,.3,1.4); }
.dial-in b.bump { transform: scale(1.12); }
.dial-in span { color: var(--on-dark-2); font-size: 15px; margin-top: 8px; }
.ripple { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; }
.ripple.go { animation: rip .6s ease-out; }
@keyframes rip { from { box-shadow: inset 0 0 0 0 rgba(230,211,179,.4); } to { box-shadow: inset 0 0 0 60px rgba(230,211,179,0); } }

.route { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 10px auto 0; padding: 12px 16px; max-width: 360px; border-radius: 16px; background: var(--tint); border: 1px solid var(--line); }
.route .pt { font-family: var(--fd); font-size: 22px; font-weight: 700; color: var(--bronze-d); min-width: 64px; }
.route .line { flex: 1; display: flex; align-items: center; gap: 4px; color: var(--bronze); }
.route .line i { flex: 1; height: 2px; background: repeating-linear-gradient(90deg, var(--bronze-l) 0 6px, transparent 6px 11px); background-size: 22px 2px; animation: walk 1s linear infinite; }
[dir="rtl"] .route .line i { animation-direction: reverse; }
.route .line svg { width: 20px; height: 20px; }
@keyframes walk { to { background-position: 22px 0; } }

.laps { display: flex; justify-content: center; gap: 8px; margin: 18px 0 4px; flex-wrap: wrap; }
.laps span { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: var(--mute); background: var(--sand); border: 1px solid transparent; transition: background .25s, color .25s; }
.laps span.on { background: var(--brown); color: var(--on-dark); }
.laps span.now { border-color: var(--bronze-l); color: var(--bronze-d); background: var(--paper); }

.done { padding: 4px 0 2px; }
.ring-ok { width: 76px; height: 76px; margin: 6px auto 0; border-radius: 50%; display: grid; place-items: center; background: var(--ok-bg); color: var(--ok); animation: pop .5s cubic-bezier(.2,.9,.3,1.4); }
.ring-ok svg { width: 38px; height: 38px; }
.done h2 { font-family: var(--fd); font-weight: 400; font-size: 32px; margin-top: 10px; }
.done p { color: var(--mute); font-size: 15px; margin-top: 4px; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.counter-card.is-done .dial { display: none; }

.tool-actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }
.tool-actions .btn { flex: 1; max-width: 200px; }
.tool-actions .btn[disabled] { opacity: .45; pointer-events: none; }
.tool-actions [data-reset].confirm { background: #8E2B22; border-color: #8E2B22; color: #fff; }
.tool-note { color: var(--mute); font-size: 12.5px; margin-top: 12px; }

.tips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 1000px; margin: 56px auto 0; }
.tip { display: flex; gap: 14px; background: var(--paper); border-radius: 22px; padding: 22px; box-shadow: var(--sh); border: 1px solid rgba(231,222,210,.8); }
.tip > svg { width: 30px; height: 30px; color: var(--bronze); flex: none; margin-top: 2px; }
.tip b { font-size: 17px; }
.tip p { color: var(--mute); font-size: 14.5px; margin-top: 4px; line-height: 1.9; }
.tip a { color: var(--bronze-d); font-weight: 700; }
@media (max-width: 860px) { .tips { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .counter-card { margin-top: -34px; padding: 18px 16px 18px; border-radius: 28px; } .tool-sect { padding-bottom: 64px; } }
.dial-in b.start { font-size: clamp(54px, 15vw, 70px); }
