/* Layout: one narrow column like a page of a spellbook, black ground with emerald smoke, silver type. */
:root {
  --ink: #050806;
  --panel: #0c1410;
  --panel-2: #111c16;
  --line: #24352b;
  --silver: #dfe4e1;
  --muted: #9aa8a0;
  --emerald: #2fbf71;
  --emerald-deep: #145c38;
  --gold: #d9b44a;
  --danger: #e2735f;
  --display: "IM Fell English SC", "Iowan Old Style", Georgia, serif;
  --serif: "IM Fell English", "Iowan Old Style", Georgia, serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--ink);
  background-image:
    radial-gradient(60rem 30rem at 15% -5%, rgba(47,191,113,.16), transparent 60%),
    radial-gradient(50rem 30rem at 100% 40%, rgba(20,92,56,.22), transparent 60%);
  background-attachment: fixed;
  color: var(--silver);
  font: 16px/1.6 var(--body);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--emerald); }
.wrap {
  max-width: 760px; margin: 0 auto;
  padding-block: max(24px, env(safe-area-inset-top, 0px)) max(40px, env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: flex; flex-direction: column; gap: 28px;
}
h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: .02em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(1.9rem, 6vw, 2.8rem); line-height: 1.1; }
h2 { font-size: clamp(1.4rem, 4.5vw, 1.8rem); color: #f2f5f3; }
em { font-family: var(--serif); font-style: italic; }
.mono { font-family: var(--mono); font-size: .92em; }
.hero { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.logo { width: min(520px, 100%); border-radius: 6px; -webkit-mask-image: radial-gradient(ellipse at center, #000 62%, transparent 100%); mask-image: radial-gradient(ellipse at center, #000 62%, transparent 100%); }
.lede { max-width: 34rem; color: var(--muted); margin: 0; font-size: 1.05rem; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.step { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.step p { margin: 0; color: var(--muted); font-size: .95rem; }
.step strong { color: var(--silver); font-weight: 600; }
.step-n { font-family: var(--display); color: var(--gold); font-size: 1.3rem; line-height: 1; }

.block { display: flex; flex-direction: column; gap: 14px; }
.fine { color: var(--muted); font-size: .85rem; margin: 0; }

.amounts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.amount {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 74px; border-radius: 10px; text-decoration: none;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); color: var(--silver);
  transition: border-color .15s, transform .15s;
}
.amount b { font-family: var(--body); font-weight: 600; font-size: 1.5rem; line-height: 1; font-variant-numeric: tabular-nums; }
.amount small { color: var(--muted); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; }
a.amount:hover, a.amount:focus-visible { border-color: var(--emerald); transform: translateY(-1px); outline: none; }
.amount.off { opacity: .45; }

.rank-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.countdown { margin: 0; color: var(--gold); font-variant-numeric: tabular-nums; font-size: .95rem; }
.rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rank li { display: grid; grid-template-columns: 34px 52px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.rank li.first { border-color: var(--gold); background: linear-gradient(90deg, rgba(217,180,74,.14), var(--panel) 60%); }
.rank li.empty { display: block; color: var(--muted); text-align: center; padding: 22px; }
.pos { font-family: var(--body); font-weight: 600; font-size: 1.1rem; color: var(--muted); text-align: center; }
.first .pos { color: var(--gold); }
.av { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: var(--panel-2); border: 2px solid var(--line); display: grid; place-items: center; font-family: var(--display); font-size: 1.4rem; color: var(--ink); }
.who { min-width: 0; }
.who .nm { font-weight: 600; overflow-wrap: anywhere; }
.who .hs { font-size: .8rem; color: var(--muted); }
.tot { font-family: var(--body); font-weight: 600; font-size: 1.25rem; color: #f2f5f3; font-variant-numeric: tabular-nums; }
.h-Gryffindor { --house: #b5352b; } .h-Slytherin { --house: #2f8f57; } .h-Ravenclaw { --house: #3b62b0; } .h-Hufflepuff { --house: #d8a72e; }
.av.ph { background: var(--house, var(--panel-2)); border-color: var(--house, var(--line)); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--house, var(--muted)); margin-right: 6px; vertical-align: 1px; }

.winner { background: var(--panel); border: 1px dashed var(--gold); border-radius: 10px; padding: 14px; display: flex; gap: 14px; align-items: center; }
.winner p { margin: 0; }
.winner .lbl { color: var(--gold); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }

form { display: flex; flex-direction: column; gap: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; color: var(--silver); }
input[type=text], input:not([type]), input[type=email], input[type=password], input[type=number], select, textarea {
  font: inherit; color: var(--silver); background: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; width: 100%;
}
input:focus-visible, select:focus-visible, textarea:focus-visible, .btn:focus-visible { outline: 2px solid var(--emerald); outline-offset: 2px; }
textarea { resize: vertical; }
fieldset { border: 1px solid var(--line); border-radius: 10px; margin: 0; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
legend { padding: 0 6px; font-family: var(--display); font-size: 1.1rem; }
.houses { flex-direction: row; flex-wrap: wrap; gap: 8px; }
.house { flex: 1 1 140px; flex-direction: row; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.house input { accent-color: var(--house); }
.house:has(input:checked) { border-color: var(--house); background: color-mix(in srgb, var(--house) 18%, transparent); }
.h-gryffindor { --house: #b5352b; } .h-slytherin { --house: #2f8f57; } .h-ravenclaw { --house: #3b62b0; } .h-hufflepuff { --house: #d8a72e; }
.check { flex-direction: row; align-items: flex-start; gap: 10px; }
.check input { margin-top: 4px; accent-color: var(--emerald); }
.drop { border: 1px dashed var(--line); border-radius: 8px; padding: 14px; cursor: pointer; color: var(--muted); }
.drop input { color: var(--muted); }
#photo-preview { width: 120px; height: 120px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.opt { color: var(--muted); font-size: .8rem; }
input.hp[type=text] { position: absolute; inset-inline-start: 0; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; overflow: hidden; clip-path: inset(50%); pointer-events: none; }
.btn { font: 600 1rem var(--body); color: #04140b; background: var(--emerald); border: 0; border-radius: 10px; padding: 14px 18px; cursor: pointer; }
.btn:disabled { opacity: .6; cursor: wait; }
.msg { margin: 0; min-height: 1.4em; }
.msg.ok { color: var(--emerald); } .msg.err { color: var(--danger); }
.rules ul { margin: 0; padding-left: 1.2rem; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.foot { text-align: center; color: var(--muted); font-size: .8rem; display: flex; flex-direction: column; gap: 4px; }
.foot p { margin: 0; }

@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .amounts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid2 { grid-template-columns: 1fr; }
  .rank li { grid-template-columns: 26px 44px minmax(0, 1fr) auto; gap: 10px; }
  .av { width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Language picker: a flag button at the top, opens a list of languages. */
.langbar { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: -12px; z-index: 5; }
.lang-wrap { margin-inline-start: auto; }
.members-link { font: 500 .9rem var(--body); color: var(--gold); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; min-height: 44px; display: inline-flex; align-items: center; background: var(--panel); }
.members-link:hover, .members-link:focus-visible { border-color: var(--gold); outline: none; }
.lang-btn, .lang-menu button {
  font: 500 .9rem var(--body); color: var(--silver); cursor: pointer;
  display: flex; align-items: center; gap: 8px; text-align: start;
}
.lang-btn { background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; min-height: 44px; }
.lang-btn:hover, .lang-btn:focus-visible, .lang-btn[aria-expanded=true] { border-color: var(--emerald); outline: none; }
.lang-btn img, .lang-menu img { width: 24px; height: 18px; border-radius: 3px; object-fit: cover; flex: none; }
.caret { color: var(--muted); font-size: .8rem; }
.lang-menu {
  position: absolute; top: calc(100% + 6px); inset-inline-end: 0;
  width: min(360px, 100%); max-height: 70vh; overflow: auto;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 8px;
  box-shadow: 0 18px 40px rgba(0,0,0,.55);
}
.lang-menu button { background: none; border: 1px solid transparent; border-radius: 8px; padding: 10px; min-height: 44px; }
.lang-menu button:hover, .lang-menu button:focus-visible { background: var(--panel); border-color: var(--line); outline: none; }
.lang-menu button[aria-current=true] { border-color: var(--emerald); background: color-mix(in srgb, var(--emerald) 14%, transparent); }

/* Right-to-left languages (Arabic). */
[dir=rtl] .rules ul { padding-left: 0; padding-right: 1.2rem; }
[dir=rtl] .dot { margin-right: 0; margin-left: 6px; }
[dir=rtl] .rank li.first { background: linear-gradient(270deg, rgba(217,180,74,.14), var(--panel) 60%); }
/* Scripts without capitals or letter-spacing keep their natural shape. */
:lang(ar) .amount small, :lang(ar) .winner .lbl, :lang(hi) .amount small, :lang(hi) .winner .lbl { letter-spacing: 0; }

/* Members area: login, ideas, debates. */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs button { font: 500 .95rem var(--body); color: var(--silver); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px; min-height: 44px; cursor: pointer; }
.tabs button[aria-selected=true] { border-color: var(--emerald); color: #f2f5f3; background: color-mix(in srgb, var(--emerald) 14%, transparent); }
.me { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.me .who { display: flex; align-items: center; gap: 10px; }
.me p { margin: 0; }
.link-btn { font: 500 .85rem var(--body); color: var(--muted); background: none; border: 0; padding: 6px 4px; cursor: pointer; text-decoration: underline; min-height: 32px; }
.link-btn:hover, .link-btn:focus-visible { color: var(--silver); outline: none; }
.link-btn.danger { color: var(--danger); }
.posts { display: flex; flex-direction: column; gap: 12px; }
.post { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.post h3 { margin: 0; font: 600 1.05rem var(--body); overflow-wrap: anywhere; }
.post .text, .reply .text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.byline { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); }
.byline b { color: var(--silver); font-weight: 600; }
.byline .av { width: 28px; height: 28px; font-size: .9rem; border-width: 1px; flex: none; }
.post-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.like { font: 600 .9rem var(--body); color: var(--silver); background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; min-height: 36px; cursor: pointer; font-variant-numeric: tabular-nums; }
.like[aria-pressed=true] { border-color: var(--danger); color: #ffd9d2; }
.replies { display: flex; flex-direction: column; gap: 10px; border-inline-start: 2px solid var(--line); padding-inline-start: 12px; }
.reply { display: flex; flex-direction: column; gap: 4px; }
.reply-form { display: flex; gap: 8px; align-items: flex-end; flex-direction: row; background: none; border: 0; padding: 0; }
.reply-form textarea { flex: 1; min-width: 0; }
.sm-btn { font: 600 .9rem var(--body); color: #04140b; background: var(--emerald); border: 0; border-radius: 8px; padding: 10px 14px; min-height: 44px; cursor: pointer; }
.sm-btn:disabled { opacity: .6; cursor: wait; }
.empty-box { color: var(--muted); text-align: center; padding: 22px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; margin: 0; }
.byline { flex-wrap: wrap; row-gap: 2px; }
.byline .link-btn { margin-inline-start: auto; }

/* ---------- The board: this week's ranking, loud on purpose (gold lights, bars, crown). ---------- */
.board {
  position: relative; padding: 26px 16px 18px; border-radius: 18px;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(217,180,74,.16), transparent 60%),
    linear-gradient(180deg, #0f1712, #070b09);
  border: 1px solid rgba(217,180,74,.65);
  box-shadow: 0 0 0 4px rgba(217,180,74,.08), 0 0 46px rgba(217,180,74,.22), inset 0 0 34px rgba(217,180,74,.07);
}
/* a row of chasing bulbs along the top and bottom edges */
.board::before, .board::after {
  content: ""; position: absolute; left: 14px; right: 14px; height: 6px; pointer-events: none;
  background-image: radial-gradient(circle, #ffe7a3 0 2.2px, transparent 2.6px);
  background-size: 18px 6px; background-repeat: repeat-x;
  filter: drop-shadow(0 0 4px rgba(255,214,110,.9));
  animation: bulbs 1.1s steps(2) infinite;
}
.board::before { top: 8px; } .board::after { bottom: 6px; animation-delay: .55s; }
@keyframes bulbs { 50% { opacity: .35; background-position: 9px 0; } }
.board h2 {
  font-size: clamp(1.6rem, 6vw, 2.2rem);
  background: linear-gradient(180deg, #fff3c4, #d9b44a 55%, #9a7420); -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 22px rgba(217,180,74,.35);
}
.live { margin: 0; display: inline-flex; align-items: center; gap: 6px; font: 600 .75rem var(--body); letter-spacing: .12em; color: #ffb4a6; border: 1px solid rgba(226,115,95,.6); border-radius: 999px; padding: 4px 10px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #ff5a44; box-shadow: 0 0 8px #ff5a44; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; transform: scale(.8); } }
.board .countdown { font: 600 1.15rem var(--body); letter-spacing: .02em; color: #ffe7a3; text-shadow: 0 0 14px rgba(217,180,74,.6); text-align: center; background: rgba(0,0,0,.45); border: 1px solid rgba(217,180,74,.3); border-radius: 10px; padding: 8px 12px; }
.board .rank { gap: 10px; }
.board .rank li { position: relative; overflow: hidden; grid-template-columns: 34px 52px minmax(0, 1fr) auto; row-gap: 8px; background: linear-gradient(180deg, #121c16, #0b120e); }
.board .rank li.empty { display: block; }
.board .rank .bar { grid-column: 1 / -1; height: 10px; border-radius: 999px; background: rgba(0,0,0,.55); border: 1px solid var(--line); overflow: hidden; }
.board .rank .bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--house, var(--emerald)), #ffe08a); box-shadow: 0 0 12px color-mix(in srgb, var(--house, var(--emerald)) 70%, transparent); transition: width 1.2s cubic-bezier(.2,.8,.2,1); }
[dir=rtl] .board .rank .bar i { background: linear-gradient(270deg, var(--house, var(--emerald)), #ffe08a); }
.board .rank .gap { font-size: .75rem; color: var(--muted); }
.board .rank .tot { font-size: 1.4rem; color: #ffe7a3; text-shadow: 0 0 12px rgba(217,180,74,.45); }
.board .rank .tot.bump { animation: bump .9s ease; }
@keyframes bump { 30% { transform: scale(1.25); color: #fff; } }
.board .rank li.first {
  padding: 16px 12px; grid-template-columns: 38px 68px minmax(0, 1fr) auto;
  border: 1px solid #f0cf6b; background: linear-gradient(120deg, rgba(217,180,74,.28), #101a14 55%, rgba(217,180,74,.14));
  box-shadow: 0 0 26px rgba(217,180,74,.35), inset 0 0 18px rgba(217,180,74,.12);
}
.board .rank li.first::after { /* a slow shine sweeping across the leader */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.16) 50%, transparent 60%);
  background-size: 250% 100%; animation: shine 3.2s linear infinite;
}
@keyframes shine { from { background-position: 130% 0; } to { background-position: -130% 0; } }
.board .rank li.first .pos { font-size: 1.6rem; filter: drop-shadow(0 0 8px rgba(255,214,110,.8)); }
.board .rank li.first .av { width: 68px; height: 68px; font-size: 1.8rem; border-color: #f0cf6b; box-shadow: 0 0 16px rgba(217,180,74,.55); }
.board .rank li.first .nm { font-size: 1.15rem; }
.board .rank li.first .gap { color: #ffe7a3; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.board .rank li.first .tot { font-size: 1.9rem; }
.board .rank li.first .bar { height: 12px; }
.board .rank li.second { border-color: #aeb9b3; } .board .rank li.second .pos { color: #dfe4e1; }
.board .rank li.third { border-color: #a9744a; } .board .rank li.third .pos { color: #d79a6c; }
:lang(ar) .board .rank li.first .gap, :lang(hi) .board .rank li.first .gap { letter-spacing: 0; }

/* What every supporter gets */
.perks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.perk { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: 12px; padding: 16px 14px; display: flex; flex-direction: column; gap: 6px; }
.perk-ic { font-size: 1.8rem; line-height: 1; }
.perk h3 { margin: 0; font: 600 1rem var(--body); color: #f2f5f3; text-wrap: balance; }
.perk p { margin: 0; color: var(--muted); font-size: .92rem; }
.perks-note { margin: 0; text-align: center; font-weight: 600; color: #ffe7a3; background: rgba(217,180,74,.1); border: 1px solid rgba(217,180,74,.45); border-radius: 12px; padding: 12px 14px; text-wrap: balance; }

/* Hall of fame: top supporters of all time */
.fame { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.fame li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.fame .nm { font-weight: 600; overflow-wrap: anywhere; }
.fame .tot { font-size: 1.05rem; color: #ffe7a3; }

@media (max-width: 560px) {
  .perks { grid-template-columns: 1fr; }
  .board .rank li { grid-template-columns: 26px 44px minmax(0, 1fr) auto; }
  .board .rank li.first { grid-template-columns: 30px 56px minmax(0, 1fr) auto; }
  .board .rank li.first .av { width: 56px; height: 56px; font-size: 1.5rem; }
  .board .rank li.first .tot { font-size: 1.55rem; }
}
@media (prefers-reduced-motion: reduce) { .board::before, .board::after, .live-dot, .board .rank li.first::after, .board .rank .tot.bump { animation: none !important; } }
/* seven amounts: the biggest one takes two cells and gets the gold treatment */
.amount:last-child { grid-column: span 2; border-color: rgba(217,180,74,.6); background: linear-gradient(180deg, rgba(217,180,74,.18), var(--panel)); }
.amount:last-child b { color: #ffe7a3; }

/* Sample board for an empty week: same look, visibly marked as an example. */
.board .rank li.ex-note { color: #ffe7a3; border: 1px dashed rgba(217,180,74,.6); background: rgba(217,180,74,.08); font-weight: 600; text-wrap: balance; }
.board .rank li.sample { opacity: .78; border-style: dashed; }
.board .rank li.sample.first::after { animation: none; background: none; }
.ex-tag { margin-inline-start: 8px; font: 500 .68rem var(--body); color: var(--muted); letter-spacing: .04em; text-transform: lowercase; vertical-align: 1px; }
:lang(ar) .ex-tag, :lang(hi) .ex-tag { letter-spacing: 0; }
/* country flag next to a supporter's name */
.cflag { display: inline-block; width: 20px; height: 15px; border-radius: 2px; margin-inline-start: 7px; vertical-align: -2px; object-fit: cover; box-shadow: 0 0 0 1px rgba(255,255,255,.12); }
/* Members' welcome page: thank-you, video and the story to read. */
.welcome { background: linear-gradient(180deg, rgba(217,180,74,.14), var(--panel)); border: 1px solid rgba(217,180,74,.5); border-radius: 14px; padding: 18px 16px; display: flex; flex-direction: column; gap: 10px; text-align: center; }
.welcome h2 { color: #ffe7a3; }
.welcome p { margin: 0; color: var(--silver); }
.thanks-label { font-weight: 600; color: #ffe7a3 !important; margin-top: 6px !important; }
.welcome video { display: block; width: 100%; height: auto; border-radius: 10px; margin-top: 8px; background: #000; }
.chapters { display: flex; flex-direction: column; gap: 10px; }
.chapter { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.chapter[open] { border-color: rgba(217,180,74,.45); }
.chapter summary { cursor: pointer; padding: 14px; min-height: 48px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.ch-n { font-family: var(--display); color: var(--gold); font-size: 1.1rem; }
.ch-t { font-weight: 600; overflow-wrap: anywhere; }
.ch-new { font: 600 .7rem var(--body); letter-spacing: .08em; text-transform: uppercase; color: #04140b; background: var(--emerald); border-radius: 999px; padding: 2px 8px; }
.ch-text { padding: 0 16px 16px; max-width: 62ch; margin: 0 auto; font: 1.08rem/1.75 var(--serif); color: #e9ece9; }
.ch-text p { margin: 0 0 1em; white-space: pre-wrap; overflow-wrap: anywhere; }
:lang(ar) .ch-new, :lang(hi) .ch-new { letter-spacing: 0; }

/* Notification bell and list (members area). */
.me-actions { display: flex; align-items: center; gap: 10px; }
.bell { position: relative; width: 44px; height: 44px; border-radius: 50%; background: var(--panel-2); border: 1px solid var(--line); cursor: pointer; font-size: 1.15rem; line-height: 1; }
.bell:hover, .bell:focus-visible, .bell[aria-expanded=true] { border-color: var(--gold); outline: none; }
.bell-n { position: absolute; top: -4px; inset-inline-end: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: #ff5a44; color: #fff; font: 600 .72rem/20px var(--body); text-align: center; box-shadow: 0 0 8px rgba(255,90,68,.7); }
.notifs { background: var(--panel-2); border: 1px solid rgba(217,180,74,.45); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.notifs h2 { font-size: 1.2rem; color: #ffe7a3; }
.notifs ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow: auto; }
.n-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 10px; border: 1px solid transparent; background: var(--panel); }
.n-item.unread { border-color: rgba(217,180,74,.55); background: rgba(217,180,74,.09); }
.n-item.clickable { cursor: pointer; }
.n-item.clickable:hover, .n-item.clickable:focus-visible { border-color: var(--emerald); outline: none; }
.n-ic { font-size: 1.2rem; line-height: 1.4; flex: none; }
.n-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.n-text { margin: 0; overflow-wrap: anywhere; }
.n-when { margin: 0; font-size: .78rem; color: var(--muted); }
.n-link { font-weight: 600; font-size: .9rem; align-self: flex-start; padding: 4px 0; }
.n-empty { color: var(--muted); text-align: center; padding: 14px; }
.me { flex-wrap: nowrap; }
.me .who { min-width: 0; }
.me .who p { overflow-wrap: anywhere; }
/* four things every supporter gets + how access works + a look inside */
.perks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.access { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.access h3, .preview-h { margin: 0 0 6px; font: 600 1rem var(--body); color: #f2f5f3; }
.access p { margin: 0; color: var(--muted); font-size: .95rem; }
.preview-h { margin: 6px 0 0; text-align: center; }
.preview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.preview img { width: 100%; height: auto; border-radius: 14px; border: 1px solid rgba(217,180,74,.4); box-shadow: 0 16px 40px rgba(0,0,0,.5); }
@media (max-width: 560px) { .perks { grid-template-columns: 1fr; } }

/* Simple home: ranking, amounts and two links. The entry form lives on join.html. */
.home-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pill-dl { font: 600 .9rem var(--body); color: #ffe7a3; background: rgba(217,180,74,.12); border: 1px solid rgba(217,180,74,.55); border-radius: 999px; padding: 10px 18px; min-height: 44px; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.pill-dl:hover, .pill-dl:focus-visible { background: rgba(217,180,74,.24); outline: none; }
.pill-dl.ghost { color: var(--silver); background: var(--panel); border-color: var(--line); }
.paybox { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: start; background: linear-gradient(180deg, rgba(217,180,74,.14), var(--panel)); border: 1px solid rgba(217,180,74,.55); border-radius: 14px; padding: 16px; }
.paybox-n { margin: 0; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font: 400 1.4rem var(--display); color: #ffe7a3; background: rgba(0,0,0,.4); border: 1px solid rgba(217,180,74,.45); }
.paybox p { margin: 0 0 12px; color: var(--silver); }
.paybox .btn { display: inline-block; text-decoration: none; }
/* an entry still being verified: on the board right away, visibly marked */
.ex-tag.wait { color: #ffe7a3; text-transform: none; white-space: nowrap; }
.board .rank li.waiting { border-style: dashed; }
#after { display: block; text-align: center; text-decoration: none; }
#after[hidden] { display: none; }
/* the way to the book, right under the headline */
.book-link { font: 600 1rem var(--body); color: #04140b; background: linear-gradient(180deg, #ffe7a3, #d9b44a); border-radius: 999px; padding: 12px 20px; min-height: 48px; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 0 26px rgba(217,180,74,.4); text-wrap: balance; text-align: center; }
.book-link:hover, .book-link:focus-visible { filter: brightness(1.08); outline: 2px solid #fff3c4; outline-offset: 2px; }
/* empty week: the three places, open */
.board .rank li.slot { border-style: dashed; }
.board .rank li.slot .av { background: rgba(217,180,74,.1); border-color: rgba(217,180,74,.5); color: #ffe7a3; }
.board .rank li.slot .nm { color: #ffe7a3; }
.board .rank li.slot:not(.first) { opacity: .7; }
.board .rank li.slot:not(.first) .nm { color: var(--muted); font-weight: 500; }
.board .rank li.slot.first .gap { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--silver); }
.trust { margin: 0; text-align: center; font-size: .82rem; color: var(--muted); }
.trust::before { content: "🔒 "; }
.also { margin: 0; text-align: center; color: #ffe7a3; font-weight: 600; text-wrap: balance; }
.amount.pick { border-color: var(--emerald); box-shadow: 0 0 22px rgba(47,191,113,.3); }
.amount.pick small { color: var(--emerald); font-weight: 600; }
.gate .pill-dl { margin-top: 2px; }

/* prizes, community goal and last hours */
.prizes ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.prizes li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; align-items: start; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; color: var(--silver); }
.prizes li > span:first-child { font-size: 1.4rem; line-height: 1.2; text-align: center; }
.prizes li:first-child { border-color: rgba(217,180,74,.6); background: linear-gradient(120deg, rgba(217,180,74,.16), var(--panel) 70%); color: #f6f8f6; }
.prizes li.all { border-color: rgba(47,191,113,.55); background: linear-gradient(120deg, rgba(47,191,113,.14), var(--panel) 70%); color: #f6f8f6; font-weight: 600; }
.prizes li.ever { border-style: dashed; }
.goal { background: rgba(0,0,0,.4); border: 1px solid rgba(47,191,113,.45); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.goal p { margin: 0; }
.goal-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; align-items: baseline; }
.goal-top b { color: #f2f5f3; }
.goal-top span { color: #ffe7a3; font-weight: 600; font-variant-numeric: tabular-nums; }
.goal-bar { height: 12px; border-radius: 999px; background: rgba(0,0,0,.55); border: 1px solid var(--line); overflow: hidden; }
.goal-bar i { display: block; height: 100%; min-width: 4px; border-radius: 999px; background: linear-gradient(90deg, var(--emerald), #ffe08a); box-shadow: 0 0 12px rgba(47,191,113,.6); transition: width 1.2s cubic-bezier(.2,.8,.2,1); }
[dir=rtl] .goal-bar i { background: linear-gradient(270deg, var(--emerald), #ffe08a); }
.goal-txt { font-size: .88rem; color: var(--muted); }
.goal.done { border-color: #f0cf6b; } .goal.done .goal-txt { color: #ffe7a3; font-weight: 600; }
.board .countdown.urgent { color: #fff; border-color: #ff5a44; background: rgba(255,90,68,.18); text-shadow: 0 0 14px rgba(255,90,68,.7); animation: pulse 1.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .board .countdown.urgent { animation: none; } }
.hero-links { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
.book-link.alt { color: #ffe7a3; background: rgba(217,180,74,.1); border: 1px solid rgba(217,180,74,.65); box-shadow: none; }
.book-link.alt:hover, .book-link.alt:focus-visible { background: rgba(217,180,74,.22); filter: none; }
.av.ph.h- { background: rgba(217,180,74,.12); color: #ffe7a3; }  /* sin casa elegida */

.home-thanks { text-align: center; }
.home-thanks video { width: 100%; max-width: 560px; height: auto; border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.5); background: #000; }

/* ---- home: the latest videos ---- */
.vids { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.vid { display: flex; flex-direction: column; gap: 8px; padding: 0; background: none; border: 0; color: inherit; font: inherit; text-align: start; cursor: pointer; min-width: 0; }
.vid-th { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #000; }
.vid-th img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.vid:hover .vid-th img, .vid:focus-visible .vid-th img { transform: scale(1.05); }
.vid:focus-visible { outline: none; } .vid:focus-visible .vid-th { border-color: var(--emerald); }
.vid-play { position: absolute; inset: 0; margin: auto; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.65); color: #fff; font-size: 1.1rem; padding-inline-start: 3px; border: 1px solid rgba(255,255,255,.5); }
.vid-t { font-size: .88rem; line-height: 1.35; color: var(--silver); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vid-box { padding: 0; border: 0; background: transparent; max-width: none; max-height: none; width: min(94vw, 142vh); overflow: visible; }
.vid-box::backdrop { background: rgba(0,0,0,.85); }
.vid-frame { aspect-ratio: 16 / 9; max-height: 80vh; margin: 0 auto; background: #000; border-radius: 12px; overflow: hidden; }
.vid-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.vid-x { position: absolute; top: -46px; inset-inline-end: 0; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel-2); color: #fff; font-size: 1rem; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .vid-th img { transition: none; } }

/* ---- report a problem ---- */
.bug-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; min-height: 44px; color: var(--silver); font: 500 .85rem var(--body); cursor: pointer; }
.bug-btn:hover, .bug-btn:focus-visible { border-color: var(--emerald); color: #fff; outline: none; }
.bug-btn.float { position: fixed; top: 12px; inset-inline-end: 12px; z-index: 20; }
@media (max-width: 640px) { .bug-lb { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } }
.bug-box { width: min(92vw, 460px); padding: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); color: var(--ink); }
.bug-box::backdrop { background: rgba(0,0,0,.75); }
.bug-box form { display: flex; flex-direction: column; gap: 12px; padding: 20px; }
.bug-box h2 { margin: 0; font-size: 1.3rem; }
.bug-p { margin: 0; color: var(--silver); font-size: .92rem; line-height: 1.45; }
.bug-box textarea, .bug-box input[type=email] { width: 100%; box-sizing: border-box; font: inherit; color: var(--ink); background: #050807; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.bug-box textarea:focus, .bug-box input:focus { outline: none; border-color: var(--emerald); }
.bug-msg { margin: 0; min-height: 1.2em; color: #ffe7a3; font-size: .92rem; }
.bug-row { display: flex; gap: 10px; justify-content: flex-end; }
.bug-row button { font: 600 .95rem var(--body); border-radius: 999px; padding: 10px 18px; min-height: 44px; cursor: pointer; }
.bug-send { background: var(--emerald); color: #04140b; border: 0; }
.bug-cancel { background: none; color: var(--silver); border: 1px solid var(--line); }

.already { text-align: center; margin: 0; }
.linkish { background: none; border: 0; padding: 10px; min-height: 44px; font: inherit; font-size: .92rem; color: var(--muted); text-decoration: underline; cursor: pointer; }
.linkish:hover, .linkish:focus-visible { color: #ffe7a3; outline: none; }
