@import url("https://fonts.googleapis.com/css2?family=Asap+Condensed:wght@700&display=swap");

@property --rally-long-press-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.rally-public-page {
  --rally-background: #f1f3ea;
  --rally-surface: #fff;
  --rally-dark: #101010;
  --rally-text-soft: #303030;
  --rally-muted: #5f6368;
  --rally-primary: #edf000;
  --rally-primary-soft: rgba(237, 240, 0, 0.18);
  --rally-focus: rgba(237, 240, 0, 0.72);
  --rally-shadow: rgba(0, 0, 0, 0.10);
  --rally-dialog-shadow: rgba(0, 0, 0, 0.35);
  --rally-backdrop: rgba(0, 0, 0, 0.62);
  --rally-bar-bg: #d9dccf;
  --rally-task-bg: #f3f3f3;
  --rally-success: #22a06b;
  --rally-success-bg: #e9f7f0;
  --rally-success-text: #126342;
  --rally-warning: #f0c400;
  --rally-danger: #e1392d;
  --rally-danger-bg: #ffe8e6;
  --rally-public-gutter: 16px;
  --rally-public-safe-gutter-left: calc(var(--rally-public-gutter) + env(safe-area-inset-left));
  --rally-public-safe-gutter-right: calc(var(--rally-public-gutter) + env(safe-area-inset-right));

  min-height: 100vh;
  margin: 0;
  background: var(--rally-background);
  color: var(--rally-dark);
  font-family: Arial, sans-serif;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
}

.rally-public-page * {
  box-sizing: border-box;
}

.rally-navigation-original {
  min-height: 100dvh;
  background: var(--rally-background);
}

.rally-navigation-layer {
  position: fixed;
  inset: 0;
  right: auto;
  width: 100vw;
  z-index: 20;
  overflow: hidden;
  pointer-events: none;
}

.rally-navigation-page {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--rally-background);
  pointer-events: auto;
}

.rally-navigation-page[inert] {
  pointer-events: none;
}

.rally-navigation-viewport {
  overflow-x: clip;
  scrollbar-gutter: stable;
}

.rally-navigation-framed {
  overflow: hidden;
}

.rally-public-page button,
.rally-public-page input,
.rally-public-page textarea {
  font: inherit;
}

.rally-public-page input::placeholder,
.rally-public-page textarea::placeholder {
  color: var(--rally-muted);
  font-weight: 400;
  opacity: 1;
}

.rally-gallery-link-panel {
  padding-block: 16px;
  text-align: right;
}

.rally-gallery-link-panel a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--rally-dark);
  text-decoration: none;
}

.rally-gallery-link-panel a::after {
  content: "";
  flex: 0 0 0.8em;
  width: 0.8em;
  height: 0.8em;
  background: currentColor;
  clip-path: polygon(65% 10%, 75% 20%, 45% 50%, 75% 80%, 65% 90%, 25% 50%);
  transform: rotate(180deg);
}

.rally-gallery-link-panel a:hover {
  text-decoration: underline;
}

.rally-public-header,
[data-rally-run],
.rally-run-intro,
.rally-score-panel,
.rally-name-panel {
  touch-action: pan-y pinch-zoom;
}

.rally-public-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  gap: 8px;
  padding: 16px var(--rally-public-safe-gutter-right) 16px var(--rally-public-safe-gutter-left);
  background: var(--rally-dark);
  color: var(--rally-surface);
}

.rally-public-header-main,
.rally-public-header-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.rally-public-header h1 {
  margin: 0;
}

.rally-public-header h1 {
  font-size: clamp(1.25rem, 6vw, 2.2rem);
  font-family: "Asap Condensed", Arial, sans-serif;
  font-weight: 700;
  line-height: 1;
}

.rally-public-header h1 a {
  color: inherit;
  text-decoration: none;
}

.rally-public-run-period {
  display: block;
  color: var(--rally-bar-bg);
  font-size: 0.9rem;
  line-height: 1.15;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: pre;
}

.rally-public-run-period[hidden] {
  display: none;
}

.rally-public-header-actions {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  white-space: nowrap;
}

.rally-public-header-meta.has-no-period .rally-public-header-actions {
  grid-column: 1 / -1;
}

.rally-public-header-meta.has-no-period .rally-account-summary-link {
  max-width: none;
}

.rally-qr-thumb {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 4px;
  border: 0;
  border-radius: 6px;
  background: var(--rally-surface);
  cursor: pointer;
}

.rally-qr-members {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 64px;
  padding: 2px 0;
  border-radius: 4px;
  background: var(--rally-primary);
  color: var(--rally-dark);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  transform: translate(-50%, -50%) rotate(-45deg);
  pointer-events: none;
}

.rally-qr-thumb img {
  width: 100%;
  height: 100%;
  display: block;
}

.rally-account-summary-link,
.rally-personal-task-link {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: var(--rally-bar-bg);
  text-decoration: none;
}

.rally-account-summary-link {
  gap: 7px;
  max-width: min(44vw, 280px);
}

.rally-personal-task-link {
  flex: 0 0 auto;
}

.rally-account-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  font-size: 0.85rem;
  text-decoration: none;
}

.rally-personal-task-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--rally-primary);
  color: var(--rally-dark);
  font-size: 0.85rem;
  line-height: 1;
}

.rally-personal-task-count strong {
  font: inherit;
}

.rally-account-provider-icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.rally-account-provider-icon-mask {
  background: currentColor;
  -webkit-mask: var(--rally-identity-icon-url) center / contain no-repeat;
  mask: var(--rally-identity-icon-url) center / contain no-repeat;
}

.rally-account-identity-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rally-account-summary-link:hover,
.rally-account-summary-link:focus-visible,
.rally-personal-task-link:hover,
.rally-personal-task-link:focus-visible {
  color: var(--rally-primary);
  text-decoration: underline;
}

.rally-secondary-button,
.rally-public-actions button,
.rally-registration-form button,
.rally-public-reset-list button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: var(--rally-primary);
  color: var(--rally-dark);
  padding: 0 18px;
  cursor: pointer;
  text-decoration: none;
}

.rally-secondary-button {
  background: var(--rally-surface);
}

.rally-button-price {
  flex: 0 0 auto;
  margin-inline-start: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--rally-bar-bg);
  color: var(--rally-dark);
  white-space: nowrap;
}

.rally-public-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  width: min(780px, 100%);
  margin: 0 auto;
  padding: 0 var(--rally-public-gutter) var(--rally-public-gutter);
}

.rally-unframed {
  padding-inline: 0;
}

.rally-name-panel,
.rally-score-panel {
  border-radius: 8px;
  background: var(--rally-surface);
  box-shadow: 0 14px 34px var(--rally-shadow);
}

.rally-public-activity {
  background: var(--rally-surface);
  box-shadow: 0 14px 34px var(--rally-shadow);
}

.rally-name-panel {
  padding: 8px var(--rally-public-gutter);
  border-radius: 0;
}

.rally-name-panel label {
  display: grid;
}

.rally-name-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.rally-name-row > label {
  flex: 1;
  min-width: 0;
}

.rally-companions-toggle {
  min-width: 46px;
  height: 46px;
  padding: 0 8px;
  border: 2px solid var(--rally-dark);
  border-radius: 8px;
  background: var(--rally-surface);
  color: var(--rally-dark);
  font-size: 1.5rem;
  cursor: pointer;
}

.rally-companions-toggle span {
  font-weight: 700;
}

.rally-companions-total:not([hidden]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  font-size: 1.5rem;
  text-align: center;
}

.rally-companions-form:not([hidden]),
.rally-activity-quantities:not([hidden]) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 148px));
}

.rally-companions-form:not([hidden]) {
  column-gap: 8px;
  align-items: end;
  justify-content: space-evenly;
  padding-top: 10px;
}

.rally-registration-form:not([hidden]) {
  display: flex;
  justify-content: center;
  padding-top: 10px;
}

.rally-registration-form button {
  width: min(100%, 520px);
}

.rally-checkout-bottom:not([hidden]) {
  padding-block: 8px;
}

.rally-checkout:not(:has(> :not([hidden]))) {
  display: none;
}

.rally-donation:not([hidden]) {
  display: flow-root;
  padding-block: 12px 4px;
  overflow-wrap: anywhere;
}

.rally-donation-control {
  float: right;
  padding-top: var(--rally-donation-control-offset, 0px);
  padding-left: 16px;
  shape-outside: inset(max(0px, calc(var(--rally-donation-control-offset, 0px) - 8px)) 0 0);
}

.rally-donation > .rally-label {
  display: block;
  padding-top: var(--rally-donation-label-offset, 0px);
}

.rally-donation-amount.rally-companion-stepper {
  grid-template-columns: 44px 4rem 44px;
  align-items: center;
}

.rally-donation-value {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  white-space: nowrap;
}

.rally-donation-value input[type="number"] {
  width: 1ch;
  padding: 0;
}

.rally-companion-field:not([hidden]) {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.rally-companion-stepper {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  overflow: hidden;
  border: 2px solid var(--rally-dark);
  border-radius: 8px;
  background: var(--rally-surface);
}

.rally-companion-stepper:focus-within {
  outline: 4px solid var(--rally-focus);
  outline-offset: 2px;
}

.rally-companion-stepper button {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: var(--rally-task-bg);
  color: var(--rally-dark);
  font-size: 1.4rem;
  font-weight: 400;
  cursor: pointer;
}

.rally-companion-stepper button:disabled {
  color: var(--rally-muted);
  cursor: default;
}

.rally-label {
  color: var(--rally-muted);
  font-size: 0.82rem;
  white-space: pre-line;
}

.rally-companion-field > .rally-label,
.rally-score-panel .rally-label {
  text-transform: uppercase;
}

.rally-companion-field > .rally-label {
  text-align: center;
}

.rally-name-panel input {
  width: 100%;
  min-height: 46px;
  padding: 8px 12px;
  border: 2px solid var(--rally-dark);
  border-radius: 8px;
  background: var(--rally-surface);
  color: var(--rally-dark);
  font-size: 1rem;
  text-align: center;
}

.rally-name-panel input:focus {
  outline: 4px solid var(--rally-focus);
  outline-offset: 2px;
}

.rally-companion-stepper input {
  min-width: 0;
  min-height: 44px;
  padding: 2px;
  border: 0;
  border-radius: 0;
  font-size: 1.15rem;
  width: 100%;
  text-align: center;
  background: var(--rally-surface);
  color: var(--rally-dark);
  appearance: textfield;
}

.rally-companion-stepper input:focus {
  outline: none;
}

.rally-companion-stepper input.is-zero {
  color: var(--rally-muted);
}

.rally-companion-stepper input::-webkit-inner-spin-button,
.rally-companion-stepper input::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.rally-activity-quantities:not([hidden]) {
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
}

.rally-selection-notice {
  margin: 8px 0 0;
  color: var(--rally-muted);
  font-size: 0.85rem;
  text-align: center;
}

:is(.rally-companions-form, .rally-activity-quantities):not([hidden]):has(> .rally-companion-field[hidden]) {
  grid-template-columns: minmax(0, 148px);
  justify-content: center;
}

@media (min-width: 300px) and (max-width: 760px) {
  .rally-companions-form:not([hidden]) {
    justify-content: space-between;
  }
}

@media (max-width: 299px) {
  .rally-companions-form:not([hidden]),
  .rally-activity-quantities:not([hidden]) {
    grid-template-columns: min(148px, 100%);
    justify-content: center;
    row-gap: 16px;
  }
}

.rally-run-intro {
  background: var(--rally-surface);
}

.rally-run-description {
  padding: 6px var(--rally-public-gutter);
  color: var(--rally-dark);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
  white-space: pre-line;
}

.rally-description-images {
  container-type: inline-size;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 var(--rally-public-gutter) 6px;
}

.rally-description-images[hidden] {
  display: none;
}

.rally-description-images[data-rally-run-description-images]:has(.rally-description-image-box:only-child) {
  padding-inline: 0;
}

.rally-description-images[data-rally-run-description-images]:has(+ .rally-run-description[hidden]) {
  padding-bottom: 0;
}

.rally-description-image-box {
  display: flex;
  justify-content: center;
  flex: 0 1 calc(50% - 4px);
  min-width: 0;
}

.rally-description-image-box:last-child:nth-child(odd) {
  margin-inline: auto;
}

.rally-description-image-box:only-child {
  flex-basis: 100%;
}

.rally-description-image-box img {
  display: block;
  max-width: 100%;
  max-height: 60cqw;
  object-fit: contain;
}

.rally-score-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}

.rally-score-panel div {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 14px;
  text-align: center;
}

.rally-score-panel div + div {
  border-left: 1px solid var(--rally-background);
}

.rally-score-panel strong {
  font-size: clamp(2rem, 12vw, 4rem);
  line-height: 0.95;
}

.rally-public-activities {
  display: grid;
  gap: 16px;
}

.rally-public-activity {
  --rally-bulk-width: 128px;
  display: grid;
  position: relative;
  overflow: hidden;
  padding: 0;
  transition: border-color 0.2s ease;
  touch-action: pan-y;
}

.rally-public-activity:focus-visible {
  outline: 4px solid var(--rally-focus);
  outline-offset: 2px;
}

.rally-public-activity-panel {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 14px;
  padding: var(--rally-public-gutter);
  border-radius: inherit;
  background: var(--rally-surface);
  transition: transform 0.18s ease;
}

.rally-public-activity.is-bulk-open .rally-public-activity-top {
  transform: translateX(var(--rally-bulk-width));
}

.rally-public-activity-bulk {
  position: absolute;
  inset: 0 auto auto 0;
  z-index: 3;
  display: grid;
  grid-template-rows: 1fr 1fr;
  width: var(--rally-bulk-width);
  min-height: 72px;
  border-radius: 8px 0 0 0;
  overflow: hidden;
  background: var(--rally-success);
  opacity: 0;
  pointer-events: none;
}

.rally-public-activity.is-bulk-open .rally-public-activity-bulk {
  opacity: 1;
  pointer-events: auto;
}

.rally-public-activity-bulk button {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 100%;
  border: 0;
  border-radius: 0;
  background: var(--rally-success);
  color: var(--rally-surface);
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
}

.rally-public-activity-bulk button + button {
  border-top: 1px solid rgba(255, 255, 255, 0.32);
}

.rally-public-activity-bulk button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.rally-public-activity-body {
  display: grid;
  gap: 14px;
}

.rally-public-activity.is-collapsed .rally-public-activity-tasks {
  display: none;
}

.rally-public-activity.is-hidden-before-start {
  display: none;
}

.rally-public-activity.is-dimmed-before-start time,
.rally-public-activity.is-dimmed-before-start .rally-public-progress,
.rally-public-activity.is-dimmed-before-start .rally-public-people,
.rally-public-activity.is-dimmed-before-start .rally-public-warning,
.rally-public-activity.is-dimmed-before-start .rally-public-actions,
.rally-public-activity.is-dimmed-before-start .rally-public-activity-tasks {
  opacity: 0.45;
}

.rally-public-activity.is-warning {
  border-color: var(--rally-warning);
}

.rally-public-activity.is-danger {
  border-color: var(--rally-danger);
}

.rally-public-activity.is-blinking {
  animation: rally-pulse 0.9s steps(2, end) infinite;
}

.rally-public-activity-top {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 14px;
  border-radius: inherit;
  background: var(--rally-surface);
  transition: transform 0.18s ease;
}

.rally-public-activity-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
}

[data-rally-public-view] .rally-public-activity-head {
  grid-template-columns: minmax(0, 1fr);
}

.rally-public-activity time {
  display: inline-flex;
  margin-bottom: 6px;
  color: var(--rally-muted);
  font-size: 0.9rem;
}

.rally-public-activity h2 {
  margin: 0;
  font-size: clamp(1.35rem, 7vw, 2.4rem);
  line-height: 1.02;
}

.rally-public-activity-description {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  color: var(--rally-muted);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: pre-line;
}

.rally-public-activity-images {
  grid-column: 1 / -1;
  padding: 4px 0 0;
}

.rally-public-progress {
  --rally-progress: 0%;
  display: grid;
  justify-items: end;
  gap: 4px;
  min-width: 96px;
}

.rally-public-progress strong {
  position: relative;
  display: grid;
  place-items: center;
  width: 72px;
  aspect-ratio: 1;
  margin-bottom: 2px;
  border-radius: 999px;
  background: conic-gradient(var(--rally-primary) var(--rally-progress), var(--rally-bar-bg) 0);
  color: var(--rally-dark);
  font-size: 1.05rem;
  line-height: 1;
}

.rally-public-progress strong::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: inherit;
  background: var(--rally-surface);
}

.rally-public-progress strong span {
  position: relative;
  z-index: 1;
}

.rally-public-progress > span {
  color: var(--rally-muted);
  font-size: 1rem;
}

.rally-public-warning {
  margin: 0;
  border-left: 5px solid var(--rally-primary);
  background: var(--rally-primary-soft);
}

.rally-public-quorum-warning:not(details) {
  display: grid;
  padding: 12px 14px;
  text-align: center;
}

.rally-public-warning summary {
  display: grid;
  place-items: center;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  text-align: center;
}

.rally-public-warning summary::-webkit-details-marker {
  display: none;
}

.rally-public-warning-message,
.rally-public-warning-stat {
  grid-area: 1 / 1;
}

.rally-public-warning-stat {
  visibility: hidden;
}

.rally-public-quorum-warning[open] .rally-public-warning-message {
  visibility: hidden;
}

.rally-public-quorum-warning[open] .rally-public-warning-stat {
  visibility: visible;
}

.rally-public-people {
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--rally-background);
  color: var(--rally-muted);
  font-size: 0.8rem;
}

.rally-public-people summary,
.rally-public-task-participants summary {
  display: block;
  max-width: 100%;
  min-width: 0;
  cursor: pointer;
  list-style: none;
}

.rally-public-people summary::-webkit-details-marker,
.rally-public-task-participants summary::-webkit-details-marker {
  display: none;
}

.rally-public-people strong {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rally-public-people strong > span:last-child {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rally-public-people-count {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--rally-primary);
  color: var(--rally-dark);
  font-size: 1rem;
  line-height: 1;
}

.rally-public-people .rally-public-people-full {
  display: none;
}

.rally-public-people[open] .rally-public-people-preview {
  display: none;
}

.rally-public-people[open] .rally-public-people-full {
  display: flex;
  align-items: safe center;
  max-height: calc(5 * 1.45em);
  overflow-y: auto;
  padding-right: 4px;
  text-overflow: clip;
  white-space: normal;
  line-height: 1.45;
}

.rally-public-people[open] .rally-public-people-full > span:last-child {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.rally-public-people.rally-registration-participants {
  width: max-content;
  margin: 10px auto;
}

.rally-public-people.rally-registration-participants[open] {
  width: calc(100% - 2 * var(--rally-public-gutter));
}

[data-rally-people] {
  -webkit-touch-callout: none;
  user-select: none;
}

.portraits-dialog {
  --portraits-text: var(--rally-dark);
  --portraits-backdrop: var(--rally-backdrop);
  --portraits-surface: var(--rally-surface);
  --portraits-background: var(--rally-background);
  --portraits-muted: var(--rally-muted);
}

.rally-gallery-content {
  --rally-gallery-gutter: 8px;
  padding-top: 0;
  touch-action: pan-y;
}

.rally-gallery-comments {
  margin-top: var(--rally-gallery-gutter);
}

.rally-gallery-comments[hidden] {
  display: none;
}

.rally-gallery-comments h2 {
  margin: 0 0 16px;
}

.rally-gallery-comment {
  margin-bottom: 16px;
}

.rally-gallery-comment p {
  margin: 4px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-weight: 400;
}

.rally-gallery-comment-heading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rally-gallery-comment-heading > b {
  min-width: 0;
  overflow-wrap: anywhere;
}

.rally-gallery-comment-heading .rally-comment-stars {
  flex: 0 0 auto;
}

.rally-gallery-comment-heading > form {
  flex: 0 0 auto;
  margin-left: auto;
}

.rally-gallery-comments form {
  display: grid;
  gap: 8px;
}

.rally-gallery-comments textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 8px 52px 8px 8px;
  border: 1px solid var(--rally-bar-bg);
  background: var(--rally-task-bg);
  color: var(--rally-dark);
  resize: none;
  overflow: hidden;
}

.rally-gallery-comments form button {
  justify-self: end;
}

.rally-gallery-comment-field {
  position: relative;
  min-width: 0;
}

.rally-gallery-comment-send {
  position: absolute;
  right: 6px;
  bottom: 6px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--rally-muted);
  cursor: pointer;
}

.rally-gallery-comment-send:hover,
.rally-gallery-comment-send:focus-visible {
  color: var(--rally-dark);
}

.rally-gallery-comment-send:disabled {
  opacity: 0.5;
  cursor: default;
}

.rally-gallery-comment-send span {
  width: 24px;
  height: 24px;
  background: currentColor;
  mask: url("send.svg") center / contain no-repeat;
}

.rally-comment-stars {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--rally-muted);
}

.rally-comment-stars button {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-size: 1.8rem;
  cursor: pointer;
}

[data-rally-gallery-comment] .rally-comment-stars {
  flex: 0 1 auto;
  min-width: 0;
  gap: 0;
}

[data-rally-gallery-comment] .rally-comment-stars button {
  flex: 0 1 36px;
  width: 36px;
  min-width: 0;
}

.rally-comment-stars .is-selected {
  color: #b88600;
}

.rally-gallery-activity {
  scroll-margin-top: var(--rally-gallery-top);
}

.rally-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr));
  gap: var(--rally-gallery-gutter);
}

.rally-gallery-thumbnail {
  min-width: 0;
  padding: 0;
  border: 0;
  background: var(--rally-surface);
  cursor: pointer;
  touch-action: pan-y;
}

.rally-gallery-thumbnail img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

@media (max-width: 760px) {
  .rally-gallery-activity .rally-public-activity-panel {
    padding-inline: var(--rally-gallery-gutter);
  }

  .rally-gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.rally-gallery-dialog {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: var(--rally-gallery-top) 0 0;
  border: 0;
  overflow: hidden;
  background: transparent;
}

.rally-gallery-dialog::backdrop {
  background: transparent;
}

.rally-gallery-view {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  height: 100%;
  padding: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--rally-dark);
  color: var(--rally-surface);
  text-align: center;
}

.rally-gallery-image {
  position: relative;
  min-height: 0;
}

.rally-gallery-image > img {
  display: block;
  width: 100%;
  max-height: calc(100dvh - var(--rally-gallery-top) - 120px);
  object-fit: contain;
}

.rally-gallery-image button {
  position: absolute;
  display: grid;
  place-items: center;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--rally-dark);
  color: var(--rally-surface);
  cursor: pointer;
}

.rally-gallery-image button:disabled {
  visibility: hidden;
}

.rally-gallery-previous { left: 0; }
.rally-gallery-next { right: 0; }

.rally-gallery-view p {
  margin: 0;
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

.rally-gallery-date {
  display: block;
  font-size: 0.8rem;
}

.rally-public-actions {
  display: flex;
  justify-content: center;
  touch-action: manipulation;
}

.rally-public-actions form,
.rally-public-actions button {
  width: min(100%, 520px);
}

.rally-public-actions form {
  max-height: 80px;
  margin: 0;
  overflow: hidden;
  opacity: 1;
  transition: max-height 0.35s ease, opacity 0.25s ease, margin 0.35s ease;
}

.rally-public-actions form.is-hidden-soft,
.rally-public-actions form.is-entering-soft {
  max-height: 0;
  opacity: 0;
  margin: 0;
  pointer-events: none;
}

.rally-public-actions button {
  min-width: 0;
}

.rally-public-actions button:disabled,
.rally-registration-form button:disabled,
.rally-public-task-check:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.rally-public-task-check[aria-busy="true"]:disabled,
.rally-public-actions button[aria-busy="true"]:disabled,
.rally-registration-form button[aria-busy="true"]:disabled {
  opacity: 1;
  cursor: progress;
}

.rally-public-activity-tasks {
  display: grid;
  gap: 10px;
  padding-top: 8px;
  touch-action: pan-y pinch-zoom;
}

.rally-public-activity-tasks form {
  margin: 0;
}

.rally-public-task-separator {
  height: 2px;
  margin: 8px -16px;
  border-radius: 999px;
  background: var(--rally-background);
}

.rally-public-task-separator.has-label {
  display: flex;
  align-items: center;
  gap: 10px;
  height: auto;
  min-height: 22px;
  border-radius: 0;
  background: transparent;
  color: var(--rally-text-soft);
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
}

.rally-public-task-separator.has-label::before,
.rally-public-task-separator.has-label::after {
  content: "";
  flex: 1;
  height: 2px;
  border-radius: 999px;
  background: var(--rally-background);
}

.rally-public-task-separator.has-label span {
  max-width: min(70%, 18rem);
  text-align: center;
  overflow-wrap: anywhere;
}

.rally-public-task {
  --rally-reset-width: 92px;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: var(--rally-task-bg);
  touch-action: pan-y;
}

.rally-public-task-panel {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border: 2px solid var(--rally-bar-bg);
  border-radius: inherit;
  background: var(--rally-surface);
  transition: transform 0.18s ease;
}

.rally-bulk-check {
  display: none;
}

.rally-public-activity.is-bulk-selecting .rally-public-task-panel:has(.rally-bulk-check) {
  grid-template-columns: 42px minmax(0, 1fr);
}

.rally-public-task.has-side-status .rally-public-task-panel {
  grid-template-columns: minmax(0, 1fr) 76px;
}

.rally-public-activity.is-bulk-selecting .rally-public-task.has-side-status .rally-public-task-panel:has(.rally-bulk-check) {
  grid-template-columns: 42px minmax(0, 1fr) 76px;
}

.rally-public-activity.is-bulk-selecting .rally-bulk-check {
  display: grid;
  place-items: center;
  background: transparent;
}

.rally-bulk-check input {
  width: 24px;
  height: 24px;
  margin: 0;
  accent-color: var(--rally-dark);
}

.rally-public-activity.is-bulk-selecting .rally-public-task-detail {
  grid-column: 1 / -1;
}

.rally-public-task.is-reset-open .rally-public-task-panel {
  transform: translateX(var(--rally-reset-width));
}

.rally-public-task.is-expanded.priority-important .rally-public-task-panel {
  border-color: var(--rally-warning);
}

.rally-public-task-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 12px 14px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: var(--rally-dark);
  text-align: left;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.rally-public-task.has-side-status .rally-public-task-card {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.rally-public-task:not(.is-expanded) .rally-public-task-panel:has(.rally-public-task-card.has-description)::after {
  content: "";
  position: absolute;
  bottom: 5px;
  left: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--rally-muted);
  border-bottom: 2px solid var(--rally-muted);
  transform: translateX(-50%) rotate(45deg);
  pointer-events: none;
}

.rally-public-task-toggle,
.rally-public-task-status {
  display: grid;
  place-items: center;
  min-height: 58px;
  padding: 6px;
  background: transparent;
}

.rally-public-task-toggle button {
  cursor: pointer;
}

.rally-public-task-status {
  cursor: default;
}

.rally-public-task-check {
  --rally-task-progress: 0%;
  --rally-long-press-angle: 0deg;
  appearance: none;
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: conic-gradient(var(--rally-primary) var(--rally-task-progress), var(--rally-bar-bg) 0);
  color: transparent;
  font: inherit;
  line-height: 1;
}

.rally-public-task-check::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: inherit;
  background: conic-gradient(var(--rally-success) var(--rally-long-press-angle), transparent 0);
  opacity: 0;
  pointer-events: none;
}

.rally-public-task-check.is-long-pressing::before {
  opacity: 1;
  animation: rally-long-press-fill 400ms linear forwards;
}

.rally-public-task-check::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: inherit;
  background: var(--rally-surface);
  pointer-events: none;
}

@keyframes rally-long-press-fill {
  from {
    --rally-long-press-angle: 0deg;
  }

  to {
    --rally-long-press-angle: 360deg;
  }
}

.rally-public-task-check.is-active {
  color: var(--rally-dark);
}

.rally-public-task-check.is-mine {
  color: var(--rally-surface);
}

.rally-gallery-view [data-rally-photo-delete]:not([hidden]) {
  align-self: end;
  display: grid;
  gap: 8px;
}

.rally-public-task-check.is-mine::after {
  background: var(--rally-success);
}

.rally-public-task-check.is-complete {
  background: conic-gradient(var(--rally-primary) 100%, var(--rally-bar-bg) 0);
  color: var(--rally-surface);
}

.rally-public-task-check.is-complete::after {
  background: var(--rally-success);
}

.rally-public-task-count {
  position: relative;
  z-index: 2;
  font-size: 1.4rem;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
}

.rally-public-task-target {
  position: absolute;
  z-index: 2;
  right: 16px;
  bottom: 17px;
  color: var(--rally-dark);
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1;
  text-align: right;
  pointer-events: none;
}

.rally-public-task-check.is-mine .rally-public-task-target {
  color: var(--rally-surface);
}

.rally-public-task.priority-important .rally-public-task-panel {
  border-color: var(--rally-warning);
  background: #fff7b8;
}

.rally-public-task.priority-normal .rally-public-task-panel {
  background: var(--rally-task-bg);
}

.rally-public-task.is-complete .rally-public-task-panel {
  border-color: var(--rally-success);
  background: #dff3d8;
}

.rally-task-priority {
  display: inline-flex;
  align-items: center;
  min-height: 15px;
  margin-left: 12px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--rally-dark);
  color: var(--rally-surface);
  font-size: 0.56rem;
  text-transform: uppercase;
  vertical-align: middle;
}

.rally-public-task.priority-important .rally-task-priority {
  background: #8a6500;
}

.rally-public-task.priority-bonus .rally-task-priority {
  background: var(--rally-bar-bg);
  color: var(--rally-muted);
}

.rally-public-task-card small {
  color: var(--rally-muted);
  font-size: 0.8rem;
}

small.rally-task-priority {
  color: var(--rally-surface);
  font-size: 0.56rem;
}

.rally-public-task-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  max-height: 0;
  overflow: hidden;
  padding: 0 14px;
  opacity: 0;
  transition: max-height 0.18s ease, padding 0.18s ease, opacity 0.18s ease;
}

.rally-public-activities.is-restoring-state .rally-public-task-detail {
  transition: none;
}

.rally-public-task.is-expanded .rally-public-task-detail {
  grid-column: 1 / -1;
  max-height: 900px;
  padding: 0 14px 10px;
  opacity: 1;
}

.rally-public-task-detail p {
  margin: 0;
  color: var(--rally-text-soft);
  font-size: 1rem;
  font-weight: 700;
  white-space: pre-line;
}

.rally-public-task-detail .rally-public-task-participants {
  width: max-content;
  max-width: 100%;
  min-width: 0;
  margin: 0;
}

.rally-public-task-detail .rally-public-task-participants:first-child {
  margin-top: -6px;
}

.rally-public-task-detail .rally-public-task-participants + p {
  margin-top: 6px;
}

.rally-public-task-detail .rally-public-task-participants summary {
  display: block;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--rally-background);
  color: var(--rally-muted);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rally-public-task-participants[open] summary {
  max-height: calc(5 * 1.3em + 12px);
  overflow-y: auto;
  text-overflow: clip;
  white-space: normal;
}

.rally-public-task-people-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-inline-end: 0.35em;
  vertical-align: -0.1em;
  background: currentColor;
  -webkit-mask: var(--rally-people-icon-url) center / contain no-repeat;
  mask: var(--rally-people-icon-url) center / contain no-repeat;
}

.rally-public-task-detail .rally-public-task-participants .rally-public-task-participant-name {
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
  max-width: none;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  white-space: nowrap;
}

.rally-public-task-detail .rally-public-task-participants .rally-public-task-validator-check {
  display: inline-grid;
  place-items: center;
  width: 1.12em;
  height: 1.12em;
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--rally-success);
  color: var(--rally-surface);
  font-size: 0.82em;
  font-weight: 900;
  line-height: 1;
  vertical-align: 0.08em;
}

.rally-public-task-images {
  container-type: inline-size;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rally-public-task-images img {
  width: auto;
  max-width: calc(50% - 4px);
  max-height: 60cqw;
  border-radius: 8px;
  background: var(--rally-task-bg);
  object-fit: contain;
}

.rally-public-task-images img:last-child:nth-child(odd) {
  margin-inline: auto;
}

.rally-public-task-images img:only-child {
  max-width: 100%;
}

.rally-photo-actions {
  display: flex;
  justify-self: end;
  gap: 8px;
}

.rally-photo-icon-button {
  display: grid;
  place-items: center;
  justify-self: end;
  width: 44px;
  flex-shrink: 0;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.rally-task-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 8px;
  container-type: inline-size;
}

.rally-task-photos figure {
  display: grid;
  align-content: start;
  gap: 6px;
  width: calc(50% - 4px);
  min-width: 0;
  margin: 0;
}

.rally-task-photos figure:last-child:nth-child(odd) {
  margin-inline: auto;
}

.rally-task-photos figure:only-child {
  width: 100%;
}

.rally-task-photos img {
  display: block;
  max-width: 100%;
  max-height: 60cqw;
  margin-inline: auto;
}

.rally-task-photos figcaption {
  display: grid;
  gap: 4px;
  color: var(--rally-muted);
  font-size: 0.8rem;
  font-weight: 400;
  text-align: center;
  overflow-wrap: anywhere;
}

.rally-public-task.is-expanded:has(.rally-task-photos) .rally-public-task-detail {
  max-height: none;
}

.rally-photo-dialog {
  width: min(100% - 32px, 640px);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--rally-bar-bg);
  border-radius: 8px;
  background: var(--rally-surface);
  color: var(--rally-dark);
}

.rally-photo-dialog::backdrop {
  background: var(--rally-dialog-shadow);
}

.rally-photo-dialog form {
  display: grid;
  gap: 12px;
}

.rally-photo-dialog img {
  display: block;
  max-width: 100%;
  max-height: 70dvh;
  margin-inline: auto;
  object-fit: contain;
}

.rally-photo-dialog [data-rally-photo-delete] {
  margin-top: 12px;
}

.rally-photo-dialog [data-rally-photo-upload] button[type=submit] {
  background: var(--rally-primary);
}

.rally-photo-delete-icon {
  width: 24px;
  height: 24px;
  background: var(--rally-danger);
  mask: url("trash.svg") center / contain no-repeat;
}

.rally-photo-dialog button:disabled {
  opacity: 0.5;
  cursor: default;
}

.rally-photo-dialog [hidden] {
  display: none;
}

.rally-public-task-reset {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 1;
  display: grid;
  place-items: center;
  width: var(--rally-reset-width);
  padding: 0;
  border-radius: inherit;
  background: var(--rally-danger);
}

.rally-public-task-reset form {
  height: 100%;
  width: 100%;
}

.rally-public-task-reset button {
  height: 100%;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--rally-surface);
  font-size: 1.6rem;
  line-height: 1;
  text-align: center;
}

.rally-hidden-form {
  display: none;
}

.rally-qr-dialog {
  width: min(92vw, 420px);
  border: 0;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 24px 80px var(--rally-dialog-shadow);
}

.rally-qr-dialog::backdrop {
  background: var(--rally-backdrop);
}

.rally-qr-dialog img {
  width: 100%;
}

@keyframes rally-pulse {
  50% {
    background: var(--rally-danger-bg);
  }
}

@media (max-width: 760px) {
  .rally-public-page {
    font-size: 17px;
  }

  .rally-public-main {
    padding-inline: 0;
    padding-bottom: 0;
  }

  .rally-unframed {
    padding-inline: var(--rally-public-gutter);
  }

  .rally-public-header .rally-secondary-button {
    min-height: 42px;
    padding-inline: 14px;
  }

  .rally-public-reset-list form {
    grid-template-columns: 1fr;
  }
}
