:root {
  color-scheme: dark;
  --bg: #0b1020;
  --bg-soft: #10172a;
  --panel: rgba(20, 28, 47, 0.88);
  --panel-strong: #151d31;
  --line: rgba(207, 218, 255, 0.12);
  --line-bright: rgba(207, 218, 255, 0.21);
  --text: #f1f3fc;
  --muted: #9ca8c2;
  --subtle: #68748e;
  --lavender: #c0adff;
  --lavender-bright: #d5c8ff;
  --mint: #9eefd7;
  --danger: #ff9ea8;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
  font-family: Inter, "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(ellipse at 72% 5%, rgba(111, 93, 185, 0.19), transparent 32rem),
    radial-gradient(ellipse at 2% 45%, rgba(73, 119, 146, 0.1), transparent 36rem),
    linear-gradient(180deg, #0a0f1d 0%, #0e1424 58%, #0a1020 100%);
}
button, input, select { font: inherit; }
button { color: inherit; }
a { color: inherit; }
.ambient {
  position: fixed;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(1px);
}
.ambient-one {
  top: 5rem;
  right: 8%;
  width: 9px;
  height: 9px;
  background: #d6c9ff;
  box-shadow: 0 0 25px 8px rgba(193, 171, 255, 0.24);
}
.ambient-two {
  top: 31rem;
  left: 6%;
  width: 4px;
  height: 4px;
  background: #9eefd7;
  box-shadow: 0 0 19px 6px rgba(158, 239, 215, 0.2);
}
.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1200px, calc(100% - 64px));
  min-height: 82px;
  margin: 0 auto;
  border-bottom: 1px solid rgba(214, 223, 255, 0.09);
  background: rgba(11, 16, 32, 0.76);
  backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  color: var(--lavender);
  border: 1px solid rgba(198, 181, 255, 0.23);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(169, 146, 255, 0.15), rgba(101, 129, 172, 0.08));
}
.brand-mark svg { width: 28px; height: 28px; }
.brand-copy { display: grid; gap: 1px; }
.brand-copy strong { font-size: 15px; letter-spacing: 0.01em; }
.brand-copy strong span { color: var(--lavender); font-weight: 500; }
.brand-copy small { color: var(--subtle); font-size: 8px; font-weight: 700; letter-spacing: 0.16em; }
.main-nav { display: flex; align-items: center; gap: 34px; }
.main-nav a {
  position: relative;
  color: #aab4c9;
  font-size: 12px;
  text-decoration: none;
  transition: color 160ms ease;
}
.main-nav a:hover, .main-nav a:focus-visible { color: var(--text); }
.main-nav a:focus-visible, .brand:focus-visible { outline: 2px solid var(--lavender); outline-offset: 5px; border-radius: 4px; }
.privacy-note { display: inline-flex; align-items: center; gap: 8px; color: #aeb8cb; font-size: 11px; }
.privacy-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 12px rgba(158, 239, 215, 0.75); }
.page-shell { width: min(1120px, calc(100% - 64px)); margin: 0 auto; }
.intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  padding: 64px 0 32px;
}
.eyebrow, .panel-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #a6b2c9;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.19em;
}
.eyebrow-line { display: inline-block; width: 23px; height: 1px; background: var(--mint); }
.intro h1 {
  margin: 18px 0 14px;
  font-size: clamp(40px, 5.7vw, 66px);
  font-weight: 530;
  letter-spacing: -0.065em;
  line-height: 0.98;
}
.intro h1 span { color: var(--lavender); }
.intro-description { max-width: 425px; margin: 0; color: #a1acc2; font-size: 13px; line-height: 1.75; }
.date-note {
  display: grid;
  min-width: 224px;
  gap: 7px;
  margin-bottom: 4px;
  padding: 16px 18px;
  border-left: 1px solid rgba(192, 173, 255, 0.48);
  background: linear-gradient(90deg, rgba(192, 173, 255, 0.055), transparent);
}
.date-note-label { color: var(--subtle); font-size: 8px; font-weight: 800; letter-spacing: 0.16em; }
.date-note strong { color: #e9e7f7; font-size: 13px; font-weight: 560; text-transform: capitalize; }
.date-note-caption { color: #8994ab; font-size: 10px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(350px, 0.82fr); gap: 18px; }
.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(28, 38, 62, 0.9), rgba(17, 24, 41, 0.93));
  box-shadow: var(--shadow);
}
.clock-panel, .stopwatch-panel { min-height: 304px; padding: 23px 25px 18px; }
.clock-panel::before {
  position: absolute;
  top: -120px;
  right: -72px;
  width: 300px;
  height: 300px;
  border: 1px solid rgba(194, 179, 255, 0.1);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(161, 136, 245, 0.13), rgba(161, 136, 245, 0.025) 54%, transparent 70%);
  content: "";
}
.clock-panel::after {
  position: absolute;
  top: -66px;
  right: 47px;
  width: 185px;
  height: 185px;
  border: 1px solid rgba(194, 179, 255, 0.08);
  border-radius: 50%;
  content: "";
}
.panel-topline { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; }
.section-number { color: var(--lavender); font-size: 9px; letter-spacing: 0.12em; }
.live-badge { display: inline-flex; align-items: center; gap: 7px; color: #b5c5d6; font-size: 8px; font-weight: 700; letter-spacing: 0.13em; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 10px rgba(158, 239, 215, 0.8); animation: breathe 2.2s infinite ease-in-out; }
.clock-content { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: clamp(20px, 4vw, 44px); min-height: 207px; }
.analog-clock {
  position: relative;
  display: grid;
  width: clamp(122px, 14vw, 158px);
  aspect-ratio: 1;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(202, 190, 255, 0.32);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(167, 147, 255, 0.14) 0 1px, transparent 2px), radial-gradient(circle at 42% 34%, rgba(219, 210, 255, 0.13), rgba(89, 77, 143, 0.04) 45%, rgba(4, 9, 19, 0.45) 75%), repeating-conic-gradient(from 0deg, rgba(216, 209, 255, 0.76) 0deg 1deg, transparent 1deg 30deg);
  box-shadow: 0 0 0 7px rgba(186, 165, 255, 0.04), 0 0 40px rgba(151, 125, 237, 0.12), inset 0 0 24px rgba(138, 117, 225, 0.12);
}
.analog-clock::before { position: absolute; inset: 9px; border: 1px solid rgba(214, 204, 255, 0.09); border-radius: inherit; background: radial-gradient(circle, transparent 56%, rgba(13, 18, 32, 0.55) 57%); content: ""; }
.analog-clock::after { position: absolute; inset: 22px; border-radius: inherit; background: radial-gradient(circle, transparent 0 62%, rgba(11, 16, 29, 0.9) 63% 100%); content: ""; }
.clock-hand { position: absolute; z-index: 2; bottom: 50%; left: 50%; width: 2px; border-radius: 4px; transform: translateX(-50%) rotate(0deg); transform-origin: 50% 100%; }
.clock-hand-hour { height: 28%; background: #dfd9ff; }
.clock-hand-minute { height: 38%; width: 1.5px; background: #aeeedc; }
.clock-hand-second { height: 42%; width: 1px; background: #e8b9dd; }
.clock-center { position: absolute; z-index: 3; width: 7px; height: 7px; border: 1px solid #fcfaff; border-radius: 50%; background: var(--lavender); box-shadow: 0 0 12px rgba(210, 195, 255, 0.8); }
.clock-readout { min-width: 0; }
.live-time { display: block; color: #f4f1ff; font-size: clamp(39px, 5.3vw, 57px); font-variant-numeric: tabular-nums; font-weight: 430; letter-spacing: -0.07em; line-height: 1.05; }
.clock-date { margin: 8px 0 15px; color: #a9b4ca; font-size: 12px; text-transform: capitalize; }
.timezone { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: #929fb8; font-size: 10px; }
.timezone-icon { display: grid; width: 17px; height: 17px; place-items: center; color: var(--mint); border: 1px solid rgba(158, 239, 215, 0.28); border-radius: 50%; font-size: 13px; }
.clock-footer { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding-top: 11px; border-top: 1px solid rgba(212, 222, 255, 0.09); color: #8290a9; font-size: 10px; }
.clock-footer svg { width: 30px; color: var(--lavender); }
.stopwatch-panel { background: radial-gradient(ellipse at 100% 0%, rgba(98, 149, 156, 0.13), transparent 43%), linear-gradient(145deg, rgba(24, 37, 57, 0.93), rgba(15, 23, 38, 0.95)); }
.stopwatch-orbit { position: absolute; top: -46px; right: 8px; width: 115px; height: 115px; border: 1px solid rgba(158, 239, 215, 0.09); border-radius: 50%; box-shadow: 0 0 0 13px rgba(158, 239, 215, 0.018), 0 0 0 26px rgba(158, 239, 215, 0.014); }
.stopwatch-content { position: relative; z-index: 1; padding-top: 21px; }
.stopwatch-title-row { display: flex; justify-content: space-between; align-items: start; }
.stopwatch-title-row h2, .agenda-heading-row h2 { margin: 0; color: #f0f1f8; font-size: 18px; font-weight: 560; letter-spacing: -0.03em; }
.panel-subtitle { margin: 6px 0 0; color: #909cb4; font-size: 10px; line-height: 1.5; }
.stopwatch-symbol { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; color: var(--mint); border: 1px solid rgba(158, 239, 215, 0.18); border-radius: 12px; background: rgba(158, 239, 215, 0.06); }
.stopwatch-symbol svg { width: 22px; height: 22px; }
.stopwatch-display-wrap { margin-top: 25px; }
.stopwatch-caption { display: block; margin-bottom: 3px; color: #77849d; font-size: 8px; font-weight: 750; letter-spacing: 0.16em; }
.stopwatch-display { display: block; color: #ecf4f2; font-size: clamp(40px, 4.3vw, 49px); font-variant-numeric: tabular-nums; font-weight: 430; letter-spacing: -0.065em; line-height: 1.05; }
.stopwatch-display span { color: #829d9f; font-size: 0.55em; letter-spacing: -0.03em; }
.stopwatch-controls { display: flex; align-items: center; gap: 8px; margin-top: 15px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 0 13px; border: 1px solid transparent; border-radius: 11px; cursor: pointer; font-size: 10px; font-weight: 700; transition: transform 150ms ease, background 150ms ease, border-color 150ms ease, opacity 150ms ease; }
.button:hover:not(:disabled), .icon-button:hover:not(:disabled) { transform: translateY(-1px); }
.button:focus-visible, .icon-button:focus-visible, .agenda-filter:focus-visible, input:focus-visible, .event-action:focus-visible { outline: 2px solid var(--lavender); outline-offset: 3px; }
.button-primary { min-width: 106px; color: #131326; background: linear-gradient(135deg, #d2c5ff, #a8efd9); box-shadow: 0 5px 18px rgba(166, 214, 216, 0.11); }
.button-primary:hover:not(:disabled) { background: linear-gradient(135deg, #e3d9ff, #c3f5e6); }
.button-primary.is-running { color: #fff; background: rgba(255, 255, 255, 0.11); border-color: rgba(255, 255, 255, 0.12); box-shadow: none; }
.button-icon { width: 15px; height: 15px; }
.pause-icon { display: none; }
.button-primary.is-running .play-icon { display: none; }
.button-primary.is-running .pause-icon { display: block; }
.button-secondary { color: #ccd4e4; border-color: rgba(204, 212, 228, 0.15); background: rgba(255, 255, 255, 0.045); }
.button-secondary:hover:not(:disabled) { background: rgba(255, 255, 255, 0.09); }
.button:disabled, .icon-button:disabled { opacity: 0.42; cursor: not-allowed; }
.icon-button { display: grid; width: 36px; height: 36px; place-items: center; color: #a5b0c5; border: 1px solid rgba(204, 212, 228, 0.15); border-radius: 11px; background: rgba(255, 255, 255, 0.045); cursor: pointer; transition: transform 150ms ease, background 150ms ease; }
.icon-button svg { width: 17px; height: 17px; }
.laps-wrap { margin-top: 19px; padding-top: 11px; border-top: 1px solid rgba(212, 222, 255, 0.09); }
.laps-heading { display: flex; align-items: center; justify-content: space-between; color: #728099; font-size: 8px; font-weight: 750; letter-spacing: 0.15em; }
.laps-heading span:last-child { display: grid; width: 19px; height: 19px; place-items: center; color: #cbd6e5; border-radius: 50%; background: rgba(255, 255, 255, 0.07); letter-spacing: 0; }
.lap-list { display: flex; max-height: 46px; flex-direction: column; gap: 6px; overflow-y: auto; margin: 8px 0 0; padding: 0; list-style: none; scrollbar-color: rgba(192, 173, 255, 0.35) transparent; scrollbar-width: thin; }
.lap-list li { display: flex; justify-content: space-between; color: #b4c0d0; font-size: 9px; font-variant-numeric: tabular-nums; }
.lap-list li span:last-child { color: var(--mint); }
.lap-empty { color: #6f7b91 !important; }
.agenda-panel { margin-top: 18px; padding: 26px; background: radial-gradient(ellipse at 100% 0%, rgba(126, 108, 196, 0.09), transparent 45%), linear-gradient(145deg, rgba(22, 29, 48, 0.94), rgba(15, 22, 38, 0.96)); }
.agenda-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.agenda-heading-row > div:first-child { display: grid; gap: 11px; }
.agenda-heading-row h2 { font-size: 20px; }
.agenda-heading-row .panel-subtitle { margin: -5px 0 0; font-size: 11px; }
.agenda-calendar-mark { display: grid; width: 48px; height: 48px; flex: 0 0 auto; place-items: center; color: var(--lavender); border: 1px solid rgba(192, 173, 255, 0.19); border-radius: 15px; background: rgba(192, 173, 255, 0.06); }
.agenda-calendar-mark svg { width: 30px; height: 30px; }
.agenda-layout { display: grid; grid-template-columns: minmax(230px, 0.72fr) minmax(0, 1.28fr); gap: 30px; margin-top: 24px; padding-top: 21px; border-top: 1px solid rgba(212, 222, 255, 0.09); }
.event-form { display: flex; flex-direction: column; align-items: stretch; }
.form-heading { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; }
.form-heading-icon { display: grid; width: 31px; height: 31px; place-items: center; color: #191729; border-radius: 10px; background: linear-gradient(135deg, #d3c7ff, #a5edd8); font-size: 14px; }
.form-heading div { display: grid; gap: 3px; }
.form-heading strong { color: #e2e7f4; font-size: 11px; font-weight: 650; }
.form-heading div span { color: #7e8ba4; font-size: 9px; }
.event-form label:not(.visually-hidden) { margin: 0 0 6px; color: #aeb8cb; font-size: 9px; font-weight: 600; }
.event-form input { width: 100%; min-height: 38px; margin-bottom: 13px; padding: 0 11px; color: #ecf0f9; border: 1px solid rgba(203, 216, 245, 0.13); border-radius: 10px; outline: none; background: rgba(7, 12, 23, 0.37); font-size: 10px; color-scheme: dark; transition: border-color 150ms ease, box-shadow 150ms ease; }
.event-form input::placeholder { color: #606e87; }
.event-form input:focus { border-color: rgba(192, 173, 255, 0.7); box-shadow: 0 0 0 3px rgba(192, 173, 255, 0.1); }
.button-add { align-self: start; min-height: 37px; color: #141629; background: linear-gradient(120deg, #c5b5ff, #a0e6d5); }
.button-add:hover { background: linear-gradient(120deg, #d6caff, #bef4e5); }
.button-add svg { width: 15px; height: 15px; }
.form-status { min-height: 13px; margin: 8px 0 0; color: var(--mint); font-size: 9px; }
.agenda-events { min-width: 0; }
.agenda-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 11px; }
.event-summary { display: flex; align-items: baseline; gap: 9px; }
.event-summary strong { color: #e2e7f4; font-size: 11px; font-weight: 650; }
.event-summary span { color: #7e8ba4; font-size: 9px; }
.agenda-filter { min-height: 30px; padding: 0 24px 0 10px; color: #bdc6d8; border: 1px solid rgba(203, 216, 245, 0.13); border-radius: 9px; background: #11192b; font-size: 9px; cursor: pointer; }
.event-list { display: flex; max-height: 250px; flex-direction: column; gap: 8px; overflow-y: auto; margin: 0; padding: 0 3px 0 0; list-style: none; scrollbar-color: rgba(192, 173, 255, 0.35) transparent; scrollbar-width: thin; }
.event-item { display: grid; grid-template-columns: 5px minmax(0, 1fr) auto; align-items: center; gap: 11px; min-height: 58px; padding: 9px 11px; border: 1px solid rgba(203, 216, 245, 0.09); border-radius: 12px; background: rgba(255, 255, 255, 0.026); transition: border-color 150ms ease, background 150ms ease; }
.event-item:hover { border-color: rgba(203, 216, 245, 0.18); background: rgba(255, 255, 255, 0.045); }
.event-indicator { width: 4px; height: 31px; border-radius: 4px; background: linear-gradient(180deg, var(--lavender), var(--mint)); }
.event-copy { min-width: 0; display: grid; gap: 4px; }
.event-title { overflow: hidden; color: #e3e8f3; font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.event-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; color: #8592aa; font-size: 9px; }
.event-badge { color: #d7c9ff; }
.event-badge.is-late { color: var(--danger); }
.event-item.is-done .event-title { color: #8894a9; text-decoration: line-through; }
.event-item.is-done .event-indicator { background: #647189; }
.event-actions { display: flex; align-items: center; gap: 5px; }
.event-action { display: grid; width: 27px; height: 27px; place-items: center; padding: 0; color: #a8b4ca; border: 1px solid transparent; border-radius: 8px; background: transparent; cursor: pointer; transition: color 150ms ease, background 150ms ease; }
.event-action:hover { color: var(--mint); background: rgba(158, 239, 215, 0.08); }
.event-action.delete:hover { color: var(--danger); background: rgba(255, 158, 168, 0.08); }
.event-action svg { width: 15px; height: 15px; }
.empty-state { display: grid; min-height: 122px; place-items: center; align-content: center; gap: 7px; padding: 18px; color: #7e8ba4; border: 1px dashed rgba(203, 216, 245, 0.15); border-radius: 13px; text-align: center; }
.empty-state span:first-child { color: #b9a7fa; font-size: 17px; }
.empty-state strong { color: #bbc5d6; font-size: 10px; font-weight: 600; }
.empty-state span:last-child { font-size: 9px; }
.page-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 20px 2px 27px; color: #6f7c94; font-size: 9px; }
.footer-brand { color: #a4aec2; font-weight: 650; }
.footer-moon { color: var(--lavender); font-size: 15px; vertical-align: -1px; }
.footer-local { display: inline-flex; align-items: center; gap: 7px; }
.footer-local .privacy-dot { width: 5px; height: 5px; flex-basis: 5px; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

@keyframes breathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
@media (max-width: 820px) {
  .dashboard-grid { grid-template-columns: minmax(0, 1fr) minmax(300px, 0.88fr); }
  .clock-panel, .stopwatch-panel { padding-right: 20px; padding-left: 20px; }
  .clock-content { gap: 21px; }
  .analog-clock { width: 125px; }
  .live-time { font-size: 41px; }
  .agenda-layout { gap: 22px; }
}
@media (max-width: 700px) {
  html { scroll-padding-top: 72px; }
  .topbar { width: min(100% - 32px, 560px); min-height: 70px; }
  .page-shell { width: min(100% - 32px, 560px); }
  .main-nav { gap: 15px; }
  .main-nav a { font-size: 10px; }
  .privacy-note { display: none; }
  .intro { align-items: start; flex-direction: column; gap: 20px; padding: 43px 0 25px; }
  .intro h1 { font-size: clamp(43px, 11vw, 58px); }
  .date-note { min-width: 0; padding: 10px 13px; }
  .dashboard-grid { grid-template-columns: 1fr; gap: 13px; }
  .clock-panel, .stopwatch-panel { min-height: 290px; padding: 20px; }
  .clock-content { justify-content: start; gap: clamp(24px, 8vw, 44px); }
  .analog-clock { width: clamp(118px, 33vw, 150px); }
  .live-time { font-size: clamp(39px, 10vw, 53px); }
  .stopwatch-display { font-size: clamp(43px, 12vw, 54px); }
  .agenda-panel { margin-top: 13px; padding: 21px 18px; }
  .agenda-layout { grid-template-columns: 1fr; gap: 17px; margin-top: 18px; padding-top: 17px; }
  .event-form { padding-bottom: 15px; border-bottom: 1px solid rgba(212, 222, 255, 0.09); }
  .page-footer { flex-wrap: wrap; padding-top: 16px; }
  .page-footer > span:nth-child(2) { display: none; }
}
@media (max-width: 430px) {
  .brand-copy small { font-size: 7px; }
  .brand-mark { width: 35px; height: 35px; }
  .brand-mark svg { width: 25px; height: 25px; }
  .main-nav { gap: 10px; }
  .main-nav a { font-size: 9px; }
  .clock-content { gap: 17px; }
  .analog-clock { width: 110px; }
  .live-time { font-size: 35px; }
  .clock-date { font-size: 10px; }
  .agenda-heading-row h2 { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
