:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #182033;
  background: #f4f7fb;
  --brand: #ee4d2d;
  --brand-2: #ff7b5d;
  --brand-600: #c9361c;
  --brand-dark: #c9361c;
  --ring: rgb(238 77 45 / 16%);
  --surface: #fff;
  --border: #e3e8f0;
  --muted: #667085;
  --shadow: 0 12px 34px rgb(23 32 51 / 9%);
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: #f4f7fb; }
body {
  margin: 0;
  min-height: 100vh;
  color: #182033;
  background:
    radial-gradient(circle at 5% 5%, rgb(238 77 45 / 9%), transparent 24rem),
    radial-gradient(circle at 95% 45%, rgb(21 112 239 / 6%), transparent 27rem),
    #f4f7fb;
}
button, input, select { font: inherit; }
a { color: var(--brand-dark); text-underline-offset: 3px; }
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 13px 20px;
  color: #fff;
  background: linear-gradient(105deg, #d83f22, var(--brand) 55%, #ff7458);
  box-shadow: 0 7px 22px rgb(169 50 27 / 20%);
}
.top-inner { max-width: 1180px; margin: auto; display: flex; gap: 20px; align-items: center; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; font-size: 16px; font-weight: 780; letter-spacing: -.015em; }
.brand img { display: block; border: 1px solid rgb(255 255 255 / 40%); border-radius: 50%; object-fit: cover; box-shadow: 0 5px 13px rgb(132 31 12 / 20%); }
nav { display: flex; gap: 5px; }
nav a { padding: 8px 11px; border-radius: 8px; color: #fff; font-size: 13px; font-weight: 650; text-decoration: none; transition: background .16s ease; }
nav a:hover, nav a.active { background: rgb(255 255 255 / 17%); }
.top .muted { color: rgb(255 255 255 / 82%); }
.container { width: min(1180px, 100%); margin: 32px auto; padding: 0 20px 44px; }
h1 { margin: 0 0 20px; color: #172033; font-size: clamp(25px, 3vw, 34px); letter-spacing: -.035em; }
h2 { margin: 27px 0 13px; color: #26324b; font-size: 20px; letter-spacing: -.02em; }
p { line-height: 1.6; }
.muted, .help { color: var(--muted); font-size: 13px; line-height: 1.55; }
.panel, .card { border: 1px solid var(--border); border-radius: 15px; background: rgb(255 255 255 / 96%); box-shadow: 0 3px 12px rgb(23 32 51 / 6%); }
.panel { padding: 22px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.card { position: relative; min-height: 110px; padding: 19px; overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; }
.card::after { content: ""; position: absolute; right: -24px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: #fff0ec; }
.card:nth-child(2n)::after { background: #edf4ff; }
.card:nth-child(3n)::after { background: #eaf9f0; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card span, .card strong { position: relative; z-index: 1; }
.card span { color: var(--muted); font-size: 13px; }
.card strong { display: block; margin-top: 10px; color: #121b2d; font-size: 27px; line-height: 1.15; letter-spacing: -.04em; }

label { display: block; margin-top: 14px; color: #344054; font-size: 13px; font-weight: 680; }
input, select { width: 100%; min-height: 43px; margin-top: 6px; padding: 10px 12px; border: 1px solid #cfd6e3; border-radius: 9px; color: #172033; background: #fff; box-shadow: 0 1px 2px rgb(23 32 51 / 3%); transition: border-color .16s ease, box-shadow .16s ease; }
input:hover, select:hover { border-color: #aab4c3; }
input:focus, select:focus { border-color: #ef765d; box-shadow: 0 0 0 3px rgb(238 77 45 / 11%); outline: none; }
input[type="file"] { padding: 6px; background: #f8fafc; }
input[type="file"]::file-selector-button { margin-right: 10px; border: 0; border-radius: 7px; padding: 7px 10px; background: #e8edf5; color: #26324b; cursor: pointer; }
button { min-height: 41px; padding: 9px 15px; border: 0; border-radius: 9px; color: #fff; background: linear-gradient(145deg, #f26144, var(--brand)); box-shadow: 0 5px 13px rgb(238 77 45 / 19%); font-weight: 680; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, filter .16s ease; }
button:hover { filter: brightness(.97); box-shadow: 0 8px 17px rgb(238 77 45 / 24%); transform: translateY(-1px); }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid rgb(238 77 45 / 20%); outline-offset: 2px; }
.logout { display: inline; }
.logout button { min-height: 34px; padding: 6px 11px; border: 1px solid rgb(255 255 255 / 18%); background: rgb(128 31 12 / 25%); box-shadow: none; }
form.search { display: flex; gap: 10px; align-items: end; margin: 16px 0 20px; }
.search label { flex: 1; margin: 0; }
.search button { height: 43px; }
.message { margin: 13px 0; padding: 12px 14px; border: 1px solid #a6f4c5; border-radius: 10px; color: #067647; background: #ecfdf3; box-shadow: 0 2px 8px rgb(23 32 51 / 5%); }
.error { border-color: #fecdca; color: #9f2513; background: #fff1f0; }

.link-converter { max-width: 680px; margin: 5vh auto 16px; }
.link-converter h1 { margin-bottom: 8px; }
.link-converter button { width: 100%; margin-top: 20px; }
.link-result { max-width: 680px; margin: 0 auto; }
.link-result h2 { margin-top: 0; }
.link-community-note { max-width: 680px; margin: 0 auto 16px; }
.group-shopping { margin: 18px 0; padding: 17px 18px; border: 1px solid #f2d7ce; border-radius: 12px; background: linear-gradient(115deg, #fff3ed, #fffaf7 58%, #effcfb); }
.link-community-note .group-shopping { margin: 0; }
.group-shopping-heading { display: flex; align-items: center; gap: 8px; color: #344054; font-size: 15px; }
.group-shopping-spark { color: #c9361c; font-size: 20px; line-height: 1; }
.group-shopping-platforms { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.group-shopping-platform { display: inline-flex; align-items: center; gap: 8px; min-height: 37px; padding: 7px 12px; border-radius: 9px; font-size: 14px; font-weight: 750; line-height: 1.4; }
.group-shopping-platform svg { width: 22px; height: 22px; flex: none; }
.group-shopping-platform--shopee { color: #fff; background: #c9361c; }
.group-shopping-platform--tiktok { color: #fff; background: #172033; }
.group-shopping-plus { color: #667085; font-size: 18px; }
.group-shopping p { margin: 12px 0 0; color: #475467; font-size: 13px; line-height: 1.6; }
@media (prefers-color-scheme: dark) {
  .group-shopping { border-color: #4d3c3c; background: linear-gradient(115deg, #30222a, #202535 58%, #162f36); }
  .group-shopping-heading { color: #f4f6fc; }
  .group-shopping-spark { color: #ffad96; }
  .group-shopping-plus { color: #bcc7d9; }
  .group-shopping p { color: #c5d0e2; }
  .group-shopping-platform--tiktok { background: #0b111c; }
}
@media (max-width: 400px) {
  .group-shopping { padding: 15px; }
  .group-shopping-heading { align-items: flex-start; font-size: 14px; }
  .group-shopping-platforms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .group-shopping-plus { display: none; }
  .group-shopping-platform { justify-content: center; gap: 5px; padding: 7px 8px; font-size: 12px; white-space: nowrap; }
  .group-shopping-platform svg { width: 18px; height: 18px; }
}
.affiliate-open-button { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 11px 18px; border-radius: 9px; color: #fff; background: linear-gradient(145deg, #f26144, var(--brand)); box-shadow: 0 5px 13px rgb(238 77 45 / 19%); font-weight: 700; text-align: center; text-decoration: none; }
.affiliate-open-button:hover { color: #fff; filter: brightness(.97); box-shadow: 0 8px 17px rgb(238 77 45 / 24%); }
.affiliate-action-button { display: block; width: 100%; min-height: 46px; margin-top: 12px; border: 1px solid var(--brand); color: var(--brand-dark); background: transparent; box-shadow: none; line-height: 1.5; }
.affiliate-action-button:disabled { cursor: wait; opacity: .65; }
@media (prefers-color-scheme: dark) {
  .affiliate-action-button { color: #ffad96; border-color: #bc634b; }
}
.affiliate-facebook-result { margin: 18px 0 0; padding: 16px; border: 1px solid #bad7ff; border-radius: 12px; background: #eaf3ff; }
.affiliate-facebook-heading { display: flex; align-items: center; gap: 10px; }
.affiliate-facebook-mark { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 8px; color: #fff; background: #146de0; font-weight: 800; }
.affiliate-facebook-result h3 { margin: 0; color: #103d7a; font-size: 16px; }
.affiliate-facebook-result p { margin: 10px 0 13px; color: #315477; font-size: 14px; }
.affiliate-facebook-button { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 11px 18px; border-radius: 9px; color: #fff; background: #146de0; box-shadow: 0 5px 13px rgb(20 109 224 / 18%); font-weight: 700; text-align: center; text-decoration: none; }
.affiliate-facebook-button:hover { color: #fff; background: #0b5bc2; box-shadow: 0 8px 17px rgb(20 109 224 / 24%); }
.affiliate-reply { overflow: auto; margin: 16px 0 0; padding: 16px; border-radius: 10px; background: #f7f9fc; color: #26324b; font: inherit; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }

.platform-tabs { display: flex; width: fit-content; gap: 5px; margin: 0 0 16px; padding: 4px; border: 1px solid var(--border); border-radius: 11px; background: #fff; box-shadow: 0 2px 8px rgb(23 32 51 / 5%); }
.platform-tabs a { padding: 8px 14px; border-radius: 8px; color: #475467; font-size: 13px; font-weight: 750; text-decoration: none; }
.platform-tabs a:hover { color: var(--brand-dark); background: #fff4f1; }
.platform-tabs a.active { color: #fff; background: linear-gradient(145deg, #f26144, var(--brand)); box-shadow: 0 4px 10px rgb(238 77 45 / 16%); }

.table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: 13px; background: #fff; box-shadow: 0 3px 12px rgb(23 32 51 / 5%); scrollbar-color: #c6cfdb transparent; }
.table-scroll { max-height: 65vh; }
table { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; }
th, td { padding: 10px; border-bottom: 1px solid #edf0f5; text-align: left; white-space: nowrap; font-size: 13px; }
th { background: #f7f9fc; color: #475467; font-size: 11px; font-weight: 760; letter-spacing: .035em; text-transform: uppercase; }
.table-scroll thead { position: sticky; top: 0; z-index: 2; }
.table-scroll thead th { box-shadow: 0 1px 0 var(--border); }
tbody tr:nth-child(even) { background: #fbfcfe; }
tbody tr:hover { background: #fff7f4; }
tbody tr:last-child td { border-bottom: 0; }
.portal-orders-table { min-width: 1080px; }
.portal-orders-table .payout-status-column { min-width: 180px; max-width: 220px; white-space: normal; }
.payout-status-column .status { white-space: normal; line-height: 1.45; }
.payout-status-column .status::before { flex-shrink: 0; }
.product-column { width: 300px; min-width: 300px; max-width: 300px; white-space: normal; overflow-wrap: anywhere; line-height: 1.45; }
.status { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; color: #3e4784; background: #eef2ff; font-size: 11px; font-weight: 740; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .72; }
.status--unpaid, .status--not_eligible { color: #475467; background: #f2f4f7; }
.status--pending, .status--eligible, .status--settlement_pending { color: #8a5a00; background: #fff5cc; }
.status--completed, .status--validated, .status--paid { color: #067647; background: #dcfae6; }
.status--cancelled, .status--rejected { color: #b42318; background: #fee4e2; }
.status--review { color: #6941c6; background: #f4ebff; }
.status--approved, .status--approved_in_payout { color: #026aa2; background: #e0f2fe; }

.portal-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 20px; }
.portal-heading h1 { margin: 6px 0 4px; }
.eyebrow { color: var(--brand-dark); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.unread-pill { padding: 7px 11px; border-radius: 999px; color: #067647; background: #dcfae6; font-size: 11px; font-weight: 780; text-decoration: none; }
.overview-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.overview-cards .card { min-width: 0; }
.overview-cards .card strong { font-size: clamp(20px, 2vw, 27px); overflow-wrap: anywhere; }
.wallet-overview { margin: 24px 0; }
.wallet-overview .card::after { display: none; }
.wallet-overview .card span { line-height: 1.5; }
.wallet-details { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 14px; }
.wallet-details p { margin: 0; color: var(--muted); }
.wallet-details strong { overflow-wrap: anywhere; }
.wallet-note { font-size: 13px; line-height: 1.6; }
.overview-split { display: grid; grid-template-columns: 1.15fr .85fr; gap: 14px; margin-top: 17px; }
.overview-split .panel h2 { margin: 0 0 13px; font-size: 17px; }
.event-teaser { padding: 20px; border-radius: 13px; color: #fff; background: linear-gradient(120deg, #182a4b, #2c4d82); }
.event-teaser > span { color: #ffb8aa; font-size: 11px; font-weight: 760; }
.event-teaser h3 { margin: 10px 0 7px; font-size: 20px; }
.event-teaser p { color: #dce6f5; font-size: 12px; white-space: pre-line; }
.button-link { display: inline-block; margin-top: 8px; padding: 9px 13px; border-radius: 9px; color: #fff; background: var(--brand); font-size: 12px; font-weight: 760; text-decoration: none; }
.recent-orders a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 10px 0; border-bottom: 1px solid #edf0f5; color: inherit; text-decoration: none; }
.recent-orders a:last-child { border-bottom: 0; }
.recent-orders strong, .recent-orders small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-orders strong { font-size: 12px; }
.recent-orders small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.community-ranking { margin-top: 24px; }
.leaderboard-filter { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-top: 14px; }
.leaderboard-filter label { flex: 0 1 260px; max-width: 100%; }
.leaderboard-range label { min-width: 0; }
.leaderboard-range input { display: block; width: 100%; min-width: 0; max-width: 100%; }
.leaderboard-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-top: 14px; }
.leaderboard-controls > .leaderboard-filter { flex: 1 1 260px; min-width: 0; margin: 0; }
.leaderboard-controls > .leaderboard-range { flex: 2 1 610px; }
.leaderboard-controls .leaderboard-filter label { flex: 1 1 180px; min-width: 0; margin-top: 0; }
.leaderboard-period-note { margin: 9px 0; }
.community-ranking > h2 { margin-bottom: 3px; }
.leaderboard-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.leaderboard-panel { min-width: 0; padding: 15px; }
.leaderboard-panel h3 { min-height: 35px; margin: 0 0 9px; font-size: 13px; }
.leaderboard-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.leaderboard-list li { display: grid; grid-template-columns: 25px minmax(0, 1fr) auto; gap: 7px; align-items: center; min-height: 38px; padding: 7px 8px; border-radius: 9px; background: #f8fafc; font-size: 10px; }
.leaderboard-list li:first-child { background: #fff8e6; }
.leaderboard-list .rank { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; color: #fff; background: #718096; font-weight: 800; }
.leaderboard-list li:first-child .rank { background: #dc9d00; }
.leaderboard-list strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.masked-money { min-width: 58px; color: #475467; font-family: ui-monospace, monospace; letter-spacing: .08em; text-align: right; }
.privacy-note { margin: 10px 0 0; padding: 9px 11px; border-radius: 9px; color: #475467; background: #eef2f7; font-size: 10px; }

.event-center { display: grid; grid-template-columns: 310px minmax(0, 1fr); min-height: 630px; border: 1px solid var(--border); border-radius: 18px; background: #fff; box-shadow: var(--shadow); overflow: hidden; }
.event-list { padding: 18px; border-right: 1px solid var(--border); background: #fbfcfe; }
.event-list h2 { margin: 0 0 13px; font-size: 17px; }
.event-list-item { position: relative; display: grid; grid-template-columns: 39px minmax(0, 1fr); gap: 10px; align-items: center; margin-bottom: 8px; padding: 12px; border: 1px solid transparent; border-radius: 12px; color: inherit; text-decoration: none; }
.event-list-item:hover { background: #f6f8fb; }
.event-list-item.active { border-color: #ffc4b8; background: #fff5f2; }
.event-list-item > i { position: absolute; right: 10px; top: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.event-list-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: #fff0ec; font-size: 18px; }
.event-list-item strong, .event-list-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-list-item strong { padding-right: 8px; font-size: 12px; }
.event-list-item small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.event-detail { padding: 24px; }
.event-hero { padding: 27px; border-radius: 17px; color: #fff; background: linear-gradient(120deg, #172743, #233a65 65%, #2e4d82); }
.event-hero h2 { margin: 12px 0 8px; color: #fff; font-size: 29px; line-height: 1.1; }
.event-hero p { max-width: 740px; color: #d9e4f6; white-space: pre-line; }
.event-hero > strong { display: block; margin-top: 12px; color: #ffb3a4; font-size: 11px; }
.event-hero form { margin-top: 15px; }
.event-status, .read-badge { display: inline-flex; padding: 5px 9px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.event-status--active, .read-badge { color: #067647; background: #dcfae6; }
.event-status--upcoming { color: #8a5a00; background: #fff5cc; }
.event-status--ended { color: #475467; background: #f2f4f7; }
.read-badge { margin-top: 16px; }
.event-info > h2 { margin: 22px 0 11px; }
.event-info-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 13px; }
.event-info-grid article { padding: 17px; border: 1px solid var(--border); border-radius: 13px; }
.event-info-grid h3 { margin: 0 0 8px; }
.event-info-grid p { color: #475467; font-size: 12px; white-space: pre-line; }

body.event-gate-open { overflow: hidden; }
.event-gate-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgb(16 24 39 / 68%); backdrop-filter: blur(7px); }
.event-gate-card { display: flex; flex-direction: column; width: min(650px, calc(100vw - 30px)); max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow: hidden; border-radius: 22px; background: #fff; box-shadow: 0 30px 95px rgb(0 0 0 / 42%); }
.event-gate-card header, .event-gate-card footer { flex: 0 0 auto; }
.event-gate-card header { padding: 27px; color: #fff; background: linear-gradient(125deg, #c9361c, #f45f41 68%, #ff9a76); }
.event-gate-card header span { font-size: 10px; font-weight: 850; letter-spacing: .12em; }
.event-gate-card header h1 { margin: 11px 0 7px; color: #fff; font-size: 28px; }
.event-gate-card header p { margin: 0; font-size: 12px; }
.event-gate-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 23px 27px; color: #344054; line-height: 1.7; }
.event-gate-body > p { white-space: pre-line; }
.gate-confirm { padding: 11px 12px; border-radius: 10px; background: #f7f9fc; font-size: 12px; }
.event-gate-card footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 27px 25px; }
.event-gate-card footer form { display: grid; gap: 10px; min-width: min(290px, 100%); }
.event-gate-optout { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer; }
.event-gate-optout input { flex: 0 0 auto; width: 16px; height: 16px; margin: 0; accent-color: var(--brand); }
.event-gate-card footer small { color: var(--muted); font-size: 10px; }
.event-gate-card footer > button:disabled { cursor: not-allowed; opacity: .72; }
.event-preview-notice { position: fixed; z-index: 60; top: 18px; left: 50%; display: flex; align-items: center; gap: 18px; width: min(720px, calc(100vw - 32px)); padding: 11px 15px; transform: translateX(-50%); color: #344054; border: 1px solid #f7b7a8; border-radius: 12px; background: #fff8f6; box-shadow: 0 12px 36px rgb(16 24 40 / 18%); font-size: 11px; }
.event-preview-notice strong { color: var(--brand); }
.event-preview-notice a { margin-left: auto; color: var(--brand); font-weight: 800; white-space: nowrap; }

.auth {
  max-width: 452px;
  margin: 8vh auto;
  padding: 36px 34px 34px;
  border-radius: 24px;
  box-shadow:
    var(--shadow),
    0 0 0 1px color-mix(in srgb, var(--brand) 12%, transparent),
    0 24px 70px -24px rgb(238 77 45 / 38%);
  animation: auth-rise .45s cubic-bezier(.2, .8, .2, 1);
}
.auth-brand-lockup { display: flex; align-items: center; gap: 15px; margin-bottom: 22px; }
.auth-brand-lockup img { flex: 0 0 auto; width: 84px; height: 84px; border: 2px solid color-mix(in srgb, var(--brand) 22%, var(--surface)); border-radius: 23px; object-fit: cover; box-shadow: 0 11px 27px rgb(238 77 45 / 23%); }
.auth-brand-name { margin: 0 0 8px; color: var(--brand); font-size: 13px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.auth-platform-names { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 0; color: var(--muted); font-size: 12px; font-weight: 740; }
.auth-platform-names i { width: 4px; height: 4px; border-radius: 50%; background: var(--brand); }
.payment-qr-preview { width: fit-content; margin: 18px 0; padding: 13px; border: 1px solid var(--border); border-radius: 13px; background: #f8fafc; }
.payment-qr-preview figcaption { margin-bottom: 9px; color: #344054; font-size: 13px; font-weight: 760; }
.payment-qr-preview img { display: block; width: min(280px, 75vw); height: auto; aspect-ratio: 1; border-radius: 10px; object-fit: contain; background: #fff; }
.payment-qr-preview p { margin: 9px 0 0; }
.payment-qr-preview { width: min(100%, 360px); }
.payment-qr-preview strong { display: block; margin-bottom: 12px; }
.payment-qr-image-box { display: grid; place-items: center; min-height: 280px; border: 1px dashed var(--border); border-radius: 11px; }
.payment-qr-image-box img { width: min(280px, 100%); }
.payment-qr-image-box img[hidden], .payment-qr-image-box p[hidden] { display: none; }
.payment-qr-image-box p { padding: 20px; text-align: center; }
.payment-qr-file { position: absolute; width: 1px; height: 1px; padding: 0; opacity: 0; overflow: hidden; }
.payment-qr-actions { display: flex; flex-wrap: wrap; gap: 10px; max-width: 540px; }
.payment-qr-actions button { flex: 1 1 125px; }
.payment-qr-actions .payment-secondary-button { color: var(--brand); background: #fff1eb; box-shadow: none; border: 1px solid #f8c4b6; }
.payment-qr-actions button:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; transform: none; }
.auth h1 { margin-bottom: 8px; }
.auth input { min-height: 44px; }
.auth input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }
.auth button, .auth .auth-link-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  margin-top: 22px;
  padding: 9px 15px;
  overflow: hidden;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(140deg, var(--brand-2), var(--brand) 55%, var(--brand-600));
  box-shadow: 0 5px 13px rgb(238 77 45 / 19%);
  font-weight: 680;
  text-align: center;
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.auth button::before, .auth .auth-link-button::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(255 255 255 / 18%), transparent 55%); pointer-events: none; }
.auth button:active, .auth .auth-link-button:active { transform: translateY(0) scale(.988); }
.auth .auth-link-help { margin: 20px 0 10px; text-align: center; }
.auth .auth-link-button { margin-top: 0; }
.auth .auth-link-button:hover { filter: brightness(.97); box-shadow: 0 8px 17px rgb(238 77 45 / 24%); transform: translateY(-1px); }

@keyframes auth-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    color: #eef3fb;
    background: #0c1323;
    --surface: #172033;
    --border: #2c3952;
    --muted: #aab6c9;
    --shadow: 0 16px 42px rgb(0 0 0 / 30%);
  }
  html { background: #0c1323; }
  body {
    color: #eef3fb;
    background:
      radial-gradient(circle at 5% 5%, rgb(238 77 45 / 14%), transparent 24rem),
      radial-gradient(circle at 95% 45%, rgb(21 112 239 / 9%), transparent 27rem),
      #0c1323;
  }
  h1, h2, .card strong, .auth-brand strong { color: #eef3fb; }
  .panel, .card, .platform-tabs, .table-wrap, table, .event-center, .event-gate-card, .event-info-grid article { border-color: var(--border); background: rgb(23 32 51 / 97%); }
  label, .payment-qr-preview figcaption { color: #dbe4f2; }
  input, select { border-color: #3a4862; color: #eef3fb; background: #111a2b; }
  input:hover, select:hover { border-color: #64748b; }
  input[type="file"], .payment-qr-preview, .gate-confirm { background: #111a2b; }
  input[type="file"]::file-selector-button { color: #e6edf8; background: #26344d; }
  .payment-qr-actions .payment-secondary-button { color: #ffc0ae; background: #302622; border-color: #6e453a; }
  .platform-tabs a { color: #b8c5d8; }
  .platform-tabs a:hover { color: #ff9c87; background: #30201f; }
  th { color: #b8c5d8; background: #1d2940; }
  th, td, .recent-orders a { border-bottom-color: #2c3952; }
  tbody tr:nth-child(even) { background: #19243a; }
  tbody tr:hover { background: #2d2529; }
  .leaderboard-list li { background: #1d2940; }
  .leaderboard-list li:first-child { background: #3a321d; }
  .masked-money, .privacy-note, .event-info-grid p, .event-preview-notice { color: #b8c5d8; }
  .privacy-note { background: #1d2940; }
  .event-list { border-color: #2c3952; background: #111a2b; }
  .event-list-item:hover { background: #1d2940; }
  .event-list-item.active { border-color: #8f493b; background: #30201f; }
  .event-list-icon { background: #3a201d; }
  .event-gate-body { color: #e8eef8; }
  .event-gate-card footer small { color: #aab6c9; }
  .event-preview-notice { border-color: #8f493b; background: #30201f; }
  .payment-qr-preview img { background: #fff; }
  .affiliate-facebook-result { border-color: #365b8c; background: #122d50; }
  .affiliate-facebook-mark, .affiliate-facebook-button { background: #3179db; }
  .affiliate-facebook-result h3 { color: #eef6ff; }
  .affiliate-facebook-result p { color: #b6d0f5; }
  .affiliate-facebook-button:hover { background: #4b91ec; }
  .affiliate-reply { background: #111a2b; color: #eef3fb; }
}

@media (max-width: 760px) {
  .top { position: static; padding: 11px 13px; }
  .top-inner { flex-wrap: wrap; gap: 10px; }
  .brand { width: 100%; }
  .product-column { width: 240px; min-width: 240px; max-width: 240px; }
  nav { order: 3; width: 100%; overflow-x: auto; }
  nav a { white-space: nowrap; background: rgb(255 255 255 / 8%); }
  .container { margin: 22px auto; padding-inline: 14px; }
  form.search { display: block; }
  .search button { width: 100%; margin-top: 10px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .panel { padding: 18px; }
  .overview-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .wallet-details { flex-direction: column; gap: 8px; }
  .overview-split { display: block; }
  .overview-split .panel { margin-bottom: 10px; }
  .leaderboard-grid { display: block; }
  .leaderboard-panel { margin-bottom: 10px; }
  .event-center { display: block; min-height: 0; border: 0; background: transparent; box-shadow: none; overflow: visible; }
  .event-list { display: flex; gap: 9px; overflow-x: auto; margin-bottom: 14px; padding: 1px 1px 8px; border: 0; background: transparent; scroll-snap-type: x mandatory; }
  .event-list h2 { display: none; }
  .event-list-item { flex: 0 0 82%; margin: 0; border-color: var(--border); background: var(--surface); scroll-snap-align: start; }
  .event-detail { padding: 0; }
  .event-hero { padding: 20px; }
  .event-hero h2 { font-size: 24px; }
  .event-info-grid { display: block; }
  .event-info-grid article { margin-bottom: 10px; background: var(--surface); }
  .event-gate-backdrop { align-items: end; padding: 0; }
  .event-gate-card { width: 100%; max-height: 100vh; max-height: 100dvh; border-radius: 22px 22px 0 0; }
  .event-gate-card header, .event-gate-body { padding: 21px 20px; }
  .event-gate-card header h1 { font-size: 23px; }
  .event-gate-card footer { display: block; padding: 0 20px max(20px, env(safe-area-inset-bottom)); }
  .event-gate-card footer small { display: block; margin-bottom: 10px; }
  .event-gate-card footer button { width: 100%; }
  .event-preview-notice { top: 10px; align-items: flex-start; gap: 8px; }
}

@media (max-width: 460px) {
  .cards { grid-template-columns: 1fr; }
  .auth { margin-top: 3vh; padding: 22px; }
  .affiliate-facebook-result { padding: 14px; }
  th, td { padding: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
