:root {
  color-scheme: dark;
  --night: #0a1114;
  --panel: #131d21;
  --line: #34403f;
  --line-soft: #293536;
  --text: #e3e7e3;
  --muted: #a1afad;
  --gold: #c6a76c;
  --gold-light: #eed7a3;
  --green: #85c99b;
  --red: #e9a09a;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: #0a1114;
  color: var(--text);
  font: 14px/1.65 Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold-light); text-decoration: none; }
a:hover { color: #fff1cf; text-decoration: underline; }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
button, input[type=submit], input[type=button] { cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 4px; }
.site-icon, .heading-icon { display: inline-block; flex: 0 0 auto; width: 30px; height: 30px; object-fit: contain; vertical-align: middle; }
.heading-icon-news { background: url('images/icons-v2/news-scroll.svg') center / contain no-repeat; }
.skip-link { position: absolute; z-index: 30; top: -60px; left: 12px; padding: 10px 16px; background: #152027; }
.skip-link:focus { top: 10px; }

.site-header { position: relative; z-index: 5; border-bottom: 1px solid #8e794735; background: #0c1418; box-shadow: 0 3px 24px #0005; }
.topbar { display: flex; align-items: center; gap: 24px; width: min(100% - 64px, 1320px); min-height: 78px; margin: auto; }
.topbar-brand { display: inline-flex; align-items: center; gap: 10px; flex: none; color: var(--gold-light); font: 700 22px/1.12 Georgia, 'Times New Roman', serif; letter-spacing: .02em; white-space: nowrap; }
.topbar-brand:hover { text-decoration: none; }
.topbar-brand > .site-icon { width: 39px; height: 39px; }
.topbar-brand b { color: #f0e6cf; font-weight: 700; }
.topbar-brand small { display: block; margin-top: 7px; color: #a5aca4; font: 9px/1 Arial, sans-serif; letter-spacing: .18em; text-transform: uppercase; }
.top-nav { display: flex; align-items: center; justify-content: center; gap: 5px; margin-left: auto; }
.top-nav a { position: relative; display: inline-flex; align-items: center; min-height: 78px; padding: 0 12px; color: #bac4c2; font-size: 12px; font-weight: 700; white-space: nowrap; }
.top-nav a::after { position: absolute; bottom: 17px; left: 12px; right: 12px; height: 2px; background: var(--gold); content: ''; transform: scaleX(0); transition: transform .18s; }
.top-nav a:hover, .top-nav a[aria-current] { color: var(--gold-light); text-decoration: none; }
.top-nav a:hover::after, .top-nav a[aria-current]::after { transform: scaleX(1); }
.account-shortcut { display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: none; min-height: 39px; padding: 0 15px 0 10px; border: 1px solid #8a71485e; color: var(--gold-light); background: #c5a2650b; font-size: 12px; font-weight: 700; }
.account-shortcut .site-icon { width: 23px; height: 23px; }
.account-shortcut:hover { text-decoration: none; background: #c5a26518; border-color: #af9158; }

/* The scenery is viewport-wide, independent of the three-column content. */
.site-shell { position: relative; isolation: isolate; width: 100%; margin: 0; padding-bottom: 64px; }
.site-shell::before { position: absolute; z-index: -2; inset: 0 0 auto; height: 860px; content: ''; background: linear-gradient(180deg, #09131628 0%, #0a111429 34%, #0a1114dc 74%, #0a1114 100%), url('images/hero-citadel-v1.png') center top / cover no-repeat; }
/* One continuous scenery layer: a separate vignette ended at 580px and made a seam. */
.site-shell::after { content: none; }
.hero { position: relative; display: grid; place-items: center; min-height: 444px; text-align: center; }
.hero-inner { width: min(100%, 940px); padding: 33px 24px 65px; }
.hero-emblem { display: flex; justify-content: center; align-items: center; gap: 18px; margin: 0 auto 7px; }
.hero-emblem::before, .hero-emblem::after { content: ''; width: 70px; height: 1px; background: linear-gradient(90deg, transparent, #ddbd7780); }
.hero-emblem::after { transform: rotate(180deg); }
.hero-emblem .site-icon { width: 59px; height: 59px; filter: drop-shadow(0 4px 10px #0009); }
.hero-eyebrow, .section-kicker { margin: 0; color: #d9cba8; font-size: 10px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; }
.hero h1 { display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap; gap: 0 .2em; margin: 5px 0 7px; color: #eee8d9; font: 700 clamp(42px, 5.6vw, 76px)/1.12 Georgia, 'Times New Roman', serif; letter-spacing: -.025em; text-shadow: 0 3px 2px #000c, 0 8px 35px #000a; }
.hero h1 > span { color: #edce8c; }
.hero h1 .hero-version { align-self: center; margin: .18em 0 0 .24em; padding: .3em .35em; border-block: 1px solid #b89a5e80; color: #d5c4a0; font-size: .29em; font-weight: 400; letter-spacing: .08em; }
.hero-copy { margin: 12px 0 23px; color: #e0e7e4; font-size: 15px; text-shadow: 0 2px 8px #000; }
.hero-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.button { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 11px; min-height: 46px; padding: 9px 21px; border: 1px solid #b29459; color: #fff1d0; font-size: 11px; font-weight: 700; letter-spacing: .09em; text-align: center; text-transform: uppercase; box-shadow: inset 0 1px #ffdf9826, 0 5px 15px #0004; transition: background .18s, border-color .18s, transform .18s; }
.button .site-icon { width: 25px; height: 25px; }
.button-primary { background: linear-gradient(180deg, #8b6d3b, #5c4529); }
.button-secondary { border-color: #8d968477; background: #132229e8; }
.button:hover { color: #fff6df; border-color: #f0cd83; background-color: #28362f; text-decoration: none; transform: translateY(-1px); }
.button-primary:hover { background: linear-gradient(180deg, #a18048, #705432); }
.hero-note { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 17px 0 0; color: #b6c1bc; font-size: 11px; }
.world-badge { padding: 1px 8px; border: 1px solid #aac29d3a; background: #132522b0; color: #c1d8bd; font-size: 9px; letter-spacing: .11em; text-transform: uppercase; }

.content-grid { position: relative; z-index: 2; display: grid; grid-template-columns: 212px minmax(0, 1fr) 242px; align-items: start; gap: 18px; width: min(100% - 64px, 1320px); margin: -24px auto 0; }
.left-column, .right-column, .main-column { min-width: 0; }
.panel { position: relative; margin-bottom: 18px; border: 1px solid #44524e; background: linear-gradient(135deg, #182328ed, #10191dec); box-shadow: 0 9px 24px #0004, inset 0 0 0 3px #090f123b; }
.panel::before { position: absolute; top: -1px; left: 16px; right: 16px; height: 1px; content: ''; background: linear-gradient(90deg, transparent, #c2a1637a, transparent); pointer-events: none; }
.panel-heading { display: flex; align-items: center; gap: 9px; min-height: 57px; margin: 0; padding: 10px 13px; border-bottom: 1px solid #3e4c49; background: linear-gradient(180deg, #25332f88, #1b29274d); color: #e2cf9e; font: 700 15px/1.2 Georgia, 'Times New Roman', serif; letter-spacing: .025em; }
.menu-panel nav { padding: 7px 9px 9px; }
.menu-panel nav > a { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 38px; padding: 6px 11px; border-bottom: 1px solid #b3c4ad12; color: #c7cfca; font-size: 12px; transition: background .15s, color .15s; }
.menu-panel nav > a:last-child { border-bottom-color: transparent; }
.menu-chevron { color: #778a7f; font-size: 18px; font-weight: 400; }
.menu-panel nav > a:hover { color: #f7e8bf; background: #d4b77a0c; text-decoration: none; }
.menu-panel nav > a[aria-current] { border-left: 2px solid #cfad68; padding-left: 9px; background: linear-gradient(90deg, #c3a25e1f, #c3a25e03); color: #eed9a9; }
.menu-panel nav > a[aria-current] .menu-chevron { color: #ddbc74; }
.content-heading { padding: 25px 26px 20px; border-bottom: 1px solid #5c67533b; }
.section-kicker { color: #adaf97; font-size: 9px; letter-spacing: .2em; }
.content-heading h2 { margin: 5px 0 0; color: #ede2c8; font: 400 clamp(25px, 2.4vw, 32px)/1.25 Georgia, 'Times New Roman', serif; }
.content-body { min-width: 0; min-height: 270px; padding: 24px 26px 30px; overflow-wrap: break-word; }
.content-body p { margin-top: 0; }
.ots-tickers .panel-heading { min-height: 46px; padding: 7px 16px; font-size: 13px; }
.ots-tickers .heading-icon { width: 25px; height: 25px; }
.ticker-list { list-style: none; margin: 0; padding: 5px 18px; }
.ticker-list li { display: flex; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px solid #64715c30; font-size: 12px; line-height: 1.6; }
.ticker-list li:last-child { border: 0; }
.ticker-date { flex: none; color: #cab789; font-size: 10px; white-space: nowrap; }
.ticker-body { color: #bdc8c4; }

.status-body { padding: 16px 18px 19px; }
.save-countdown { margin-top: 17px; padding: 15px 0 0; border-top: 1px solid #64745d40; }
.save-label { display: block; color: #c4cbbb; font-size: 11px; }
.save-clock { display: block; margin: 2px 0 5px; color: #ecd39b; font-size: 24px; font-weight: 400; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.save-countdown small { display: block; color: #a9b4a3; font-size: 10px; line-height: 1.7; }
.server-info-intro { color: #c1cdbf; }
.server-info-section + .server-info-section { margin-top: 28px; }
.server-info-section h2 { margin: 0 0 12px; color: #e0cc9a; font: 400 21px/1.3 Georgia, serif; }
.server-info-table { width: 100%; text-align: left; font-size: 13px; }
.server-info-table th { width: 39%; color: #cdd5c7; font-weight: 400; }
.server-info-table td { color: #e5e8dc; }
.server-info-table tr:nth-child(odd) { background: #26382e83; }
.server-info-table tr:nth-child(even) { background: #1c2b2590; }
.server-info-table tr { border-bottom: 1px solid #78876820; }
.status-line { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 12px; font-weight: 700; }
.status-line.is-online { color: var(--green); }
.status-line.is-offline { color: var(--red); }
.status-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px #8bca9920; }
.status-number { margin: 0 0 9px; color: #c0cbc5; font-size: 12px; }
.status-number strong { margin-right: 4px; color: #eff4e7; font: 400 36px/1 Georgia, serif; }
.status-detail { margin: 0 0 15px; color: #9baa9f; font-size: 11px; }
.status-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid #68776540; color: #d5bd8a; font-size: 11px; font-weight: 700; }
.status-link span { color: #acbca6; font-size: 16px; font-weight: 400; }
.ranking-list { list-style: none; counter-reset: ranking; margin: 0; padding: 5px 16px; }
.ranking-list li { position: relative; counter-increment: ranking; padding: 11px 0 11px 31px; border-bottom: 1px solid #66725e30; font-size: 12px; }
.ranking-list li:last-child { border: 0; }
.ranking-list li::before { position: absolute; top: 14px; left: 0; display: grid; place-items: center; width: 21px; height: 23px; content: counter(ranking); border: 1px solid #81734770; background: #76613a1c; color: #d7bc7f; font: 12px Georgia, serif; clip-path: polygon(0 0, 100% 0, 100% 80%, 50% 100%, 0 80%); }
.ranking-name { display: block; max-width: 100%; overflow: hidden; color: #e2e6db; text-overflow: ellipsis; white-space: nowrap; }
.ranking-level { display: block; margin-top: 1px; color: #9fac9f; font-size: 10px; }
.ranking-panel .status-link { margin: 0 16px 14px; }
.begin-panel { padding-bottom: 15px; background: linear-gradient(140deg, #28352bea, #14211eed); }
.begin-panel p { margin: 16px 18px; color: #b9c5b7; font-size: 12px; line-height: 1.8; }
.begin-panel .button { display: flex; justify-content: space-between; min-height: 39px; margin: 0 17px; padding: 7px 12px; font-size: 10px; }
.begin-download { display: block; margin: 12px 15px 0; color: #b7c2ab; font-size: 10px; text-align: center; }

/* Retain the existing MyAAC forms, validation and controllers. */
.content-body table { max-width: 100%; border-collapse: collapse; }
.content-body table[width='100%'] { width: 100%; }
.content-body td, .content-body th { padding: 9px 10px; border-color: var(--line); }
.content-body .myaac-table { width: 100%; font-size: 13px; }
.content-body .myaac-table > tbody > tr:nth-child(even) { background: #20312f; }
.content-body .myaac-table > tbody > tr:nth-child(odd) { background: #172624; }
.content-body .myaac-table > thead > tr > th, .content-body .myaac-table > thead > tr > td { padding: 10px; background: #0f1d1c; color: #dfd2ac !important; }
.content-body input:not([type='checkbox']):not([type='radio']):not([type='submit']):not([type='button']), .content-body select, .content-body textarea { max-width: 100%; min-height: 37px; padding: 8px 10px; border: 1px solid #5a6a5b; border-radius: 2px; background: #0b1718; color: #edf1e7; box-shadow: inset 0 2px 5px #0003; }
.content-body input:focus, .content-body select:focus, .content-body textarea:focus { border-color: var(--gold-light); }
.content-body input[type='checkbox'], .content-body input[type='radio'] { accent-color: #b89b60; }
.content-body input[type='submit'], .content-body input[type='button'], .content-body button { min-height: 38px; padding: 8px 16px; border: 1px solid #a48a53; border-radius: 2px; background: linear-gradient(#79623c, #53422c); color: #fff1d6; font-size: 12px; font-weight: 700; }
.content-body input[type='submit']:hover, .content-body input[type='button']:hover, .content-body button:hover { background: #8c7145; }
.content-body fieldset { max-width: 100%; margin: 12px 0; padding: 14px; border: 1px solid #4e604e; }
.content-body legend { padding: 0 7px; color: #d8c799; }
.content-body .NewsHeadline { margin: 0; border: 0; background: transparent; }
.content-body .NewsHeadlineBackground { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; padding: 0 0 16px; border-bottom: 1px solid #74806437; }
.content-body .NewsHeadlineDate { order: 2; color: #a5b29e; font-size: 11px; }
.content-body .NewsHeadlineText { flex: 0 0 100%; margin: 0; color: #e4d1a0; font: 400 21px/1.35 Georgia, serif; }
.content-body .NewsHeadlineAuthor { order: 3; color: #a5b29e; font-size: 11px; }
.content-body .news-article { padding: 18px 0 8px; color: #c5cec5; font-size: 14px; line-height: 1.85; }
.content-body .news-article p:last-child { margin-bottom: 0; }
.content-body .news-comments { margin-top: 12px; padding-top: 12px; border-top: 1px solid #68776530; text-align: right; font-size: 12px; }
.news-entry + .news-entry { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--line); }

.site-footer { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 20px; width: min(100% - 64px, 1320px); margin: 0 auto; padding: 28px 0 32px; border-top: 1px solid #a58b5055; color: #a2aca0; font-size: 11px; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: #d3bd8b; font: 16px Georgia, serif; }
.footer-brand .site-icon { width: 36px; height: 36px; }
.footer-brand small { display: block; margin-top: 7px; color: #9aa79a; font: 10px Arial, sans-serif; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-links a { color: #b6c0af; font-size: 11px; }
.footer-credits { grid-column: 1 / -1; padding-top: 15px; border-top: 1px solid #5f70522c; color: #899589; font-size: 10px; line-height: 1.9; }
.footer-credits a { color: #bdc3af; }

@media (min-width: 1920px) { .site-shell::before { height: 1020px; background-position: center 35%; } .hero { min-height: 466px; } }
@media (max-width: 1180px) { .topbar, .content-grid, .site-footer { width: calc(100% - 40px); } .topbar { gap: 14px; } .top-nav a { padding-inline: 8px; } .top-nav a::after { left: 8px; right: 8px; } .content-grid { grid-template-columns: 185px minmax(0, 1fr) 215px; gap: 14px; } .panel-heading { padding-inline: 10px; gap: 6px; font-size: 14px; } .content-heading, .content-body { padding-inline: 20px; } }
@media (max-width: 1000px) { .topbar { flex-wrap: wrap; justify-content: space-between; gap: 0; padding-top: 15px; } .top-nav { order: 3; flex: 0 0 100%; margin: 4px 0 0; } .top-nav a { min-height: 49px; padding: 0 14px; } .top-nav a::after { bottom: 8px; } .content-grid { grid-template-columns: minmax(0, 1fr) 230px; } .left-column { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-column: 1 / -1; gap: 14px; } .left-column .panel { margin-bottom: 0; } .hero { min-height: 422px; } .hero-inner { padding-bottom: 53px; } .panel-heading { font-size: 15px; gap: 8px; } }
@media (max-width: 700px) { .topbar, .content-grid, .site-footer { width: calc(100% - 28px); } .top-nav { justify-content: center; flex-wrap: wrap; gap: 0; } .top-nav a { flex: none; min-height: 39px; padding-inline: 7px; font-size: 10px; } .hero { min-height: 399px; } .hero-inner { padding: 26px 20px 49px; } .hero-emblem .site-icon { width: 49px; height: 49px; } .hero-eyebrow { font-size: 9px; letter-spacing: .17em; } .hero-copy { max-width: 330px; margin: 13px auto 20px; font-size: 13px; } .hero-note { font-size: 10px; } .site-shell::before { height: 800px; background-position: 45% top; } .content-grid { display: flex; flex-direction: column; gap: 0; margin-top: -12px; } .main-column { order: 1; width: 100%; } .left-column { order: 2; width: 100%; gap: 12px; margin-bottom: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); } .left-column .menu-panel:last-child { grid-column: 1 / -1; } .left-column .menu-panel:last-child nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); } .left-column .menu-panel:last-child nav a { border-bottom: 0; } .right-column { order: 3; width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } .right-column .begin-panel { grid-column: 1 / -1; } .right-column .panel { margin-bottom: 0; } .panel { margin-bottom: 16px; } .content-body { min-height: 0; padding: 20px 18px 24px; } .content-heading { padding: 20px 18px 16px; } .site-shell { padding-bottom: 32px; } .site-footer { grid-template-columns: 1fr; gap: 21px; } .footer-links { gap: 22px; } .ticker-list li { display: block; padding: 10px 0; } .ticker-date { display: block; margin-bottom: 3px; } }
@media (max-width: 430px) { .topbar-brand { gap: 6px; font-size: 19px; } .topbar-brand > .site-icon { width: 32px; height: 32px; } .topbar-brand small { font-size: 8px; } .account-shortcut { padding: 0 10px 0 6px; min-height: 36px; gap: 4px; } .hero h1 { font-size: 42px; } .hero-actions { gap: 9px; } .button { padding: 8px 13px; gap: 7px; font-size: 10px; } .button .site-icon { width: 23px; height: 23px; } .hero-actions .button-primary > span { display: none; } .hero-copy { max-width: 275px; } .hero-note { flex-direction: column; gap: 5px; } .panel-heading { font-size: 14px; } .left-column { grid-template-columns: 1fr; } .left-column .menu-panel:last-child nav { display: block; } .right-column { grid-template-columns: 1fr; } .right-column .begin-panel { grid-column: auto; } .menu-panel nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } .menu-panel nav > a { padding-inline: 9px; font-size: 11px; } .content-body .NewsHeadlineText { font-size: 20px; } }
@media (max-width: 700px) {
  .content-body #createaccount, .content-body form:has(input[name='account_login']) { display: block; width: 100%; max-width: 100%; }
  .content-body #createaccount table, .content-body form:has(input[name='account_login']) table { width: 100% !important; max-width: 100% !important; table-layout: fixed; }
  .content-body #createaccount td, .content-body form:has(input[name='account_login']) td { display: block; width: 100% !important; max-width: 100%; overflow-wrap: anywhere; padding: 6px 0; }
  .content-body #createaccount input:not([type='checkbox']):not([type='radio']):not([type='submit']):not([type='button']), .content-body #createaccount select, .content-body form:has(input[name='account_login']) input:not([type='checkbox']):not([type='radio']):not([type='submit']):not([type='button']) { width: 100% !important; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }

/* Compact native navigation: the phone header stays on one row. */
.mobile-menu { display: none; }
@media (max-width: 700px) {
  .topbar { position: relative; flex-wrap: nowrap; justify-content: flex-start; gap: 9px; min-height: 72px; padding: 0; }
  .topbar-brand { margin-right: auto; }
  .top-nav { display: none; }
  .account-shortcut { min-height: 36px; padding: 0 10px; margin: 0; }
  .account-shortcut .site-icon { display: none; }
  .mobile-menu { display: block; flex: none; }
  .mobile-menu summary { display: flex; align-items: center; justify-content: center; min-width: 36px; min-height: 36px; border: 1px solid #8a71485e; background: #c5a2650b; color: #e4d4ae; list-style: none; cursor: pointer; }
  .mobile-menu summary::-webkit-details-marker { display: none; }
  .menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .menu-lines { display: block; width: 16px; height: 12px; border-block: 1px solid currentColor; position: relative; }
  .menu-lines::before { position: absolute; top: 5px; left: 0; width: 16px; border-top: 1px solid currentColor; content: ''; }
  .mobile-menu[open] summary { color: #f5dda2; border-color: #b79a63; background: #68543045; }
  .mobile-menu nav { position: absolute; z-index: 12; top: calc(100% - 1px); left: 0; right: 0; display: grid; padding: 8px; border: 1px solid #6e7457; background: #152321; box-shadow: 0 12px 28px #0009; }
  .mobile-menu nav a { display: flex; align-items: center; justify-content: space-between; min-height: 45px; padding: 8px 14px; border-bottom: 1px solid #9db08924; color: #d1d8c9; font-size: 13px; }
  .mobile-menu nav a:last-child { border-bottom: 0; }
  .mobile-menu nav a[aria-current] { background: #bda06320; color: #f0d8a0; }
  .mobile-menu nav a:hover { background: #bda06315; text-decoration: none; }
}
@media (max-width: 360px) {
  .topbar { gap: 6px; }
  .topbar-brand { font-size: 17px; gap: 5px; }
  .topbar-brand > .site-icon { width: 28px; height: 28px; }
  .topbar-brand small { font-size: 7px; letter-spacing: .13em; }
  .account-shortcut { padding-inline: 8px; font-size: 11px; }
}

/* MyAAC's legacy Highscores layout uses spacer cells and a second set of filters. */
@media (max-width: 700px) {
  .content-body > table:has(#skillFilter),
  .content-body > table:has(#skillFilter) > tbody,
  .content-body > table:has(#skillFilter) > tbody > tr { display: block; width: 100% !important; }
  .content-body > table:has(#skillFilter) > tbody > tr > td:is(:first-child, :nth-child(3), :nth-child(5)) { display: none; }
  .content-body > table:has(#skillFilter) > tbody > tr > td:is(:nth-child(2), :nth-child(4)) { display: block; width: 100% !important; padding: 0; text-align: left; }
  .content-body > table:has(#skillFilter) > tbody > tr > td:nth-child(2) { overflow-x: auto; }
  .content-body > table:has(#skillFilter) > tbody > tr > td:nth-child(4) { margin-top: 24px; }
  .content-body table:has(> tbody > tr > td > #skillFilter),
  .content-body table:has(> tbody > tr > td > #skillFilter) > tbody,
  .content-body table:has(> tbody > tr > td > #skillFilter) > tbody > tr,
  .content-body table:has(> tbody > tr > td > #skillFilter) > tbody > tr > td { display: block; width: 100% !important; }
  .content-body #skillFilter, .content-body #vocationFilter { display: block; width: 100%; }
}

/* Profile-only correction for MyAAC's stock characters.html.twig markup. */
.content-body:has(div > img[alt="player outfit"]) {
  overflow-x: auto;
}

.content-body div:has(> img[alt="player outfit"]) {
  position: relative !important;
  float: right;
  width: 96px !important;
  height: 96px !important;
  margin: 0 0 10px 12px !important;
  padding: 0 !important;
  overflow: hidden;
}

.content-body div > img[alt="player outfit"] {
  display: block;
  width: 128px !important;
  height: 128px !important;
  max-width: none !important;
  margin: -48px 0 0 -48px !important;
  image-rendering: pixelated;
}

.content-body:has(div > img[alt="player outfit"]) td[width="100"][valign="top"] {
  min-width: 132px;
}

.content-body:has(div > img[alt="player outfit"]) table[width="100"][align="center"] {
  width: 110px;
  max-width: none;
  table-layout: auto;
}

.content-body:has(div > img[alt="player outfit"]) table[width="100"][align="center"] td {
  padding: 0 !important;
}

.content-body:has(div > img[alt="player outfit"]) table[width="100"][align="center"] img {
  display: block;
  width: 32px;
  height: 32px;
  max-width: none;
}

/* Online-list outfits stay inside their own cell, independent of the profile portrait. */
.content-body td:has(> img[alt="player outfit"]) {
  position: relative;
  min-width: 52px;
  height: 52px;
  padding: 0;
  overflow: hidden;
}
.content-body td > img[alt="player outfit"] {
  position: absolute !important;
  top: auto !important;
  left: auto !important;
  right: 10px;
  bottom: 10px;
  display: block;
  width: 64px !important;
  height: 64px !important;
  max-width: none !important;
  margin: 0 !important;
  image-rendering: pixelated;
}

/* Community views share the theme's spacing without the old nested tables. */
.community-intro { margin: 0 0 24px; color: var(--muted); }
.community-empty { padding: 24px; border: 1px dashed #73826f66; background: #a7ba8206; color: #bcc9bf; }
.community-list { padding: 0; margin: 0; list-style: none; }
.support-card { display: flex; align-items: flex-start; gap: 20px; padding: 24px; border: 1px solid #9a865b59; background: linear-gradient(135deg, #35433555, #131f2300); }
.support-card-mark { flex: 0 0 48px; display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid #ae915b80; border-radius: 50%; color: var(--gold-light); font-size: 25px; }
.support-card h3, .guild-card h3 { margin: 0; color: var(--gold-light); font: 700 24px/1.3 Georgia, serif; }
.support-role { margin: 4px 0 16px; color: var(--gold); font-size: 12px; letter-spacing: .06em; }
.support-card-body > p:last-of-type { margin: 0 0 16px; }
.death-entry { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line-soft); }
.death-entry:first-child { padding-top: 0; }
.death-entry time { color: var(--muted); font-size: 12px; }
.death-description { overflow-wrap: anywhere; }
.guild-card { padding: 22px 0; border-bottom: 1px solid var(--line-soft); }
.guild-card p { color: var(--muted); overflow-wrap: anywhere; }
.guild-create { margin-top: 28px; padding-top: 12px; border-top: 1px solid var(--line); }
.house-search { display: grid; grid-template-columns: 85px minmax(0, 1fr); align-items: center; gap: 12px 16px; padding: 20px; background: #b5c3aa08; border: 1px solid var(--line-soft); }
.house-search select { width: 100%; min-width: 0; }
.house-search button { grid-column: 2; justify-self: start; }
.community-table-wrap { max-width: 100%; overflow-x: auto; margin-top: 20px; }
.content-body .community-table { width: 100%; border-collapse: collapse; }
.content-body .community-table th { text-align: left; color: var(--gold-light); }
.content-body .community-table :is(td, th) { padding: 12px 10px; border-bottom: 1px solid var(--line-soft); }
.house-facts { margin: 20px 0; }
.house-facts > div { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.house-facts dt { color: var(--muted); }
.house-facts dd { margin: 0; overflow-wrap: anywhere; }
.community-error { padding: 16px; border-left: 2px solid var(--red); background: #e9a09a09; }
.faq-item { padding: 0 0 4px; border-bottom: 1px solid var(--line-soft); }
.faq-item summary { padding: 18px 4px; color: var(--gold-light); font-weight: 700; cursor: pointer; }
.faq-item > p { margin: 0; padding: 0 4px 20px; color: #c3cec9; }
.faq-admin-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 0; }
.faq-admin-actions button { padding: 4px 10px; min-height: 32px; }
@media (max-width: 700px) {
  .mobile-menu nav { max-height: calc(100dvh - 90px); overflow-y: auto; overscroll-behavior: contain; }
  .death-entry { grid-template-columns: 1fr; gap: 5px; }
  .support-card { padding: 17px; gap: 14px; }
  .support-card-mark { flex-basis: 36px; width: 36px; height: 36px; font-size: 20px; }
  .house-search { grid-template-columns: 1fr; padding: 16px; gap: 6px; }
  .house-search select { margin-bottom: 10px; }
  .house-search button { grid-column: 1; }
}

/* Continue the accepted graphite workspace palette across shared site panels.
   Colors only: layouts, forms, gold accents and semantic status colors stay put. */
:root { --text: #d6dde3; --muted: #b2bec9; --line: #455361; --line-soft: #34424e; }
.panel { border-color: #45515c; background: linear-gradient(135deg, #1c252ded, #141c23ec); }
.panel-heading { border-bottom-color: #45515c; background: linear-gradient(180deg, #2c394588, #24303a4d); }
.content-heading { border-bottom-color: #8192a13b; }
.begin-panel { background: linear-gradient(140deg, #28343eea, #18222aed); }
.menu-panel nav > a { color: #d6dde3; border-bottom-color: #adbcca12; }
.menu-panel nav > a:last-child { border-bottom-color: transparent; }
.menu-panel nav > a:hover { color: #f7e8bf; }
.menu-panel nav > a[aria-current] { color: #eed9a9; }
.menu-chevron { color: #9cabb9; }
.menu-panel nav > a[aria-current] .menu-chevron { color: #ddbc74; }
:is(.begin-panel p, .begin-download, .status-detail, .ranking-level, .save-countdown small) { color: #b2bec9; }
:is(.status-number, .save-label) { color: #c4cdd5; }
.status-number strong { color: #edf1f4; }
.ranking-name { color: #d6dde3; }
:is(.save-countdown, .status-link, .ranking-list li) { border-color: #8192a140; }
.status-link span { color: #b2bec9; }
.content-body input:not([type='checkbox']):not([type='radio']):not([type='submit']):not([type='button']),
.content-body select,
.content-body textarea { background: #111b23; border-color: #617485; color: #d6dde3; }
.content-body :is(input, select, textarea):focus { border-color: var(--gold-light); }
.content-body fieldset { border-color: #455361; }
.mobile-menu nav { background: #1a242c; border-color: #617485; }
.mobile-menu nav a { color: #d6dde3; border-bottom-color: #8b9dac26; }
.mobile-menu nav a:last-child { border-bottom-color: transparent; }
.mobile-menu nav a[aria-current] { color: #f0d8a0; }

/* Standard MyAAC data tables, including the Online list and character tables. */
.content-body .myaac-table > tbody > tr:nth-child(odd),
.content-body .server-info-table > tbody > tr:nth-child(odd),
.content-body .community-table > tbody > tr:nth-child(odd) { background: #171f25; }
.content-body .myaac-table > tbody > tr:nth-child(even),
.content-body .server-info-table > tbody > tr:nth-child(even),
.content-body .community-table > tbody > tr:nth-child(even) { background: #1c262e; }
.content-body .myaac-table > tbody > tr.LabelH,
.content-body .myaac-table > thead > tr > :is(th, td),
.content-body .community-table > thead { background: #26323b; }
.content-body .server-info-table :is(th, td) { color: #d6dde3; }
.server-info-intro, .community-intro { color: #b2bec9; }
.server-info-table tr { border-bottom-color: #8192a126; }
.community-empty { border-color: #61748566; background: #a7b8c806; color: #b2bec9; }
.support-card { background: linear-gradient(135deg, #34424e55, #18222a00); }
.house-search { background: #b2bec908; }

/* The stock tables.headline wrapper writes these two exact legacy colors.
   Restrict !important to those colors; error/success/status styles remain intact. */
.content-body tr[bgcolor='#101820' i] { background-color: #26323b; }
.content-body tr[style*='background-color: #18232c' i] { background-color: #171f25 !important; }

/* Guild creation and character links, Alastera website polish v1. */
.guild-create { max-width: 620px; }
.guild-create h2 { margin: 0 0 12px; }
.guild-requirements, .guild-empty { line-height: 1.6; }
.guild-field { display: grid; gap: 8px; margin: 20px 0; }
.guild-field label { font-weight: bold; }
.guild-field :is(input, select) { box-sizing: border-box; width: 100%; min-width: 0; }
.guild-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; margin-top: 24px; }
.ranking-player { display: flex; align-items: center; gap: 6px; min-width: 0; text-decoration: none; }
.ranking-outfit { flex: 0 0 48px; object-fit: contain; image-rendering: pixelated; }
.ranking-details { min-width: 0; }
.ranking-player:hover .ranking-name { color: #e5c780; text-decoration: underline; }
.ranking-player:focus-visible { outline: 2px solid #e5c780; outline-offset: 3px; }
/* Classic serif navigation, with restrained gold and steel accents. */
.top-nav a, .account-shortcut, .menu-panel nav > a, .mobile-menu nav > a {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .035em;
}
.top-nav a { font-size: 13px; padding-inline: 10px; }
.account-shortcut { font-size: 12px; }
.panel-heading { text-transform: uppercase; letter-spacing: .055em; }
.menu-panel nav > a { min-height: 42px; font-size: 12px; line-height: 1.5; color: #bdcbd6; }
.menu-panel nav > a > span:first-child { min-width: 0; }
.menu-chevron { flex-shrink: 0; color: #8b9faf; }
.menu-panel nav > a:is([href$='/downloads'], [href$='/highscores'], [href$='/guilds']) > span:first-child {
  display: flex; align-items: center; gap: 7px;
}
.menu-panel nav > a:is([href$='/downloads'], [href$='/highscores'], [href$='/guilds']) > span:first-child::before {
  content: ''; width: 17px; height: 17px; flex: 0 0 17px; opacity: .85;
  background: center / contain no-repeat;
}
.menu-panel nav > a[href$='/downloads'] > span:first-child::before { background-image: url('images/icons-v2/downloads-backpack.svg'); }
.menu-panel nav > a[href$='/highscores'] > span:first-child::before { background-image: url('images/icons-v2/highscores-crown.svg'); }
.menu-panel nav > a[href$='/guilds'] > span:first-child::before { background-image: url('images/icons-v2/community-helmet.svg'); }
.menu-panel nav > a[href$='/downloads'] { color: #c9d7de; }
.menu-panel nav > a[href$='/highscores'] { color: #d9c596; }
.menu-panel nav > a:hover, .menu-panel nav > a[aria-current] { color: #f0d599; }
@media (max-width: 1150px) { .top-nav a { font-size: 11px; padding-inline: 7px; } }

/* The stock character profile uses spacer cells and side-by-side detail tables. */
@media (max-width: 700px) {
  .content-body:has(div > img[alt="player outfit"]) > table[cellpadding="0"][cellspacing="0"] {
    width: 100%;
    table-layout: fixed;
  }
  .content-body:has(div > img[alt="player outfit"]) > table[cellpadding="0"][cellspacing="0"] > tbody > tr > td {
    min-width: 0;
    padding: 0;
  }
  .content-body:has(div > img[alt="player outfit"]) > table[cellpadding="0"][cellspacing="0"] > tbody > tr > td:has(> img[src$="/images/general/blank.gif"]) {
    display: none;
  }
  .content-body div:has(> img[alt="player outfit"]) {
    float: none;
    margin: 0 auto 12px !important;
  }
  .content-body:has(div > img[alt="player outfit"]) td {
    overflow-wrap: anywhere;
  }
  .content-body:has(div > img[alt="player outfit"]) nobr {
    white-space: normal;
  }
  /* Stack only the Skills / Quests / Equipment layout, keeping item slots intact. */
  .content-body:has(div > img[alt="player outfit"]) table:has(> tbody > tr > td[width][valign="top"]) > tbody,
  .content-body:has(div > img[alt="player outfit"]) table:has(> tbody > tr > td[width][valign="top"]) > tbody > tr {
    display: block;
    width: 100%;
  }
  .content-body:has(div > img[alt="player outfit"]) td[width][valign="top"] {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 0 0 12px;
  }
}

/* Keep profile labels whole and fit the stock character search on phones. */
@media (max-width: 700px) {
  .content-body:has(div > img[alt="player outfit"]) table:first-of-type:has(> tbody > tr > td[width="20%"]) > tbody > tr > td:first-child:not([colspan]) {
    width: 38%;
    overflow-wrap: normal;
  }
  /* The direct LabelV150 cell identifies only the inner search layout table. */
  .content-body:has(div > img[alt="player outfit"]) table:has(> tbody > tr > td.LabelV150),
  .content-body:has(div > img[alt="player outfit"]) table:has(> tbody > tr > td.LabelV150) > tbody,
  .content-body:has(div > img[alt="player outfit"]) table:has(> tbody > tr > td.LabelV150) > tbody > tr,
  .content-body:has(div > img[alt="player outfit"]) table:has(> tbody > tr > td.LabelV150) > tbody > tr > td {
    display: block;
    width: 100% !important;
    max-width: 100%;
    min-width: 0;
  }
  .content-body:has(div > img[alt="player outfit"]) table:has(> tbody > tr > td.LabelV150) > tbody > tr > td {
    padding: 5px 0;
  }
  .content-body:has(div > img[alt="player outfit"]) table:has(> tbody > tr > td.LabelV150) input[name="name"] {
    width: 100% !important;
    max-width: 100%;
  }
}

/* Give the four account-character columns usable room on phones. */
@media (max-width: 700px) {
  .content-body:has(div > img[alt="player outfit"]) table:has(> tbody > tr > td[width="62%"]) {
    table-layout: fixed;
  }
  .content-body:has(div > img[alt="player outfit"]) table:has(> tbody > tr > td[width="62%"]) > tbody > tr > td {
    padding: 8px 4px; overflow-wrap: normal;
  }
  .content-body:has(div > img[alt="player outfit"]) td[width="62%"] { width: 38%; }
  .content-body:has(div > img[alt="player outfit"]) table:has(> tbody > tr > td[width="62%"]) td[width="30%"] { width: 24%; }
  .content-body:has(div > img[alt="player outfit"]) td[width="8%"] { width: 20%; }
  .content-body:has(div > img[alt="player outfit"]) table:has(> tbody > tr > td[width="62%"]) > tbody > tr > td:last-child:not([colspan]) { width: 18%; }
  .content-body:has(div > img[alt="player outfit"]) td:has(> input[name="View"]) { padding: 0; }
  .content-body:has(div > img[alt="player outfit"]) input[name="View"] { min-width: 0; min-height: 40px; padding: 6px 8px; font-size: 11px; }
  .content-body:has(div > img[alt="player outfit"]) nobr { overflow-wrap: anywhere; }
}
