/* ================= Multi Dash Timer ================= */
:root {
  --bg: #1f1f21;
  --bg-deep: #171719;
  --card: #2a2a2c;
  --card-raised: #303033;
  --line: #37373b;
  --line-strong: #434348;
  --text: #f2f2f4;
  --text-dim: #d4d4da;
  --muted: #9a9aa4;
  --faint: #75757f;
  --accent: #5fcdfe;
  --cta: #5fcdfe;
  --cta-hover: #7edaff;
  --danger: #fe6364;
  --good: #6bcb5f;
  --btn: #343437;
  --btn-hover: #3e3e42;
  --btn-border: #414146;
  --ring-track: #3b3b3f;
  --hover: rgba(255, 255, 255, 0.06);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  --radius: 16px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #f2f3f6;
  --bg-deep: #ffffff;
  --card: #ffffff;
  --card-raised: #fbfbfd;
  --line: #e5e6ec;
  --line-strong: #d4d5de;
  --text: #17171c;
  --text-dim: #35353e;
  --muted: #666672;
  --faint: #85858f;
  --btn: #f1f1f5;
  --btn-hover: #e9e9ef;
  --btn-border: #dcdce4;
  --ring-track: #e9e9ef;
  --hover: rgba(0, 0, 0, 0.055);
  --shadow: 0 18px 40px rgba(28, 28, 52, 0.09);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { min-height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1100px 500px at 50% -220px, rgba(95, 205, 254, 0.055), transparent 65%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
h1, h2, h3, p { margin: 0; }
::selection { background: rgba(95, 205, 254, 0.28); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sprite symbol { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- app shell ---------- */
.app {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 48px;
}

.titlebar {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.01em;
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 8px; }
.logo {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: conic-gradient(from -40deg, #5fcdfe, #b18cfe, #fe6364, #fbd647, #5fcdfe);
  -webkit-mask: radial-gradient(circle, transparent 42%, #000 44%);
  mask: radial-gradient(circle, transparent 42%, #000 44%);
}
.titlebar-right { display: flex; align-items: center; gap: 10px; }
.title-btn {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border: 0; border-radius: 7px;
  background: transparent; color: var(--faint);
}
.title-btn:hover { background: var(--hover); color: var(--text-dim); }
.title-btn.is-muted { color: var(--danger); }
.title-btn.is-muted:hover { color: var(--danger); }
.title-btn .ic { width: 15px; height: 15px; }
.clock {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  min-width: 64px;
  text-align: right;
}

/* ---------- hero ---------- */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  padding: 24px 0 0;
}
.hero-copy { min-width: 220px; }
h1 {
  font-size: clamp(23px, 2.15vw, 29px);
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.15;
}
.stats {
  margin-top: 5px;
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.stats .sep { color: var(--faint); padding: 0 1px; }
.stats .stat-run { color: var(--text-dim); }
.stats .stat-done { color: var(--danger); }
.stats .stat-paused { color: var(--muted); }

.hero-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--btn-border);
  border-radius: 9px;
  background: var(--btn);
  color: var(--text-dim);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.07s, filter 0.15s;
}
.btn:hover { background: var(--btn-hover); border-color: var(--line-strong); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.4; }
.btn .ic { width: 14px; height: 14px; }

.btn-cta {
  background: var(--cta);
  border-color: transparent;
  color: #10222a;
  font-weight: 700;
}
.btn-cta:hover { background: var(--cta-hover); border-color: transparent; color: #0b1a20; }

.btn-icon { width: 38px; padding: 0; }
.btn-small { height: 30px; padding: 0 10px; font-size: 11.5px; border-radius: 7px; }
.btn-small .ic { width: 12px; height: 12px; }
.btn-danger {
  color: #ffd5d5;
  background: rgba(254, 99, 100, 0.12);
  border-color: rgba(254, 99, 100, 0.35);
}
.btn-danger:hover { background: rgba(254, 99, 100, 0.2); border-color: rgba(254, 99, 100, 0.55); color: #fff; }
.btn-danger-ghost { color: var(--danger); background: transparent; border-color: rgba(254, 99, 100, 0.3); }
.btn-danger-ghost:hover { background: rgba(254, 99, 100, 0.12); border-color: rgba(254, 99, 100, 0.5); color: var(--danger); }

html[data-theme="light"] .btn-danger {
  color: #b42318;
  background: #fff1f0;
  border-color: #f2b8b5;
}
html[data-theme="light"] .btn-danger:hover { background: #ffe4e2; border-color: #e88f8a; color: #8f1d15; }
html[data-theme="light"] .btn-danger-ghost { color: #c0362c; border-color: #f2b8b5; }
html[data-theme="light"] .btn-danger-ghost:hover { background: #fff1f0; color: #b42318; }
html[data-theme="light"] .segmented input:checked + span { background: #e9eaf0; color: #15151a; }

/* ---------- grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(252px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

/* ---------- timer card ---------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 15px 15px 14px;
  border: 1px solid var(--accent-border, var(--line));
  border-radius: var(--radius);
  background:
    radial-gradient(130% 85% at 50% -30%, var(--accent-soft, transparent), transparent 62%),
    var(--card);
  transition: border-color 0.2s, background 0.3s, transform 0.18s, box-shadow 0.2s;
}

.card:hover {
  border-color: var(--accent-border-strong, var(--line-strong));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
}

.card.is-new { animation: cardIn 0.3s cubic-bezier(0.2, 0.8, 0.3, 1); }

@keyframes cardIn {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
}

.card.is-done {
  border-color: rgba(254, 99, 100, 0.52);
  background:
    radial-gradient(130% 85% at 50% -30%, rgba(254, 99, 100, 0.16), transparent 62%),
    linear-gradient(180deg, rgba(254, 99, 100, 0.08), rgba(254, 99, 100, 0.03)),
    var(--card);
  animation: donePulse 2.4s ease-in-out infinite;
}

html[data-theme="light"] .card.is-done {
  background:
    radial-gradient(130% 85% at 50% -30%, rgba(254, 99, 100, 0.14), transparent 62%),
    linear-gradient(180deg, rgba(254, 99, 100, 0.07), rgba(254, 99, 100, 0.02)),
    #fffafa;
}

@keyframes donePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(254, 99, 100, 0); }
  50% { box-shadow: 0 0 26px rgba(254, 99, 100, 0.14); }
}

.card-head {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 26px;
}
.dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.card.is-running .dot { animation: dotPulse 2.2s ease-in-out infinite; }
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 2px var(--accent-soft); }
  50% { box-shadow: 0 0 0 5px rgba(0, 0, 0, 0); }
}
.card-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}
.card-tools { display: flex; align-items: center; gap: 2px; margin-left: auto; flex: none; }
.tool {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--faint);
  opacity: 0.8;
  transition: background 0.15s, color 0.15s, opacity 0.15s;
}
.tool .ic { width: 14px; height: 14px; }
.tool:hover { background: var(--hover); color: var(--text-dim); opacity: 1; }
.tool[data-act="delete"]:hover { color: var(--danger); }

/* ring */
.ring-wrap {
  position: relative;
  width: clamp(146px, 61%, 180px);
  aspect-ratio: 1;
  margin: 12px auto 10px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ring-wrap:active { transform: scale(0.994); }
.ring { width: 100%; height: 100%; display: block; transform: rotate(-90deg); overflow: visible; }
.ring circle { fill: none; stroke-width: 8; }
.ring-track { stroke: var(--ring-track); }
.ring-arc {
  stroke: var(--accent);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.16s linear, stroke 0.25s ease, opacity 0.2s ease;
}
.card.is-done .ring-arc { stroke: var(--danger); }
.ring-wrap:hover .ring-track { stroke: var(--line-strong); }

.ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 12%;
  pointer-events: none;
  text-align: center;
}
.time {
  font-size: clamp(30px, 2.7vw, 38px);
  font-weight: 500;
  letter-spacing: 0.005em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  white-space: nowrap;
}
.time.is-medium { font-size: clamp(26px, 2.35vw, 33px); }
.time.is-long { font-size: clamp(21px, 2vw, 29px); }
.card.is-done .time { color: var(--text); }
.sub {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.card.is-done .sub { color: var(--danger); }

/* mode line */
.mode {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 17px;
  margin: 0 0 13px;
  color: var(--faint);
  font-size: 11.5px;
  text-align: center;
}
.mode .ic { width: 13px; height: 13px; opacity: 0.9; }
.mode .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* dashboard duration adjuster */
.adjust {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 12px;
}
.adjust-label {
  flex: none;
  padding-right: 1px;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--faint);
}
.adjust-field { position: relative; flex: 1; min-width: 0; }
.adjust-field input {
  width: 100%;
  height: 28px;
  padding: 0 15px 0 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--bg-deep);
  color: var(--text-dim);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  text-align: center;
  outline: none;
  appearance: textfield;
  -moz-appearance: textfield;
  transition: border-color 0.15s, box-shadow 0.15s, color 0.15s;
}
.adjust-field input::-webkit-outer-spin-button,
.adjust-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.adjust-field input:hover { border-color: var(--line-strong); }
.adjust-field input:focus {
  border-color: var(--accent-border-strong, var(--accent));
  color: var(--text);
  box-shadow: 0 0 0 2px rgba(95, 205, 254, 0.12);
}
.adjust-field span {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  font-size: 9.5px;
  color: var(--faint);
  pointer-events: none;
}

/* actions */
.card-actions { display: flex; gap: 8px; margin-top: auto; }
.act-primary {
  flex: 1;
  min-width: 0;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--btn-border);
  border-radius: 9px;
  background: var(--btn);
  color: var(--text-dim);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.07s;
}
.act-primary .ic { width: 13px; height: 13px; stroke-width: 2.2; }
.act-primary:hover { background: var(--btn-hover); border-color: var(--line-strong); color: var(--text); }
.act-primary:active { transform: translateY(1px); }

.act-plus, .act-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  border-radius: 9px;
  border: 1px solid var(--btn-border);
  background: var(--btn);
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.act-plus { width: 65px; flex: none; }
.act-reset { width: 40px; flex: none; color: var(--muted); }
.act-reset .ic { width: 15px; height: 15px; }
.act-plus:hover, .act-reset:hover { background: var(--btn-hover); color: var(--text); border-color: var(--line-strong); }
.act-plus:active, .act-reset:active { transform: translateY(1px); }

/* empty state */
.empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 70px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--card) 45%, transparent);
  text-align: center;
}
.empty-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--hover);
  color: var(--muted);
  margin-bottom: 4px;
}
.empty-icon .ic { width: 22px; height: 22px; }
.empty h2 { font-size: 16px; font-weight: 650; }
.empty p { font-size: 12.5px; color: var(--muted); max-width: 300px; }
.empty .btn { margin-top: 10px; }

/* ---------- modal ---------- */
.modal {
  width: min(440px, calc(100vw - 28px));
  max-width: none;
  max-height: calc(100vh - 40px);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  overflow: visible;
}
.modal::backdrop {
  background: rgba(8, 8, 12, 0.62);
  backdrop-filter: blur(5px);
}
.modal[open] { animation: modalIn 0.18s ease-out; }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
}

.sheet {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 40px);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
html[data-theme="light"] .sheet { box-shadow: 0 30px 80px rgba(30, 30, 60, 0.18); }
.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--line);
}
.sheet-head h2 { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.sheet-sub { margin-top: 3px; font-size: 12px; color: var(--muted); }
.sheet-close {
  width: 30px;
  height: 30px;
  flex: none;
  display: grid;
  place-items: center;
  margin: -3px -4px 0 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
}
.sheet-close:hover { background: var(--hover); color: var(--text); }
.sheet-close .ic { width: 15px; height: 15px; }
.sheet-body {
  padding: 18px 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.sheet-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 88%, var(--bg-deep));
}
.spacer { flex: 1; }

/* form */
.field { margin-bottom: 17px; }
.field:last-child { margin-bottom: 0; }
.field-label {
  display: block;
  margin-bottom: 7px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--muted);
}
.input {
  width: 100%;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-deep);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input::placeholder { color: var(--faint); }
.input:hover { border-color: var(--line-strong); }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(95, 205, 254, 0.14); }
.input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.input[type="number"]::-webkit-outer-spin-button,
.input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.segmented {
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg-deep);
}
.segmented label { flex: 1; position: relative; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 550;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.segmented label:hover span { color: var(--text-dim); }
.segmented input:checked + span { background: var(--btn); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.16); }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }

.duration-row { display: flex; gap: 8px; }
.duration-row.is-triple .input-suffix .input { padding-right: 34px; padding-left: 9px; font-size: 12.5px; }
.duration-row.is-triple .input-suffix > span { right: 9px; font-size: 10.5px; }
.input-suffix { position: relative; flex: 1; }
.input-suffix .input { padding-right: 42px; }
.input-suffix > span {
  position: absolute;
  top: 50%;
  right: 11px;
  transform: translateY(-50%);
  font-size: 11.5px;
  color: var(--faint);
  pointer-events: none;
}

.presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.preset {
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 550;
}
.preset:hover { border-color: var(--line-strong); color: var(--text); background: var(--hover); }
.preset.is-active { border-color: var(--accent); color: var(--accent); background: rgba(95, 205, 254, 0.08); }

.hint { display: block; margin-top: 6px; font-size: 11.5px; color: var(--faint); line-height: 1.45; }

.sound-row { display: flex; gap: 8px; align-items: center; }
.select-wrap { position: relative; flex: 1; min-width: 0; }
.select-wrap::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 1.6px solid var(--muted);
  border-bottom: 1.6px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.select {
  appearance: none;
  padding-right: 32px;
  cursor: pointer;
}
.select-wrap.compact { flex: none; width: 152px; }

/* multi-toggle row (Auto-start | Repeat | Auto-delete) */
.toggle-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 22px;
}
.toggle-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  cursor: pointer;
}
.toggle-cell[hidden] { display: none; }
.toggle-label {
  font-size: 13px;
  line-height: 16px;
  color: var(--text-dim);
  white-space: nowrap;
  transition: color 0.15s;
}
.toggle-cell:hover .toggle-label { color: var(--text); }
.switch { position: relative; display: inline-flex; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 2; }
.switch .track {
  position: relative;
  display: block;
  width: 30px;
  height: 16px;
  border-radius: 999px;
  border: 1px solid var(--btn-border);
  background: var(--btn);
  transition: background 0.18s, border-color 0.18s;
}
.switch .track::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.18s cubic-bezier(0.3, 0.7, 0.4, 1), background 0.18s;
}
.switch input:checked + .track { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .track::after { transform: translateX(14px); background: #10222a; }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }

/* settings */
.settings-group { padding: 4px 0 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.settings-group:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 4px; }
.settings-group h3 {
  margin-bottom: 10px;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--faint);
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 9px 0;
}
.setting-copy { min-width: 0; }
.setting-label { font-size: 13px; font-weight: 550; color: var(--text-dim); }
.inline-ic { display: inline-block; width: 13px; height: 13px; margin-right: 5px; vertical-align: -2px; }
.setting-desc { margin-top: 2px; font-size: 11.5px; color: var(--faint); line-height: 1.4; }
.volume-wrap { display: flex; align-items: center; gap: 10px; flex: none; }
.range {
  width: 110px;
  height: 4px;
  appearance: none;
  border-radius: 999px;
  background: linear-gradient(to right, var(--accent) var(--fill, 70%), var(--line) var(--fill, 70%));
  outline: none;
  cursor: pointer;
}
.range::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text);
  border: 3px solid var(--accent);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.range::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text);
  border: 3px solid var(--accent);
}
.shortcuts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; }
.shortcuts div { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
kbd {
  min-width: 22px;
  height: 21px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--bg-deep);
  color: var(--text-dim);
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 600;
}

/* toasts */
.toasts {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 60;
  pointer-events: none;
  width: max-content;
  max-width: calc(100vw - 28px);
}
.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #323236;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  animation: toastIn 0.2s ease-out;
}
html[data-theme="light"] .toast { background: #ffffff; box-shadow: 0 12px 30px rgba(30, 30, 60, 0.14); }
.toast .ic { width: 14px; height: 14px; color: var(--accent); }
.toast.is-danger .ic { color: var(--danger); }
.toast.is-out { opacity: 0; transform: translateY(6px); transition: opacity 0.18s, transform 0.18s; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px); }
}
.toasts .ic { flex: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .app { padding: 0 18px 40px; }
  .hero { align-items: flex-start; }
  .hero-actions { justify-content: flex-start; }
}

@media (max-width: 560px) {
  .app { padding: 0 14px 34px; }
  .titlebar { font-size: 11px; }
  .hero { padding-top: 18px; gap: 14px; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1 1 auto; padding: 0 11px; }
  .hero-actions .btn-icon { flex: none; width: 38px; }
  .btn-cta { flex: 1 1 140px; }
  .grid { grid-template-columns: 1fr; gap: 12px; }
  .ring-wrap { width: min(180px, 62%); }
  .time { font-size: 30px; }
  .sheet-head, .sheet-body, .sheet-foot { padding-left: 16px; padding-right: 16px; }
  .volume-wrap { gap: 8px; }
  .range { width: 88px; }
  .shortcuts { grid-template-columns: 1fr; }
  .toggle-row { flex-direction: column; align-items: flex-start; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; border: 3px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }
