/* =========================================================
   DankScape - stylesheet
   Aesthetic: dark medieval, oil-lamp glow, brass + parchment
   ========================================================= */

:root {
    --bg-deep:      #1a120a;
    --bg-stone:     #241910;
    --bg-card:      #2d2014;
    --bg-card-hi:   #38271a;
    --line:         #4d3520;
    --line-hi:      #6a4a2a;

    --parchment:    #ead9b6;
    --ink:          #f3e6c4;
    --ink-muted:    #b8a47e;
    --ink-dim:      #836b48;

    --brass:        #c89b3c;
    --brass-hi:     #f0c860;
    --brass-deep:   #8b6a22;

    --blood:        #a02020;
    --blood-hi:     #d04040;
    --moss:         #6a8a3a;
    --moss-hi:      #9bc14a;
    --azure:        #4a7fa8;

    --shadow-deep:  0 4px 20px rgba(0,0,0,.6);
    --shadow-soft:  0 2px 8px rgba(0,0,0,.3);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background:
        radial-gradient(ellipse at top, rgba(80,50,20,.4), transparent 60%),
        radial-gradient(ellipse at bottom, rgba(40,20,10,.5), transparent 70%),
        var(--bg-deep);
    color: var(--ink);
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 17px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: '';
    position: fixed; inset: 0;
    pointer-events: none;
    background-image:
        repeating-linear-gradient(0deg, rgba(0,0,0,.08) 0 2px, transparent 2px 4px);
    opacity: .35;
    z-index: 1;
}

/* ---------- Top bar ---------- */
.topbar {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 28px;
    background: linear-gradient(180deg, #1c130a, #0e0904);
    border-bottom: 2px solid var(--brass-deep);
    box-shadow: var(--shadow-deep);
}

.brand a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--brass-hi);
    font-family: 'Cinzel', serif;
    font-weight: 700;
    letter-spacing: .05em;
}
.brand-mark {
    font-size: 28px;
    color: var(--brass);
    text-shadow: 0 0 12px rgba(240,200,96,.4);
}
.brand-text { font-size: 22px; }
.brand-text em { color: var(--parchment); font-style: italic; font-weight: 500; }

.topnav {
    display: flex; gap: 4px; flex-wrap: wrap;
}
.topnav a {
    color: var(--ink-muted);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 3px;
    font-family: 'Cinzel', serif;
    font-size: 14px;
    letter-spacing: .08em;
    transition: all .15s ease;
}
.topnav a:hover {
    color: var(--brass-hi);
    background: rgba(200,155,60,.08);
    text-shadow: 0 0 10px rgba(240,200,96,.4);
}
.topnav a.muted { color: var(--ink-dim); }

/* ---------- Layout ---------- */
.layout {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    max-width: 1280px;
    margin: 24px auto;
    padding: 0 24px;
}
.layout.no-side {
    grid-template-columns: 1fr;
    max-width: 540px;
}
/* Landing/marketing page: full comfortable width, not the narrow auth column. */
.layout.no-side.wide {
    max-width: 1080px;
}

@media (max-width: 880px) {
    .layout { grid-template-columns: 1fr; }
}

.sidebar { display: flex; flex-direction: column; gap: 16px; }
.content { display: flex; flex-direction: column; gap: 16px; }

/* ---------- Cards ---------- */
.card {
    background: linear-gradient(180deg, var(--bg-card-hi), var(--bg-card));
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 18px 20px;
    box-shadow: var(--shadow-soft);
    position: relative;
}
.card::before {
    content: '';
    position: absolute; inset: 0;
    border: 1px solid transparent;
    border-image: linear-gradient(180deg, rgba(240,200,96,.2), transparent 40%) 1;
    pointer-events: none;
}

.card h2, .card h3 {
    font-family: 'Cinzel', serif;
    color: var(--brass-hi);
    margin: 0 0 12px;
    letter-spacing: .04em;
    font-weight: 700;
}
.card h2 { font-size: 22px; }
.card h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--brass);
    border-bottom: 1px solid var(--line);
    padding-bottom: 6px;
    margin-bottom: 10px;
}

/* ---------- Character sidebar ---------- */
.char-name { margin-bottom: 6px !important; }
.char-sub  { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }

.badge {
    font-family: 'Cinzel', serif;
    font-size: 11px;
    letter-spacing: .1em;
    padding: 3px 10px;
    border-radius: 2px;
    background: var(--bg-stone);
    border: 1px solid var(--line);
    color: var(--ink-muted);
}
.badge.cls-warrior { color: #f0c060; border-color: #6a4a22; }
.badge.cls-ranger  { color: #8ec05a; border-color: #4a6a22; }
.badge.cls-mage    { color: #8aa8d0; border-color: #2a4a6a; }
.badge.fac-saradomin { color: #cad5ff; border-color: #3a4a8a; }
.badge.fac-zamorak   { color: #ff8a80; border-color: #8a2a2a; }
.badge.fac-guthix    { color: #b0c860; border-color: #5a6a2a; }

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px dotted var(--line);
    font-size: 15px;
}
.stat-row:last-child { border-bottom: none; }
.stat-row span { color: var(--ink-muted); font-style: italic; }
.stat-row strong { color: var(--parchment); font-weight: 600; }

/* HP bar */
.hp-bar {
    position: relative;
    margin-top: 12px;
    height: 22px;
    background: var(--bg-stone);
    border: 1px solid var(--line);
    border-radius: 3px;
    overflow: hidden;
}
.hp-fill {
    height: 100%;
    background: linear-gradient(90deg, #5a1010, #c02828, #f04040);
    transition: width .3s ease;
    box-shadow: inset 0 -8px 8px rgba(0,0,0,.3);
}
.hp-text {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Cinzel', serif;
    font-size: 12px;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,.9);
    letter-spacing: .08em;
}

/* Skill rows */
.skill-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
    align-items: center;
    padding: 5px 0;
}
.skill-name { color: var(--ink-muted); font-size: 14px; }
.skill-lvl  {
    color: var(--brass-hi);
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 16px;
    min-width: 30px;
    text-align: right;
}
.xp-bar {
    grid-column: 1 / -1;
    height: 4px;
    background: var(--bg-stone);
    border-radius: 2px;
    overflow: hidden;
}
.xp-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--brass-deep), var(--brass-hi));
    transition: width .3s ease;
}

/* Log feed */
.logfeed { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.logfeed li {
    padding: 4px 0;
    border-bottom: 1px dotted var(--line);
    color: var(--ink-muted);
}
.logfeed li:last-child { border-bottom: none; }
.logfeed .log-good { color: var(--moss-hi); }
.logfeed .log-bad  { color: var(--blood-hi); }
.logfeed .log-loot { color: var(--brass-hi); }

/* ---------- Content cards / headings ---------- */
.content h1 {
    font-family: 'Cinzel', serif;
    color: var(--brass-hi);
    margin: 0 0 8px;
    font-size: 32px;
    letter-spacing: .04em;
}
.content > p { color: var(--ink-muted); }

/* ---------- Buttons ---------- */
button, .btn {
    font-family: 'Cinzel', serif;
    font-size: 13px;
    letter-spacing: .1em;
    padding: 10px 20px;
    border: 1px solid var(--brass-deep);
    border-radius: 3px;
    background: linear-gradient(180deg, #5a4220, #382814);
    color: var(--brass-hi);
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    display: inline-block;
    transition: all .15s ease;
    box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255,210,120,.15);
}
button:hover, .btn:hover {
    background: linear-gradient(180deg, #6e5024, #463018);
    color: #fff8d0;
    border-color: var(--brass);
    text-shadow: 0 0 8px rgba(240,200,96,.5);
}
button:disabled, .btn.disabled {
    opacity: .4; cursor: not-allowed;
    color: var(--ink-dim);
}
button:disabled:hover { background: linear-gradient(180deg, #5a4220, #382814); }

.btn-primary {
    background: linear-gradient(180deg, #c89b3c, #8b6a22);
    color: #1a120a;
    border-color: var(--brass-hi);
    font-weight: 700;
}
.btn-primary:hover {
    background: linear-gradient(180deg, #f0c860, #b48820);
    color: #000;
    text-shadow: none;
}
.btn-danger { color: #f0a0a0; border-color: #6a2020; }
.btn-danger:hover { background: linear-gradient(180deg, #5a1414, #2a0a0a); color: #ffd0d0; }

/* ---------- Forms ---------- */
label { display: block; margin: 14px 0 6px; color: var(--ink-muted); font-family: 'Cinzel', serif; font-size: 13px; letter-spacing: .08em; }
input[type=text], input[type=email], input[type=password], select, textarea {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-stone);
    border: 1px solid var(--line);
    border-radius: 3px;
    color: var(--ink);
    font-family: 'EB Garamond', serif;
    font-size: 17px;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--brass);
    box-shadow: 0 0 0 3px rgba(200,155,60,.15);
}

/* ---------- Tables ---------- */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}
th, td {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
}
th {
    font-family: 'Cinzel', serif;
    font-size: 12px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--brass);
    background: rgba(0,0,0,.2);
}
tr:hover td { background: rgba(200,155,60,.05); }

/* ---------- Flash messages ---------- */
.flash {
    position: relative; z-index: 4;
    max-width: 1280px;
    margin: 12px auto 0;
    padding: 10px 18px;
    border-radius: 3px;
    border-left: 4px solid;
    font-style: italic;
}
.flash-ok  { background: rgba(106,138,58,.15); border-color: var(--moss-hi);  color: #d8f0a8; }
.flash-err { background: rgba(160,32,32,.15);  border-color: var(--blood-hi); color: #f0c0c0; }

/* ---------- Footer ---------- */
.botbar {
    text-align: center;
    padding: 22px 24px;
    color: var(--ink-dim);
    font-size: 13px;
    font-style: italic;
    border-top: 1px solid var(--line);
    margin-top: 32px;
}

/* ---------- Misc helpers ---------- */
.row    { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.muted  { color: var(--ink-muted); }
.dim    { color: var(--ink-dim); }
.center { text-align: center; }
.mt-2   { margin-top: 16px; }
.mt-3   { margin-top: 24px; }

/* ---------- Login / register specific ---------- */
.auth-hero {
    text-align: center;
    margin-bottom: 24px;
}
.auth-hero h1 {
    font-family: 'Cinzel', serif;
    font-size: 38px;
    color: var(--brass-hi);
    margin: 0 0 6px;
    letter-spacing: .06em;
    text-shadow: 0 0 24px rgba(240,200,96,.25);
}
.auth-hero .tag {
    font-style: italic;
    color: var(--ink-muted);
    font-size: 17px;
}

/* ---------- Combat arena ---------- */
.foe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.foe {
    background: linear-gradient(180deg, var(--bg-card-hi), var(--bg-card));
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 14px;
    text-align: center;
}
.foe h4 {
    margin: 0 0 4px;
    font-family: 'Cinzel', serif;
    color: var(--parchment);
    font-size: 17px;
}
.foe .lvl { color: var(--brass); font-size: 13px; letter-spacing: .1em; }
.foe .stats { color: var(--ink-muted); font-size: 13px; margin: 6px 0 10px; }

.fight-stage {
    text-align: center;
    padding: 30px 20px;
    background:
        radial-gradient(ellipse at center, rgba(160,40,40,.2), transparent 70%),
        var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 4px;
}
.fight-stage h2 {
    font-family: 'Cinzel', serif;
    color: var(--blood-hi);
    font-size: 26px;
    margin: 0 0 12px;
    letter-spacing: .04em;
}
.combatants {
    display: flex; justify-content: space-around; align-items: center; gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}
.combatant {
    min-width: 160px;
}
.combatant h5 { margin: 0 0 6px; font-family: 'Cinzel', serif; font-size: 14px; letter-spacing: .1em; }
.vs {
    font-family: 'Cinzel', serif;
    font-size: 30px;
    color: var(--brass-hi);
    text-shadow: 0 0 16px rgba(240,200,96,.4);
}

/* ---------- Item rows ---------- */
.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
}
.item {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}
.item.equipped { border-color: var(--brass); box-shadow: 0 0 12px rgba(200,155,60,.15); }
.item-name { font-weight: 600; color: var(--parchment); }
.item-meta { font-size: 12px; color: var(--ink-muted); }
.bonuses { color: var(--moss-hi); font-size: 13px; }
.price { color: var(--brass-hi); font-family: 'Cinzel', serif; }

/* ---------- Equipment block ---------- */
.eq-block {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-top: 10px;
}
.eq-slot {
    background: var(--bg-stone);
    border: 1px dashed var(--line);
    border-radius: 3px;
    padding: 8px;
    text-align: center;
    font-size: 12px;
    min-height: 56px;
}
.eq-slot .label { color: var(--ink-dim); font-family: 'Cinzel', serif; letter-spacing: .1em; }
.eq-slot.filled { border-style: solid; border-color: var(--brass-deep); background: var(--bg-card); }
.eq-slot.filled .name { color: var(--parchment); font-weight: 600; }

@media (max-width: 640px) {
    .eq-block { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
 * Features pack additions: clan badges, data tables, inline colors
 * ============================================================ */

/* Clan tag in sidebar / chat */
.badge-clan {
    color: var(--brass-hi);
    border-color: var(--brass-deep);
    text-decoration: none;
    letter-spacing: .04em;
    font-weight: 600;
}
.badge-clan:hover { color: var(--parchment); border-color: var(--parchment); }

/* Inline color classes (used in duel.php, pvp.php, quests.php) */
.good { color: var(--moss-hi); }
.bad  { color: var(--blood-hi); }
.loot { color: var(--brass-hi); font-weight: 600; }

/* Reusable data table for clans/admin/clan-roster */
table.data {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
    font-size: 14px;
}
table.data thead th {
    text-align: left;
    border-bottom: 1px solid var(--line);
    padding: 6px 8px;
    font-family: 'Cinzel', serif;
    font-size: 12px;
    letter-spacing: .08em;
    color: var(--ink-dim);
    text-transform: uppercase;
}
table.data td {
    padding: 6px 8px;
    border-bottom: 1px dashed var(--line);
    vertical-align: middle;
}
table.data tr:last-child td { border-bottom: none; }
table.data tr:hover td { background: rgba(255,255,255,.025); }
table.data input[type="number"],
table.data input[type="text"] {
    background: var(--bg-stone);
    border: 1px solid var(--line);
    color: var(--parchment);
    padding: 3px 5px;
    font-size: 13px;
    border-radius: 2px;
}
table.data form { display: contents; }

@media (max-width: 640px) {
    table.data { font-size: 12px; }
    table.data td, table.data thead th { padding: 4px 5px; }
}

/* Hero titles */
.title {
    font-family: 'Cinzel', serif;
    font-size: 12px;
    letter-spacing: .12em;
    text-transform: uppercase;
    margin: -4px 0 8px;
    font-style: italic;
    opacity: .9;
}
.title-common     { color: var(--ink-dim); }
.title-rare       { color: var(--moss-hi); }
.title-legendary {
    color: var(--brass-hi);
    text-shadow: 0 0 8px rgba(199, 155, 80, 0.5);
    font-weight: 600;
}

/* Notification badge in top nav */
.nav-badge {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 7px;
    background: var(--blood-deep, #6b1f1f);
    color: var(--parchment);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    font-family: 'EB Garamond', serif;
    line-height: 1.2;
    vertical-align: middle;
    box-shadow: 0 0 4px rgba(170, 50, 50, 0.5);
}

/* Prayer toggle in combat */
.pray-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-right: 10px;
    font-size: 14px;
    color: var(--brass-hi);
    cursor: pointer;
    user-select: none;
}
.pray-toggle input { accent-color: var(--brass-deep, #8a6d34); }

/* Workshop skill tabs */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line, #3a2e1f); padding-bottom: 8px; }
.tabs .tab {
    padding: 6px 14px; border-radius: 6px 6px 0 0; text-decoration: none;
    color: var(--ink-soft, #c9b896); background: rgba(0,0,0,0.15); border: 1px solid transparent;
}
.tabs .tab.active {
    background: var(--brass-deep, #8a6d34); color: #1c1407; font-weight: 700;
    border-color: var(--brass-hi, #c8a444);
}

/* Clan war rows */
.war-row {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.war-row .war-score { font-family: 'Cinzel', serif; font-size: 22px; font-weight: 700; letter-spacing: 2px; }

/* Async notification banner */
.notif-banner {
    display: block; margin: 10px auto; max-width: 1100px;
    padding: 10px 16px; border-radius: 8px; text-decoration: none;
    background: linear-gradient(90deg, rgba(120,30,30,0.35), rgba(80,20,20,0.2));
    border: 1px solid var(--blood, #8a2f2f); color: var(--parchment, #e8dcc0);
    font-family: 'EB Garamond', serif;
}
.notif-banner:hover { background: linear-gradient(90deg, rgba(150,40,40,0.45), rgba(100,25,25,0.3)); }
#live-dot { color: #6fae6f; transition: opacity .3s; }

/* Daily streak track */
.streak-track { display:flex; gap:6px; flex-wrap:wrap; margin-top:10px; }
.streak-day {
    flex:1; min-width:70px; text-align:center; padding:8px 4px; border-radius:6px;
    background: rgba(0,0,0,0.18); border:1px solid var(--line,#3a2e1f); opacity:.6;
}
.streak-day.reached { opacity:1; background: rgba(138,109,52,0.25); border-color: var(--brass-hi,#c8a444); }
.streak-day.seven { border-color: var(--blood,#8a2f2f); }
.streak-day .streak-num { font-family:'Cinzel',serif; font-size:12px; }
.streak-day .streak-rew { font-size:13px; color: var(--brass-hi,#c8a444); }

/* Server announcement banner */
.announce-banner {
    max-width:1100px; margin:10px auto; padding:10px 16px; border-radius:8px;
    background: linear-gradient(90deg, rgba(60,90,140,0.30), rgba(40,60,100,0.18));
    border:1px solid #46618f; color: var(--parchment,#e8dcc0); font-family:'EB Garamond',serif;
}

/* Wilderness emphasis */
.card .bad { font-weight: 600; }

/* Reuse .tabs (workshop) for gathering — already defined above. */

/* ============================================================
 * Achievements grid
 * ============================================================ */
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 10px; }
.ach { display: flex; gap: 12px; padding: 12px; border-radius: 8px; border: 1px solid var(--line); background: rgba(0,0,0,.18); }
.ach-on  { border-color: var(--brass-deep); background: rgba(200,155,60,.10); }
.ach-off { opacity: .6; }
.ach-icon { font-size: 26px; line-height: 1; }
.ach-body { display: flex; flex-direction: column; gap: 2px; }
.ach-name { font-family: 'Cinzel', serif; font-weight: 600; color: var(--parchment); }
.ach-desc { font-size: 13px; color: var(--ink-muted); }
.ach-reward { font-size: 12px; display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }

/* ============================================================
 * Mobile navigation drawer toggle
 * ============================================================ */
.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--brass-deep);
    color: var(--brass-hi);
    font-size: 22px;
    line-height: 1;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
}

/* ============================================================
 * Responsive / mobile-friendly theme
 * ============================================================ */

/* Tablet and below: single-column layout, sidebar moves below content. */
@media (max-width: 880px) {
    .layout {
        grid-template-columns: 1fr;
        gap: 16px;
        margin: 16px auto;
        padding: 0 14px;
    }
    /* On mobile, the player's own actions matter more than the stats panel,
       so render the content column first and the sidebar beneath it. */
    .content { order: 1; }
    .sidebar { order: 2; }
}

/* Phones: collapse the nav into a tappable drawer. */
@media (max-width: 720px) {
    .topbar {
        flex-wrap: wrap;
        padding: 10px 14px;
        position: sticky;
        top: 0;
        z-index: 50;
    }
    .nav-toggle { display: block; }

    /* Drawer: hidden by default, expands full-width below the bar when toggled. */
    .topnav {
        flex-basis: 100%;
        order: 3;
        flex-direction: column;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height .25s ease;
    }
    .topnav.open {
        max-height: 80vh;
        overflow-y: auto;
        margin-top: 10px;
        border-top: 1px solid var(--line);
    }
    .topnav a {
        padding: 13px 8px;            /* generous tap target (>=44px row) */
        border-bottom: 1px solid rgba(255,255,255,.05);
        font-size: 15px;
    }

    .brand-text { font-size: 18px; }

    /* Cards and type scale down a touch for small screens. */
    body { font-size: 16px; }
    .card { padding: 14px; }
    h1 { font-size: 24px; }
    h2 { font-size: 19px; }

    /* Forms and buttons: comfortable for thumbs. */
    button, .btn {
        padding: 11px 16px;
        font-size: 15px;
        min-height: 44px;
    }
    input[type="text"], input[type="number"], input[type="password"],
    input[type="email"], select, textarea {
        font-size: 16px;             /* >=16px stops iOS auto-zoom on focus */
        padding: 10px;
        min-height: 44px;
    }

    /* Flash + banners flush to the narrow viewport. */
    .flash, .announce-banner, .notif-banner { margin-left: 10px; margin-right: 10px; }

    /* Let wide data tables scroll horizontally instead of overflowing. */
    .card { overflow-x: auto; }

    /* Equipment grid: two across on phones. */
    .eq-block { grid-template-columns: repeat(2, 1fr); }

    /* Stack the deposit/withdraw and other side-by-side rows. */
    .row { gap: 8px; }
}

/* Very small phones. */
@media (max-width: 420px) {
    .ach-grid { grid-template-columns: 1fr; }
    .topnav a { font-size: 14px; }
    h1 { font-size: 21px; }
    .brand-mark { font-size: 18px; }
}

/* ============================================================
 * Landing page (logged-out front page)
 * ============================================================ */
.landing-hero { text-align: center; padding: 32px 20px; }
.landing-hero h1 {
    font-size: 44px;
    margin-bottom: 6px;
    color: var(--brass-hi);
    letter-spacing: 1px;
}
.landing-hero .tag {
    font-size: 19px;
    color: var(--parchment);
    margin-bottom: 14px;
}
.landing-lede {
    max-width: 620px;
    margin: 0 auto 8px;
    font-size: 17px;
    line-height: 1.6;
    color: var(--ink);
}
.landing-cta {
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}
.landing-cta .btn { min-width: 130px; text-align: center; }
.landing-stats {
    margin-top: 18px;
    color: var(--ink-muted);
    font-size: 14px;
}
.landing-stats strong { color: var(--brass-hi); }

/* Feature grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 12px;
}
.feature {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(0,0,0,.15);
}
.feature-icon { font-size: 30px; line-height: 1; margin-bottom: 6px; }
.feature h3 { margin: 4px 0 6px; color: var(--brass-hi); font-size: 17px; }
.feature p { color: var(--ink-muted); font-size: 14px; line-height: 1.5; margin: 0; }

/* How-to list */
.how-to {
    margin: 8px 0 4px;
    padding-left: 22px;
    line-height: 1.8;
}
.how-to li { margin-bottom: 4px; }
.how-to strong { color: var(--brass-hi); }

@media (max-width: 720px) {
    .landing-hero h1 { font-size: 34px; }
    .landing-hero .tag { font-size: 17px; }
    .landing-lede { font-size: 16px; }
    .landing-cta { flex-direction: column; align-items: stretch; }
    .landing-cta .btn { width: 100%; }
}

/* ============================================================
 * Discord OAuth button + divider
 * ============================================================ */
.oauth-divider{
    display:flex; align-items:center; text-align:center;
    color:var(--ink-dim); margin:18px 0 14px; font-size:13px;
}
.oauth-divider::before, .oauth-divider::after{
    content:''; flex:1; border-bottom:1px solid var(--line);
}
.oauth-divider span{ padding:0 12px; }
.btn-discord{
    display:inline-flex; align-items:center; justify-content:center; gap:8px;
    width:100%; padding:11px 18px;
    background:linear-gradient(180deg,#5865F2,#4752c4);
    border:1px solid #3c45a5; color:#fff; font-family:'Cinzel',serif;
    letter-spacing:.05em; border-radius:3px; text-decoration:none;
    transition:filter .15s ease;
}
.btn-discord:hover{ filter:brightness(1.1); color:#fff; }
.discord-glyph{ font-size:18px; line-height:1; }
