.profile-giveaways { grid-column: 1 / -1; min-width: 0; padding: 0.85rem 1rem; gap: 0.75rem; }
.profile-giveaways[hidden], #profile-giveaways-list[hidden] { display: none; }
.profile-giveaways-heading { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.profile-giveaways-heading h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; margin: 0; font-size: 1.05rem; line-height: 1.3; }
#profile-giveaways-count { padding: 0.15rem 0.45rem; border-radius: 999px; background: #ffca0a12; color: var(--brand); font-size: 0.72rem; font-weight: 700; }
.profile-giveaways-controls { display: flex; gap: 0.4rem; flex-shrink: 0; }
.profile-giveaways-controls .studio-icon-button { width: 34px; height: 34px; min-height: 34px; }
.profile-giveaways-status, .profile-giveaways-empty { margin: 0; font-size: 0.8rem; color: var(--muted); }
.profile-giveaways-status:empty { display: none; }
.profile-giveaways-status.is-error { color: #ffb7b8; }
#profile-giveaways-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 0.65rem; }
.profile-giveaway-row { display: flex; align-items: flex-start; gap: 0.65rem; min-width: 0; padding: 0.75rem; border: 1px solid #ffffff20; border-left: 3px solid #ffffff20; border-radius: 8px; background: #17130d; }
.profile-giveaway-summary { display: grid; grid-template-columns: minmax(2rem, 1fr) minmax(0, max-content); align-items: baseline; gap: 0.4rem; margin-top: 0.3rem; }
.profile-giveaway-channel { min-width: 0; margin: 0; overflow: hidden; color: var(--muted); font-size: 0.73rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
a.profile-giveaway-channel:hover { color: var(--brand); }
.profile-giveaway-row .profile-giveaway-summary .giveaway-ongoing-meta { min-width: 0; margin: 0; font-size: 0.7rem; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.profile-giveaway-timing { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 0.4rem; margin-top: 0.2rem; }
.profile-giveaway-timing time { min-width: 0; color: var(--muted); font-size: 0.7rem; line-height: 1.4; }
.profile-giveaway-lock { display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 0.6rem; color: #b5b0a7; font-size: 0.78rem; }
.profile-giveaway-row.is-locked { border-color: #ffffff16; border-left-color: #77716a !important; background: #151410; }
.profile-giveaway-row.is-locked .giveaway-ongoing-thumbnail { filter: grayscale(0.85); opacity: 0.65; }
.profile-giveaway-row.is-locked .giveaway-ongoing-content > strong { color: #b5b0a7; }
.profile-giveaway-row.is-locked .profile-giveaway-channel, .profile-giveaway-row.is-locked .giveaway-ongoing-meta, .profile-giveaway-row.is-locked time { color: #a7a097; }
.profile-giveaway-link { display: inline-flex; justify-self: end; align-items: center; gap: 0.3rem; font-size: 0.73rem; line-height: 1.4; white-space: nowrap; }
.profile-giveaway-row {
  --giveaway-accent: var(--brand);
  padding: 0.7rem 0.8rem; border-radius: 10px;
  background: radial-gradient(ellipse at top left, color-mix(in srgb, var(--giveaway-accent) 9%, transparent), transparent 70%), #17130d;
  box-shadow: 0 3px 14px #00000018;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.profile-giveaway-row:hover { border-top-color: #ffffff35; border-right-color: #ffffff35; border-bottom-color: #ffffff35; box-shadow: 0 5px 20px #00000030; }
.profile-giveaway-row .giveaway-ongoing-thumbnail { width: 48px; height: 48px; flex-shrink: 0; object-fit: contain; filter: drop-shadow(0 3px 5px #00000045); }
.profile-giveaway-row .giveaway-ongoing-content > strong { display: block; font-size: 0.88rem; line-height: 1.35; overflow-wrap: anywhere; }
.profile-giveaway-enter {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 32px; margin-top: 0.45rem; padding: 0.3rem 0.65rem;
  border: 1px solid #ffdb6680; border-radius: 9px;
  background: linear-gradient(135deg, #ffda55, #f5b900); color: #241b06;
  font: inherit; font-size: 0.8rem; font-weight: 750; line-height: 1.25;
  box-shadow: 0 2px 8px #ffca0a18; cursor: pointer;
  transition: filter 160ms ease, box-shadow 160ms ease;
}
.profile-giveaway-enter:hover:not(:disabled) { filter: brightness(1.1); box-shadow: 0 3px 14px #ffca0a35; }
.profile-giveaway-enter:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.profile-giveaway-enter:disabled { cursor: default; opacity: 0.75; }
.profile-giveaway-enter.is-entered { background: #35d59a12; border-color: #35d59a50; color: #78e9bd; box-shadow: none; opacity: 1; }
.profile-giveaway-entry-feedback { margin: 0.3rem 0 0; color: #78e9bd; font-size: 0.75rem; line-height: 1.5; overflow-wrap: anywhere; }
.profile-giveaway-entry-feedback:empty { display: none; }
.profile-giveaway-entry-feedback.is-error { color: #ffb7b8; }
@media (prefers-reduced-motion: reduce) { .profile-giveaway-row, .profile-giveaway-enter { transition: none; } }
.profile-giveaway-channel:focus-visible, .profile-giveaway-link:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Keep recruitment cards independent of the shared stylesheet cache. */
.profile-giveaway-row .giveaway-ongoing-content { min-width: 0; flex: 1; }
.profile-giveaway-enter.is-unavailable { background: #ffffff08; border-color: #ffffff20; color: #a7a097; box-shadow: none; opacity: 1; }
.profile-giveaway-entry-feedback.is-unavailable { color: var(--muted); }
@media (max-width: 900px) {
  .profile-giveaways { padding: 0.7rem; gap: 0.6rem; }
  #profile-giveaways-list { grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr)); gap: 0.5rem; }
  .profile-giveaway-row { padding: 0.65rem; gap: 0.55rem; }
  .profile-giveaway-row .giveaway-ongoing-thumbnail { width: 44px; height: 44px; }
  .profile-giveaway-enter { min-height: 34px; }
  .profile-giveaways-controls .studio-icon-button { width: 44px; height: 44px; min-height: 44px; }
}
@media (max-width: 360px) {
  .profile-giveaway-row .giveaway-ongoing-thumbnail { width: 36px; height: 36px; }
  .profile-giveaway-summary { column-gap: 0.25rem; }
}

.profile-giveaway-row.is-clickable { position: relative; }
.profile-giveaway-message-link { position: absolute; inset: 0; border-radius: inherit; z-index: 1; }
.profile-giveaway-message-link:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.profile-giveaway-row.is-clickable .profile-giveaway-enter,
.profile-giveaway-row.is-clickable .profile-giveaway-channel { position: relative; z-index: 2; }
.profile-giveaway-row.is-locked { background: #151410; box-shadow: none; }

.profile-giveaway-summary { grid-template-columns: max-content minmax(0, 1fr); }
.profile-giveaway-row .profile-giveaway-summary .giveaway-ongoing-meta { text-align: left; white-space: nowrap; }
.profile-giveaway-summary .profile-giveaway-channel { text-align: left; }

/* The giveaway's configured active color supplies a quiet, solid card accent. */
.profile-page .profile-giveaway-row { --giveaway-accent: var(--border); }
.profile-page .profile-giveaway-row:not(.is-locked) {
  background: color-mix(in srgb, var(--giveaway-accent) 8%, var(--surface)) !important;
  border-color: var(--giveaway-accent) !important;
}

/* Keep channel labels quiet; the whole card supplies the Discord link. */
.profile-page .profile-giveaway-channel { color: var(--muted); font-weight: 400; text-decoration: none; }
.profile-page .profile-giveaway-row { position: relative; overflow: hidden; isolation: isolate; }
.profile-page .profile-giveaway-row::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(100deg, transparent 10%, color-mix(in srgb, var(--giveaway-accent) 24%, transparent) 50%, transparent 90%);
  transform: translateX(-110%);
}
.profile-page .profile-giveaway-row > :not(.profile-giveaway-message-link) { position: relative; }
.profile-page .profile-giveaway-row .profile-giveaway-enter { position: relative; z-index: 2; }
.profile-page .profile-giveaway-row:not(.is-locked):focus-within { box-shadow: inset 0 0 0 1px var(--giveaway-accent); }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .profile-page .profile-giveaway-row:not(.is-locked):hover::before { animation: profile-giveaway-sweep 650ms ease-out; }
}
@keyframes profile-giveaway-sweep { to { transform: translateX(110%); } }
.profile-page .profile-giveaway-enter:hover:not(:disabled) { background: #4752c4 !important; border-color: #a9b0ff; filter: none; }
.profile-page .profile-giveaway-enter.is-entered:hover:not(:disabled) { background: #32483e !important; border-color: #6ce5a4; color: #9af2c1; }
@media (prefers-reduced-motion: no-preference) {
  .profile-page .profile-giveaway-enter { transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 120ms ease !important; }
  .profile-page .profile-giveaway-enter:hover:not(:disabled) { transform: translateY(-1px); }
  .profile-page .profile-giveaway-enter:active:not(:disabled) { transform: translateY(1px) scale(.97); }
}
#profile-giveaways-refresh { position: relative; }
#profile-giveaways-refresh::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: max-content;
  max-width: 220px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: .75rem;
  line-height: 1.4;
  pointer-events: none;
  opacity: 0;
  z-index: 5;
}
#profile-giveaways-refresh:focus-visible::after { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  #profile-giveaways-refresh:hover::after { opacity: 1; }
}
@media (prefers-reduced-motion: no-preference) {
  #profile-giveaways-refresh::after { transition: opacity 150ms ease !important; }
}
