/* Top Up page (topup.html): laid out like a game shop's top-up page (slider, account card, ticker, tabs,
   gold-framed shop panel with delivery tiles and pack cards, event pages), in the site's own colours. */
.topup-page {
  --wood: rgb(62 42 24 / .94);
  --wood2: rgb(42 28 16 / .97);
  --brass: #c9a84c;
  --sand: #f5d78e;
  --tile: #f8f4ee;
  --tile-line: #d4c4a8;
  --pick: #ed7e1c;
  --card-line: #8b6914;
  --cocoa: #3a2416;
  --ember: #db6200;
  --red: #e63935;
  --coin-hi: #ffe8a0;
  --coin: #e8b445;
  --coin-lo: #b07a12;
}
.bar nav a[aria-current="page"] { color: var(--gold); }

/* --- slider ------------------------------------------------------------------------------------------- */
.tu-slider { position: relative; margin-top: 56px; height: clamp(230px, 34vw, 380px); overflow: hidden; background: var(--panel); }
.tu-slides { display: flex; height: 100%; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.tu-slide {
  position: relative; flex: 0 0 100%; height: 100%; display: flex; flex-direction: column; justify-content: center;
  align-items: flex-start; gap: 8px; padding: 0 var(--gutter) 28px; text-decoration: none; color: #fff; isolation: isolate;
  background: linear-gradient(90deg, rgb(12 10 20 / .82), rgb(12 10 20 / .35) 55%, transparent), var(--art) var(--pos, center 30%) / var(--size, cover);
}
/* A slide whose art has its subject on the left: the text goes right, over a right-hand shade. */
.tu-slide.right {
  align-items: flex-end; text-align: right;
  background: linear-gradient(270deg, rgb(12 10 20 / .82), rgb(12 10 20 / .35) 55%, transparent), var(--art) var(--pos, center 30%) / var(--size, cover);
}
.tu-eyebrow {
  font-size: 13px; font-weight: 600; padding: 4px 14px; border-radius: 999px; background: rgb(255 255 255 / .2);
  backdrop-filter: blur(4px);
}
.tu-slide-title { font: 800 clamp(28px, 4.4vw, 52px)/1.05 var(--sans); max-width: 12em; text-shadow: 0 2px 12px rgb(0 0 0 / .55); }
/* The event slides' titles are artwork (img/topup/title_*.svg): sized by height, never wider than the slide. */
.tu-slide-title.art { max-width: 100%; text-shadow: none; line-height: 0; }
.tu-slide-title.art img { display: block; width: auto; height: auto; max-width: 100%; max-height: clamp(40px, 6.6vw, 84px); }
.tu-slide-sub.art { display: block; max-width: 100%; text-shadow: none; line-height: 0; }
.tu-slide-sub.art img { display: block; width: auto; height: auto; max-width: 100%; max-height: clamp(18px, 2.7vw, 32px); }
.tu-slide-sub { font-size: clamp(16px, 2vw, 22px); font-weight: 700; color: #ffe082; text-shadow: 0 1px 8px rgb(0 0 0 / .6); }
.tu-slider-dots { position: absolute; left: 0; right: 0; bottom: 34px; display: flex; justify-content: center; gap: 2px; z-index: 2; }
.tu-slider-dots button { width: 18px; height: 22px; border: 0; padding: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.tu-slider-dots button::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: rgb(255 255 255 / .5); }
.tu-slider-dots button[aria-current="true"]::before { background: #fff; }

/* --- the content card, overlapping the slider ---------------------------------------------------------- */
.tu-content {
  position: relative; z-index: 3; max-width: 860px; margin: -24px auto 0; padding: 20px clamp(14px, 3vw, 28px) 24px;
  background: var(--panel); border: 1px solid rgb(201 168 76 / .2); border-radius: 28px; display: grid; gap: 14px;
}
.tu-view { display: grid; gap: 14px; }
.tu-view[hidden] { display: none; }

.tu-user {
  border: 1px dashed #ff6b6b; border-radius: 14px; padding: 16px;
  background: linear-gradient(135deg, rgb(255 107 107 / .1), rgb(255 255 255 / .02));
}
.tu-user-head { margin-bottom: 12px; }
.tu-user h2 { font: 700 18px var(--sans); }
.tu-user-head p { margin: 2px 0 0; color: var(--dim); font-size: 14px; }
.tu-user-head p.found { color: var(--gold); font-weight: 600; }
.tu-user-head p.bad { color: #ff9b9b; }
.tu-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-bottom: 12px; }
.tu-fields label, .tu-custom label { display: grid; gap: 6px; font-size: 13px; color: var(--dim); }
.tu-fields select, .tu-fields input, .tu-custom input {
  font: inherit; font-size: 16px; color: var(--ink); background: var(--night); border: 1px solid var(--line);
  border-radius: 10px; min-height: 44px; padding: 0 12px; width: 100%;
}
.tu-fields select:focus, .tu-fields input:focus, .tu-custom input:focus { border-color: var(--gold); outline: none; }
.tu-find {
  width: 100%; min-height: 46px; border: 0; border-radius: 999px; cursor: pointer; font: 600 16px var(--sans);
  background: var(--red); color: #fff;
}
.tu-find:hover { filter: brightness(1.1); }
.tu-find:disabled { opacity: .6; cursor: wait; }
.tu-fields.one { grid-template-columns: minmax(0, 1fr); }
.tu-signout {
  border: 0; background: none; padding: 4px 0; cursor: pointer; font: 600 14px var(--sans); color: #e63935;
  text-decoration: underline; text-underline-offset: 3px;
}

.tu-marquee { overflow: hidden; border: 1px solid #ffcc80; border-radius: 8px; background: #fff3e0; }
.tu-marquee-track { display: flex; gap: 56px; width: max-content; padding: 9px 0; animation: tu-marquee 40s linear infinite; }
.tu-marquee span { white-space: nowrap; font-size: 14px; font-weight: 600; color: #e65100; }
@keyframes tu-marquee { to { transform: translateX(-50%); } }

/* Top-Up / Events: the reference page's tab bar (measured 2026-11-09). Desktop: tabs sized to their text (12px
   20px padding, 15px semibold, 47px tall), 4px apart at the left, a 2px divider beneath, the open tab red #e63935
   with a 3px red bar the tab's full width; the other grey. Phones (below): full-width halves, 13px, the bar
   inset 8px. The grey is lighter than the reference's #666 and the divider fainter than its #e8e8e8, since they
   sit on this site's dark card. */
.tu-tabs { display: flex; gap: 4px; border-bottom: 2px solid rgb(232 232 232 / .16); margin-bottom: 2px; }
.tu-tabs button {
  position: relative; flex: 0 0 auto; min-height: 47px; padding: 12px 20px;
  font: 600 15px/1.53 var(--sans); color: #8c8c8c; background: none; border: 0;
  border-radius: 8px 8px 0 0; cursor: pointer;
}
.tu-tabs button::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 3px; border-radius: 2px 2px 0 0;
  background: transparent;
}
.tu-tabs button:hover { color: #b3b3b3; }
.tu-tabs button[aria-selected="true"] { color: #e63935; }
.tu-tabs button[aria-selected="true"]::after { background: #e63935; }
@media (max-width: 760px) {
  .tu-tabs { gap: 0; border-bottom-width: 1px; margin-bottom: -2px; }
  .tu-tabs button { flex: 1; min-height: 44px; padding: 12px 10px; font-size: 13px; line-height: 1.54; }
  .tu-tabs button::after { left: 8px; right: 8px; bottom: -1px; }
}

/* --- the shop panel ------------------------------------------------------------------------------------ */
.tu-panel {
  border-radius: 18px; padding: 18px 14px 16px; border: 2px solid var(--brass);
  background: linear-gradient(var(--wood), var(--wood2));
  box-shadow: inset 0 0 0 1px rgb(255 215 100 / .3), 0 4px 16px rgb(0 0 0 / .25);
}
.tu-panel[hidden] { display: none; }
.tu-notice {
  display: grid; gap: 6px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--brass); color: #5d4037;
  background: linear-gradient(135deg, #fff8e1, #fffde7); font-size: 14px;
}
.tu-notice p { margin: 0; }
.tu-notice-bonus { color: var(--red); font-weight: 700; }
.tu-guide { justify-self: end; font: 800 14px var(--sans); color: #e65100; background: none; border: 0; cursor: pointer; padding: 2px 0; }
.tu-section-title { font: 800 17px var(--sans); color: var(--sand); margin: 16px 2px 2px; }

.tu-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 12px 0; }
.tu-method {
  position: relative; display: grid; place-items: center; min-height: 76px; padding: 12px 10px; cursor: pointer;
  background: var(--tile); border: 3px solid var(--tile-line); border-radius: 14px;
}
.tu-method[aria-checked="true"] { border-color: var(--pick); }
.tu-method[aria-checked="true"]::after, .tu-card[aria-checked="true"]::after {
  content: "✓"; position: absolute; top: -10px; right: -10px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--pick); color: #fff; font: 900 15px/26px var(--sans); text-align: center;
}
.tu-plate {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 46px; padding: 6px 6px;
  background: #fff; border-radius: 6px;
}
.tu-plate-icon { font-size: 20px; }
.tu-plate-word { font: 800 16px var(--sans); color: #1d3a6b; letter-spacing: -.01em; white-space: nowrap; }
.tu-method[data-method="mail"] .tu-plate-word { color: #8a2433; }

/* Payment methods: PayPal and PayMongo, live once billing has their keys (site/servers' payments). */
.tu-paymethod { font: inherit; color: inherit; }
.tu-paymethod.soon { opacity: .62; filter: grayscale(.35); cursor: default; }
.tu-paymethod .tu-soon:empty { display: none; }
.tu-soon {
  position: absolute; top: -9px; left: 50%; transform: translateX(-50%); white-space: nowrap; z-index: 1;
  padding: 2px 10px; border-radius: 999px; font: 700 11px var(--sans); letter-spacing: .02em;
  background: #5d4037; color: #ffe8a0; border: 1px solid var(--brass);
}
.tu-word-paypal { font: italic 900 21px/1 var(--sans); letter-spacing: -.02em; }
.tu-word-paypal b { color: #003087; font-weight: 900; }
.tu-word-paypal i { color: #009cde; }
.tu-word-paymongo { font: 800 18px/1 var(--sans); color: #1b6d4f; letter-spacing: -.01em; }

.tu-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding-top: 12px; }
.tu-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 30px 6px 14px;
  font: inherit; color: var(--cocoa); cursor: pointer; border: 3px solid var(--card-line); border-radius: 14px;
  background:
    repeating-conic-gradient(from 0deg at 50% 38%, rgb(255 214 120 / .22) 0 6deg, transparent 6deg 18deg),
    radial-gradient(circle at 50% 38%, #fff6d8, #ffe7a8 70%, #ffd774);
}
.tu-card[aria-checked="true"] { border-color: var(--pick); }
.tu-badge {
  position: absolute; top: 6px; left: -3px; height: 26px; padding: 0 16px 0 10px; display: flex; align-items: center;
  font: 800 13px var(--sans); color: #fff; background: linear-gradient(#ff8f3a, #e8590c);
  clip-path: polygon(0 0, 100% 0, calc(100% - 9px) 50%, 100% 100%, 0 100%);
}
.tu-stack { position: relative; width: 70px; height: 64px; display: grid; place-items: center; }
.tu-stack .tu-box { position: static; width: auto; height: 92px; margin: -18px 0 -10px; filter: drop-shadow(0 3px 4px rgb(0 0 0 / .3)); }
.tu-stack > * { position: absolute; }
.tu-stack > :nth-child(1) { left: 12px; top: 8px; }
.tu-stack > :nth-child(1):nth-last-child(2) { left: 2px; top: 16px; }
.tu-stack > :nth-child(1):nth-last-child(3) { left: 0; top: 18px; }
.tu-stack > :nth-child(2) { left: 22px; top: 6px; }
.tu-stack > :nth-child(3) { left: 12px; top: -2px; }
.tu-coin {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font: 700 19px var(--serif); color: #7a4f06;
  background: radial-gradient(circle at 35% 30%, var(--coin-hi), var(--coin) 55%, var(--coin-lo));
  box-shadow: inset 0 -3px 0 rgb(0 0 0 / .18), inset 0 0 0 3px rgb(255 255 255 / .35), 0 2px 4px rgb(0 0 0 / .25);
}
.tu-coin::before { content: "A"; }
.tu-coin.small { width: 20px; height: 20px; font-size: 10px; box-shadow: inset 0 0 0 2px rgb(255 255 255 / .35); }
/* The game's own art (img/topup): the Angel Coin and the Ad Ticket. */
.tu-coin-img { position: absolute; width: 46px; height: auto; filter: drop-shadow(0 2px 3px rgb(0 0 0 / .3)); }
.tu-icon { width: 22px; height: auto; }
.tu-icon.ticket { width: 26px; }
.tu-line { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: center; }
.tu-amount { font-size: 21px; font-weight: 800; }
.tu-reward { font-size: 16px; font-weight: 700; color: var(--ember); }
.tu-price {
  margin-top: 2px; padding: 7px 0; width: 82%; border-radius: 999px; background: var(--cocoa); color: #fff;
  font: 800 16px var(--sans);
}
.tu-card.custom .tu-price { background: #6b4a2b; }
.tu-custom { padding-top: 12px; }
.tu-custom[hidden] { display: none; }
.tu-custom label { color: var(--sand); }

.tu-paybar { margin-top: 16px; display: grid; justify-items: center; gap: 10px; }
.tu-total { margin: 0; font-size: 19px; font-weight: 800; color: #fff; }
.tu-total b { color: #ffd76a; }
.tu-pay {
  width: min(100%, 440px); min-height: 52px; border: 0; border-radius: 999px; cursor: pointer;
  font: 900 18px var(--sans); color: #3e2a18; background: linear-gradient(#ffe566, #e6a800 60%, #cc8800);
  box-shadow: 0 3px 8px rgb(0 0 0 / .35);
}
.tu-pay:hover:not(:disabled) { filter: brightness(1.06); }
.tu-pay:disabled { filter: grayscale(.7) brightness(.7); cursor: not-allowed; }
.tu-result { margin: 0; min-height: 1.6em; text-align: center; font-size: 15px; }
.tu-result.ok { color: #9be7b1; }
.tu-result.bad { color: #ffb0b0; }

/* --- Events tab ---------------------------------------------------------------------------------------- */
.tu-acts { display: grid; gap: 14px; }
.tu-acts[hidden] { display: none; }
.tu-act {
  display: flex; min-height: 170px; border-radius: 16px; overflow: hidden; text-decoration: none; color: #1f1408;
  background: linear-gradient(90deg, #fff7e6 0 var(--solid, 50%), rgb(255 247 230 / 0) calc(var(--solid, 50%) + 18%)), var(--art) right center / cover;
  box-shadow: 0 3px 11px rgb(0 0 0 / .25);
}
.tu-act:hover { outline: 2px solid var(--gold); }
.tu-act-copy { width: 54%; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.tu-act-copy strong { font: 700 20px/1.2 var(--sans); }
.tu-act-copy > span:last-child { font-size: 14px; color: #4a3a28; }
.tu-act-tag { align-self: flex-start; font-size: 13px; font-weight: 600; color: #fff; padding: 3px 12px; border-radius: 999px; }
.tu-act-tag.daily { background: #2e9e6b; }
.tu-act-tag.once { background: #3994ea; }
.tu-act-tag.monthly { background: #e8590c; }
/* Phones: the card is narrower than the art, so the face would sit under the fade behind the text. Size the art to
   the card's height and slide it right, so each character's face lands in the open part. */
@media (max-width: 560px) {
  .tu-act { --solid: 40%; background-size: auto, auto 100%; background-position: 0 0, right -90px center; }
}

/* --- an event's page ----------------------------------------------------------------------------------- */
.tu-event-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.tu-event-top h2 { font: 700 22px var(--sans); }
.tu-back { flex: none; padding: 10px 20px; border-radius: 999px; background: #666; color: #fff; text-decoration: none; font-weight: 700; }
.tu-event-banner {
  display: grid; justify-items: center; gap: 4px; text-align: center; padding: 16px 18px; border-radius: 12px;
  background: linear-gradient(rgb(255 248 225 / .82), rgb(255 248 225 / .82)), var(--art, none) right center / cover;
}
.tu-event-banner strong { font: 800 20px var(--sans); color: #b5470b; }
.tu-event-banner span { font-size: 14px; color: #5d4037; }
.tu-event-need { margin: 0; text-align: center; color: #ff9b9b; }
.tu-progress { display: grid; gap: 8px; }
.tu-progress-row { display: flex; justify-content: space-between; align-items: baseline; color: var(--dim); }
.tu-progress-row b { font-size: 24px; color: var(--red); }
.tu-progress-bar { height: 10px; border-radius: 99px; background: var(--panel2); overflow: hidden; }
.tu-progress-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffb347, var(--red)); border-radius: inherit; }
.tu-tiers { display: grid; gap: 12px; margin-top: 6px; }
.tu-tier { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--panel2); }
.tu-tier-need { font-size: 18px; font-weight: 800; min-width: 3ch; }
.tu-tier-icon { font-size: 30px; line-height: 1; }
img.tu-tier-icon { width: 44px; height: 44px; object-fit: contain; filter: drop-shadow(0 2px 3px rgb(0 0 0 / .35)); }
.tu-tier-label { font-size: 14px; color: var(--dim); }
.tu-tier button {
  min-width: 112px; min-height: 46px; border: 0; border-radius: 10px; font: 700 15px var(--sans); cursor: pointer;
  background: linear-gradient(#ffb347, #e8590c); color: #fff;
}
.tu-tier button:disabled { background: #3a3550; color: #8f89a3; cursor: default; }
.tu-tier.claimed button { background: transparent; color: var(--gold); }
.tu-signed { text-align: center; margin: 4px 0; color: var(--dim); font-size: 16px; }
.tu-signed b { font-size: 26px; color: #ff8a1a; }
.tu-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.tu-day {
  position: relative; display: grid; justify-items: center; gap: 2px; padding: 6px 2px; border-radius: 8px;
  background: var(--panel2); color: var(--dim); font-size: 12px;
}
.tu-day .tu-day-icon { font-size: 22px; line-height: 1.1; filter: grayscale(.6); opacity: .75; }
.tu-day img.tu-day-icon { width: 100%; max-width: 40px; aspect-ratio: 1; object-fit: contain; }
/* Day 30: the month's big prize, filling the rest of the last row after day 29. */
.tu-day.final { grid-template-columns: auto auto 1fr; justify-items: start; align-items: center;
  gap: 12px; padding: 6px 16px; background: linear-gradient(90deg, rgb(227 189 110 / .22), rgb(227 189 110 / .06));
  border: 1px solid rgb(227 189 110 / .55); }
.tu-day.final img.tu-day-icon { max-width: 56px; width: 56px; filter: drop-shadow(0 2px 4px rgb(0 0 0 / .4)); opacity: 1; }
.tu-day.final small { font-size: 16px; font-weight: 800; color: #b5470b; }
.tu-day.final > span:first-child { font-size: 13px; font-weight: 700; }
.tu-day small { font-size: 11px; color: var(--ink); }
.tu-day.signed { background: rgb(227 189 110 / .18); color: var(--gold); }
.tu-day.signed .tu-day-icon { filter: none; opacity: 1; }
.tu-day.signed::after { content: "✓"; position: absolute; top: 2px; right: 4px; color: var(--gold); font-weight: 900; }
.tu-day.next { outline: 2px solid var(--gold); }
.tu-day.next .tu-day-icon { filter: none; opacity: 1; }
#ev-body { display: grid; gap: 14px; }  /* so the calendar, tiers and buttons space and centre like the rest */
.tu-checkin { justify-self: center; width: min(100%, 440px); margin-top: 4px; }
.tu-checkin-note { margin: -4px 0 0; text-align: center; font-size: 14px; color: var(--dim); }
.tu-event-foot { position: sticky; bottom: 10px; display: grid; place-items: center; padding-top: 4px; }
.tu-gotop {
  width: min(100%, 440px); min-height: 50px; display: grid; place-items: center; border-radius: 999px; text-decoration: none;
  font: 800 18px var(--sans); color: #fff; background: linear-gradient(90deg, var(--red), #ff7a5c);
  box-shadow: 0 3px 10px rgb(0 0 0 / .35);
}


@media (min-width: 761px) {
  .tu-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tu-methods { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .bar nav { gap: 14px; }
  .bar nav a { font-size: 14px; }
  .tu-fields { grid-template-columns: minmax(0, 1fr); }
  .tu-act-copy { width: 62%; }
  .tu-act { --solid: 60%; }
  .tu-tier { grid-template-columns: auto auto minmax(0, 1fr); }
  .tu-tier button { grid-column: 1 / -1; width: 100%; }
  .tu-plate-word { font-size: 15px; }
  .tu-amount { font-size: 19px; }
  .tu-reward { font-size: 15px; }
}
@media (max-width: 420px) {
  .bar nav a:not([aria-current]) { display: none; }
  .bar nav a[href="index.html#news"] { display: inline; }
  .tu-days { gap: 4px; }
  .tu-day small { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) { .tu-marquee-track { animation: none; } .tu-slides { transition: none; } }

/* The page's colours, panels and buttons are the game's: game-ui.css (loaded after this file). */
