:root {
  color-scheme: dark;
  --ink: #f2f2f6;
  --muted: #b0a8c5;
  --surface: #1a1625;
  --surface-soft: #241f33;
  --accent: #a774ff;
  --accent-strong: #8b5ae8;
  --ring: rgba(167, 116, 255, 0.3);
  --shadow: 0 18px 50px rgba(6, 4, 12, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Avenir Next", "Gill Sans", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 15% 10%, rgba(167, 116, 255, 0.2) 0%, transparent 45%),
    radial-gradient(circle at 85% 0%, rgba(66, 42, 110, 0.45) 0%, transparent 40%),
    linear-gradient(160deg, #0c0a14 0%, #151125 40%, #1d1630 100%);
  min-height: 100vh;
}

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 20px 60px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero {
  background: var(--surface);
  border-radius: 24px;
  padding: 28px 24px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -28px;
  top: -34px;
  width: 140px;
  height: 140px;
  background: url("target.svg") center / contain no-repeat;
  opacity: 0.9;
  filter: drop-shadow(0 10px 16px rgba(9, 5, 20, 0.6));
}

.summary {
  display: grid;
  gap: 6px;
  background: var(--surface);
  border-radius: 20px;
  padding: 20px 22px;
  box-shadow: var(--shadow);
}

.summary--hero {
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.summary--hero .summary__value {
  font-size: 2.8rem;
}

.summary__label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.summary__value {
  font-size: 2.4rem;
  font-weight: 700;
}

.summary__range {
  font-size: 0.9rem;
  color: var(--muted);
}

.card {
  background: var(--surface);
  border-radius: 20px;
  padding: 20px 22px 24px;
  box-shadow: var(--shadow);
}

.session-card {
  padding: 20px 22px;
}

.card h2 {
  font-size: 1.1rem;
  margin: 0 0 14px;
}

form {
  display: grid;
  gap: 14px;
}

.session-form__row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 12px;
}

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

.save-button[data-shot-type="practice"] {
  background: linear-gradient(135deg, #4c8bff, #2f6bff);
}

.save-button[data-shot-type="practice"]:hover {
  box-shadow: 0 10px 18px rgba(79, 126, 255, 0.35);
}

input {
  border-radius: 12px;
  border: 1px solid #342a4d;
  padding: 12px 14px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--surface-soft);
  color: var(--ink);
}

input::placeholder {
  color: #8f84aa;
}

input:focus {
  outline: 3px solid var(--ring);
  border-color: var(--accent);
}

button {
  border: none;
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  box-shadow: 0 10px 18px rgba(167, 116, 255, 0.35);
}

button.is-success {
  background: #2f9e66;
  box-shadow: 0 10px 18px rgba(47, 158, 102, 0.3);
}


.sessions__section {
  display: grid;
  gap: 12px;
}

.sessions__section + .sessions__section {
  margin-top: 18px;
}

.sessions__title {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}


.sessions {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.sessions__empty {
  color: var(--muted);
  background: #1e182c;
  border: 1px dashed #3a2a55;
  padding: 12px 14px;
  border-radius: 14px;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
  z-index: 50;
}

.modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 6, 14, 0.7);
  backdrop-filter: blur(4px);
}

.modal__panel {
  position: relative;
  width: min(92vw, 360px);
  background: #1a1625;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 24px 50px rgba(6, 4, 12, 0.55);
  border: 1px solid #35264f;
}

.modal__title {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.modal__text {
  margin: 0 0 16px;
  color: var(--muted);
}

.modal__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.modal__button {
  border: none;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.modal__button--ghost {
  background: #2a223c;
  color: var(--ink);
}

.modal__button--primary {
  background: linear-gradient(135deg, #a774ff, #8b5ae8);
  color: #fff;
}

.mood-grid {
  display: grid;
  gap: 14px;
  margin: 16px 0;
}

.mood-row {
  display: grid;
  gap: 8px;
}

.mood-row__label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.mood-row__options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mood-option {
  border: 1px solid #3a2a55;
  background: #221b33;
  color: var(--ink);
  border-radius: 12px;
  padding: 8px 0;
  cursor: pointer;
}

.mood-icon {
  display: inline-flex;
  width: 26px;
  height: 26px;
}

.mood-icon svg {
  width: 100%;
  height: 100%;
}

.mood-option.is-selected {
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12);
}

.mood-option.is-selected[data-value="good"] {
  background: linear-gradient(135deg, rgba(246, 199, 68, 0.65), rgba(246, 199, 68, 0.28));
  border-color: rgba(246, 199, 68, 0.75);
  box-shadow: 0 0 0 2px rgba(246, 199, 68, 0.3);
}

.mood-option.is-selected[data-value="neutral"] {
  background: linear-gradient(135deg, rgba(239, 85, 70, 0.55), rgba(239, 85, 70, 0.2));
  border-color: rgba(239, 85, 70, 0.7);
  box-shadow: 0 0 0 2px rgba(239, 85, 70, 0.28);
}

.mood-option.is-selected[data-value="bad"] {
  background: linear-gradient(135deg, rgba(79, 125, 255, 0.55), rgba(79, 125, 255, 0.2));
  border-color: rgba(79, 125, 255, 0.7);
  box-shadow: 0 0 0 2px rgba(79, 125, 255, 0.28);
}

.sessions li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(
    90deg,
    rgba(167, 116, 255, 0.32) 0 var(--bar-arrows, 0%),
    rgba(79, 126, 255, 0.32) var(--bar-arrows, 0%) var(--bar-total, 0%),
    #211a33 var(--bar-total, 0%) 100%
  );
  border: 1px solid #3a2a55;
  position: relative;
  overflow: hidden;
  touch-action: pan-y;
}

.session-row {
  display: grid;
  grid-template-columns: 1fr 52px;
  gap: 10px;
  align-items: stretch;
}

.session-mood {
  width: 52px;
  height: 100%;
  border-radius: 14px;
  border: 1px solid #35264f;
  background: #1c1728;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  overflow: hidden;
}

.session-mood__cell {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
}

.session-mood__cell.mood--good {
  background: #f6c744;
  color: #1a1625;
}

.session-mood__cell.mood--neutral {
  background: #ef5546;
}

.session-mood__cell.mood--bad {
  background: #4f7dff;
}

.session-mood__cell.mood--none {
  background: #1f1a2c;
  color: #8f84aa;
}

.sessions li > * {
  position: relative;
  z-index: 1;
}

.session__content {
  display: flex;
  align-items: center;
  width: 100%;
  flex: 1;
  gap: 12px;
  transform: translateX(var(--swipe-offset, 0px));
  transition: transform 160ms ease;
}

.session__date {
  font-weight: 600;
}

.session__arrows {
  display: flex;
  margin-left: auto;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.02em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.pill--arrows {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

.pill--practice {
  background: linear-gradient(135deg, #4c8bff, #2f6bff);
}

.pill--combo {
  display: inline-flex;
  border-radius: 999px;
  overflow: hidden;
}

.pill__segment {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
}

.pill__segment:first-child {
  border-top-left-radius: 999px;
  border-bottom-left-radius: 999px;
}

.pill__segment:last-child {
  border-top-right-radius: 999px;
  border-bottom-right-radius: 999px;
}

.pill__segment--arrows {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

.pill__segment--practice {
  background: linear-gradient(135deg, #4c8bff, #2f6bff);
}


@media (min-width: 680px) {
  .page {
    padding: 40px 28px 80px;
  }

  .summary {
    grid-template-columns: auto 1fr;
    align-items: baseline;
    column-gap: 18px;
  }

  .summary__range {
    grid-column: span 2;
  }
}
