/* Shared locked-game funding panel. One component, every future game. */
.game-funding {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.game-funding h3 {
  margin: 0 0 8px;
}

.game-funding-bar {
  height: 8px;
  margin: 8px 0;
  overflow: hidden;
  border-radius: 99px;
  background: color-mix(in srgb, var(--line) 65%, transparent);
}

.game-funding-bar > span {
  display: block;
  height: 100%;
  background: var(--cta);
}

.game-funding-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
  margin-top: 8px;
}

.game-funding-form input {
  width: 6rem;
  min-height: 36px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: inherit;
  font: inherit;
}

.game-funding-msg {
  margin: 8px 0 0;
}

.game-funding,
.game-funding p,
.game-funding .section-kicker,
.game-funding-amounts,
.game-funding-form,
.game-funding-form label,
.game-funding-form input,
.game-funding-form button {
  max-width: 100%;
  min-width: 0;
}

.game-funding,
.game-funding p,
.game-funding .section-kicker,
.game-funding-amounts,
.game-funding-form label {
  overflow-wrap: anywhere;
}

body.ds-shell .games > .card.is-pending,
body.ds-shell .games > .card.is-pending .actions,
body.ds-shell .games > .card.is-pending .actions .btn {
  min-width: 0;
  max-width: 100%;
}

body.ds-shell .games > .card.is-pending .actions .btn {
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
}

@media (max-width: 390px) {
  .game-funding-form {
    flex-direction: column;
    align-items: stretch;
  }

  .game-funding-form input,
  .game-funding-form button,
  .game-funding-form .btn {
    width: 100%;
    max-width: 100%;
  }

  .game-funding-form input {
    max-width: 8rem;
  }
}

.game-funding { margin-top: 6px; padding-top: 6px; }
.game-funding p { margin: 4px 0; font-size: .875rem; }
.game-funding .section-kicker { display: none; }
body.ds-shell .games > .card.is-pending { gap: 6px; padding: 12px; }
body.ds-shell .games > .card.is-pending .actions { margin-top: 4px; }

/* Pending cards size to content; no empty statistics or clamped blurb spacer. */
body.ds-shell .games > .card.is-pending { min-height:0; align-self:start; gap:4px; }
body.ds-shell .games > .card.is-pending .card-head { margin-bottom:2px; }
body.ds-shell .games > .card.is-pending p[data-i18n$=".blurb"] { display:block; min-height:0; margin:0; overflow:visible; }
body.ds-shell .games > .card.is-pending .catalog-game-stats:empty { display:none; }
body.ds-shell .games > .card.is-pending .actions { margin-top:0; }
.game-funding { margin-top:2px; padding-top:4px; }
.game-funding p { margin:2px 0; line-height:1.3; }
.game-funding-bar { margin:4px 0; }
.game-funding-form { margin-top:4px; gap:4px; }
.game-funding-form input { min-height:44px; box-sizing:border-box; }
.game-funding-form label { display:flex; align-items:center; gap:8px; }

.game-funding-amounts {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}
.game-funding-amounts-text { flex: 1 1 12rem; min-width: 0; }
.game-funding-contributors-btn {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  margin: 0;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--cta, #946526) 55%, var(--line, #c6a05b));
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: color-mix(in srgb, var(--paper-bright, #fff9e8) 92%, var(--cta, #946526) 8%);
  color: var(--cta, #946526);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--ink, #2b2419) 8%, transparent);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.game-funding-contributors-btn:hover {
  background: color-mix(in srgb, var(--cta, #946526) 14%, var(--paper-bright, #fff9e8));
  border-color: var(--cta, #946526);
}
.game-funding-contributors-btn:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--cta, #946526) 45%, transparent);
  outline-offset: 2px;
}
.game-funding-contributors-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
.game-funding-contributors-dialog {
  margin: auto;
  padding: 0;
  border: none;
  max-width: min(400px, calc(100vw - 24px));
  width: 100%;
  background: transparent;
  color: var(--ink, #2b2419);
}
.game-funding-contributors-dialog::backdrop {
  background: color-mix(in srgb, var(--ink, #2b2419) 42%, transparent);
}
.game-funding-contributors-card {
  padding: 16px 16px 14px;
  border-radius: 16px;
  border: 1px solid var(--line, #c6a05b);
  background: var(--paper-bright, #fff9e8);
  box-shadow: 0 10px 28px color-mix(in srgb, var(--ink, #2b2419) 18%, transparent);
  max-height: min(70vh, 480px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.game-funding-contributors-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.game-funding-contributors-header h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
  flex: 1 1 auto;
  min-width: 0;
}
.game-funding-contributors-dismiss {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  min-height: 36px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line, #c6a05b);
  border-radius: 10px;
  background: var(--paper, #fce9b8);
  color: var(--ink, #2b2419);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}
.game-funding-contributors-dismiss:hover {
  border-color: var(--cta, #946526);
  background: color-mix(in srgb, var(--cta, #946526) 12%, var(--paper, #fce9b8));
}
.game-funding-contributors-status {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted, #6a5638);
}
.game-funding-contributors-list {
  list-style: none;
  padding: 0;
  margin: 0;
  overflow: auto;
  flex: 1 1 auto;
  min-height: 0;
}
.game-funding-contributor-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line, #c6a05b) 55%, transparent);
}
.game-funding-contributor-row:last-child {
  border-bottom: 0;
}
.game-funding-contributors-empty {
  padding: 8px 0;
  color: var(--muted, #6a5638);
  font-size: 0.9rem;
}
.game-funding-contributor-profile {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
  text-decoration: none;
  color: inherit;
  border-radius: 10px;
  padding: 2px 4px 2px 2px;
}
.game-funding-contributor-profile.is-link:hover .game-funding-contributor-name {
  color: var(--cta, #946526);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.game-funding-contributor-profile:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--cta, #946526) 45%, transparent);
  outline-offset: 2px;
}
.game-funding-contributor-name {
  font-weight: 600;
  overflow-wrap: anywhere;
  line-height: 1.25;
}
.game-funding-contributor-avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
}
.game-funding-contributor-dig {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.game-funding-contributors-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
  border-top: 1px solid color-mix(in srgb, var(--line, #c6a05b) 45%, transparent);
}
.game-funding-contributors-close {
  margin: 0;
}
@media (max-width: 390px) {
  .game-funding-contributors-card {
    padding: 14px 12px 12px;
    max-height: min(78vh, 520px);
  }
  .game-funding-contributor-row {
    gap: 8px;
  }
}
