:root {
  --bg: #f3ede3;
  --bg-accent: #e6d6bd;
  --panel: rgba(255, 251, 244, 0.82);
  --panel-strong: rgba(255, 251, 244, 0.94);
  --border: rgba(74, 92, 110, 0.14);
  --shadow: 0 24px 70px rgba(53, 43, 30, 0.14);
  --text: #18212b;
  --muted: #5c6773;
  --accent: #0f7c74;
  --accent-strong: #095f59;
  --accent-soft: rgba(15, 124, 116, 0.12);
  --warm: #cf7a3a;
  --warm-soft: rgba(207, 122, 58, 0.16);
  --danger: #a44633;
  --danger-soft: rgba(164, 70, 51, 0.14);
  --hero-font: "Bahnschrift", "Segoe UI", sans-serif;
  --body-font: "Aptos", "Trebuchet MS", sans-serif;
  --mono-font: "Consolas", "SFMono-Regular", monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body-font);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.78), transparent 34%),
    linear-gradient(140deg, #f7f2ea 0%, #efe4d2 48%, #dde8e2 100%);
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

.page-glow {
  position: fixed;
  width: 26rem;
  height: 26rem;
  border-radius: 50%;
  filter: blur(16px);
  opacity: 0.42;
  pointer-events: none;
  z-index: 0;
  animation: drift 14s ease-in-out infinite alternate;
}

.page-glow-left {
  top: -8rem;
  left: -8rem;
  background: radial-gradient(circle, rgba(207, 122, 58, 0.42) 0%, transparent 68%);
}

.page-glow-right {
  right: -9rem;
  bottom: -8rem;
  background: radial-gradient(circle, rgba(15, 124, 116, 0.34) 0%, transparent 70%);
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero-card {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 1.5rem;
  padding: 1.5rem;
  animation: rise 600ms ease both;
}

.hero-copy {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  margin: 0 0 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: var(--accent-strong);
  font-weight: 700;
}

.hero-copy h1,
.panel-heading h2,
.timeline-header h3 {
  margin: 0;
  font-family: var(--hero-font);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero-copy h1 {
  max-width: 14ch;
  font-size: clamp(2.3rem, 6vw, 4.2rem);
  line-height: 0.95;
}

.hero-summary,
.panel-copy,
.summary-note,
.timer-caption {
  color: var(--muted);
  line-height: 1.5;
}

.hero-summary {
  margin: 1rem 0 0;
  max-width: 34rem;
  font-size: 1.02rem;
}

.tracker-card {
  padding: 1.25rem;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.34)),
    linear-gradient(145deg, rgba(15, 124, 116, 0.08), rgba(207, 122, 58, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.tracker-topline,
.panel-heading,
.timeline-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font-size: 0.92rem;
  font-weight: 700;
}

.status-pill::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.14);
}

.status-idle {
  color: #5f6974;
  background: rgba(95, 105, 116, 0.12);
}

.status-work {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.status-break {
  color: var(--warm);
  background: var(--warm-soft);
}

.main-timer {
  margin: 1.5rem 0 0.35rem;
  font-family: var(--mono-font);
  font-size: clamp(2.8rem, 6vw, 4.4rem);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.timer-caption {
  margin: 0;
}

.control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.primary-btn,
.secondary-btn,
.ghost-btn {
  border: none;
  border-radius: 16px;
  padding: 0.95rem 1.2rem;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-1px);
}

.primary-btn:focus-visible,
.secondary-btn:focus-visible,
.ghost-btn:focus-visible,
.date-input:focus-visible {
  outline: 3px solid rgba(15, 124, 116, 0.22);
  outline-offset: 3px;
}

.primary-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #f8fcfb;
  box-shadow: 0 16px 30px rgba(15, 124, 116, 0.22);
  font-weight: 700;
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  font-weight: 700;
}

.stop-btn {
  color: var(--danger);
}

.ghost-btn {
  background: transparent;
  border: 1px solid rgba(24, 33, 43, 0.12);
  color: var(--text);
}

.primary-btn:disabled,
.secondary-btn:disabled,
.ghost-btn:disabled {
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  opacity: 0.48;
}

.review-panel {
  margin-top: 1.5rem;
  padding: 1.5rem;
  animation: rise 800ms ease both;
}

.panel-heading h2 {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
}

.panel-heading .panel-copy,
.timeline-header .panel-copy {
  margin: 0.45rem 0 0;
}

.date-tools {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.date-label {
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 700;
}

.date-input {
  border: 1px solid rgba(24, 33, 43, 0.14);
  border-radius: 14px;
  padding: 0.85rem 0.95rem;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.summary-card {
  padding: 1.15rem;
  border-radius: 22px;
  background: var(--panel-strong);
  border: 1px solid rgba(74, 92, 110, 0.08);
}

.summary-label {
  display: inline-block;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.76rem;
}

.summary-value {
  display: block;
  margin-top: 0.7rem;
  font-family: var(--hero-font);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1;
}

.summary-note {
  margin: 0.7rem 0 0;
  font-size: 0.95rem;
}

.timeline-header {
  margin-top: 1.75rem;
}

.timeline-header h3 {
  font-size: 1.35rem;
}

.sessions-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.9rem;
}

.session-item,
.empty-state {
  position: relative;
  border-radius: 22px;
  padding: 1.1rem 1.15rem 1.1rem 1.35rem;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(24, 33, 43, 0.08);
}

.session-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  border-radius: 22px 0 0 22px;
}

.session-item-work::before {
  background: linear-gradient(180deg, var(--accent), #5eb3a4);
}

.session-item-break::before {
  background: linear-gradient(180deg, var(--warm), #e8b171);
}

.session-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.session-type {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
}

.session-type::before {
  content: "";
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: currentColor;
}

.session-type-work {
  color: var(--accent-strong);
}

.session-type-break {
  color: var(--warm);
}

.session-duration {
  font-family: var(--mono-font);
  color: var(--muted);
  font-size: 0.95rem;
  white-space: nowrap;
}

.session-window {
  margin: 0.55rem 0 0;
  font-weight: 700;
}

.session-note {
  margin: 0.4rem 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.live-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: 0.65rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(24, 33, 43, 0.08);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.live-tag::before {
  content: "";
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1.6s ease-in-out infinite;
}

.empty-state {
  text-align: center;
  padding: 2rem 1.25rem;
  color: var(--muted);
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }

  to {
    transform: translate3d(20px, -18px, 0) scale(1.08);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(15, 124, 116, 0.28);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(15, 124, 116, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(15, 124, 116, 0);
  }
}

@media (max-width: 900px) {
  .hero-card {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .app-shell {
    width: min(100% - 1rem, 1120px);
    padding-top: 1rem;
  }

  .hero-card,
  .review-panel {
    padding: 1rem;
  }

  .hero-copy h1 {
    max-width: 100%;
  }

  .panel-heading,
  .timeline-header,
  .session-topline {
    flex-direction: column;
  }

  .date-tools {
    justify-content: flex-start;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .main-timer {
    font-size: 2.4rem;
  }
}
