/* Theme pulled from the Boycott PBB DP: woven cream, brush red, PBB blue, gold */
:root {
  --bg: #f3e7cf;
  --bg-weave: #e9d9b8;
  --surface: #fffaf0;
  --surface-2: #f6ecd8;
  --line: #e2cfa8;
  --text: #1f1a14;
  --muted: #6e6352;
  --red: #d71920;
  --red-dark: #a8121a;
  --blue: #1e3fae;
  --blue-dark: #142c80;
  --gold: #e2a400;
  --orange: #f07a12;
  --radius: 18px;
  --tabbar-h: 66px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 6px 18px -10px rgba(80, 50, 10, .35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  min-height: 100dvh;
  padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 28px);
  -webkit-tap-highlight-color: transparent;
  background-color: var(--bg);
  /* woven rattan texture */
  background-image:
    repeating-linear-gradient(45deg, transparent 0 6px, rgba(160,120,60,.07) 6px 7px),
    repeating-linear-gradient(-45deg, transparent 0 6px, rgba(160,120,60,.07) 6px 7px);
}
body.no-scroll { overflow: hidden; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  background: var(--red);
  color: #fff;
  box-shadow: 0 4px 14px -6px rgba(120, 10, 10, .5);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-dp { width: 38px; height: 38px; border-radius: 50%; border: 2px solid #fff; }
.brand-name { font-family: Anton, Impact, sans-serif; font-size: 22px; letter-spacing: .04em; line-height: 1; }
.brand-tags { font-size: 11px; font-weight: 700; opacity: .9; margin-top: 2px; }
.live-pill { background: #fff; color: var(--red); font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .55; } }

/* ---------- Layout ---------- */
main { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.section-title { font-family: Anton, Impact, sans-serif; font-weight: 400; font-size: 26px; letter-spacing: .02em; text-transform: uppercase; color: var(--blue); margin: 30px 0 12px; }
.section-title.first { margin-top: 20px; }
.lead { color: var(--muted); font-size: 15px; }
.lead.small { margin: -6px 0 16px; font-size: 14px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 10px 16px; border-radius: 12px;
  font-weight: 700; font-size: 15px; text-align: center;
  transition: transform .1s ease, filter .15s ease;
}
.btn:active { transform: scale(.97); }
.btn-sm { min-height: 38px; padding: 8px 12px; font-size: 13px; border-radius: 10px; }
.btn-block { display: flex; width: 100%; }
.btn-red { background: var(--red); color: #fff; box-shadow: 0 4px 0 var(--red-dark); }
.btn-blue { background: var(--blue); color: #fff; box-shadow: 0 4px 0 var(--blue-dark); }
.btn-ghost { background: var(--surface); border: 1.5px solid var(--line); color: var(--text); }
@media (hover: hover) { .btn:hover { filter: brightness(1.08); } }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  margin-top: 16px; padding: 22px 20px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.hero::before, .hero::after {
  content: ""; position: absolute; width: 140%; height: 34px; left: -20%; top: 50%;
  background: var(--red); opacity: .09; border-radius: 40px;
}
.hero::before { transform: rotate(35deg); }
.hero::after { transform: rotate(-35deg); }
.hero > * { position: relative; }
.stamp {
  display: inline-block; transform: rotate(-4deg);
  font-family: Anton, Impact, sans-serif; font-size: 40px; line-height: 1; letter-spacing: .04em;
  color: var(--red); border: 4px solid var(--red); border-radius: 8px; padding: 4px 12px 2px;
}
.hero h1 { font-family: Anton, Impact, sans-serif; font-weight: 400; font-size: clamp(28px, 8vw, 44px); line-height: 1.05; color: var(--blue); margin: 14px 0 8px; text-transform: uppercase; }
.hero h1 span {
  background: linear-gradient(90deg, #e53935, #fb8c00, #fdd835, #43a047, #1e88e5, #8e24aa);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tag-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.tag { background: var(--blue); color: #fff; font-weight: 800; font-size: 14px; padding: 6px 12px; border-radius: 999px; }
.tag:nth-child(2) { background: var(--red); }

/* ---------- Funds ---------- */
.funds {
  margin-top: 14px; padding: 18px; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--red), #ef4136 60%, var(--orange));
  color: #fff; box-shadow: 0 10px 24px -12px rgba(160, 20, 20, .7);
}
.funds-label { font-family: Anton, Impact, sans-serif; font-size: 26px; line-height: 1.1; letter-spacing: .03em; text-transform: uppercase; }
.funds-purpose { font-size: clamp(19px, 5.6vw, 26px); font-weight: 800; line-height: 1.25; margin: 6px 0 10px; }
.funds-purpose strong { color: #ffe58a; white-space: nowrap; }
.funds-rhyme {
  font-size: 14px; font-weight: 600; line-height: 1.4; margin-bottom: 14px;
  background: rgba(0,0,0,.18); border-left: 4px solid #ffe58a; border-radius: 8px; padding: 8px 12px;
}
.funds-rhyme b { color: #ffe58a; font-weight: 800; }

/* ---------- Stream coming soon ---------- */
.soon-panel {
  margin-top: 20px; padding: 36px 20px; text-align: center; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  display: grid; justify-items: center; gap: 12px;
}
.soon-panel[hidden] { display: none; }
.soon-icon { font-size: 44px; }
.soon-panel h2 { font-family: Anton, Impact, sans-serif; font-weight: 400; font-size: 26px; color: var(--blue); text-transform: uppercase; }
.soon-panel p { color: var(--muted); font-size: 14px; max-width: 34ch; }

/* ---------- Telegram contact card ---------- */
.contact-card {
  display: flex; gap: 14px; align-items: center; margin-bottom: 16px; padding: 14px;
  border-radius: var(--radius); background: linear-gradient(135deg, #e8f5e9, #fffaf0);
  border: 2px solid #43a047; box-shadow: var(--shadow);
}
.contact-qr { width: 108px; height: 108px; flex: 0 0 108px; background: #fff; border-radius: 12px; padding: 6px; object-fit: contain; }
.contact-kicker { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #2e7d32; }
.contact-card h3 { font-size: 16px; font-weight: 800; line-height: 1.25; margin: 2px 0 4px; }
.contact-card p { font-size: 13px; color: var(--muted); line-height: 1.35; }
.contact-handle { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; background: #229ed9; color: #fff; font-weight: 800; font-size: 13px; padding: 5px 10px; border-radius: 999px; }
.contact-handle svg { width: 15px; height: 15px; fill: currentColor; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.cd { background: rgba(0,0,0,.2); border: 1px solid rgba(255,255,255,.25); border-radius: 12px; padding: 10px 4px 8px; text-align: center; }
.cd b { display: block; font-family: Anton, Impact, sans-serif; font-weight: 400; font-size: clamp(30px, 10vw, 44px); line-height: 1; font-variant-numeric: tabular-nums; }
.cd span { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .85; margin-top: 4px; }
.cd-done { font-family: Anton, Impact, sans-serif; font-size: 24px; text-align: center; margin-bottom: 16px; }
.funds .btn-red { background: #fff; color: var(--red); box-shadow: 0 4px 0 rgba(0,0,0,.2); font-size: 17px; min-height: 52px; }

/* ---------- DP card ---------- */
.dp-card {
  display: flex; gap: 14px; align-items: center;
  margin-top: 14px; padding: 14px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.dp-img { width: 96px; height: 96px; flex: 0 0 96px; border-radius: 14px; border: 3px solid var(--red); }
.dp-body h3 { font-size: 16px; font-weight: 800; }
.dp-body p { font-size: 13px; color: var(--muted); margin: 2px 0 10px; }
.dp-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dp-actions .btn { min-height: 38px; padding: 8px 12px; font-size: 13px; }

/* ---------- Levels ---------- */
.level { margin-bottom: 18px; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.level-head { padding: 16px 16px 14px; color: #fff; }
.level-red .level-head { background: linear-gradient(135deg, var(--red-dark), var(--red)); }
.level-orange .level-head { background: linear-gradient(135deg, #d35400, var(--orange)); }
.level-blue .level-head { background: linear-gradient(135deg, var(--blue-dark), var(--blue)); }
.level-badge { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .1em; background: rgba(255,255,255,.22); padding: 3px 8px; border-radius: 6px; }
.level-head h3 { font-family: Anton, Impact, sans-serif; font-weight: 400; font-size: 30px; line-height: 1.1; letter-spacing: .03em; margin-top: 6px; }
.level-head p { font-size: 14px; opacity: .92; }
.level-red { border: 2px solid var(--red); }
.actions { list-style: none; }
.action { padding: 16px; border-top: 1px solid var(--line); }
.action:first-child { border-top: 0; }
.action h4 { font-size: 16px; font-weight: 800; line-height: 1.3; }
.action p { font-size: 14px; color: var(--muted); margin-top: 4px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.sponsors {
  margin: 12px 0 0; padding: 12px 12px 12px 34px; border-radius: 12px; background: var(--surface-2);
  columns: 2; column-gap: 20px; font-size: 14px; font-weight: 600;
}
.sponsors li { break-inside: avoid; padding: 2px 0; }
.sponsors li::marker { color: var(--orange); font-weight: 800; }
.tpl { margin-top: 12px; }
.tpl pre, .val.body {
  white-space: pre-wrap; word-break: break-word; font-family: inherit; font-size: 13px;
  background: var(--surface-2); border: 1px dashed var(--line); border-radius: 12px; padding: 12px; color: var(--text);
}
.tpl .btn { margin-top: 8px; }

/* ---------- Placeholder ---------- */
.ph {
  width: 100%; height: 100%; display: grid; place-items: center;
  background: repeating-linear-gradient(45deg, var(--surface-2) 0 10px, #efe2c6 10px 20px);
  color: var(--muted); font-size: 13px; font-weight: 700;
}

/* ---------- Bottom sheet ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(30, 20, 10, .55); display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop[hidden] { display: none; }
.sheet {
  position: relative; width: 100%; max-width: 520px; max-height: 92dvh; overflow-y: auto;
  background: var(--surface); border-radius: 22px 22px 0 0;
  padding: 10px 18px calc(22px + var(--safe-b));
  animation: up .22s ease-out;
}
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet-grip { width: 42px; height: 5px; border-radius: 9px; background: var(--line); margin: 0 auto 10px; }
.sheet-close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; background: var(--surface-2); }
.sheet-title { font-family: Anton, Impact, sans-serif; font-weight: 400; font-size: 28px; letter-spacing: .02em; color: var(--blue); }
.sheet-sub { color: var(--muted); font-size: 14px; margin: 2px 0 14px; }
.pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pay {
  display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 12px 14px;
  border-radius: 14px; border: 2px solid var(--line); background: #fff; font-weight: 800; font-size: 16px;
}
.pay:active { border-color: var(--c); }
.pay-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--c); flex: 0 0 14px; }
.back { font-weight: 700; color: var(--muted); font-size: 14px; padding: 4px 0 8px; }
.qr-big { width: min(280px, 80vw); aspect-ratio: 1; margin: 10px auto 12px; background: #fff; border-radius: 16px; overflow: hidden; padding: 10px; border: 1px solid var(--line); }
.qr-big img { object-fit: contain; border-radius: 6px; }
.qr-big.soon { padding: 0; }
.sheet-sub.center { text-align: center; }
.acct { text-align: center; margin-top: 12px; font-size: 14px; }
.field { display: grid; grid-template-columns: 64px 1fr auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.field label { color: var(--muted); font-weight: 700; }
.field .val { word-break: break-all; font-weight: 600; }
.field.col { grid-template-columns: 1fr; border-bottom: 0; }
.field .val.body { word-break: normal; overflow-wrap: break-word; font-weight: 500; }
.field.col .mini { justify-self: start; }
.mini { font-size: 12px; font-weight: 800; color: var(--blue); background: var(--surface-2); padding: 6px 10px; border-radius: 8px; }
.sheet .btn-block { margin-top: 14px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--safe-b) + 16px); transform: translateX(-50%);
  z-index: 80; background: var(--text); color: #fff; font-weight: 700; font-size: 14px; padding: 10px 18px; border-radius: 999px;
}
.toast[hidden] { display: none; }

/* ---------- Player ---------- */
.player { position: relative; aspect-ratio: 16 / 9; width: 100%; background: #000; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.player iframe, .player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.offline { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 20px; text-align: center; color: var(--muted); font-size: 14px; background: var(--surface); }
.offline-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--red); }

/* ---------- Videos ---------- */
.video-list { display: grid; gap: 14px; }
.video { text-align: left; display: grid; gap: 8px; }
.video-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.play { position: absolute; inset: 0; margin: auto; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; padding-left: 4px; background: var(--red); color: #fff; font-size: 20px; }
.dur { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.75); color: #fff; font-size: 12px; font-weight: 600; padding: 2px 6px; border-radius: 6px; }
.video-title { font-weight: 700; font-size: 15px; }

/* ---------- Support cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.card { display: grid; gap: 8px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .15s ease, border-color .15s ease; }
.card:active { transform: scale(.97); }
.card { text-align: center; align-content: start; }
.card-img { aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.card-img .ph span { font-family: Anton, Impact, sans-serif; font-size: 30px; font-weight: 400; color: var(--blue); opacity: .5; }
.card-title { font-family: Anton, Impact, sans-serif; font-size: 20px; letter-spacing: .03em; text-transform: uppercase; color: var(--red); line-height: 1.1; }
.card:nth-child(even) .card-title { color: var(--blue); }
.card-sub { font-size: 11.5px; font-weight: 600; color: var(--muted); line-height: 1.3; padding: 0 2px 4px; }
.idol-head { display: flex; gap: 14px; align-items: center; padding-right: 40px; }
.idol-thumb { width: 72px; height: 90px; flex: 0 0 72px; border-radius: 12px; border: 3px solid var(--red); object-position: top; }
.idol-head .sheet-sub { margin-bottom: 0; }
.idol-label { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--red); margin: 20px 0 10px; }
.idol-label + .sheet-sub { margin-top: -6px; }
.soc-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.soc {
  display: grid; justify-items: center; gap: 4px; padding: 12px 4px 10px; border-radius: 14px;
  font-size: 12px; font-weight: 800; color: #fff; text-align: center;
}
.soc svg { width: 26px; height: 26px; fill: currentColor; }
.soc-facebook { background: #1877f2; }
.soc-instagram { background: linear-gradient(45deg, #f9a825, #e91e63 50%, #7b1fa2); }
.soc-x { background: #111; }
.soc-off { background: var(--surface-2); color: var(--muted); border: 1.5px dashed var(--line); }
.soc small { font-size: 10px; font-weight: 700; opacity: .8; margin-top: -2px; }
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.soon-btn { background: var(--surface-2); color: var(--muted); border: 1.5px dashed var(--line); }
.poster-toggle { margin-top: 18px; }
.poster-toggle summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--blue); padding: 6px 0; }
.poster-toggle .poster { margin-top: 8px; }
.poster { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.poster img { height: auto; }

/* ---------- Video modal ---------- */
.modal { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.88); display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-inner { width: 100%; max-width: 960px; color: #fff; }
.modal-inner h3 { margin-top: 12px; font-size: 16px; }
.modal-close { display: block; margin: 0 0 10px auto; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.15); color: #fff; }

/* ---------- Bottom tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(3, 1fr);
  height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: rgba(255, 250, 240, .96);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.tab { display: grid; place-content: center; justify-items: center; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 700; }
.tab svg { width: 24px; height: 24px; fill: currentColor; }
.tab.active { color: var(--red); }

/* ---------- Larger screens ---------- */
@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .video-list { grid-template-columns: repeat(2, 1fr); }
  .sheet { border-radius: 22px; margin-bottom: 24px; }
  .sheet-backdrop { align-items: center; }
}
@media (min-width: 900px) {
  .card-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .sponsors { columns: 3; }
  .tabbar { left: 50%; right: auto; width: 460px; transform: translateX(-50%); bottom: 16px; border: 1px solid var(--line); border-radius: 20px; height: var(--tabbar-h); padding-bottom: 0; box-shadow: var(--shadow); }
}
@media (hover: hover) { .card:hover { border-color: var(--red); transform: translateY(-2px); } }
