: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 58%, #1d1630 100%);
  min-height: 100vh;
}

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

.hero {
  background: var(--surface);
  border-radius: 0;
  padding: 32px 24px 74px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  clip-path: inset(0);
}

.hero::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 38px;
  height: 38px;
  background: radial-gradient(circle at bottom left, transparent 0 37px, #0c0a14 38px);
  z-index: 2;
  pointer-events: none;
}

.page > :not(.hero) {
  margin-inline: 20px;
}

.hero__nav-stack {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 24px;
  display: flex;
  justify-content: center;
  gap: 10px;
  z-index: 3;
}

.hero__nav {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #3a2a55;
  background: rgba(43, 36, 60, 0.85);
  color: #d9d1eb;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: none; font-variant-caps: all-small-caps;
  box-shadow: none;
}

.hero__nav.is-active {
  border-color: rgba(167, 116, 255, 0.7);
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
}

.hero__target {
  position: absolute;
  right: -24px;
  top: -28px;
  width: 118px;
  height: 118px;
  border: none;
  background: url("target.svg") center / contain no-repeat;
  opacity: 0.9;
  filter: drop-shadow(0 10px 16px rgba(9, 5, 20, 0.6));
  pointer-events: none;
  z-index: 1;
}


.hero__nav:hover {
  box-shadow: none;
}

.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;
  grid-template-columns: auto auto;
  align-items: center;
  column-gap: 8px;
  justify-content: start;
}

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

.summary__lastweek {
  grid-column: 1 / span 2;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: none; font-variant-caps: all-small-caps;
  color: var(--muted);
  white-space: nowrap;
}

#last-week-value {
  display: inline-block;
  padding-right: 5px;
  font-weight: 700;
  color: var(--ink);
}

.summary__average {
  grid-column: 1 / span 2;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: none; font-variant-caps: all-small-caps;
  color: #8f84aa;
  white-space: nowrap;
}

#average-week-value,
#max-week-value {
  display: inline-block;
  padding-right: 5px;
  font-weight: 700;
  color: var(--ink);
}

.summary__label {
  font-size: 0.9rem;
  text-transform: none; font-variant-caps: all-small-caps;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.summary__label--side {
  text-align: left;
  line-height: 1.1;
  justify-self: start;
}

.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 {
  position: relative;
  z-index: 3;
  padding: 20px 22px;
}

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

.is-hidden {
  display: none;
}

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

.session-form {
  position: relative;
}

.date-display {
  width: 100%;
  border: none;
  border-radius: 0;
  padding: 0 0 2px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

#session-date {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 30px;
  opacity: 0;
  pointer-events: auto;
  z-index: 2;
  cursor: pointer;
}

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

.save-button[data-shot-type="practice"]:hover {
  box-shadow: none;
}

.save-button[data-shot-type="scored"] {
  background: linear-gradient(135deg, #f7d24b, #e6b82f);
  color: #1a1625;
}

.save-button[data-shot-type="scored"]:hover {
  box-shadow: none;
}

.save-button--primary-save {
  background: #2b243c;
  border: 1px solid #3a2a55;
  color: var(--ink);
  line-height: 1;
  padding-top: 10px;
  padding-bottom: 14px;
}

.save-button--primary-save:hover {
  box-shadow: none;
}

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;
}


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: none;
}

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: none; font-variant-caps: all-small-caps;
  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;
}

.session-row--archived {
  display: none;
}

.session-row--revealing {
  animation: archive-row-reveal 320ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: var(--archive-reveal-delay, 0ms);
  transform-origin: top center;
}

.session-archive-reveal {
  display: flex;
  justify-content: center;
}

.session-archive-reveal__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  min-height: 0;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid #3a2a55;
  background: #211a33;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.18em;
  box-shadow: none;
}

.session-archive-reveal__button span {
  transform: translate(2px, -0.28em);
}

.session-archive-reveal__button:hover {
  box-shadow: none;
}

@keyframes archive-row-reveal {
  from {
    opacity: 0;
    transform: translateY(-10px) scaleY(0.94);
  }

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

.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__text:empty {
  display: none;
}

.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: none; font-variant-caps: all-small-caps;
  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);
}

.counts-form {
  display: grid;
  gap: 12px;
}

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

.counts-form__field {
  display: grid;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--muted);
}

.counts-form__field--indoor,
.counts-form__field--outdoor,
.counts-form__field--score,
.counts-form__field--event {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: none; font-variant-caps: all-small-caps;
}

.counts-form__field--indoor {
  color: var(--accent);
}

.counts-form__field--outdoor {
  color: #4c8bff;
}

.counts-form__field--score {
  color: #f7d24b;
}

.counts-form__field--event {
  color: #5ed38f;
}

.editable-combobox {
  position: relative;
  color: var(--ink);
}

.editable-combobox input {
  width: 100%;
  padding-right: 46px;
}

.editable-combobox__toggle {
  position: absolute;
  inset: 1px 1px auto auto;
  width: 42px;
  height: calc(100% - 2px);
  padding: 0;
  border-radius: 0 11px 11px 0;
  background: transparent;
  color: #b9aecf;
  box-shadow: none;
}

.editable-combobox__toggle:hover {
  box-shadow: none;
}

.editable-combobox__toggle span {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.editable-combobox.is-open .editable-combobox__toggle span {
  transform: translateY(3px) rotate(225deg);
}

.editable-combobox__options {
  display: none;
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 180px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #47355f;
  border-radius: 12px;
  background: #211a30;
  box-shadow: 0 14px 28px rgba(10, 7, 17, 0.35);
}

.editable-combobox.is-open .editable-combobox__options {
  display: grid;
  gap: 3px;
}

.editable-combobox__option {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-size: 0.95rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  box-shadow: none;
}

.editable-combobox__option:hover {
  background: #34274a;
  box-shadow: none;
  outline: none;
}

.counts-form__split input {
  width: 100%;
  min-width: 0;
}

.entry-score-section {
  display: grid;
  gap: 12px;
  max-height: 0;
  margin-block: -12px -22px;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-8px);
  transition: max-height 260ms ease, margin 220ms ease, opacity 180ms ease, transform 220ms ease;
}

.session-form.is-score-active .entry-score-section {
  /* Let saved-type suggestions extend below the expanded scoring fields. */
  overflow: visible;
  position: relative;
  z-index: 1;
  max-height: 310px;
  margin-block: 0;
  opacity: 1;
  transform: translateY(0);
}

.entry-actions {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.session-form:not(.is-score-active) .entry-actions {
  margin-top: -8px;
}

.session-form.is-score-active .entry-actions {
  margin-top: 6px;
}

.score-toggle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #2b243c;
  border: 1px solid #3a2a55;
  color: #fff;
  font-size: 1.05rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}

.score-toggle:hover,
.score-toggle.is-active,
.score-toggle.is-active:hover {
  box-shadow: none;
}

.score-toggle.is-active {
  background: linear-gradient(135deg, #5ed38f, #2ca969);
  border-color: rgba(94, 211, 143, 0.8);
}

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


.journal-textarea {
  min-height: 260px;
}

.equipment-card {
  display: grid;
  gap: 14px;
}

.equipment-form {
  display: grid;
  gap: 12px;
}

.equipment-form__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px;
}

.equipment-form__row--split {
  grid-template-columns: minmax(0, 1fr) 170px;
  column-gap: 30px;
}

.equipment-form__row--equal {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 14px;
}

.equipment-form__row--single {
  grid-template-columns: 1fr;
}

.equipment-form__title {
  margin: 6px 0 2px;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: none; font-variant-caps: all-small-caps;
  color: #a99dc2;
}

.equipment-form__subtitle {
  margin: 6px 0 0;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: none; font-variant-caps: all-small-caps;
  color: #9084aa;
}

.equipment-field {
  display: grid;
  gap: 7px;
}

.equipment-field__label {
  font-size: 0.76rem;
  letter-spacing: 0.07em;
  text-transform: none; font-variant-caps: all-small-caps;
  color: #9f94ba;
  white-space: nowrap;
}

.equipment-field__control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.equipment-field__unit {
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: none; font-variant-caps: all-small-caps;
  color: #9f94ba;
  white-space: nowrap;
}

.equipment-field--narrow input {
  max-width: 118px;
}

.equipment-field--narrow {
  justify-self: end;
}

.equipment-field--narrow .equipment-field__label {
  text-align: right;
}

.equipment-field--narrow .equipment-field__control {
  justify-content: flex-end;
}

.equipment-form input[type="number"] {
  width: 80px;
  min-width: 80px;
  text-align: center;
}

.equipment-form input[type="text"] {
  width: 230px;
  max-width: 100%;
}

.equipment-form__row--equal input[type="text"] {
  width: 100%;
}

.sight-page {
  display: grid;
  gap: 14px;
}

.sight-list {
  display: grid;
  gap: 12px;
}

.sight-card {
  padding-block: 22px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 16px;
  row-gap: 8px;
}

.sight-row--placeholder { opacity: 0.6; }
.sight-card__reading { display: grid; gap: 8px; min-width: 0; }
.sight-card__mark { text-align: right; font-size: 1.15rem; overflow-wrap: anywhere; }
.sight-card__mark strong { font-weight: 700; }
.sight-card__date { text-align: right; font-size: 0.9rem; color: var(--muted); }
.sight-card__mark--message { font-size: 1rem; }
#sight-edit-modal .modal__actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#sight-edit-modal .counts-form__split input { width: 100%; min-width: 0; }
#sight-edit-error { color: #ffaaa3; margin: 0; }
#sight-edit-error:empty { display: none; }
.modal__button--danger { background: #bd302d; color: #fff; }
#sight-edit-modal button:disabled { opacity: 0.45; cursor: default; }

.sight-list .sight-card {
  cursor: pointer;
}


.sight-row {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
}

.sight-row__swipe-content {
  position: relative;
  z-index: 2;
  transform: translateX(var(--sight-swipe-x, 0px));
  transition: transform 180ms ease;
  background: #151125;
}

.sight-row--swipeable.is-dragging .sight-row__swipe-content {
  transition: none;
}

.sight-delete-btn {
  position: absolute;
  top: 0;
  right: 0;
  width: 78px;
  height: 100%;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, #f04b3a, #cd3a2c);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.sight-row--swipeable.is-open .sight-delete-btn,
.sight-row--swipeable.is-dragging .sight-delete-btn {
  opacity: 1;
  pointer-events: auto;
}

.sight-card__title {
  margin: 0;
  font-size: 2rem;
  line-height: 1;
}

.sight-card__unit {
  font-size: 0.9rem;
  color: var(--muted);
  text-transform: none; font-variant-caps: all-small-caps;
  letter-spacing: 0.08em;
}

.sight-card__details {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  text-align: right;
  color: #d7cfee;
}

.sight-card__reverse {
  color: #f7d24b;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: none; font-variant-caps: all-small-caps;
}

.sight-card__normal {
  color: #47d18c;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: none; font-variant-caps: all-small-caps;
}

.sight-field {
  display: grid;
  gap: 7px;
}

.sight-field__label {
  font-size: 0.76rem;
  letter-spacing: 0.07em;
  text-transform: none; font-variant-caps: all-small-caps;
  color: #9f94ba;
  white-space: nowrap;
}

.sight-field__control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sight-field__unit {
  color: #9f94ba;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: none; font-variant-caps: all-small-caps;
}

.sight-field--distance input,
.sight-field input[type="number"] {
  width: 96px;
  text-align: center;
}

.sight-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #d7cfee;
  font-size: 0.95rem;
}

.sight-check input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

.sight-add-button {
  margin-top: 4px;
}

.is-hidden {
  display: none;
}

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

.sessions li.has-event {
  gap: 6px;
  padding-bottom: 4px;
}

.session-row {
  position: relative;
}

.session-row__swipe-content {
  display: block;
}

.session-row li {
  cursor: pointer;
}

.session-row--swipeable {
  overflow: hidden;
  border-radius: 14px;
}

.session-row--swipeable .session-row__swipe-content {
  position: relative;
  z-index: 2;
  transform: translateX(var(--history-swipe-x, 0px));
  transition: transform 180ms ease;
  background: #151125;
}

.session-row--swipeable.is-dragging .session-row__swipe-content {
  transition: none;
}

.session-delete-btn {
  position: absolute;
  top: 0;
  right: 0;
  width: 78px;
  height: 100%;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #f04b3a, #cd3a2c);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.session-row--swipeable.is-open .session-delete-btn,
.session-row--swipeable.is-dragging .session-delete-btn {
  opacity: 1;
  pointer-events: auto;
}

.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;
  cursor: pointer;
}

.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__date-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.session__date-block {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.session__date-sub {
  margin-top: 2px;
  font-size: 0.56rem;
  letter-spacing: 0.08em;
  text-transform: none; font-variant-caps: all-small-caps;
  color: #a99dc2;
}

.session__event {
  justify-self: start;
  max-width: 100%;
  padding: 1px 0 5px;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: 1.1;
  text-align: left;
  text-transform: none; font-variant-caps: all-small-caps;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.session__event-name {
  color: #5ed38f;
}

.session__metadata-separator {
  margin-inline: 0.55em;
  color: #9388aa;
}

.session__type {
  color: #c5bdd3;
}

.session-journal-btn {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  padding: 0;
  border: 1px solid rgba(216, 208, 234, 0.28);
  border-radius: 8px;
  background: rgba(43, 36, 60, 0.72);
  color: rgba(216, 208, 234, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.session-journal-btn.has-entry {
  border-color: #f2f2f6;
  background: #05040a;
  color: #f2f2f6;
}

.session-journal-btn svg {
  width: 18px;
  height: 18px;
}

.session-journal-btn:hover {
  box-shadow: none;
}

.session-pb-badge {
  position: absolute;
  right: -6.5px;
  bottom: -9.5px;
  z-index: 2;
  width: 22px;
  height: 22px;
  filter: drop-shadow(1px 1.5px 1px rgba(6, 4, 12, 0.78));
  pointer-events: none;
}

.session-pb-badge svg {
  display: block;
  width: 100%;
  height: 100%;
}

.pb-star-main {
  stroke: rgba(255, 240, 145, 0.95);
  stroke-width: 0.8;
}

.pb-star-main--classic {
  fill: url("#pb-star-bright");
}

.pb-star-main--metallic {
  fill: url("#pb-star-metal");
}

.pb-star-hotspot {
  fill: url("#pb-star-hotspot");
  mix-blend-mode: screen;
}

.pb-star-facet--top {
  fill: rgba(255, 249, 185, 0.86);
}

.pb-star-facet--right {
  fill: rgba(245, 176, 47, 0.82);
}

.pb-star-facet--lower-right {
  fill: rgba(154, 88, 11, 0.62);
}

.pb-star-facet--lower-left {
  fill: rgba(230, 151, 24, 0.78);
}

.pb-star-facet--left {
  fill: rgba(255, 220, 83, 0.82);
}

.pb-star-metal-facet--top {
  fill: rgba(255, 247, 177, 0.76);
}

.pb-star-metal-facet--right {
  fill: rgba(180, 98, 8, 0.5);
}

.pb-star-metal-facet--lower-right {
  fill: rgba(88, 45, 3, 0.36);
}

.pb-star-metal-facet--lower-left {
  fill: rgba(243, 170, 40, 0.46);
}

.pb-star-metal-facet--left {
  fill: rgba(255, 222, 86, 0.62);
}

.pb-star-shine {
  fill: none;
  stroke: rgba(255, 255, 255, 0.78);
  stroke-width: 1.05;
  stroke-linecap: round;
}

.session__arrows {
  display: flex;
  position: relative;
  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--outdoor,
.pill--practice {
  background: linear-gradient(135deg, #4c8bff, #2f6bff);
}

.pill--score {
  background: linear-gradient(135deg, #f7d24b, #e6b82f);
  color: #1a1625;
}

.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--outdoor,
.pill__segment--practice {
  background: linear-gradient(135deg, #4c8bff, #2f6bff);
}

.pill__segment--score {
  background: linear-gradient(135deg, #f7d24b, #e6b82f);
  color: #1a1625;
}

.score-pill[role="button"] {
  cursor: pointer;
  user-select: none;
  overflow: hidden;
}


.score-pill__value {
  display: inline-block;
  transform: translateY(0);
}

.score-pill.swap-forward .score-pill__value.is-leaving {
  animation: score-leave-up 90ms ease-in forwards;
}

.score-pill.swap-forward .score-pill__value.is-entering {
  animation: score-enter-from-below 90ms ease-out forwards;
}

.score-pill.swap-back .score-pill__value.is-leaving {
  animation: score-leave-down 90ms ease-in forwards;
}

.score-pill.swap-back .score-pill__value.is-entering {
  animation: score-enter-from-above 90ms ease-out forwards;
}

@keyframes score-leave-up {
  to {
    opacity: 0;
    transform: translateY(-140%);
  }
}

@keyframes score-enter-from-below {
  from {
    opacity: 0;
    transform: translateY(140%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes score-leave-down {
  to {
    opacity: 0;
    transform: translateY(140%);
  }
}

@keyframes score-enter-from-above {
  from {
    opacity: 0;
    transform: translateY(-140%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


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

  .page > :not(.hero) {
    margin-inline: 28px;
  }

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

  .summary--hero {
    grid-template-columns: auto auto;
    align-items: center;
    justify-content: start;
    column-gap: 8px;
  }

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

/* Single selected round in the day editor. */
.single-round-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.single-round-fields .counts-form__field:nth-child(n+3) { grid-column: 1 / -1; }
.single-round-fields input { width: 100%; min-width: 0; box-sizing: border-box; }
#counts-modal .modal__panel { max-height: 85dvh; overflow-y: auto; }
#round-error { color: #ffaaaa; margin: 0; }

.session-row[data-read-only="true"] li { cursor: default; }

.session__best-date { text-transform: none; letter-spacing: normal; }
#sessions-bests .session__date { overflow-wrap: anywhere; }

/* Editing labels share the compact mobile typography. Focus feedback stays intact. */
.modal .counts-form__field, .modal .sight-field__label, .modal .sight-check {
  font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: none; font-variant-caps: all-small-caps;
}
.modal .counts-form__field:not([class*="counts-form__field--"]), .modal .sight-field__label, .modal .sight-check { color: var(--ink); }

/* Smallcaps belong to labels and display text, not editable field values. */
input, select, textarea, option { font-variant-caps: normal; }

/* This mobile-only interface intentionally has no focus-state visual highlights. */
:focus, :focus-visible { outline: none !important; }

.account-control { position: relative; align-self: stretch; }
.account-trigger { max-width: 100%; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu { position: absolute; top: 100%; left: 0; z-index: 30; min-width: 150px; padding: 6px; border: 1px solid rgba(255,255,255,.16); border-radius: 12px; background: #291c3c; box-shadow: 0 10px 30px #0006; }
.account-menu button { display: block; width: 100%; text-align: left; white-space: nowrap; }
.account-fields { display: grid; gap: 16px; }
.account-dialog { width: min(340px, calc(100vw - 32px)); }
.account-dialog input { width: 100%; box-sizing: border-box; }
.account-links { display: flex; flex-wrap: wrap; justify-content: center; margin-top: 12px; }
.account-codes { user-select: all; overflow-x: auto; font-size: 11px; line-height: 1.8; }

.account-locked { visibility: hidden; }

.sharing-content { display: grid; gap: 16px; }
.sharing-content section { border-top: 1px solid rgba(255,255,255,.16); padding-top: 10px; }
.sharing-content h3 { margin: 0 0 8px; font-size: 1rem; }
.sharing-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-block: 8px; }
.sharing-row p { width: 100%; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.sharing-code-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 6px; }
.sharing-code-row .modal__button { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 44px; padding: 0 8px; }
.sharing-code-row .sharing-rotate { width: 44px; padding: 0; }
.sharing-code-row svg { width: 18px; height: 18px; flex: none; }
.sharing-code { font: 700 clamp(10px, 3.3vw, 14px)/1.2 ui-monospace, monospace; text-align: center; white-space: nowrap; user-select: text; }
.sharing-code--long { font-size: 11px; white-space: normal; overflow-wrap: anywhere; }
.sharing-code-row .sharing-copy--done { background: #22633e; border-color: #67a981; color: #fff; }
.view-as-label { padding: 5px 10px; font-size: .85rem; font-weight: 400; color: var(--muted); }
.account-menu [aria-label="View as"] button { padding-inline-start: 20px; }
.account-menu { max-width: calc(100vw - 24px); max-height: 65vh; overflow: auto; }
.account-menu button { white-space: normal; overflow-wrap: anywhere; }
