/* PORTAL-REBIRTH-1 — global motion safety for public and authenticated shells. */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}

/* ==========================================================================
   Nytharis.com — dark MMO design foundation (Web-1 / M0)
   Hand-authored design tokens + components. Migrates to a Tailwind pipeline in M2;
   class names are intentionally semantic so the migration is mechanical.
   ========================================================================== */

:root {
    /* ----------------------------------------------------------------------
       PORTAL-UI-1 — palette retuned to the approved Player Portal prototype.
       The prototype's own token names (--ink/--txt/--mut/--line/...) are added
       as first-class tokens; the original semantic names are remapped onto the
       same palette so every existing component inherits the new look.
       ---------------------------------------------------------------------- */

    /* Prototype tokens (used directly by the player-portal shell + screens) */
    --ink: #efe9dd;          /* brightest — headings, names, key values */
    --txt: #c3c8d1;          /* body copy */
    --mut: #828b98;          /* muted labels */
    --dim: #5a616d;          /* dimmest — meta, disabled */
    --gold: #e2b659;         /* primary gold accent */
    --goldd: #cf9c3a;        /* deep gold (gradient base) */
    --teal: #5cb4a4;
    --green: #5fb87a;
    --red: #d8705f;
    --purple: #a878e2;
    --blue: #5a96dd;
    --panel: #13161d;
    --panel2: #0f1218;
    --raised: #191d26;
    --line: rgba(255, 255, 255, 0.07);
    --line2: rgba(255, 255, 255, 0.035);

    /* Surfaces — remapped onto the prototype palette */
    --bg: #07080a;
    --bg-1: #0f1218;
    --bg-2: #191d26;
    --bg-3: #23262e;
    --panel-2: #191d26;
    --border: rgba(255, 255, 255, 0.07);
    --border-strong: rgba(255, 255, 255, 0.16);

    /* Ink — remapped */
    --text: #efe9dd;
    --text-dim: #c3c8d1;
    --muted: #828b98;

    /* Brand */
    --gold-2: #e2b659;
    --accent: var(--gold);

    /* States */
    --ok: #5fb87a;
    --down: #d8705f;

    /* Rarity — prototype rarity ramp */
    --r-common: #9aa0ab;
    --r-uncommon: #5fb87a;
    --r-rare: #5a96dd;
    --r-epic: #a878e2;
    --r-legendary: #e2b659;
    --r-mythic: #d8705f;

    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    --maxw: 1240px;

    /* Spacing scale */
    --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
    --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px;

    /* Type scale */
    --fs-xs: 12px; --fs-sm: 14px; --fs-md: 16px; --fs-lg: 20px;
    --fs-xl: 28px; --fs-2xl: 38px; --fs-hero: clamp(38px, 6vw, 64px);

    /* Rank medals */
    --medal-gold: #edc66b; --medal-silver: #cdd6e4; --medal-bronze: #cd8a52;

    --font-head: "Cinzel", Georgia, "Times New Roman", serif;
    --font-body: "Hanken Grotesk", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    background:
        radial-gradient(900px 520px at 14% -6%, rgba(226, 182, 89, 0.07), transparent 60%),
        radial-gradient(820px 600px at 96% 8%, rgba(92, 180, 164, 0.05), transparent 62%),
        radial-gradient(700px 760px at 60% 116%, rgba(168, 120, 226, 0.04), transparent 60%),
        var(--bg);
    background-attachment: fixed;
    color: var(--txt);
    font-family: var(--font-body);
    font-size: 14.5px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-2); }

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; letter-spacing: 0.3px; line-height: 1.2; color: var(--ink); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.link { color: var(--gold-2); font-weight: 500; }
.ok { color: var(--ok); }
.down { color: var(--down); }
/* PROFILE-HIGHSCORES-UX-HOTFIX-1 — character profile status indicator, same palette as the hero online indicator. */
.status-online { color: var(--ok); font-weight: 600; }
.status-offline { color: var(--down); }
.mt { margin-top: 28px; }

/* ---- Layout shell ---- */
.site { display: flex; flex-direction: column; min-height: 100vh; }
.site-main { flex: 1 0 auto; padding-bottom: 64px; }

.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(10, 12, 17, 0.82);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 64px; }

.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark {
    display: grid; place-items: center;
    width: 34px; height: 34px; border-radius: 9px;
    font-family: var(--font-head); font-weight: 700; font-size: 18px;
    color: #1a1205;
    background: linear-gradient(160deg, var(--gold-2), var(--gold));
    box-shadow: 0 0 18px rgba(217, 164, 65, 0.35);
}
.brand-text { font-family: var(--font-head); font-weight: 700; letter-spacing: 3px; font-size: 18px; }

.main-nav { display: flex; gap: 6px; margin-right: auto; }
.nav-link {
    color: var(--text-dim); font-weight: 500; font-size: 14.5px;
    padding: 8px 12px; border-radius: var(--radius-sm);
    text-transform: uppercase; letter-spacing: 0.6px;
}
.nav-link:hover { color: var(--text); background: var(--bg-2); }
.nav-link.active { color: var(--gold-2); background: var(--bg-2); }

.header-actions { display: flex; gap: 10px; align-items: center; }

/* ---- Buttons ---- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 9px 16px; border-radius: var(--radius-sm);
    font-weight: 600; font-size: 14px; cursor: pointer;
    border: 1px solid transparent; transition: transform 0.06s ease, background 0.15s ease;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 13px 24px; font-size: 15px; }
.btn-primary {
    color: #1a1205;
    background: linear-gradient(160deg, var(--gold-2), var(--gold));
    box-shadow: 0 6px 18px rgba(217, 164, 65, 0.25);
}
.btn-primary:hover { color: #140e02; filter: brightness(1.06); }
.btn-ghost { color: var(--text); background: transparent; border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--bg-2); color: var(--text); }

/* ---- Hero ---- */
.hero {
    border-bottom: 1px solid var(--border);
    background:
        linear-gradient(180deg, rgba(20, 25, 38, 0.5), transparent),
        radial-gradient(800px 360px at 20% -60px, rgba(217, 164, 65, 0.10), transparent 60%);
}
.hero-inner { padding: 84px 24px 72px; max-width: 880px; }
.hero-kicker { text-transform: uppercase; letter-spacing: 3px; font-size: 12.5px; color: var(--teal); margin: 0 0 14px; }
.hero-title { font-size: clamp(38px, 6vw, 64px); margin: 0 0 18px; }
.hero-title .accent { color: var(--gold-2); text-shadow: 0 0 28px rgba(217, 164, 65, 0.35); }
.hero-sub { font-size: 18px; color: var(--text-dim); max-width: 640px; margin: 0 0 30px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.status-strip { display: flex; gap: 36px; align-items: center; margin-top: 44px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat-val { font-family: var(--font-head); font-size: 24px; font-weight: 700; }
.stat-label { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.mock-tag {
    align-self: flex-start; font-size: 10px; text-transform: uppercase; letter-spacing: 1px;
    color: var(--muted); border: 1px solid var(--border-strong); border-radius: 6px; padding: 2px 6px;
}

/* ---- Home grid ---- */
.home-grid { display: grid; grid-template-columns: 1fr 340px; gap: 36px; padding-top: 52px; }
.home-col-side { border-left: 1px solid var(--border); padding-left: 28px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.section-head h2 { font-size: 20px; margin: 0; }

/* ---- Pages ---- */
.page { padding-top: 44px; }
.page-title { font-size: 34px; margin: 0 0 8px; }

/* ---- News ---- */
.news-list { display: grid; gap: 16px; }
.news-list.wide { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.news-card {
    display: block; background: var(--panel); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 18px 20px; color: var(--text);
    transition: border-color 0.15s ease, transform 0.08s ease;
}
.news-card:hover { border-color: var(--border-strong); transform: translateY(-2px); color: var(--text); }
.news-card h3 { margin: 8px 0 6px; font-size: 18px; }
.news-cat { font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--teal); }
.news-date { display: block; margin-top: 10px; font-size: 12.5px; color: var(--muted); }

.article { max-width: 760px; }
.article-meta { color: var(--muted); margin: 6px 0 22px; }
.article-body { font-size: 17px; color: var(--text-dim); white-space: pre-line; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.tag { font-size: 12px; color: var(--text-dim); background: var(--bg-2); border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; }

/* ---- Rank / realm lists ---- */
.rank-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rank-list a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--text); }
.rank-list a:hover { background: var(--bg-2); color: var(--text); }
.rank { display: grid; place-items: center; min-width: 26px; height: 26px; border-radius: 7px; background: var(--bg-3); font-weight: 700; font-size: 13px; color: var(--gold-2); }
.rank-name { font-weight: 600; }
.rank-val { margin-left: auto; color: var(--muted); font-size: 13px; }
.realm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.realm-list li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.realm-name { font-weight: 600; }
.realm-state { font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px; }
.realm-state.ok { color: var(--ok); }
.realm-state.down { color: var(--down); }
.realm-state.unknown, .status-val.unknown { color: var(--dim); }

/* ---- Tables ---- */
.data-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.data-table th, .data-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.data-table th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--muted); font-weight: 600; }
.data-table tbody tr:hover { background: var(--bg-1); }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table td.num { width: 80px; }

/* ---- Panels ---- */
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); }
.panel h2 { font-size: 18px; margin: 0 0 14px; }

.coming-soon { max-width: 640px; margin-top: 18px; }
.badge { display: inline-block; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; border-radius: 6px; padding: 3px 9px; margin-bottom: 12px; }
.badge-planned { color: var(--gold-2); border: 1px solid var(--gold); background: rgba(217, 164, 65, 0.08); }

/* ---- Profile / armory ---- */
.profile-head { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-bottom: 28px; }
.avatar {
    display: grid; place-items: center; width: 72px; height: 72px; border-radius: 16px;
    font-family: var(--font-head); font-size: 34px; font-weight: 700; color: #1a1205;
    background: linear-gradient(160deg, var(--gold-2), var(--gold)); box-shadow: var(--shadow);
}
.profile-sub { font-size: 17px; color: var(--text-dim); margin: 4px 0; }
.profile-meta { margin: 2px 0 0; font-size: 14px; }

.armory-grid { display: grid; grid-template-columns: 360px 1fr; gap: 24px; align-items: start; }
/* M10 — guild detail: roster is the WIDE flexible column (minmax 0 lets the table fit, no horizontal scroll);
   achievements/recruitment are a narrow sidebar that stacks below the roster on mobile. */
.guild-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.stat-block { display: grid; gap: 0; margin: 0; }
.stat-row { display: flex; justify-content: space-between; padding: 9px 2px; border-bottom: 1px solid var(--border); }
.stat-row dt { color: var(--text-dim); margin: 0; }
.stat-row dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.micro { font-size: 12px; color: var(--muted); margin-top: 14px; }

.equip-list, .passive-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.equip-item { display: grid; grid-template-columns: 90px 1fr; gap: 6px 14px; padding: 12px 14px; background: var(--bg-1); border: 1px solid var(--border); border-left-width: 3px; border-radius: var(--radius-sm); }
.equip-slot { font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--muted); align-self: center; }
.equip-name { font-weight: 600; }
.equip-mods { grid-column: 2; display: flex; flex-wrap: wrap; gap: 8px; }
.mod { font-size: 12.5px; color: var(--teal); }
.passive-list li { display: flex; justify-content: space-between; padding: 9px 2px; border-bottom: 1px solid var(--border); }
.passive-rank { color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---- Item library ---- */
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 24px; }
.item-card { background: var(--panel); border: 1px solid var(--border); border-top-width: 3px; border-radius: var(--radius); padding: 16px 18px; }
.item-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.item-head h3 { margin: 0; font-size: 16px; }
.item-rarity { font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px; }
.item-meta { font-size: 12.5px; color: var(--muted); }
.statmods { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 4px; }
.statmods li { font-size: 13px; color: var(--teal); }
.item-foot { display: flex; justify-content: space-between; font-size: 13px; border-top: 1px solid var(--border); padding-top: 10px; }

/* ---- Rarity accents ---- */
.rarity-common { border-color: var(--r-common); } .rarity-common .item-rarity, .rarity-common .equip-name { color: var(--r-common); }
.rarity-uncommon { border-color: var(--r-uncommon); } .rarity-uncommon .item-rarity, .rarity-uncommon .equip-name { color: var(--r-uncommon); }
.rarity-rare { border-color: var(--r-rare); } .rarity-rare .item-rarity, .rarity-rare .equip-name { color: var(--r-rare); }
.rarity-epic { border-color: var(--r-epic); } .rarity-epic .item-rarity, .rarity-epic .equip-name { color: var(--r-epic); }
.rarity-legendary { border-color: var(--r-legendary); } .rarity-legendary .item-rarity, .rarity-legendary .equip-name { color: var(--r-legendary); }
.rarity-mythic { border-color: var(--r-mythic); } .rarity-mythic .item-rarity, .rarity-mythic .equip-name { color: var(--r-mythic); }

/* ---- Footer ---- */
.site-footer { flex-shrink: 0; border-top: 1px solid var(--border); background: var(--bg-1); padding: 36px 0; }
.footer-top { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 20px; }
.footer-brand { font-family: var(--font-head); font-weight: 700; letter-spacing: 3px; }
.footer-tag { color: var(--muted); margin: 4px 0 0; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.footer-links a { color: var(--text-dim); font-size: 14px; }
.footer-fine { color: var(--muted); font-size: 12.5px; margin: 0; border-top: 1px solid var(--border); padding-top: 16px; }

/* ---- Blazor error UI ---- */
#blazor-error-ui {
    display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;
    background: #2a1d1d; color: #ffd7d7; padding: 12px 20px; border-top: 1px solid var(--down);
}
#blazor-error-ui .reload { color: var(--gold-2); }
#blazor-error-ui .dismiss { cursor: pointer; float: right; }

/* ---- Responsive ---- */
@media (max-width: 920px) {
    .home-grid { grid-template-columns: 1fr; }
    .home-col-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--border); padding-top: 28px; }
    .armory-grid { grid-template-columns: 1fr; }
    .guild-body { grid-template-columns: 1fr; } /* roster full-width, achievements below */
    /* Header wraps: brand + actions on top, nav becomes a scrollable strip (no nav lost on mobile). */
    .header-inner { flex-wrap: wrap; height: auto; padding: 10px 0; gap: var(--space-3); }
    .main-nav { order: 3; width: 100%; margin-right: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
    .main-nav .nav-link { white-space: nowrap; }
    .header-actions { margin-left: auto; }
}

/* ---- M1 components ---- */
.tabs { display: flex; gap: 8px; margin: 20px 0; flex-wrap: wrap; border-bottom: 1px solid var(--border); }
.tab { padding: 8px 14px; color: var(--text-dim); font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--gold-2); border-bottom-color: var(--gold); }

.pager { display: flex; align-items: center; gap: 16px; margin-top: 20px; }

.feed { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.feed-item { display: grid; grid-template-columns: 110px 1fr auto; gap: 12px; align-items: baseline; padding: 10px 12px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.feed-kind { font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--teal); font-weight: 700; }
.feed-text { color: var(--text-dim); }
.feed-when { font-size: 12.5px; white-space: nowrap; }

.search-form { display: flex; gap: 10px; margin: 20px 0; max-width: 520px; }
.search-input { flex: 1; padding: 11px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--bg-1); color: var(--text); font-size: 15px; font-family: var(--font-body); }
.search-input:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-color: var(--gold); }

/* Visible keyboard focus across interactive elements (WCAG 2.4.7). */
a:focus-visible, button:focus-visible, input:focus-visible, .btn:focus-visible,
.nav-link:focus-visible, .tab:focus-visible, .chip:focus-visible,
.ui-card-link:focus-visible, .news-card:focus-visible {
    outline: 2px solid var(--gold-2); outline-offset: 2px; border-radius: 4px;
}
.online-tag { font-size: var(--fs-xs); font-weight: 600; }

/* Programmatic focus targets (e.g. router focus-on-navigate sets tabindex="-1" on the page heading)
   must not show a focus ring on load. Keyboard focus on real controls still uses :focus-visible above. */
[tabindex="-1"]:focus { outline: none; }

/* Deterministic gap between an activity actor's name and the verb that follows it. */
.feed-who { margin-right: 0.3em; }

.detail { max-width: 720px; margin-top: 16px; }
.dialogue { margin: 14px 0; border-left: 2px solid var(--border-strong); padding-left: 14px; }
.dialogue-line { color: var(--text-dim); font-style: italic; margin: 6px 0; }
.offer-list { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 8px; }
.offer-list li { display: flex; gap: 10px; align-items: baseline; }

.guild-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 20px; }

@media (max-width: 640px) {
    .feed-item { grid-template-columns: 1fr; }
    .feed-when { white-space: normal; }
}

/* ============================================================
   M2 design system — reusable components
   ============================================================ */

/* Card primitives */
.ui-card {
    background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
    padding: var(--space-4) var(--space-5); display: flex; flex-direction: column; gap: var(--space-2);
}
.ui-card-link { color: var(--text); transition: border-color 0.15s ease, transform 0.08s ease, box-shadow 0.15s ease; }
.ui-card-link:hover { color: var(--text); border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-4); }
.ec-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-2); }
.ec-title { margin: 0; font-size: var(--fs-lg); }
.ec-meta { font-size: var(--fs-sm); color: var(--muted); }
.ec-sub { font-size: var(--fs-sm); color: var(--text-dim); }

/* Stat tiles */
.stat-card {
    background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: var(--space-3) var(--space-4); display: flex; flex-direction: column; gap: 2px;
}
.stat-card .sc-val { font-family: var(--font-head); font-weight: 700; font-size: var(--fs-xl); font-variant-numeric: tabular-nums; }
.stat-card .sc-label { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.stat-card.tone-gold .sc-val { color: var(--gold-2); }
.stat-card.tone-teal .sc-val { color: var(--teal); }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--space-3); margin: var(--space-4) 0; }

/* Activity feed kind colors */
.kind-bosskill { color: #ff7a7a; }
.kind-worldfirst { color: var(--gold-2); }
.kind-raredrop { color: var(--r-epic); }
.kind-levelup { color: var(--ok); }
.kind-questcomplete { color: var(--teal); }
.kind-discovery { color: #7cc6ff; }
.kind-death { color: var(--muted); }
.feed-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-5); }

/* Leaderboard / rank medals */
.lb-table { width: 100%; border-collapse: collapse; }
.lb-row { border-bottom: 1px solid var(--border); }
.lb-row td { padding: var(--space-3) var(--space-4); }
.lb-row:hover { background: var(--bg-1); }
.lb-row.lb-top { background: linear-gradient(90deg, rgba(217,164,65,0.06), transparent 60%); }
.medal {
    display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
    font-weight: 700; font-size: var(--fs-sm); background: var(--bg-3); color: var(--text-dim);
    font-variant-numeric: tabular-nums; border: 1px solid var(--border);
}
.medal-1 { background: radial-gradient(circle at 30% 25%, #fff2c8, var(--medal-gold)); color: #4a3206; border-color: var(--medal-gold); box-shadow: 0 0 12px rgba(240,192,96,0.4); }
.medal-2 { background: radial-gradient(circle at 30% 25%, #ffffff, var(--medal-silver)); color: #2a3140; border-color: var(--medal-silver); }
.medal-3 { background: radial-gradient(circle at 30% 25%, #f4c79c, var(--medal-bronze)); color: #3a2410; border-color: var(--medal-bronze); }
.lb-name { font-weight: 600; }
.lb-val { font-variant-numeric: tabular-nums; text-align: right; }
.lb-table th { text-align: left; padding: var(--space-3) var(--space-4); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.8px; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--border); }
.lb-table th.th-rank { width: 80px; }
.lb-table th.lb-val { text-align: right; }
.lb-row td:first-child { width: 80px; }

/* Equipment paperdoll (Armory v2) */
.paperdoll { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.doll-slot {
    background: var(--bg-1); border: 1px solid var(--border); border-left-width: 3px; border-radius: var(--radius-sm);
    padding: var(--space-3); min-height: 70px; display: flex; flex-direction: column; gap: 2px;
}
.doll-slot .ds-slot { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.8px; color: var(--muted); }
.doll-slot .ds-item { font-weight: 600; font-size: var(--fs-sm); }
.doll-empty { color: var(--muted); font-style: italic; font-size: var(--fs-sm); }

/* Region cards (world map) */
.region-card { border-left: 3px solid var(--border-strong); }
.region-kind { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }
.region-town { border-left-color: var(--teal); } .region-town .region-kind { color: var(--teal); }
.region-wilderness { border-left-color: var(--ok); } .region-wilderness .region-kind { color: var(--ok); }
.region-danger { border-left-color: var(--down); } .region-danger .region-kind { color: var(--down); }

/* Related-content chips (encyclopedia loops) */
.related-block { margin-top: var(--space-5); }
.related-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
    background: var(--bg-2); border: 1px solid var(--border); color: var(--text-dim); font-size: var(--fs-sm); font-weight: 500;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip .chip-kind { font-size: 10px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); }
.drop-list { list-style: none; margin: var(--space-2) 0 0; padding: 0; display: grid; gap: var(--space-2); }
.drop-row { display: flex; align-items: baseline; gap: var(--space-3); }
.drop-chance { font-variant-numeric: tabular-nums; color: var(--gold-2); font-weight: 600; min-width: 48px; }

/* Responsive table wrapper — prevents horizontal page overflow on mobile */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

.feed-col-title { font-family: var(--font-head); font-size: var(--fs-md); margin: 0 0 var(--space-3); color: var(--text-dim); }
.hero-stats { margin-top: var(--space-6); max-width: 660px; }
.feed-col-title + .feed { margin-top: 0; }

@media (max-width: 640px) {
    .container { padding: 0 16px; }
    .paperdoll { grid-template-columns: repeat(2, 1fr); }
    .summary-grid { grid-template-columns: repeat(2, 1fr); }
    .feed-cols { grid-template-columns: 1fr; }
    .card-grid, .guild-grid { grid-template-columns: 1fr; }
    .search-form { flex-direction: column; }
    .search-form .search-input, .search-form .btn { width: 100%; }
    .header-actions { gap: 8px; }
    .account-name { max-width: 7rem; }
    .data-table th, .data-table td { padding: 10px 8px; }
}

/* ============================================================
   M3 account identity — auth pages, header auth state, dashboard
   ============================================================ */

/* M10 — keep the auth actions (Log In left of Create Account) on ONE row; never let them float/stack.
   The nav is the flexible element that shrinks (and scrolls if truly tight), so the buttons stay aligned. */
.header-actions { flex-wrap: nowrap; flex-shrink: 0; }
.header-actions .btn { white-space: nowrap; }
.main-nav { min-width: 0; overflow-x: auto; }
.nav-link { white-space: nowrap; }
.account-name { max-width: 11rem; }
.account-name span { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.logout-form { display: inline; margin: 0; }
.head-logout { margin-left: auto; align-self: flex-start; }

.auth-page { display: flex; justify-content: center; padding: var(--space-7) var(--space-4) var(--space-8); }
.auth-card {
    width: 100%; max-width: 420px; background: var(--panel); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow); padding: var(--space-6) var(--space-6) var(--space-5);
}
.auth-card-wide { max-width: 460px; }
.auth-emblem {
    display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; margin: 0 auto var(--space-4);
    font-family: var(--font-head); font-weight: 700; font-size: 26px; color: #1a1205;
    background: linear-gradient(160deg, var(--gold-2), var(--gold)); box-shadow: 0 0 22px rgba(217, 164, 65, 0.35);
}
.auth-title { text-align: center; font-size: var(--fs-xl); margin: 0 0 6px; }
.auth-sub { text-align: center; color: var(--text-dim); margin: 0 0 var(--space-5); }
.auth-form { display: grid; gap: var(--space-2); }
.auth-label { font-size: var(--fs-sm); color: var(--text-dim); font-weight: 600; margin-top: var(--space-2); }
.auth-input {
    width: 100%; padding: 11px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
    background: var(--bg-1); color: var(--text); font-size: 15px; font-family: var(--font-body);
}
.auth-input:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-color: var(--gold); }
.auth-check { display: flex; align-items: center; gap: 8px; color: var(--text-dim); font-size: var(--fs-sm); margin-top: var(--space-3); }
.auth-submit { width: 100%; margin-top: var(--space-4); justify-content: center; }
.auth-error {
    background: rgba(248, 113, 113, 0.10); border: 1px solid var(--down); color: #ffd7d7;
    border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: var(--space-4); font-size: var(--fs-sm);
}
.auth-alt { text-align: center; color: var(--muted); margin-top: var(--space-5); font-size: var(--fs-sm); }
.auth-fine { text-align: center; color: var(--muted); font-size: var(--fs-xs); margin-top: var(--space-3); }

.profile-head-main { flex: 1 1 auto; }
.privacy-form { display: grid; gap: var(--space-2); margin-top: var(--space-2); }
.privacy-form .btn { margin-top: var(--space-3); justify-self: start; }
.security-list li { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }

/* ============================================================
   M4 account security — banners, sessions, verify prompt
   ============================================================ */

.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-secondary { color: var(--text); background: var(--bg-2); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--bg-3); color: var(--text); }
.mt-sm { margin-top: var(--space-3); }

.auth-banner {
    border-radius: var(--radius-sm); padding: 11px 16px; margin-bottom: var(--space-4); font-size: var(--fs-sm);
    border: 1px solid var(--border-strong); background: var(--bg-1); color: var(--text-dim);
}
.auth-banner.ok { border-color: var(--ok); background: rgba(74, 222, 128, 0.08); color: #cdefd6; }
.auth-banner.warn { border-color: var(--gold); background: rgba(217, 164, 65, 0.08); color: var(--gold-2); }
.auth-banner.dev { border-color: var(--teal); background: rgba(45, 212, 191, 0.07); color: #bdeee7; }
.auth-dev { text-align: center; color: var(--muted); font-size: var(--fs-sm); margin-top: var(--space-3); }

.badge-ok { color: var(--ok); border: 1px solid var(--ok); background: rgba(74, 222, 128, 0.08); }

.verify-banner {
    display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); justify-content: space-between;
    border: 1px solid var(--gold); background: rgba(217, 164, 65, 0.07); color: var(--gold-2);
    border-radius: var(--radius-sm); padding: 12px 18px; margin-bottom: var(--space-5);
}
.verify-banner .btn { margin: 0; }

.session-list { list-style: none; margin: 0 0 var(--space-3); padding: 0; display: grid; gap: var(--space-2); }
.session-item {
    display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
    padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-1);
}
.session-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.session-kind { font-weight: 600; font-size: var(--fs-sm); }
.session-item form { margin: 0; }

/* ============================================================
   M5 "My Nytharis Account" — profile header, owned characters
   ============================================================ */

.account-kicker { text-transform: uppercase; letter-spacing: 2px; font-size: 11px; color: var(--teal); margin: 0 0 2px; }

.status-chip { text-transform: capitalize; font-size: 12px; font-weight: 600; }
.status-chip.status-active { color: var(--ok); }
.status-chip.status-locked, .status-chip.status-banned { color: var(--down); }

.badge-muted { color: var(--muted); border: 1px solid var(--border-strong); background: var(--bg-2); }

.owned-char { display: flex; flex-direction: column; gap: 4px; }
.owned-char-foot {
    display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
    margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); font-size: var(--fs-xs);
}
.owned-char-foot .badge { margin: 0; }

/* Long names / emails / guild names must never break the layout (mobile-safe). */
.profile-sub, .account-kicker { overflow-wrap: anywhere; }
.owned-char .ec-title { overflow-wrap: anywhere; }
.owned-char .ec-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 640px) {
    .page-title { font-size: clamp(24px, 7vw, 34px); }
    .verify-banner { flex-direction: column; align-items: stretch; }
    .verify-banner .btn { width: 100%; }
    .owned-char .ec-head { flex-wrap: wrap; gap: 4px; }
}

@media (max-width: 420px) {
    .summary-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   M6 player prestige — armory, professions, achievements, titles
   ============================================================ */

.armory-head { align-items: flex-start; }
.avatar-lg { width: 88px; height: 88px; font-size: 34px; }
.char-title { color: var(--gold-2); font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; margin: 0 0 2px; }
.armory-you { margin-left: auto; align-self: flex-start; }

/* Progress bars (professions) */
.prog { height: 7px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.prog-fill { height: 100%; background: linear-gradient(90deg, var(--teal), var(--gold)); }

.prof-cat { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--teal); margin: var(--space-3) 0 8px; }
.prof-list { list-style: none; margin: 0 0 var(--space-3); padding: 0; display: grid; gap: 10px; }
.prof-row { display: grid; gap: 5px; }
.prof-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-2); }
.prof-name { font-weight: 600; font-size: var(--fs-sm); }
.prof-meta { font-size: var(--fs-xs); white-space: nowrap; }

/* Titles */
.title-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.title-chip { font-size: var(--fs-xs); padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--text-dim); background: var(--bg-2); }
.title-active { border-color: var(--gold); color: var(--gold-2); background: rgba(217, 164, 65, 0.08); }

/* Achievements */
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-2); margin-top: var(--space-3); }
.ach {
    display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px;
    border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--panel);
}
.ach-earned { border-color: var(--gold); background: rgba(217, 164, 65, 0.06); }
.ach-locked { opacity: 0.5; }
.ach-icon { font-size: 18px; line-height: 1; color: var(--gold-2); }
.ach-locked .ach-icon { color: var(--muted); }
.ach-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ach-name { font-weight: 600; font-size: var(--fs-sm); }
.ach-desc { font-size: var(--fs-xs); overflow-wrap: anywhere; }

@media (max-width: 640px) {
    .avatar-lg { width: 64px; height: 64px; font-size: 26px; }
    .ach-grid { grid-template-columns: 1fr; }
    .armory-you { margin-left: 0; }
}

/* My Nytharis Legacy (account dashboard) */
.legacy { margin: var(--space-5) 0; }
.legacy-title { font-size: 22px; margin: 0 0 var(--space-3); color: var(--gold-2); }

/* M6J — profile customization (portal-only, safe presets) */
.account-motto { font-style: italic; color: var(--text-dim); margin: 2px 0 4px; overflow-wrap: anywhere; }
.custom-form { display: grid; gap: 6px; margin-top: var(--space-2); }
.custom-form .btn { margin-top: var(--space-3); justify-self: start; }
.custom-form select.auth-input { appearance: auto; }

/* Profile banners — themed top accent on the profile head */
.banner-ember { border-top: 3px solid var(--gold); padding-top: calc(var(--space-2)); }
.banner-frost { border-top: 3px solid #5fb6e6; padding-top: calc(var(--space-2)); }
.banner-verdant { border-top: 3px solid var(--ok); padding-top: calc(var(--space-2)); }
.banner-void { border-top: 3px solid #9a7bd6; padding-top: calc(var(--space-2)); }
.banner-dawn { border-top: 3px solid #e88c6a; padding-top: calc(var(--space-2)); }

/* Avatar presets — accent ring */
.avatar-knight { box-shadow: 0 0 0 2px var(--gold-2); }
.avatar-mage { box-shadow: 0 0 0 2px #9a7bd6; }
.avatar-rogue { box-shadow: 0 0 0 2px var(--down); }
.avatar-ranger { box-shadow: 0 0 0 2px var(--ok); }
.avatar-warden { box-shadow: 0 0 0 2px var(--teal); }

/* Overflow guards for long names/titles/mottos + larger touch targets (mobile-safe) */
.char-title, .page-title, .prof-name, .ach-name, .ach-title { overflow-wrap: anywhere; }
.prof-name { min-width: 0; }
.auth-input { min-height: 44px; }
@media (max-width: 420px) {
    .ach { flex-direction: column; }
    .profile-head.armory-head { gap: 12px; }
}

/* ============================================================
   M7 guild community — profile, roster, directory, rankings
   ============================================================ */

.guild-head { align-items: flex-start; }
.guild-crest { background: linear-gradient(160deg, var(--teal), var(--gold)); }
.roster-table td { vertical-align: top; }
.roster-title { display: block; font-size: var(--fs-xs); color: var(--gold-2); }
.online-dot { font-size: 10px; }

.guild-ach-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.guild-ach { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); }
.guild-ach.locked { opacity: 0.5; }
.guild-ach .ach-icon { color: var(--gold-2); }
.guild-ach.locked .ach-icon { color: var(--muted); }

.recruit-dl { display: grid; gap: 2px; margin: 8px 0; }
.recruit-dl .stat-row { display: flex; justify-content: space-between; gap: var(--space-3); border-bottom: 1px solid var(--border); padding: 5px 0; }
.recruit-dl dt { color: var(--muted); }
.recruit-dl dd { margin: 0; text-align: right; overflow-wrap: anywhere; }

.card-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }

.guild-filter { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: var(--space-4) 0; }
.guild-filter .auth-input { width: auto; min-width: 160px; flex: 0 1 auto; }
.guild-filter .btn { margin: 0; }

/* Guild badge kinds (chips) */
.title-chip.badge-heritage { border-color: var(--gold); color: var(--gold-2); background: rgba(217, 164, 65, 0.08); }
.title-chip.badge-status { border-color: var(--ok); color: var(--ok); background: rgba(74, 222, 128, 0.08); }
.title-chip.badge-playstyle { border-color: var(--teal); color: var(--teal); background: rgba(45, 212, 191, 0.07); }

/* Long guild names / badge labels must wrap, not overflow (mobile-safe) */
.ui-card .ec-title { overflow-wrap: anywhere; }
.title-chip { max-width: 100%; overflow-wrap: anywhere; }

@media (max-width: 640px) {
    .guild-filter { flex-direction: column; align-items: stretch; }
    .guild-filter .auth-input { width: 100%; min-width: 0; }
    .guild-filter .auth-check { width: 100%; }
    .guild-filter .btn { width: 100%; }
    .ui-card .ec-head { flex-wrap: wrap; gap: 4px; }
}

/* ============================================================
   M11 — community identity: prestige tier, journey timeline, metrics
   ============================================================ */
.char-titles { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 2px; }
.char-titles .char-title { color: var(--gold-2); font-family: var(--font-head); font-size: var(--fs-md); margin: 0; }

.prestige-chip {
    display: inline-flex; align-items: center;
    padding: 2px 11px; border-radius: 999px;
    background: linear-gradient(180deg, rgba(217, 164, 65, 0.18), rgba(217, 164, 65, 0.05));
    border: 1px solid rgba(217, 164, 65, 0.45);
    color: var(--gold-2); font-size: var(--fs-xs); font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.7px;
}

.community-metrics { margin-top: var(--space-3); }

/* Derived "journey" timeline (read-only; newest/most-significant first) */
.timeline { list-style: none; margin: 14px 0 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--border); }
.tl-item { position: relative; display: flex; gap: 14px; padding: 7px 0; }
.tl-dot {
    position: relative; z-index: 1; flex: 0 0 auto; width: 16px; height: 16px; margin-top: 2px;
    border-radius: 50%; background: var(--bg-2); border: 2px solid var(--gold);
}
.tl-item.tl-origin .tl-dot { border-color: var(--text-dim); }
.tl-item.tl-prestige .tl-dot { background: rgba(217, 164, 65, 0.28); }
.tl-body { display: flex; flex-direction: column; min-width: 0; }
.tl-title { color: var(--text); font-weight: 600; font-size: var(--fs-sm); overflow-wrap: anywhere; }
.tl-detail { font-size: var(--fs-xs); }

/* ============================================================
   M12 — realm presence + projection health
   ============================================================ */
.status-val { font-weight: 700; }
.warn { color: var(--gold-2); }
.realm-state.warn { color: var(--gold-2); }

.realms-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.realms-head-status { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.hero-realm-health { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }

.health-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 11px; border-radius: 999px;
    font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px;
    border: 1px solid currentColor; white-space: nowrap;
}
.health-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.health-ok { color: var(--ok); background: rgba(74, 222, 128, 0.08); }
.health-warn { color: var(--gold-2); background: rgba(217, 164, 65, 0.08); }
.health-down { color: #ff7a7a; background: rgba(255, 122, 122, 0.08); }

.realm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--space-3); margin: var(--space-3) 0; }
.realm-card { display: block; padding: 16px 18px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color 0.15s; }
.realm-card:hover { border-color: var(--gold); }
.realm-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.realm-card-name { font-family: var(--font-head); font-size: var(--fs-md); color: var(--text); }
.realm-card-sub { margin: 6px 0 10px; font-size: var(--fs-xs); }

/* ============================================================
   PORTAL-UI-1 — Player Portal shell + screens
   Faithful translation of the approved prototype
   (references/Nytharis Portal.html) into reusable classes.
   ============================================================ */

/* ---- App shell : left rail + top bar + content ---- */
.app-shell { display: flex; min-height: 100vh; position: relative; }

.rail {
    width: 256px; flex: none; position: sticky; top: 0; height: 100vh; z-index: 5;
    display: flex; flex-direction: column;
    background: linear-gradient(180deg, #0c0e13, #0a0b0f);
    border-right: 1px solid var(--line);
}
.rail-brand { padding: 20px 18px 16px; display: flex; align-items: center; gap: 11px; border-bottom: 1px solid var(--line2); color: var(--ink); }
.rail-brand:hover { color: var(--ink); }
.rail-mark {
    width: 38px; height: 38px; border-radius: 10px; flex: none;
    background: linear-gradient(150deg, #f0cf78, #cf9c3a);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-head); font-weight: 800; color: #1a140a; font-size: 21px;
    box-shadow: 0 4px 14px rgba(207, 156, 58, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.rail-title { font-family: var(--font-head); font-weight: 700; color: var(--ink); font-size: 17px; letter-spacing: 0.14em; line-height: 1; }
.rail-sub { font: 500 9.5px/1.4 var(--font-mono); letter-spacing: 0.16em; color: var(--teal); margin-top: 4px; }

.rail-nav { flex: 1; overflow-y: auto; padding: 14px 12px 8px; }
.rail-group { margin-bottom: 16px; }
.rail-group-label { font: 600 9.5px/1 var(--font-mono); letter-spacing: 0.2em; color: var(--dim); padding: 0 10px 9px; }
.rail-link {
    display: flex; align-items: center; gap: 12px; width: 100%;
    padding: 9px 12px; margin-bottom: 2px;
    border: none; border-left: 2px solid transparent; border-radius: 9px;
    background: transparent; color: var(--mut);
    font-family: inherit; font-weight: 600; font-size: 13.5px; letter-spacing: 0.01em;
    cursor: pointer; text-align: left; transition: all 0.15s;
}
.rail-link:hover { background: rgba(255, 255, 255, 0.04); color: var(--txt); }
.rail-link i { font-size: 18px; flex: none; }
.rail-link span { flex: 1; }
.rail-link.active {
    background: linear-gradient(90deg, rgba(226, 182, 89, 0.14), rgba(226, 182, 89, 0.02));
    color: var(--ink); border-left-color: var(--gold);
}
.rail-badge { font: 600 10px/1 var(--font-mono); background: var(--gold); color: #1a140a; padding: 3px 6px; border-radius: 20px; }

.rail-account {
    margin: 8px 12px 14px; padding: 10px; display: flex; align-items: center; gap: 11px;
    background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
    cursor: pointer; text-align: left; color: var(--txt); transition: border-color 0.15s;
}
.rail-account:hover { border-color: rgba(226, 182, 89, 0.4); color: var(--txt); }
.rail-account .ra-av {
    width: 36px; height: 36px; border-radius: 9px; flex: none;
    background: linear-gradient(150deg, #f0cf78, #cf9c3a); color: #1a140a;
    font-family: var(--font-head); font-weight: 800; font-size: 17px;
    display: flex; align-items: center; justify-content: center;
}
.rail-account .ra-main { flex: 1; min-width: 0; line-height: 1.2; }
.rail-account .ra-name { color: var(--ink); font-weight: 700; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-account .ra-status { display: flex; align-items: center; gap: 5px; margin-top: 3px; font-size: 11px; color: var(--mut); }
.rail-account .ra-status .pdot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 7px var(--green); }

/* ---- Main column + top bar ---- */
.app-col { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; z-index: 1; }
.topbar {
    position: sticky; top: 0; z-index: 4; display: flex; align-items: center; gap: 16px;
    padding: 13px 28px; background: rgba(8, 9, 12, 0.82); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
}
.realm-pill {
    display: flex; align-items: center; gap: 9px; padding: 7px 13px; flex: none;
    background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
    cursor: pointer; color: var(--ink); transition: border-color 0.15s;
}
.realm-pill:hover { border-color: rgba(92, 180, 164, 0.4); color: var(--ink); }
.realm-pill .rp-live { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); animation: nyglow 2.6s ease-in-out infinite; }
.realm-pill .rp-live.warn { background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.realm-pill .rp-live.down { background: var(--red); box-shadow: 0 0 8px var(--red); animation: none; }
.realm-pill .rp-live.unknown { background: var(--dim); box-shadow: none; animation: none; }
.realm-pill .rp-name { font-weight: 600; font-size: 13px; }
.realm-pill .rp-online { font: 500 10px/1 var(--font-mono); color: var(--mut); }
.topbar-search {
    flex: 1; max-width: 420px; display: flex; align-items: center; gap: 10px;
    padding: 8px 14px; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px;
}
.topbar-search i { color: var(--dim); font-size: 16px; }
.topbar-search input { flex: 1; background: transparent; border: none; outline: none; color: var(--txt); font-family: inherit; font-size: 13px; }
.topbar-search kbd { font: 500 10px/1 var(--font-mono); color: var(--dim); border: 1px solid var(--line); border-radius: 5px; padding: 3px 6px; }
.topbar-spacer { flex: 1; }
.wealth-pill {
    display: flex; align-items: center; gap: 7px; padding: 7px 13px; flex: none;
    background: var(--panel); border: 1px solid rgba(226, 182, 89, 0.22); border-radius: 10px;
}
.wealth-pill i { color: var(--gold); font-size: 16px; }
.wealth-pill span { font: 600 13px/1 var(--font-mono); color: var(--gold); }
.icon-btn {
    position: relative; width: 40px; height: 40px; flex: none;
    display: flex; align-items: center; justify-content: center;
    background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
    cursor: pointer; color: var(--mut); transition: all 0.15s;
}
.icon-btn:hover { color: var(--ink); border-color: rgba(255, 255, 255, 0.18); }
.icon-btn i { font-size: 18px; }
.icon-btn .icon-badge {
    position: absolute; top: 6px; right: 7px; min-width: 16px; height: 16px; padding: 0 4px;
    display: flex; align-items: center; justify-content: center;
    background: var(--gold); color: #1a140a; font: 700 9.5px/1 var(--font-mono);
    border-radius: 20px; border: 2px solid var(--bg);
}

.app-main { flex: 1; padding: 30px 36px 60px; position: relative; }
.app-canvas { max-width: 1240px; margin: 0 auto; }

/* The player-portal screens render at the prototype's compact 14px base. */
.portal { font-size: 14px; color: var(--txt); }
.portal .mono { font-family: var(--font-mono); }
.portal .kicker { font: 600 11px/1 var(--font-mono); letter-spacing: 0.22em; color: var(--teal); text-transform: uppercase; }

/* ---- Section heads + gold links ---- */
.hub-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.hub-head h2 { font-family: var(--font-head); font-weight: 600; font-size: 20px; color: var(--ink); margin: 0; }
.hub-link {
    display: inline-flex; align-items: center; gap: 5px;
    background: none; border: none; color: var(--gold); font-family: inherit; font-weight: 600; font-size: 13px; cursor: pointer;
}
.hub-link:hover { color: var(--gold-2); }

/* ---- Buttons (prototype gold + soft) ---- */
.btn-gold {
    display: inline-flex; align-items: center; gap: 9px; padding: 12px 22px;
    background: linear-gradient(180deg, #edc66b, #d3a23f); color: #1a140a;
    border: none; border-radius: 11px; font-family: inherit; font-weight: 700; font-size: 14px;
    cursor: pointer; box-shadow: 0 6px 20px rgba(207, 156, 58, 0.3); transition: transform 0.15s;
}
.btn-gold:hover { transform: translateY(-2px); color: #1a140a; }
.btn-gold.btn-sm-gold { padding: 11px 18px; font-size: 13.5px; box-shadow: 0 6px 18px rgba(207, 156, 58, 0.28); }
.btn-soft {
    display: inline-flex; align-items: center; gap: 9px; padding: 12px 20px;
    background: rgba(255, 255, 255, 0.04); color: var(--ink); border: 1px solid var(--line);
    border-radius: 11px; font-family: inherit; font-weight: 600; font-size: 14px; cursor: pointer; transition: border-color 0.15s;
}
.btn-soft:hover { border-color: rgba(255, 255, 255, 0.2); color: var(--ink); }

/* ---- Cards ---- */
.pcard { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.pcard-pad { padding: 18px 20px; }
.pcard-link { cursor: pointer; transition: border-color 0.2s, transform 0.2s; color: var(--txt); display: block; }
.pcard-link:hover { border-color: rgba(255, 255, 255, 0.16); color: var(--txt); transform: translateY(-3px); }
.pcard-link.lift-gold:hover { border-color: rgba(226, 182, 89, 0.4); }
.pcard-link.lift-teal:hover { border-color: rgba(92, 180, 164, 0.4); }

/* ---- Hero ---- */
.hub-hero {
    position: relative; overflow: hidden; border-radius: 20px; border: 1px solid var(--line);
    background: linear-gradient(120deg, #161310 0%, #10131a 45%, #0e1117 100%);
    padding: 34px 36px; margin-bottom: 22px;
}
.hub-hero::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(620px 280px at 88% 50%, rgba(226, 182, 89, 0.16), transparent 65%),
                radial-gradient(480px 240px at 12% 120%, rgba(92, 180, 164, 0.12), transparent 60%);
}
.hub-hero-inner { position: relative; display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.hub-hero-main { flex: 1; min-width: 300px; }
.hub-hero h1 { font-family: var(--font-head); font-weight: 700; font-size: 40px; line-height: 1.04; color: var(--ink); margin: 14px 0; letter-spacing: 0.01em; }
.hub-hero-text { font-size: 15px; line-height: 1.6; color: var(--mut); margin: 0 0 22px; max-width: 480px; }
.hub-hero-text .em { color: var(--txt); }
.hub-hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---- Stat tiles ---- */
.tile-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 24px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 15px 16px; position: relative; overflow: hidden; transition: border-color 0.15s; }
.tile:hover { border-color: rgba(255, 255, 255, 0.14); }
.tile-icon { position: absolute; top: 13px; right: 13px; font-size: 17px; color: var(--dim); }
.tile-val { font: 700 24px/1 var(--font-head); margin-bottom: 7px; color: var(--ink); }
.tile-label { font: 600 9.5px/1.3 var(--font-mono); letter-spacing: 0.12em; color: var(--mut); text-transform: uppercase; }

/* ---- Dashboard grid ---- */
.hub-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 20px; align-items: start; }
.hub-side { display: flex; flex-direction: column; gap: 20px; }

/* ---- Live world feed ---- */
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 14px; border-bottom: 1px solid var(--line2); }
.panel-head h2 { font-family: var(--font-head); font-weight: 600; font-size: 18px; color: var(--ink); margin: 0; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px var(--red); animation: nyglow 2s ease-in-out infinite; }
.wfeed-row { display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-bottom: 1px solid var(--line2); transition: background 0.15s; }
.wfeed-row:hover { background: rgba(255, 255, 255, 0.02); }
.wfeed-icon { width: 34px; height: 34px; flex: none; border-radius: 9px; display: flex; align-items: center; justify-content: center; }
.wfeed-icon i { font-size: 17px; }
.wfeed-main { flex: 1; min-width: 0; line-height: 1.35; }
.wfeed-text { font-size: 13.5px; color: var(--txt); }
.wfeed-who { color: var(--gold); font-weight: 600; }
.wfeed-kind { font: 500 10px/1 var(--font-mono); letter-spacing: 0.1em; color: var(--dim); text-transform: uppercase; margin-top: 4px; }
.wfeed-when { font: 500 11px/1 var(--font-mono); color: var(--mut); flex: none; }
.panel-foot-btn { width: 100%; padding: 13px; background: none; border: none; border-top: 1px solid var(--line2); color: var(--mut); font-family: inherit; font-weight: 600; font-size: 12.5px; cursor: pointer; transition: color 0.15s; display: block; text-align: center; }
.panel-foot-btn:hover { color: var(--ink); }

/* ---- Friends / roster rows ---- */
.av-round { border-radius: 9px; display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-weight: 700; color: #0c0d10; flex: none; }
.fr-row { display: flex; align-items: center; gap: 11px; padding: 8px 0; border-bottom: 1px solid var(--line2); }
.fr-av-wrap { position: relative; flex: none; }
.fr-av { width: 34px; height: 34px; font-size: 15px; }
.fr-dot { position: absolute; bottom: -2px; right: -2px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--panel); }
.fr-main { flex: 1; min-width: 0; line-height: 1.3; }
.fr-name { color: var(--ink); font-weight: 600; font-size: 13px; }
.fr-status { font-size: 11px; color: var(--mut); }

/* ---- Mini stat boxes (guild snapshot) ---- */
.minis { display: flex; gap: 8px; }
.mini { flex: 1; background: rgba(255, 255, 255, 0.03); border-radius: 9px; padding: 9px; text-align: center; }
.mini-val { font: 700 17px/1 var(--font-head); }
.mini-label { font: 500 8.5px/1 var(--font-mono); letter-spacing: 0.1em; color: var(--mut); margin-top: 5px; }

/* ---- Status pills + key/value rows ---- */
.spill { display: inline-flex; align-items: center; gap: 6px; font: 600 10px/1 var(--font-mono); letter-spacing: 0.1em; padding: 5px 9px; border-radius: 20px; }
.spill-green { color: var(--green); background: rgba(95, 184, 122, 0.1); border: 1px solid rgba(95, 184, 122, 0.25); }
.spill .pdot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; }
.kv-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line2); }
.kv-row:last-child { border-bottom: none; }
.kv-row .kv-k { color: var(--mut); font-size: 13px; }
.kv-row .kv-v { color: var(--ink); font-weight: 600; font-size: 13px; }
.kv-row .kv-v.mono { font: 600 13px/1 var(--font-mono); color: var(--teal); }

/* ---- XP / progress bar ---- */
.xpbar { height: 7px; border-radius: 5px; background: #0a0b0e; overflow: hidden; border: 1px solid var(--line2); }
.xpbar-fill { height: 100%; background: linear-gradient(90deg, #5cb4a4, #7fd0c0); }
.xpbar-fill.gold { background: linear-gradient(90deg, #edc66b, #cf9c3a); }

/* ---- Character cards (dashboard + roster) ---- */
.char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(225px, 1fr)); gap: 14px; }
.char-grid.lg { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.ctile { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; cursor: pointer; transition: border-color 0.2s, transform 0.2s; position: relative; overflow: hidden; display: block; color: var(--txt); }
.ctile:hover { border-color: rgba(226, 182, 89, 0.4); transform: translateY(-3px); color: var(--txt); }
.ctile-banner { position: absolute; top: 0; left: 0; right: 0; height: 46px; opacity: 0.5; }
.ctile-row { position: relative; display: flex; align-items: center; gap: 12px; margin-bottom: 13px; }
.ctile-av { width: 48px; height: 48px; border-radius: 12px; font-size: 21px; border: 2px solid rgba(0, 0, 0, 0.3); }
.ctile-name { color: var(--ink); font-weight: 700; font-size: 14.5px; font-family: var(--font-head); }
.ctile-meta { font-size: 11.5px; color: var(--mut); }
.ctile-foot { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; color: var(--mut); }
.ctile-foot .gold-mono { font-family: var(--font-mono); color: var(--gold); }

/* roster card with full banner */
.rtile { position: relative; overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; cursor: pointer; transition: border-color 0.2s, transform 0.2s; display: block; color: var(--txt); }
.rtile:hover { border-color: rgba(226, 182, 89, 0.4); transform: translateY(-3px); color: var(--txt); }
.rtile-banner { height: 72px; position: relative; }
.rtile-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent, var(--panel)); }
.rtile-body { padding: 0 18px 18px; margin-top: -30px; position: relative; }
.rtile-av { width: 62px; height: 62px; border-radius: 15px; font-size: 27px; border: 3px solid var(--panel); }

.create-slot {
    border: 1.5px dashed var(--line); border-radius: 14px; padding: 16px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px;
    cursor: pointer; min-height: 118px; color: var(--mut); transition: all 0.2s; text-align: center;
}
.create-slot:hover { border-color: rgba(226, 182, 89, 0.5); color: var(--gold); }
.create-slot.lg { border-radius: 16px; gap: 10px; min-height: 200px; }
.create-slot i { font-size: 26px; }
.create-slot.lg i { font-size: 32px; }
.create-slot .cs-sub { font: 500 10px/1 var(--font-mono); color: var(--dim); }

/* ---- News cards ---- */
.hub-news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.hub-news { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; cursor: pointer; transition: border-color 0.2s; display: block; color: var(--txt); }
.hub-news:hover { border-color: rgba(255, 255, 255, 0.16); color: var(--txt); }
.hub-news .hn-tag { font: 600 10px/1 var(--font-mono); letter-spacing: 0.16em; color: var(--teal); margin-bottom: 11px; }
.hub-news h3 { font-family: var(--font-head); font-weight: 600; font-size: 17px; color: var(--ink); margin: 0 0 9px; line-height: 1.2; }
.hub-news p { font-size: 12.5px; line-height: 1.55; color: var(--mut); margin: 0 0 13px; }
.hub-news .hn-date { font: 500 11px/1 var(--font-mono); color: var(--dim); }

/* ---- Segmented tabs ---- */
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg-tab { padding: 7px 13px; border-radius: 9px; border: 1px solid transparent; background: transparent; color: var(--mut); font-family: inherit; font-weight: 600; font-size: 12.5px; cursor: pointer; transition: all 0.15s; }
.seg-tab:hover { color: var(--txt); }
.seg-tab.active { background: rgba(226, 182, 89, 0.12); border-color: rgba(226, 182, 89, 0.3); color: var(--gold); }

/* ---- Page header (new screens) ---- */
.phead { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; flex-wrap: wrap; gap: 14px; }
.phead h1 { font-family: var(--font-head); font-weight: 700; font-size: 34px; color: var(--ink); margin: 0; }
.phead-sub { font-size: 14px; color: var(--mut); margin: 9px 0 0; max-width: 560px; }

/* ---- Marketplace table (CSS grid rows) ---- */
.mk-row { display: grid; grid-template-columns: 2.4fr 1fr 1fr 1.4fr 0.8fr 1fr; gap: 12px; align-items: center; padding: 13px 20px; }
.mk-head { border-bottom: 1px solid var(--line); font: 600 9.5px/1 var(--font-mono); letter-spacing: 0.12em; color: var(--dim); text-transform: uppercase; }
.mk-listing { border-bottom: 1px solid var(--line2); transition: background 0.15s; }
.mk-listing:hover { background: rgba(255, 255, 255, 0.02); }

/* ---- House + Event two-column layouts ---- */
.house-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; align-items: start; }
.event-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 1024px) {
    .house-grid, .event-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .house-rooms { grid-template-columns: 1fr !important; }
}

/* ============================================================
   UI 2.0 — living world (map atlas, discoveries, world firsts)
   ============================================================ */

/* world summary strip */
.wsum { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-bottom: 22px; }
@media (max-width: 760px) { .wsum { grid-template-columns: repeat(2, 1fr); } }

/* region atlas */
.atlas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.region { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; transition: border-color 0.2s, transform 0.2s; }
.region:hover { border-color: rgba(226, 182, 89, 0.35); transform: translateY(-3px); }
.region-top { height: 6px; }
.region-pad { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.region-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.region-name { font-family: var(--font-head); font-weight: 700; font-size: 19px; color: var(--ink); margin: 0; }
.region-sub { font: 600 10px/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; margin-top: 6px; }
.region-kindpill { font: 600 9.5px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 9px; border-radius: 20px; border: 1px solid currentColor; white-space: nowrap; }
.region-desc { font-size: 12.5px; line-height: 1.55; color: var(--mut); margin: 0; }
.region-bar { height: 6px; border-radius: 5px; background: #0a0b0e; overflow: hidden; border: 1px solid var(--line2); }
.region-bar > div { height: 100%; }
.region-stats { display: flex; flex-wrap: wrap; gap: 5px 16px; font-size: 11.5px; color: var(--mut); }
.region-stats b { color: var(--txt); font-weight: 600; }
.region-event { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--gold); background: rgba(226, 182, 89, 0.07); border: 1px solid rgba(226, 182, 89, 0.18); border-radius: 9px; padding: 8px 11px; }
.region-event.live { color: var(--red); background: rgba(216, 112, 95, 0.08); border-color: rgba(216, 112, 95, 0.22); }
.region-foot { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 12px; margin-top: auto; border-top: 1px solid var(--line2); }
.conn-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--txt); background: var(--panel2); border: 1px solid var(--line); border-radius: 20px; padding: 4px 10px; }
.conn-chip:hover { border-color: rgba(255, 255, 255, 0.18); color: var(--ink); }
.lm-badge { display: inline-flex; align-items: center; gap: 5px; font: 600 10px/1 var(--font-mono); padding: 5px 8px; border-radius: 6px; background: var(--panel2); border: 1px solid var(--line); color: var(--mut); }
.lm-badge.boss { color: var(--red); border-color: rgba(216, 112, 95, 0.3); }
.lm-badge.dungeon { color: var(--purple); border-color: rgba(168, 120, 226, 0.3); }
.lm-badge.housing { color: var(--blue); border-color: rgba(90, 150, 221, 0.3); }
.region.frontier .region-name { color: var(--txt); }
.region-feature { grid-column: 1 / -1; }

/* featured region two-column body */
.feat-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 22px; }
@media (max-width: 860px) { .feat-grid { grid-template-columns: 1fr; } }
.lm-row { display: flex; align-items: center; gap: 11px; padding: 9px 0; border-bottom: 1px solid var(--line2); }
.lm-row .lm-ic { width: 34px; height: 34px; flex: none; border-radius: 9px; background: var(--panel2); display: flex; align-items: center; justify-content: center; }
.lm-row .lm-main { flex: 1; min-width: 0; line-height: 1.3; }
.lm-row .lm-name { color: var(--ink); font-weight: 600; font-size: 13px; }
.lm-row .lm-note { font-size: 11px; color: var(--mut); }
.lm-row .lm-tag { font: 600 9px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); flex: none; }

/* chronicle (discoveries + world feed) */
.chronicle { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.disc-row { display: flex; align-items: center; gap: 14px; padding: 13px 20px; border-bottom: 1px solid var(--line2); transition: background 0.15s; }
.disc-row:hover { background: rgba(255, 255, 255, 0.02); }
.disc-icon { width: 38px; height: 38px; flex: none; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.disc-icon i { font-size: 18px; }
.disc-main { flex: 1; min-width: 0; line-height: 1.4; }
.disc-text { font-size: 13.5px; color: var(--txt); }
.disc-text b { color: var(--gold); font-weight: 600; }
.disc-meta { font: 500 10px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); margin-top: 5px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.disc-when { font: 500 11px/1 var(--font-mono); color: var(--mut); flex: none; }

/* world firsts — permanent records */
.wf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.wf-card { display: flex; gap: 14px; padding: 18px; background: linear-gradient(150deg, #15140f, #101319); border: 1px solid rgba(226, 182, 89, 0.22); border-radius: 14px; }
.wf-seal { width: 46px; height: 46px; flex: none; border-radius: 12px; background: rgba(226, 182, 89, 0.1); border: 1px solid rgba(226, 182, 89, 0.3); display: flex; align-items: center; justify-content: center; }
.wf-seal i { font-size: 23px; }
.wf-body { flex: 1; min-width: 0; }
.wf-tag { font: 700 9px/1 var(--font-mono); letter-spacing: 0.16em; color: var(--gold); text-transform: uppercase; }
.wf-deed { font-family: var(--font-head); font-weight: 700; font-size: 16px; color: var(--ink); margin: 5px 0 4px; }
.wf-detail { font-size: 11.5px; color: var(--mut); line-height: 1.5; }
.wf-holder { display: flex; align-items: center; gap: 7px; margin-top: 10px; font-size: 12px; color: var(--txt); }
.wf-holder .wf-date { margin-left: auto; font: 500 10px/1 var(--font-mono); color: var(--dim); }

/* ============================================================
   UI 3.0 — guild legacy + realm/world news
   ============================================================ */

/* faction cards (guild directory) */
.faction-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; }
.faction { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: border-color 0.2s, transform 0.2s; color: var(--txt); }
.faction:hover { border-color: rgba(226, 182, 89, 0.35); transform: translateY(-3px); color: var(--txt); }
.faction-top { display: flex; align-items: center; gap: 14px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line2); }
.faction-crest { width: 52px; height: 52px; flex: none; border-radius: 13px; display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-weight: 800; font-size: 23px; color: #0b1512; }
.faction-name { font-family: var(--font-head); font-weight: 700; font-size: 18px; color: var(--ink); margin: 0; }
.faction-tag { font: 600 9.5px/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--teal); margin-top: 5px; }
.faction-body { padding: 14px 20px 18px; display: flex; flex-direction: column; gap: 12px; }
.faction-motto { font-family: var(--font-head); font-style: italic; color: var(--gold); font-size: 13px; }
.faction-minis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.fmini { background: rgba(255, 255, 255, 0.03); border-radius: 9px; padding: 9px 6px; text-align: center; }
.fmini-v { font: 700 16px/1 var(--font-head); }
.fmini-l { font: 500 8px/1.2 var(--font-mono); letter-spacing: 0.06em; color: var(--mut); margin-top: 5px; text-transform: uppercase; }
.faction-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line2); font-size: 12px; color: var(--mut); }

/* guild timeline */
.gtl { list-style: none; margin: 0; padding: 0; position: relative; }
.gtl::before { content: ""; position: absolute; left: 18px; top: 8px; bottom: 12px; width: 2px; background: var(--line); }
.gtl-item { position: relative; display: flex; gap: 16px; padding: 0 0 18px; }
.gtl-dot { position: relative; z-index: 1; width: 38px; height: 38px; flex: none; border-radius: 11px; background: var(--panel2); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.gtl-dot i { font-size: 18px; }
.gtl-body { padding-top: 2px; line-height: 1.4; }
.gtl-date { font: 600 9.5px/1 var(--font-mono); letter-spacing: 0.1em; color: var(--dim); text-transform: uppercase; }
.gtl-title { font-family: var(--font-head); font-weight: 700; font-size: 15px; color: var(--ink); margin: 3px 0; }
.gtl-detail { font-size: 12.5px; color: var(--mut); }

/* territory / influence rows */
.terr-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line2); }
.terr-main { flex: 1; min-width: 0; }
.terr-name { color: var(--ink); font-weight: 600; font-size: 13px; }
.terr-bar { height: 5px; border-radius: 4px; background: #0a0b0e; overflow: hidden; margin-top: 6px; }
.terr-bar > div { height: 100%; }
.terr-hold { font: 600 10px/1 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; flex: none; }

/* notable members */
.notable-row { display: flex; align-items: center; gap: 11px; padding: 9px 0; border-bottom: 1px solid var(--line2); }
.notable-av { width: 36px; height: 36px; border-radius: 10px; font-size: 15px; }

/* guild detail two-column legacy body */
.legacy-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 1024px) { .legacy-grid { grid-template-columns: 1fr; } }

/* news hub */
.news-feature { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; align-items: center; border: 1px solid rgba(226, 182, 89, 0.22); border-radius: 18px; padding: 28px 30px; background: linear-gradient(120deg, #161310, #0e1117); margin-bottom: 22px; }
.news-feature .nf-tag { font: 700 10px/1 var(--font-mono); letter-spacing: 0.18em; color: var(--gold); text-transform: uppercase; }
.news-feature h2 { font-family: var(--font-head); font-weight: 700; font-size: 28px; color: var(--ink); margin: 12px 0 12px; line-height: 1.1; }
.news-feature p { font-size: 14px; line-height: 1.6; color: var(--mut); margin: 0; }
.news-feature .nf-side { display: flex; align-items: center; justify-content: center; }
.news-feature .nf-emblem { width: 120px; height: 120px; border-radius: 30px; background: rgba(226, 182, 89, 0.08); border: 1px solid rgba(226, 182, 89, 0.25); display: flex; align-items: center; justify-content: center; }
@media (max-width: 760px) { .news-feature { grid-template-columns: 1fr; } .news-feature .nf-side { display: none; } }
.news2-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.news2 { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; color: var(--txt); transition: border-color 0.2s, transform 0.2s; }
.news2:hover { border-color: rgba(226, 182, 89, 0.3); transform: translateY(-3px); color: var(--txt); }
.news2-ic { width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.news2-ic i { font-size: 20px; }
.news2-tag { font: 700 9px/1 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; }
.news2 h3 { font-family: var(--font-head); font-weight: 600; font-size: 17px; color: var(--ink); margin: 8px 0; line-height: 1.2; }
.news2 p { font-size: 12.5px; line-height: 1.55; color: var(--mut); margin: 0 0 12px; }
.news2-date { font: 500 11px/1 var(--font-mono); color: var(--dim); }

/* ---- Responsive : rail collapses, grids stack (no JS) ---- */
@media (max-width: 1180px) {
    .tile-grid { grid-template-columns: repeat(3, 1fr); }
    .hub-grid { grid-template-columns: 1fr; }
    .hub-news-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1024px) {
    .rail { width: 72px; }
    .rail-brand { justify-content: center; padding: 18px 8px 14px; }
    .rail-title, .rail-sub, .rail-group-label, .rail-link span, .rail-badge,
    .rail-account .ra-main, .rail-account .ra-caret { display: none; }
    .rail-link { justify-content: center; gap: 0; padding: 11px 0; border-left: none; }
    .rail-link.active { border-left: none; box-shadow: inset 2px 0 0 var(--gold); }
    .rail-account { justify-content: center; padding: 10px 0; }
    .app-main { padding: 24px 20px 50px; }
}
@media (max-width: 760px) {
    .topbar { padding: 11px 16px; gap: 10px; }
    .topbar-search { display: none; }
    .tile-grid { grid-template-columns: repeat(2, 1fr); }
    .hub-news-grid { grid-template-columns: 1fr; }
    .hub-hero { padding: 24px 22px; }
    .hub-hero h1 { font-size: 30px; }
    .phead h1 { font-size: 27px; }
    /* Marketplace rows collapse to Item / Qty / Price / Action; seller + ends hide. */
    .mk-row { grid-template-columns: 1.8fr 0.6fr 1fr 0.9fr; }
    .mk-row > :nth-child(4), .mk-row > :nth-child(5) { display: none; }
    .mk-stats { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ==========================================================================
   NYTHARIS-PORTAL-DUNGEONS-HUB-1 — manifest-driven dungeon hub + detail.
   ========================================================================== */
.dungeon-page { max-width: 1240px; margin: 0 auto; }
.dungeon-hub-hero { background: linear-gradient(118deg, #18130d 0%, #11151b 52%, #0b1115 100%); }
.dungeon-hub-hero::before { background: radial-gradient(540px 300px at 84% 40%, rgba(92, 180, 164, 0.17), transparent 65%), radial-gradient(460px 260px at 8% 110%, rgba(226, 182, 89, 0.16), transparent 62%); }
.dungeon-hero-mark { width: 150px; height: 150px; flex: none; display: grid; place-items: center; border-radius: 50%; color: var(--gold); font-size: 72px; border: 1px solid rgba(226, 182, 89, 0.18); background: radial-gradient(circle, rgba(226, 182, 89, 0.12), rgba(226, 182, 89, 0.02) 58%, transparent 60%); box-shadow: 0 0 70px rgba(226, 182, 89, 0.12); }
.dungeon-source-line { display: inline-flex; align-items: center; gap: 8px; color: var(--mut); font: 500 11px/1.4 var(--font-mono); }
.dungeon-source-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.dungeon-source-dot.online { background: var(--green); box-shadow: 0 0 8px rgba(95, 184, 122, 0.7); }
.dungeon-source-dot.offline { background: var(--gold); }

.dungeon-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.dungeon-stat { position: relative; min-height: 88px; padding: 18px 18px 16px 54px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.dungeon-stat > i { position: absolute; left: 17px; top: 20px; color: var(--teal); font-size: 22px; }
.dungeon-stat strong { display: block; color: var(--ink); font: 700 23px/1 var(--font-head); }
.dungeon-stat span { display: block; margin-top: 8px; color: var(--mut); font: 600 9.5px/1.2 var(--font-mono); letter-spacing: .11em; text-transform: uppercase; }

.dungeon-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 20px; align-items: start; }
.dungeon-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 15px; }
.dungeon-filters { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dungeon-filter { padding: 7px 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--mut); background: var(--panel2); font-size: 12px; font-weight: 600; }
.dungeon-filter:hover { color: var(--ink); border-color: rgba(226, 182, 89, .28); }
.dungeon-filter.active { color: var(--gold); border-color: rgba(226, 182, 89, .35); background: rgba(226, 182, 89, .08); }
.dungeon-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.dungeon-card { position: relative; min-width: 0; padding: 20px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(145deg, var(--panel), #10141a); color: var(--txt); transition: transform .18s, border-color .18s, box-shadow .18s; }
.dungeon-card::after { content: ""; position: absolute; width: 170px; height: 170px; right: -85px; top: 55px; border-radius: 50%; background: radial-gradient(circle, rgba(92, 180, 164, .08), transparent 68%); pointer-events: none; }
.dungeon-card:hover { transform: translateY(-3px); border-color: rgba(226, 182, 89, .32); color: var(--txt); box-shadow: 0 15px 34px rgba(0, 0, 0, .24); }
.dungeon-card-top, .dungeon-detail-badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dungeon-tier { color: var(--gold); background: rgba(226, 182, 89, .09); border: 1px solid rgba(226, 182, 89, .23); border-radius: 7px; padding: 5px 8px; font: 650 9.5px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; }
.dungeon-status { display: inline-flex; align-items: center; gap: 6px; border-radius: 99px; padding: 5px 9px; color: var(--mut); background: rgba(255, 255, 255, .035); font: 600 9.5px/1 var(--font-mono); letter-spacing: .07em; text-transform: uppercase; }
.dungeon-status > span { width: 6px; height: 6px; border-radius: 50%; background: var(--dim); }
.dungeon-status.is-available { color: var(--green); background: rgba(95, 184, 122, .08); }
.dungeon-status.is-available > span { background: var(--green); box-shadow: 0 0 7px rgba(95, 184, 122, .7); }
.dungeon-status.is-coming { color: var(--gold); background: rgba(226, 182, 89, .07); }
.dungeon-status.is-coming > span { background: var(--gold); }
.dungeon-card-icon { position: absolute; right: 18px; top: 18px; color: rgba(226, 182, 89, .16); font-size: 39px; }
.dungeon-card h2 { position: relative; margin: 22px 0 8px; color: var(--ink); font: 600 21px/1.2 var(--font-head); }
.dungeon-card > p { position: relative; min-height: 42px; margin: 0 0 17px; color: var(--mut); font-size: 12.5px; line-height: 1.55; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.dungeon-card-facts { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 0 17px; border-top: 1px solid var(--line2); border-bottom: 1px solid var(--line2); }
.dungeon-card-facts > div { min-width: 0; padding: 11px 8px; border-right: 1px solid var(--line2); }
.dungeon-card-facts > div:first-child { padding-left: 0; }
.dungeon-card-facts > div:last-child { border-right: 0; }
.dungeon-card-facts dt { margin-bottom: 5px; color: var(--dim); font: 600 8px/1 var(--font-mono); letter-spacing: .09em; text-transform: uppercase; }
.dungeon-card-facts dd { margin: 0; color: var(--txt); font-size: 11.5px; font-weight: 600; overflow-wrap: anywhere; }
.dungeon-card-link { position: relative; display: inline-flex; align-items: center; gap: 6px; color: var(--gold); font-size: 12.5px; font-weight: 700; }
.dungeon-rail { display: flex; flex-direction: column; gap: 15px; }
.dungeon-rail h2, .dungeon-detail-aside h2 { margin: 9px 0; color: var(--ink); font: 600 17px/1.25 var(--font-head); }
.dungeon-rail p, .dungeon-detail-aside p { margin: 0; color: var(--mut); font-size: 12.5px; line-height: 1.6; }
.dungeon-side-icon { float: right; color: var(--teal); font-size: 25px; }
.dungeon-next-list { list-style: none; margin: 13px 0 0; padding: 0; }
.dungeon-next-list li { display: flex; align-items: center; gap: 9px; padding: 9px 0; color: var(--mut); border-bottom: 1px solid var(--line2); font-size: 12.5px; }
.dungeon-next-list li:last-child { border-bottom: 0; }
.dungeon-next-list i { color: var(--gold); font-size: 16px; }
.dungeon-state { display: flex; gap: 18px; align-items: center; padding: 30px; min-height: 160px; }
.dungeon-state-icon { width: 58px; height: 58px; flex: none; display: grid; place-items: center; border-radius: 15px; color: var(--gold); background: rgba(226, 182, 89, .08); border: 1px solid rgba(226, 182, 89, .18); font-size: 27px; }
.dungeon-state h2 { margin: 8px 0 6px; color: var(--ink); font: 600 21px/1.2 var(--font-head); }
.dungeon-state p { margin: 0; color: var(--mut); line-height: 1.55; }

.dungeon-breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 15px; color: var(--dim); font-size: 11.5px; }
.dungeon-breadcrumb a { color: var(--mut); }
.dungeon-breadcrumb a:hover { color: var(--gold); }
.dungeon-breadcrumb i { font-size: 10px; }
.dungeon-detail-hero { position: relative; overflow: hidden; display: flex; align-items: center; gap: 22px; min-height: 210px; padding: 28px 30px; border: 1px solid rgba(226, 182, 89, .17); border-radius: 19px; background: linear-gradient(118deg, #17130e, #11151b 55%, #0d1218); }
.dungeon-detail-glow { position: absolute; inset: 0; background: radial-gradient(500px 230px at 80% 45%, rgba(92, 180, 164, .13), transparent 68%), radial-gradient(360px 240px at 8% 110%, rgba(226, 182, 89, .12), transparent 65%); pointer-events: none; }
.dungeon-detail-icon { position: relative; width: 96px; height: 96px; flex: none; display: grid; place-items: center; border-radius: 21px; color: var(--gold); background: rgba(226, 182, 89, .08); border: 1px solid rgba(226, 182, 89, .22); font-size: 48px; }
.dungeon-detail-main { position: relative; flex: 1; min-width: 0; }
.dungeon-detail-main h1 { margin: 13px 0 7px; color: var(--ink); font: 700 clamp(29px, 4vw, 42px)/1.06 var(--font-head); }
.dungeon-detail-main > p { max-width: 620px; margin: 0; color: var(--mut); font-size: 14px; line-height: 1.55; }
.dungeon-entry-summary { position: relative; min-width: 175px; padding: 16px; text-align: center; background: rgba(7, 8, 10, .35); border: 1px solid var(--line); border-radius: 13px; }
.dungeon-entry-summary strong, .dungeon-entry-summary small { display: block; }
.dungeon-entry-summary strong { margin: 8px 0 5px; color: var(--green); font: 600 18px/1.2 var(--font-head); }
.dungeon-entry-summary small { color: var(--mut); font-size: 10.5px; }
.dungeon-detail-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 15px 0 20px; }
.dungeon-detail-stats > div { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 14px 15px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.dungeon-detail-stats i { color: var(--teal); font-size: 20px; }
.dungeon-detail-stats span { min-width: 0; }
.dungeon-detail-stats small, .dungeon-detail-stats strong { display: block; }
.dungeon-detail-stats small { margin-bottom: 4px; color: var(--dim); font: 600 8.5px/1 var(--font-mono); letter-spacing: .09em; text-transform: uppercase; }
.dungeon-detail-stats strong { color: var(--txt); font-size: 12.5px; overflow-wrap: anywhere; }
.dungeon-detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.dungeon-detail-content, .dungeon-detail-aside { display: flex; flex-direction: column; gap: 16px; }
.dungeon-section { padding: 22px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.dungeon-section-head { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 15px; }
.dungeon-section-head > span { color: rgba(226, 182, 89, .5); font: 700 11px/1 var(--font-mono); }
.dungeon-section-head h2 { margin: 6px 0 0; color: var(--ink); font: 600 19px/1.2 var(--font-head); }
.dungeon-section > p { margin: 0; color: var(--mut); font-size: 13px; line-height: 1.62; }
.dungeon-difficulty-list { margin-top: 15px; border-top: 1px solid var(--line2); }
.dungeon-difficulty { display: grid; grid-template-columns: minmax(140px, 1fr) auto auto; gap: 15px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line2); }
.dungeon-difficulty strong, .dungeon-difficulty small { display: block; }
.dungeon-difficulty strong { color: var(--ink); font-size: 13px; }
.dungeon-difficulty small { margin-top: 3px; color: var(--dim); font-size: 10px; }
.dungeon-difficulty > span { color: var(--mut); font: 500 11px/1.2 var(--font-mono); }
.dungeon-inline-empty, .dungeon-panel-note, .dungeon-cta-note { margin-top: 12px !important; color: var(--dim) !important; font-size: 11.5px !important; }
.dungeon-known-state { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel2); }
.dungeon-known-state > i { color: var(--mut); font-size: 22px; }
.dungeon-known-state.is-available > i { color: var(--green); }
.dungeon-known-state.is-coming > i { color: var(--gold); }
.dungeon-known-state strong { color: var(--ink); font-size: 13px; }
.dungeon-known-state p { margin: 4px 0 0; color: var(--mut); font-size: 12px; line-height: 1.5; }
.dungeon-cta-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.dungeon-static-cta { cursor: default; }
.dungeon-static-cta:hover { transform: none; }
.dungeon-static-cta.is-disabled { color: var(--mut); opacity: .76; }
.dungeon-static-cta small { margin-left: 3px; color: var(--dim); font: 600 8px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.dungeon-fact-list { margin: 0; }
.dungeon-fact-list > div, .dungeon-source-card dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line2); }
.dungeon-fact-list dt, .dungeon-source-card dt { color: var(--mut); font-size: 12px; }
.dungeon-fact-list dd, .dungeon-source-card dd { margin: 0; color: var(--txt); text-align: right; font-size: 12px; font-weight: 600; }
.dungeon-locked { display: flex; gap: 14px; align-items: flex-start; padding: 17px; border: 1px dashed rgba(226, 182, 89, .2); border-radius: 12px; background: rgba(226, 182, 89, .035); }
.dungeon-locked > i { color: var(--gold); font-size: 23px; }
.dungeon-locked strong { color: var(--ink); font-size: 13px; }
.dungeon-locked p { margin: 5px 0 0; color: var(--mut); font-size: 12px; line-height: 1.5; }
.dungeon-source-card dl { margin: 10px 0; }
.dungeon-source-card p { font-size: 10.5px; }

@media (max-width: 1040px) {
    .dungeon-layout, .dungeon-detail-layout { grid-template-columns: 1fr; }
    .dungeon-rail, .dungeon-detail-aside { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dungeon-detail-aside .dungeon-source-card { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
    .dungeon-hero-mark { width: 90px; height: 90px; font-size: 44px; }
    .dungeon-stat-grid, .dungeon-detail-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dungeon-card-grid { grid-template-columns: 1fr; }
    .dungeon-detail-hero { align-items: flex-start; flex-wrap: wrap; padding: 22px; }
    .dungeon-detail-icon { width: 72px; height: 72px; font-size: 36px; }
    .dungeon-entry-summary { width: 100%; text-align: left; }
    .dungeon-rail, .dungeon-detail-aside { grid-template-columns: 1fr; }
    .dungeon-detail-aside .dungeon-source-card { grid-column: auto; }
}
@media (max-width: 520px) {
    .dungeon-hero-mark { display: none; }
    .dungeon-stat-grid, .dungeon-detail-stats { grid-template-columns: 1fr; }
    .dungeon-card-facts { grid-template-columns: 1fr; }
    .dungeon-card-facts > div { padding: 9px 0; border-right: 0; border-bottom: 1px solid var(--line2); }
    .dungeon-card-facts > div:last-child { border-bottom: 0; }
    .dungeon-difficulty { grid-template-columns: 1fr; gap: 7px; }
    .dungeon-state { align-items: flex-start; padding: 22px; }
}

/* ==========================================================================
   PORTAL-HOUSES-READONLY-1 — read-only house registry (/houses, /houses/{id}).
   Mirrors the dungeon hub layout with housing semantics (home = teal, guildhall
   = gold). Existing tokens only; no new fonts or brand colours. Ownership and
   auctions are honest, disabled states — never live writes.
   ========================================================================== */
.house-page { max-width: 1240px; margin: 0 auto; }
.house-hub-hero { background: linear-gradient(118deg, #18130d 0%, #11151b 52%, #0b1115 100%); }
.house-hub-hero::before { background: radial-gradient(540px 300px at 84% 40%, rgba(92, 180, 164, 0.17), transparent 65%), radial-gradient(460px 260px at 8% 110%, rgba(226, 182, 89, 0.16), transparent 62%); }
.house-hero-mark { width: 150px; height: 150px; flex: none; display: grid; place-items: center; border-radius: 28px; color: var(--gold); font-size: 68px; border: 1px solid rgba(226, 182, 89, 0.18); background: radial-gradient(circle, rgba(226, 182, 89, 0.12), rgba(226, 182, 89, 0.02) 58%, transparent 60%); box-shadow: 0 0 70px rgba(226, 182, 89, 0.12); }
.house-source-line { display: inline-flex; align-items: center; gap: 8px; color: var(--mut); font: 500 11px/1.4 var(--font-mono); }
.house-source-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.house-source-dot.online { background: var(--green); box-shadow: 0 0 8px rgba(95, 184, 122, 0.7); }
.house-source-dot.offline { background: var(--gold); }

.house-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.house-stat { position: relative; min-height: 88px; padding: 18px 18px 16px 54px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.house-stat > i { position: absolute; left: 17px; top: 20px; color: var(--teal); font-size: 22px; }
.house-stat strong { display: block; color: var(--ink); font: 700 23px/1 var(--font-head); }
.house-stat span { display: block; margin-top: 8px; color: var(--mut); font: 600 9.5px/1.2 var(--font-mono); letter-spacing: .11em; text-transform: uppercase; }

.house-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 20px; align-items: start; }
.house-toolbar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 15px; }
.house-filters { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.house-filter { padding: 7px 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--mut); background: var(--panel2); font-size: 12px; font-weight: 600; }
.house-filter:hover { color: var(--ink); border-color: rgba(226, 182, 89, .28); }
.house-filter.active { color: var(--gold); border-color: rgba(226, 182, 89, .35); background: rgba(226, 182, 89, .08); }
.house-result-line { margin: 0 0 12px; color: var(--dim); font: 500 11.5px/1.4 var(--font-mono); }
.house-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.house-card { position: relative; min-width: 0; padding: 20px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(145deg, var(--panel), #10141a); color: var(--txt); transition: transform .18s, border-color .18s, box-shadow .18s; }
.house-card::after { content: ""; position: absolute; width: 170px; height: 170px; right: -85px; top: 55px; border-radius: 50%; background: radial-gradient(circle, rgba(92, 180, 164, .08), transparent 68%); pointer-events: none; }
.house-card:hover { transform: translateY(-3px); border-color: rgba(226, 182, 89, .32); color: var(--txt); box-shadow: 0 15px 34px rgba(0, 0, 0, .24); }
.house-card-top, .house-detail-badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.house-town { color: var(--teal); background: rgba(92, 180, 164, .09); border: 1px solid rgba(92, 180, 164, .22); border-radius: 7px; padding: 5px 8px; font: 650 9.5px/1 var(--font-mono); letter-spacing: .09em; text-transform: uppercase; }
.house-status { display: inline-flex; align-items: center; gap: 6px; border-radius: 99px; padding: 5px 9px; color: var(--mut); background: rgba(255, 255, 255, .035); font: 600 9.5px/1 var(--font-mono); letter-spacing: .07em; text-transform: uppercase; }
.house-status > span { width: 6px; height: 6px; border-radius: 50%; background: var(--dim); }
.house-status.is-home { color: var(--green); background: rgba(95, 184, 122, .08); }
.house-status.is-home > span { background: var(--green); box-shadow: 0 0 7px rgba(95, 184, 122, .7); }
.house-status.is-guildhall { color: var(--gold); background: rgba(226, 182, 89, .07); }
.house-status.is-guildhall > span { background: var(--gold); }
.house-card-icon { position: absolute; right: 18px; top: 18px; color: rgba(226, 182, 89, .16); font-size: 39px; }
.house-card h2 { position: relative; margin: 22px 0 8px; color: var(--ink); font: 600 20px/1.2 var(--font-head); }
.house-card > p { position: relative; min-height: 20px; margin: 0 0 17px; color: var(--mut); font-size: 12.5px; line-height: 1.55; }
.house-card-facts { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 0 17px; border-top: 1px solid var(--line2); border-bottom: 1px solid var(--line2); }
.house-card-facts > div { min-width: 0; padding: 11px 8px; border-right: 1px solid var(--line2); }
.house-card-facts > div:first-child { padding-left: 0; }
.house-card-facts > div:last-child { border-right: 0; }
.house-card-facts dt { margin-bottom: 5px; color: var(--dim); font: 600 8px/1 var(--font-mono); letter-spacing: .09em; text-transform: uppercase; }
.house-card-facts dd { margin: 0; color: var(--txt); font-size: 11.5px; font-weight: 600; overflow-wrap: anywhere; }
.house-card-link { position: relative; display: inline-flex; align-items: center; gap: 6px; color: var(--gold); font-size: 12.5px; font-weight: 700; }
.house-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 20px; }
.house-page-btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel2); color: var(--txt); font-size: 12.5px; font-weight: 600; }
.house-page-btn:hover { border-color: rgba(226, 182, 89, .32); color: var(--gold); }
.house-page-count { color: var(--mut); font: 600 11px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.house-rail { display: flex; flex-direction: column; gap: 15px; }
.house-rail h2, .house-detail-aside h2 { margin: 9px 0; color: var(--ink); font: 600 17px/1.25 var(--font-head); }
.house-rail p, .house-detail-aside p { margin: 0; color: var(--mut); font-size: 12.5px; line-height: 1.6; }
.house-side-icon { float: right; color: var(--teal); font-size: 25px; }
.house-next-list { list-style: none; margin: 13px 0 0; padding: 0; }
.house-next-list li { display: flex; align-items: center; gap: 9px; padding: 9px 0; color: var(--mut); border-bottom: 1px solid var(--line2); font-size: 12.5px; }
.house-next-list li:last-child { border-bottom: 0; }
.house-next-list i { color: var(--gold); font-size: 16px; }
.house-state { display: flex; gap: 18px; align-items: center; padding: 30px; min-height: 160px; }
.house-state-icon { width: 58px; height: 58px; flex: none; display: grid; place-items: center; border-radius: 15px; color: var(--gold); background: rgba(226, 182, 89, .08); border: 1px solid rgba(226, 182, 89, .18); font-size: 27px; }
.house-state h2 { margin: 8px 0 6px; color: var(--ink); font: 600 21px/1.2 var(--font-head); }
.house-state p { margin: 0; color: var(--mut); line-height: 1.55; }

.house-breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 15px; color: var(--dim); font-size: 11.5px; }
.house-breadcrumb a { color: var(--mut); }
.house-breadcrumb a:hover { color: var(--gold); }
.house-breadcrumb i { font-size: 10px; }
.house-detail-hero { position: relative; overflow: hidden; display: flex; align-items: center; gap: 22px; min-height: 210px; padding: 28px 30px; border: 1px solid rgba(226, 182, 89, .17); border-radius: 19px; background: linear-gradient(118deg, #17130e, #11151b 55%, #0d1218); }
.house-detail-glow { position: absolute; inset: 0; background: radial-gradient(500px 230px at 80% 45%, rgba(92, 180, 164, .13), transparent 68%), radial-gradient(360px 240px at 8% 110%, rgba(226, 182, 89, .12), transparent 65%); pointer-events: none; }
.house-detail-icon { position: relative; width: 96px; height: 96px; flex: none; display: grid; place-items: center; border-radius: 21px; color: var(--gold); background: rgba(226, 182, 89, .08); border: 1px solid rgba(226, 182, 89, .22); font-size: 46px; }
.house-detail-main { position: relative; flex: 1; min-width: 0; }
.house-detail-main h1 { margin: 13px 0 7px; color: var(--ink); font: 700 clamp(29px, 4vw, 42px)/1.06 var(--font-head); }
.house-detail-main > p { max-width: 620px; margin: 0; color: var(--mut); font-size: 14px; line-height: 1.55; }
.house-entry-summary { position: relative; min-width: 175px; padding: 16px; text-align: center; background: rgba(7, 8, 10, .35); border: 1px solid var(--line); border-radius: 13px; }
.house-entry-summary strong, .house-entry-summary small { display: block; }
.house-entry-summary strong { margin: 8px 0 5px; color: var(--gold); font: 600 18px/1.2 var(--font-head); }
.house-entry-summary small { color: var(--mut); font-size: 10.5px; }
.house-detail-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 15px 0 20px; }
.house-detail-stats > div { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 14px 15px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.house-detail-stats i { color: var(--teal); font-size: 20px; }
.house-detail-stats span { min-width: 0; }
.house-detail-stats small, .house-detail-stats strong { display: block; }
.house-detail-stats small { margin-bottom: 4px; color: var(--dim); font: 600 8.5px/1 var(--font-mono); letter-spacing: .09em; text-transform: uppercase; }
.house-detail-stats strong { color: var(--txt); font-size: 12.5px; overflow-wrap: anywhere; }
.house-detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.house-detail-content, .house-detail-aside { display: flex; flex-direction: column; gap: 16px; }
.house-section { padding: 22px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.house-section-head { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 15px; }
.house-section-head > span { color: rgba(226, 182, 89, .5); font: 700 11px/1 var(--font-mono); }
.house-section-head h2 { margin: 6px 0 0; color: var(--ink); font: 600 19px/1.2 var(--font-head); }
.house-section > p { margin: 0; color: var(--mut); font-size: 13px; line-height: 1.62; }
.house-panel-note, .house-cta-note { margin-top: 12px !important; color: var(--dim) !important; font-size: 11.5px !important; }
.house-known-state { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel2); }
.house-known-state > i { color: var(--gold); font-size: 22px; }
.house-known-state strong { color: var(--ink); font-size: 13px; }
.house-known-state p { margin: 4px 0 0; color: var(--mut); font-size: 12px; line-height: 1.5; }
.house-cta-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.house-static-cta { cursor: default; }
.house-static-cta:hover { transform: none; }
.house-static-cta.is-disabled { color: var(--mut); opacity: .76; }
.house-static-cta small { margin-left: 3px; color: var(--dim); font: 600 8px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.house-fact-list { margin: 0; }
.house-fact-list > div, .house-source-card dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line2); }
.house-fact-list dt, .house-source-card dt { color: var(--mut); font-size: 12px; }
.house-fact-list dd, .house-source-card dd { margin: 0; color: var(--txt); text-align: right; font-size: 12px; font-weight: 600; }
.house-locked { display: flex; gap: 14px; align-items: flex-start; padding: 17px; border: 1px dashed rgba(226, 182, 89, .2); border-radius: 12px; background: rgba(226, 182, 89, .035); }
.house-locked > i { color: var(--gold); font-size: 23px; }
.house-locked strong { color: var(--ink); font-size: 13px; }
.house-locked p { margin: 5px 0 0; color: var(--mut); font-size: 12px; line-height: 1.5; }
.house-source-card dl { margin: 10px 0; }
.house-source-card p { font-size: 10.5px; }

@media (max-width: 1040px) {
    .house-layout, .house-detail-layout { grid-template-columns: 1fr; }
    .house-rail, .house-detail-aside { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .house-detail-aside .house-source-card { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
    .house-hero-mark { width: 90px; height: 90px; font-size: 44px; }
    .house-stat-grid, .house-detail-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .house-card-grid { grid-template-columns: 1fr; }
    .house-detail-hero { align-items: flex-start; flex-wrap: wrap; padding: 22px; }
    .house-detail-icon { width: 72px; height: 72px; font-size: 34px; }
    .house-entry-summary { width: 100%; text-align: left; }
    .house-rail, .house-detail-aside { grid-template-columns: 1fr; }
    .house-detail-aside .house-source-card { grid-column: auto; }
}
@media (max-width: 520px) {
    .house-hero-mark { display: none; }
    .house-stat-grid, .house-detail-stats { grid-template-columns: 1fr; }
    .house-card-facts { grid-template-columns: 1fr; }
    .house-card-facts > div { padding: 9px 0; border-right: 0; border-bottom: 1px solid var(--line2); }
    .house-card-facts > div:last-child { border-bottom: 0; }
    .house-state { align-items: flex-start; padding: 22px; }
}

/* ==========================================================================
   HOUSE-AUCTION-BIDDING-1 — auction status chip (list) + bid card (detail).
   Existing tokens only. Honest states; no casino UI, no flashing pressure.
   ========================================================================== */
.house-auction-chip { display: inline-flex; align-items: center; gap: 5px; border-radius: 99px; padding: 5px 9px; font: 650 9.5px/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.house-auction-chip i { font-size: 12px; }
.house-auction-chip.is-live { color: var(--gold); background: rgba(226, 182, 89, .1); border: 1px solid rgba(226, 182, 89, .28); }
.house-auction-chip.is-owned { color: var(--teal); background: rgba(92, 180, 164, .09); border: 1px solid rgba(92, 180, 164, .24); }

.house-bid-notice { display: flex; align-items: center; gap: 9px; margin: 0 0 14px; padding: 11px 13px; border-radius: 11px; font-size: 12.5px; font-weight: 600; }
.house-bid-notice i { font-size: 17px; flex: none; }
.house-bid-notice.is-ok { color: var(--green); background: rgba(95, 184, 122, .08); border: 1px solid rgba(95, 184, 122, .22); }
.house-bid-notice.is-error { color: var(--red); background: rgba(216, 112, 95, .08); border: 1px solid rgba(216, 112, 95, .24); }

.house-bid-panel { display: flex; flex-direction: column; gap: 14px; }
.house-bid-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.house-bid-stats > div { min-width: 0; padding: 12px 13px; background: var(--panel2); border: 1px solid var(--line); border-radius: 11px; }
.house-bid-stats small { display: block; margin-bottom: 6px; color: var(--dim); font: 600 8.5px/1 var(--font-mono); letter-spacing: .09em; text-transform: uppercase; }
.house-bid-stats strong { display: block; color: var(--ink); font: 600 15px/1.1 var(--font-head); overflow-wrap: anywhere; }
.house-bid-by { display: block; margin-top: 5px; color: var(--mut); font: 500 10.5px/1.3 var(--font-mono); }
.house-bid-status { margin: 0; color: var(--mut); font-size: 12.5px; line-height: 1.55; }

.house-bid-gate { display: flex; align-items: center; gap: 10px; padding: 13px 14px; border: 1px dashed rgba(226, 182, 89, .2); border-radius: 11px; background: rgba(226, 182, 89, .03); color: var(--mut); font-size: 12.5px; }
.house-bid-gate i { color: var(--gold); font-size: 18px; flex: none; }
.house-bid-gate a { color: var(--gold); font-weight: 700; }

.house-bid-wallets { padding: 13px 14px; background: var(--panel2); border: 1px solid var(--line); border-radius: 11px; }
.house-bid-wallets ul { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.house-bid-wallets li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line2); }
.house-bid-wallets li:last-child { padding-bottom: 0; border-bottom: 0; }
.house-bid-wallet-name { color: var(--ink); font-size: 12.5px; font-weight: 700; }
.house-bid-wallet-funds { color: var(--mut); font: 500 11px/1.3 var(--font-mono); }
.house-bid-standing { margin-left: auto; border-radius: 99px; padding: 3px 8px; font: 650 9px/1 var(--font-mono); letter-spacing: .05em; text-transform: uppercase; }
.house-bid-standing.is-leading { color: var(--green); background: rgba(95, 184, 122, .1); }
.house-bid-standing.is-outbid { color: var(--mut); background: rgba(255, 255, 255, .04); }

.house-bid-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 14px; background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; }
.house-bid-field { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 150px; }
.house-bid-field span { color: var(--dim); font: 600 8.5px/1 var(--font-mono); letter-spacing: .09em; text-transform: uppercase; }
.house-bid-field select, .house-bid-field input { padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; color: var(--ink); font-size: 13px; font-weight: 600; }
.house-bid-field select:focus, .house-bid-field input:focus { outline: none; border-color: rgba(226, 182, 89, .4); }
.house-bid-form .btn-gold { flex: none; }

@media (max-width: 760px) {
    .house-bid-stats { grid-template-columns: repeat(2, 1fr); }
    .house-bid-form .btn-gold { width: 100%; justify-content: center; }
}

/* ==========================================================================
   PROFILE-PREMIUM-ARMORY-UI-1 — premium character profile / armory layout.
   Hero + stat strip + equipment paper-doll + build/passives + skills +
   professions + journey. Dark fantasy MMO palette, honest empty states.
   ========================================================================== */
.armory-profile { max-width: 1180px; }

/* ---- Hero ---- */
.armory-hero {
    position: relative; overflow: hidden;
    border: 1px solid var(--border); border-radius: var(--radius);
    background: linear-gradient(118deg, var(--panel) 0%, var(--panel2) 58%, #0a0d13 100%);
    box-shadow: var(--shadow); margin-bottom: 16px;
}
.armory-hero-bg {
    position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(78% 130% at 100% -10%, rgba(226, 182, 89, 0.13), transparent 55%),
        radial-gradient(60% 120% at 86% 130%, rgba(92, 180, 164, 0.06), transparent 60%),
        linear-gradient(100deg, var(--panel) 0%, var(--panel) 26%, rgba(15, 18, 24, 0.25) 78%, transparent 100%);
}
.armory-hero-bg::after {
    content: ""; position: absolute; inset: 0;
    box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.45);
}
.armory-hero-inner { position: relative; display: flex; align-items: center; gap: 22px; padding: 26px 30px; }
.armory-avatar {
    width: 104px; height: 104px; flex: none; border-radius: 18px; display: grid; place-items: center;
    font-family: var(--font-head); font-weight: 700; font-size: 52px; color: #1a140a;
    background: linear-gradient(158deg, var(--gold), var(--goldd));
    box-shadow: 0 12px 32px rgba(207, 156, 58, 0.36), inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}
.armory-hero-main { flex: 1 1 auto; min-width: 0; }
.armory-name { font-family: var(--font-head); font-size: clamp(30px, 4vw, 46px); letter-spacing: 1.5px; text-transform: uppercase; margin: 0; color: var(--ink); line-height: 1.05; }
.armory-sub { font-size: 17px; color: var(--txt); margin: 6px 0 5px; overflow-wrap: anywhere; }
.armory-sub .cls { color: var(--gold-2); font-weight: 600; }
.armory-meta { font-size: 14px; color: var(--mut); margin: 0; overflow-wrap: anywhere; }
.armory-you-badge {
    align-self: flex-start; flex: none; white-space: nowrap;
    font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700;
    color: var(--ok); border: 1px solid var(--ok); border-radius: 8px; padding: 7px 12px;
    background: rgba(95, 184, 122, 0.08);
}

/* ---- Stat strip ---- */
.armory-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 18px; }
.armory-stat { display: flex; align-items: center; gap: 12px; padding: 13px 15px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-sm); min-width: 0; }
.armory-stat .as-ic { width: 40px; height: 40px; flex: none; border-radius: 10px; display: grid; place-items: center; font-size: 20px; color: var(--gold-2); background: var(--raised); border: 1px solid var(--line); }
.armory-stat .as-body { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.armory-stat .as-label { font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--mut); }
.armory-stat .as-val { font-weight: 600; font-size: 15px; color: var(--ink); overflow-wrap: anywhere; }

/* ---- Panels ---- */
.armory-cols { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); gap: 20px; align-items: start; margin-bottom: 20px; }
.armory-cols-2 { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 20px; align-items: start; margin-bottom: 20px; }
.armory-panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.armory-panel .ap-head { padding: 18px 22px 2px; }
.armory-panel .ap-head h2 { font-family: var(--font-head); font-size: 19px; margin: 0; color: var(--ink); letter-spacing: 0.5px; }
.armory-panel .ap-sub { font-size: 13px; color: var(--mut); margin: 4px 0 0; }
.armory-panel .ap-body { padding: 16px 22px 22px; }
.armory-note { font-size: 13px; color: var(--mut); margin: 0 0 10px; }
.armory-state { text-align: center; font-size: 13px; color: var(--mut); margin: 16px auto 2px; max-width: 480px; line-height: 1.5; }
.armory-state.is-private { color: var(--down); }

/* ---- Equipment paper-doll ---- */
.equipment-grid {
    display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas:
        "amulet   head   offhand"
        "mainhand chest  ring2"
        "ring1    legs   trinket"
        "hands    feet   belt";
    max-width: 408px; margin: 6px auto 0; position: relative;
}
.equipment-grid::before {
    content: ""; position: absolute; inset: -10% -6%; pointer-events: none; z-index: 0;
    background: radial-gradient(58% 62% at 50% 44%, rgba(226, 182, 89, 0.05), transparent 72%);
}
.equipment-slot {
    position: relative; z-index: 1; aspect-ratio: 1 / 1; border-radius: 12px;
    background: linear-gradient(160deg, #0c0f15, #080a0e);
    border: 1px solid var(--line); display: grid; place-items: center;
    color: var(--dim); font-size: 22px; text-align: center; padding: 4px;
    transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.equipment-slot:hover { transform: translateY(-2px); border-color: var(--border-strong); color: var(--mut); }
.equipment-slot.is-filled { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(226, 182, 89, 0.25), 0 6px 18px rgba(0, 0, 0, 0.45); }
.equipment-grid.is-locked .equipment-slot { opacity: 0.5; }
.equipment-slot .es-glyph { opacity: 0.7; }
.equipment-slot.is-filled .es-glyph { color: var(--gold-2); opacity: 1; }
.equipment-slot .es-link { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--txt); text-decoration: none; width: 100%; }
.equipment-slot .es-name { font-size: 9.5px; line-height: 1.15; color: var(--text-dim); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.equipment-slot.rarity-uncommon { border-color: var(--r-uncommon); }
.equipment-slot.rarity-rare { border-color: var(--r-rare); }
.equipment-slot.rarity-epic { border-color: var(--r-epic); }
.equipment-slot.rarity-legendary { border-color: var(--r-legendary); }
.equipment-slot.rarity-mythic { border-color: var(--r-mythic); }

/* ---- Build / Passives ---- */
.passive-rows { display: flex; flex-direction: column; }
.passive-rowx { display: flex; gap: 13px; align-items: flex-start; padding: 11px 4px; border-bottom: 1px solid var(--line2); }
.passive-rowx:last-child { border-bottom: none; }
.passive-node {
    width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 18px;
    color: #1a140a; background: radial-gradient(circle at 50% 32%, var(--gold), var(--goldd));
    border: 1px solid rgba(226, 182, 89, 0.5); box-shadow: 0 0 14px rgba(226, 182, 89, 0.22);
}
.passive-node.is-empty { background: var(--raised); border-color: var(--line); box-shadow: none; }
.passive-body { min-width: 0; display: flex; flex-direction: column; gap: 5px; flex: 1; justify-content: center; }
.passive-title { font-weight: 600; color: var(--gold-2); font-size: 14.5px; }
.passive-desc { font-size: 13px; color: var(--mut); }

/* ---- Skeleton shimmer (clearly placeholders, never fabricated data) ---- */
.sk-line { height: 9px; border-radius: 6px; background: linear-gradient(90deg, var(--raised), #1c212b, var(--raised)); background-size: 200% 100%; }
.sk-line.w-40 { width: 40%; }
.sk-line.w-60 { width: 60%; }
.sk-line.w-80 { width: 80%; }

/* ---- Skills ---- */
.skill-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.skill-tile { display: flex; gap: 11px; align-items: center; padding: 12px; background: var(--panel2); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.skill-ic { width: 38px; height: 38px; flex: none; border-radius: 9px; display: grid; place-items: center; background: var(--raised); border: 1px solid var(--line); color: var(--dim); font-size: 17px; }

/* ---- Professions ---- */
.prof-group-title { font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--teal); margin: 16px 0 8px; }
.prof-group-title:first-child { margin-top: 4px; }
.profx-row { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: center; padding: 7px 0; }
.profx-ic { color: var(--mut); font-size: 18px; text-align: center; }
.profx-main { min-width: 0; }
.profx-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.profx-name { font-weight: 600; font-size: 13.5px; color: var(--txt); }
.profx-meta { font-size: 12px; color: var(--dim); white-space: nowrap; font-variant-numeric: tabular-nums; }
.profx-bar { height: 6px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); margin-top: 6px; overflow: hidden; }
.profx-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--gold)); }

/* ---- Journey ---- */
.journey-list { list-style: none; margin: 6px 0 0; padding: 0; position: relative; }
.journey-list::before { content: ""; position: absolute; left: 13px; top: 12px; bottom: 12px; width: 2px; background: var(--line); }
.journey-item { position: relative; display: grid; grid-template-columns: 28px 1fr auto; gap: 14px; align-items: start; padding: 11px 0; }
.journey-dot { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--raised); border: 1px solid var(--border-strong); color: var(--gold-2); font-size: 13px; z-index: 1; }
.journey-dot.is-now { border-color: var(--ok); color: var(--ok); box-shadow: 0 0 10px rgba(95, 184, 122, 0.3); }
.journey-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.journey-title { font-weight: 600; font-size: 14px; color: var(--ink); }
.journey-detail { font-size: 13px; color: var(--mut); overflow-wrap: anywhere; }
.journey-when { font-size: 12.5px; color: var(--dim); white-space: nowrap; }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .armory-strip { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
    .armory-cols, .armory-cols-2 { grid-template-columns: 1fr; }
    .armory-hero-inner { flex-wrap: wrap; gap: 16px; }
    .armory-you-badge { order: 3; margin-left: auto; }
}
@media (max-width: 560px) {
    .armory-strip { grid-template-columns: repeat(2, 1fr); }
    .armory-hero-inner { padding: 20px; }
    .armory-avatar { width: 80px; height: 80px; font-size: 40px; border-radius: 14px; }
    .skill-grid { grid-template-columns: 1fr; }
}
