:root {
  color-scheme: light;
  --ink: #111318;
  --muted: #626a73;
  --line: #d9dde3;
  --paper: #f7f5ef;
  --panel: #fffdf8;
  --mint: #65b99d;
  --blue: #5677c8;
  --coral: #e96d5b;
  --gold: #d59a2f;
  --plum: #7f4f71;
  --shadow: 0 18px 50px rgba(20, 24, 31, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(86, 119, 200, 0.16), transparent 38%),
    linear-gradient(225deg, rgba(101, 185, 157, 0.2), transparent 35%),
    var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 22px;
}

.cover {
  position: relative;
  display: grid;
  min-height: clamp(430px, 62vh, 680px);
  overflow: hidden;
  border-radius: 8px;
  background: var(--ink);
  box-shadow: var(--shadow);
  isolation: isolate;
}

.cover img,
.cover-shade {
  position: absolute;
  inset: 0;
}

.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
}

.cover-shade {
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(17, 19, 24, 0.1), rgba(17, 19, 24, 0.72)),
    linear-gradient(90deg, rgba(17, 19, 24, 0.72), transparent 62%);
}

.cover-copy {
  position: relative;
  z-index: 2;
  align-self: end;
  max-width: 720px;
  padding: clamp(22px, 5vw, 46px);
  color: white;
}

.kicker {
  margin: 0 0 3px;
  color: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  opacity: 0.82;
}

h1 {
  margin: 0;
  font-size: clamp(2.6rem, 8vw, 5.6rem);
  line-height: 0.9;
}

.tagline {
  max-width: 430px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 760;
}

.sync-pill {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  min-width: 108px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255, 253, 248, 0.88);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 430px) minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.log-panel,
.stats-panel,
.history-panel,
.calendar-panel,
.roadmap-panel {
  border: 1px solid rgba(17, 19, 24, 0.12);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: var(--shadow);
}

.log-panel,
.stats-panel,
.history-panel,
.calendar-panel,
.roadmap-panel {
  padding: 18px;
}

.history-panel,
.calendar-panel,
.roadmap-panel {
  margin-top: 18px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 0.96rem;
  font-weight: 800;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.field > span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
  background: #eef0f2;
}

.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented label {
  display: grid;
  place-items: center;
  min-width: 0;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.segmented input:checked + label {
  background: var(--ink);
  color: white;
}

input[type="datetime-local"],
input[type="file"],
input[type="text"],
input:not([type]) {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
}

input[type="file"] {
  display: grid;
  align-content: center;
  padding: 10px;
}

.photo-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 4px 0 14px;
}

.photo-field {
  display: grid;
  gap: 8px;
}

.photo-field > span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.photo-field img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  background: #fff;
}

.primary-button,
.ghost-button,
.icon-button,
.filter,
.timeline-actions button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 850;
}

.primary-button {
  width: 100%;
  min-height: 50px;
  margin-top: 4px;
  background: var(--coral);
  color: white;
  box-shadow: 0 12px 24px rgba(233, 109, 91, 0.28);
}

.ghost-button,
.icon-button,
.filter,
.timeline-actions button {
  min-height: 34px;
  padding: 0 12px;
  background: rgba(17, 19, 24, 0.07);
  color: var(--ink);
}

.icon-button {
  width: 38px;
  padding: 0;
  font-size: 1.25rem;
}

.game-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 96px;
  margin-bottom: 12px;
  border: 1px solid rgba(17, 19, 24, 0.12);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(127, 79, 113, 0.16), transparent 54%),
    white;
}

.game-summary span,
.game-summary small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.game-summary strong {
  display: block;
  margin-top: 5px;
  font-size: clamp(1.25rem, 3vw, 1.9rem);
}

.game-summary b {
  border-radius: 999px;
  padding: 9px 12px;
  background: var(--ink);
  color: white;
  font-size: 0.86rem;
  white-space: nowrap;
}

.game-summary small {
  grid-column: 1 / -1;
  text-transform: none;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stat {
  min-height: 148px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: white;
}

.stat[data-person="Uri"] {
  border-color: rgba(213, 154, 47, 0.5);
}

.stat[data-person="Shahar"] {
  border-color: rgba(86, 119, 200, 0.48);
}

.stat b {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.stat strong {
  display: block;
  margin-top: 14px;
  font-size: 2.2rem;
  line-height: 1;
}

.stat span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.stat em {
  display: inline-block;
  margin-top: 12px;
  border-radius: 999px;
  padding: 6px 9px;
  background: rgba(101, 185, 157, 0.18);
  color: #326f5c;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 850;
}

.calendar-title {
  align-items: center;
}

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

.calendar-controls strong {
  min-width: 168px;
  text-align: center;
}

.calendar-legend,
.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-dot,
.calendar-marks i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.legend-dot.shahar,
.calendar-marks i.shahar {
  background: var(--blue);
}

.legend-dot.uri,
.calendar-marks i.uri {
  background: var(--gold);
}

.legend-dot.both {
  background: linear-gradient(90deg, var(--blue) 0 50%, var(--gold) 50%);
}

.calendar-weekdays {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-align: center;
  text-transform: uppercase;
}

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

.calendar-day {
  position: relative;
  display: grid;
  align-content: space-between;
  min-height: 104px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: white;
  color: var(--ink);
  text-align: left;
}

.calendar-day.blank {
  border-style: dashed;
  background: rgba(255, 255, 255, 0.38);
}

.calendar-day.today {
  box-shadow: inset 0 0 0 2px var(--ink);
}

.calendar-day.has-shahar {
  background: linear-gradient(135deg, rgba(86, 119, 200, 0.28), white 58%);
}

.calendar-day.has-uri {
  background: linear-gradient(135deg, rgba(213, 154, 47, 0.3), white 58%);
}

.calendar-day.has-shahar.has-uri {
  background: linear-gradient(135deg, rgba(86, 119, 200, 0.28), rgba(213, 154, 47, 0.34) 58%, white);
}

.calendar-day > span {
  font-weight: 900;
}

.calendar-day small {
  min-height: 30px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.25;
}

.calendar-marks {
  display: flex;
  gap: 4px;
  min-height: 12px;
  margin: 8px 0;
}

.calendar-day[data-count="0"] .calendar-marks {
  opacity: 0;
}

.release-pill {
  border-radius: 999px;
  padding: 8px 11px;
  background: rgba(101, 185, 157, 0.2);
  color: #326f5c;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.roadmap-item {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 18px;
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: white;
}

.roadmap-item.featured {
  border-color: rgba(233, 109, 91, 0.38);
  background:
    linear-gradient(135deg, rgba(233, 109, 91, 0.12), transparent 58%),
    white;
}

.roadmap-item strong {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.roadmap-item h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.12;
}

.roadmap-item p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.filters {
  display: flex;
  gap: 6px;
}

.filter.active {
  background: var(--blue);
  color: white;
}

.timeline {
  display: grid;
  gap: 10px;
}

.empty {
  border: 1px dashed rgba(17, 19, 24, 0.22);
  border-radius: 8px;
  padding: 22px;
  color: var(--muted);
  text-align: center;
}

.timeline-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: white;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--blue);
}

.timeline-item[data-person="Uri"] .timeline-dot {
  background: var(--gold);
}

.timeline-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.timeline-head span {
  color: var(--muted);
  font-size: 0.86rem;
  white-space: nowrap;
}

.timeline-main p {
  margin: 6px 0 10px;
  color: var(--muted);
}

.timeline-photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 180px));
  gap: 10px;
  margin: 8px 0 10px;
}

.timeline-photos:empty {
  display: none;
}

.timeline-photos figure {
  position: relative;
  margin: 0;
}

.timeline-photos img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  background: #fff;
}

.timeline-photos figcaption {
  position: absolute;
  left: 7px;
  bottom: 7px;
  border-radius: 999px;
  padding: 4px 7px;
  background: rgba(17, 19, 24, 0.74);
  color: white;
  font-size: 0.72rem;
  font-weight: 850;
}

.timeline-actions {
  display: flex;
  gap: 8px;
}

@media (max-width: 780px) {
  .shell {
    padding: 16px;
  }

  .cover {
    min-height: 520px;
  }

  .sync-pill {
    top: 12px;
    right: 12px;
    min-width: 92px;
  }

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

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

  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .calendar-title {
    align-items: stretch;
  }

  .calendar-controls {
    width: 100%;
    justify-content: space-between;
  }

  .calendar-grid {
    gap: 5px;
  }

  .calendar-day {
    min-height: 78px;
    padding: 7px;
  }

  .calendar-day small {
    display: none;
  }

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

  .filters {
    width: 100%;
  }

  .filter {
    flex: 1;
  }
}

@media (max-width: 480px) {
  .cover {
    min-height: 470px;
  }

  .cover-copy {
    padding: 20px;
  }

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

  .photo-fields,
  .timeline-photos {
    grid-template-columns: 1fr;
  }

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

  .game-summary b {
    justify-self: start;
  }

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

  .roadmap-item {
    min-height: 0;
  }

  .timeline-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .timeline-head span {
    white-space: normal;
  }
}
