/* Crawl setup controls, timeline row states, lunch theme, stop sheet */

.crawl-hero {
  margin-bottom: 1.5rem;
}


.crawl-count-picker {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 2rem;
  margin-bottom: 1.5rem;
}

.crawl-count-label {
  display: block;
  color: rgba(var(--c), 0.5);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.6rem;
}

.pill-group {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  background: rgba(var(--c), 0.04);
  border-radius: 0.5rem;
  padding: 0.3rem;
}

.pill {
  background: transparent;
  color: rgba(var(--c), 0.5);
  border: none;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: 0.35rem;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.pill:hover {
  color: rgba(var(--c), 0.8);
  background: rgba(var(--c), 0.06);
}

.pill.active {
  background: #ffb800; /* gold selected */
  color: #0d0d0d;
}

.crawl-view-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.5rem;
}

/* ============================================================
   Anpassad-panelen — det här ÄR ett options/settings-gränssnitt,
   och det är okej: det ska inte apa efter hemskärmens honeycomb.
   Samma enda guldaccent som resten av appen (knappar, länkar,
   h1) — ingen regnbåge, ingen dekoration för dekorationens skull.
   Luft och tydlig hierarki istället för hårfina admin-avdelare.
   ============================================================ */

.crawl-advanced-options {
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

.opt-group {
  background: rgba(var(--c), 0.03);
  border-radius: 0.9rem;
  overflow: hidden;
}

.opt-group-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.35rem;
  letter-spacing: 0.03em;
  color: rgba(var(--a), 0.95);
  padding: 0.85rem 1.1rem 0.55rem;
}

.opt-group-badge {
  font-size: 1rem;
  filter: grayscale(0.1);
}

/* Rader i en riktig grupperad lista — hårfina avdelare, ingen kort-i-kort-röra */
.opt-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  padding: 0.9rem 1.1rem;
  background: none;
  border: none;
  border-top: 1px solid rgba(var(--c), 0.07);
  border-radius: 0;
  font-family: inherit;
  text-align: left;
  color: inherit;
}

.opt-group-title + .opt-row,
.opt-group-title + .opt-expand,
.opt-group-title + div {
  border-top: none;
}

.opt-row-label {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: rgba(var(--c), 0.95);
  letter-spacing: 0.01em;
}

.opt-row-hint {
  display: block;
  font-size: 0.82rem;
  line-height: 1.45;
  color: rgba(var(--c), 0.5);
  margin-top: 0.2rem;
}

.opt-hint-line {
  margin: 0;
}

/* Stacked row: label on top, full-width control below (segmented controls, chip grids) */
.opt-row-stack .opt-row-label {
  margin-bottom: 0.65rem;
}

.opt-row-stack .seg,
.opt-row-stack .bar-chip-grid,
.opt-row-stack .opt-select {
  margin-bottom: 0.15rem;
}

/* Compact native dropdown — for a single pick out of a long bar list (no point
   filling the screen with 20 chips when a select does it in one line). */
.opt-select {
  display: block;
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.6rem 0.9rem;
  background: rgba(var(--c), 0.05);
  border: 1px solid rgba(var(--c), 0.14);
  border-radius: 0.5rem;
  color: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.opt-select:focus {
  border-color: rgba(var(--a), 0.5);
}

.opt-select option {
  background: #0d0d0d;
  color: #fff;
}

.opt-row-stack .opt-row-hint {
  margin-top: 0.55rem;
}

/* Tap-row: whole row is a button (switch or expand-chevron), label+hint left, control right */
.opt-row-switch,
.opt-row-expand {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  transition: background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
  .opt-row-switch:hover,
  .opt-row-expand:hover {
    background: rgba(var(--c), 0.04);
  }
}

.opt-row-switch:active,
.opt-row-expand:active {
  background: rgba(var(--c), 0.06);
}

.opt-row-main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.opt-row-nested {
  border-top: none;
  padding: 0.35rem 0 0;
}

/* Generic switch (used for Ja/Nej + av/på choices) */
.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 2.7rem;
  height: 1.55rem;
  background: rgba(var(--c), 0.16);
  border-radius: 999px;
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.switch-thumb {
  position: absolute;
  top: 0.18rem;
  left: 0.18rem;
  width: 1.19rem;
  height: 1.19rem;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.opt-row-switch.on .switch {
  background: #ffb800;
}

.opt-row-switch.on .switch-thumb {
  transform: translateX(1.15rem);
}

.opt-chevron {
  opacity: 0.4;
  font-size: 0.85rem;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.opt-row-expand.open .opt-chevron,
.opt-row-expand[aria-expanded="true"] .opt-chevron {
  transform: rotate(180deg);
}

.opt-row-expand .opt-row-hint {
  font-weight: 600;
  color: rgba(239, 68, 68, 0.8);
}

/* Smooth expand/collapse for conditional sub-sections (no display:none pop) */
.opt-expand {
  height: 0;
  opacity: 0;
  overflow: hidden;
  transition: height 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.22s ease;
  border-top: 1px solid rgba(var(--c), 0.07);
}

.opt-expand[data-expanded="1"] {
  opacity: 1;
}

.opt-expand-inner {
  padding: 0.9rem 1.1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.opt-subrow {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.opt-subrow-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.opt-link-btn {
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(var(--a), 0.85);
  background: rgba(var(--a), 0.1);
  border: 1px solid rgba(var(--a), 0.35);
  border-radius: 1rem;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, transform 0.15s ease;
}

@media (hover: hover) {
  .opt-link-btn:hover {
    background: rgba(var(--a), 0.2);
  }
}

.opt-link-btn:active {
  background: rgba(var(--a), 0.25);
  transform: scale(0.95);
}

/* Segmented control — pill group with a sliding flat-gold indicator (JS positions .seg-thumb) */
.seg {
  position: relative;
  display: flex;
  width: 100%;
  background: rgba(var(--c), 0.06);
  border-radius: 0.6rem;
  padding: 0.25rem;
}

.seg-thumb {
  position: absolute;
  top: 0.25rem;
  left: 0.25rem;
  height: calc(100% - 0.5rem);
  background: #ffb800;
  border-radius: 0.45rem;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
}

.seg-btn {
  position: relative;
  z-index: 1;
  flex: 1;
  background: transparent;
  border: none;
  color: rgba(var(--c), 0.55);
  padding: 0.55rem 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: 0.45rem;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.15s ease;
  text-align: center;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.seg-btn.active {
  color: #0d0d0d;
}

.seg-btn:active {
  transform: scale(0.95);
}

@media (hover: hover) {
  .seg-btn:not(.active):hover {
    color: rgba(var(--c), 0.85);
  }
}

/* Chip-input for participant names (Dryck-gruppen) */
.chip-input {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.chip-input-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(var(--a), 0.14);
  border: 1px solid rgba(var(--a), 0.4);
  border-radius: 999px;
  padding: 0.3rem 0.3rem 0.3rem 0.75rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(var(--a), 0.95);
  animation: fadeIn 0.15s ease;
}

.chip-tag-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  background: rgba(var(--c), 0.12);
  border: none;
  color: rgba(var(--c), 0.7);
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.chip-tag-remove:active {
  transform: scale(0.88);
}

@media (hover: hover) {
  .chip-tag-remove:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
  }
}

.chip-input-row {
  display: flex;
  gap: 0.5rem;
}

.chip-input-field {
  flex: 1;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.55rem 0.9rem;
  background: rgba(var(--c), 0.05);
  border: 1px solid rgba(var(--c), 0.14);
  border-radius: 0.5rem;
  color: #fff;
  min-width: 0;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}

.chip-input-field:focus {
  border-color: rgba(var(--a), 0.5);
}

.chip-input-field::placeholder {
  color: rgba(var(--c), 0.35);
}

.chip-input-add {
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  background: rgba(var(--a), 0.14);
  border: 1px solid rgba(var(--a), 0.4);
  color: #ffb800;
  border-radius: 0.5rem;
  width: 2.6rem;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.chip-input-add:active {
  transform: scale(0.92);
}

@media (hover: hover) {
  .chip-input-add:hover {
    background: rgba(var(--a), 0.24);
  }
}

.btn-crawl-start {
  font-size: 1rem;
  padding: 0.85rem 2rem;
  margin-bottom: 0.5rem;
}

.crawl-route {
  margin-top: 2rem;
  text-align: left;
}

.crawl-list {
  list-style: none;
  counter-reset: crawl;
  padding: 0;
}

.crawl-row {
  counter-increment: crawl;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  margin-bottom: 0.5rem;
  background: rgba(var(--c), 0.03);
  border: 1px solid rgba(var(--c), 0.1);
  border-radius: 0.5rem;
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.2s ease;
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  -webkit-tap-highlight-color: transparent;
}

.crawl-row:last-child {
  margin-bottom: 0;
}

/* Next stop: stronger gold border only (no fill color) */
.crawl-row.current {
  border-color: rgba(var(--a), 0.7);
  box-shadow: 0 0 0 1px rgba(var(--a), 0.35);
}

.crawl-row.current::before {
  transform: scale(1.08);
}

.crawl-row::before {
  content: counter(crawl);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  background: #ffb800; /* stop number badge */
  color: #0d0d0d;
  font-weight: 700;
  border-radius: 50%;
  font-size: 0.9rem;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.crawl-bar-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.crawl-bar {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.crawl-drink {
  font-size: 0.9rem;
  color: rgba(var(--a), 0.7);
  font-weight: 500;
}

.crawl-challenge {
  font-size: 0.85rem;
  color: rgba(var(--a), 0.6);
  font-style: italic;
}

.crawl-row-extra {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.2rem 1rem;
  align-items: baseline;
}

.crawl-extra-name {
  color: rgba(var(--c), 0.6);
}

.crawl-extra-drink {
  color: rgba(var(--a), 0.85);
}

.crawl-extra-challenge {
  color: rgba(var(--a), 0.75);
  font-style: italic;
}

.crawl-map {
  color: rgba(var(--a), 0.7);
  font-size: 0.85rem;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 0.3rem 0.6rem;
  border-radius: 0.3rem;
  transition: all 0.15s ease;
}

.crawl-map:hover {
  color: #ffb800;
  background: rgba(var(--a), 0.1);
}

/* Visited / all items done — green */
.crawl-row.done {
  opacity: 0.45;
  border-color: rgba(34, 197, 94, 0.25);
  background: rgba(34, 197, 94, 0.04);
}

.crawl-row.done::before {
  background: #22c55e;
  color: #fff;
  content: '\2713'; /* checkmark */
  font-size: 0.85rem;
}

.crawl-row.done .crawl-bar,
.crawl-row.done .crawl-drink,
.crawl-row.done .crawl-challenge,
.crawl-row.done .crawl-extra-name,
.crawl-row.done .crawl-extra-drink,
.crawl-row.done .crawl-extra-challenge {
  color: rgba(var(--c), 0.45);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(var(--c), 0.6);
}

/* Bar closed — muted; a replacement stop is appended to the route */
.crawl-row.closed {
  opacity: 0.38;
  border-color: rgba(var(--c), 0.07);
  background: transparent;
  cursor: pointer;
}

.crawl-row.closed::before {
  background: rgba(var(--c), 0.12);
  color: rgba(var(--c), 0.45);
  content: '\2014'; /* em dash */
  font-size: 0.85rem;
}

.crawl-row.closed .crawl-bar {
  color: rgba(var(--c), 0.45);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(var(--c), 0.25);
}

.crawl-closed-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(var(--c), 0.28);
  background: rgba(var(--c), 0.06);
  border-radius: 0.25rem;
  padding: 0.1rem 0.4rem;
}

/* Överraskning: stop not reached yet — hidden until the previous one is checked off */
.crawl-row.locked {
  cursor: default;
  opacity: 0.55;
  background: rgba(var(--c), 0.02);
  border-style: dashed;
}

.crawl-row.locked::before {
  background: rgba(var(--c), 0.1);
  color: rgba(var(--c), 0.4);
  content: '?';
  font-size: 0.95rem;
}

.crawl-bar-locked {
  color: rgba(var(--c), 0.45);
  font-weight: 600;
  letter-spacing: 0.15em;
}

/* Brief glow when a closed-bar replacement is inserted */
@keyframes replacementGlow {
  0%   { box-shadow: 0 0 0 2px rgba(var(--a), 0.6); }
  100% { box-shadow: none; }
}

.crawl-row.crawl-row-replacement {
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both,
             replacementGlow 2.5s ease-out 0.35s both;
}

/* All drink/challenge items skipped — red */
.crawl-row.failed {
  opacity: 0.55;
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.06);
}

.crawl-row.failed::before {
  background: #ef4444;
  color: #fff;
  content: '\2715'; /* × */
  font-size: 0.85rem;
}

.crawl-row.failed .crawl-bar,
.crawl-row.failed .crawl-drink,
.crawl-row.failed .crawl-challenge,
.crawl-row.failed .crawl-extra-name,
.crawl-row.failed .crawl-extra-drink,
.crawl-row.failed .crawl-extra-challenge {
  color: rgba(var(--c), 0.4);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(239, 68, 68, 0.5);
}

/* "Stjärt ohoj!" banner when every stop is finished */
.crawl-progress {
  text-align: center;
  min-height: 0;
  margin-bottom: 0;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2rem, 8vw, 2.8rem);
  letter-spacing: 0.04em;
  color: #ffb800;
  line-height: 1.1;
}

.crawl-progress:empty {
  display: none;
}

.crawl-progress.all-done {
  margin-bottom: 1.25rem;
  animation: stjartOhoj 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  text-shadow: 0 0 28px rgba(var(--a), 0.55);
}

@keyframes stjartOhoj {
  0% {
    opacity: 0;
    transform: scale(0.55) translateY(12px);
    text-shadow: 0 0 0 rgba(var(--a), 0);
  }
  60% {
    opacity: 1;
    transform: scale(1.08) translateY(0);
    text-shadow: 0 0 40px rgba(var(--a), 0.75);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    text-shadow: 0 0 28px rgba(var(--a), 0.55);
  }
}

.crawl-sync-status {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(var(--c), 0.25);
  letter-spacing: 0.03em;
  transition: color 0.3s;
}

.crawl-sync-status.sync-active {
  color: rgba(34, 197, 94, 0.85); /* live sync on */
  animation: syncPulse 2s ease-in-out infinite;
}

.crawl-sync-status.sync-error {
  color: rgba(239, 68, 68, 0.8);
}

@keyframes syncPulse {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

.crawl-footer {
  text-align: center;
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.crawl-footer-link,
.crawl-reset {
  color: rgba(var(--c), 0.45);
  font-size: 0.85rem;
  font-family: inherit;
  font-weight: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.crawl-reset:hover,
.crawl-footer-link:hover {
  color: rgba(var(--a), 0.7);
  text-decoration: underline;
}

.crawl-reset:hover {
  color: rgba(239, 68, 68, 0.7);
}

.crawl-error {
  color: rgba(239, 68, 68, 0.8);
  font-style: italic;
  text-align: center;
  padding: 1rem;
}

.crawl-notice {
  color: rgba(var(--a), 0.85);
  font-size: 0.85rem;
  font-style: italic;
  text-align: center;
  padding: 0 0 0.75rem;
}

.crawl-distance {
  color: rgba(var(--c), 0.55);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  padding: 0 0 0.75rem;
}


/* Lunch view: swap gold accents for Material green (#8BC34A) */
body.lunch-active::before {
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(139, 195, 74, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(104, 159, 56, 0.08) 0%, transparent 40%);
}

body.lunch-active h1 {
  color: #8BC34A;
  text-shadow: 0 0 40px rgba(139, 195, 74, 0.3);
}

#view-lunch .result.result-lunch {
  background: linear-gradient(180deg, rgba(139, 195, 74, 0.08) 0%, rgba(139, 195, 74, 0.02) 100%);
  border-color: rgba(139, 195, 74, 0.3);
}

#view-lunch .btn {
  background: linear-gradient(180deg, #8BC34A 0%, #689F38 100%);
  box-shadow: 0 4px 0 #558B2F, 0 6px 20px rgba(0, 0, 0, 0.3);
}

#view-lunch .btn:hover {
  background: linear-gradient(180deg, #9CCC65 0%, #8BC34A 100%);
  box-shadow: 0 8px 0 #558B2F, 0 12px 30px rgba(139, 195, 74, 0.4);
}

#view-lunch .btn:active {
  box-shadow: 0 2px 0 #558B2F, 0 4px 15px rgba(0, 0, 0, 0.3);
}

#view-lunch .result-line .highlight {
  color: #8BC34A;
  text-shadow: 0 0 20px rgba(139, 195, 74, 0.4);
}

#view-lunch .map-link a {
  color: #8BC34A;
}

.map-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.map-link-or {
  opacity: 0.45;
  font-size: 0.8rem;
  text-transform: lowercase;
}

body.lunch-active .confetti span {
  background: #8BC34A;
}

body.lunch-active .confetti span:nth-child(odd) {
  background: #689F38;
}

body.lunch-active .confetti span:nth-child(3n) {
  background: #fff;
}

/* Mixed done/skipped on one stop — yellow */
.crawl-row.partial {
  border-color: rgba(234, 179, 8, 0.6);
  background: rgba(234, 179, 8, 0.12);
}

.crawl-row.partial::before {
  background: rgba(234, 179, 8, 0.9);
  color: #0d0d0d;
  content: '!';
  font-size: 0.85rem;
  font-weight: 900;
}

.item-skipped {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  opacity: 0.45;
}

/* Mid-crawl participants accordion */
.crawl-participants-accordion {
  margin-bottom: 1rem;
  border: 1px solid rgba(var(--c), 0.08);
  border-radius: 0.5rem;
  overflow: hidden;
}

.crawl-participants-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(var(--c), 0.03);
  border: none;
  color: rgba(var(--c), 0.65);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s;
}

.crawl-participants-header:hover {
  background: rgba(var(--c), 0.06);
}

.crawl-participants-chevron {
  font-size: 0.65rem;
  opacity: 0.4;
}

.crawl-participants-body {
  border-top: 1px solid rgba(var(--c), 0.06);
}

.crawl-active-participants-list {
  display: flex;
  flex-direction: column;
}

.crawl-participant-tag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(var(--c), 0.05);
  color: rgba(var(--c), 0.8);
  font-size: 0.9rem;
}

.crawl-participant-tag-remove {
  background: transparent;
  border: none;
  color: rgba(var(--c), 0.3);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s;
}

.crawl-participant-tag-remove:hover {
  color: rgba(239, 68, 68, 0.8);
}

.crawl-add-participant-form {
  display: flex;
  gap: 0.4rem;
  padding: 0.75rem 1rem 0;
}

.crawl-add-participant-form input {
  flex: 1;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.4rem 0.75rem;
  background: rgba(var(--c), 0.04);
  border: 1px solid rgba(var(--a), 0.25);
  border-radius: 0.35rem;
  color: #fff;
  min-width: 0;
}

.crawl-add-participant-form input::placeholder {
  color: rgba(var(--c), 0.3);
}

.crawl-add-participant-form button {
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  background: rgba(var(--a), 0.15);
  border: 1px solid rgba(var(--a), 0.3);
  color: #ffb800;
  border-radius: 0.35rem;
  padding: 0.4rem 0.85rem;
  cursor: pointer;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.crawl-add-participant-form button:hover {
  background: rgba(var(--a), 0.25);
}

.crawl-add-participant-btn {
  display: block;
  width: 100%;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  background: transparent;
  border: none;
  color: rgba(var(--a), 0.5);
  padding: 0.75rem 1rem;
  cursor: pointer;
  text-align: left;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.crawl-add-participant-btn:hover {
  color: rgba(var(--a), 0.85);
}

/* Bottom sheet for editing one stop’s drinks/challenges */
.crawl-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.crawl-sheet-overlay.open {
  opacity: 1;
}

.crawl-sheet {
  background: #1c1c1c;
  border: 1px solid rgba(var(--a), 0.15);
  border-bottom: none;
  border-radius: 1rem 1rem 0 0;
  width: 100%;
  max-width: 560px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.crawl-sheet-overlay.open .crawl-sheet {
  transform: translateY(0);
}

.crawl-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.25rem 0.85rem;
  border-bottom: 1px solid rgba(var(--c), 0.07);
  flex-shrink: 0;
}

.crawl-sheet-bar {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  color: #ffb800;
  letter-spacing: 0.04em;
}

.crawl-sheet-bar a {
  color: inherit;
  text-decoration: none;
}

.crawl-sheet-bar a:hover {
  text-decoration: underline;
}

.crawl-sheet-close {
  background: transparent;
  border: none;
  color: rgba(var(--c), 0.45);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s;
}

.crawl-sheet-close:hover {
  color: rgba(var(--c), 0.7);
}

.crawl-sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.crawl-sheet-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: rgba(var(--c), 0.04);
  border: 1px solid rgba(var(--c), 0.08);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.crawl-sheet-item:active {
  transform: scale(0.98);
}

.crawl-sheet-item.skipped {
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.2);
  opacity: 0.6;
}

.crawl-sheet-item.skipped .crawl-sheet-name,
.crawl-sheet-item.skipped .crawl-sheet-drink,
.crawl-sheet-item.skipped .crawl-sheet-challenge {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.crawl-sheet-name {
  font-weight: 600;
  color: rgba(var(--c), 0.9);
  min-width: 4.5rem;
}

.crawl-sheet-drink {
  color: rgba(var(--a), 0.8);
  flex: 1;
}

.crawl-sheet-challenge {
  font-style: italic;
  color: rgba(var(--a), 0.6);
  flex: 1;
}

.crawl-sheet-state {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
}

.crawl-sheet-state.state-done {
  background: rgba(74, 222, 128, 0.12);
  color: #4ade80; /* green ✓ */
  border: 1px solid rgba(74, 222, 128, 0.25);
}

.crawl-sheet-state.state-skip {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171; /* red ✕ */
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.crawl-sheet-footer {
  padding: 1rem 1.25rem max(1.75rem, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(var(--c), 0.07);
  flex-shrink: 0;
}

.crawl-sheet-allt-klart {
  width: 100%;
  font-size: 1.1rem;
  padding: 1rem;
  display: block;
  text-align: center;
}

.crawl-sheet-undo-footer {
  display: block;
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.85rem 1rem;
  margin-top: 0.75rem;
  margin-bottom: 0.85rem;
  background: rgba(var(--c), 0.06);
  border: 1px solid rgba(var(--a), 0.35);
  border-radius: 0.5rem;
  color: rgba(var(--a), 0.9);
  cursor: pointer;
  text-align: center;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, border-color 0.15s;
}

.crawl-sheet-undo-footer:hover {
  background: rgba(var(--a), 0.1);
  border-color: rgba(var(--a), 0.55);
}

.crawl-sheet-undo-footer:active {
  transform: scale(0.98);
}

.crawl-sheet-closed-btn {
  display: block;
  text-align: center;
  margin-top: 0.85rem;
  color: rgba(var(--c), 0.28);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s;
  padding: 0.25rem;
  -webkit-tap-highlight-color: transparent;
}

.crawl-sheet-closed-btn:hover {
  color: rgba(239, 68, 68, 0.65);
}

.crawl-sheet-closed-msg {
  font-size: 0.9rem;
  color: rgba(var(--c), 0.45);
  font-style: italic;
  text-align: center;
  padding: 0.5rem 0 0.25rem;
}
