:root {
  color-scheme: light;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  --bg: #f4f5ff;
  --card: #ffffff;
  --text: #1d1b2f;
  --muted: #6c6a80;
  --blue: #2f5bff;
  --pink: #ff5fa2;
  --purple: #6e58ff;
  --border: #e1e2f5;
  --shadow: 0 20px 40px rgba(54, 52, 84, 0.1);
  --success: #19b56e;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: radial-gradient(circle at top, #ffffff 0%, var(--bg) 55%);
  color: var(--text);
  min-height: 100vh;
}

.app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 80px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.eyebrow {
  color: var(--purple);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

h1 {
  font-size: 1.85rem;
  margin-top: 6px;
}

.subtitle {
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.5;
}

.today-card {
  background: linear-gradient(130deg, #fef5ff, #eef1ff 60%, #f9fdff);
  border-radius: 18px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
  gap: 16px;
}

.today-label {
  font-size: 0.85rem;
  color: var(--muted);
}

#today-date {
  font-size: 1.2rem;
  margin-top: 4px;
}

.today-subtitle {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 4px;
}

.ghost {
  border: 1px solid var(--border);
  background: white;
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 600;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.owner-j {
  color: var(--blue);
  background: rgba(47, 91, 255, 0.12);
  border-color: rgba(47, 91, 255, 0.2);
}

.owner-p {
  color: var(--pink);
  background: rgba(255, 95, 162, 0.12);
  border-color: rgba(255, 95, 162, 0.2);
}

.owner-jp {
  color: #7a4ce4;
  background: rgba(122, 76, 228, 0.12);
  border-color: rgba(122, 76, 228, 0.2);
}

.owner-neutral {
  color: #3f3d56;
  background: rgba(63, 61, 86, 0.1);
  border-color: rgba(63, 61, 86, 0.15);
}

.mode-tabs {
  display: flex;
  gap: 12px;
}

.mode-tab {
  flex: 1;
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: 14px;
  background: white;
  font-weight: 600;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.2s ease;
}

.mode-tab.active {
  color: white;
  background: linear-gradient(120deg, var(--blue), var(--purple));
  border-color: transparent;
}

.week-overview {
  background: var(--card);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.week-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.week-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}

.week-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: white;
}

.week-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(45, 42, 72, 0.12);
}

.week-card.active {
  border-color: rgba(47, 91, 255, 0.4);
  box-shadow: 0 12px 24px rgba(47, 91, 255, 0.18);
}

.week-card h4 {
  font-size: 0.95rem;
}

.week-progress {
  font-size: 0.85rem;
  color: var(--muted);
}

.day-tabs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(110px, 1fr);
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.day-tabs button {
  border: none;
  padding: 12px 14px;
  border-radius: 14px;
  background: white;
  box-shadow: var(--shadow);
  font-weight: 600;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.2s ease;
}

.day-tabs button.active {
  color: white;
  background: linear-gradient(120deg, var(--blue), var(--purple));
  transform: translateY(-2px);
}

.board {
  background: var(--card);
  border-radius: 22px;
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.board-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#day-title {
  font-size: 1.3rem;
}

.hint {
  font-size: 0.85rem;
  color: var(--muted);
}

.progress {
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-bar {
  flex: 1;
  height: 8px;
  background: rgba(108, 106, 128, 0.12);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(120deg, var(--blue), var(--pink));
  transition: width 0.2s ease;
}

.task-list {
  list-style: none;
  display: grid;
  gap: 12px;
}

.task-item {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.task-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(45, 42, 72, 0.12);
}

.task-item.done {
  opacity: 0.65;
  text-decoration: line-through;
}

.task-time {
  font-weight: 700;
  min-width: 62px;
  color: var(--text);
}

.task-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.task-owner {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.task-owner.owner-j {
  color: var(--blue);
}

.task-owner.owner-p {
  color: var(--pink);
}

.task-owner.owner-jp {
  color: #7a4ce4;
}

.task-owner.owner-neutral {
  color: var(--muted);
}

.calendar {
  background: var(--card);
  border-radius: 22px;
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(30px, 1fr));
  gap: 6px;
}

.calendar-cell {
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f8f8ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--muted);
}

.calendar-cell.header {
  background: transparent;
  border: none;
  font-weight: 700;
  color: var(--text);
}

.calendar-cell.active {
  background: rgba(47, 91, 255, 0.1);
  color: var(--blue);
}

.calendar-cell.complete {
  background: rgba(25, 181, 110, 0.18);
  color: var(--success);
  border-color: rgba(25, 181, 110, 0.4);
}

.calendar-cell.pending {
  background: rgba(47, 91, 255, 0.12);
  color: var(--blue);
  border-color: rgba(47, 91, 255, 0.3);
}

.calendar-cell.empty {
  background: transparent;
  border: none;
}

.footer {
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

.fab {
  position: fixed;
  bottom: 24px;
  right: 20px;
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  color: white;
  background: linear-gradient(120deg, var(--blue), var(--pink));
  box-shadow: var(--shadow);
  cursor: pointer;
}

@media (min-width: 720px) {
  .hero {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  h1 {
    font-size: 2.2rem;
  }

  .board-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .mode-tabs {
    max-width: 320px;
  }
}
