/* Раздел Giveaways (24 ноября 2026): /giveaways на сайте и вкладка в приложении Discord — static/giveaways.js */
.gw-app { --gold: #fbbf24; container-type: inline-size; }
.gw-loading { color: var(--muted); padding: 40px 0; text-align: center; }
.gw-tabs { position: relative; isolation: isolate; display: inline-flex; gap: 4px; padding: 4px; margin: 4px 0 18px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); max-width: 100%; }
.gw-tabs::before { content: ""; position: absolute; z-index: -1; top: 4px; bottom: 4px; left: 0; width: var(--w, 0); transform: translateX(var(--x, 0)); border-radius: 999px; background: var(--surface); box-shadow: 0 4px 14px rgb(0 0 0 / .15); }
.gw-tabs[data-ready]::before { transition: transform .45s cubic-bezier(.3, 1.35, .5, 1), width .45s cubic-bezier(.3, 1.35, .5, 1); }
.gw-tabs button { min-height: 44px; padding: 0 20px; border: 0; border-radius: 999px; background: none; color: var(--muted); font: inherit; font-weight: 800; cursor: pointer; transition: color .3s; }
.gw-tabs button[aria-selected="true"], .gw-tabs button:hover { color: var(--text); }
.gw-tabs button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.gw-n { display: inline-block; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: color-mix(in srgb, var(--muted) 25%, transparent); font-size: 12px; }
.gw-n.hot { background: var(--gold); color: #422006; }

.gw-grid { display: grid; gap: 16px; }
.gw-card { display: grid; grid-template-columns: 200px minmax(0, 1fr); overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow, none); animation: gw-in .45s calc(var(--i, 0) * 60ms) both; }
.gw-ended { grid-template-columns: minmax(0, 1fr); }
.gw-view.still .gw-card, .gw-view.still .gw-row, .gw-view.still .gw-empty { animation: none; }
@keyframes gw-in { from { opacity: 0; transform: translateY(14px); } }
.gw-card.flash { border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 35%, transparent); }
.gw-pic { display: grid; place-items: center; min-height: 180px; background: radial-gradient(circle at 50% 55%, color-mix(in srgb, var(--r, var(--gold)) 34%, transparent), transparent 70%), var(--surface-2); }
.gw-pic img { width: 130px; height: 130px; object-fit: contain; transition: transform .3s cubic-bezier(.3, 1.4, .5, 1); }
.gw-pic:hover img { transform: scale(1.08) rotate(-3deg); }
.gw-body { display: flex; flex-direction: column; gap: 12px; padding: 18px; min-width: 0; }
.gw-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.gw-head h3 { margin: 0; font-size: 22px; line-height: 1.2; overflow-wrap: anywhere; }
.gw-ends { margin: 0; color: var(--muted); font-weight: 700; font-size: 15px; }
.gw-time { color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.gw-prizes, .gw-winners, .gw-bonus, .gw-list, .gw-rules { margin: 0; padding: 0; list-style: none; }
.gw-prizes { display: flex; flex-wrap: wrap; gap: 8px; }
.gw-prizes li { display: flex; align-items: center; gap: 6px; padding: 4px 12px 4px 8px; border-radius: 14px; background: var(--surface-2); min-width: 0; }
.gw-place { flex: none; min-width: 24px; text-align: center; font-weight: 800; color: var(--muted); }
.gw-prize { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--text); text-decoration: none; min-width: 0; overflow-wrap: anywhere; }
.gw-prize img { width: 34px; height: 34px; object-fit: contain; flex: none; }
.gw-prize:hover b { color: var(--accent-text); }
.gw-stats { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; color: var(--muted); }
.gw-stats b { color: var(--text); font-size: 18px; font-variant-numeric: tabular-nums; }
.gw-bonus { display: flex; flex-wrap: wrap; gap: 6px; }
.gw-bonus li { padding: 4px 12px; border-radius: 999px; background: color-mix(in srgb, var(--gold) 14%, transparent); font-size: 14px; }
.gw-bonus b { color: var(--gold-text, inherit); }
.gw-act { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: auto; padding-top: 4px; }
.gw-app .button { width: auto; min-height: 48px; padding: 11px 22px; cursor: pointer; font: inherit; font-weight: 800; }
.gw-app .button:disabled { opacity: .6; cursor: progress; }
.gw-app .gw-join { background: var(--accent); border-color: var(--accent); color: var(--on-accent); transition: transform .2s; }
.gw-app .gw-join:hover:not(:disabled) { transform: translateY(-2px); }
.gw-app .gw-join:active:not(:disabled) { transform: scale(.96); }
.gw-app .button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.gw-mine { min-width: 0; }
.gw-mine small { display: block; color: var(--muted); }
.gw-tickets b { font-size: 24px; font-variant-numeric: tabular-nums; }
.gw-in { margin: 0; padding: 8px 18px; border-radius: 999px; background: var(--good-soft); color: var(--good-text); font-weight: 800; animation: gw-pop .4s cubic-bezier(.3, 1.6, .5, 1); }
.gw-view.still .gw-in { animation: none; }
@keyframes gw-pop { from { transform: scale(.6); opacity: 0; } }
.gw-error { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0; padding: 10px 14px; border-radius: 14px; background: color-mix(in srgb, var(--down) 12%, transparent); color: var(--text); font-weight: 600; }
.gw-error p { margin: 0; flex: 1 1 200px; }
.gw-dq, .gw-drawing { margin: 0; font-weight: 700; color: var(--muted); }

.gw-winners { display: grid; gap: 8px; }
.gw-winners > li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 4px 12px; border-radius: 14px; background: var(--surface-2); }
.gw-arrow { color: var(--muted); }
.gw-who { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--text); text-decoration: none; min-width: 0; overflow-wrap: anywhere; }
a.gw-who:hover b { color: var(--accent-text); }
.gw-who img, .gw-noava { width: 28px; height: 28px; border-radius: 50%; flex: none; object-fit: cover; background: var(--border); }
.gw-noava { display: grid; place-items: center; color: var(--muted); font-weight: 800; }
.gw-none { color: var(--muted); }
.gw-st { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 13px; font-weight: 800; background: var(--surface-2); color: var(--muted); }
.gw-winners .gw-st { margin-left: auto; background: var(--surface); }
.gw-st.ok { background: color-mix(in srgb, var(--accent) 16%, transparent) !important; color: var(--accent-text); }
.gw-st.done { background: var(--good-soft) !important; color: var(--good-text); }
.gw-st.no { background: color-mix(in srgb, var(--down) 12%, transparent) !important; color: var(--down); }

.gw-list { display: grid; gap: 10px; }
.gw-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); animation: gw-in .4s calc(var(--i, 0) * 50ms) both; }
.gw-thumb { display: grid; place-items: center; flex: none; width: 60px; height: 60px; border-radius: 14px; background: radial-gradient(circle, color-mix(in srgb, var(--r, var(--gold)) 30%, transparent), transparent 75%), var(--surface-2); }
.gw-thumb img { width: 48px; height: 48px; object-fit: contain; }
.gw-row-main { flex: 1 1 200px; min-width: 0; }
.gw-row-main b { display: block; overflow-wrap: anywhere; }
.gw-row-main small { display: block; color: var(--muted); font-size: 14px; }
.gw-row-end { display: flex; flex-wrap: wrap; gap: 6px; }
.gw-invite { margin-top: 18px; }
.gw-invite .note { margin: 6px 0 10px; font-size: 15px; }
.gw-empty { padding: 44px 16px; text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: var(--radius); animation: gw-in .4s both; }
.gw-empty span { font-size: 42px; }
.gw-empty p { margin: 6px 0 14px; }

/* «You won!» */
.gw-won { position: relative; display: grid; grid-template-columns: 160px minmax(0, 1fr); margin: 0 0 18px; overflow: hidden; border-radius: var(--radius); border: 2px solid var(--gold); background: linear-gradient(120deg, color-mix(in srgb, var(--gold) 22%, var(--surface)), var(--surface) 70%); animation: gw-pop .5s cubic-bezier(.3, 1.4, .5, 1); }
.gw-won-pic { display: grid; place-items: center; background: radial-gradient(circle, color-mix(in srgb, var(--r, var(--gold)) 40%, transparent), transparent 70%); }
.gw-won-pic img { width: 110px; height: 110px; object-fit: contain; animation: gw-float 3.2s ease-in-out infinite; }
@keyframes gw-float { 50% { transform: translateY(-7px) rotate(3deg); } }
.gw-won-body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 18px; min-width: 0; }
.gw-won h2 { margin: 0; font-size: 26px; }
.gw-won p { margin: 0; overflow-wrap: anywhere; }
.gw-won-prize { font-size: 18px; }
.gw-won small { color: var(--muted); }
.gw-app .gw-claim { background: var(--gold); border-color: var(--gold); color: #422006; }
.gw-safe { margin-top: 2px; }
.gw-confetti { position: fixed; inset: 0; z-index: 90; pointer-events: none; overflow: hidden; }
.gw-confetti i { position: absolute; top: -14px; width: 9px; height: 13px; border-radius: 2px; animation: gw-fall 2.1s cubic-bezier(.3, .6, .5, 1) both; }
@keyframes gw-fall { to { transform: translate(var(--x), 105vh) rotate(var(--t)); opacity: .2; } }

/* Правила */
.gw-rules-box { margin-top: 26px; }
.gw-rules { display: grid; gap: 8px; margin-top: 10px; }
.gw-rules li { display: flex; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); line-height: 1.45; }

/* узко: по ширине самого блока (телефон, окно Discord) */
@container (max-width: 620px) {
  .gw-card { grid-template-columns: minmax(0, 1fr); }
  .gw-pic { min-height: 130px; }
  .gw-pic img { width: 108px; height: 108px; }
  .gw-body { padding: 14px; }
  .gw-head h3 { font-size: 20px; }
  .gw-act { flex-direction: column; align-items: stretch; }
  .gw-app .button, .gw-act .gw-join { width: 100%; }
  .gw-act .gw-in { text-align: center; }
  .gw-act > .gw-error { flex-basis: auto; }
  .gw-error p { flex-basis: 100%; }
  .gw-app .gv-link .button { width: auto; flex: none; }
  .gw-winners .gw-prize { flex: 1 1 60%; }
  .gw-won { grid-template-columns: minmax(0, 1fr); }
  .gw-won-pic { padding: 14px 0 0; }
  .gw-won-body { align-items: stretch; text-align: center; }
  .gw-arrow { display: none; }
  .gw-winners .gw-st { margin-left: 0; }
  .gw-tabs { display: flex; }
  .gw-tabs button { flex: 1; padding: 0 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .gw-app *, .gw-tabs::before { animation: none !important; transition: none !important; }
}

/* ===== Админка /admin/giveaway (static/admin-giveaway.js) ===== */
.ga { --gold: #fbbf24; }
.ga .button { width: auto; min-height: 44px; padding: 9px 18px; cursor: pointer; font: inherit; font-weight: 700; }
.ga .gw-join { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.ga .ga-danger { color: var(--down); border-color: color-mix(in srgb, var(--down) 40%, var(--border)); }
.ga-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.ga-top .section-title { margin: 0; overflow-wrap: anywhere; min-width: 0; }
.ga-panel { margin-bottom: 14px; }
.ga-facts { margin: 0 0 6px; }
.ga-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ga .gw-row-end { align-items: center; }
.ga-win { align-items: flex-start !important; padding: 12px !important; }
.ga-win-main { flex: 1 1 260px; min-width: 0; }
.ga-win-main small { display: block; color: var(--muted); overflow-wrap: anywhere; }
.ga-win-end { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ga-win-end .gw-st { margin-left: 0 !important; }
.ga-rbx { margin: 6px 0 0; }
.ga-person { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 10px 0; }
.ga-person .note { margin: 0; flex: 1 1 220px; }
.ga-form { display: grid; gap: 14px; max-width: 760px; }
.ga-form .section-title { margin: 0; }
.ga-field { display: grid; gap: 6px; font-weight: 700; }
.ga-field .search, .ga-search .search { max-width: none; width: 100%; box-sizing: border-box; }
.ga-field .ga-n { width: 110px; }
.ga-set { margin: 0; padding: 12px 14px 14px; border: 1px solid var(--border); border-radius: 16px; min-width: 0; }
.ga-set legend { padding: 0 6px; font-weight: 700; }
.ga-prizes { display: grid; gap: 10px; margin: 0 0 8px; padding: 0; list-style: none; }
.ga-prize { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.ga-search { position: relative; flex: 1 1 220px; min-width: 0; }
.ga-found { display: grid; gap: 2px; }
.ga-found:empty { display: none; }
.ga-found button { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 10px; border: 0; border-radius: 10px; background: var(--surface-2); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.ga-found button:hover, .ga-found button:focus-visible { background: color-mix(in srgb, var(--accent) 16%, var(--surface-2)); }
.ga-found img, .ga-picked img { object-fit: contain; flex: none; }
.ga-found small, .ga-picked small { display: block; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.ga-picked { display: flex; align-items: center; gap: 10px; flex: 1 1 220px; min-width: 0; padding: 4px 10px; border-radius: 12px; background: var(--surface-2); }
.ga-picked .link-button { margin-left: auto; min-height: 44px; }
.ga-qty input { width: 68px; min-height: 44px; padding: 0 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; }
.ga-check { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.ga-check input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.ga-form .gw-error[hidden] { display: none; }

/* ===== Выдача приза, приглашение, друзья (25 ноября 2026) ===== */
.gw-steps, .gw-todo { display: grid; gap: 10px; width: 100%; margin: 0; padding: 0; list-style: none; counter-reset: s; text-align: left; }
.gw-steps li, .gw-todo li { position: relative; padding-left: 38px; min-height: 28px; counter-increment: s; }
.gw-steps li::before, .gw-todo li::before { content: counter(s); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border); box-sizing: border-box; font-size: 13px; font-weight: 800; color: var(--muted); }
.gw-steps li.done::before, .gw-todo li.done::before { content: "✓"; border-color: var(--good); background: var(--good); color: var(--on-good); }
.gw-steps li.now::before { border-color: var(--gold); color: var(--text); }
.gw-steps li > b { display: block; }
.gw-steps li > span { display: block; color: var(--muted); }
.gw-steps li > span b { color: var(--text); overflow-wrap: anywhere; }
.gw-steps .gw-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.gw-todo li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.gw-todo li.done > span { color: var(--muted); }
.gw-todo .button { min-height: 44px !important; padding: 8px 16px !important; }
.gw-live { margin: 0; padding: 8px 14px; border-radius: 14px; background: var(--good-soft); color: var(--good-text); font-weight: 800; }
.gw-help { color: var(--muted); font-size: 14px; }
.gw-linkish { padding: 4px 0; min-height: 32px; border: 0; background: none; color: var(--accent-text); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.gw-invited { position: relative; margin: 0 0 18px; padding: 18px; border: 2px solid var(--accent); border-radius: var(--radius); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); animation: gw-in .4s both; }
.gw-invited h2 { margin: 0 44px 6px 0; font-size: 21px; overflow-wrap: anywhere; }
.gw-invited > p { margin: 0 0 12px; }
.gw-x { position: absolute; right: 8px; top: 8px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: var(--muted); font: inherit; cursor: pointer; }
.gw-x:hover { color: var(--text); background: var(--surface-2); }
.gw-friends { margin-top: 10px; }
.gw-friends summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 700; color: var(--accent-text); }
.gw-friends ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.gw-friends li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 6px 12px; border-radius: 14px; background: var(--surface-2); }
.gw-fts { display: flex; flex-wrap: wrap; gap: 6px; }
.gw-ft { padding: 2px 10px; border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 13px; }
.gw-ft.ok { background: var(--good-soft); color: var(--good-text); font-weight: 700; }
.gw-ft.bad { background: color-mix(in srgb, var(--down) 12%, transparent); color: var(--down); }
.gw-how { display: grid; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; counter-reset: h; }
.gw-how li { display: flex; align-items: baseline; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); counter-increment: h; }
.gw-how li { display: block; position: relative; padding-left: 52px; }
.gw-how li::before { content: counter(h); position: absolute; left: 14px; top: 11px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 14px; font-weight: 800; }
.ga-give { margin-top: 8px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border)); }
.ga-give ol, .ga-help ol { display: grid; gap: 8px; margin: 8px 0 0; padding-left: 22px; }
.ga-give a.button { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 16px; text-decoration: none; }
.ga-give .note { margin: 8px 0 0; }
.ga-help summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }
@container (max-width: 620px) { .gw-steps .gw-btns .button, .gw-todo .button { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .gw-invited { animation: none; } }
.ga-win-main { flex-basis: 420px; }
.ga-give li { padding-left: 2px; }
.ga-give .adm-flag { display: block; margin: 8px 0 0; border-radius: 10px; padding: 6px 10px; }
@media (max-width: 719px) { .ga-win > .gw-place { display: none; } .ga-win-main { flex-basis: 100%; } }

.gw-age { color: var(--muted); font-size: 13px; }
.gw-age a { color: inherit; }
