/* "Temp və məşq taymeri" (/tools/taymer, owner 2026-11-12, task 6). Builds on proto.css and home.css. */
.tm { max-width: 600px; padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.tm .crumb { display: block; width: fit-content; margin-bottom: 8px; font-size: 0.85rem; font-weight: 700; color: var(--muted); text-decoration: none; }
.tm .lbl { margin: 16px 0 6px; font-size: 0.7rem; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.tm-lead { margin-top: 4px; color: var(--ink-2); font-size: 0.95rem; }
.tm-tabs { display: flex; gap: 4px; margin-top: 14px; padding: 4px; border-radius: 14px; background: var(--paper-2); }
.tm-tabs button { flex: 1; min-height: 42px; border: 0; border-radius: 11px; background: none; color: var(--muted); font: inherit; font-weight: 900; font-size: 0.9rem; cursor: pointer; }
.tm-tabs button[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }
.tm-top { display: flex; align-items: center; gap: 12px; min-height: 42px; }
.tm-top b { font-size: 1.1rem; }
.tm .icon-btn { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); cursor: pointer; }

/* find the tempo */
.tm-bpm { display: grid; justify-items: center; margin-top: 16px; text-align: center; }
.tm-bpm b { font-size: 4.2rem; line-height: 1; font-weight: 900; font-variant-numeric: tabular-nums; }
.tm-bpm small { margin-top: 4px; font-size: 0.82rem; font-weight: 800; color: var(--muted); }
.tm-term { margin-top: 8px; padding: 5px 12px; border-radius: 99px; background: var(--teal-soft); color: var(--teal); font-weight: 900; font-size: 0.86rem; }
.tm-dots { display: flex; gap: 5px; justify-content: center; min-height: 9px; margin-top: 12px; }
.tm-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.tm-dots i.on { background: var(--teal); }
.tm-steady { min-height: 1.3em; margin: 6px 0 0; text-align: center; font-size: 0.82rem; font-weight: 800; color: var(--muted); }
.tm-steady.ok { color: var(--ok); }
.tm-graph { display: block; width: 100%; height: 46px; margin-top: 4px; }
.tm-pad { display: grid; place-content: center; gap: 4px; width: 100%; height: 150px; margin-top: 12px; border: 0; border-radius: 22px; background: var(--accent); color: #fff; font: inherit; text-align: center; cursor: pointer; box-shadow: 0 6px 0 color-mix(in srgb, var(--accent) 60%, #000); touch-action: manipulation; user-select: none; -webkit-user-select: none; transition: transform 0.06s, box-shadow 0.06s; }
.tm-pad b { font-size: 1.25rem; }
.tm-pad small { font-size: 0.8rem; font-weight: 700; opacity: 0.9; }
.tm-pad.hit { transform: translateY(4px); box-shadow: 0 2px 0 color-mix(in srgb, var(--accent) 60%, #000); }
.tm-row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 14px; }
.tm-row3 button { min-height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; font-weight: 900; font-size: 0.86rem; cursor: pointer; }
.tm-row3 button:disabled { opacity: 0.45; cursor: default; }
.tm-or { display: flex; align-items: center; gap: 10px; margin: 16px 0 0; color: var(--muted); font-size: 0.72rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.05em; }
.tm-or::before, .tm-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.tm-listen { position: relative; overflow: hidden; display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.tm-listen .ic { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--ink-bg); color: #fff; }
.tm-listen .t { display: grid; position: relative; z-index: 1; }
.tm-listen b { font-size: 0.9rem; }
.tm-listen small { font-size: 0.74rem; font-weight: 700; color: var(--muted); }
.tm-listen.on .ic { background: var(--bad); }
.tm-prog { position: absolute; left: 0; bottom: 0; height: 4px; width: 0; background: var(--teal); transition: width 0.2s linear; }
.tm-heard { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: var(--teal-soft); color: var(--teal); }
.tm-heard span { display: grid; }
.tm-heard small { font-size: 0.72rem; font-weight: 800; }
.tm-heard b { font-size: 1.05rem; }
.tm-heard button { min-height: 38px; padding: 0 12px; border: 1px solid var(--teal); border-radius: 99px; background: var(--card); color: var(--teal); font: inherit; font-weight: 900; font-size: 0.84rem; cursor: pointer; }
.tm-err { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--bad) 10%, var(--card)); color: var(--bad); font-weight: 700; font-size: 0.86rem; }
.tm-link { display: block; width: fit-content; margin-top: 14px; font-weight: 900; font-size: 0.9rem; color: var(--accent-ink); text-decoration: none; }
.tm-link.tm-c { margin: 14px auto 0; }

/* timer settings */
.tm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tm-chips button { min-height: 38px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--card); color: var(--ink); font: inherit; font-weight: 800; font-size: 0.84rem; cursor: pointer; }
.tm-chips button[aria-pressed="true"] { background: var(--ink-bg); border-color: var(--ink-bg); color: #fff; }
.tm-inp { display: grid; gap: 2px; margin-top: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.tm-inp small { font-size: 0.66rem; font-weight: 900; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.tm-inp input { width: 100%; min-height: 30px; border: 0; padding: 0; background: none; color: var(--ink); font: inherit; font-weight: 700; font-size: 0.92rem; outline: none; }
.tm-from { font-size: 0.72rem; font-weight: 800; color: var(--teal); }
.tm-plan { display: flex; gap: 4px; min-height: 44px; }
.tm-plan div { display: grid; place-content: center; min-width: 0; padding: 2px 4px; border-radius: 10px; color: #fff; font-size: 0.72rem; font-weight: 900; text-align: center; line-height: 1.15; overflow: hidden; }
.tm-plan div span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-warm { background: var(--teal); } .c-piece { background: var(--accent); } .c-scales { background: #8a5cd0; } .c-etude { background: #3a86c8; } .c-reading { background: #c2410c; } .c-free { background: #2e9e5b; }
.tm-sw { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); cursor: pointer; }
.tm-sw > span { display: grid; }
.tm-sw b { font-size: 0.88rem; }
.tm-sw small { font-size: 0.74rem; font-weight: 700; color: var(--muted); }
.tm-tg { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; flex: none; margin: 0; border-radius: 99px; background: var(--line); position: relative; cursor: pointer; transition: background 0.15s; }
.tm-tg::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left 0.15s; }
.tm-tg:checked { background: var(--teal); }
.tm-tg:checked::after { left: 21px; }
.tm-goal { margin-top: 12px; padding: 10px 12px; border-radius: 14px; background: var(--teal-soft); color: var(--teal); font-size: 0.82rem; font-weight: 800; line-height: 1.4; }
.tm .tm-start { width: 100%; min-height: 54px; margin-top: 12px; font-size: 1rem; }

/* running */
.tm-ring { position: relative; width: min(260px, 72vw); aspect-ratio: 1; margin: 12px auto 0; }
.tm-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tm-ring #ring { transition: stroke-dashoffset 0.9s linear; }
.tm-ring.paused #ring { stroke: var(--muted); }
.tm-ring .c { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.tm-ring .c b { display: block; font-size: 3.1rem; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.tm-ring .c small { display: block; margin-top: 6px; font-size: 0.8rem; font-weight: 800; color: var(--muted); }
.tm-blk { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.tm-blk .now { font-size: 0.66rem; font-weight: 900; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.tm-blk b { display: block; margin-top: 1px; font-size: 1rem; }
.tm-bar { display: flex; gap: 3px; margin-top: 8px; }
.tm-bar i { height: 8px; border-radius: 4px; background: var(--line); }
.tm-bar i.d { background: var(--teal); }
.tm-metro { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font-weight: 800; font-size: 0.88rem; }
.tm-metro .pl { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--ink-bg); color: #fff; font: inherit; font-size: 0.8rem; cursor: pointer; }
.tm-metro .pl.on { background: var(--accent); }
.tm-metro em { margin-left: auto; display: flex; gap: 6px; font-style: normal; }
.tm-metro em button { width: 34px; height: 34px; border: 0; border-radius: 9px; background: var(--paper-2); color: var(--ink); font: inherit; font-weight: 900; cursor: pointer; }
.tm-ctl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.tm-ctl .btn { width: 100%; min-height: 50px; }
.tm-awake { margin-top: 10px; text-align: center; font-size: 0.76rem; font-weight: 700; color: var(--muted); }

/* done */
.tm-fin { display: grid; justify-items: center; gap: 4px; margin-top: 12px; padding: 18px 16px; border-radius: 20px; background: var(--ink-bg); color: #fff; text-align: center; }
.tm-fin .st { font-size: 2.2rem; line-height: 1; color: var(--gold); }
.tm-fin b { font-size: 1.3rem; }
.tm-fin small { font-size: 0.84rem; font-weight: 700; opacity: 0.85; line-height: 1.4; }
.tm-week { display: flex; gap: 6px; justify-content: center; margin-top: 10px; }
.tm-week i { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, 0.12); font-style: normal; font-size: 0.66rem; font-weight: 900; }
.tm-week i.y { background: var(--teal); }
.tm-week i.t { background: var(--accent); }
.tm-moods { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.tm-moods button { min-height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; font-weight: 900; font-size: 0.8rem; cursor: pointer; }
.tm-moods button[aria-pressed="true"] { border: 2px solid var(--teal); background: var(--teal-soft); color: var(--teal); }
.tm-note { width: 100%; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; font-size: 0.9rem; resize: vertical; }
.tm .tm-again { width: 100%; min-height: 46px; margin-top: 10px; }

@media (min-width: 900px) { .tm { max-width: 680px; padding-bottom: 48px; } }
