:root {
    color-scheme: dark;
    --bg: #100e0e;
    --surface: #1b1817;
    --surface-raised: #24201d;
    --text: #f1e9dd;
    --muted: #c4b8aa;
    --gold: #ddb878;
    --gold-light: #f4d49a;
    --line: #5a4833;
    --red: #7d3328;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 6rem; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.6 "Segoe UI", Arial, sans-serif;
}
button, input, textarea, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button, select { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 4px; }
.skip-link { position: fixed; top: .5rem; left: .5rem; z-index: 30; padding: .7rem 1rem; background: var(--gold-light); color: #20150f; transform: translateY(-200%); }
.skip-link:focus { transform: translateY(0); }
.container { width: min(100% - 5rem, 1360px); margin-inline: auto; }

.header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(15, 13, 13, .96);
    border-bottom: 1px solid #55432e;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; min-height: 84px; }
.logo { display: inline-flex; align-items: center; gap: .8rem; text-decoration: none; flex-shrink: 0; }
.logo-mark {
    display: block;
    width: 56px;
    height: 56px;
}
.logo-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.logo strong { display: block; color: var(--gold-light); font: bold 1.36rem/1 Georgia, serif; letter-spacing: .05em; }
.logo small { display: block; margin-top: .4rem; color: var(--muted); font-size: .64rem; letter-spacing: .13em; text-transform: uppercase; }
.nav-menu { display: flex; align-items: center; gap: .25rem; padding: 0; margin: 0; list-style: none; }
.nav-menu a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: .5rem .85rem;
    color: var(--muted);
    text-decoration: none;
    font-size: .79rem;
    font-weight: 600;
    letter-spacing: .06em;
    transition: color .2s ease, background-color .2s ease;
}
.nav-menu a:hover, .nav-menu a.active { color: var(--gold-light); background: rgba(221, 184, 120, .07); }

.hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: radial-gradient(ellipse at 75% 48%, #4f251e 0%, #211613 35%, transparent 64%),
        linear-gradient(120deg, #161211 0%, #211714 60%, #100e0e 100%);
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .24;
    background: repeating-linear-gradient(115deg, transparent 0 90px, rgba(237, 191, 121, .035) 91px 92px);
}
.hero-layout { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; align-items: center; min-height: 650px; }
.hero-media { position: relative; z-index: 1; }
.hero-copy { position: relative; z-index: 2; padding: 5rem 0 6rem; }
.eyebrow {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin: 0 0 1.1rem;
    color: var(--gold);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
}
.eyebrow > span { width: 30px; height: 1px; background: var(--gold); }
.hero-title {
    margin: 0;
    max-width: 760px;
    font: 700 clamp(3.4rem, 5.3vw, 5.8rem)/1.07 Georgia, "Times New Roman", serif;
    letter-spacing: -.055em;
}
.hero-title em { color: var(--gold-light); font-style: normal; }
.hero-subtitle { max-width: 36rem; margin: 1.7rem 0 2rem; color: var(--muted); font-size: 1.08rem; line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    min-height: 46px;
    padding: .7rem 1.25rem;
    border: 1px solid #80613d;
    border-radius: 2px;
    background: #29211b;
    color: var(--gold-light);
    text-decoration: none;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .05em;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.btn:hover { background: #3a2a20; border-color: var(--gold-light); }
.btn:active { background: #533a29; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--gold); color: #20150f; border-color: var(--gold); }
.btn-primary:hover { background: var(--gold-light); color: #20150f; }
.btn-ghost { background: transparent; color: var(--text); border-color: #75614a; }
.hero-footnote { margin-top: 3rem; color: var(--muted); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; }
.hero-footnote span { margin-right: .55rem; color: var(--gold); }
.hero-art { position: relative; display: grid; place-items: center; width: min(100%, 650px); justify-self: end; aspect-ratio: 1; }
.hero-art picture { width: 78%; }
.hero-art img { position: relative; z-index: 1; display: block; width: 100%; height: auto; animation: crest-float 7s ease-in-out infinite; }
.hero-orbit { position: absolute; width: 75%; aspect-ratio: 1; border: 1px solid rgba(222, 182, 117, .16); border-radius: 50%; }
.hero-orbit-one { animation: orbit 34s linear infinite; }
.hero-orbit-two { width: 88%; border-style: dashed; opacity: .4; animation: orbit 50s linear infinite reverse; }
.hero-orbit::after { content: ""; position: absolute; top: 50%; left: -3px; width: 5px; height: 5px; background: var(--gold-light); border-radius: 50%; box-shadow: 0 0 15px var(--gold); }
.hero-bottom {
    position: absolute;
    z-index: 1;
    left: 50%;
    bottom: 1.5rem;
    transform: translateX(-50%);
    display: flex;
    gap: 1.5rem;
    color: #b7a58d;
    white-space: nowrap;
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .16em;
}
@keyframes crest-float { 50% { transform: translateY(-10px); } }
@keyframes orbit { to { transform: rotate(360deg); } }

.guild-section, .members, .news, .contact { padding: clamp(4rem, 7vw, 7rem) 0; border-bottom: 1px solid #30291f; }
.guild-video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; background: #080707; border: 1px solid var(--line); }
.video-status { margin: 1rem auto; width: min(100% - 2rem, 1360px); color: var(--muted); }
.video-status:empty { display: none; }
.members { background: #151211; }
.news { background: #151211; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 2.5rem; }
.section-heading > p, .section-description { max-width: 27rem; margin: 0; color: var(--muted); }
.section-description { margin-top: .8rem; }
.section-title { margin: 0; font: 700 clamp(2.4rem, 3.8vw, 4rem)/1.1 Georgia, serif; letter-spacing: -.04em; }
.section-title span { color: var(--gold); }
.account-surface, .events-surface, .roster-surface {
    padding: clamp(1.3rem, 3vw, 2.5rem);
    background: linear-gradient(135deg, #211c19, #191615);
    border: 1px solid var(--line);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .13);
}
.account-surface > p:first-child, .events-surface > p:first-child { margin-top: 0; color: var(--muted); }
.guild-form, .guild-list, #admin-panel, #badges, #wow-stats { margin-top: 1.5rem; }
#badges, #wow-stats { padding: 1rem 1.25rem; background: #171412; border-left: 2px solid var(--gold); }
#badges h3, #wow-stats h3 { margin-top: 0; }
.guild-form { display: grid; gap: .55rem; max-width: 680px; }
.guild-form h3 { margin: 0 0 .4rem; font: bold 1.4rem Georgia, serif; }
.guild-form label, .filter-field label { color: var(--text); font-size: .85rem; font-weight: 600; }
.guild-form input, .guild-form textarea, .guild-section select, .search-box, .filter-select {
    width: 100%;
    min-height: 46px;
    padding: .7rem .9rem;
    border: 1px solid #766145;
    border-radius: 2px;
    background: #151312;
    color: var(--text);
}
.guild-form textarea { resize: vertical; }
input::placeholder { color: #b4a99e; }
.guild-form > div { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.guild-card, .account-row { margin: .75rem 0; padding: 1.25rem; background: #211c19; border: 1px solid var(--line); overflow-wrap: anywhere; }
.guild-card h3 { color: var(--gold-light); font: bold 1.3rem Georgia, serif; }
.guild-card p { white-space: pre-wrap; }
.guild-card button, .account-row button, .account-row select { width: auto; margin: .25rem; }
.calendar-controls { display: flex; align-items: center; gap: 1rem; margin-top: 1.5rem; }
.calendar-controls h3 { min-width: 12rem; text-align: center; }
.calendar-controls .btn { min-width: 46px; padding: .4rem; font-size: 1.3rem; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .3rem; margin-top: .75rem; }
.calendar-grid > strong { padding: .4rem; color: var(--gold); font-size: .8rem; }
.calendar-day { min-height: 5rem; padding: .5rem; background: #151312; border: 1px solid #4d3e2e; overflow-wrap: anywhere; font-size: .85rem; }

.member-stats { display: flex; gap: 2.5rem; flex-shrink: 0; }
.stat { min-width: 6rem; }
.stat-number { display: block; color: var(--gold-light); font: bold 2.6rem/1 Georgia, serif; }
.stat-label { display: block; margin-top: .6rem; color: var(--muted); font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.preview-notice { display: flex; gap: .75rem; padding: .9rem 1.1rem; color: var(--muted); background: #211b16; border: 1px solid #55432e; border-bottom: 0; font-size: .85rem; }
.preview-notice span { color: var(--gold); }
.preview-notice p { margin: 0; }
.filters { display: grid; grid-template-columns: minmax(0, 2fr) minmax(200px, 1fr); gap: 1rem; }
.filter-field { display: grid; gap: .45rem; min-width: 0; }
.members-message { margin: 1.4rem 0; color: var(--muted); font-size: .9rem; }
.members-message--error { color: var(--gold-light); }
.armory-status { margin: -.7rem 0 1.4rem; color: var(--muted); font-size: .78rem; }
.retry-members { margin-bottom: 1rem; }
.members-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 1rem; }
.member-card { position: relative; overflow-wrap: anywhere; background: #171412; border: 1px solid #51412f; transition: border-color .2s ease, background-color .2s ease; }
.member-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 2px; background: var(--gold); opacity: .55; }
.member-card:hover { border-color: var(--gold); background: #211b17; }
.member-profile-button { width: 100%; height: 100%; padding: 1.4rem; border: 0; background: transparent; color: inherit; text-align: left; }
.member-summary { display: flex; align-items: center; gap: 1rem; }
.member-heading { min-width: 0; }
.member-portrait { display: grid; place-items: center; width: 72px; height: 72px; flex: 0 0 72px; overflow: hidden; border: 1px solid #80613d; border-radius: 50%; background: #28211c; color: var(--muted); text-align: center; font-size: .65rem; }
.member-portrait img { display: block; width: 100%; height: 100%; object-fit: cover; }
.member-profile-hint { margin-top: 1rem; color: var(--gold); font-size: .75rem; font-weight: 700; }
.member-name { color: var(--text); font: bold 1.35rem Georgia, serif; }
.member-class { margin-top: .5rem; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.member-level { margin-top: 1rem; color: var(--gold-light); font-size: .85rem; font-weight: 700; }
.member-info { margin-top: .45rem; color: var(--muted); font-size: .85rem; }
.member-status { display: inline-block; width: 7px; height: 7px; margin-right: .45rem; border-radius: 50%; background: #aaa; }
.member-status.online { background: #82bf89; box-shadow: 0 0 8px #82bf89; }

.character-dialog { width: min(1140px, calc(100% - 2rem)); max-height: min(90vh, 950px); padding: clamp(1.2rem, 3vw, 2rem); color: var(--text); background: #1b1715; border: 1px solid var(--gold); overflow-y: auto; overflow-wrap: anywhere; }
.character-dialog::backdrop { background: rgba(0, 0, 0, .8); }
.character-dialog-header { display: flex; justify-content: space-between; align-items: start; gap: 1rem; }
.character-dialog-header .eyebrow { margin-bottom: .5rem; }
.character-dialog h2 { margin: 0; color: var(--gold-light); font: bold clamp(1.6rem, 4vw, 2.4rem) Georgia, serif; }
.character-note, .character-snapshot, #character-status { color: var(--muted); font-size: .85rem; }
.arsenal-intro { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border: 1px solid var(--line); background: #120f0e; }
.arsenal-identity { margin: 0; color: var(--text); }
.arsenal-item-level { display: flex; flex-direction: column; margin: 0; color: var(--muted); text-align: right; font-size: .75rem; }
.arsenal-item-level strong { color: var(--gold-light); font: bold 1.8rem/1 Georgia, serif; }
.arsenal-last-login { margin: .5rem 0 1rem; color: var(--muted); font-size: .8rem; }
.arsenal-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.arsenal-nav-button { min-height: 44px; padding: .6rem 1rem; border: 1px solid #6d5941; background: #171412; color: var(--text); }
.arsenal-nav-button[aria-pressed="true"] { border-color: var(--gold); background: #423122; color: var(--gold-light); }
.arsenal-nav-button:hover, .arsenal-slot:hover { background-color: #34281e; }
.arsenal-nav-button:active, .arsenal-slot:active { background-color: #4a3524; }
.arsenal-panels { margin-top: 1rem; }
.arsenal-panel { padding: clamp(1rem, 2vw, 1.5rem); border: 1px solid var(--line); background: #151211; }
.arsenal-panel-title { margin: 0; color: var(--gold-light); font: bold 1.35rem Georgia, serif; }
.arsenal-help, .arsenal-icon-status { color: var(--muted); font-size: .85rem; }
.arsenal-stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, .85fr) minmax(0, 1fr); gap: .75rem; align-items: start; }
.arsenal-slots { display: grid; gap: .5rem; }
.arsenal-slot { display: flex; align-items: center; width: 100%; min-width: 0; min-height: 56px; gap: .65rem; padding: .35rem; border: 1px solid transparent; background: #211b17; color: var(--text); text-align: left; }
.arsenal-slot[aria-expanded="true"] { border-color: var(--gold-light); background: #3a2a20; }
.arsenal-slot-empty { background: #1a1715; color: var(--muted); }
.arsenal-slot-icon { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; overflow: hidden; border: 1px solid #766145; background: #0e0c0b; color: var(--muted); }
.arsenal-slot-icon img { display: block; width: 100%; height: 100%; object-fit: cover; }
.arsenal-slot-description { display: grid; min-width: 0; line-height: 1.3; }
.arsenal-slot-name { font-weight: 600; overflow-wrap: anywhere; }
.arsenal-slot-meta { margin-top: .2rem; color: var(--muted); font-size: .75rem; }
.quality-uncommon .arsenal-slot-icon { border-color: #68d76c; }
.quality-rare .arsenal-slot-icon { border-color: #68aaff; }
.quality-epic .arsenal-slot-icon { border-color: #d29af2; }
.quality-legendary .arsenal-slot-icon { border-color: #f5ac68; }
.character-art { position: relative; display: grid; place-items: center; min-height: 440px; overflow: hidden; background: radial-gradient(ellipse at center, #473127, #171412 70%); color: var(--muted); text-align: center; }
.character-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.arsenal-item-detail { padding: 1rem; border: 1px solid #6d5941; background: #211b17; }
.arsenal-detail-label { margin: 0 0 .4rem; color: var(--muted); font-size: .8rem; }
.arsenal-detail-name { margin: 0; color: var(--gold-light); font: bold 1.2rem Georgia, serif; }
.arsenal-detail-list { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; margin: .6rem 0 0; padding-left: 1.2rem; }
.arsenal-values { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .5rem; }
.arsenal-values div, .arsenal-professions li { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem; background: #211b17; }
.arsenal-values dt { color: var(--muted); }
.arsenal-values dd { margin: 0; color: var(--gold-light); font-weight: 700; }
.arsenal-professions { display: grid; gap: .5rem; padding: 0; list-style: none; }

.news-grid, .contact-info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.news-card, .contact-info p { margin: 0; padding: 2rem; background: var(--surface); border: 1px solid var(--line); }
.news-card h3 { color: var(--text); font: bold 1.55rem Georgia, serif; }
.news-card p, .contact-info p { color: var(--muted); }
.news-category, .news-date { color: var(--gold); font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.news-date { display: block; margin-top: 2rem; color: var(--muted); }
.contact-info strong { display: inline-block; margin-bottom: .5rem; color: var(--gold-light); font: bold 1.3rem Georgia, serif; }
.footer { padding: 2rem 0; color: var(--muted); font-size: .8rem; }

@media (max-width: 1024px) {
    .container { width: min(100% - 3rem, 1360px); }
    .nav-inner { gap: 1rem; }
    .nav-menu a { padding-inline: .5rem; font-size: .75rem; }
    .hero-layout { min-height: 560px; }
}
@media (max-width: 768px) {
    html { scroll-padding-top: 1rem; }
    .header { position: relative; }
    .nav-inner { align-items: flex-start; flex-direction: column; gap: .75rem; padding-block: 1rem; }
    .nav-menu { flex-wrap: wrap; gap: .1rem .25rem; }
    .nav-menu a { padding-inline: .6rem; }
    .hero-layout { grid-template-columns: 1fr; min-height: auto; }
    .hero-copy { padding: 4rem 0 1rem; }
    .hero-title { font-size: clamp(3rem, 10vw, 4.5rem); }
    .hero-subtitle { font-size: 1rem; }
    .hero-footnote { margin-top: 2.5rem; }
    .hero-art { width: min(85%, 440px); justify-self: center; margin: -1rem 0 3rem; }
    .hero-bottom { bottom: 1rem; font-size: .55rem; }
    .section-heading { align-items: flex-start; flex-direction: column; gap: 1rem; }
    .member-stats { margin-top: .5rem; }
    .filters { grid-template-columns: 1fr; }
    .calendar-day { min-height: 3.5rem; padding: .2rem; font-size: .72rem; }
    .calendar-controls h3 { min-width: 0; }
}
@media (max-width: 480px) {
    .container { width: calc(100% - 2rem); }
    .news-grid, .contact-info { grid-template-columns: 1fr; }
    .hero-title { font-size: clamp(2.7rem, 11vw, 3.5rem); }
    .hero-actions .btn { flex: 1 1 auto; }
    .member-stats { gap: 1.5rem; }
    .news-card, .contact-info p { padding: 1.4rem; }
    .character-dialog { width: calc(100% - 1rem); padding: 1rem; }
    .arsenal-panel { padding: .75rem; }
    .arsenal-stage { grid-template-columns: minmax(0, 1fr); }
    .arsenal-slots { min-width: 0; }
    .character-art { grid-column: 1; grid-row: 1; width: 100%; min-height: 260px; max-height: 360px; aspect-ratio: 3 / 4; }
    .character-art img { object-fit: contain; }
    .arsenal-slot { align-items: center; flex-direction: row; }
    .arsenal-slot-description { flex: 1; }
    .arsenal-item-detail { width: 100%; min-width: 0; padding: .85rem; }
    .arsenal-detail-list { display: block; }
    .arsenal-detail-list li + li { margin-top: .35rem; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
