/* =====================================================================
   50 - PAGES
   Auth (login/register/verify), account, admin dashboard widgets.
   ===================================================================== */

/* ---------- Auth: art on the left, form on the right ------------------- */
.auth { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; padding-top: var(--nav-h); }
.auth-art { position: relative; isolation: isolate; overflow: hidden; }
.auth-art::before { content: ''; position: absolute; inset: -3%; z-index: -2; background: var(--hero-image) 40% 30% / cover; animation: kenburns 30s ease-in-out infinite alternate; }
.auth-art::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(6, 6, 8, .15), rgba(6, 6, 8, .3) 60%, var(--ink-950)), linear-gradient(0deg, var(--ink-950), transparent 40%); }
.auth-art-copy { position: absolute; left: clamp(24px, 5vw, 70px); bottom: clamp(30px, 8vh, 80px); max-width: 460px; }
.auth-art-copy h2 { margin: 0 0 14px; font-family: var(--font-display); font-weight: 400; font-size: clamp(48px, 6vw, 84px); line-height: .9; letter-spacing: 2px; }
.auth-art-copy p { margin: 0; color: var(--text-dim); }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 40px clamp(20px, 5vw, 70px); }
.auth-card { width: 100%; max-width: 460px; padding: 30px 30px 26px; background: rgba(20, 20, 23, .92); border: 1px solid var(--line); border-top: 3px solid var(--accent); box-shadow: 0 30px 70px rgba(0, 0, 0, .55); animation: fade-up .8s var(--ease-out) both; }
@media (max-width: 575.98px) { .auth-card { padding: 22px 16px; } }
.auth-card h1 { margin-bottom: 6px; font-size: 30px; }
.auth-card .sub { margin-bottom: 28px; color: var(--text-dim); }
.auth-card .form-group { margin-bottom: 18px; }
.auth-switch { margin-top: 22px; color: var(--text-dim); font-size: 14px; text-align: center; }
@media (max-width: 991.98px) { .auth { grid-template-columns: 1fr; } .auth-art { display: none; } }

/* ---------- Account ---------------------------------------------------- */

/* ---------- Admin dashboard -------------------------------------------- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-bottom: 22px; }
.kpi {
    position: relative;
    overflow: hidden;
    padding: 18px 18px 16px;
    border-radius: 0;
    background: #141417;
    border: 1px solid var(--line);
    border-top: 3px solid var(--kpi-color, var(--accent));
    transition: transform .3s var(--ease-out), border-color .3s;
}
.kpi:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.kpi::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, var(--kpi-color, var(--accent)), transparent 55%); opacity: .07; }
.kpi-label { color: var(--text-dim); font-size: 13px; font-weight: 600; letter-spacing: .5px; }
.kpi-value { margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-display); font-size: 36px; line-height: 1; letter-spacing: 1px; color: #fff; }
.kpi-value.is-text { font-family: var(--font); font-size: 24px; font-weight: 800; font-stretch: var(--stretch-tight); letter-spacing: 0; line-height: 1.5; }   /* Thai words (Bebas has no Thai): shorter, never cut */
.kpi-sub { margin-top: 6px; color: var(--text-faint); font-size: 12px; }
.kpi-icon { position: absolute; right: 14px; top: 14px; display: grid; place-items: center; width: 38px; height: 38px; color: #fff; font-size: 16px; background: var(--tex-grunge) 0 0 / 160px repeat, var(--kpi-color, var(--accent)); -webkit-mask: var(--mask-edge) 0 0 / 100% 100% no-repeat; mask: var(--mask-edge) 0 0 / 100% 100% no-repeat; opacity: .9; }
.kpi-label, .kpi-value { padding-right: 46px; }
.kpi.is-alert { border-color: rgba(255, 203, 71, .5); box-shadow: 0 0 0 1px rgba(255, 203, 71, .2), 0 0 30px rgba(255, 203, 71, .08); }
.trend-up { color: var(--ok); }
.trend-down { color: var(--danger); }

/* SVG charts drawn server-side by <x-chart> */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--text-faint); font-size: 10px; font-family: var(--font); }
.chart .bar { transition: opacity .2s; }
.chart .bar:hover { opacity: .75; }
.chart .line { fill: none; stroke: var(--accent-2); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 2000; stroke-dashoffset: 2000; animation: draw 2s var(--ease-out) forwards; }
.chart .area { opacity: 0; animation: fade-in 1.2s .6s forwards; }
.chart .bar { transform-box: fill-box; transform-origin: bottom; animation: grow-y .9s var(--ease-out) both; }
.chart-legend { display: flex; gap: 16px; color: var(--text-dim); font-size: 13px; }
.chart-legend b { color: #fff; font-weight: 500; }

.rank-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.rank-row:last-child { border-bottom: 0; }
.rank-no { width: 26px; height: 26px; display: grid; place-items: center; flex: none; border-radius: 2px; font-size: 12px; color: var(--text-dim); background: rgba(255, 255, 255, .05); }
.rank-row:nth-child(1) .rank-no { color: var(--accent-ink); background: var(--accent-2); }
.rank-bar { height: 4px; margin-top: 5px; border-radius: 4px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

/* ---------- Player portrait (<x-avatar>) ------------------------------
   Octagon frame: outer span = glow (drop-shadow survives the clip),
   .avatar-frame = red->brass gradient rim, img = portrait on dark smoke. */
.avatar { display: block; width: 136px; height: 136px; filter: drop-shadow(0 10px 24px rgba(184, 19, 27, .3)); }
.avatar-sm { display: inline-block; width: 30px; height: 30px; vertical-align: middle; filter: none; }
.avatar-frame {
    display: block;
    width: 100%; height: 100%;
    padding: 2px;
    background: linear-gradient(150deg, var(--accent-2), var(--accent) 55%, #5e0d12);
    clip-path: polygon(29% 0, 71% 0, 100% 29%, 100% 71%, 71% 100%, 29% 100%, 0 71%, 0 29%);
}
.avatar img {
    display: block;
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: 50% 0;
    background: radial-gradient(circle at 50% 30%, #2a1a1d, #0a0c12 70%);
    clip-path: inherit;
    transform-origin: 50% 0;
    transition: transform .6s var(--ease-out);
}
.avatar:hover img { transform: scale(1.06); }

/* ---------- Download page -------------------------------------------- */
.dl-group { margin: 0 0 14px; color: var(--accent-2); font-size: 18px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.dl-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 14px; }
.dl-tile { min-width: 0; padding: 18px 22px; }
.dl-tile-text { flex: 1; min-width: 0; }
.dl-tile .cta-tile-title { font-size: 24px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-tile-arrow { flex: none; font-size: 18px; opacity: .7; transition: transform .3s var(--ease-out), opacity .3s; }
.dl-tile:hover .dl-tile-arrow { opacity: 1; transform: translateY(3px); }
.dl-empty { padding: 26px; color: var(--text-dim); text-align: center; background: #141417; border: 1px dashed var(--line-strong); }

.dl-step {
    position: relative;
    overflow: hidden;
    padding: 26px 22px 22px;
    background: #141417;
    border: 1px solid var(--line);
    border-top: 3px solid var(--accent);
    transition: transform .35s var(--ease-out), border-color .35s;
}
.dl-step:hover { transform: translateY(-5px); border-color: rgba(184, 19, 27, .55); }
.dl-step-no { position: absolute; top: 6px; right: 14px; font-family: var(--font-display); font-size: 64px; line-height: 1; color: rgba(255, 255, 255, .05); }
.dl-step-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: 16px;
    color: #fff;
    font-size: 22px;
    background: var(--tex-grunge) 0 0 / 200px repeat, linear-gradient(180deg, var(--accent-hot), var(--accent) 55%, var(--accent-dark));
    -webkit-mask: var(--mask-edge) 0 0 / 100% 100% no-repeat;
    mask: var(--mask-edge) 0 0 / 100% 100% no-repeat;
}
.dl-step-title { margin: 0 0 6px; color: #fff; font-size: 20px; }
.dl-step-text { margin: 0; color: var(--text-dim); font-size: 14.5px; }

.dl-req { overflow-x: auto; background: #141417; border: 1px solid var(--line); border-top: 3px solid var(--accent); }
.dl-req .table { color: var(--text); }
.dl-req th, .dl-req td { padding: 13px 20px; border-color: var(--line) !important; vertical-align: middle; }
.dl-req thead th { border-top: 0; color: var(--text-dim); font-size: 13px; letter-spacing: 1px; text-transform: uppercase; }
.dl-req tbody th { width: 22%; color: var(--accent-2); font-weight: 700; white-space: nowrap; }
.dl-req .is-rec { color: #fff; background: rgba(184, 19, 27, .08); }
.dl-req thead .is-rec { color: var(--accent-hot); }

/* ---------- Ranking: podium + list ------------------------------------ */
.podium { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 14px; max-width: 900px; margin-left: auto; margin-right: auto; }
.podium-slot {
    --medal: #b9bcc4;
    position: relative;
    min-width: 0;
    padding: 46px 18px 22px;
    text-align: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, .04), transparent 70%), #141417;
    border: 1px solid var(--line);
    border-top: 3px solid var(--medal);
}
.podium-slot.is-1 { --medal: #e9c35a; padding-top: 70px; padding-bottom: 34px; background: linear-gradient(180deg, rgba(184, 19, 27, .22), transparent 75%), #141417; box-shadow: 0 20px 50px rgba(184, 19, 27, .18); }
.podium-slot.is-3 { --medal: #c27a45; }
.podium-rank {
    position: absolute;
    top: -22px;
    left: 50%;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    transform: translateX(-50%);
    color: #111;
    font-family: var(--font-display);
    font-size: 28px;
    background: var(--tex-grunge) 0 0 / 160px repeat, var(--medal);
    -webkit-mask: var(--mask-edge) 0 0 / 100% 100% no-repeat;
    mask: var(--mask-edge) 0 0 / 100% 100% no-repeat;
}
.podium-crown { position: absolute; top: 34px; left: 50%; transform: translateX(-50%); color: #e9c35a; font-size: 22px; filter: drop-shadow(0 0 10px rgba(233, 195, 90, .5)); }
.podium-name { color: #fff; font-size: 19px; font-weight: 700; }
.podium-slot.is-1 .podium-name { font-size: 23px; }
.podium-value { margin-top: 4px; color: var(--medal); font-family: var(--font-display); font-size: 34px; line-height: 1; letter-spacing: 1px; }
.podium-slot.is-1 .podium-value { font-size: 44px; }
.podium-value small, .rank-value small { font-family: var(--font); font-size: 13px; color: var(--text-dim); letter-spacing: 0; }

.rank-list { max-width: 900px; margin: 0 auto; background: #141417; border: 1px solid var(--line); border-top: 3px solid var(--accent); }
.rank-item { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-bottom: 1px solid var(--line); transition: background .2s; }
.rank-item:last-child { border-bottom: 0; }
.rank-item:hover { background: rgba(184, 19, 27, .08); }
.rank-item .rank-no { width: 34px; height: 30px; font-family: var(--font-display); font-size: 18px; color: #fff; background: #2a2a2f; border-radius: 0; }
.rank-name { flex: 1; min-width: 0; color: #fff; font-weight: 600; }
.rank-value { color: var(--accent-2); font-family: var(--font-display); font-size: 24px; letter-spacing: 1px; }
@media (max-width: 575.98px) {
    .podium { grid-template-columns: 1fr; gap: 30px; }
    .podium-slot.is-1 { order: -1; }
}

/* ---------- Shop -------------------------------------------------------- */
.shop-tabs { justify-content: center; }
.shop-tabs small { opacity: .7; font-weight: 600; }
.shop-card { display: flex; flex-direction: column; height: 100%; background: #141417; border: 1px solid var(--line); transition: transform .35s var(--ease-out), border-color .35s, box-shadow .35s; }
.shop-card:hover { transform: translateY(-6px); border-color: rgba(184, 19, 27, .55); box-shadow: 0 22px 50px rgba(0, 0, 0, .55), 0 0 0 1px rgba(184, 19, 27, .25); }
.shop-card.is-sold-out { filter: grayscale(.85); opacity: .6; }
.shop-card.is-sold-out:hover { transform: none; }

.shop-media {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: radial-gradient(circle at 50% 60%, rgba(184, 19, 27, .35), transparent 62%), linear-gradient(180deg, #1c1c21, #0e0e10);
    border-bottom: 3px solid var(--accent);
}
.shop-media::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: var(--tex-grunge) 0 0 / 300px repeat; opacity: .35; }
.shop-media img { position: relative; z-index: 1; max-width: 78%; max-height: 80%; object-fit: contain; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .7)); transition: transform .6s var(--ease-out); }
.shop-card:hover .shop-media img { transform: scale(1.08) rotate(-2deg); }
.shop-media-icon { position: relative; z-index: 1; color: rgba(255, 255, 255, .85); font-size: 64px; filter: drop-shadow(0 8px 16px rgba(184, 19, 27, .6)); }
.shop-cat { position: absolute; z-index: 2; top: 12px; left: 12px; padding: 3px 10px; color: var(--accent-2); font-size: 12px; font-weight: 700; letter-spacing: .5px; background: rgba(6, 6, 8, .75); border: 1px solid rgba(214, 199, 165, .35); }
.shop-stock { position: absolute; z-index: 2; top: 12px; right: 12px; padding: 3px 10px; color: #d2ffeb; font-size: 12px; font-weight: 700; background: rgba(29, 143, 95, .85); }
.shop-stock.is-low { color: #1a1206; background: #e9c35a; }
.shop-stock.is-out { color: #fff; background: var(--accent); }

.shop-card-body { flex: 1; padding: 16px 18px 6px; }
.shop-card-title { margin: 0 0 6px; color: #fff; font-size: 21px; }
.shop-card-detail { margin-bottom: 10px; color: var(--text-dim); font-size: 14px; }
.shop-items { margin: 0; padding: 0; list-style: none; font-size: 14.5px; }
.shop-items li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.shop-item-icon { flex: none; width: 46px; height: 46px; padding: 3px; object-fit: contain; background: #1c1c21; border: 1px solid var(--line); border-radius: 50%; }
.shop-item-icon.is-empty { display: grid; place-items: center; color: var(--text-faint); font-size: 19px; }
.shop-item-name { flex: 1; min-width: 0; color: var(--text); text-align: left; }
.shop-limit { margin: -2px 0 8px; color: #e9c35a; font-size: 13px; font-weight: 600; }
.shop-limit.is-maxed { color: var(--danger); }
.shop-items li:last-child { border-bottom: 0; }
.shop-items i { color: var(--accent-hot); }
.shop-items span { margin-left: auto; color: var(--accent-2); font-weight: 700; }

.shop-card-foot { padding: 14px 18px 18px; border-top: 1px solid var(--line); background: rgba(255, 255, 255, .015); }
.shop-price { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.shop-price i { color: #e9c35a; font-size: 20px; }
.shop-price-value { color: #fff; font-family: var(--font-display); font-size: 40px; line-height: 1; letter-spacing: 1px; }
.shop-price-cur { color: var(--accent-hot); font-weight: 700; }
.shop-qty-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.shop-qty { display: flex; align-items: stretch; border: 1px solid var(--line-strong); }
.shop-qty button { width: 36px; color: #fff; background: #26262b; border: 0; transition: background .2s; }
.shop-qty button:hover:not(:disabled) { background: var(--accent); }
.shop-qty input { width: 56px; padding: 6px 0; color: #fff; font-weight: 700; text-align: center; background: rgba(6, 6, 8, .6); border: 0; -moz-appearance: textfield; }
.shop-qty input::-webkit-outer-spin-button, .shop-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.shop-total { color: var(--text-dim); font-size: 14px; }
.shop-total b { color: #fff; font-size: 16px; }
.shop-buy-form.is-short .shop-total b { color: var(--danger); }

/* ---------- Rewards ---------------------------------------------------- */
.reward-goal { margin-bottom: 26px; color: var(--text-dim); font-size: 16px; }
.reward-goal strong { color: var(--accent-hot); font-family: var(--font-display); font-size: 30px; font-weight: 400; letter-spacing: 1px; vertical-align: -3px; }
.reward-track { position: relative; height: 74px; margin: 0 18px 0 6px; }
.reward-track-bar { position: absolute; left: 0; right: 0; top: 17px; height: 8px; background: #26262b; }
.reward-track-bar span { display: block; width: var(--fill); height: 100%; background: linear-gradient(90deg, var(--accent-dark), var(--accent-hot)); box-shadow: 0 0 14px rgba(220, 31, 41, .55); transition: width 1.2s var(--ease-out); }
.reward-node { position: absolute; top: 0; left: var(--pos); display: flex; flex-direction: column; align-items: center; transform: translateX(-50%); }
.reward-node-dot {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: var(--text-faint);
    font-size: 15px;
    background: #1d1d22;
    border: 2px solid #34343a;
    -webkit-mask: var(--mask-edge) 0 0 / 100% 100% no-repeat;
    mask: var(--mask-edge) 0 0 / 100% 100% no-repeat;
}
.reward-node.is-ready .reward-node-dot { color: #fff; background: var(--tex-grunge) 0 0 / 160px repeat, linear-gradient(180deg, var(--accent-hot), var(--accent-dark)); border-color: transparent; animation: reward-pulse 1.8s ease-in-out infinite; }
.reward-node.is-claimed .reward-node-dot { color: #fff; background: var(--tex-grunge) 0 0 / 160px repeat, linear-gradient(180deg, #4be3a2, #1d8f5f); border-color: transparent; }
.reward-node-label { margin-top: 6px; color: var(--text-dim); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.reward-node.is-ready .reward-node-label { color: #fff; }

.reward-tabs { justify-content: center; }
.reward-tabs small { opacity: .7; font-weight: 600; }

.reward-card { display: flex; flex-direction: column; height: 100%; overflow: hidden; background: #141417; border: 1px solid var(--line); transition: transform .35s var(--ease-out), border-color .35s, box-shadow .35s; }
.reward-card:hover { transform: translateY(-6px); }
.reward-card.is-ready { border-color: rgba(220, 31, 41, .6); box-shadow: 0 0 0 1px rgba(220, 31, 41, .35), 0 18px 44px rgba(184, 19, 27, .22); }
.reward-media { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; background: radial-gradient(circle at 50% 60%, rgba(120, 120, 130, .18), transparent 62%), linear-gradient(180deg, #1c1c21, #0e0e10); border-bottom: 3px solid #34343a; }
.reward-card.is-ready .reward-media { background: radial-gradient(circle at 50% 60%, rgba(220, 31, 41, .45), transparent 62%), linear-gradient(180deg, #23151a, #0e0e10); border-bottom-color: var(--accent); }
.reward-card.is-claimed .reward-media { background: radial-gradient(circle at 50% 60%, rgba(61, 220, 151, .22), transparent 62%), linear-gradient(180deg, #16201c, #0e0e10); border-bottom-color: #2fbf83; }
.reward-media::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: var(--tex-grunge) 0 0 / 300px repeat; opacity: .35; }
.reward-media img { position: relative; z-index: 1; max-width: 70%; max-height: 78%; object-fit: contain; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .7)); transition: transform .6s var(--ease-out); }
.reward-card:hover .reward-media img { transform: scale(1.08); }
.reward-media-icon { position: relative; z-index: 1; color: rgba(255, 255, 255, .8); font-size: 62px; }
.reward-card.is-ready .reward-media-icon { color: #fff; filter: drop-shadow(0 0 18px rgba(220, 31, 41, .8)); animation: reward-bob 2.4s ease-in-out infinite; }
.reward-card.is-locked .reward-media img, .reward-card.is-locked .reward-media-icon { filter: grayscale(1) brightness(.55); }
.reward-tier { position: absolute; z-index: 2; top: 12px; left: 12px; padding: 3px 10px; color: var(--accent-2); font-size: 12px; font-weight: 700; background: rgba(6, 6, 8, .75); border: 1px solid rgba(214, 199, 165, .35); }
.reward-state { position: absolute; z-index: 2; top: 12px; right: 12px; padding: 3px 10px; color: var(--text-dim); font-size: 12px; font-weight: 700; background: rgba(6, 6, 8, .75); }
.reward-card.is-ready .reward-state { color: #fff; background: var(--accent); }
.reward-card.is-claimed .reward-state { color: #d2ffeb; background: rgba(29, 143, 95, .9); }
.reward-stamp { position: absolute; z-index: 3; padding: 4px 18px; color: #4be3a2; font-family: var(--font-display); font-size: 30px; letter-spacing: 3px; border: 3px solid #4be3a2; transform: rotate(-12deg); opacity: .85; text-shadow: 0 0 10px rgba(0, 0, 0, .6); }

.reward-body { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 18px; }
.reward-title { margin: 0; color: #fff; font-size: 20px; }
.reward-qty { margin: 2px 0 12px; color: var(--accent-2); font-family: var(--font-display); font-size: 24px; letter-spacing: 1px; }
.reward-need { display: flex; justify-content: space-between; margin-bottom: 6px; color: var(--text-dim); font-size: 13.5px; font-weight: 600; }
.reward-progress { width: 100%; height: 8px; margin-bottom: 8px; background: #26262b; }
.reward-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-dark), var(--accent-hot)); }
.reward-card.is-claimed .reward-progress span { background: #2fbf83; }
.reward-missing { margin-bottom: 16px; color: var(--text-dim); font-size: 13.5px; }
.reward-card.is-ready .reward-missing { color: #fff; }
.reward-card.is-claimed .reward-missing { color: #4be3a2; }
.reward-card form { margin-top: auto; }
/* a picture uploaded for the step fills the frame; an item icon stays small in the middle */
.reward-media.has-photo img { max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: cover; filter: none; }
.reward-desc { margin: 4px 0 0; color: var(--text-dim); font-size: 13.5px; }
/* what a step gives: one line per item / currency */
.reward-gives { margin: 12px 0 14px; padding: 0; list-style: none; }
.reward-give { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.reward-give:last-child { border-bottom: 0; }
.reward-give-icon { display: grid; flex: 0 0 52px; place-items: center; width: 52px; height: 52px; color: var(--accent-2); font-size: 23px; background: #1c1c21; border: 1px solid var(--line); }
.reward-give-icon img { max-width: 48px; max-height: 48px; object-fit: contain; }
.reward-give-name { flex: 1; min-width: 0; color: #fff; font-size: 14px; overflow-wrap: anywhere; }
.reward-give-qty { color: var(--accent-2); font-weight: 700; white-space: nowrap; }
.reward-give.is-currency .reward-give-qty { color: #4be3a2; }
/* ---- what a reward step / shop pack gives, drawn in circles (partials.orb-stage): one big circle, or every
   thing around the middle (slowly turning). Sizes follow the card's width (cqi), so they fill any card. */
.reward-media, .shop-media { container-type: inline-size; }
.reward-media.is-ring, .shop-media.is-ring { aspect-ratio: 1 / 1; }
.reward-media.is-solo, .shop-media.is-solo { aspect-ratio: 1 / 1; }
.reward-orbit { --R: 96px; --o: 88px; --R: 29cqi; --o: 30cqi; position: relative; z-index: 1; width: calc(var(--R) * 2 + var(--o)); height: calc(var(--R) * 2 + var(--o)); }
.reward-orbit.is-many { --o: 74px; --o: 25cqi; }
.reward-orbit.is-crowd { --R: 100px; --o: 62px; --R: 31cqi; --o: 20cqi; }
.reward-ring { position: absolute; inset: 0; animation: reward-spin 48s linear infinite; }
/* the track the circles sit on */
.reward-ring::before { content: ''; position: absolute; inset: calc(var(--o) / 2); border: 1px dashed rgba(214, 199, 165, .35); border-radius: 50%; }
.reward-orb-slot { position: absolute; top: 50%; left: 50%; width: var(--o); height: var(--o); margin: calc(var(--o) / -2) 0 0 calc(var(--o) / -2); transform: rotate(var(--a)) translate(var(--R)) rotate(calc(-1 * var(--a))); }
.reward-orb {
    position: relative; display: grid; place-items: center; width: 100%; height: 100%;
    color: var(--accent-2); font-size: calc(var(--o) * .5);
    background: radial-gradient(circle at 35% 30%, #34343b, #121215 72%);
    border: 2px solid rgba(214, 199, 165, .6); border-radius: 50%;
    box-shadow: 0 8px 16px rgba(0, 0, 0, .65), inset 0 0 12px rgba(0, 0, 0, .7);
}
/* turns back as fast as the ring turns: pictures and amounts stay upright */
.reward-ring .reward-orb { animation: reward-spin 48s linear infinite reverse; }
:is(.reward-media, .shop-media) .reward-orb img { position: static; width: 94%; max-width: 94%; height: 94%; max-height: 94%; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .7)); transform: none; transition: none; }
:is(.reward-card, .shop-card):hover :is(.reward-media, .shop-media) .reward-orb img { transform: none; }
.reward-orb.is-currency { color: #4be3a2; }
.reward-orb.is-more { color: #fff; font-family: var(--font-display); font-size: calc(var(--o) * .36); letter-spacing: 1px; }
.reward-orb-qty {
    position: absolute; bottom: -9px; left: 50%; transform: translateX(-50%);
    padding: 1px 8px; color: #fff; font-size: 12px; font-size: clamp(11px, 3.6cqi, 14px); font-weight: 700; line-height: 1.4; white-space: nowrap;
    background: rgba(6, 6, 8, .9); border: 1px solid rgba(214, 199, 165, .45); border-radius: 10px;
}
.reward-orb.is-currency .reward-orb-qty { color: #4be3a2; border-color: rgba(75, 227, 162, .45); }
.reward-orb.is-rank .reward-orb-qty, .reward-orb.is-hero .reward-orb-qty { color: var(--warn); }
/* the middle: the attached picture, or a gift / box */
.reward-hub {
    position: absolute; z-index: 2; top: 50%; left: 50%; display: grid; place-items: center;
    width: calc(var(--R) * .92); height: calc(var(--R) * .92); transform: translate(-50%, -50%); overflow: hidden;
    color: var(--accent-2); font-size: calc(var(--R) * .38);
    background: radial-gradient(circle at 40% 35%, #2c2228, #0e0e10 70%);
    border: 3px solid rgba(214, 199, 165, .55); border-radius: 50%;
    box-shadow: 0 0 0 6px rgba(0, 0, 0, .35), 0 12px 26px rgba(0, 0, 0, .7);
}
:is(.reward-media, .shop-media) .reward-hub.has-photo img { position: static; width: 100%; max-width: none; height: 100%; max-height: none; object-fit: cover; filter: none; }
/* a single thing: one big circle */
.reward-orb.is-solo { --o: 210px; --o: 66cqi; z-index: 1; width: var(--o); height: var(--o); border-width: 3px; }
.reward-orb.is-solo .reward-orb-qty { bottom: -12px; padding: 2px 12px; font-size: 14px; font-size: clamp(12px, 4.4cqi, 17px); }
/* shop: red track and middle, like the rest of the shop card */
.shop-media .reward-ring::before { border-color: rgba(220, 31, 41, .45); }
.shop-media .reward-hub { color: #fff; border-color: rgba(220, 31, 41, .7); box-shadow: 0 0 18px rgba(220, 31, 41, .35), 0 12px 26px rgba(0, 0, 0, .7); }
/* reward states */
.reward-card.is-ready .reward-orb, .reward-card.is-ready .reward-hub { border-color: var(--accent-hot); box-shadow: 0 0 16px rgba(220, 31, 41, .55), inset 0 0 12px rgba(0, 0, 0, .7); }
.reward-card.is-ready .reward-hub { animation: reward-pulse 1.8s ease-in-out infinite; }
.reward-card.is-ready .reward-ring::before { border-color: rgba(220, 31, 41, .55); }
.reward-card.is-claimed .reward-orb, .reward-card.is-claimed .reward-hub { border-color: #2fbf83; }
.reward-card.is-claimed .reward-ring::before { border-color: rgba(47, 191, 131, .45); }
.reward-card.is-locked .reward-orb, .reward-card.is-locked .reward-hub { filter: grayscale(.85) brightness(.8); }
.reward-card.is-locked .reward-media .reward-orb img, .reward-card.is-locked .reward-media .reward-hub img { filter: none; }
@keyframes reward-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .reward-ring, .reward-ring .reward-orb, .reward-card.is-ready .reward-hub { animation: none; }
}
/* the list under the title: round icons too */
.reward-give-icon { border-radius: 50%; }

/* the three numbers on top: side by side on a phone, icon above the number */
@media (max-width: 767.98px) {
    .reward-stats { margin-left: -6px; margin-right: -6px; }
    .reward-stats > [class*="col-"] { padding-left: 6px; padding-right: 6px; }
    .reward-stats .stat-box { flex-direction: column; align-items: center; gap: 6px; height: 100%; padding: 12px 6px; text-align: center; }
    .reward-stats .stat-icon { width: 38px; height: 38px; font-size: 16px; }
    .reward-stats .stat-box-value { font-size: 24px; }
    .reward-stats .stat-box-label { font-size: 11.5px; line-height: 1.35; }
}
/* how the points are counted */
.points-rule { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 16px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.points-rule:last-child { border-bottom: 0; }
.points-rule-text { color: #fff; }
.points-rule-text i { color: #4be3a2; }
.points-rule-calc { color: var(--text-dim); }
.points-rule-calc b { color: var(--accent-hot); font-size: 18px; }
.points-rule.is-total .points-rule-text { color: var(--accent-2); font-weight: 700; }
@media (max-width: 575.98px) {
    .reward-node-label { display: none; }
    .reward-track { height: 48px; }
    .reward-node-dot { width: 32px; height: 32px; font-size: 12px; }
    .reward-track-bar { top: 12px; }
}

/* ---------- Misc player pages ----------------------------------------- */
.stat-icon-lg { width: 84px; height: 84px; font-size: 36px; }
.rank-tabs { justify-content: center; }
.rank-tabs button { min-width: 140px; }

/* ---------- Ban list ---------------------------------------------------- */
.ban-char { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 2px 0; }
.ban-char-name { color: #fff; font-weight: 600; }
.ban-clan { padding: 1px 8px; color: var(--accent-2); font-size: 12px; font-weight: 600; background: rgba(214, 199, 165, .1); border: 1px solid rgba(214, 199, 165, .3); }

/* ---------- Top-up page ----------------------------------------------- */
.topup-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.topup-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 14px 8px;
    color: #fff;
    background: var(--tex-grunge) 0 0 / 220px repeat, linear-gradient(180deg, #34343a, #222226);
    border: 0;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
    -webkit-mask: var(--mask-edge) 0 0 / 100% 100% no-repeat;
    mask: var(--mask-edge) 0 0 / 100% 100% no-repeat;
    transition: transform .2s var(--ease-out), filter .2s;
}
.topup-chip:hover { transform: translateY(-2px); filter: brightness(1.2); }
.topup-chip.active { background: var(--tex-grunge) 0 0 / 220px repeat, linear-gradient(180deg, var(--accent-hot), var(--accent) 55%, var(--accent-dark)); box-shadow: none; }
.topup-chip:focus:not(:focus-visible) { outline: none; }
.topup-chip-baht { font-family: var(--font-display); font-size: 28px; line-height: 1; letter-spacing: 1px; }
.topup-chip-gc { color: var(--accent-2); font-size: 13px; font-weight: 600; }
.topup-chip.active .topup-chip-gc { color: #fff; }

.topup-input { position: relative; }
.topup-input-cur { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--accent-hot); font-size: 22px; font-weight: 700; pointer-events: none; }
.topup-input .form-control { padding: 14px 16px 14px 44px; font-family: var(--font-display); font-size: 30px; letter-spacing: 1px; }

.topup-preview { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; background: linear-gradient(90deg, rgba(184, 19, 27, .16), rgba(184, 19, 27, .04)); border-left: 4px solid var(--accent); }
.topup-preview span { color: var(--text-dim); font-weight: 600; }
.topup-preview strong { color: #fff; font-family: var(--font-display); font-size: 34px; font-weight: 400; line-height: 1; letter-spacing: 1px; }

.topup-qr-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; padding: 8px 14px; }   /* room for the frame, its light and the embers inside the panel */
.topup-qr { position: relative; flex: none; padding: 14px; background: #fff; box-shadow: 0 0 0 6px rgba(184, 19, 27, .2), 0 20px 50px rgba(0, 0, 0, .5); }
.topup-qr-img { display: block; width: 220px; height: 220px; image-rendering: pixelated; }
.topup-qr-corner { position: absolute; z-index: 2; width: 26px; height: 26px; border: 4px solid var(--accent-hot); }
.topup-qr-corner.is-tl { top: -10px; left: -10px; border-right: 0; border-bottom: 0; }
.topup-qr-corner.is-tr { top: -10px; right: -10px; border-left: 0; border-bottom: 0; }
.topup-qr-corner.is-bl { bottom: -10px; left: -10px; border-right: 0; border-top: 0; }
.topup-qr-corner.is-br { bottom: -10px; right: -10px; border-left: 0; border-top: 0; }
.topup-qr-info { flex: 1; min-width: 220px; }

/* The QR card: a dark grunge header, the code on white (its quiet zone untouched), the amount below */
.topup-qr-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: -14px -14px 14px;
    padding: 8px 12px 6px;
    color: #fff;
    font-family: var(--font-display);
    font-size: 22px;
    letter-spacing: 4px;
    line-height: 1;
    background: var(--tex-grunge) 0 0 / 200px repeat, linear-gradient(180deg, #1c1c22, #0b0b0e);
    border-bottom: 3px solid var(--accent);
}
.topup-qr-head i { color: var(--accent-hot); font-size: 17px; }
.topup-qr-code { position: relative; }
.topup-qr-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 10px; border-top: 2px dashed #d6d6dc; }
.topup-qr-foot span { color: #6b6b75; font-size: 13px; font-weight: 700; }
.topup-qr-foot strong { color: var(--accent-dark); font-family: var(--font-display); font-size: 30px; font-weight: 400; line-height: 1; letter-spacing: 1px; }

/* QR animation. Nothing ever stays over the code: the intro beam passes twice and leaves; after that
   everything moves OUTSIDE the white card: a blood-red light runs round the frame, the glow beats like a
   heart (the corners kick with it) and embers rise along the sides. Waits until the card is on screen. */
@property --qr-a { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.topup-qr { animation: qr-in .7s var(--ease-out) both; }
.topup-qr::after {
    content: '';
    position: absolute;
    inset: -6px;
    pointer-events: none;
    box-shadow: 0 0 36px 8px rgba(220, 31, 41, .55);
    opacity: 0;
    animation: qr-heart 2.4s 1.6s ease-in-out infinite;
}
.topup-qr-ring {
    position: absolute;
    inset: -9px;
    z-index: 1;
    padding: 3px;
    pointer-events: none;
    background: conic-gradient(from var(--qr-a), transparent 0deg 220deg, rgba(220, 31, 41, .15) 250deg, var(--accent-hot) 330deg, #fff 352deg, transparent 360deg);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    animation: qr-fade .6s 1s both, qr-spin 3.2s 1s linear infinite;
}
.topup-qr-embers { position: absolute; inset: 0; pointer-events: none; }   /* only outside the white card: left / right of it */
.topup-qr-ember {
    position: absolute;
    bottom: 12%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    pointer-events: none;
    background: #ff7a45;
    box-shadow: 0 0 6px 2px rgba(255, 70, 30, .75);
    opacity: 0;
    animation: qr-ember var(--t, 3.6s) var(--d, 0s) ease-out infinite;
}
.topup-qr-ember:nth-child(1) { left: -18px; --t: 3.4s; --d: 1.2s; --dx: -8px; }
.topup-qr-ember:nth-child(2) { left: -26px; --t: 4.2s; --d: 2.3s; --dx: 6px; bottom: 30%; }
.topup-qr-ember:nth-child(3) { left: -14px; --t: 3.8s; --d: 3.4s; --dx: -4px; bottom: 4%; width: 3px; height: 3px; }
.topup-qr-ember:nth-child(4) { left: -22px; --t: 4.6s; --d: 4.1s; --dx: -10px; bottom: 45%; }
.topup-qr-ember:nth-child(5) { right: -18px; --t: 3.6s; --d: 1.7s; --dx: 8px; }
.topup-qr-ember:nth-child(6) { right: -25px; --t: 4.4s; --d: 2.9s; --dx: -6px; bottom: 28%; width: 3px; height: 3px; }
.topup-qr-ember:nth-child(7) { right: -14px; --t: 3.9s; --d: 3.8s; --dx: 5px; bottom: 6%; }
.topup-qr-ember:nth-child(8) { right: -22px; --t: 4.8s; --d: 4.6s; --dx: 10px; bottom: 50%; }
.topup-qr-img { animation: qr-sharpen .9s .15s var(--ease-out) both; }
.topup-qr-corner { animation: qr-lock .55s .45s var(--ease-out) both, qr-corner-beat 2.4s 1.6s ease-in-out infinite; }
.topup-qr-corner.is-tl { --qx: -14px; --qy: -14px; }
.topup-qr-corner.is-tr { --qx: 14px; --qy: -14px; }
.topup-qr-corner.is-bl { --qx: -14px; --qy: 14px; }
.topup-qr-corner.is-br { --qx: 14px; --qy: 14px; }
.topup-qr-scan {
    position: absolute;
    left: -6px;
    right: -6px;
    top: 0;
    height: 3px;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, var(--accent-hot) 20%, #fff 50%, var(--accent-hot) 80%, transparent);
    box-shadow: 0 0 14px 3px rgba(255, 60, 60, .55);
    opacity: 0;
    animation: qr-scan 1.5s .8s ease-in-out 2 both;
}
.topup-qr-expired {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #fff;
    font-family: var(--font-display);
    font-size: 26px;
    letter-spacing: 2px;
    background: rgba(10, 10, 12, .8);
}
.topup-qr.is-expired .topup-qr-expired { display: flex; }
#topup-pay:has(.topup-qr.is-expired) .topup-pay-mobile, #topup-pay:has(.topup-qr.is-expired) .topup-pay-link { display: none !important; }   /* nobody pays an expired bill */
.topup-qr.is-expired .topup-qr-img { filter: grayscale(1) blur(2px); }
.topup-qr.is-expired::after, .topup-qr.is-expired .topup-qr-ring, .topup-qr.is-expired .topup-qr-embers { display: none; }
.topup-qr.is-expired .topup-qr-corner { animation: none; border-color: var(--text-dim); }
.topup-timer.is-low { animation: qr-timer-low 1s ease-in-out infinite; }

/* below the fold (phones): the animation waits until the card scrolls in */
.reveal:not(.is-visible) .topup-qr, .reveal:not(.is-visible) .topup-qr::after, .reveal:not(.is-visible) .topup-qr * { animation-play-state: paused; }

@keyframes qr-in { from { opacity: 0; transform: scale(.86) rotate(-2deg); } to { opacity: 1; transform: none; } }
@keyframes qr-sharpen { from { opacity: 0; filter: blur(8px); } to { opacity: 1; filter: none; } }
@keyframes qr-lock { from { opacity: 0; transform: translate(var(--qx), var(--qy)); } to { opacity: 1; transform: none; } }
@keyframes qr-fade { to { opacity: 1; } }
@keyframes qr-spin { to { --qr-a: 360deg; } }
/* lub-dub, rest */
@keyframes qr-heart { 0%, 40%, 100% { opacity: 0; } 8% { opacity: .95; } 16% { opacity: .25; } 24% { opacity: .8; } }
@keyframes qr-corner-beat {
    0%, 40%, 100% { transform: none; filter: none; }
    8%, 24% { transform: translate(calc(var(--qx) * .22), calc(var(--qy) * .22)); filter: drop-shadow(0 0 6px rgba(255, 60, 60, .95)); }
    16% { transform: translate(calc(var(--qx) * .08), calc(var(--qy) * .08)); }
}
@keyframes qr-ember {
    0% { opacity: 0; transform: translate(0, 0) scale(1); }
    15% { opacity: 1; }
    100% { opacity: 0; transform: translate(var(--dx, 0), -170px) scale(.3); }
}
@keyframes qr-scan { 0% { top: 0; opacity: 0; } 10%, 90% { opacity: 1; } 100% { top: calc(100% - 3px); opacity: 0; } }
@keyframes qr-timer-low { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) {
    .topup-qr, .topup-qr::after, .topup-qr-img, .topup-qr-corner, .topup-qr-scan, .topup-qr-ring, .topup-qr-ember, .topup-timer.is-low { animation: none; }
    .topup-qr-scan, .topup-qr-ember, .topup-qr::after { display: none; }
    .topup-qr-ring { opacity: 1; }
}
.topup-label { color: var(--text-dim); font-size: 14px; font-weight: 600; }
.topup-amount { color: #fff; font-family: var(--font-display); font-size: 56px; line-height: 1; letter-spacing: 1px; }
.topup-amount small { color: var(--text-dim); font-family: var(--font); font-size: 18px; letter-spacing: 0; }
.topup-gc { color: var(--accent-2); font-weight: 600; }
.topup-timer { color: var(--accent-hot) !important; font-family: var(--font-display); font-size: 26px; letter-spacing: 2px; }
.topup-actions { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.topup-pay-mobile { margin-bottom: 28px; }
/* bonus / deduction of a payment method on its choice card */
.pay-adj { font-weight: 700; }
/* The bonus of the payment method: a green pill "+50" on the GC figure (a deduction a red one) */
.bonus-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 9px 2px;
    color: #04230f;
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: .5px;
    white-space: nowrap;
    background: linear-gradient(135deg, #7dffb3, #2fd673 45%, #13a554);
    border-radius: 999px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .25) inset, 0 0 14px rgba(47, 214, 115, .55);
    text-shadow: 0 1px 0 rgba(255, 255, 255, .35);
}
.bonus-pill.is-minus { color: #fff; background: linear-gradient(135deg, #ff6b6b, var(--accent-hot) 45%, var(--accent-dark)); box-shadow: 0 0 0 1px rgba(255, 255, 255, .2) inset, 0 0 14px rgba(220, 31, 41, .5); text-shadow: none; }
.bonus-pill[hidden] { display: none; }
/* on an amount button: like a superscript on the GC figure */
.bonus-pill.is-sup { margin-left: 5px; padding: 2px 7px 1px; font-size: 13px; transform: translateY(-5px); animation: bonus-pop .5s var(--ease-out) both; }
.topup-chip-gc { display: inline-flex; align-items: center; }
@keyframes bonus-pop { from { opacity: 0; transform: translateY(2px) scale(.6); } to { opacity: 1; transform: translateY(-5px) scale(1); } }

/* "you will get": base + bonus, then the total */
.topup-preview .topup-preview-title { color: var(--text-dim); font-weight: 600; }
.topup-sum { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
.topup-sum-parts { display: flex; align-items: center; gap: 8px; color: var(--text-dim); font-family: var(--font-display); font-size: 20px; letter-spacing: .5px; }
.topup-sum-parts[hidden] { display: none; }
.topup-sum-parts .bonus-pill { font-size: 17px; }
.topup-sum-total { color: #fff; font-family: var(--font-display); font-size: 34px; line-height: 1; letter-spacing: 1px; }
.topup-sum-total small { margin-right: 4px; color: #3ddc84; font-family: var(--font); font-size: 15px; font-weight: 700; letter-spacing: 0; vertical-align: middle; }
.topup-sum-total small[hidden] { display: none; }
.topup-gc-total { color: #fff; font-weight: 700; white-space: nowrap; }
/* .topup-preview span (dim) must not reach the total and the pill */
.topup-preview .topup-sum-total span { color: #fff; font-weight: 400; }
.topup-preview .bonus-pill { color: #04230f; font-weight: 400; }
.topup-preview .bonus-pill.is-minus { color: #fff; }
.pay-adj.is-plus { color: #3ddc84; }
.pay-adj.is-minus { color: var(--accent-hot); }

.topup-pp { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); }
.topup-pp img { width: 120px; height: auto; padding: 6px 8px; background: #fff; border-radius: 2px; }
.topup-steps { position: relative; margin: 0 0 20px; padding: 0; list-style: none; counter-reset: step; }
.topup-steps::before { content: ''; position: absolute; left: 21px; top: 22px; bottom: 22px; width: 2px; background: linear-gradient(180deg, var(--accent), rgba(184, 19, 27, .15)); }
.topup-steps li { position: relative; display: flex; align-items: center; gap: 14px; padding: 8px 0; }
.topup-step-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: #fff;
    font-size: 17px;
    background: var(--tex-grunge) 0 0 / 200px repeat, linear-gradient(180deg, var(--accent-hot), var(--accent) 55%, var(--accent-dark));
    -webkit-mask: var(--mask-edge) 0 0 / 100% 100% no-repeat;
    mask: var(--mask-edge) 0 0 / 100% 100% no-repeat;
}
.topup-step-title { color: #fff; font-weight: 700; }
.topup-step-text { color: var(--text-dim); font-size: 14px; }

@media (max-width: 575.98px) {
    .topup-quick { grid-template-columns: repeat(2, 1fr); }
    .topup-qr-wrap { justify-content: center; }
    .topup-actions { grid-template-columns: 1fr; }
}
/* topping up on a phone: the support banner would cover the amounts, timer and buttons (the social rail stays) */
@media (max-width: 767.98px) {
    body:has(.topup-qr-wrap, .topup-form) .support-float { display: none; }
}

/* ---------- Send gift --------------------------------------------------- */
.label-like { color: var(--text-dim); font-size: 14px; }
/* the gift key never breaks in two (49KT- / LDGY), and shrinks a little on a narrow phone */
.stat-box-value.gift-key { font-size: clamp(24px, 7.5vw, 34px); letter-spacing: 2px; white-space: nowrap; }
.gift-currency { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gift-cur { margin: 0; cursor: pointer; }
.gift-cur input { position: absolute; opacity: 0; pointer-events: none; }
.gift-cur-box {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    height: 100%;
    padding: 12px 14px;
    background: #1b1b1f;
    border: 1px solid var(--line-strong);
    border-left: 4px solid #34343a;
    transition: border-color .2s, background .2s;
}
.gift-cur-box i { color: var(--text-faint); font-size: 18px; }
.gift-cur-name { color: #fff; font-weight: 700; }
.gift-cur-bal { color: var(--text-dim); font-size: 13px; }
.gift-cur:hover .gift-cur-box { border-color: rgba(184, 19, 27, .5); }
.gift-cur input:checked + .gift-cur-box { background: linear-gradient(90deg, rgba(184, 19, 27, .2), rgba(184, 19, 27, .04)); border-color: var(--accent); border-left-color: var(--accent-hot); }
.gift-cur input:checked + .gift-cur-box i { color: #e9c35a; }
.gift-cur input:focus-visible + .gift-cur-box { outline: 2px solid #fff; outline-offset: 2px; }

.gift-amount { font-family: var(--font-display); font-size: 30px !important; letter-spacing: 1px; }
.gift-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.gift-quick button { padding: 6px 12px; color: var(--text); font-size: 13.5px; font-weight: 700; background: #26262b; border: 1px solid var(--line-strong); transition: background .2s, color .2s, border-color .2s; }
.gift-quick button:hover { color: #fff; background: var(--accent); border-color: var(--accent); }

.gift-summary { padding: 12px 16px; font-size: 14.5px; background: linear-gradient(90deg, rgba(184, 19, 27, .14), rgba(184, 19, 27, .03)); border-left: 4px solid var(--accent); }
.gift-summary b { color: #fff; }
.gift-form.is-short .gift-summary { border-left-color: var(--danger); }
.gift-form.is-short [data-sum-left] { color: var(--danger); }

.gift-row { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-bottom: 1px solid var(--line); transition: background .2s; }
.gift-row:last-child { border-bottom: 0; }
.gift-row:hover { background: rgba(255, 255, 255, .025); }
.gift-row-icon { flex: none; display: grid; place-items: center; width: 38px; height: 38px; font-size: 15px; color: #fff; }
.gift-row.is-out .gift-row-icon { background: rgba(220, 31, 41, .2); color: var(--accent-hot); }
.gift-row.is-in .gift-row-icon { background: rgba(61, 220, 151, .15); color: #4be3a2; }
.gift-row-main { flex: 1; min-width: 0; }
.gift-row-title { color: var(--text); }
.gift-row-title b { color: #fff; }
.gift-row-time { color: var(--text-faint); font-size: 12.5px; }
.gift-row-amount { font-family: var(--font-display); font-size: 24px; letter-spacing: 1px; white-space: nowrap; }
.gift-row.is-out .gift-row-amount { color: var(--accent-hot); }
.gift-row.is-in .gift-row-amount { color: #4be3a2; }
.gift-row-amount small { color: var(--text-dim); font-family: var(--font); font-size: 12px; letter-spacing: 0; }
.gift-history { max-height: 600px; overflow-y: auto; }

/* ---------- Item code --------------------------------------------------- */
.code-hero { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.code-hero-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    color: #fff;
    font-size: 34px;
    background: var(--tex-grunge) 0 0 / 200px repeat, linear-gradient(180deg, var(--accent-hot), var(--accent) 55%, var(--accent-dark));
    -webkit-mask: var(--mask-edge) 0 0 / 100% 100% no-repeat;
    mask: var(--mask-edge) 0 0 / 100% 100% no-repeat;
    animation: reward-bob 2.6s ease-in-out infinite;
}
.code-hero-title { color: #fff; font-size: 24px; font-weight: 800; font-stretch: var(--stretch-tight); }
.code-input {
    height: auto;
    padding: 16px 12px !important;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: clamp(20px, 3.4vw, 30px) !important;
    font-weight: 700;
    letter-spacing: .18em;
    text-align: center;
    text-transform: uppercase;
    border: 2px dashed var(--line-strong) !important;
    background: rgba(6, 6, 8, .7) !important;
}
.code-input:focus { border-style: solid !important; border-color: var(--accent) !important; }
.code-input::placeholder { color: #3e3e45; letter-spacing: .18em; }
.code-form.is-complete .code-input { border-style: solid !important; border-color: #2fbf83 !important; box-shadow: 0 0 0 3px rgba(61, 220, 151, .15); }
.code-dots { display: flex; justify-content: center; gap: 10px; margin-top: 12px; }
.code-dots span { width: 34px; height: 5px; background: #2a2a2f; transition: background .25s; }
.code-dots span.on { background: var(--accent-hot); box-shadow: 0 0 8px rgba(220, 31, 41, .6); }
.code-form.is-complete .code-dots span { background: #2fbf83; box-shadow: 0 0 8px rgba(61, 220, 151, .5); }
.code-notes { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 18px 0 0; padding: 0; list-style: none; color: var(--text-dim); font-size: 13.5px; }
.code-notes i { margin-right: 6px; color: #4be3a2; }

.code-sources { display: grid; gap: 10px; }
.code-source { display: flex; align-items: center; gap: 14px; padding: 10px 14px; color: #fff !important; font-weight: 600; background: #1b1b1f; border: 1px solid var(--line); transition: border-color .2s, transform .2s var(--ease-out); }
.code-source:not(.is-static):hover { transform: translateX(4px); border-color: rgba(184, 19, 27, .55); }
.code-source .stat-icon { width: 40px; height: 40px; font-size: 16px; }

.code-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.code-row:last-child { border-bottom: 0; }
.code-row:hover { background: rgba(255, 255, 255, .025); }
.code-row-icon { flex: none; display: grid; place-items: center; width: 38px; height: 38px; color: var(--accent-hot); background: rgba(220, 31, 41, .15); }
.code-row-main { flex: 1; min-width: 180px; }
.code-row-code { color: #fff; font-family: 'Consolas', 'Courier New', monospace; font-weight: 700; letter-spacing: .08em; }
.code-row-time { color: var(--text-faint); font-size: 12.5px; }
.code-row-rewards { display: flex; flex-wrap: wrap; gap: 6px; }
.code-reward { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; color: var(--accent-2); font-size: 13px; font-weight: 700; background: rgba(214, 199, 165, .1); border: 1px solid rgba(214, 199, 165, .3); }
.code-reward.is-gc { color: #e9c35a; border-color: rgba(233, 195, 90, .4); background: rgba(233, 195, 90, .1); }
@media (max-width: 575.98px) {
    .code-input { padding: 14px 6px !important; font-size: 17px !important; letter-spacing: .06em; }
    .code-input::placeholder { letter-spacing: .06em; }
}

/* ---------- Teleport ------------------------------------------------------ */
.tp-step { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 10px; color: #fff; font-family: var(--font-display); font-size: 17px; background: var(--accent); }
.tp-pick { display: block; margin: 0; cursor: pointer; }
.tp-pick input { position: absolute; opacity: 0; pointer-events: none; }
.tp-pick-box { position: relative; display: flex; align-items: center; gap: 12px; height: 100%; padding: 12px 14px; background: #1b1b1f; border: 1px solid var(--line-strong); border-left: 4px solid #34343a; transition: border-color .2s, background .2s, transform .2s var(--ease-out); }
.tp-pick:hover .tp-pick-box { border-color: rgba(184, 19, 27, .5); transform: translateY(-2px); }
.tp-pick input:checked + .tp-pick-box { background: linear-gradient(90deg, rgba(184, 19, 27, .22), rgba(184, 19, 27, .04)); border-color: var(--accent); border-left-color: var(--accent-hot); }
.tp-pick input:focus-visible + .tp-pick-box { outline: 2px solid #fff; outline-offset: 2px; }
.tp-pick.is-short { cursor: not-allowed; opacity: .5; }
.tp-pick.is-short:hover .tp-pick-box { transform: none; border-color: var(--line-strong); }
.tp-tick { margin-left: auto; color: var(--accent-hot); font-size: 18px; opacity: 0; transform: scale(.6); transition: opacity .2s, transform .2s; }
.tp-pick input:checked + .tp-pick-box .tp-tick { opacity: 1; transform: none; }

.tp-chars { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.tp-char-name { min-width: 0; color: #fff; font-weight: 700; }

.tp-map + .tp-map { margin-top: 22px; }
.tp-map-name { margin-bottom: 10px; color: var(--accent-2); font-size: 16px; font-weight: 700; letter-spacing: .5px; }
.tp-map-name i { margin-right: 8px; color: var(--accent-hot); }
.tp-map-name small { color: var(--text-faint); font-weight: 600; }
.tp-spots { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.tp-spot-pin { flex: none; display: grid; place-items: center; width: 36px; height: 36px; color: var(--accent-hot); font-size: 16px; background: rgba(220, 31, 41, .14); }
.tp-pick input:checked + .tp-pick-box .tp-spot-pin { color: #fff; background: var(--accent); }
.tp-spot-main { display: flex; flex-direction: column; min-width: 0; }
.tp-spot-name { color: #fff; font-weight: 700; }
.tp-spot-price { color: #e9c35a; font-size: 13.5px; font-weight: 700; }
.tp-spot-short { margin-left: 6px; color: var(--danger); }

.tp-summary { padding: 16px 18px; background: linear-gradient(90deg, rgba(184, 19, 27, .14), rgba(184, 19, 27, .03)); border-left: 4px solid var(--accent); }
.tp-summary-route { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 6px; }
.tp-summary-node { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-size: 18px; }
.tp-summary-node i { color: var(--accent-hot); }
.tp-summary-arrow { color: var(--text-faint); font-size: 22px; }
.tp-summary-cost { color: var(--text-dim); }
.tp-summary-cost b { color: #fff; }

/* ---------- Character name ---------------------------------------------- */
.is-rgb { background: linear-gradient(90deg, #ff3b3b, #ffb13b, #f6ff3b, #3bff6b, #3bd5ff, #6b3bff, #ff3bd5, #ff3b3b); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent !important; animation: rgb-name 3s linear infinite; }
.cn-preview { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 18px; padding: 14px 16px; font-size: 20px; font-weight: 700; background: #1b1b1f; border-left: 4px solid var(--accent); }
.cn-preview-old { color: var(--text-dim); text-decoration: line-through; text-decoration-color: rgba(220, 31, 41, .7); }
.cn-preview i { color: var(--accent-hot); }
.cn-preview-new { color: #fff; }
.cn-rename.is-valid .cn-preview-new { color: #4be3a2; }
.cn-input { position: relative; }
.cn-input .form-control { padding-right: 64px; font-size: 18px; font-weight: 700; }
.cn-count { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--text-faint); font-size: 13px; font-weight: 700; }
.cn-rules { margin: 12px 0 18px; padding: 0; list-style: none; font-size: 13.5px; color: var(--text-dim); }
.cn-rules li { padding: 2px 0; }
.cn-rules i { width: 18px; font-size: 7px; vertical-align: middle; color: var(--text-faint); }
.cn-rules li.ok, .cn-rules li.ok i { color: #4be3a2; }
.cn-rules li.ok i::before { content: '\f00c'; font-size: 11px; }
.cn-rules li.bad, .cn-rules li.bad i { color: var(--danger); }
.cn-rules li.bad i::before { content: '\f00d'; font-size: 11px; }

.cn-color-preview { display: grid; place-items: center; min-height: 92px; margin-bottom: 18px; background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .06), transparent 70%), #0c0c0e; border: 1px solid var(--line); }
.cn-color-name { color: #fff; font-size: 30px; font-weight: 800; font-stretch: var(--stretch-tight); text-shadow: 0 2px 10px rgba(0, 0, 0, .8); }
.cn-color-name.is-rgb { text-shadow: none; }
.cn-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 10px; }
.cn-swatch { margin: 0; cursor: pointer; }
.cn-swatch input { position: absolute; opacity: 0; pointer-events: none; }
.cn-swatch span { position: relative; display: grid; place-items: center; height: 52px; color: #fff; border: 2px solid rgba(255, 255, 255, .12); transition: transform .2s var(--ease-out), border-color .2s, box-shadow .2s; }
.cn-swatch span i { font-size: 18px; opacity: 0; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); transition: opacity .2s; }
.cn-swatch:hover span { transform: translateY(-3px); }
.cn-swatch input:checked + span { border-color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .2), 0 8px 18px rgba(0, 0, 0, .5); }
.cn-swatch input:checked + span i { opacity: 1; }
.cn-swatch input:focus-visible + span { outline: 2px solid #fff; outline-offset: 3px; }
.is-rgb-swatch span { background: linear-gradient(135deg, #ff3b3b, #ffb13b, #f6ff3b, #3bff6b, #3bd5ff, #6b3bff, #ff3bd5); background-size: 200% 200%; animation: rgb-name 3s linear infinite; }
.is-rgb-swatch b { position: absolute; bottom: 2px; font-size: 10px; letter-spacing: 1px; text-shadow: 0 1px 2px rgba(0, 0, 0, .9); }

/* ---------- Change password -------------------------------------------- */
.pw-field .form-control { padding-right: 46px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; padding: 0; color: var(--text-faint); background: none; border: 0; transition: color .2s; }
.pw-eye:hover, .pw-eye:focus-visible { color: #fff; }
.pw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 10px; }
.pw-meter span { height: 5px; background: #2a2a2f; transition: background .25s; }
.pw-meter span.on.lv0 { background: #ff4d5a; }
.pw-meter span.on.lv1 { background: #fd9939; }
.pw-meter span.on.lv2 { background: #e9c35a; }
.pw-meter span.on.lv3, .pw-meter span.on.lv4 { background: #2fbf83; }
.pw-meter-label { margin-top: 6px; color: var(--text-dim); font-size: 12.5px; font-weight: 600; }
.pw-rules { margin-top: 4px; }

.pw-shield { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.pw-shield-email { color: #fff; font-size: 17px; font-weight: 700; }
.pw-tips { margin-top: 18px; padding: 14px 16px; background: rgba(233, 195, 90, .06); border-left: 4px solid #e9c35a; }
.pw-tips-title { margin-bottom: 6px; color: #e9c35a; font-weight: 700; }
.pw-tips-title i { margin-right: 8px; }
.pw-tips ul { margin: 0; padding-left: 18px; color: var(--text-dim); font-size: 14px; }
.pw-tips li { padding: 2px 0; }

/* ---------- Account (home when logged in) ------------------------------ */
.acc-banner {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 22px 28px;
    padding: 28px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-top: 3px solid var(--accent);
    background:
        var(--tex-grunge) 0 0 / 300px repeat,
        linear-gradient(90deg, rgba(10, 10, 12, .95) 25%, rgba(10, 10, 12, .6) 70%, rgba(60, 6, 10, .55)),
        var(--stats-art) center / cover,
        #141417;
    box-shadow: var(--shadow);
}
.acc-banner-avatar { flex: none; }
.acc-banner-main { flex: 1; min-width: 240px; }
.acc-banner-char { margin-bottom: 2px; color: var(--accent-2); font-size: 15px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.acc-banner-email { color: #fff; font-size: clamp(22px, 3vw, 30px); font-weight: 800; font-stretch: var(--stretch-tight); line-height: 1.15; }
.acc-banner-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.acc-banner-meta { display: flex; flex-wrap: wrap; gap: 4px 20px; color: var(--text-dim); font-size: 13.5px; }
.acc-banner-meta i { margin-right: 6px; color: var(--accent-hot); }
.acc-banner-cta { display: flex; flex-direction: column; gap: 10px; min-width: 170px; }
@media (max-width: 767.98px) {
    .acc-banner { padding: 22px 18px; justify-content: center; text-align: center; }
    .acc-banner-chips, .acc-banner-meta { justify-content: center; }
    .acc-banner-cta { flex-direction: row; width: 100%; }
    .acc-banner-cta .btn { flex: 1; }
}

.acc-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.acc-action { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: var(--text) !important; background: #1b1b1f; border: 1px solid var(--line); border-left: 4px solid #34343a; transition: transform .2s var(--ease-out), border-color .2s, background .2s; }
.acc-action:hover { transform: translateY(-3px); background: linear-gradient(90deg, rgba(184, 19, 27, .16), rgba(184, 19, 27, .03)); border-color: rgba(184, 19, 27, .5); border-left-color: var(--accent-hot); }
.acc-action .stat-icon { width: 42px; height: 42px; font-size: 17px; }
.acc-action-title { display: block; color: #fff; font-weight: 700; }
.acc-action-sub { display: block; color: var(--text-faint); font-size: 12.5px; }

.acc-char { height: 100%; background: #141417; border: 1px solid var(--line); border-top: 3px solid var(--accent); transition: transform .35s var(--ease-out), border-color .35s, box-shadow .35s; }
.acc-char:hover { transform: translateY(-5px); border-color: rgba(184, 19, 27, .5); box-shadow: 0 18px 40px rgba(0, 0, 0, .5); }
.acc-char.is-dead { border-top-color: #4a4a50; }
.acc-char.is-dead .avatar { filter: grayscale(1) brightness(.7); }
.acc-char-head { display: flex; align-items: center; gap: 16px; padding: 18px; background: radial-gradient(circle at 15% 50%, rgba(184, 19, 27, .18), transparent 60%); border-bottom: 1px solid var(--line); }
.acc-char-name { color: #fff; font-size: 21px; font-weight: 800; font-stretch: var(--stretch-tight); }
.acc-char-clan { margin-bottom: 6px; color: var(--accent-2); font-size: 13.5px; font-weight: 600; }
.acc-char-clan i { margin-right: 6px; color: var(--accent-hot); }
.acc-char-stats { display: grid; grid-template-columns: repeat(2, 1fr); }
.acc-char-stats > div { padding: 12px 18px; border-bottom: 1px solid var(--line); }
.acc-char-stats > div:nth-child(odd) { border-right: 1px solid var(--line); }
.acc-char-stats > div:nth-last-child(-n + 2) { border-bottom: 0; }
.acc-char-stats span { display: block; color: var(--text-faint); font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }
.acc-char-stats b { color: #fff; font-family: var(--font-display); font-size: 26px; font-weight: 400; letter-spacing: 1px; line-height: 1.1; }

/* ---------- Register ------------------------------------------------------ */
.auth-steps { margin: -4px 0 22px; }
.reg-steps { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; padding: 0; list-style: none; counter-reset: none; }
.reg-steps::before { content: ''; position: absolute; left: 16.6%; right: 16.6%; top: 19px; height: 2px; background: #2a2a2f; }
.reg-steps li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.reg-step-dot { position: relative; z-index: 1; display: grid; place-items: center; width: 40px; height: 40px; color: var(--text-faint); font-size: 15px; background: #1d1d22; border: 2px solid #34343a; -webkit-mask: var(--mask-edge) 0 0 / 100% 100% no-repeat; mask: var(--mask-edge) 0 0 / 100% 100% no-repeat; }
.reg-step-label { color: var(--text-faint); font-size: 12.5px; font-weight: 700; }
.reg-steps li.is-current .reg-step-dot { color: #fff; border-color: transparent; background: var(--tex-grunge) 0 0 / 160px repeat, linear-gradient(180deg, var(--accent-hot), var(--accent-dark)); }
.reg-steps li.is-current .reg-step-label { color: #fff; }
.reg-steps li.is-done .reg-step-dot { color: #fff; border-color: transparent; background: var(--tex-grunge) 0 0 / 160px repeat, linear-gradient(180deg, #4be3a2, #1d8f5f); }
.reg-steps li.is-done .reg-step-label { color: #4be3a2; }

.reg-perks { margin: 22px 0 0; padding: 0; list-style: none; }
.reg-perks li { display: flex; align-items: center; gap: 10px; padding: 5px 0; color: #fff; font-weight: 600; text-shadow: 0 2px 8px rgba(0, 0, 0, .7); }
.reg-perks i { display: grid; place-items: center; width: 22px; height: 22px; color: #fff; font-size: 11px; background: var(--accent); }

.reg-agree { position: relative; display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 20px; color: var(--text-dim); font-size: 14px; cursor: pointer; }
.reg-agree input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.reg-agree-box { flex: none; display: grid; place-items: center; width: 22px; height: 22px; margin-top: 1px; color: transparent; font-size: 12px; background: rgba(6, 6, 8, .6); border: 2px solid var(--line-strong); transition: background .2s, border-color .2s, color .2s; }
.reg-agree input:checked + .reg-agree-box { color: #fff; background: var(--accent); border-color: var(--accent); }
.reg-agree input:focus-visible + .reg-agree-box { outline: 2px solid #fff; outline-offset: 2px; }

.auth-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 12px; color: var(--text-faint); font-size: 13px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.reg-mail { display: flex; align-items: center; gap: 14px; margin: 6px 0 22px; padding: 12px 14px; background: linear-gradient(90deg, rgba(184, 19, 27, .14), rgba(184, 19, 27, .03)); border-left: 4px solid var(--accent); }
.reg-mail-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; color: #fff; font-size: 17px; background: var(--accent); }
.otp-input { padding: 12px !important; background: rgba(6, 6, 8, .7) !important; border: 2px dashed var(--line-strong) !important; }
.otp-input:focus { border-style: solid !important; border-color: var(--accent) !important; }
.otp-input::placeholder { color: #3e3e45; }

/* ---------- Login --------------------------------------------------------- */
.login-head { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.login-head .stat-icon { width: 52px; height: 52px; font-size: 22px; }
.login-forgot { color: var(--text-dim); font-size: 13px; }
.login-forgot:hover { color: var(--accent-hot); }
.login-caps { margin-top: 6px; color: #e9c35a; font-size: 13px; font-weight: 600; }
.login-secure { margin: 14px 0 0; color: var(--text-faint); font-size: 12.5px; text-align: center; }
.login-art-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.login-art-links a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; color: #fff !important; font-size: 14px; font-weight: 700; background: rgba(6, 6, 8, .6); border: 1px solid rgba(255, 255, 255, .15); backdrop-filter: blur(6px); transition: background .2s, border-color .2s; }
.login-art-links a i { color: var(--accent-hot); }
.login-art-links a:hover { background: var(--accent); border-color: var(--accent); }
.login-art-links a:hover i { color: #fff; }

/* ---------- Change e-mail ----------------------------------------------- */
.email-wait { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; padding: 12px 14px; background: rgba(233, 195, 90, .07); border-left: 4px solid #e9c35a; }
fieldset[disabled] { opacity: .5; }
.input-group-text { color: var(--text-dim); background: #1b1b1f; border-color: var(--line-strong); border-radius: 0; }

/* ---------- Admin: shop & item catalog ------------------------------------ */
.shop-cat-row { border-bottom: 1px solid var(--line); }
.shop-cat-row summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 11px 16px; cursor: pointer; list-style: none; }
.shop-cat-row summary::-webkit-details-marker { display: none; }
.shop-cat-row summary:hover { background: rgba(255, 255, 255, .03); }
.shop-cat-row[open] summary { background: rgba(184, 19, 27, .1); }
.shop-cat-name { color: #fff; font-weight: 700; }
.shop-cat-name i { color: var(--accent-hot); }
.shop-cat-form { padding: 10px 16px 14px; }
.shop-cat-new { padding: 16px; background: rgba(255, 255, 255, .02); }
.shop-admin-thumb { display: grid; place-items: center; width: 56px; height: 34px; object-fit: cover; color: var(--text-faint); background: #1b1b1f; border: 1px solid var(--line); }

.pack-image-preview { display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; color: var(--text-faint); text-align: center; background: radial-gradient(circle at 50% 60%, rgba(184, 19, 27, .25), transparent 65%), #0e0e10; border: 1px dashed var(--line-strong); }
.pack-image-preview img { width: 100%; height: 100%; object-fit: contain; }
.pack-image-preview i { font-size: 34px; }

.pack-search { position: relative; margin-bottom: 16px; }
.pack-search-results { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); max-height: 340px; overflow-y: auto; padding: 4px; color: var(--text-dim); background: #141417; border: 1px solid var(--line-strong); box-shadow: var(--shadow); }
.pack-search-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; color: #fff; text-align: left; background: none; border: 0; }
.pack-search-item:hover, .pack-search-item:focus { background: rgba(184, 19, 27, .18); }
.pack-search-item small { margin-left: auto; color: var(--text-faint); }

.pack-items-head, .pack-item { display: grid; grid-template-columns: 52px minmax(120px, 1fr) 120px 90px minmax(140px, 1fr) 34px; gap: 8px; align-items: center; }
.pack-items-head { padding: 0 0 6px; color: var(--text-faint); font-size: 12px; font-weight: 700; border-bottom: 1px solid var(--line); }
.pack-items-head span:first-child { grid-column: span 2; }
.pack-item { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.pack-item-icon { display: grid; place-items: center; width: 52px; height: 36px; color: var(--text-faint); background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.pack-item-icon img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pack-item-label { min-width: 0; overflow: hidden; color: #fff; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
@media (max-width: 767.98px) {
    .pack-items-head { display: none; }
    .pack-item { grid-template-columns: 52px 1fr 1fr 34px; }
    .pack-item-label { grid-column: span 3; }
}

.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.item-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px; text-align: center; background: #1b1b1f; border: 1px solid var(--line); }
.item-tile-icon { display: grid; place-items: center; width: 100%; height: 70px; color: var(--text-faint); }
.item-tile-icon img { max-width: 100%; max-height: 100%; object-fit: contain; }
.item-tile-name { color: #fff; font-size: 13px; font-weight: 600; }
.item-tile-id { color: var(--accent-2); font-size: 12px; }
.admin-main .table thead th { white-space: nowrap; }
.admin-main .table .chip { white-space: nowrap; }

/* ---------- Admin: currencies ------------------------------------------------ */
.cur-badge { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-right: 4px; color: #e9c35a; background: rgba(233, 195, 90, .1); border: 1px solid rgba(233, 195, 90, .3); }
.cur-emoji { font-style: normal; line-height: 1; }
.icon-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.icon-picker button { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; color: #e9c35a; font-size: 17px; background: #1b1b1f; border: 1px solid var(--line-strong); transition: border-color .2s, background .2s; }
.icon-picker button:hover { background: rgba(184, 19, 27, .18); border-color: var(--accent); }
.sql-box { padding: 10px 12px; overflow-x: auto; color: #d2ffeb; font-size: 12.5px; white-space: pre-wrap; word-break: break-all; background: #0b0b0d; border: 1px solid var(--line); }

/* ---------- Shop: category cards (landing page) ---------- */
.shop-cat-card { display: flex; flex-direction: column; height: 100%; color: inherit; background: #141417; border: 1px solid var(--line); transition: transform .35s var(--ease-out), border-color .35s, box-shadow .35s; }
.shop-cat-card:hover { color: inherit; text-decoration: none; transform: translateY(-6px); border-color: rgba(184, 19, 27, .6); box-shadow: 0 22px 50px rgba(0, 0, 0, .55), 0 0 0 1px rgba(184, 19, 27, .25); }
.shop-cat-card-media { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; background: radial-gradient(circle at 50% 60%, rgba(184, 19, 27, .35), transparent 62%), linear-gradient(180deg, #1c1c21, #0e0e10); border-bottom: 3px solid var(--accent); }
.shop-cat-card-media::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .55)), var(--tex-grunge) 0 0 / 300px repeat; opacity: .5; }
.shop-cat-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease-out); }
.shop-cat-card:hover .shop-cat-card-media img { transform: scale(1.06); }
.shop-cat-card-icon { position: relative; z-index: 1; color: rgba(255, 255, 255, .85); font-size: 64px; filter: drop-shadow(0 8px 16px rgba(184, 19, 27, .6)); }
.shop-cat-card-count { position: absolute; z-index: 2; right: 12px; bottom: 10px; padding: 3px 10px; color: var(--accent-2); font-size: 12px; font-weight: 700; background: rgba(6, 6, 8, .75); border: 1px solid rgba(214, 199, 165, .35); }
.shop-cat-card-body { display: flex; flex-direction: column; flex: 1; gap: 6px; padding: 16px 18px 18px; }
.shop-cat-card-title { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 22px; font-weight: 800; font-stretch: var(--stretch-tight); }
.shop-cat-card-title i { color: var(--accent-hot); font-size: 18px; }
.shop-cat-card-desc { color: var(--text-dim); font-size: 14px; }
.shop-cat-card-go { margin-top: auto; padding-top: 8px; color: var(--accent-hot); font-size: 14px; font-weight: 700; }
.shop-cat-card-go i { transition: transform .3s var(--ease-out); }
.shop-cat-card:hover .shop-cat-card-go i { transform: translateX(5px); }

.shop-cat-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; }
.shop-cat-nav .shop-tabs { flex: 1 1 auto; }
.shop-rentals { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.shop-rentals-title { color: var(--text-dim); font-size: 14px; font-weight: 700; }

/* reward lines: the icon is a span too, keep it on the left */
.shop-items .shop-item-icon { margin-left: 0; }
.shop-items .shop-item-icon.is-empty i, .shop-items .shop-item-icon.is-empty { color: var(--accent-2); }
.shop-items .shop-item-name { margin-left: 0; color: var(--text); font-weight: 400; }
.shop-items li.is-rank .shop-item-amount, .shop-items li.is-hero .shop-item-amount { color: var(--warn); }

/* ---------- Name colour swatches: names, custom colour ---------- */
.cn-swatch { position: relative; display: flex; flex-direction: column; gap: 4px; }
.cn-swatch-name { overflow: hidden; text-align: center; color: var(--text-faint); font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
.cn-swatch.is-custom > span { color: #fff; background: conic-gradient(#ff3b3b, #f6ff3b, #3bff6b, #3bd5ff, #6b3bff, #ff3bd5, #ff3b3b); }
.cn-swatch.is-custom > span i { display: inline-block; opacity: 1; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); }
.cn-swatch input.cn-picker { pointer-events: auto; position: absolute; inset: 0 0 18px; width: 100%; height: calc(100% - 18px); opacity: 0; cursor: pointer; }
.cn-hex-row { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 12px; color: var(--text-dim); font-size: 13px; }
.cn-hex-row code { padding: 2px 10px; color: #fff; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); }

/* ---------- Promotions (players) ---------- */
.promo-chip { display: inline-block; padding: 1px 7px; margin-left: 4px; color: #1a1206; font-size: 11px; font-weight: 800; line-height: 1.5; background: linear-gradient(180deg, #ffe07a, #e9b83a); border-radius: 2px; vertical-align: middle; }
.shop-sale { position: absolute; z-index: 2; left: 12px; bottom: 12px; padding: 4px 10px; color: #fff; font-size: 13px; font-weight: 800; background: linear-gradient(180deg, var(--accent-hot), var(--accent-dark)); box-shadow: 0 4px 14px rgba(184, 19, 27, .5); }
.shop-price-old { margin-right: 4px; color: var(--text-faint); font-size: 15px; text-decoration-color: var(--accent-hot); }
.promo-banner { display: flex; align-items: center; gap: 16px; padding: 14px 18px; background: linear-gradient(90deg, rgba(233, 184, 58, .16), rgba(184, 19, 27, .12) 60%, transparent), var(--ink-850); border: 1px solid rgba(233, 184, 58, .4); border-left: 4px solid #e9b83a; }
.promo-banner-icon { display: grid; place-items: center; flex-shrink: 0; width: 46px; height: 46px; color: #1a1206; font-size: 20px; background: linear-gradient(180deg, #ffe07a, #e9b83a); }
.promo-banner-title { color: #ffe07a; font-weight: 800; font-size: 16px; }
.promo-banner-line { color: var(--text); font-size: 14px; }

/* ---------- Promotion countdown ---------- */
.promo-timer { position: absolute; z-index: 2; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; color: #ffe07a; font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; background: rgba(6, 6, 8, .85); border: 1px solid rgba(233, 184, 58, .5); }
.promo-timer.is-soon { color: #fff; background: rgba(184, 19, 27, .9); border-color: var(--accent-hot); animation: timer-blink 1s steps(2) infinite; }
.promo-timer.is-over { color: var(--text-faint); border-color: var(--line); animation: none; }
.promo-timer.is-inline { position: static; margin-left: 6px; padding: 1px 8px; font-size: 12px; }
.promo-timer.is-card { right: 12px; bottom: 42px; }
@keyframes timer-blink { 50% { border-color: transparent; } }
@media (prefers-reduced-motion: reduce) { .promo-timer.is-soon { animation: none; } }
.shop-cat-card-promo { position: absolute; z-index: 2; left: 12px; top: 12px; padding: 4px 10px; color: #1a1206; font-size: 13px; font-weight: 800; background: linear-gradient(180deg, #ffe07a, #e9b83a); box-shadow: 0 4px 14px rgba(0, 0, 0, .5); }

/* Cloudflare Turnstile box */
.turnstile-box { display: flex; justify-content: center; min-height: 65px; margin: 16px 0 0; }

/* ---------- Top-up promotion panel (tb-*): picture stage + promotion list ---------- */
.tb-panel {
    position: relative;
    margin-bottom: 28px;
    background:
        radial-gradient(120% 140% at 0% 0%, rgba(184, 19, 27, .16), transparent 55%),
        linear-gradient(180deg, #141416, #0d0d0f);
    border: 1px solid var(--line-strong);
    box-shadow: 0 24px 50px -18px rgba(0, 0, 0, .8);
}
.tb-panel::before { content: ''; position: absolute; left: -1px; top: -1px; right: -1px; height: 2px; background: linear-gradient(90deg, var(--accent-hot), var(--accent) 35%, transparent 80%); }

.tb-head { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.tb-head-icon { display: grid; place-items: center; width: 30px; height: 30px; color: #fff; font-size: 13px; background: linear-gradient(160deg, var(--accent-hot), var(--accent-dark, #6b0b10)); clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px); }
.tb-head-title { color: #fff; font-family: var(--font-display); font-size: 22px; letter-spacing: 3px; line-height: 1; }
.tb-head-line { flex: 1; height: 1px; background: linear-gradient(90deg, rgba(214, 199, 165, .4), transparent); }
.tb-head-count { color: var(--text-faint); font-family: var(--font-display); font-size: 16px; letter-spacing: 2px; }
.tb-head-count b { color: var(--accent-2); font-weight: 400; }

.tb-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 0; }
.tb-panel.is-single .tb-body { grid-template-columns: minmax(0, 1fr); }

/* stage: the shape of the first picture, every picture whole (contain) on a blurred copy of itself */
.tb-stage { position: relative; overflow: hidden; aspect-ratio: var(--tb-ratio, 1.7778); max-height: 520px; background: #08080a; }
.tb-panel.is-single .tb-stage { max-height: 560px; }
.tb-stage::after { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; box-shadow: inset 0 0 70px rgba(0, 0, 0, .55); }
.tb-slide { position: absolute; inset: 0; margin: 0; opacity: 0; visibility: hidden; transition: opacity .8s ease, visibility .8s; }
.tb-slide.is-active { opacity: 1; visibility: visible; }
.tb-slide-bg { position: absolute; inset: -24px; width: calc(100% + 48px); height: calc(100% + 48px); object-fit: cover; filter: blur(20px) brightness(.4) saturate(1.2); }
.tb-slide-img { position: relative; z-index: 1; display: block; width: 100%; height: 100%; object-fit: contain; }
.tb-slide.is-active .tb-slide-img { animation: tb-zoom 7s ease-out both; }
.tb-slide-link { position: absolute; inset: 0; z-index: 3; }
.tb-slide .img-zoom { z-index: 5; top: 14px; right: 14px; }
.tb-nav, .tb-slide .img-zoom {
    width: 42px; height: 42px; color: #fff;
    background: rgba(10, 10, 12, .6); border: 1px solid rgba(255, 255, 255, .18);
    clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
}
.tb-nav {
    position: absolute; z-index: 5; top: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    opacity: 0; transform: translateY(-50%); transition: opacity .25s, background .2s, border-color .2s;
}
.tb-stage:hover .tb-nav, .tb-nav:focus-visible { opacity: 1; }
.tb-nav:hover, .tb-slide .img-zoom:hover { background: var(--accent); border-color: var(--accent-hot); }
.tb-nav.is-prev { left: 14px; }
.tb-nav.is-next { right: 14px; }
@media (hover: none) { .tb-nav { opacity: .9; } }

/* promotion list (right) */
.tb-list { display: flex; flex-direction: column; margin: 0; padding: 8px; list-style: none; border-left: 1px solid var(--line); background: rgba(0, 0, 0, .25); overflow-y: auto; max-height: 520px; }
.tb-list li + li { margin-top: 6px; }
.tb-item {
    position: relative; display: flex; align-items: center; gap: 12px; width: 100%;
    padding: 8px 10px 10px; overflow: hidden;
    color: var(--text-dim); text-align: left;
    background: rgba(255, 255, 255, .02); border: 1px solid transparent; border-left: 2px solid transparent;
    transition: background .25s, border-color .25s, color .25s;
}
.tb-item:hover { color: #fff; background: rgba(255, 255, 255, .05); }
.tb-item.is-active { color: #fff; background: linear-gradient(90deg, rgba(184, 19, 27, .26), rgba(184, 19, 27, .05)); border-color: rgba(184, 19, 27, .35); border-left-color: var(--accent-hot); }
.tb-item:focus-visible { outline: 2px solid var(--accent-hot); outline-offset: -2px; }
.tb-item-thumb { flex: 0 0 88px; height: 50px; overflow: hidden; background: #08080a; border: 1px solid rgba(255, 255, 255, .1); }
.tb-item-thumb img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.6) brightness(.75); transition: filter .3s, transform .4s; }
.tb-item:hover .tb-item-thumb img, .tb-item.is-active .tb-item-thumb img { filter: none; }
.tb-item.is-active .tb-item-thumb img { transform: scale(1.08); }
.tb-item-text { display: flex; flex-direction: column; min-width: 0; }
.tb-item-no { color: var(--accent-2); font-family: var(--font-display); font-size: 13px; letter-spacing: 2px; line-height: 1; }
.tb-item.is-active .tb-item-no { color: var(--accent-hot); }
.tb-item-title { overflow: hidden; color: inherit; font-weight: 700; font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tb-item-meta { margin-top: 2px; color: var(--text-faint); font-size: 11px; white-space: nowrap; }
/* timeline of the current promotion: fills in 6 s, then the next one shows (js: animationend) */
.tb-item-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255, 255, 255, .06); }
.tb-item-bar::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, var(--accent), var(--accent-hot)); transform: scaleX(0); transform-origin: left; }
.tb-item.is-active .tb-item-bar::after { animation: tb-progress 6s linear forwards; }
.tb-panel.is-paused .tb-item.is-active .tb-item-bar::after { animation-play-state: paused; }

.tb-caption { padding: 12px 18px; color: #fff; font-weight: 700; border-top: 1px solid var(--line); }

@keyframes tb-zoom { from { transform: scale(1.05); } to { transform: none; } }
@keyframes tb-progress { to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) {
    .tb-slide, .tb-slide.is-active .tb-slide-img { transition: none; animation: none; }
    .tb-item.is-active .tb-item-bar::after { animation: none; transform: scaleX(1); }
}
/* tablets / phones: list becomes a row of small cards under the picture */
@media (max-width: 991.98px) {
    .tb-body { grid-template-columns: minmax(0, 1fr); }
    .tb-list { flex-direction: row; gap: 6px; max-height: none; overflow-x: auto; border-left: 0; border-top: 1px solid var(--line); scroll-snap-type: x mandatory; }
    .tb-list li { flex: 0 0 220px; scroll-snap-align: start; }
    .tb-list li + li { margin-top: 0; }
}
@media (max-width: 575.98px) {
    .tb-head { padding: 10px 12px; }
    .tb-head-title { font-size: 19px; }
    .tb-list li { flex-basis: 78%; }
    .tb-item-thumb { flex-basis: 70px; height: 42px; }
    .tb-nav, .tb-slide .img-zoom { width: 36px; height: 36px; }
}

/* ---------- Account security (recent sign-ins) ---------- */
.acc-logins { margin: 0; padding: 0; list-style: none; }
.acc-logins li { display: grid; grid-template-columns: 34px minmax(0, 1.4fr) minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 4px; border-bottom: 1px solid var(--line); }
.acc-logins li:last-child { border-bottom: 0; }
.acc-login-icon { display: grid; place-items: center; width: 30px; height: 30px; color: var(--text-dim); font-size: 12px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.acc-login-icon.is-ok { color: var(--ok); border-color: rgba(61, 220, 151, .35); }
.acc-login-icon.is-bad { color: var(--danger); border-color: rgba(255, 77, 90, .4); }
.acc-login-icon.is-gold { color: #f2b33d; border-color: rgba(242, 179, 61, .4); }
.acc-login-what { display: flex; flex-direction: column; color: #fff; font-size: 14px; font-weight: 600; min-width: 0; }
.acc-login-what small { color: var(--text-faint); font-weight: 400; font-size: 12px; }
.acc-login-where { overflow: hidden; color: var(--text-dim); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.acc-login-when { color: var(--text-faint); font-size: 12px; white-space: nowrap; }
@media (max-width: 575.98px) {
    .acc-logins li { grid-template-columns: 30px minmax(0, 1fr) auto; }
    .acc-login-where { grid-column: 2; grid-row: 2; }
    .acc-login-when { grid-row: 1 / span 2; grid-column: 3; }
}

/* ------------------------------------------------------------------ agreement pages (/terms /rules /privacy /refund) */
.legal-tabs { justify-content: center; }
.legal-toc { position: sticky; top: 90px; }
.legal-toc ol { padding: 14px 18px 14px 36px; }
.legal-toc li { margin-bottom: 6px; color: var(--text-faint); }
.legal-toc a { color: var(--text-dim); }
.legal-toc a:hover { color: #fff; }
.legal-doc .card-body { padding: 26px 30px; }
.legal-title { margin: 0 0 4px; color: #fff; font-size: 26px; }
.legal-title i { color: var(--accent-hot); }
.legal-updated { margin-bottom: 14px; color: var(--text-faint); font-size: 13px; }
.legal-intro { padding: 14px 16px; color: #e9e2d0; background: rgba(214, 199, 165, .06); border-left: 3px solid var(--accent-2); }
.legal-section { padding-top: 18px; scroll-margin-top: 90px; }
.legal-section h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; color: #fff; font-size: 19px; }
.legal-no { display: grid; flex: 0 0 28px; place-items: center; width: 28px; height: 28px; color: #fff; font-size: 14px; background: var(--accent); }
.legal-section p, .legal-list { color: var(--text-dim); line-height: 1.75; }
.legal-list { padding-left: 22px; }
.legal-list li { margin-bottom: 4px; }
@media (max-width: 575.98px) {
    .legal-doc .card-body { padding: 18px 16px; }
    .legal-title { font-size: 21px; }
}

/* ---------- Sign-in history: a sign-in from a new browser + network ---------- */
.acc-logins li.is-new-place { background: rgba(255, 77, 90, .06); }

/* ---------- The bell page ---------- */
.notif-list { margin: 0; padding: 0; list-style: none; }
.notif { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: start; gap: 12px; padding: 12px 6px; border-bottom: 1px solid var(--line); }
.notif:last-child { border-bottom: 0; }
.notif.is-unread { background: linear-gradient(90deg, rgba(184, 19, 27, .12), transparent 70%); border-left: 2px solid var(--accent); }
.notif-title { color: #fff; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.notif-new { margin-left: 8px; padding: 1px 7px; color: #fff; font-size: 11px; font-weight: 700; background: var(--accent); border-radius: 2px; }
.notif-body { margin-top: 2px; color: var(--text-dim); font-size: 14px; overflow-wrap: anywhere; white-space: pre-line; }
.notif-link { display: inline-block; margin-top: 6px; font-size: 13px; }
@media (max-width: 575.98px) {
    .notif { grid-template-columns: 30px minmax(0, 1fr); }
    .notif .acc-login-when { grid-column: 2; }
}

/* ---------- Support tickets ---------- */
.ticket-list { margin: 0; padding: 0; list-style: none; }
.ticket-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 16px; color: var(--text); border-bottom: 1px solid var(--line); transition: background .2s; }
.ticket-list li:last-child .ticket-row { border-bottom: 0; }
.ticket-row:hover { color: #fff; text-decoration: none; background: rgba(255, 255, 255, .03); }
.ticket-row-id { color: var(--text-faint); font-size: 13px; }
.ticket-row-main { display: flex; flex-direction: column; min-width: 0; }
.ticket-row-subject { overflow: hidden; color: #fff; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.ticket-thread { display: flex; flex-direction: column; gap: 14px; }
.ticket-msg { max-width: 88%; padding: 12px 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 2px; }
.ticket-msg.is-staff { align-self: flex-end; background: rgba(184, 19, 27, .1); border-color: rgba(184, 19, 27, .35); }
.ticket-msg-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.ticket-msg-who { color: var(--accent-2); font-size: 13px; font-weight: 700; }
.ticket-msg-body { color: var(--text); font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ticket-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ticket-file { display: block; width: 120px; height: 90px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 2px; }
.ticket-file img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 575.98px) {
    .ticket-msg { max-width: 100%; }
    .ticket-row { grid-template-columns: minmax(0, 1fr) auto; }
    .ticket-row-id { display: none; }
}

/* ---------- Ticket pictures: click / drag & drop / paste (js/ui/tickets.js) ---------- */
.t-drop-zone {
    position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    width: 100%; min-height: 150px; margin: 0; padding: 22px 16px;
    text-align: center; cursor: pointer;
    background:
        repeating-linear-gradient(135deg, rgba(255, 255, 255, .018) 0 10px, transparent 10px 20px),
        radial-gradient(circle at 50% 35%, rgba(184, 19, 27, .16), transparent 70%),
        rgba(0, 0, 0, .25);
    border: 2px dashed var(--line-strong);
    border-radius: 2px;
    transition: border-color .2s, background-color .2s, transform .2s var(--ease-out), min-height .25s;
}
.t-drop-zone:hover, .t-drop-zone:focus-within { border-color: rgba(220, 31, 41, .65); }
.t-drop-zone.is-over, .t-drop-zone.is-pasted { border-color: var(--accent-hot); background-color: rgba(184, 19, 27, .14); transform: scale(1.01); }
.t-drop-zone.is-invalid { border-color: rgba(255, 77, 90, .6); }
.t-drop-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.t-drop-icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 4px; color: var(--accent-hot); font-size: 22px; background: rgba(184, 19, 27, .12); border: 1px solid rgba(220, 31, 41, .35); border-radius: 50%; transition: transform .3s var(--ease-out); }
.t-drop-zone:hover .t-drop-icon, .t-drop-zone.is-over .t-drop-icon { transform: translateY(-3px); }
.t-drop-title { color: #fff; font-size: 15px; font-weight: 700; }
.t-drop-title u { text-decoration-color: var(--accent); text-underline-offset: 3px; }
.t-drop-hint { color: var(--text-faint); font-size: 12.5px; }
.t-drop-hint kbd { padding: 1px 6px; color: var(--text); font-size: 11px; background: rgba(255, 255, 255, .08); border: 1px solid var(--line-strong); border-radius: 3px; box-shadow: none; }
/* with pictures: the zone gets small, the thumbnails take the room */
.t-drop.has-files .t-drop-zone { min-height: 0; flex-direction: row; gap: 12px; padding: 12px 16px; }
.t-drop.has-files .t-drop-icon { width: 38px; height: 38px; margin: 0; font-size: 16px; }
.t-drop.has-files .t-drop-hint { display: none; }
.t-drop.is-full .t-drop-zone { opacity: .55; pointer-events: none; }
.t-drop-previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.t-drop-previews:empty { display: none; }
.t-drop-thumb { position: relative; margin: 0; overflow: hidden; background: rgba(0, 0, 0, .35); border: 1px solid var(--line-strong); border-radius: 2px; animation: fade-up .35s var(--ease-out) both; }
.t-drop-thumb img { display: block; width: 100%; height: 110px; object-fit: cover; }
.t-drop-thumb figcaption { display: flex; flex-direction: column; padding: 6px 8px; font-size: 12px; }
.t-drop-name { overflow: hidden; color: var(--text); text-overflow: ellipsis; white-space: nowrap; }
.t-drop-thumb small { color: var(--text-faint); }
.t-drop-del { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; color: #fff; font-size: 13px; background: rgba(10, 10, 12, .8); border: 1px solid var(--line-strong); border-radius: 50%; cursor: pointer; transition: background .2s, border-color .2s; }
.t-drop-del:hover, .t-drop-del:focus-visible { background: var(--accent); border-color: var(--accent); outline: none; }
.t-drop-note { margin-top: 8px; padding: 6px 10px; color: var(--danger); font-size: 13px; background: rgba(255, 77, 90, .08); border: 1px solid rgba(255, 77, 90, .3); }

/* a picture of a conversation, large */
.t-lightbox { position: fixed; inset: 0; z-index: 1080; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 48px 16px 24px; background: rgba(0, 0, 0, .88); }
.t-lightbox[hidden] { display: none; }
.t-lightbox img { max-width: 100%; max-height: calc(100vh - 120px); object-fit: contain; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.t-lightbox-close { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; color: #fff; font-size: 18px; background: rgba(255, 255, 255, .08); border: 1px solid var(--line-strong); border-radius: 50%; cursor: pointer; }
.t-lightbox-close:hover { background: var(--accent); }
.t-lightbox-open { color: var(--text-dim); font-size: 13px; }
.ticket-file { cursor: zoom-in; }
.ticket-file img { transition: transform .3s var(--ease-out); }
.ticket-file:hover img { transform: scale(1.06); }
