/* Duo New Tab © 2026 DevRoshdi. All rights reserved. See LICENSE.txt. */
/*
 * Clock, after Clock on iPadOS 26: always dark, a glass tab bar at the top with the chosen tab in
 * orange, thin digits, grey cards, round buttons with a ring (green to start, red to stop, orange to
 * pause), and popovers of Liquid Glass. Also the Clock icon's moving hands, an alarm going off over
 * the whole screen, and a timer or snoozed alarm in the Dynamic Island. The window is notes.css's.
 */

/* ---------- the icon: a white face on black, its hands showing the time; dark and tinted styles ---------- */

.tile.builtin-clock { background: #000; }
.tile.builtin-clock::before {
  content: ""; position: absolute; inset: 0; display: none;
  background: url("icons/clock.svg") center / 100% no-repeat;
}
body.icons-dark .tile.builtin-clock::before, body.icons-clear .tile.builtin-clock::before, body.icons-tinted .tile.builtin-clock::before { display: block; }
body.icons-clear .tile.builtin-clock, body.icons-tinted .tile.builtin-clock { background: transparent; }
body.icons-clear .tile.builtin-clock::before, body.icons-tinted .tile.builtin-clock::before {
  -webkit-mask: url("icons/clock-mask.svg") center / 100% no-repeat; mask: url("icons/clock-mask.svg") center / 100% no-repeat;
}
body.icons-clear .tile.builtin-clock::before { background: rgba(255, 255, 255, 0.96); }
body.icons-tinted .tile.builtin-clock::before { background: hsl(var(--hue), 95%, 72%); }
.bi-hands { position: absolute; inset: 0; pointer-events: none; }
.bi-hand { position: absolute; inset: 0; display: block; width: 100%; height: 100%; animation: ck-turn 60s linear infinite; }
.bi-hand > svg { display: block; width: 100%; height: 100%; }
.bi-hand line { stroke: #111; stroke-linecap: round; }
.bi-hand.h line { stroke-width: 4.6; }
.bi-hand.m line { stroke-width: 3.2; }
.bi-hand.s line { stroke: #ff9500; stroke-width: 1.4; }
.bi-hand.s circle { fill: #ff9500; }
.bi-pin { fill: #111; }
body.icons-dark .bi-hand.h line, body.icons-dark .bi-hand.m line, body.icons-clear .bi-hand.h line, body.icons-clear .bi-hand.m line { stroke: #fff; }
body.icons-tinted .bi-hand.h line, body.icons-tinted .bi-hand.m line { stroke: hsl(var(--hue), 95%, 72%); }
body.icons-clear .bi-hand.s line, body.icons-tinted .bi-hand.s line { stroke: #fff; }
body.icons-clear .bi-hand.s circle, body.icons-tinted .bi-hand.s circle { fill: #fff; }
@media (prefers-reduced-motion: reduce) { .bi-hand.s { display: none; } }

/* ---------- the window ---------- */

.ckapp {
  --n-bg: #000;
  --n-text: #fff;
  --n-sub: rgba(235, 235, 245, 0.6);
  --n-sep: rgba(84, 84, 88, 0.6);
  --n-fill: rgba(120, 120, 128, 0.32);
  --ck-orange: #ff9f0a;
  --ck-green: #30d158;
  --ck-red: #ff453a;
  --ck-card: #1c1c1e;
  --ck-sub: rgba(235, 235, 245, 0.6);
  --ck-line: rgba(84, 84, 88, 0.65);
  --ck-glass: rgba(44, 44, 46, 0.82);
  --ck-spring: cubic-bezier(0.3, 1.35, 0.55, 1);
  color: #fff; color-scheme: dark;
}
body[data-full-app="clock"] .statusbar { color: #fff; }
.ckapp.windowed .n-win { box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.16), 0 24px 70px rgba(0, 0, 0, 0.6), 0 6px 18px rgba(0, 0, 0, 0.3); }
.ckapp .n-win.ck-win { display: flex; flex-direction: column; background: #000; outline: none; font: 17px/1.3 var(--font); }
.ck-sym { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ck-sym.fill { fill: currentColor; stroke: none; }
.ck-win button { font-family: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ck-win button:focus { outline: none; }
.ck-win button:focus-visible, .ck-wheel-sc:focus-visible { outline: 2px solid var(--ck-orange); outline-offset: 2px; }

/* The top bar: room for the window's controls on the left, the tabs in the middle, Edit and + on the right. */
.ck-bar {
  position: relative; z-index: 4; flex: none; display: grid; grid-template-columns: minmax(96px, 1fr) auto minmax(96px, 1fr); align-items: center; gap: 12px;
  padding: calc(var(--n-top) + 12px) 20px 14px;
}
.ck-bar-side.right { justify-self: end; display: flex; gap: 10px; }
.ck-seg {
  position: relative; display: flex; padding: 4px; border-radius: 999px;
  background: var(--ck-glass); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 0 0.5px rgba(255, 255, 255, 0.08);
}
.ck-seg-pill {
  position: absolute; top: 4px; left: 0; height: calc(100% - 8px); border-radius: 999px; background: #050505;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); transition: translate 0.42s var(--ck-spring), width 0.42s var(--ck-spring);
}
.ck-seg-b {
  position: relative; z-index: 1; height: 46px; padding: 0 20px; border: 0; border-radius: 999px; background: none;
  color: #fff; font: 500 17.5px/1 var(--font); white-space: nowrap; transition: color 0.2s ease;
}
.ck-seg-b.on { color: var(--ck-orange); }
.ck-gbtn {
  height: 46px; min-width: 46px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--ck-glass); color: #fff;
  font: 500 17px/1 var(--font); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 0 0.5px rgba(255, 255, 255, 0.08); transition: background 0.2s ease, scale 0.3s var(--ck-spring);
}
.ck-gbtn:hover { background: rgba(64, 64, 68, 0.9); }
.ck-gbtn:active { scale: 0.94; }
.ck-gbtn.on { color: var(--ck-orange); }
.ck-gbtn.ck-round { display: grid; place-items: center; width: 46px; padding: 0; }
.ck-gbtn .ck-sym { width: 24px; height: 24px; }
.ck-narrow .ck-bar { grid-template-columns: minmax(84px, auto) 1fr auto; padding-left: 16px; padding-right: 16px; }
.ck-narrow .ck-seg { justify-self: center; }
.ck-narrow .ck-seg-b { height: 38px; padding: 0 11px; font-size: 15px; }
.ck-narrow .ck-gbtn { height: 38px; min-width: 38px; padding: 0 14px; font-size: 15px; }
.ck-narrow .ck-gbtn.ck-round { width: 38px; padding: 0; }
.napp:not(.windowed) .ck-win .ck-bar { padding-top: calc(var(--n-top) + 30px); }
.ck-tiny .ck-bar { grid-template-columns: 1fr auto; row-gap: 12px; }
.ck-tiny .ck-bar-side.right { min-height: 38px; }
.ck-tiny .ck-seg { grid-column: 1 / -1; grid-row: 2; }
.ck-tiny .ck-seg-b { padding: 0 9px; font-size: 14px; }

.ck-panes { position: relative; flex: 1; min-height: 0; }
.ck-pane { position: absolute; inset: 0; overflow: auto; scrollbar-width: none; }
.ck-pane[hidden] { display: none; }
.ck-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ck-sub); font-size: 26px; font-weight: 500; }
.ck-ap { font-size: 0.56em; font-weight: 300; margin-left: 0.04em; letter-spacing: 0; }

/* The − on a card or row in Edit. */
.ck-del {
  position: absolute; z-index: 3; top: 14px; left: 14px; display: grid; place-items: center; width: 30px; height: 30px; padding: 0;
  border: 0; border-radius: 50%; background: var(--ck-red); color: #fff; animation: ck-pop-in 0.3s var(--ck-spring) both;
}
.ck-del .ck-sym { width: 18px; height: 18px; stroke-width: 2.6; }
@keyframes ck-pop-in { from { scale: 0.3; opacity: 0; } }

/* ---------- World Clock ---------- */

.ck-world { display: flex; flex-direction: column; overflow: hidden; }
.ckm { position: relative; flex: 1; min-height: 140px; display: grid; place-items: center; padding: 0 24px 10px; }
.ckm-in { position: relative; }
/* The day and night line stops at the map's edges, as the map does. */
.ckm-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; }
.ckm-grid { fill: none; stroke: rgba(255, 255, 255, 0.09); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ckm-land { fill: #2b2b2e; stroke: #2b2b2e; stroke-width: 1.4; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ckm-land.day { fill: #5a5a5f; stroke: #5a5a5f; }
.ckm-sea { fill: #000; stroke: #000; stroke-width: 1; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
/* The land loads with the first map drawn (js/clock.js) and fades in; drawn again, it is there at once. */
.ckm-land, .ckm-sea { transition: opacity 0.3s ease; }
.ckm-svg:not(.ready) .ckm-land, .ckm-svg:not(.ready) .ckm-sea { opacity: 0; }
.ckm-term { fill: none; stroke: rgba(255, 255, 255, 0.78); stroke-width: 1.3; vector-effect: non-scaling-stroke; }
.ckm-pins { position: absolute; inset: 0; }
.ckm-pin { position: absolute; width: 0; height: 0; }
.ckm-dot { position: absolute; left: -6.5px; top: -6.5px; width: 13px; height: 13px; border-radius: 50%; background: var(--ck-orange); box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35); }
.ckm-label {
  position: absolute; left: 11px; top: -12px; display: flex; flex-direction: column; white-space: nowrap; line-height: 1.15;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9), 0 0 2px rgba(0, 0, 0, 0.8);
}
.ckm-label b { font-weight: 600; font-size: 18px; }
.ckm-t { font-size: 15.5px; color: rgba(255, 255, 255, 0.86); font-variant-numeric: tabular-nums; }
/* Where the label sits (clock.js placeLabels): r/l right or left of the dot, c centred; then b under, a over. */
.ckm-pin[data-at^="l"] .ckm-label { left: auto; right: 11px; align-items: flex-end; }
.ckm-pin[data-at^="c"] .ckm-label { left: 0; translate: -50% 0; align-items: center; }
.ckm-pin[data-at$="b"] .ckm-label { top: 9px; }
.ckm-pin[data-at$="a"] .ckm-label { top: auto; bottom: 9px; }

/* The cities' cards under the map, in the middle when they fit (they scroll sideways when they do not). */
.ckw-cards { flex: none; display: flex; justify-content: safe center; gap: 16px; overflow-x: auto; padding: 4px 28px 24px; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding: 0 28px; }
.ckw-card {
  position: relative; flex: none; width: 188px; padding: 18px 12px 16px; border-radius: 30px; background: var(--ck-card);
  display: flex; flex-direction: column; align-items: center; text-align: center; scroll-snap-align: start;
}
.ckw-card .ck-face { width: 112px; height: 112px; margin-bottom: 12px; }
.ckw-name { font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ckw-card .ckw-off { color: var(--ck-sub); font-size: 14.5px; margin-top: 2px; }
.ckw-sun { display: flex; gap: 12px; margin-top: 4px; color: var(--ck-sub); font-size: 13px; font-variant-numeric: tabular-nums; min-height: 20px; }
.ckw-sun span { display: inline-flex; align-items: center; gap: 4px; }
.ckw-sun .ck-sym { width: 15px; height: 15px; stroke-width: 1.7; }
.ck-editing .ckw-card { animation: ck-jiggle 0.26s ease-in-out infinite alternate; }
.ck-editing .ckw-card:nth-child(2n) { animation-delay: -0.13s; }
@keyframes ck-jiggle { from { rotate: -0.9deg; } to { rotate: 0.9deg; } }

.ckw-list { padding: 0 20px 24px; }
.ckw-row { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 0.5px solid var(--ck-line); }
.ckw-row .ck-del { position: static; flex: none; }
.ckw-row-l { flex: 1; min-width: 0; }
.ckw-row .ckw-off { color: var(--ck-sub); font-size: 15px; }
.ckw-city { font-size: 28px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ckw-time { flex: none; font: 200 58px/1 var(--font); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

/* ---------- Alarms ---------- */

.cka-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; padding: 6px 28px 28px; align-content: start; }
.ck-narrow .cka-grid { grid-template-columns: 1fr; padding: 4px 16px 20px; gap: 14px; }
.cka-card {
  position: relative; display: flex; flex-direction: column; min-height: 300px; max-width: 460px; padding: 32px 30px 28px; border-radius: 40px;
  background: var(--ck-card); color: var(--ck-sub); cursor: pointer; outline: none; transition: color 0.25s ease, background 0.2s ease;
}
.ck-narrow .cka-card { min-height: 0; max-width: none; padding: 22px 24px 20px; border-radius: 30px; }
.cka-card:hover { background: #232325; }
.cka-card:focus-visible { box-shadow: 0 0 0 2px var(--ck-orange); }
.cka-card.on { color: #fff; }
.cka-time { font: 200 78px/1 var(--font); letter-spacing: -0.03em; margin-bottom: 18px; font-variant-numeric: tabular-nums; }
.cka-time .ck-ap { font-size: 46px; }
.ck-narrow .cka-time { font-size: 60px; margin-bottom: 10px; }
.ck-narrow .cka-time .ck-ap { font-size: 34px; }
.cka-line { font-size: 19px; line-height: 1.6; }
.cka-foot { margin-top: auto; padding-top: 30px; }
.ck-narrow .cka-foot { position: absolute; right: 22px; top: 50%; translate: 0 -50%; padding: 0; }
.ck-editing .cka-card { animation: ck-jiggle 0.26s ease-in-out infinite alternate; }
.ck-editing .cka-card:nth-child(2n) { animation-delay: -0.13s; }

/* A switch, as in iPadOS 26: a pill with a pill-shaped knob. */
.ck-switch {
  position: relative; flex: none; width: 64px; height: 30px; padding: 0; border: 0; border-radius: 15px; background: #39393d;
  transition: background 0.25s ease;
}
.ck-switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 38px; height: 26px; border-radius: 13px; background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); transition: translate 0.35s var(--ck-spring);
}
.ck-switch.on { background: var(--ck-green); }
.ck-switch.on::after { translate: 22px 0; }

/* ---------- popovers ---------- */

.ck-shade { position: absolute; inset: 0; z-index: 20; }
.ck-shade[hidden] { display: none; }
.ck-pop {
  position: absolute; z-index: 21; display: flex; flex-direction: column; border-radius: 34px; color: #fff;
  background: rgba(38, 38, 40, 0.86); -webkit-backdrop-filter: blur(40px) saturate(180%); backdrop-filter: blur(40px) saturate(180%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 0.5px rgba(255, 255, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  opacity: 0; scale: 0.9; transform-origin: 50% 0; transition: opacity 0.18s ease, scale 0.35s var(--ck-spring);
}
.ck-pop.in { opacity: 1; scale: 1; }
.ck-pop.sheet { transform-origin: 50% 50%; }
.ck-pop.tall { height: 640px; }
.ck-pop-arrow { position: absolute; top: -10px; width: 22px; height: 11px; translate: -50% 0; background: rgba(38, 38, 40, 0.86); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.ck-pop.sheet .ck-pop-arrow, .ck-pop-arrow[hidden] { display: none; }
.ck-pop-stack, .ck-pop-page { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ck-pop-head { flex: none; display: grid; grid-template-columns: 46px 1fr 46px; align-items: center; padding: 14px 14px 8px; }
.ck-pop-title { margin: 0; text-align: center; font: 600 17.5px/1.2 var(--font); }
.ck-pbtn { display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 50%; background: rgba(120, 120, 128, 0.32); color: #fff; }
.ck-pbtn.ok { background: var(--ck-orange); }
.ck-pbtn .ck-sym { width: 22px; height: 22px; stroke-width: 2.2; }
.ck-pop-scroll { flex: 1; min-height: 0; overflow: auto; padding: 0 14px 18px; scrollbar-width: none; overscroll-behavior: contain; }
.ck-pop-pad { flex: none; padding: 4px 14px 10px; }
.ck-group { margin-top: 16px; padding: 0 18px; border-radius: 26px; background: rgba(118, 118, 128, 0.2); }
.ck-row {
  position: relative; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 54px; padding: 0; border: 0;
  border-bottom: 0.5px solid var(--ck-line); background: none; color: #fff; font: 17px/1.2 var(--font); text-align: left;
}
.ck-group > .ck-row:last-child, .ck-group > .ck-row:has(+ .ck-row[hidden]) { border-bottom: 0; }
.ck-row[hidden] { display: none; }
.ck-row-t { flex: 1; min-width: 0; }
.ck-row-v { color: var(--ck-sub); white-space: nowrap; }
.ck-row-v.tint { color: var(--ck-orange); border: 0; background: none; padding: 6px 0; font: inherit; }
.ck-row-in { flex: 2; min-width: 0; padding: 0; border: 0; background: none; color: var(--ck-sub); font: inherit; text-align: right; outline: none; }
.ck-row-in:focus { color: #fff; }
.ck-row-in::placeholder { color: var(--ck-sub); }
.ck-chev { width: 15px; height: 15px; color: rgba(235, 235, 245, 0.35); stroke-width: 2.4; }
.ck-tick { width: 20px; height: 20px; color: var(--ck-orange); stroke-width: 2.4; }
.ck-days { display: flex; justify-content: space-between; gap: 4px; padding: 12px 0 16px; }
.ck-day { width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: rgba(120, 120, 128, 0.36); color: #fff; font: 600 16px/1 var(--font); transition: background 0.2s ease, color 0.2s ease; }
.ck-day.on { background: var(--ck-orange); color: #000; }
.ck-delete { display: block; width: 100%; min-height: 54px; border: 0; color: var(--ck-red); font: 17px var(--font); }
.ck-menu {
  position: absolute; right: -6px; top: 46px; z-index: 5; width: 150px; max-height: 260px; overflow: auto; padding: 6px; border-radius: 20px;
  background: rgba(58, 58, 60, 0.97); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); scrollbar-width: none;
}
.ck-menu-i { display: flex; align-items: center; gap: 6px; width: 100%; height: 40px; padding: 0 10px; border: 0; border-radius: 12px; background: none; color: #fff; font: 16px var(--font); }
.ck-menu-i:hover { background: rgba(255, 255, 255, 0.1); }
.ck-tickbox { display: grid; place-items: center; width: 18px; }
.ck-tickbox .ck-sym { width: 16px; height: 16px; stroke-width: 2.6; }
.ck-search {
  width: 100%; height: 40px; padding: 0 14px; border: 0; border-radius: 14px; background: rgba(118, 118, 128, 0.24); color: #fff;
  font: 17px var(--font); outline: none; box-sizing: border-box;
}
.ck-search::placeholder { color: var(--ck-sub); }
.ck-city-list .ck-row { padding: 0 4px; }
.ck-none { padding: 30px 0; text-align: center; color: var(--ck-sub); }

/* ---------- the wheel ---------- */

.ck-picker { position: relative; display: flex; justify-content: center; height: 228px; margin: 4px 0; }
.ck-band { position: absolute; left: 0; right: 0; top: 50%; height: 40px; translate: 0 -50%; border-radius: 14px; background: rgba(118, 118, 128, 0.3); pointer-events: none; }
.ck-wheel { position: relative; height: 100%; width: 82px; }
.ck-wheel.ap { width: 70px; }
.ck-wheel-sc {
  height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; overscroll-behavior: contain; outline: none;
  perspective: 700px; -webkit-mask: linear-gradient(transparent, #000 34%, #000 66%, transparent); mask: linear-gradient(transparent, #000 34%, #000 66%, transparent);
}
.ck-wheel-sc::-webkit-scrollbar { display: none; }
.ck-wheel-list { padding: 95px 0; }
.ck-wheel-i {
  height: 38px; line-height: 38px; text-align: center; scroll-snap-align: center; font: 400 23px/38px var(--font);
  color: rgba(235, 235, 245, 0.62); font-variant-numeric: tabular-nums; user-select: none; backface-visibility: hidden;
}
.ck-wheel-i.sel { color: #fff; }
.ck-wheel.unit { width: 150px; }
.ck-wheel.unit .ck-wheel-i { text-align: right; padding-right: 76px; }
.ck-wheel-unit { position: absolute; left: 82px; top: 50%; translate: 0 -50%; font: 500 21px/1 var(--font); color: #fff; pointer-events: none; }
.ck-picker.wide { height: 270px; width: 100%; max-width: 560px; }
.ck-picker.wide .ck-wheel-list { padding: 116px 0; }

/* ---------- Stopwatch ---------- */

.ck-stopwatch { display: flex; flex-direction: column; overflow: hidden; }
.cks-top { flex: 1; min-height: 180px; display: flex; flex-direction: column; }
.cks-pages { flex: 1; min-height: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.cks-pages::-webkit-scrollbar { display: none; }
.cks-page { flex: none; width: 100%; height: 100%; display: grid; place-items: center; scroll-snap-align: start; container-type: size; }
.cks-digits { font: 100 min(16.5cqw, 62cqh)/1 var(--font); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.cks-dial { width: min(94cqh, 94cqw); height: min(94cqh, 94cqw); }
.cks-dial line { stroke: #8e8e93; stroke-width: 0.5; }
.cks-dial line.mid { stroke: #c7c7cc; stroke-width: 0.8; }
.cks-dial line.big { stroke: #fff; stroke-width: 1.4; }
.cks-dial .num { fill: #fff; font: 400 11px var(--font); }
.cks-dial .sub { fill: none; }
.cks-dial .subt { stroke: #8e8e93; stroke-width: 0.6; }
.cks-dial .read { fill: #fff; font: 300 10px var(--font); font-variant-numeric: tabular-nums; }
.cks-dial .hand { stroke-linecap: round; transform-origin: 100px 100px; }
.cks-dial .hand.min { stroke: var(--ck-orange); stroke-width: 1.6; transform-origin: 100px 60px; }
.cks-dial .hand.lap { stroke: #0a84ff; stroke-width: 1.4; }
.cks-dial .hand.sec { stroke: var(--ck-orange); stroke-width: 1.4; }
.cks-dial .hub { fill: var(--ck-orange); }
.cks-dial .pin { fill: #000; }
.cks-dots { display: flex; justify-content: center; gap: 10px; padding: 10px 0 6px; }
.cks-dot { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.32); }
.cks-dot.on { background: #fff; }
.cks-bottom {
  flex: none; height: 42%; min-height: 230px; display: grid; grid-template-columns: auto minmax(0, 760px) auto; justify-content: space-between;
  align-items: start; gap: 28px; padding: 12px 48px 28px;
}
.cks-table { min-height: 0; max-height: 100%; overflow: auto; scrollbar-width: none; }
.cks-head, .cks-row { display: grid; grid-template-columns: 1fr 1fr 1fr; }
.cks-head span:nth-child(2), .cks-row span:nth-child(2) { text-align: center; }
.cks-head span:nth-child(3), .cks-row span:nth-child(3) { text-align: right; }
.cks-head { position: sticky; top: 0; padding: 0 0 10px; background: #000; color: var(--ck-sub); font-size: 15.5px; border-bottom: 0.5px solid var(--ck-line); }
.cks-row { padding: 15px 0; font-size: 20px; font-variant-numeric: tabular-nums; border-bottom: 0.5px solid var(--ck-line); }
.cks-row.best { color: var(--ck-green); }
.cks-row.worst { color: var(--ck-red); }
.ck-narrow .cks-bottom { grid-template-columns: auto auto; height: 50%; padding: 10px 24px 20px; gap: 14px 0; }
.ck-narrow .cks-table { grid-column: 1 / -1; grid-row: 2; }
.ck-narrow .cks-bottom > .ck-circ:last-child { justify-self: end; }
.ck-narrow .cks-head { display: none; }

/* The round buttons: a fill, a black gap and a ring of the same colour, as in Clock. */
.ck-circ {
  --c: #2c2c2e; position: relative; display: grid; place-items: center; width: 98px; height: 98px; padding: 0; border: 0; border-radius: 50%;
  background: var(--c); color: #fff; font: 400 19px/1 var(--font); box-shadow: 0 0 0 3px #000, 0 0 0 5px var(--c); margin: 5px;
  transition: scale 0.25s var(--ck-spring), filter 0.2s ease;
}
.ck-circ:active { scale: 0.94; }
.ck-circ:hover { filter: brightness(1.15); }
.ck-circ.green { --c: #0f3a1b; color: var(--ck-green); }
.ck-circ.red { --c: #3d1411; color: var(--ck-red); }
.ck-circ.orange { --c: #3f2700; color: var(--ck-orange); }
.ck-circ.gray { --c: #2c2c2e; color: #fff; }
.ck-circ:disabled { color: rgba(255, 255, 255, 0.4); filter: none; scale: 1; cursor: default; }
.ck-circ .ck-sym { width: 36px; height: 36px; }
.ck-circ.ck-x .ck-sym { width: 34px; height: 34px; stroke-width: 2; }
.ck-narrow .ck-circ { width: 82px; height: 82px; font-size: 17px; }

/* ---------- Timers ---------- */

.ck-timers { display: flex; }
.ckt-side { flex: none; width: 340px; overflow: auto; padding: 0 14px 24px 24px; scrollbar-width: none; }
.ckt-side-head { position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 4px 0 18px; background: #000; }
.ckt-side-head h2 { margin: 0; text-align: center; font: 600 18px var(--font); }
.ckt-side-head.narrow { position: static; padding-top: 18px; }
.ckt-card {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 18px 16px 18px 20px; margin-bottom: 12px; border-radius: 32px;
  background: var(--ck-card); cursor: pointer; transition: background 0.2s ease;
}
.ckt-card.sel { background: #3a3a3c; }
.ckt-card .ck-del, .ckt-recent .ck-del { position: static; flex: none; }
.ckt-card-t { flex: 1; min-width: 0; }
.ckt-big { font: 200 54px/1 var(--font); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.ckt-rbig { font: 200 64px/1 var(--font); letter-spacing: -0.03em; color: #e5e5ea; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ckt-sub { margin-top: 5px; color: var(--ck-sub); font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ckt-ringbtn { position: relative; flex: none; display: grid; place-items: center; width: 60px; height: 60px; padding: 0; border: 0; border-radius: 50%; background: #3f2700; color: var(--ck-orange); }
.ckt-ringbtn.paused { background: #0f3a1b; color: var(--ck-green); }
.ckt-ringbtn .ck-sym { width: 22px; height: 22px; }
.ckt-mini { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); transform: rotate(-90deg); }
.ckt-mini .track { fill: none; stroke: currentColor; stroke-opacity: 0.25; stroke-width: 2.4; }
.ckt-mini .prog { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.ckt-recents-h { margin: 22px 0 0; padding: 0 0 12px; font: 700 22px var(--font); border-bottom: 0.5px solid var(--ck-line); }
.ckt-recent { display: flex; align-items: center; gap: 12px; padding: 16px 0; border-bottom: 0.5px solid var(--ck-line); }
.ckt-go { flex: none; display: grid; place-items: center; width: 60px; height: 60px; padding: 0; border: 0; border-radius: 50%; background: #0f3a1b; color: var(--ck-green); }
.ckt-go .ck-sym { width: 26px; height: 26px; }
.ckt-main { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; padding: 0 28px 24px; overflow: auto; scrollbar-width: none; }
.ckt-picker { flex: 1; display: grid; place-items: center; width: 100%; min-height: 290px; }
.ckt-btns { flex: none; display: flex; justify-content: space-between; width: 100%; max-width: 760px; margin: 6px 0 20px; }
.ckt-btns.run { position: absolute; left: 28px; right: 28px; bottom: 24px; width: auto; max-width: none; margin: 0; pointer-events: none; }
.ckt-btns.run > * { pointer-events: auto; }
.ckt-opts { flex: none; width: 100%; max-width: 760px; margin-top: 0; }
.ckt-head { flex: none; display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 2px 0 6px; }
.ckt-title { margin: 0; font: 600 20px var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ckt-face { position: relative; flex: 1; width: 100%; min-height: 320px; display: grid; place-items: center; container-type: size; }
.ckt-ring { position: absolute; width: min(100cqw, 100cqh); height: min(100cqw, 100cqh); transform: rotate(-90deg); }
.ckt-ring .track { fill: none; stroke: #2c2c2e; stroke-width: 1.3; }
.ckt-ring .prog { fill: none; stroke: var(--ck-orange); stroke-width: 1.3; stroke-linecap: round; transition: stroke-dashoffset 0.25s linear; }
.ckt-in { position: relative; display: flex; flex-direction: column; align-items: center; width: min(62cqw, 62cqh); }
.ckt-end { display: flex; align-items: center; gap: 6px; color: var(--ck-sub); font-size: min(20px, 3.6cqh); font-variant-numeric: tabular-nums; }
.ckt-end .ck-sym { width: 1.05em; height: 1.05em; stroke-width: 2; }
.ckt-end.paused { opacity: 0.45; }
.ckt-digits { margin: 2cqh 0 4cqh; font: 200 min(17cqw, 18cqh)/1 var(--font); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.ckt-in .ckt-opts { max-width: 100%; }
.ckt-in .ck-group { margin-top: 0; }
.ck-timers.ckt-full .ckt-side { display: none; }
.ck-narrow .ck-timers { display: block; }
.ckt-stack { display: flex; flex-direction: column; min-height: 100%; }
.ck-narrow .ckt-side { width: auto; padding: 0 16px 24px; overflow: visible; }
.ck-narrow .ckt-main { padding: 0 16px 16px; overflow: visible; min-height: 560px; }
.ck-narrow .ckt-btns.run { position: static; width: 100%; margin: 14px 0 6px; }
/* Narrow, the page grows with its content: the ring gets a height of its own. */
.ck-narrow .ckt-face { flex: none; height: min(440px, 64vh); min-height: 300px; }
.ck-narrow .ckt-main { min-height: 0; }
/* Wide, the ring stays clear of the round buttons in the corners. */
.ck-timers:not(.ckt-full) .ckt-main:has(.ckt-btns.run) .ckt-face { margin-bottom: 64px; }

/* ---------- an alarm going off ---------- */

.ckr {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; z-index: 2147482000;
  display: grid; place-items: center; color: #fff; outline: none;
  background: rgba(0, 0, 0, 0.42); -webkit-backdrop-filter: blur(44px) saturate(160%); backdrop-filter: blur(44px) saturate(160%);
  opacity: 0; transition: opacity 0.4s ease;
}
.ckr:not([popover]), .ckr:popover-open { display: grid; }
.ckr.in { opacity: 1; }
.ckr-in { display: flex; flex-direction: column; align-items: center; text-align: center; translate: 0 18px; scale: 0.96; transition: translate 0.6s var(--ck-spring, ease), scale 0.6s ease; }
.ckr.in .ckr-in { translate: 0 0; scale: 1; }
.ckr-label { display: flex; align-items: center; gap: 10px; font: 600 24px/1.2 var(--font); }
.ckr-label .ck-sym { width: 30px; height: 30px; color: #ff9f0a; animation: ckr-ring 0.5s ease-in-out infinite alternate; }
@keyframes ckr-ring { from { rotate: -14deg; } to { rotate: 14deg; } }
.ckr-time { margin-top: 8px; font: 200 clamp(96px, 17vw, 210px)/1 var(--font); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.ckr-time .ck-ap { font-size: 0.34em; }
.ckr-date { margin: 6px 0 56px; font: 500 22px var(--font); color: rgba(255, 255, 255, 0.78); }
.ckr-btns { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.ckr-btn { min-width: 200px; height: 66px; padding: 0 30px; border: 0; border-radius: 33px; font: 600 22px var(--font); cursor: pointer; transition: scale 0.25s ease, filter 0.2s ease; }
.ckr-btn:hover { filter: brightness(1.1); }
.ckr-btn:active { scale: 0.96; }
.ckr-btn.snooze { background: #ff9f0a; color: #000; }
.ckr-btn.stop { background: rgba(255, 255, 255, 0.22); color: #fff; }
.ckr-btn[hidden] { display: none; }
.ckr-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .ckr-label .ck-sym { animation: none; } }

/* ---------- the Dynamic Island: a timer, or a snoozed alarm ---------- */

.ck-island {
  position: fixed; top: 7px; left: 50%; z-index: 58; translate: -50% 0; display: flex; align-items: center; overflow: hidden;
  width: 126px; height: 37px; border-radius: 18.5px; background: #000; color: #fff; opacity: 0; pointer-events: none; scale: 0.5;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 0 0.5px rgba(255, 255, 255, 0.06);
  font: 15px/1.2 var(--font); -webkit-user-select: none; user-select: none;
  transition: width 0.55s cubic-bezier(0.3, 1.3, 0.55, 1), height 0.55s cubic-bezier(0.3, 1.3, 0.55, 1), border-radius 0.55s cubic-bezier(0.3, 1.3, 0.55, 1),
    opacity 0.25s ease, scale 0.45s cubic-bezier(0.3, 1.3, 0.55, 1);
}
.ck-island.on { opacity: 1; scale: 1; pointer-events: auto; cursor: pointer; }
/* A full-screen app covers the island (data-full-app, js/appwin.js): it shrinks away as the app opens and
   comes back as it closes. A timer that has just ended still shows, with its Stop. */
body[data-full-app] .ck-island.on:not(.done) { opacity: 0; scale: 0.5; pointer-events: none; }
.ck-island > * { animation: cki-in 0.32s 0.1s ease-out both; }
@keyframes cki-in { from { opacity: 0; filter: blur(6px); scale: 0.9; } }
/* A message on the Home Screen's own island (a toast) takes the top for a moment. */
body:has(#island.shown) .ck-island { opacity: 0; scale: 0.6; pointer-events: none; }
.ck-island.compact { width: 208px; justify-content: space-between; padding: 0 14px 0 11px; }
.cki-lead { display: grid; place-items: center; color: #ff9f0a; }
.cki-lead .ck-sym { width: 21px; height: 21px; stroke-width: 2.2; }
.cki-time { color: #ff9f0a; font: 600 16px/1 var(--font); font-variant-numeric: tabular-nums; }
.ck-island.paused .cki-time { opacity: 0.55; }
.ck-island.open { width: min(430px, calc(100vw - 24px)); height: 92px; border-radius: 46px; justify-content: space-between; padding: 0 26px 0 20px; cursor: default; }
.cki-btns { display: flex; gap: 10px; }
.cki-b { display: grid; place-items: center; width: 50px; height: 50px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; transition: scale 0.25s ease; }
.cki-b:active { scale: 0.92; }
.cki-b .ck-sym { width: 22px; height: 22px; }
.cki-b.orange { background: #4a2d00; color: #ff9f0a; }
.cki-b.green { background: #0f3a1b; color: #30d158; }
.cki-b.gray { background: #3a3a3c; color: #fff; }
.cki-b.gray .ck-sym { stroke-width: 2.4; }
.cki-text { display: flex; flex-direction: column; align-items: flex-end; min-width: 0; cursor: pointer; }
.cki-label { color: rgba(235, 235, 245, 0.6); font: 500 14px/1.2 var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.cki-time.big { font: 300 42px/1.05 var(--font); letter-spacing: -0.02em; }
.ck-island.done { width: min(450px, calc(100vw - 24px)); height: 82px; border-radius: 41px; gap: 12px; padding: 0 16px; cursor: default; }
.cki-icon { flex: none; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: #4a2d00; color: #ff9f0a; animation: cki-in 0.32s 0.1s ease-out both, ckr-ring 0.5s 0.4s ease-in-out infinite alternate; }
.cki-icon .ck-sym { width: 27px; height: 27px; stroke-width: 2; }
.ck-island.done .cki-text { flex: 1; align-items: flex-start; }
.cki-title { font: 600 17px/1.2 var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cki-caps { flex: none; display: flex; gap: 8px; }
.cki-cap { height: 42px; padding: 0 18px; border: 0; border-radius: 21px; font: 600 15.5px/1 var(--font); cursor: pointer; transition: scale 0.2s ease; }
.cki-cap:active { scale: 0.95; }
.cki-cap.orange { background: #ff9f0a; color: #000; }
.cki-cap.gray { background: #3a3a3c; color: #fff; }
.ck-island button:focus-visible { outline: 2px solid #ff9f0a; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .ck-island { transition: opacity 0.2s ease; }
  .cki-icon { animation: none; }
}
