/* Transcended RO — bright "4th job" theme: sky blue, royal blue and gold. */

/* Font: Mitr (Google Fonts, loaded in inc/header.php) for the whole site. */

:root {
    --ink: #1d2b4f;
    --ink-2: #44547a;
    --muted: #7682a0;
    --card: #ffffff;
    --card-2: #f5f9ff;
    --line: #dfe8f7;
    --blue: #2b6dff;
    --blue-2: #49a8ff;
    --sky: #8fd3ff;
    --gold: #f0a922;
    --gold-2: #ffd36b;
    --gold-ink: #8a5a00;
    --pink: #ff6f9c;
    --mint: #1fbf94;
    --red: #ec4a63;
    --wait: #d8930a;
    --radius: 18px;
    --shadow: 0 10px 30px rgba(43, 109, 255, 0.10), 0 2px 6px rgba(29, 43, 79, 0.06);
    --shadow-lg: 0 18px 50px rgba(43, 109, 255, 0.18), 0 4px 12px rgba(29, 43, 79, 0.08);
    --font-head: "Mitr", "Segoe UI", Tahoma, sans-serif;
    --font-body: "Mitr", "Segoe UI", Tahoma, "Leelawadee UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { color-scheme: light; scroll-behavior: smooth; }

body {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    background:
        radial-gradient(1200px 500px at 85% -10%, rgba(255, 211, 107, 0.45), transparent 60%),
        radial-gradient(900px 500px at -10% 10%, rgba(255, 111, 156, 0.18), transparent 60%),
        linear-gradient(180deg, #9fdcff 0%, #d8f0ff 28%, #f3faff 55%, #fffaf0 100%);
    background-attachment: fixed;
    position: relative;
}

/* Soft clouds across the sky */
body::before {
    content: "";
    position: fixed;
    inset: 0 0 auto 0;
    height: 420px;
    pointer-events: none;
    z-index: -1;
    opacity: .9;
    background:
        radial-gradient(60px 38px at 8% 22%, #fff 98%, transparent),
        radial-gradient(90px 52px at 13% 26%, #fff 98%, transparent),
        radial-gradient(70px 42px at 18% 22%, #fff 98%, transparent),
        radial-gradient(70px 40px at 72% 14%, #fff 98%, transparent),
        radial-gradient(110px 58px at 78% 18%, #fff 98%, transparent),
        radial-gradient(80px 44px at 85% 14%, #fff 98%, transparent),
        radial-gradient(50px 30px at 45% 8%, rgba(255,255,255,.8) 98%, transparent),
        radial-gradient(70px 36px at 49% 10%, rgba(255,255,255,.8) 98%, transparent);
    animation: drift 40s ease-in-out infinite alternate;
}

/* Twinkling sparkles */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background-image:
        radial-gradient(2px 2px at 20% 30%, rgba(255, 211, 107, .9), transparent),
        radial-gradient(2px 2px at 70% 60%, rgba(73, 168, 255, .8), transparent),
        radial-gradient(1.5px 1.5px at 40% 80%, rgba(255, 111, 156, .8), transparent),
        radial-gradient(2px 2px at 90% 40%, rgba(255, 211, 107, .9), transparent),
        radial-gradient(1.5px 1.5px at 10% 70%, rgba(73, 168, 255, .8), transparent);
    animation: twinkle 4s ease-in-out infinite alternate;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }

h1, h2, h3, .brand, .btn, .section-title, .eyebrow { font-family: var(--font-head); }
h2 { font-weight: 600; }
h3 { font-weight: 500; }

/* ---------- Top bar ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(14px);
    box-shadow: 0 1px 0 rgba(240, 169, 34, .35), 0 6px 20px rgba(29, 43, 79, .06);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 22px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: .3px;
}
.brand::before {
    content: "";
    width: 30px; height: 30px;
    background: conic-gradient(from 45deg, var(--gold-2), var(--gold), var(--blue-2), var(--blue), var(--gold-2));
    clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
    filter: drop-shadow(0 2px 4px rgba(240, 169, 34, .5));
    animation: spin 12s linear infinite;
}
.brand:hover { text-decoration: none; }

.nav { display: flex; gap: 2px; align-items: center; }
.nav a {
    color: var(--ink-2);
    padding: 8px 14px;
    border-radius: 999px;
    font-family: var(--font-head);
    font-size: 15px;
    transition: color .15s, background .15s;
}
.nav a:hover { color: var(--blue); background: rgba(43, 109, 255, .08); text-decoration: none; }
.nav a.active { color: #fff; background: linear-gradient(135deg, var(--blue), var(--blue-2)); box-shadow: 0 4px 12px rgba(43, 109, 255, .3); }
.nav a.nav-discord { color: #fff; background: #5865f2; margin-left: 6px; }
.nav a.nav-discord:hover { background: #4752c4; }

.nav-toggle, .nav-burger { display: none; }

@media (max-width: 860px) {
    .nav-burger {
        display: flex;
        width: 42px; height: 42px;
        align-items: center; justify-content: center;
        cursor: pointer;
        border-radius: 12px;
        background: var(--card-2);
        border: 1px solid var(--line);
    }
    .nav-burger span, .nav-burger span::before, .nav-burger span::after {
        content: ""; display: block; width: 18px; height: 2px; background: var(--ink); position: relative; border-radius: 2px;
    }
    .nav-burger span::before { position: absolute; top: -6px; }
    .nav-burger span::after { position: absolute; top: 6px; }
    .nav {
        display: none;
        position: absolute;
        top: 68px; left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        padding: 12px 16px 16px;
        background: rgba(255, 255, 255, .98);
        box-shadow: 0 12px 24px rgba(29, 43, 79, .12);
    }
    .nav a { padding: 12px 16px; border-radius: 12px; }
    .nav a.nav-discord { margin-left: 0; }
    .nav-toggle:checked ~ .nav { display: flex; }
}

/* ---------- Layout ---------- */
.page { flex: 1; padding-top: 36px; padding-bottom: 64px; }
.page > section, .page > .card { margin-bottom: 28px; }
.page-title {
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 2.8rem);
    line-height: 1.15;
    margin-bottom: 20px;
    color: var(--ink);
}
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head .page-title { margin-bottom: 0; }
.page-hero { text-align: center; margin: 8px auto 32px; max-width: 720px; }
.page-hero .page-title { margin-bottom: 8px; }
.narrow { max-width: 460px; margin: 0 auto; }

.eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold-ink);
    background: linear-gradient(135deg, #fff4d4, #ffe6a3);
    border: 1px solid rgba(240, 169, 34, .45);
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 12px;
}

.section-title {
    display: flex; align-items: center; gap: 12px;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 16px;
}
.section-title::before, .section-title::after {
    content: "";
    height: 2px;
    flex: 1;
    background: linear-gradient(90deg, transparent, var(--gold));
    border-radius: 2px;
}
.section-title::after { background: linear-gradient(90deg, var(--gold), transparent); }

.grid-2, .grid-3 { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); }

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    min-width: 0;
}
.card h2 { font-size: 20px; margin-bottom: 14px; }
.card h3 { font-size: 18px; margin-bottom: 6px; color: var(--blue); }
.card p { color: var(--ink-2); }

.feature { position: relative; overflow: hidden; }
.feature-icon {
    width: 48px; height: 48px;
    display: grid; place-items: center;
    border-radius: 14px;
    font-size: 24px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #fff4d4, #ffe2a0);
    box-shadow: inset 0 0 0 1px rgba(240, 169, 34, .4);
}

.muted { color: var(--muted) !important; font-size: 14px; margin-top: 8px; }
.center { text-align: center; }
.lead { color: var(--ink-2); font-size: 17px; }
.list { padding-left: 20px; color: var(--ink-2); }
.list li { margin-bottom: 4px; }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 40px 0 56px; animation: appear .9s cubic-bezier(.2, .8, .2, 1) both; }
.pill {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 8px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .85);
    box-shadow: var(--shadow);
    color: var(--ink-2);
    font-family: var(--font-head);
    font-size: 13px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 22px;
}
.dot { width: 9px; height: 9px; border-radius: 50%; }
.dot-on { background: var(--mint); box-shadow: 0 0 0 4px rgba(31, 191, 148, .2); animation: pulse 1.8s infinite; }
.dot-off { background: var(--red); box-shadow: 0 0 0 4px rgba(236, 74, 99, .18); }
.hero .eyebrow { display: table; margin: 0 auto 10px; }
.hero .lead { margin-top: 14px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 30px; }

.gradient-text {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(2.8rem, 10vw, 6rem);
    line-height: 1.05;
    background: linear-gradient(110deg, #f0a922 0%, #ffcf5a 25%, #2b6dff 55%, #49a8ff 75%, #f0a922 100%);
    background-size: 220% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 0 #fff) drop-shadow(0 10px 24px rgba(43, 109, 255, .25));
    animation: gradientFlow 7s linear infinite;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 22px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(29, 43, 79, .06);
    transition: transform .12s, box-shadow .15s, filter .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(29, 43, 79, .12); }
.btn:active { transform: translateY(1px); }
.btn-primary {
    color: #fff;
    border: 0;
    background: linear-gradient(135deg, var(--blue), var(--blue-2));
    box-shadow: 0 6px 16px rgba(43, 109, 255, .35), inset 0 -2px 0 rgba(0, 0, 0, .12);
}
.btn-primary:hover { filter: brightness(1.06); box-shadow: 0 10px 22px rgba(43, 109, 255, .4); }
.btn-gold {
    color: #5a3a00;
    border: 0;
    background: linear-gradient(135deg, var(--gold-2), var(--gold));
    box-shadow: 0 6px 16px rgba(240, 169, 34, .4), inset 0 -2px 0 rgba(0, 0, 0, .1);
}
.btn-ghost { background: rgba(255, 255, 255, .7); }
.btn-danger { color: #fff; border: 0; background: var(--red); }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 10px; }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.form label, .field-label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--ink-2); font-weight: 600; }
.field-label { margin-bottom: 8px; }
input, select, textarea {
    width: 100%;
    padding: 11px 13px;
    border-radius: 12px;
    border: 1px solid #cfdcf2;
    background: #fbfdff;
    color: var(--ink);
    font: inherit;
    font-weight: 400;
    font-size: 15px;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue-2); box-shadow: 0 0 0 4px rgba(73, 168, 255, .2); background: #fff; }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--blue); }
.radio-row { border: 0; display: flex; gap: 8px 20px; align-items: center; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); }
.radio-row legend { float: left; margin-right: 6px; font-weight: 600; }
.radio-row label { flex-direction: row; align-items: center; gap: 6px; font-weight: 400; color: var(--ink); }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.inline-form { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.inline-form input { width: 150px; padding: 7px 10px; font-size: 14px; }
.inline-form input[type="file"] { width: auto; }
.switch { flex-direction: row !important; align-items: center; gap: 8px !important; font-weight: 500 !important; }
[hidden] { display: none !important; }

/* ---------- Alerts / badges ---------- */
.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; border: 1px solid; font-size: 15px; box-shadow: var(--shadow); }
.alert-success { background: #e9fbf4; border-color: #9fe3cc; color: #0d6b51; }
.alert-error { background: #fff0f2; border-color: #f7b3bf; color: #a3203a; }
.alert-info { background: #eef6ff; border-color: #b6d7ff; color: #1d4f9a; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #eef2f9; color: var(--muted); white-space: nowrap; }
.badge-on { background: #defaef; color: #0e8a68; }
.badge-off { background: #ffe5ea; color: #c3304b; }
.badge-wait { background: #fff2d6; color: #9a6500; }

/* ---------- Tables ---------- */
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { padding: 11px 8px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table thead th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; white-space: nowrap; background: var(--card-2); }
.table tbody th, .card > .table th { color: var(--ink-2); font-weight: 600; width: 45%; }
.table tbody tr:hover td { background: #fafcff; }
.table tr:last-child th, .table tr:last-child td { border-bottom: 0; }

/* ---------- Account stats ---------- */
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.stat-value { font-family: var(--font-head); font-size: 26px; font-weight: 600; word-break: break-all; }
.stat-link { font-size: 14px; margin-top: 4px; }

/* ---------- Donation: boost banner ---------- */
.boost {
    display: flex; gap: 22px; align-items: center;
    padding: 24px;
    border-radius: 22px;
    color: #fff;
    background: linear-gradient(120deg, #ff6f9c 0%, #ffae4d 45%, #2b6dff 100%);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}
.boost::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%);
    transform: translateX(-100%);
    animation: shine 4s ease-in-out infinite;
    pointer-events: none;
}
.boost-mult {
    flex: none;
    width: 110px; height: 110px;
    display: grid; place-items: center;
    border-radius: 50%;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 46px;
    color: #7a4b00;
    background: radial-gradient(circle at 35% 30%, #fff6d0, var(--gold-2) 45%, var(--gold) 100%);
    box-shadow: 0 0 0 6px rgba(255, 255, 255, .45), 0 10px 26px rgba(0, 0, 0, .2);
}
.boost-body { flex: 1; min-width: 0; text-shadow: 0 1px 3px rgba(60, 20, 40, .35); }
.boost .item { text-shadow: none; }
.boost .eyebrow { color: #fff; background: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .5); }
.boost h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); line-height: 1.2; }
.boost p { color: rgba(255, 255, 255, .95); }
.boost-note { font-size: 14px; margin-top: 6px; }
.boost .items { margin-top: 8px; }
.boost .item { background: rgba(255, 255, 255, .92); }
@media (max-width: 560px) {
    .boost { flex-direction: column; text-align: center; }
    .boost-mult { width: 90px; height: 90px; font-size: 38px; }
    .boost .items { justify-content: center; }
}

/* ---------- Donation: offer cards ---------- */
.offers { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }
.offers-vip, .offers-promo { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 460px)); justify-content: center; }
.offer {
    position: relative;
    display: flex; flex-direction: column; gap: 8px;
    padding: 26px 22px 22px;
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform .15s, box-shadow .15s;
}
.offer::before {
    content: "";
    position: absolute; inset: 0 0 auto 0;
    height: 5px;
    background: linear-gradient(90deg, var(--blue), var(--blue-2), var(--gold-2), var(--gold));
}
.offer:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.offer-vip {
    background: linear-gradient(160deg, #fffaf0 0%, #fff 40%);
    border: 2px solid var(--gold-2);
}
.offer-vip::before { background: linear-gradient(90deg, var(--gold), var(--gold-2), var(--gold)); }
.offer-promo { background: linear-gradient(160deg, #fff1f6 0%, #fff 45%); border-color: #ffc6d8; }
.offer-promo::before { background: linear-gradient(90deg, var(--pink), var(--gold-2)); }
.offer-title { font-size: 19px; color: var(--ink) !important; padding-right: 60px; }
.offer-price { font-family: var(--font-head); font-size: 34px; font-weight: 700; line-height: 1.1; color: var(--blue); }
.offer-price small { font-size: 16px; font-weight: 500; color: var(--muted); }
.offer-cash { font-size: 16px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.offer-cash b { font-family: var(--font-head); font-size: 22px; color: var(--gold-ink); }
.offer-cash s { color: var(--muted); }
.mult { font-family: var(--font-head); font-size: 13px; font-weight: 600; color: #fff; background: var(--pink); padding: 1px 8px; border-radius: 999px; }
.offer-desc { font-size: 14px; color: var(--ink-2); }
.offer-ends { font-size: 13px; color: var(--pink); font-weight: 600; }
.offer .btn { margin-top: auto; }
.offer .items { margin: 4px 0 8px; }
.ribbon {
    position: absolute; top: 16px; right: -34px;
    width: 130px;
    text-align: center;
    transform: rotate(45deg);
    font-family: var(--font-head);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #5a3a00;
    background: linear-gradient(90deg, var(--gold-2), var(--gold));
    padding: 3px 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}
.offer-promo .ribbon { color: #fff; background: linear-gradient(90deg, var(--pink), #ff8fb2); }

/* ---------- Item tiles (inventory-slot look) ---------- */
.items { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.item {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 10px 5px 5px;
    border-radius: 12px;
    background: #fdf8ec;
    border: 1px solid #ecd9a8;
    font-size: 13px;
    max-width: 100%;
}
.item-icon {
    flex: none;
    width: 34px; height: 34px;
    display: grid; place-items: center;
    border-radius: 9px;
    background: linear-gradient(180deg, #fff, #f4ead0);
    box-shadow: inset 0 0 0 1px #e2cc92;
}
.item-icon img { max-width: 28px; max-height: 28px; image-rendering: pixelated; }
.item-name {
    color: var(--ink); font-weight: 600; line-height: 1.25; overflow: hidden;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.item-qty { color: var(--gold-ink); font-weight: 700; }
.items-big .item-icon { width: 42px; height: 42px; }
.items-big .item-icon img { max-width: 34px; max-height: 34px; }

.payment {
    font-family: inherit;
    white-space: pre-wrap;
    background: #fffaf0;
    border: 1px dashed #e8c879;
    border-radius: 12px;
    padding: 14px;
    font-size: 16px;
    margin-bottom: 10px;
}

/* ---------- QR dialog ---------- */
.qr-dialog {
    margin: auto;
    width: min(380px, calc(100% - 32px));
    padding: 20px 22px 22px;
    border: 0;
    border-radius: 22px;
    background: #fff;
    color: var(--ink);
    text-align: center;
    box-shadow: var(--shadow-lg);
}
.qr-dialog::backdrop { background: rgba(29, 43, 79, .45); backdrop-filter: blur(4px); }
.qr-close-row { display: flex; justify-content: flex-end; margin: -8px -10px 0 0; }
.qr-x { background: none; border: 0; color: var(--muted); font-size: 28px; line-height: 1; cursor: pointer; padding: 2px 8px; }
.qr-x:hover { color: var(--ink); }
.qr-title { font-size: 19px; margin-bottom: 14px; color: #0b3e8a; }
.qr-box { background: #fff; border-radius: 14px; padding: 8px; margin: 0 auto; width: 250px; max-width: 100%; box-shadow: inset 0 0 0 2px #e3ecfa; }
.qr-box svg { display: block; width: 100%; height: auto; }
.qr-amount { margin-top: 14px; font-family: var(--font-head); font-size: 19px; font-weight: 600; }
.qr-name { color: var(--ink-2); font-size: 15px; }
.qr-dialog .btn { margin-top: 16px; }

/* ---------- Admin ---------- */
.subnav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.subnav a { padding: 7px 16px; border-radius: 999px; background: rgba(255, 255, 255, .8); border: 1px solid var(--line); color: var(--ink-2); font-family: var(--font-head); }
.subnav a.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.subnav a:hover { text-decoration: none; }
.grid-offers { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr)); }
.offer-form-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.offer-form-head h3 { margin: 0; }
.offer-form-head .switch { margin-left: auto; }
.offer-new { border-style: dashed; background: rgba(255, 255, 255, .7); }
.js-mode-boost .only-bundle, .js-mode-bundle .only-boost { display: none !important; }
.item-editor { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; margin-bottom: 10px; }
.item-editor-rows { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.item-editor-head, .item-editor-row { display: grid; grid-template-columns: 110px 80px 1fr 40px; gap: 6px; width: 100%; align-items: center; }
.item-editor-head { font-size: 12px; color: var(--muted); font-weight: 600; }
.item-editor-row input { padding: 7px 9px; font-size: 14px; }

/* ---------- Footer ---------- */
.footer { padding: 26px 0; color: var(--muted); font-size: 13px; text-align: center; border-top: 1px solid rgba(240, 169, 34, .3); background: rgba(255, 255, 255, .6); }

/* ---------- Animations ---------- */
@keyframes appear { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(31, 191, 148, 0); } }
@keyframes gradientFlow { to { background-position: 220% center; } }
@keyframes drift { from { transform: translateX(-30px); } to { transform: translateX(30px); } }
@keyframes twinkle { from { opacity: .4; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shine { 0%, 60% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Promo bonus per package ---------- */
.bonus-box {
    border: 1px dashed #ffb3c9;
    background: #fff5f8;
    border-radius: 12px;
    padding: 8px 10px 10px;
}
.bonus-label { display: block; font-family: var(--font-head); font-size: 13px; font-weight: 500; color: #c2335d; margin-bottom: 6px; }
.items-bonus .item { background: #fff; border-color: #ffc6d8; }
.boost-tiers { display: grid; gap: 8px; margin-top: 10px; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.boost-tier { background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .45); border-radius: 12px; padding: 8px 10px; }
.boost-tier-price { display: block; font-family: var(--font-head); font-weight: 600; margin-bottom: 6px; }
.bonus-by-package { display: flex; flex-direction: column; gap: 8px; }
.bonus-pkg { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; background: var(--card-2); }
.bonus-pkg summary { cursor: pointer; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.bonus-pkg[open] summary { margin-bottom: 8px; }

/* ---------- Home: hero monsters ---------- */
.hero { position: relative; }
.hero-content { position: relative; z-index: 1; }
.hero-mobs { position: absolute; top: 10px; bottom: 10px; width: 22%; pointer-events: none; }
.hero-mobs-left { left: 0; }
.hero-mobs-right { right: 0; }
.mob { position: absolute; max-width: 110px; max-height: 120px; filter: drop-shadow(0 8px 10px rgba(29, 43, 79, .18)); animation: bob 4s ease-in-out infinite; }
.mob-0 { top: 4%; left: 10%; }
.mob-1 { top: 38%; left: 48%; animation-delay: -1s; }
.mob-2 { top: 64%; left: 2%; animation-delay: -2s; }
.mob-3 { top: 84%; left: 58%; animation-delay: -3s; max-width: 80px; }
.hero-mobs-right .mob { left: auto; }
.hero-mobs-right .mob-0 { right: 10%; }
.hero-mobs-right .mob-1 { right: 48%; }
.hero-mobs-right .mob-2 { right: 2%; }
.hero-mobs-right .mob-3 { right: 58%; }
@media (max-width: 900px) { .hero-mobs { display: none; } }

.stats-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
    overflow: hidden;
}
.stats-strip div { display: flex; flex-direction: column; align-items: center; padding: 16px 8px; border-right: 1px solid var(--line); }
.stats-strip div:last-child { border-right: 0; }
.stats-strip b { font-family: var(--font-head); font-size: 26px; font-weight: 700; color: var(--blue); line-height: 1.2; }
.stats-strip span { font-size: 13px; color: var(--muted); }

/* ---------- Home: features ---------- */
.features { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.feature-card {
    position: relative;
    display: flex; flex-direction: column; gap: 6px;
    padding: 20px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform .15s, box-shadow .15s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature-card:hover .feature-mob img { animation: bob 1.2s ease-in-out infinite; }
.feature-shot { margin: -20px -20px 8px; aspect-ratio: 16 / 8; overflow: hidden; background: var(--card-2); }
.feature-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.feature-top { display: flex; align-items: center; gap: 14px; }
.feature-mob {
    flex: none;
    width: 76px; height: 76px;
    display: grid; place-items: center;
    border-radius: 20px;
    background: radial-gradient(circle at 50% 70%, #fff4d4, #e8f4ff 70%);
    box-shadow: inset 0 0 0 1px var(--line);
}
.feature-mob img { max-width: 66px; max-height: 66px; image-rendering: auto; }
.feature-tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 1px; color: var(--gold-ink); background: #fff2d1; padding: 1px 8px; border-radius: 999px; }
.feature-card h3 { font-size: 21px; color: var(--ink); margin: 2px 0 0; }
.feature-lead { font-family: var(--font-head); font-size: 16px; font-weight: 500; color: var(--blue); }
.feature-desc { font-size: 14px; color: var(--ink-2); }

/* ---------- Home: gallery ---------- */
.gallery { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
.shot {
    position: relative;
    display: block;
    padding: 0;
    border: 0;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: var(--card-2);
    box-shadow: var(--shadow);
    cursor: zoom-in;
}
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.shot:hover img { transform: scale(1.05); }
.shot-caption {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 18px 12px 8px;
    color: #fff;
    font-size: 14px;
    text-align: left;
    background: linear-gradient(transparent, rgba(10, 20, 45, .7));
}
.gallery-admin .shot { cursor: default; }
.shot-del { position: absolute; top: 8px; right: 8px; }
.lightbox { margin: auto; padding: 12px; border: 0; border-radius: 18px; background: #fff; max-width: min(1100px, calc(100% - 32px)); box-shadow: var(--shadow-lg); }
.lightbox::backdrop { background: rgba(10, 20, 45, .75); }
.lightbox form { display: flex; justify-content: flex-end; }
.lightbox img { display: block; max-width: 100%; max-height: 78vh; border-radius: 12px; margin: 0 auto; }
.lightbox p { text-align: center; margin-top: 8px; color: var(--ink-2); }

.join { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; background: linear-gradient(135deg, #fffaf0, #eef6ff); }
.join .hero-actions { margin-top: 0; }

@keyframes bob { 50% { transform: translateY(-10px); } }

/* ---------- Admin: test send ---------- */
.offer-wrap { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.test-send {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    padding: 10px 14px;
    border: 1px dashed #b6d7ff;
    border-radius: 12px;
    background: #f3f9ff;
    font-size: 14px;
}
.test-send input[name="char_name"] { width: 160px; padding: 6px 10px; font-size: 14px; }
.test-send label { display: flex; align-items: center; gap: 4px; }

/* ---------- Admin dashboard ---------- */
.kpis { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); margin-bottom: 20px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kpi-label { color: var(--muted); font-size: 13px; }
.kpi-value { font-family: var(--font-head); font-size: 26px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: 13px; font-weight: 400; color: var(--muted); }
.kpi-sub { font-size: 13px; color: var(--ink-2); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head h2 { margin-bottom: 0; }
.card-head-bar { margin: 28px 0 14px; }
.card-head-bar .section-title { margin: 0; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); }
.seg a { padding: 5px 14px; border-radius: 999px; font-size: 14px; color: var(--ink-2); }
.seg a:hover { text-decoration: none; background: #fff; }
.seg a.active { background: var(--blue); color: #fff; }

.chart { display: grid; grid-template-columns: auto 1fr; gap: 8px; height: 240px; }
.chart-axis { display: flex; flex-direction: column; justify-content: space-between; text-align: right; font-size: 11px; color: var(--muted); padding-bottom: 22px; font-variant-numeric: tabular-nums; }
.chart-plot {
    display: flex; align-items: stretch; gap: 2px; min-width: 0; margin-bottom: 22px; position: relative;
    background: linear-gradient(var(--line), var(--line)) 0 0 / 100% 1px no-repeat,
                linear-gradient(var(--line), var(--line)) 0 50% / 100% 1px no-repeat;
    border-bottom: 1px solid #c9d6ec;
}
.chart-col { flex: 1; min-width: 0; position: relative; display: flex; flex-direction: column; justify-content: flex-end; outline: none; cursor: default; }
.chart-bar { display: block; width: 100%; max-width: 36px; margin: 0 auto; background: var(--blue); border-radius: 4px 4px 0 0; transition: background .15s; }
.chart-col:hover .chart-bar, .chart-col:focus .chart-bar { background: #1749c4; }
.chart-x { position: absolute; left: 50%; bottom: -21px; transform: translateX(-50%); font-size: 11px; color: var(--muted); white-space: nowrap; }
.chart-col:hover::after, .chart-col:focus::after {
    content: attr(data-tip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
    background: var(--ink); color: #fff; font-size: 12px; padding: 5px 9px; border-radius: 8px; white-space: nowrap; z-index: 2; pointer-events: none;
}
.chart-col:nth-child(-n+3):hover::after, .chart-col:nth-child(-n+3):focus::after { left: 0; transform: none; }
.chart-col:nth-last-child(-n+3):hover::after, .chart-col:nth-last-child(-n+3):focus::after { left: auto; right: 0; transform: none; }
.chart-table { margin-top: 14px; font-size: 14px; }
.chart-table summary { cursor: pointer; color: var(--blue); }
.chart-table .table { margin-top: 8px; }
.small-note { font-size: 13px; margin-top: 10px; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rank td { vertical-align: top; }
.rank-no { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 12px; font-weight: 600; background: #eef2f9; color: var(--ink-2); }
.rank-1 { background: var(--gold-2); color: var(--gold-ink); }
.rank-2 { background: #e3e9f3; color: #4a5875; }
.rank-3 { background: #f7dcc4; color: #8a4b16; }
.share { display: block; height: 4px; margin-top: 6px; border-radius: 4px; background: var(--card-2); overflow: hidden; }
.share span { display: block; height: 100%; background: var(--sky); border-radius: 4px; }
.month-pick input { padding: 6px 10px; font-size: 14px; width: auto; }

/* ---------- Account: character cards ---------- */
.char-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); }
.char-card {
    --c1: #6aa8ff; --c2: #2b6dff;
    border-radius: 20px; overflow: hidden; background: var(--card); border: 1px solid var(--line);
    box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; display: flex; flex-direction: column;
}
.char-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.char-sword    { --c1: #ff8a8a; --c2: #d63a4f; }
.char-mage     { --c1: #b993ff; --c2: #6b3fd6; }
.char-archer   { --c1: #7fe0a8; --c2: #1d9a64; }
.char-acolyte  { --c1: #ffd76b; --c2: #d99211; }
.char-merchant { --c1: #ffb27a; --c2: #d8661c; }
.char-thief    { --c1: #8a93b8; --c2: #343c63; }
.char-gun      { --c1: #9bb4c9; --c2: #4c6782; }
.char-ninja    { --c1: #7f9cf0; --c2: #283f8f; }
.char-taekwon  { --c1: #66dccf; --c2: #128a80; }
.char-summoner { --c1: #ffa3c4; --c2: #d4487a; }
.char-novice   { --c1: #9fdcff; --c2: #3d93d9; }
.char-top {
    position: relative; min-height: 118px; padding: 14px 16px; color: #fff; overflow: hidden;
    background: radial-gradient(circle at 85% 20%, rgba(255, 255, 255, .35), transparent 45%), linear-gradient(135deg, var(--c1), var(--c2));
    display: flex; flex-direction: column; justify-content: space-between;
}
.char-top::after { content: ""; position: absolute; right: -40px; bottom: -90px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.char-slot { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; opacity: .9; }
.char-status { position: absolute; top: 12px; right: 14px; font-size: 12px; padding: 2px 10px; border-radius: 999px; background: rgba(0, 0, 0, .18); z-index: 1; }
.char-status.on { background: #fff; color: #0e8a68; font-weight: 600; }
.char-emblem { position: absolute; right: 16px; bottom: 8px; font-size: 54px; line-height: 1; opacity: .35; }
.char-job { position: relative; z-index: 1; font-family: var(--font-head); font-size: 20px; font-weight: 600; text-shadow: 0 2px 8px rgba(0, 0, 0, .18); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.char-tier { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, .25); text-shadow: none; }
.char-tier.tier-4th { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: var(--gold-ink); }
.char-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card .char-name { font-size: 20px; color: var(--ink); margin: 0; word-break: break-all; }
.char-levels { display: flex; gap: 8px; }
.char-levels span { flex: 1; display: flex; align-items: baseline; justify-content: space-between; padding: 6px 12px; border-radius: 12px; background: var(--card-2); }
.char-levels small { color: var(--muted); font-size: 12px; }
.char-levels b { font-family: var(--font-head); font-size: 20px; color: var(--c2); }
.char-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: 13px; font-variant-numeric: tabular-nums; }
.char-bars span { display: flex; justify-content: space-between; align-items: center; padding: 4px 10px; border-radius: 8px; color: var(--ink); }
.char-bars small { font-weight: 600; }
.char-hp { background: #e9fbf1; }
.char-hp small { color: #16a06a; }
.char-sp { background: #eaf2ff; }
.char-sp small { color: var(--blue); }
.char-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 12px; font-size: 13px; }
.char-stats div { display: flex; justify-content: space-between; border-bottom: 1px dashed var(--line); padding: 2px 0; }
.char-stats dt { color: var(--muted); font-weight: 600; font-size: 11px; letter-spacing: .5px; }
.char-stats dd { font-variant-numeric: tabular-nums; color: var(--ink); }
.char-traits dt { color: var(--gold-ink); }
.char-foot { margin-top: auto; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); padding-top: 10px; border-top: 1px solid var(--line); }
.zeny-dot { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff3b0, var(--gold)); vertical-align: -1px; }
@media (prefers-reduced-motion: reduce) { .char-card, .char-card:hover { transition: none; transform: none; } }
.has-art .char-top { min-height: 200px; }
.char-art { position: absolute; right: -44px; bottom: -6px; height: 206px; width: auto; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .22)); transition: transform .25s; pointer-events: none; }
.char-card:hover .char-art { transform: translateY(-4px) scale(1.03); }
.has-art .char-job { max-width: 58%; }
.has-art .char-slot { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) { .char-card:hover .char-art { transform: none; } }
