/* repeat. — minimal, fast, slick */

:root {
  --bg: #ffffff;
  --fg: #222222;
  --accent: #0000EE;
  --muted: #f4f4f4;
  --muted-fg: #8a8a8a;
  --border: #222222;
  --border-soft: rgba(34, 34, 34, 0.12);
  --radius: 2px;
  --radius-lg: 4px;
  --shadow: 0 1px 0 rgba(34, 34, 34, 0.04);
  --max-w: 760px;
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-base: 15px;
  --fs-md: 17px;
  --fs-lg: 22px;
  --fs-xl: 32px;
  --fs-display: clamp(110px, 22vw, 220px);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; }

/* ========= Full-viewport gradient (work phases only) =========
   Sits behind everything; JS controls --grad-angle / --grad-s1 / --grad-s2
   (color stop positions, 0-100) and the .is-active class for the fade. */

.bg-gradient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 300ms var(--ease);
  background: linear-gradient(
    var(--grad-angle, 90deg),
    #3F2B96 calc(var(--grad-s1, 0) * 1%),
    #A8C0FF calc(var(--grad-s2, 100) * 1%)
  );
}

.bg-gradient.is-active { opacity: 1; }

/* Lift everything else above the gradient */
body { position: relative; background: transparent; }
.app-header, main, .toast, .modal-backdrop { position: relative; z-index: 1; }
.app-header { z-index: 11; } /* was sticky at z-index 10 */
.toast { z-index: 101; }
.modal-backdrop { z-index: 201; }

html {
  background: var(--bg); /* white fallback behind the gradient */
}

html, body {
  margin: 0;
  padding: 0;
  color: var(--fg);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: var(--fs-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01', 'cv01', 'cv11';
  letter-spacing: -0.01em;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3 {
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0;
}

h2 { font-size: var(--fs-lg); }

p { margin: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

button { font-family: inherit; font-size: inherit; cursor: pointer; }

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  outline: none;
  transition: border-color 140ms var(--ease);
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
}

input:focus, textarea:focus {
  border-color: var(--accent);
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] { -moz-appearance: textfield; }

label {
  display: block;
  font-size: var(--fs-xs);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--fg);
  margin-bottom: 6px;
}

/* ========= Header ========= */

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  color: var(--fg);
  font-weight: 600;
  font-size: var(--fs-md);
  letter-spacing: -0.03em;
}
.brand:hover { text-decoration: none; }
.brand .dot { color: var(--accent); }

.header-nav { display: flex; gap: 10px; align-items: center; }

.account-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.account-email {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted-fg);
  font-size: var(--fs-xs);
}

/* ========= Buttons ========= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: var(--radius);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.01em;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 140ms var(--ease), color 140ms var(--ease), transform 140ms var(--ease);
  line-height: 1;
  text-decoration: none;
}

.btn:hover { background: var(--fg); color: var(--bg); text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover { background: #0000b8; border-color: #0000b8; color: #fff; }

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--fg);
  padding: 9px 10px;
}
.btn-ghost:hover { background: var(--muted); color: var(--fg); }

.btn-sm { padding: 6px 10px; font-size: var(--fs-xs); }
.btn-lg { padding: 14px 22px; font-size: var(--fs-md); min-width: 120px; }

/* ========= Main / Views ========= */

main {
  flex: 1;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 36px 28px 80px;
}

.view { display: flex; flex-direction: column; gap: 44px; }

.loading-card {
  color: var(--muted-fg);
  font-size: var(--fs-sm);
  padding: 48px 0;
  text-align: center;
}

/* ========= Authentication ========= */

.view-auth {
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 190px);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.auth-heading {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-heading h1 {
  font-size: var(--fs-xl);
  line-height: 1.1;
}

.auth-panel.is-hidden { display: none; }

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-submit {
  width: 100%;
  min-height: 42px;
  margin-top: 2px;
}

.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
}

.text-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
  font-size: var(--fs-xs);
}

.text-button:hover { text-decoration: underline; }

.auth-magic {
  width: 100%;
  margin-top: 16px;
  border-color: var(--border-soft);
}

.field-hint {
  color: var(--muted-fg);
  font-size: var(--fs-xs);
  margin-top: 5px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted-fg);
  font-size: var(--fs-xs);
  text-transform: none;
  letter-spacing: 0;
}

.check-row input {
  appearance: auto;
  width: auto;
}

.auth-message {
  min-height: 20px;
  color: var(--muted-fg);
  font-size: var(--fs-sm);
}

.auth-message.is-error { color: #b00020; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
}

.subtle { color: var(--muted-fg); font-size: var(--fs-sm); }

/* ========= Tracker ========= */

.tracker-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border-soft);
  /* Roughly 5 rows visible — scroll to see the rest (up to 14 days) */
  max-height: 260px;
  overflow-y: auto;
  overscroll-behavior: contain;
  /* Gradient fade: top row (today) is fully opaque, fading to transparent at the bottom */
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 30%, rgba(0,0,0,0.7) 60%, rgba(0,0,0,0.2) 88%, rgba(0,0,0,0) 100%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 30%, rgba(0,0,0,0.7) 60%, rgba(0,0,0,0.2) 88%, rgba(0,0,0,0) 100%);
  scrollbar-width: none;
}
.tracker-list::-webkit-scrollbar { display: none; }

.tracker-row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px 2px;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  transition: background 140ms var(--ease);
}

.tracker-row:last-child { border-bottom: none; }
.tracker-row:hover { background: var(--muted); }
.tracker-row.is-today .date { color: var(--accent); font-weight: 600; }

.tracker-row .date {
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-sm);
  letter-spacing: 0.01em;
}

.tracker-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dot-circle {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid var(--border-soft);
  background: transparent;
  transition: transform 140ms var(--ease);
}

.dot-circle.is-done {
  background: var(--accent);
  border-color: var(--accent);
}

.tracker-row:hover .dot-circle.is-done { transform: scale(1.1); }

.tracker-count {
  font-size: var(--fs-xs);
  color: var(--muted-fg);
  font-variant-numeric: tabular-nums;
}

/* ========= Sets grid ========= */

.sets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.set-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--bg);
  transition: transform 140ms var(--ease), box-shadow 140ms var(--ease);
}

.set-card:hover { transform: translateY(-1px); box-shadow: 0 6px 0 -4px var(--accent); }

.set-card.is-clickable { cursor: pointer; position: relative; }
.set-card.is-clickable:active { transform: translateY(0); }
.set-card.is-clickable:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.card-timeline {
  display: flex;
  margin-top: 2px;
}

.card-menu-wrap {
  position: absolute;
  right: 10px;
  bottom: 10px;
}

.card-menu-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted-fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  transition: background 140ms var(--ease), color 140ms var(--ease);
}
.card-menu-btn:hover { background: var(--muted); color: var(--fg); }
.card-menu-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.card-menu {
  position: absolute;
  right: 0;
  bottom: 34px;
  min-width: 130px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  padding: 4px;
  display: flex;
  flex-direction: column;
  z-index: 20;
  animation: modal-rise 140ms var(--ease);
}

.card-menu-item {
  appearance: none;
  background: transparent;
  border: none;
  color: var(--fg);
  text-align: left;
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: var(--fs-sm);
  cursor: pointer;
  font-family: inherit;
}
.card-menu-item:hover { background: var(--muted); }
.card-menu-item.is-danger { color: #c81e1e; }
.card-menu-item.is-danger:hover { background: #fdecec; }

/* ========= Timeline (shared) ========= */

.timeline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.timeline-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-sizing: border-box;
  color: #fff;
  font-variant-numeric: tabular-nums;
  background: var(--accent);
  border: 1px solid var(--accent);
  transition: transform 140ms var(--ease), opacity 140ms var(--ease);
}

/* Card variant — tiny, shape-only, no numbers visible */
.timeline-xs { gap: 3px; }
.timeline-xs .timeline-dot { font-size: 0; line-height: 0; }
.timeline-xs .timeline-dot.is-small { width: 4px; height: 4px; }
.timeline-xs .timeline-dot.is-big   { width: 8px; height: 8px; }

/* Run variant — large, numbers visible, progress states */
.timeline-lg { gap: 6px; justify-content: center; max-width: 640px; }
.timeline-lg .timeline-dot {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.timeline-lg .timeline-dot.is-small { width: 18px; height: 18px; font-size: 9px; }
.timeline-lg .timeline-dot.is-big   { width: 24px; height: 24px; }

/* States (only meaningful when parent is timeline-lg, but harmless on xs) */
.timeline-lg .timeline-dot.is-upcoming {
  background: transparent;
  color: var(--accent);
  opacity: 0.55;
}
.timeline-lg .timeline-dot.is-done {
  background: var(--accent);
  color: #fff;
  opacity: 1;
}
.timeline-lg .timeline-dot.is-current {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(0, 0, 238, 0.22);
  transform: scale(1.1);
}

.set-card .name {
  font-size: var(--fs-md);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.set-card .meta {
  display: flex;
  gap: 12px;
  font-size: var(--fs-xs);
  color: var(--muted-fg);
  font-variant-numeric: tabular-nums;
}

.set-card .meta span { display: inline-flex; align-items: center; gap: 4px; }

.set-card .actions {
  display: flex;
  gap: 6px;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}

.set-card .actions .primary-group { display: flex; gap: 6px; }
.set-card .actions .icon-group { display: flex; gap: 2px; }

.empty {
  border: 1px dashed var(--border-soft);
  padding: 40px 24px;
  border-radius: var(--radius-lg);
  text-align: center;
  color: var(--muted-fg);
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

/* ========= Editor ========= */

.editor {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.field { display: flex; flex-direction: column; }

.row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.label-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.label-row label { margin-bottom: 0; }

.intervals { display: flex; flex-direction: column; gap: 8px; }

.interval-row {
  display: grid;
  grid-template-columns: 32px 1fr 1fr 32px;
  gap: 10px;
  align-items: end;
  padding: 10px 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}

.interval-row label { margin-bottom: 4px; }

.interval-index {
  font-size: var(--fs-xs);
  color: var(--muted-fg);
  font-variant-numeric: tabular-nums;
  padding-bottom: 10px;
}

.remove-interval {
  padding: 8px 10px;
  font-size: var(--fs-md);
  line-height: 1;
}

.editor-summary {
  font-size: var(--fs-sm);
  color: var(--muted-fg);
  border-top: 1px solid var(--border-soft);
  padding-top: 16px;
}

.editor-summary strong { color: var(--fg); font-weight: 600; }

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ========= Run view ========= */

.view-run {
  gap: 32px;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 180px);
  text-align: center;
  padding-top: 20px;
}

.run-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.run-top > :first-child { justify-self: start; }
.run-top > :last-child { justify-self: end; }

.run-title {
  font-size: var(--fs-md);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-align: center;
}

.run-round {
  font-size: var(--fs-xs);
  color: var(--muted-fg);
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.run-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
}

.run-phase {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted-fg);
  font-weight: 500;
}

.run-phase.is-work { color: var(--accent); }
.run-phase.is-rest { color: var(--muted-fg); }
.run-phase.is-headstart { color: var(--fg); }
.run-phase.is-cooldown { color: var(--muted-fg); }
.run-phase.is-done { color: var(--accent); }

.run-time {
  font-size: var(--fs-display);
  font-weight: 300;
  letter-spacing: -0.06em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--fg);
  transition: color 140ms var(--ease);
}

.run-stage.is-work .run-time { color: var(--accent); }

.run-interval {
  font-size: var(--fs-sm);
  color: var(--muted-fg);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  min-height: 1em;
}

.run-progress {
  width: 100%;
  max-width: 500px;
  height: 2px;
  background: var(--border-soft);
  position: relative;
  overflow: hidden;
}

.run-progress-bar {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 250ms linear;
}

.run-controls {
  display: flex;
  gap: 16px;
  align-items: center;
}

.run-toggle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 238, 0.28);
  transition: transform 140ms var(--ease), background 140ms var(--ease), box-shadow 140ms var(--ease);
}
.run-toggle:hover { background: #0000b8; transform: scale(1.04); }
.run-toggle:active { transform: scale(0.98); }
.run-toggle:disabled { opacity: 0.5; cursor: default; box-shadow: none; }

.run-toggle svg { width: 28px; height: 28px; }
.run-toggle .icon-pause { display: none; }
.run-toggle.is-playing .icon-play { display: none; }
.run-toggle.is-playing .icon-pause { display: block; }
/* nudge play icon right so it looks optically centered in the circle */
.run-toggle .icon-play { margin-left: 3px; }

.run-timeline { width: 100%; display: flex; justify-content: center; }

.is-hidden { visibility: hidden; pointer-events: none; }
.account-controls.is-hidden { display: none; }

.run-next { font-size: var(--fs-xs); letter-spacing: 0.04em; text-transform: uppercase; }

/* ========= Day view ========= */

.day-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
}

.day-body { display: flex; flex-direction: column; gap: 10px; }

.session-row {
  display: grid;
  grid-template-columns: 14px 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
}

.session-row .name { font-weight: 500; }
.session-row .time { font-size: var(--fs-sm); color: var(--muted-fg); font-variant-numeric: tabular-nums; }
.session-row .duration { font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }

.session-row .dot-circle.is-done { width: 14px; height: 14px; }

/* ========= Import view ========= */

.view-import { align-items: center; }
.import-card {
  max-width: 520px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 40px auto;
}

.import-preview {
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  padding: 16px 0;
  font-size: var(--fs-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-variant-numeric: tabular-nums;
}

.import-preview .row-line { display: flex; justify-content: space-between; }
.import-preview .name { font-size: var(--fs-md); font-weight: 600; margin-bottom: 8px; letter-spacing: -0.02em; }

/* ========= Modal (lightbox) ========= */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 12, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 200;
  animation: modal-fade 180ms var(--ease);
}

@keyframes modal-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes modal-rise {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal {
  background: var(--bg);
  color: var(--fg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 28px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: modal-rise 200ms var(--ease);
}

.modal h3 {
  font-size: var(--fs-lg);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
}

.modal p { margin: 0; }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

body.modal-open { overflow: hidden; }

/* ========= Toast ========= */

.toast {
  position: fixed;
  left: 50%;
  /* keep well clear of the viewport edge, respect iOS safe area */
  bottom: calc(32px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 12px);
  background: var(--fg);
  color: var(--bg);
  padding: 12px 18px;
  border-radius: 999px;
  font-size: var(--fs-sm);
  line-height: 1.2;
  white-space: nowrap;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  opacity: 0;
  visibility: hidden;
  transition: transform 220ms var(--ease), opacity 180ms var(--ease), visibility 0s linear 200ms;
  pointer-events: none;
  z-index: 100;
  max-width: 90vw;
}

.toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
  visibility: visible;
  transition: transform 220ms var(--ease), opacity 180ms var(--ease), visibility 0s linear 0s;
}

/* ========= Mobile ========= */

@media (max-width: 600px) {
  .app-header { padding: 16px 18px; }
  main { padding: 24px 18px 80px; }
  .account-email { display: none; }
  .auth-card { padding: 24px 20px; }
  .auth-heading h1 { font-size: 27px; }
  .row { grid-template-columns: 1fr 1fr; }
  .tracker-row { grid-template-columns: 90px 1fr auto; gap: 10px; }
  .interval-row { grid-template-columns: 24px 1fr 1fr 28px; }
  .sets-grid { grid-template-columns: 1fr; }
  :root { --fs-display: clamp(96px, 30vw, 180px); }
}

/* ========= Focus and a11y ========= */

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

.btn:focus-visible { outline-offset: 3px; }

/* Subtle animated dots for a nice empty state */
@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
